]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Fix the rules for the layout when opening a Part
authorGunnar Wolf <gwolf@gwolf.org>
Wed, 13 Nov 2019 16:52:15 +0000 (10:52 -0600)
committerGunnar Wolf <gwolf@gwolf.org>
Wed, 13 Nov 2019 16:52:15 +0000 (10:52 -0600)
myclass.cls

index 90a00d24c072ba5cb87c38e175f126d45345729f..355eb86cd8bbe733322d22f36af5b92e48ba9f34 100644 (file)
   \IfFileExists{\titlepagefile}{\input{\titlepagefile}}{}
 }%
 
+% We have specified @openright to allow the chapters to start in
+% either page (recto or verso), but we don't want that behavior for
+% parts - The part heading should start in the right page (recto)
+% always.
+%
+% When a \part clears the preceding page, we don't want the page
+% number in it either.
+
+\renewcommand\part{%
+  \clearpage
+  \thispagestyle{empty}%
+  \ifodd\value{page}
+    \null%
+  \else
+    \null\newpage\thispagestyle{empty}%
+  \fi
+  \null\vfil
+  \secdef\@part\@spart}
+
+\def\@endpart{\vfil\newpage}
+
 % Allow line break on hyphen (-) in URLs, to make sure long URLs in
 % footnotes do not pass out of the margins.
 \usepackage[hyphens]{url}