-
Notifications
You must be signed in to change notification settings - Fork 30
/
book_template.tex
86 lines (64 loc) · 3.26 KB
/
book_template.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
\documentclass[headings=optiontotoc]{scrbook}
\let\nocolourboxes 1
\usepackage[book]{../../util}
\usepackage{subfiles}
\usepackage{minitoc}
\usepackage{tocloft}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{section}}
% Define new font family with roman font and monospaced, oldstyled numbers
\newfontfamily{\msf}{STIX Two Text}[Numbers={OldStyle,Monospaced}, Ligatures=TeX]
% switch all headings and pagenumbers in the document
\addtokomafont{disposition}{\msf}
\addtokomafont{pagehead}{\msf}
\addtokomafont{pagenumber}{\msf}
% switch entries in toc
\DeclareTOCStyleEntry[entryformat=\msf\bfseries,pagenumberformat=\msf\bfseries]{default}{chapter}
\addtokomafont{pagenumber}{\oldstylenums}
\addtokomafont{chapterentrypagenumber}{\oldstylenums}
\RedeclareSectionCommand[tocpagenumberformat=\oldstylenums]{section}
\RedeclareSectionCommand[tocpagenumberformat=\oldstylenums]{subsection}
\renewcommand{\mtcSfont}{\msf\bfseries}
\renewcommand{\mtcSSfont}{\msf}
% add spacing between roman course numbers and course names
\DeclareTOCStyleEntries[numwidth=3em]{tocline}{chapter}
\begin{document}
\begin{titlepage}
\begin{center}
\vspace*{1cm}
\Huge
\textbf{Notes on the Mathematical Tripos}
\vspace{0.5cm}
\LARGE
Sky Wilshaw
\vfill
\Huge
\textsc{\volname}
\vfill
\Large
University of Cambridge\\
2020--\the\year{}
\end{center}
\end{titlepage}
\dominitoc{}
\setcounter{tocdepth}{0}
\cleardoubleoddpage
\tableofcontents
\newpage
\setcounter{tocdepth}{3}
% TODO: Write introduction
\iffalse
\chapter*{Introduction}
This book contains notes for the maths courses at Cambridge University.
Please note that while efforts have been made to ensure completeness and correctness, no guarantees can be made; this is simply a reasonably complete way of collating information about the courses.
This book can be downloaded in PDF form for free at \url{https://thirdsgames.co.uk/maths.html}, and the source code (for the book itself and for the individual courses) can be accessed at \url{https://github.com/zeramorphic/cambridge-maths-notes}.
You are given the right to download the PDF of the book (or its component parts) for private use.
You are permitted to download and modify the source code of the repository (the book and the course notes it contains), but may not distribute these modifications (including object files such as PDFs generated from these modifications) to others.
However, you are permitted to make public forks of the repository in order to create pull requests, but this does not grant you permission to distribute object files created from these forked repositories.
It must be clear when visiting it that such a repository is a fork of \url{https://github.com/zeramorphic/cambridge-maths-notes}, and must include a link to the original repository.
(Forks created on GitHub satisfy this requirement, as the title contains the words `forked from' and then a link to the original repository.)
This project makes use of free software in accordance with their license terms, including the \texttt{cobra} CLI interface generator \\ \url{https://pkg.go.dev/mod/github.com/spf13/[email protected]}.
For more information, read the licenses of each dependency.
\fi
\let\maketitle\ignorespaces{}
\renewcommand{\tableofcontentsnewpage}{\newpage\minitoc\newpage}