Files
sphinx/tests
jfbu 89e8cb3459 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:   sphinx/texinputs/sphinx.sty
	modified:   sphinx/writers/latex.py
	modified:   tests/test_directive_code.py
2016-02-10 10:50:52 +01:00
..
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00
2016-01-14 22:54:04 +01:00