mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06: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:
parent
d7dd00a898
commit
fec2a36db7
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user