|
337 | 337 | % - if caption: vertical space above caption = (\abovecaptionskip + D) with
|
338 | 338 | % D = \baselineskip-\FrameHeightAdjust, and then \smallskip above frame.
|
339 | 339 | % - 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 |
349 | 348 | % 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 |
351 | 350 | \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 }% |
354 | 353 | \small
|
355 | 354 | % For grid placement from \strut's in \FancyVerbFormatLine
|
356 | 355 | \lineskip\z@skip
|
|
361 | 360 | \endOriginalVerbatim
|
362 | 361 | \par\unskip\@minipagefalse\endMakeFramed
|
363 | 362 | \ifSphinx@inframed\end{minipage}\fi
|
364 |
| - \endlist |
365 |
| - % LaTeX environments always revert local changes on exit, here e.g. \parskip |
| 363 | + \endtrivlist |
366 | 364 | }
|
367 | 365 |
|
368 | 366 | % define macro to frame contents and add shadow on right and bottom
|
|
0 commit comments