63 lines
1.7 KiB
TeX
63 lines
1.7 KiB
TeX
%%% Headers and page styles
|
|
\usepackage[pagestyles]{titlesec}
|
|
\usepackage{fancyhdr}
|
|
\setlength{\headheight}{15.2pt}
|
|
|
|
% ourbook style with fancy headers and chapter headings
|
|
\fancypagestyle{ourbook}{
|
|
% headers
|
|
\fancyhf{}
|
|
\renewcommand{\headrulewidth}{0pt}
|
|
\renewcommand{\printchaptername}{}
|
|
\renewcommand{\chapternamenum}{}
|
|
\renewcommand{\printchapternum}{}
|
|
\renewcommand{\printchaptertitle}[1]{%
|
|
\TitleFont\huge ##1}
|
|
\renewcommand{\partnamefont}{\DisplayFont\huge}
|
|
\renewcommand{\partnumfont}{\DisplayFont\huge}
|
|
\renewcommand{\parttitlefont}{\DisplayFont\Huge}
|
|
\renewcommand{\chaptername}{}
|
|
\renewcommand{\thechapter}{}
|
|
\setlength{\parskip}{0pt}
|
|
\fancyhf[FRO,FLE]{\TitleFont{\thepage}}
|
|
% \fancyhf[FRE,FLO]{\emph{Patreon Supporter Edition}}
|
|
\fancyhf[HLE]{\TitleFont{\nouppercase\leftmark}}
|
|
\fancyhf[HRO]{\TitleFont{\AuthorFull}}
|
|
}
|
|
\nopartblankpage
|
|
\makeatletter
|
|
\renewcommand*{\beforepartskip}{\null\vfill\thispagestyle{empty}}
|
|
\renewcommand*{\afterpartskip}{\par\vskip1cm%
|
|
\@afterindentfalse\@afterheading}
|
|
\makeatother
|
|
|
|
% plain style with only page num
|
|
\fancypagestyle{plain}{
|
|
\fancyhf{}
|
|
\renewcommand{\headrulewidth}{0pt}
|
|
\renewcommand{\footrulewidth}{0pt}
|
|
\fancyhf[FRO,FLE]{\TitleFont{\thepage}}
|
|
\renewcommand{\printchaptertitle}[1]{%
|
|
\TitleFont\huge ##1}
|
|
}
|
|
|
|
% single space after periods
|
|
\frenchspacing
|
|
|
|
% Attempt justification at all costs
|
|
\sloppy
|
|
|
|
% Widows and orphans
|
|
\widowpenalty=9000
|
|
\clubpenalty=9000
|
|
|
|
% Footnotes as symbols
|
|
\usepackage[perpage]{footmisc}
|
|
\makeatletter
|
|
\def\@fnsymbol#1{\ensuremath{%
|
|
\ifcase#1\or *\or \dagger\or \ddagger\or
|
|
\mathsection\or \mathparagraph\or \|\or **\or
|
|
\dagger\dagger \or \ddagger\ddagger \else\@ctrerr\fi}}
|
|
\makeatother
|
|
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}
|