X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/blobdiff_plain/09716550cdf80f9c5f33d8390a1af64192a43af4..f6d2603c8b0ebc5fd9efa0e4d00151dde2476106:/myclass.cls?ds=inline

diff --git a/myclass.cls b/myclass.cls
index 042052c..355eb86 100644
--- a/myclass.cls
+++ b/myclass.cls
@@ -4,7 +4,14 @@
 %% Just use the original class and pass the options
 \LoadClassWithOptions{report}
 
+% Place page number at the outer foot edge of content pages
+\usepackage[pagestyles]{titlesec}
+\newpagestyle{mystyle}{\setfoot[\thepage][][]{}{}{\thepage}}
+\pagestyle{mystyle}
+
 \renewcommand{\baselinestretch}{1.2}
+\newcommand{\beforetitle}{}
+\newcommand{\publisherlogos}{}
 
 \makeatletter
 
@@ -18,7 +25,9 @@
   \titleverso}
 
 \def\titlerecto{\begin{titlepage}%
+  \beforetitle
   \null\vfil
+  \thispagestyle{empty}
   \vskip 160\p@
   \begin{center}%
     {\LARGE \@title \par}%
@@ -29,9 +38,10 @@
         \@author
       \end{tabular}\par}%
       \vskip 20em%
-    {\large \DBKpublishername \par}
+    {\large \DBKpublisheraddress \par}
     \vskip .75em%
-    {\large \DBKpublisheraddress \par}%
+    {\large \DBKpublishername \par}%
+    \publisherlogos
   \end{center}\par
   \vfil\null
   \end{titlepage}}%
@@ -41,6 +51,27 @@
   \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}
