Skip to content

Commit de070a3

Browse files
committed
Merge branch 'stable'
2 parents a35399a + e94d853 commit de070a3

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Bugs fixed
4343
* #2351: latex crashes if enumerated lists are placed on footnotes
4444
* #2646: latex crashes if math contains twice empty lines
4545
* #2480: `sphinx.ext.autodoc`: memory addresses were shown
46+
* latex: allow one more nesting depth for code-blocks (ref #777, PR #2624)
4647

4748

4849
Release 1.4.3 (released Jun 5, 2016)

sphinx/texinputs/sphinx.sty

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -337,20 +337,19 @@
337337
% - if caption: vertical space above caption = (\abovecaptionskip + D) with
338338
% D = \baselineskip-\FrameHeightAdjust, and then \smallskip above frame.
339339
% - if no caption: (\smallskip + D) above frame. By default D=6pt.
340-
\list{}{%
341-
\setlength\parskip{0pt}%
342-
\setlength\itemsep{0ex}%
343-
\setlength\topsep{0ex}%
344-
\setlength\parsep{0pt}% let's not forget this one!
345-
\setlength\partopsep{0pt}%
346-
\setlength\leftmargin{0pt}%
347-
}%
348-
\item
340+
% Use trivlist rather than list to avoid possible "too deeply nested" error.
341+
\itemsep \z@skip
342+
\topsep \z@skip
343+
\partopsep \z@skip% trivlist will set \parsep to \parskip = zero (see above)
344+
% \leftmargin will be set to zero by trivlist
345+
\rightmargin\z@
346+
\parindent \z@% becomes \itemindent. Default zero, but perhaps overwritten.
347+
\trivlist\item\relax
349348
% use a minipage if we are already inside a framed environment
350-
\relax\ifSphinx@inframed\noindent\begin{minipage}{\linewidth}\fi
349+
\ifSphinx@inframed\noindent\begin{minipage}{\linewidth}\fi
351350
\MakeFramed {% adapted over from framed.sty's snugshade environment
352-
\advance\hsize-\width\@totalleftmargin\z@\linewidth\hsize
353-
\@setminipage }%
351+
\advance\hsize-\width\@totalleftmargin\z@\linewidth\hsize
352+
\@setminipage }%
354353
\small
355354
% For grid placement from \strut's in \FancyVerbFormatLine
356355
\lineskip\z@skip
@@ -361,8 +360,7 @@
361360
\endOriginalVerbatim
362361
\par\unskip\@minipagefalse\endMakeFramed
363362
\ifSphinx@inframed\end{minipage}\fi
364-
\endlist
365-
% LaTeX environments always revert local changes on exit, here e.g. \parskip
363+
\endtrivlist
366364
}
367365

368366
% define macro to frame contents and add shadow on right and bottom

0 commit comments

Comments
 (0)