[02sphinx] 07tk0miya pushed 037 commits to 03master [+0/-0/±13] 13https://git.io/v2ALZ
[02sphinx] 07jfbu 0389e8cb3 - Address #2262 (latex): avoid pagebreaks after captions of literal blocks This could fix https://github.com/sphinx-doc/sphinx/issues/2262 The 1.3.5 Verbatim environment from sphinx.sty has many places allowing a page break after the caption: from the \smallskip, from the list environment, and from the \MakeFramed: indeed framed package documentation explains that it encourages page
breaks above it. The only way to avoid the pagebreaks is to put the caption inside the environment whic is started by \MakeFramed. However, as this environment typesets multiple times its contents, we must inhibit within it the increase of counters (only the literal-block counter is concerned), this is done thanks to a switch provided by the package amsmath which is already loaded by sphinx.sty. modified:
[02sphinx] 07jfbu 0359de4bf - Fix #2262 (latex): avoid pagebreaks after captions of literal blocks This could fix https://github.com/sphinx-doc/sphinx/issues/2262 and also perhaps https://github.com/sphinx-doc/sphinx/issues/2319 As now the caption is set in an environment it appears to possibly solve also issue #2319 Table counter is overrided by code-block's in LaTeX The parent commit used only
\FirstFrameCommand of latex package framed, but \FrameCommand also must be customized in case the framed contents fit on a single page. This is fixed here. modified: sphinx/texinputs/sphinx.sty