Skip to content

Commit

Permalink
Fix sphinx-doc#777 (part Ia): Latex output "too deeply nested"
Browse files Browse the repository at this point in the history
Allow code-blocks at maximal nesting depth of lists/quotes in LaTeX
(which by default is 6), by patching fancyvrb's original Verbatim
dealings. If code-block appears at nesting depth 6 and \@listvii (which
is supposed to configure margins) exists, it will be used, else the
\csname ... \endcsname in fancyvrb's \FV@ListNesting creates a \relax.

This is second commit improving maximal depth for code-blocks in nested
lists or quote blocks. It used to be 4, it is now at 6.
  • Loading branch information
jfbu committed Jun 10, 2016
1 parent b2be594 commit 0754699
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sphinx/texinputs/sphinx.sty
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@
}%
% go around fancyvrb's check of @currenvir (for case of minipage below)
\renewcommand*{\VerbatimEnvironment}{\gdef\FV@EnvironName{Verbatim}}%
% go around fancyvrb's check of current list depth
\def\@toodeep {\advance\@listdepth\@ne}%
% Allow breaks at special characters using \PYG... macros.
\Sphinxbreaksatspecials
% The list environment is needed to control perfectly the vertical space.
Expand Down

0 comments on commit 0754699

Please sign in to comment.