Thank you very much.
On Monday, March 20, 2023 at 6:52:54 AM UTC-7 jfbu wrote:
> Le 15/03/2023 à 19:22, Nigel Barth a écrit :
> > Hi --
> >
> > Has anyone seen *"\spxentry"* appear before index entries in Latex
> output?
> >
> > Like this:
> >
> > \spxentryportait orientation, 28
> > \spxentryPrint command, 26
> > \spxentryPrinter dialog, 29
> >
> > If so... how did you remove that prefix?
> >
>
> Hi,
>
> You probably see that because \spxentry was not redefined as it should.
>
> The normally produced .ind file will be something like this:
>
> /----------- <foo>.ind
> \begin{sphinxtheindex}
> \let\bigletter\sphinxstyleindexlettergroup
> \let\spxpagem \sphinxstyleindexpagemain
> \let\spxentry \sphinxstyleindexentry
> \let\spxextra \sphinxstyleindexextra
>
> \bigletter P
> \item \spxentry{Print command}, \hyperpage{1}
>
> \end{sphinxtheindex}
> \-----------
>
> Notice the line \let\spxentry \sphinxstyleindexentry.
>
> The default definition of \spxentry is used at an earlier stage
> when latex produces the .idx file. That default definition,
> if not later overwritten, can explain what you see in PDF.
>
> The stuff above is put in .ind file via the default python.ist
> placed in latex build repertory by Sphinx
>
> Its contents are
>
> /----------- python.ist
> line_max 100
> headings_flag 1
> heading_prefix " \\bigletter "
>
> preamble "\\begin{sphinxtheindex}
> \\let\\bigletter\\sphinxstyleindexlettergroup
> \\let\\spxpagem \\sphinxstyleindexpagemain
> \\let\\spxentry \\sphinxstyleindexentry
> \\let\\spxextra \\sphinxstyleindexextra
>
> "
>
> postamble "\n\n\\end{sphinxtheindex}\n"
>
> symhead_positive "{\\sphinxsymbolsname}"
> numhead_positive "{\\sphinxnumbersname}"
> \-----------
>
> I guess you have something interfering, or all directly running
> makeindex without "-s python.ist"
>
> This should not happen if you use "make latexpdf" or "sphinx-build -M
> latexpdf"
> (for the latter see
> https://www.sphinx-doc.org/en/master/man/sphinx-build.html)
>
> Maybe you are on Windows? I can't help much there but the make.bat should
> work.
>
> In short, Sphinx puts auxiliary support files for building the PDF,
> these support files will let Latexmk work appropriately.
>
> For example there is
>
> /----------- latexmkrc
> $latex = 'latex ' . $ENV{'LATEXOPTS'} . ' %O %S';
> $pdflatex = 'pdflatex ' . $ENV{'LATEXOPTS'} . ' %O %S';
> $lualatex = 'lualatex ' . $ENV{'LATEXOPTS'} . ' %O %S';
> $xelatex = 'xelatex --no-pdf ' . $ENV{'LATEXOPTS'} . ' %O %S';
> $makeindex = 'makeindex -s python.ist %O -o %D %S';
> add_cus_dep( "glo", "gls", 0, "makeglo" );
> sub makeglo {
> return system( "makeindex -s gglo.ist -o '$_[0].gls' '$_[0].glo'" );
> }
> \-----------
>
> Bypassing this and trying to build the PDF directly from the .tex file
> maybe why you have this issue.
>
> (in particular executing makeindex without the "-s python.ist")
>
> If, on the other hand, you obtain this from a genuine "make latexpdf"
> at source level or "make all-pdf" inside the LaTeX build repertory
> after "make latex", then please raise an issue at
> https://github.com/sphinx-doc/sphinx
>
> Regards
> 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sphinx-users/1ca67c55-e779-4bf0-a200-37860ef6416cn%40googlegroups.com.