mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
LaTeX: Make sure sphinxVerbatim environment is not cut into pieces
See https://github.com/spatialaudio/nbsphinx/issues/78
This commit is contained in:
parent
82ef05431a
commit
cbd3eb223d
@ -2183,10 +2183,11 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
|||||||
'\\begin{sphinxVerbatim}')
|
'\\begin{sphinxVerbatim}')
|
||||||
# get consistent trailer
|
# get consistent trailer
|
||||||
hlcode = hlcode.rstrip()[:-14] # strip \end{Verbatim}
|
hlcode = hlcode.rstrip()[:-14] # strip \end{Verbatim}
|
||||||
self.body.append('\n' + hlcode + '\\end{sphinxVerbatim')
|
|
||||||
if self.table and not self.in_footnote:
|
if self.table and not self.in_footnote:
|
||||||
self.body.append('intable')
|
hlcode += '\\end{sphinxVerbatimintable}'
|
||||||
self.body.append('}\n')
|
else:
|
||||||
|
hlcode += '\\end{sphinxVerbatim}'
|
||||||
|
self.body.append('\n' + hlcode + '\n')
|
||||||
if ids:
|
if ids:
|
||||||
self.body.append('\\let\\sphinxLiteralBlockLabel\\empty\n')
|
self.body.append('\\let\\sphinxLiteralBlockLabel\\empty\n')
|
||||||
raise nodes.SkipNode
|
raise nodes.SkipNode
|
||||||
|
Loading…
Reference in New Issue
Block a user