Le 17/09/2018 à 15:40, ChrisD a écrit :
Le 16/09/2018 à 02:56, ChrisD a écrit :
I just upgraded from version 1.7.5 to 1.8.0. When I output to latex PDF the 
table of contents (TOC) not longer appears.

In 1.7.5 there is a TOC in the text, starting on the 2nd page of the output, right after 
the title page. This 2nd page is titled "CONTENTS". There is also a 
bookmark-style TOC that appears in the left pane of my PDF viewer (and which is far more 
useful than the TOC in the text).

In 1.8.0 there is no bookmark-style TOC. In the text, the 2nd page is labeled 
"CONTENTS" but is otherwise blank.

I reviewed the change list, and it notes under incompatible changes that the 
latex tableofcontents variable has been moved to the template. Do I need to do 
something with a template? If so, how? The latex customization page says that 
one can use an experimental feature for a user defined template but gives no 
clue what it should look like and says all template variables are unstable and 
undocumented.

I'm running on Win7-64 and using MiKTeX, if it matters.

Any suggestions? Thanks,
Chris



Hi,

How do you build the PDF?

Perhaps there was another problem which caused an abort after only one pdflatex 
run.

To dispel worries about template, can you check your <document>.tex in LaTeX 
build repertory contains `\sphinxtableofcontents` somewhere after `\begin{document}`?

Even without it, the PDF should get the chapter/section bookmarks, if pdflatex 
has been executed at least twice.

My bet is that it got executed only once.

It may help to remove left-over latex build repertory, and start build from 
scratch again, as latex auxiliary files are always susceptible to cause 
troubles after an upgrade.

Best,

Jean-François

I'm embarrassed to admit that I had completely forgotten about the need to run 
pdflatex (or make) twice. And because I was having problems I was clearing the 
build folder each time I tried it (to avoid the auxiliary files problem which I 
had experienced before), so it would fail again. Just running make again 
without clearing solved the problem. Thanks for your help.

Chris


Hi Chris,

Good you could fix this.

Unfortunately I can't help with Windows,

on Unixen:

  either make latexpdf in the source repertory or

  make latex there followed by make all-pdf in the latex build repertory

should do automatically the needed number of pdflatex runs...

I can't test on Windows...

Cheers,

Jean-François


The sphinx pdf make is broken on windows.
Older versions of sphinx invoked "make" but there is no make installed by 
default on windows so that failed.
Version 1.8.0 appears to attempt to fix this by creating a secondary make.bat 
batch file in the _build/latex folder. However it invokes latexmk, which is 
installed by MiKTeX, but requires perl to be installed. Perl is also not 
installed by default on windows, so that fails.

I suppose I could install perl, but I took a somewhat brute force approach and modified 
my primary make.bat batch file so it runs Sphinx to build latex (not latexpdf), and then 
runs pdflatex twice. So at least now the "run twice" thing is automated.




--
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 post to this group, send email to [email protected].
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