summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-01-09 05:34:23 (GMT)
committerFred Drake <fdrake@acm.org>1998-01-09 05:34:23 (GMT)
commit031ad4b2a058214e34f74829e3cf4b404d7704ed (patch)
tree61c6ec4a1401c10abfdabb7b32108efe490de863
parent46fbd7f4a04601648dfb88f22259015fd27d2b72 (diff)
downloadcpython-031ad4b2a058214e34f74829e3cf4b404d7704ed.zip
cpython-031ad4b2a058214e34f74829e3cf4b404d7704ed.tar.gz
cpython-031ad4b2a058214e34f74829e3cf4b404d7704ed.tar.bz2
\mytableofcontents New macro. Wrapper around \tableofcontents that
does the right thing if the openright option is given. Allows a lot of crud to be removed from the document files' frontmatter sections. \endabstract Extend standard macro. (Called as \end{abstract}.) Does the right thing if the openright option is given. \optional Adjust to get the brackets right under latex2e.
-rw-r--r--Doc/myformat.sty38
1 files changed, 37 insertions, 1 deletions
diff --git a/Doc/myformat.sty b/Doc/myformat.sty
index e4c9ff5..808c749 100644
--- a/Doc/myformat.sty
+++ b/Doc/myformat.sty
@@ -158,7 +158,7 @@
\newcommand{\funcline}[2]{\item[\code{#1(\varvars{#2})}]\ttindex{#1}}
\newcommand{\funcdesc}[2]{\fulllineitems\funcline{#1}{#2}}
\let\endfuncdesc\endfulllineitems
-\newcommand{\optional}[1]{{\ \Large[}{#1}\hspace{0.5mm}{\Large]}\ }
+\newcommand{\optional}[1]{{\ \textnormal{\Large[}}{#1}\hspace{0.5mm}{\textnormal{\Large]}}\ }
% same for excdesc
@@ -253,3 +253,39 @@
\OldTheindex%
\addcontentsline{toc}{chapter}{\indexname}%
}
+
+% Use a similar trick to catch the end of the {abstract} environment,
+% but here make sure the abstract is followed by a blank page if the
+% 'openright' option is used.
+%
+\let\OldEndAbstract=\endabstract
+\def\endabstract{%
+ \if@openright%
+ \ifodd\value{page}%
+ \typeout{Adding blank page after the abstract.}%
+ \vfil\pagebreak%
+ \fi
+ \fi%
+ \OldEndAbstract%
+}
+
+% \mytableofcontents wraps the \tableofcontents macro with all the magic to
+% get the spacing right and have the right number of pages if the 'openright'
+% option has been used. This eliminates a fair amount of crud in the
+% individual document files.
+%
+\newcommand{\mytableofcontents}{%
+ \pagebreak%
+ \pagestyle{plain}%
+ {%
+ \parskip = 0mm%
+ \tableofcontents
+ \if@openright
+ \ifodd\value{page}%
+ \typeout{Adding blank page after the table of contents.}%
+ \pagebreak\hspace{0pt}%
+ \fi
+ \fi
+ }
+ \pagebreak%
+}