From e093846dccc778a903fb59740c48fcd0789316d4 Mon Sep 17 00:00:00 2001 From: jfbu Date: Tue, 3 May 2016 14:45:06 +0200 Subject: [PATCH] Fix #2523: LaTeX raises error for labeled code-block Was caused because produced latex source may not have blank line before \begin{Verbatim}. Solved by adding a \par to sphinx.sty. --- sphinx/texinputs/sphinx.sty | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index f655e519dd..1ff808314f 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -275,6 +275,8 @@ } \renewcommand{\Verbatim}[1][1]{% + % quit horizontal mode if we are still in a paragraph + \par % list starts new par, but we don't want it to be set apart vertically \parskip\z@skip % first, let's check if there is a caption