summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/.static/exclaim.pngbin0 -> 3542 bytes
-rw-r--r--docs/.static/info.pngbin0 -> 3844 bytes
-rw-r--r--docs/Makefile3
-rw-r--r--docs/conf.py20
4 files changed, 21 insertions, 2 deletions
diff --git a/docs/.static/exclaim.png b/docs/.static/exclaim.png
new file mode 100644
index 000000000..6707bc362
--- /dev/null
+++ b/docs/.static/exclaim.png
Binary files differ
diff --git a/docs/.static/info.png b/docs/.static/info.png
new file mode 100644
index 000000000..95d00a973
--- /dev/null
+++ b/docs/.static/info.png
Binary files differ
diff --git a/docs/Makefile b/docs/Makefile
index 674c605d8..1980953ab 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -57,7 +57,10 @@ htmlhelp:
latex:
mkdir -p .build/latex .build/doctrees
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) .build/latex
+ cp .static/*.png .build/latex
./convert_images.sh
+ cp .static/exclaim.png .build/latex
+ cp .static/info.png .build/latex
@echo
@echo "Build finished; the LaTeX files are in .build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
diff --git a/docs/conf.py b/docs/conf.py
index 58b985869..03b38ca8f 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -269,12 +269,28 @@ _PREAMBLE = r"""
\endSbox
\fbox{\TheSbox}
}
-\renewcommand{\py@noticestart@warning}{\py@veryheavybox}
-\renewcommand{\py@noticeend@warning}{\py@endveryheavybox}
+\renewcommand{\py@noticestart@warning}{\py@heavybox}
+\renewcommand{\py@noticeend@warning}{\py@endheavybox}
\renewcommand{\py@noticestart@note}{\py@heavybox}
\renewcommand{\py@noticeend@note}{\py@endheavybox}
\makeatother
+\usepackage{ifthen}
+% Keep a copy of the original notice environment
+\let\origbeginnotice\notice
+\let\origendnotice\endnotice
+
+% Redefine the notice environment so we can add our own code to it
+\renewenvironment{notice}[2]{%
+ \origbeginnotice{#1}{}% equivalent to original \begin{notice}{#1}{#2}
+ % load graphics
+ \ifthenelse{\equal{#1}{warning}}{\includegraphics{exclaim.png}}{}
+ \ifthenelse{\equal{#1}{note}}{\includegraphics{info.png}}{}
+ % etc.
+}{%
+ \origendnotice% equivalent to original \end{notice}
+}
+
\sloppy
"""