mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3742: missing `Index` bookmark and TOC entry in PDF builds at RTD
The trick is to create an Index TOC/bookmarks entry in anticipation of
makeindex execution, as RTD (currently) does only one pdflatex run after
makeindex.
https://github.com/rtfd/readthedocs.org/issues/2857
The workaround works for Sphinx own docs, which uses ``'manual'``
docclass and puts the general index at very end of document.
This commit is contained in:
@@ -56,7 +56,12 @@ latex_logo = '_static/sphinx.png'
|
||||
latex_elements = {
|
||||
'fontpkg': '\\usepackage{palatino}',
|
||||
'passoptionstopackages': '\\PassOptionsToPackage{svgnames}{xcolor}',
|
||||
'printindex': '\\footnotesize\\raggedright\\printindex',
|
||||
# fix missing index entry due to RTD doing only once pdflatex after makeindex
|
||||
'printindex': r'''
|
||||
\IfFileExists{\jobname.ind}
|
||||
{\footnotesize\raggedright\printindex}
|
||||
{\begin{sphinxtheindex}\end{sphinxtheindex}}
|
||||
''',
|
||||
}
|
||||
latex_show_urls = 'footnote'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user