]> granicus.if.org Git - python/commitdiff
add a heavy box around warning notices to make them really stand out in the
authorFred Drake <fdrake@acm.org>
Wed, 31 Mar 2004 08:08:34 +0000 (08:08 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 31 Mar 2004 08:08:34 +0000 (08:08 +0000)
PDF and PostScript versions of the docs (the CSS already does this for HTML)

Doc/texinputs/howto.cls
Doc/texinputs/manual.cls
Doc/texinputs/python.sty

index 14e357ad303cc9aa22129d54f8b67f995c5b595e..936e1faf3aa7dcd76f8e2e3a1197a409b812c84f 100644 (file)
@@ -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".
index 49693e6205610ef9e4a446c28ce58bd2ebe40fe2..e28d87f850390d5d057ade20151218315084d280 100644 (file)
@@ -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.
index 770499eaa11b25a9713158170b1ba06a936ddd3f..5e1ea2bdc18ee02eecf5a8b547cd931e689bf5cf 100644 (file)
   \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}