diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-01-03 11:28:40 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-01-03 11:28:40 +0000 |
| commit | dc0ba7e761e413890e580f2a425f1b3d3894d38f (patch) | |
| tree | 43c004b012000dde9253ed4c2a5c8d79e633ec2d /docs | |
| parent | eaf661a98c3ec395147a488af94eaa8a9ad36a19 (diff) | |
| download | pyramid-dc0ba7e761e413890e580f2a425f1b3d3894d38f.tar.gz pyramid-dc0ba7e761e413890e580f2a425f1b3d3894d38f.tar.bz2 pyramid-dc0ba7e761e413890e580f2a425f1b3d3894d38f.zip | |
Info and warning icons instead of words.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/.static/exclaim.png | bin | 0 -> 3542 bytes | |||
| -rw-r--r-- | docs/.static/info.png | bin | 0 -> 3844 bytes | |||
| -rw-r--r-- | docs/Makefile | 3 | ||||
| -rw-r--r-- | docs/conf.py | 20 |
4 files changed, 21 insertions, 2 deletions
diff --git a/docs/.static/exclaim.png b/docs/.static/exclaim.png Binary files differnew file mode 100644 index 000000000..6707bc362 --- /dev/null +++ b/docs/.static/exclaim.png diff --git a/docs/.static/info.png b/docs/.static/info.png Binary files differnew file mode 100644 index 000000000..95d00a973 --- /dev/null +++ b/docs/.static/info.png 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 """ |
