summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-01-03 11:28:40 +0000
committerChris McDonough <chrism@agendaless.com>2010-01-03 11:28:40 +0000
commitdc0ba7e761e413890e580f2a425f1b3d3894d38f (patch)
tree43c004b012000dde9253ed4c2a5c8d79e633ec2d /docs/conf.py
parenteaf661a98c3ec395147a488af94eaa8a9ad36a19 (diff)
downloadpyramid-dc0ba7e761e413890e580f2a425f1b3d3894d38f.tar.gz
pyramid-dc0ba7e761e413890e580f2a425f1b3d3894d38f.tar.bz2
pyramid-dc0ba7e761e413890e580f2a425f1b3d3894d38f.zip
Info and warning icons instead of words.
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py20
1 files changed, 18 insertions, 2 deletions
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
"""