Le 07/03/2019 à 18:03, Dave Page a écrit :
Chapter 1.
! Use of \@icentercr doesn't match its definition.
<argument> \def
l.88 ...spxentry{Getting Started}}Getting Started} ?

Hi,

This is caused by usage of index role inside
top level sectioning titles which creates such mark-up in
LaTeX :

\chapter{\index{Getting Started@\spxentry{Getting Started}}Getting Started}


Unfortunately, Sphinx by default uses a package fncychap
which tries to uppercase the chapter titles.

It uses for this LaTeX core macro \MakeUppercase but the
other LaTeX core macro \index
is not legal inside \MakeUppercase argument and this creates
the error you hit against.

I can propose this workaround for your project :

add either

latex_elements = {
    'fncychap' : r'\usepackage[Bjarne]{fncychap}\UCTfalse',
}


or

latex_elements = {
    'fncychap' : r'\usepackage[Sonny]{fncychap}',
}

to your conf.py.

The former disables the uppercasing but keeps the Bjarne style,
(\UCTfalse is a macor of fncychap)
the latter switches to another style which uses no uppercasing.

http://www.sphinx-doc.org/en/master/latex.html#latex-elements-confval

'fncychap'

    Inclusion of the “fncychap” package (which makes fancy chapter titles), 
default '\\usepackage[Bjarne]{fncychap}' for English documentation (this option 
is slightly customized by Sphinx), '\\usepackage[Sonny]{fncychap}' for 
internationalized docs (because the “Bjarne” style uses numbers spelled out in 
English). Other “fncychap” styles you can try are “Lenny”, “Glenn”, “Conny”, 
“Rejne” and “Bjornstrup”. You can also set this to '' to disable fncychap.


Or

latex_elements = {
    'fncychap' : '',
}

will disable usage of this LaTeX package altogether and also fix your problem.

This looks like a bug of Sphinx can you please raise the issue at the github 
tracker ?

Don't worry about a minimal example I will provide one later on,

Thanks,

Jean-François





--
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sphinx-users+unsubscr...@googlegroups.com.
To post to this group, send email to sphinx-users@googlegroups.com.
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to