diff options
author | Enrico Joerns <ejo@pengutronix.de> | 2019-03-10 15:17:20 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-03-13 16:49:52 +0100 |
commit | 4e368cf79500e2eb1bb6d41cf03870d1df96a5e3 (patch) | |
tree | ce19d9c1a78546fdbc1fc74cbeaed880adcb713e /doc | |
parent | 6d8bdbf62911d6669550887ce615c2a74a3f4d52 (diff) | |
download | ptxdist-4e368cf79500e2eb1bb6d41cf03870d1df96a5e3.tar.gz ptxdist-4e368cf79500e2eb1bb6d41cf03870d1df96a5e3.tar.xz |
doc: 'notice' environment was replaced by 'sphinxadmonition'
Spinx deprecated 'notice' environment in 1.6b1 and finally removed in
1.7.0b1.
Anyway, environment renewal to show warning symbol for note rst
directive was not working in between.
This patch both fixes warning symbol in sphinx versions between 1.6b1
and 1.7.0b1 and tex generation error after version 1.7.0b1:
| ! LaTeX Error: Environment notice undefined.
Instead of renewing a possible non-existing environment, we create a
new one and override sphinxadmonition environment only if it existed
before, or notice environment if not.
Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/preamble.inc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/preamble.inc b/doc/preamble.inc index 58665c52f..d9e528ef4 100644 --- a/doc/preamble.inc +++ b/doc/preamble.inc @@ -46,7 +46,7 @@ \renewcommand{\footrulewidth}{0.4pt} } -\renewenvironment{notice}[2]{ +\newenvironment{ptxdistwarning}[2]{ \def\py@noticetype{#1} \csname py@noticestart@#1\endcsname \begin{minipage}[c]{\textwidth} @@ -70,6 +70,15 @@ \end{minipage} \csname py@noticeend@\py@noticetype\endcsname } +% compatibility to old sphinx versions +\ifdefined\sphinxadmonition +\let\sphinxadmonition\ptxdistwarning +\let\endsphinxadmonition\endptxdistwarning +\else +\let\notice\ptxdistwarning +\let\endnotice\endptxdistwarning +\fi + \definecolor{VerbatimColor}{gray}{0.95} \definecolor{VerbatimBorderColor}{gray}{0.75} |