summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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%
+}