Repository navigation
Expand file tree
/
Copy pathdamagebdd_book.tex
More file actions
163 lines (140 loc) · 4.4 KB
/
Copy pathdamagebdd_book.tex
File metadata and controls
163 lines (140 loc) · 4.4 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
% damagebdd_book.tex — mobile-friendly, modernized
\documentclass[11pt,oneside,a5paper]{scrbook}
% ---------- Encoding & language ----------
\usepackage[T1]{fontenc} % pdfLaTeX fallback
\usepackage[utf8]{inputenc} % pdfLaTeX fallback
\usepackage[english]{babel}
\usepackage{pdfpages} % add this in preamble
% ---------- Engine-aware fonts ----------
\usepackage{iftex}
\ifLuaTeX
\usepackage{fontspec}
\setmainfont{Libertinus Serif}[
Ligatures=TeX,
UprightFeatures={Scale=MatchLowercase},
BoldFont={Libertinus Serif Bold},
ItalicFont={Libertinus Serif Italic}
]
\setsansfont{Inter}[
UprightFeatures={Scale=MatchLowercase},
BoldFont={Inter Bold},
ItalicFont={Inter Italic}
]
\setmonofont{JetBrains Mono}[
UprightFeatures={Scale=MatchLowercase}
]
\else\ifXeTeX
\usepackage{fontspec}
\setmainfont{Libertinus Serif}
\setsansfont{Inter}
\setmonofont{JetBrains Mono}
\else
% pdfLaTeX fallback fonts
\usepackage{lmodern}
\fi\fi
% ---------- Layout & readability ----------
\KOMAoptions{
DIV=12, % overall typearea size for A5 (adjust 11–13 as taste)
BCOR=2mm, % binding correction (0–3mm typical; optional)
headinclude=true, % include header in layout calc
footinclude=true % include footer in layout calc (prevents clipping)
}
% If you change DIV/BCOR after \begin{document}, call:
\recalctypearea
\usepackage{microtype}
\usepackage{setspace}
\setstretch{1.15} % comfortable line spacing
\usepackage{parskip} % space between paragraphs, no indents
\setlength{\emergencystretch}{3em} % fewer overfull lines
\usepackage[hyphens]{url}
\PassOptionsToPackage{hyphens}{url}
\usepackage{xcolor}
\definecolor{linkblue}{HTML}{1E6FB9}
\definecolor{linkgrey}{HTML}{555555}
\setlength{\footskip}{14mm} % space from baseline of footer to bottom edge
% ---------- Links & PDF metadata ----------
\usepackage[
pdfauthor={Steven Joseph},
pdftitle={DamageBDD: Behaviour Verification at Planetary Scale},
pdfcreator={LaTeX},
pdfproducer={LaTeX},
hidelinks,
colorlinks=true,
linkcolor=linkblue,
urlcolor=linkblue,
citecolor=linkblue
]{hyperref}
\usepackage{bookmark} % better/faster bookmarks than hyperref's default
% ---------- ToC & bookmarks ----------
\usepackage{bookmark} % load after hyperref; faster/more reliable bookmarks
% Show chapters/sections/subsections in ToC
\setcounter{tocdepth}{2}
\setcounter{secnumdepth}{2}
% Keep KOMA's default ToC formatting (clean + mobile-friendly)
% (If you had \RedeclareSectionCommand[tocindent=0pt]{chapter}, remove it.)
\KOMAoptions{toc=flat} % optional; safe with KOMA
% ---------- Headings (clean, mobile-friendly) ----------
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\huge\bfseries\sffamily}
{\thechapter}{1em}{}
\titlespacing*{\chapter}{0pt}{1.5ex plus .5ex}{1ex}
\titleformat{\section}
{\normalfont\Large\bfseries\sffamily}
{\thesection}{0.8em}{}
\titlespacing*{\section}{0pt}{1.25ex plus .5ex}{0.6ex}
\titleformat{\subsection}
{\normalfont\large\bfseries}
{\thesubsection}{0.6em}{}
\titlespacing*{\subsection}{0pt}{1ex plus .5ex}{0.4ex}
% ---------- Lists ----------
\usepackage{enumitem}
\setlist{nosep,leftmargin=*,itemsep=0.25\baselineskip}
\setlist[itemize]{label=—}
% ---------- Code blocks ----------
\usepackage{listings}
\lstset{
basicstyle=\ttfamily\small,
breaklines=true,
breakatwhitespace=true,
columns=fullflexible,
showstringspaces=false,
frame=single,
rulecolor=\color{linkgrey},
numberstyle=\tiny,
numbers=none,
tabsize=2,
keepspaces=true
}
\newcommand{\bookversion}{v1.0.1}
\date{\today \\ Version \bookversion}
\hyphenation{DamageBDD}
% ---------- Title ----------
%\title{\sffamily DamageBDD: Behaviour Verification at Planetary Scale}
\title{DamageBDD: Behaviour Verification at Planetary Scale \\[1ex]
\large \bookversion}
\author{Steven Joseph}
\date{\today}
\begin{document}
\includepdf[pages=-,fitpaper]{cover.png}
\maketitle
\frontmatter
\include{preface}
\cleardoublepage
\pdfbookmark[0]{Contents}{toc}
\tableofcontents
\cleardoublepage
\mainmatter
\include{chapters/intro}
\include{chapters/basics}
\include{chapters/bdd}
\include{chapters/first_steps}
\include{chapters/advanced}
\include{chapters/devops}
\include{chapters/economy}
\include{chapters/case_studies}
\include{chapters/future}
\include{chapters/index_chapter}
\backmatter
\includepdf[pages=-,fitpaper]{cover-back.png}
\end{document}