3 ms·
If you just run sphinx-build with the latex builder and then run xelatex or pdflatex on the result you'll get one fully-consistent PDF with everything it it, in
by acidburnNSA 3y ago
If you just run sphinx-build with the latex builder and then run xelatex or pdflatex on the result you'll get one fully-consistent PDF with everything it it, including fully functional internal hyperlinks. That's what I do for PDF. I can make big documentation packages this way building 2000 page pdfs in a minute or two on a modest laptop.
Wait: also, how is what you're saying different from the built-in singlehtml builder? https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.singlehtml.SingleFileHTMLBuilder https://www.sphinx-doc.org/en/master/usage/builders/index.ht...
- mr_mitm 3y agoIn the product of the singlehtml builder, you will have the entire document in one single DOM tree. For large documents, even modern browsers on a modern machine will be brought to its knees. Check out the CPython docs for example: https://adrianvollmer.github.io/Zundler/output/cpython.html https://adrianvollmer.github.io/Zundler/output/cpython.html This is a huge document, and having this all rendered naively in one single page will not only be hard to navigate, it will also feel really sluggish if not crash the browser.
- acidburnNSA 3y agoAh, ok, so you want a PDF-like single file but in HTML in a way that's more efficient/scalable than the built-in singlehtml builder. Ok fair enough. For my use cases, the default multi-file HTML builds are ok, and I just pound out a latex-builder generated PDF for the archives.