]> granicus.if.org Git - python/commitdiff
Don't use the fncychap package for HOWTO documents; appendices break. Still
authorFred Drake <fdrake@acm.org>
Wed, 25 Mar 1998 15:41:23 +0000 (15:41 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 25 Mar 1998 15:41:23 +0000 (15:41 +0000)
use them for manuals.

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

index 115912324ec3cb2b956fdfa8c3acd576f2b27cac..a1242217e8a30f682ae42318f542541df6bf5334 100644 (file)
 \RequirePackage{python}
 
 
+% need to do one of these....
+\newcommand{\@doHorizontalRule}{\rule{\textwidth}{1pt}}
+
+
 % Change the title page to look a bit better, and fit in with the
 % fncychap ``Bjarne'' style a bit better.
 %
 \renewcommand{\maketitle}{
-  \@ifundefined{ChTitleVar}{}{
-    \mghrulefill{\RW}}
+  \@doHorizontalRule
   \@ifundefined{pdfinfo}{}{
     \pdfinfo{
       /Author (\@author)
@@ -74,8 +77,7 @@
     \parskip = 0mm
     \OldTableofcontents
   \endgroup
-  \@ifundefined{ChTitleVar}{}{
-    \mghrulefill{\RW}}
+  \@doHorizontalRule
   \vspace{12pt}
 }  
 
index a87b510b707120a1d5fae942a3ef60e19bf53fcc..563c3f86e6a80c1d4b74d018e1e2e0fa147f3d63 100644 (file)
 \RequirePackage{times}\typeout{Using times fonts instead of Computer Modern.}
 
 
-% Required package:
+% Required packages:
+%
+% The "fncychap" package is used to get the nice chapter headers.  The
+% .sty file is distributed with Python, so you should not need to disable
+% it.  You'd also end up with a mixed page style; uglier than stock LaTeX!
+%
+\RequirePackage[Bjarne]{fncychap}\typeout{Using fancy chapter headings.}
+% Do horizontal rules it this way to match:
+\newcommand{\@doHorizontalRule}{\mghrulefill{\RW}}
+%
 %
 % This gives us all the Python-specific markup that we really want.
 % This should come last.  Do not change this.
@@ -47,8 +56,7 @@
   \begin{titlepage}%
     \let\footnotesize\small
     \let\footnoterule\relax
-    \@ifundefined{ChTitleVar}{}{%
-      \mghrulefill{\RW}}%
+    \@doHorizontalRule%
     \@ifundefined{pdfinfo}{}{
       \pdfinfo{
         /Author (\@author)
index b2ef8f11f9e0142ecfef90ef58c7aeb5668489be..d432a9fc55886f6c59453edf158be409d6577922 100644 (file)
@@ -6,13 +6,6 @@
 \ProvidesPackage{python}
              [1998/01/11 LaTeX package (Python markup)]
 
-% The "fncychap" package is used to get the nice chapter headers.  The
-% .sty file is distributed with Python, so you should not need to disable
-% it.  You'd also end up with a mixed page style; uglier than stock LaTeX!
-%
-\RequirePackage[Bjarne]{fncychap}\typeout{Using fancy chapter headings.}
-
-
 % for PDF output, use maximal compression & a lot of other stuff
 % (test for PDF recommended by Tanmoy Bhattacharya <tanmoy@qcd.lanl.gov>)
 %
 
 \let\nodename=\label
 
+\newcommand{\sectcode}[1]{{\sectcodefont{#1}}}
+
 % For these commands, use \command{} to get the typography right, not 
 % {\command}.  This works better with the texinfo translation.
 \newcommand{\ABC}{{\sc abc}}
 \newcommand{\Cpp}{C\protect\raisebox{.18ex}{++}}
 \newcommand{\C}{C}
 \newcommand{\EOF}{{\sc eof}}
-\newcommand{\NULL}{\code{NULL}}
+\newcommand{\NULL}{\sectcode{NULL}}
 
 % code is the most difficult one...
 \newcommand{\code}[1]{{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}%
 % For now, don't do anything really fancy with them; just use them as
 % logical markup.  This might change in the future.
 %
-\let\module=\code
-\let\keyword=\code
-\let\exception=\code
-\let\class=\code
-\let\function=\code
-\let\member=\code
-\let\method=\code
-
-\let\cfunction=\code
-\let\ctype=\code
-\let\cdata=\code
+\let\module=\sectcode
+\let\keyword=\sectcode
+\let\exception=\sectcode
+\let\class=\sectcode
+\let\function=\sectcode
+\let\member=\sectcode
+\let\method=\sectcode
+
+\let\cfunction=\sectcode
+\let\ctype=\sectcode
+\let\cdata=\sectcode
 
 \newcommand{\mimetype}[1]{{\small\textsf{#1}}}
 % The \! is a "negative thin space" in math mode.
   \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}%
 }
 
-\newcommand{\sectcode}[1]{{\sectcodefont{#1}}}
-
 % Cross-referencing (AMK)
 % Sample usage:
 %  \begin{seealso}