Hi, I reproduced your case. This problem is caused by usage of LaTeX. Some LaTeX macros expects to compile several times to build PDF. TOC is one of them.
Please run pdflatex twice or three times. (The Makefile generated by Sphinx runs pdflatex 5 times!) Then you'll see TOC in your PDF. refs: http://tex.stackexchange.com/questions/53235/why-does-latex-bibtex-need-three-passes-to-clear-up-all-warnings Thanks, 2017-02-01 7:29 GMT+09:00 Franck Lefebure <[email protected]>: > Hi Takeshi, > > Sure, > You have a simplified config (extensions disabled if conf.py) as attachment > What I do with theses file is : > >>sphinx-build src/main/sphinx/test build/site/test -blatex >>cd build\site\test >>pdflatex softbridge > > With the workaround (line 29 in conf.py) I have the TOC, If workaround is > commented I don't have it. > > Franck > > > > Le mardi 31 janvier 2017 11:01:16 UTC-4, Komiya Takeshi a écrit : >> >> Hi Franck, >> >> I'd like to know how did you lost TOC. >> If it's also a bug, I will fix it in nearly release. >> Could you show me your project or small producible example? >> >> Thanks, >> Takeshi KOMIYA >> >> 2017-01-31 23:14 GMT+09:00 Franck Lefebure <[email protected]>: >> > Hi, >> > >> > I'm very newbie with Sphinx and evaluating it for the documentation of a >> > large java/gradle project. >> > >> > I faced the same problem of TOC missing in pdf export >> > but my versions are not the same : Windows10 / Python 2.7.13 / sphinx >> > 1.5.2 >> > >> > K Dunn workaround did the trick >> > >> > Franck >> > >> > >> > >> > >> > Le jeudi 21 janvier 2016 03:50:20 UTC-4, K Dunn a écrit : >> >> >> >> I had the same unexpected experience a few days ago. My work around, >> >> other >> >> than downgrading, was to modify my conf.py as follows: >> >> >> >> TABLE_OF_CONTENTS = r""" >> >> % Sphinx 1.3.4 has decided to set this to "-2" in one of the newer >> >> versions. >> >> % Set it "1", which is what we are looking for >> >> \setcounter{tocdepth}{1} >> >> \tableofcontents >> >> """ >> >> >> >> latex_elements = { >> >> ... >> >> 'tableofcontents': TABLE_OF_CONTENTS, >> >> ... >> >> } >> >> >> >> I'm looking to the new 1.3.5 version Takeshi. >> >> >> >> >> >> On 21 January 2016 at 03:39, Komiya Takeshi <[email protected]> wrote: >> >>> >> >>> Hi, >> >>> >> >>> Sorry for inconvinience. >> >>> It's bug of 1.3.4 And will fixed at 1.3.5. >> >>> >> >>> Please use 1.3.3 until next version is released (may be this weekend). >> >>> >> >>> Thank you for reporting >> >>> >> >>> Takeshi KOMIYA >> >>> >> >>> 2016年1月21日木曜日 8時17分39秒 UTC+9 repriville: >> >>>> >> >>>> >> >>>> I upgraded to sphinx 1.3.4 in a python 2.7.8 virtual environment. >> >>>> >> >>>> The document I've been working on now doesn't generate a table of >> >>>> contents in the latexpdf (and it used to). After much poking about >> >>>> the past >> >>>> several days, I believe that 'make latex' is adding >> >>>> \setcounter{tocdepth}{-2} >> >>>> >> >>>> where it should be a positive number. >> >>>> >> >>>> So, in a simplified test doc, that just has one file listed in the >> >>>> vanilla index.rst and that file has one header, I get in the .tex >> >>>> file >> >>>> \title{Dummy Doc Documentation} >> >>>> \date{January 20, 2016} >> >>>> \release{3.1} >> >>>> \author{Bleeding Edge} >> >>>> \newcommand{\sphinxlogo}{} >> >>>> \renewcommand{\releasename}{Release} >> >>>> \setcounter{tocdepth}{-2} >> >>>> \makeindex >> >>>> >> >>>> >> >>>> If I try to set the tocdepth in the latex preamble in conf.py, the >> >>>> value >> >>>> is set before the "\title" and is overwritten here. So the result is >> >>>> where >> >>>> the table of contents entries are, I get a page that says "Contents" >> >>>> at the >> >>>> top, but no values. >> >>>> >> >>>> If I manually edit the generated .tex file, change the -2 to a >> >>>> positive >> >>>> number, then manually run pdflatex on the .tex file, the generated >> >>>> pdf file >> >>>> has the correct toc entries. >> >>>> >> >>>> Ideas? Work arounds? >> >>>> >> >>>> Thanks for any help. >> >> >> >> >> > -- >> > 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. > > -- > 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. -- 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.
