Sphinx is a documentation generator that can generate PDFs by compiling from Markdown or reStructuredText via LaTeX as an intermediary to PDF. Sphinx uses the literalblock label instead of lstlistings for code listings, which causes rendering of the list of listings to fail when trying to compile the LaTeX intermediary output by Sphinx. This patch copies the \contentsline function \l@lstlisting to \l@literalblock to ensure that the list of listings works for the very few of us who use Sphinx.
Sphinx is a documentation generator that can generate PDFs by compiling from Markdown or reStructuredText via LaTeX as an intermediary to PDF. Sphinx uses the
literalblock
label instead oflstlistings
for code listings, which causes rendering of the list of listings to fail when trying to compile the LaTeX intermediary output by Sphinx. This patch copies the\contentsline
function\l@lstlisting
to\l@literalblock
to ensure that the list of listings works for the very few of us who use Sphinx.Before:
After: