From 07546993aae7d7ebb343970a8728e3c6f47976e3 Mon Sep 17 00:00:00 2001 From: jfbu Date: Fri, 10 Jun 2016 10:14:17 +0200 Subject: [PATCH] Fix #777 (part Ia): Latex output "too deeply nested" 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. --- sphinx/texinputs/sphinx.sty | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 68eaf01bd99..86fdf4db04a 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -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.