forked from OpenLogicProject/forallx-cam
-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathforallxyyc-style.sty
107 lines (82 loc) · 3.73 KB
/
forallxyyc-style.sty
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
%!TEX root = forallxyyc.tex
% forallxyyc-style provides layout and style setup for forall x: YYC books
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{forallxyyc-style}
\ifdefined\bmlDescription\else
\newenvironment{bmlimage}{}{}
\newcommand{\bmlDescription}[1]{}
\fi
\RequirePackage{hyperref,ifthen,graphicx,xcolor}
\usepackage[numbered]{bookmark} %TB: added for speedy navigation
\usepackage[nonumberlist,toc,style=index]{glossaries}
\makeglossaries
\usepackage{tabu}
\usepackage[defaultlines=2,all]{nowidow}
%RZ: typefaces
\usepackage{helvet}
\usepackage[osf]{Baskervaldx} % oldstyle figures
\RequirePackage{amssymb} % ensure this is loaded before newtxmath
\usepackage[bigdelims,baskervaldx]{newtxmath}
%RZ: Make sure we have a copyright symbol
\def\copyright{\textcircled{C}}
%RZ: Include git revision info
\usepackage{gitinfo2}
% RZ: TOC widths
\setlength{\cftpartnumwidth}{3em}
\setlength{\cftchapternumwidth}{2.2em}
\setlength{\cftsectionnumwidth}{3.3em}
\setlength{\cftbeforechapterskip}{0pt} %TB: to leave no gap between sections (which LaTeX regards as chapters) in the TOC
\renewcommand{\cftchapterfont}{\textrm}
\renewcommand{\cftchapterpagefont}{\textrm}
% Chapter style
\newlength{\barlength}
\setlength{\barlength}{400pt}
\makechapterstyle{leadbeater}{%
\setlength{\afterchapskip}{40pt}
\setlength{\beforechapskip}{50pt}
\setlength{\midchapskip}{10pt}
\renewcommand*{\afterchapternum}{\par\nobreak\vskip 0pt}
\renewcommand*{\chapnamefont}{\fontsize{14pt}{0pt}\selectfont\sffamily\bfseries}
\renewcommand*{\chapnumfont}{\fontsize{14pt}{0pt}\selectfont\sffamily\bfseries}
\renewcommand*{\chaptitlefont}{\normalfont\fontsize{48pt}{48pt}\selectfont\bfseries\itshape\color{leadbeater}}
\renewcommand*{\printchaptername}{%
\chapnamefont\MakeUppercase{\@chapapp}}
\renewcommand*{\printchaptertitle}[1]{%
\chaptitlefont ##1\\[-\baselineskip]%
\hspace*{-20pt}%
\smash{\color{leadbeater}\rule{7pt}{\barlength}}}
}
\renewcommand*{\partnamefont}{\fontsize{24pt}{0pt}\selectfont\sffamily\bfseries}
\renewcommand*{\partnumfont}{\fontsize{24pt}{0pt}\selectfont\sffamily\bfseries}
\renewcommand*{\parttitlefont}{\normalfont\fontsize{48pt}{48pt}\selectfont\bfseries\itshape\color{leadbeater}}
\renewcommand*{\printpartname}{%
\partnamefont PART}
\newcommand{\trailingperiod}[1]{#1.}
\setparaheadstyle{\normalsize\bfseries\trailingperiod}
\copypagestyle{leadbeater}{headings}
\chapterstyle{leadbeater}
\makeoddhead{leadbeater}{\small\sffamily\color{leadbeater}\rightmark}{}
{\color{leadbeater}\sffamily\bfseries\thepage}
\makeevenhead{leadbeater}{\color{leadbeater}\sffamily\bfseries\thepage}{}
{\small\sffamily\color{leadbeater}\leftmark}
\usepackage[font={small,it}]{caption}
% restart numbering of example sentences for every chapter
\addtodef{\chapter}{\restartlist{enumerate}}{}
% \factoidbox{...} produces a highlighted paragraph of text
\usepackage{tcolorbox}
\newenvironment{factoidboxe}{%
\begin{tcolorbox}[%width=.9\textwidth,
% leftright skip=.05\textwidth,
sharp corners=downhill,
beforeafter skip=.7em,
colframe={leadbeater},colback={vltleadbeater}]}{
\end{tcolorbox}}
\newcommand{\factoidbox}[1]{\begin{factoidboxe}#1\end{factoidboxe}}
% TB: information originally in the main body; but it is style information, so I have included it here.
\hypersetup{pdfinfo={Title={forall x: Calgary}, Author={P.D. Magnus, Tim Button, J. Rob Loftis, Rob Trueman, Aaron Thomas-Bolduc, Richard Zach}, Subject={An open access introductory textbook in formal logic}, Keywords={truth-functional logic, propositional logic, predicate logic, first-order logic, natural deduction, Fitch}}, %
% bookmarks={true}, %
bookmarksopen = true,
colorlinks={true}, %
allcolors={dkleadbeater},
pdfdisplaydoctitle={true}}
\urlstyle{same}