forked from xenohedron/hpmor-xetex
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hp-contents.tex
20 lines (20 loc) · 914 Bytes
/
hp-contents.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
\renewcommand*{\printtoctitle}[1]{\centering\huge{\hp\MakeUppercase{#1}}}
\setlength{\cftbeforechapterskip}{.5\baselineskip plus 12pt minus 3pt}
\renewcommand*{\cftchapterleader}{\space—\space}
\renewcommand*{\cftchapterfillnum}[1]{%
{\cftchapterleader}\nobreak%
{#1}% Page number
\cftchapterafterpnum\par}
\setrmarg{0em}
\setlength\cftchapterindent{0pt}
\setlength\cftchapternumwidth{0pt}
\renewcommand{\cftchapterafterpnum}{\cftparfillskip}
\renewcommand{\cftchapterfont}{\hfil}% Left side hfil, for centering
\renewcommand\chapternumberline[1]{%
\thispagestyle{empty}% So that all TOC pages have no header and footer
{\hp{\IfInteger{#1}{\NUMBERstringnum{#1}}{Appendix #1}}}% Chapter number
\hfil\strut\par\nopagebreak\hfil}% Right-side hfil, new paragraph and left hfil before chapter name
\settocdepth{chapter}
\phantomsection% For the 'contents' label to point here
\label{contents}
\tableofcontents*