mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Use \c@chapter instead of \thechapter to check what sectioning unit is used
In ubuntu precise, the old condition; \thechapter is defined or not misdetects the sectioning unit. And then, it causes build error.
This commit is contained in:
@@ -841,7 +841,7 @@
|
||||
% Define literal-block environment
|
||||
\RequirePackage{newfloat}
|
||||
\DeclareFloatingEnvironment{literal-block}
|
||||
\ifx\thechapter\undefined
|
||||
\ifx\c@chapter\undefined
|
||||
\SetupFloatingEnvironment{literal-block}{within=section,placement=h}
|
||||
\else
|
||||
\SetupFloatingEnvironment{literal-block}{within=chapter,placement=h}
|
||||
|
||||
Reference in New Issue
Block a user