Skip to content

LaTeX: Sphinx 9.1.0 adds sphinxLongVerbatim{First,Middle,Last} environments #863

@jfbu

Description

@jfbu

Opening this only for awareness. The Sphinx LaTeX mark-up using sphinxVerbatim for code-blocks had a longstanding limitation that PDF build would crash if the original source had more than circa 1350 lines (sphinx-doc/sphinx#3099). With Sphinx 9.1.0 soon to be released this has been fixed. Nothing (apart from some internals which should hopefully modify nothing) changes for source code of up to 500 code lines. Starting with 501 code lines, chunks of 500 lines each and the final ones are organized using new environments sphinxLongVerbatimFirst, sphinxLongVerbatimMiddle, sphinxLongVerbatimLast. I do not recall if this project either scans for sphinxVerbatim mark-up or injects it, but I am opening this ticket in case some follow-up action here appears needed at some point.

Note that "500 code lines" corresponds in PDF to about (at least, because original code lines may get wrapped if too long to fit in the text area) 10 a4-sized pages if Sphinx is used with default margins and 10pt pointsize. For anything up to 500 code lines, the Sphinx LaTeX mark-up is unchanged by upcoming Sphinx 9.1.0.

I tested building the documentation of nbsphinx with Sphinx 9.1.0rc2 and as expected everything went smoothly (although latex builds looked stalled when reading "code-cells", I was attempting builds with -M latexpdf, but after installing Inkscape 1.4.3 on my macOS and modifying doc/conf.py to use it, and starting again from scratch using only -b latex, and then make all-pdf in the latex build directory, I obtained the PDF).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions