47 lines
1.5 KiB
TeX
47 lines
1.5 KiB
TeX
% Margins
|
|
\usepackage[inner=35mm, outer=20mm, top=30mm, bottom=25mm]{geometry}
|
|
|
|
% Set line spacing to 1.15
|
|
\usepackage{setspace}
|
|
\linespread{1.15}
|
|
|
|
% Typography
|
|
\usepackage{iftex}
|
|
\ifluatex
|
|
\usepackage{libertinus-otf}
|
|
\else
|
|
\usepackage{mathtools} % Math improvements
|
|
\usepackage{libertinus} % Libertinus font for text and math
|
|
\usepackage[T1]{fontenc} % Use T1 font encoding
|
|
\usepackage{textcomp} % Additional symbols
|
|
\usepackage[varqu, varl]{inconsolata} % Better monospace font (with alternative "quote" [varqu] and "l" [varl])
|
|
%\usepackage{libertinust1math} % Libertinus math font
|
|
\fi
|
|
|
|
\usepackage[english]{babel} % Typographical rules
|
|
\usepackage{microtype} % Micro-typography improvements (slightly more compact, better to read)
|
|
|
|
% Use sans-serif font for sectionss
|
|
\usepackage{sectsty}
|
|
\chapterfont{\sffamily}
|
|
\allsectionsfont{\sffamily}
|
|
|
|
% Headers
|
|
\usepackage{emptypage} % Remove headers and footers on empty pages
|
|
\usepackage{etoolbox} % Patching commands
|
|
\usepackage{fancyhdr} % Headers and footers
|
|
|
|
\pagestyle{fancy} % Use fancy headers and footers
|
|
\fancyhf{} % Clear headers and footers
|
|
\fancyhead[LO, RE]{\small\leftmark} % Chapter in the left on odd pages and right on even pages
|
|
\fancyfoot[C]{\thepage} % Page number in the center
|
|
|
|
\appto\mainmatter{
|
|
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
|
|
\renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter~--\ #1}{}}
|
|
\fancyhead[RE]{\small\rightmark}
|
|
\fancyhead[LO]{\small\leftmark}
|
|
}
|
|
|
|
\setlength{\headheight}{14pt}
|