Skip to content

pdflatex index creation fails for index entries in French #13130

@skuskusku

Description

@skuskusku

Describe the bug

My project creates a pdf file in french language (project language is French). If I add entries to the index like so:

.. index::
   single: Écran de connexion

then index creation fails for the latex build with something like this if I run latexmk -pdf on the generated .tex file and just hangs:

[1]
[2]
Chapitre 1.
(test.ind
[3]
[4]
! Argument of \UTFviii@two@octets@combine has an extra }.
<inserted text>
                \par
l.13   \bigletter �

?


If I do not use latexmk -pdf but instead build with TexnicCenter and pdflatex, then all entries in the index at the end of the resulting pdf are prepended with "\spxentry", so for the above example it looks like this:

\spxentryÉcran de connexion

How to Reproduce

My conf.py looks like this:

project = 'test'
copyright = '2024, me myself and I'
author = 'me myself and I'
release = '0.1'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []

templates_path = ['_templates']
exclude_patterns = []

language = 'fr'

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']

my index.rst file looks like this:

.. test documentation master file, created by
   sphinx-quickstart on Wed Nov 13 16:23:59 2024.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

test documentation
==================


.. index::
   single: Connexions multiples au serveur
   single: Client;Connexions multiples au serveur


Add your content using ``reStructuredText`` syntax. See the
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
documentation for details.

another test documentation
==========================

************************************************
Exécution du client sur l'écran de connexion
************************************************

.. index::
   single: Écran de connexion

This index entry makes a helluva problems

.. toctree::
   :maxdepth: 2
   :caption: Contents:



Other than that I just ran sphinx-quickstart to reproduce this behaviour.

Environment Information

I am running Python 3.12.3 on Windows with miktex 23.4 and sphinx-build 8.1.3.

Sphinx extensions

I do not use any extensions, I could reproduce this with a modified variant of the sphinx-quickstart result.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions