Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTD builds of Sphinx own PDF docs do not do enough pdflatex runs #3742

Closed
jfbu opened this issue May 12, 2017 · 3 comments
Closed

RTD builds of Sphinx own PDF docs do not do enough pdflatex runs #3742

jfbu opened this issue May 12, 2017 · 3 comments

Comments

@jfbu
Copy link
Contributor

jfbu commented May 12, 2017

From http://readthedocs.org/projects/sphinx/builds/5413951/ one sees

pdflatex -interaction=nonstopmode /home/docs/checkouts/readthedocs.org/user_builds/sphinx/checkouts/1.6-release/doc/_build/latex/sphinx.tex
makeindex -s python.ist sphinx.idx
pdflatex -interaction=nonstopmode /home/docs/checkouts/readthedocs.org/user_builds/sphinx/checkouts/1.6-release/doc/_build/latex/sphinx.tex

but there should be 2 pdflatex runs after the makeindex: else there will (and is) no index entry at end of table of contents, as one can confirm at https://media.readthedocs.org/pdf/sphinx/1.6-release/sphinx.pdf, and this applies also to the bookmarks of the pdf.

I think the back links from the index are ok from 1 pdflatex + makeindex + 2 pdflatex but I have not checked thoroughly.

Best for RTD builds would be to use make latexpdf from Sphinx, which uses latexmk rather than the above recipes.

This is not Sphinx issue per se, but I did not know where better to report. The remark will apply to any project having a general index if PDF build does only 1 pdflatex + makeindex + 1 pdflatex. (in a clean repertory) I am not familiar with how RTD is configured for Sphinx doc.

@jfbu jfbu added the type:docs label May 12, 2017
@tk0miya
Copy link
Member

tk0miya commented May 13, 2017

I might be wrong, but the source code of readthedocs is hosted at https://github.com/rtfd/readthedocs.org .
So you should report this into the repository.

Thanks,

@jfbu
Copy link
Contributor Author

jfbu commented May 13, 2017

This appears to be indeed a general RTD issue. I will add a comment to the discussion there.

edit I moved my comment to readthedocs/readthedocs.org#1583 (comment) which seems better suited.

jfbu added a commit that referenced this issue May 20, 2017
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.

    readthedocs/readthedocs.org#2857

The workaround works for Sphinx own docs, which uses ``'manual'``
docclass and puts the general index at very end of document.
@jfbu
Copy link
Contributor Author

jfbu commented May 20, 2017

Temporary workaround at 6422f7b. Opened a new ticket readthedocs/readthedocs.org#2857 at RTD.

(fixed flake8 at b18a3f8)

@jfbu jfbu closed this as completed May 20, 2017
jfbu added a commit that referenced this issue Jul 17, 2018
LaTeX: extend to all projects the #3742 fix for PDF builds at RTD
jfbu added a commit to jfbu/sphinx that referenced this issue Jul 31, 2018
jfbu added a commit that referenced this issue Jul 31, 2018
Revert "LaTeX: extend to all projects the #3742 fix for PDF builds at RTD"
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants