This commit is contained in:
2024-10-23 15:56:17 +02:00
parent bd19d043f8
commit bd4f683e4d
4 changed files with 66 additions and 70 deletions

View File

@@ -1,6 +1,6 @@
% Margins
\usepackage[inner=25mm, outer=25mm, top=35mm, bottom=30mm]{geometry}
%\usepackage[inner=35mm, outer=20mm, top=25mm, bottom=30mm]{geometry} % If printing
%\usepackage[inner=35mm, outer=20mm, top=25mm, bottom=30mm]{geometry}% If printing
% Set line spacing to 1.15
\usepackage{setspace}
@@ -11,16 +11,16 @@
\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
\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)
\usepackage[main=english,french]{babel}% Typographical rules
\usepackage{microtype}% Micro-typography improvements (slightly more compact, better to read)
% Fonts: Use sans-serif for sections
\usepackage{titlesec}
@@ -33,7 +33,7 @@
% Parts, chapters and sections
\NewCommandCopy{\oldchapter}{\chapter}
\RenewDocumentCommand{\chapter}{s o m}{% #1 = star (no number), #2 = short title, #3 = title
\RenewDocumentCommand{\chapter}{s o m}{% #1 = star, #2 = short title, #3 = title
\IfBooleanTF{#1}{%
\oldchapter*{#3}% Starred chapter
\addcontentsline{toc}{chapter}{#3}% Add to the table of contents
@@ -43,8 +43,8 @@
}{%
\oldchapter{#3}% Regular chapter
}%
\addcontentsline{lof}{chapter}{\thechapter.\ #3} % Add to the list of figures
\addcontentsline{lot}{chapter}{\thechapter.\ #3} % Add to the list of tables
\addcontentsline{lof}{chapter}{\thechapter.\ #3}% Add to the list of figures
\addcontentsline{lot}{chapter}{\thechapter.\ #3}% Add to the list of tables
}%
}
@@ -56,29 +56,23 @@
\includefrom{#1}{#2}% Include with relative paths \input in the chapter
}
\setcounter{secnumdepth}{3} % Number subsubsections
\setcounter{secnumdepth}{3}% Number subsubsections
% Headers
\usepackage{emptypage} % Remove headers and footers on empty pages
\usepackage{etoolbox} % Patching commands
\usepackage{fancyhdr} % Headers and footers
\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
\pagestyle{fancy}% Use fancy headers and footers
\fancyhf{}% Clear headers and footers
\fancyhead[LO, RE]{}
\fancyfoot[C]{\thepage} % Page number in the center of the footer
\fancyfoot[C]{\thepage}% Page number in the center of the footer
\appto\mainmatter{
\renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter~--\ #1}{}} % Chapter formatting
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} % Section formatting
\fancyhead[LO]{\small\nouppercase{\leftmark}} % Chapter in the left on odd pages
\fancyhead[RE]{\small\nouppercase{\rightmark}} % Section in the right on even pages
\renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter~--\ #1}{}}% Chapter formatting
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}% Section formatting
\fancyhead[LO]{\small\nouppercase{\leftmark}}% Chapter in the left on odd pages
\fancyhead[RE]{\small\nouppercase{\rightmark}}% Section in the right on even pages
}
\setlength{\headheight}{14pt}
% Less hbox/vbox badness messages
\hfuzz=20pt
\vfuzz=20pt
\hbadness=2000
\vbadness=\maxdimen