summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2004-03-31 08:08:34 (GMT)
committerFred Drake <fdrake@acm.org>2004-03-31 08:08:34 (GMT)
commit862b46bbc10a87eb2f4dc8bef80ab134d4d14a88 (patch)
treec465680ce69b6e9eefc060d707dcded3912a2a56 /Doc
parent90756c2da7240b3b5ccba1f547cd827b9e4176db (diff)
downloadcpython-862b46bbc10a87eb2f4dc8bef80ab134d4d14a88.zip
cpython-862b46bbc10a87eb2f4dc8bef80ab134d4d14a88.tar.gz
cpython-862b46bbc10a87eb2f4dc8bef80ab134d4d14a88.tar.bz2
add a heavy box around warning notices to make them really stand out in the
PDF and PostScript versions of the docs (the CSS already does this for HTML)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/texinputs/howto.cls1
-rw-r--r--Doc/texinputs/manual.cls1
-rw-r--r--Doc/texinputs/python.sty30
3 files changed, 31 insertions, 1 deletions
diff --git a/Doc/texinputs/howto.cls b/Doc/texinputs/howto.cls
index 14e357a..936e1fa 100644
--- a/Doc/texinputs/howto.cls
+++ b/Doc/texinputs/howto.cls
@@ -7,6 +7,7 @@
[1998/02/25 Document class (Python HOWTO)]
\RequirePackage{pypaper}
+\RequirePackage{fancybox}
% Change the options here to get a different set of basic options, This
% is where to add things like "a4paper" or "10pt".
diff --git a/Doc/texinputs/manual.cls b/Doc/texinputs/manual.cls
index 49693e6..e28d87f 100644
--- a/Doc/texinputs/manual.cls
+++ b/Doc/texinputs/manual.cls
@@ -7,6 +7,7 @@
[1998/03/03 Document class (Python manual)]
\RequirePackage{pypaper}
+\RequirePackage{fancybox}
% Change the options here to get a different set of basic options, but only
% if you have to. Paper and font size should be adjusted in pypaper.sty.
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index 770499e..5e1ea2b 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -979,11 +979,39 @@
\end{tabular}
}
+\newlength{\py@noticelength}
+
+\newcommand{\py@heavybox}{
+ \setlength{\fboxrule}{2pt}
+ \setlength{\fboxsep}{7pt}
+ \setlength{\py@noticelength}{\linewidth}
+ \addtolength{\py@noticelength}{-2\fboxsep}
+ \addtolength{\py@noticelength}{-2\fboxrule}
+ \setlength{\shadowsize}{3pt}
+ \Sbox
+ \minipage{\py@noticelength}
+}
+\newcommand{\py@endheavybox}{
+ \endminipage
+ \endSbox
+ \fbox{\TheSbox}
+}
+
+% a 'note' is as plain as it gets:
\newcommand{\py@noticelabel@note}{Note:}
+\newcommand{\py@noticestart@note}{}
+\newcommand{\py@noticeend@note}{}
+
+% a 'warning' gets more visible distinction:
\newcommand{\py@noticelabel@warning}{Warning:}
+\newcommand{\py@noticestart@warning}{\py@heavybox}
+\newcommand{\py@noticeend@warning}{\py@endheavybox}
+
\newenvironment{notice}[1][note]{
+ \def\py@noticetype{#1}
+ \csname py@noticestart@#1\endcsname
\par\strong{\csname py@noticelabel@#1\endcsname}
-}{}
+}{\csname py@noticeend@\py@noticetype\endcsname}
\newcommand{\note}[1]{\strong{\py@noticelabel@note} #1}
\newcommand{\warning}[1]{\strong{\py@noticelabel@warning} #1}