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,7 +1,7 @@
\usepackage[% \usepackage[%
indexonlyfirst% Show only the first use page on the list of acronyms indexonlyfirst% Show only the first use page on the list of acronyms
]{glossaries} ]{glossaries}
\usepackage{xspace} % To avoid problems with missing spaces after custom commands \usepackage{xspace}% To avoid problems with missing spaces after custom commands
% Set the list of acronyms style % Set the list of acronyms style
\newglossarystyle{dots}{% From https://tex.stackexchange.com/a/327513 \newglossarystyle{dots}{% From https://tex.stackexchange.com/a/327513
@@ -33,7 +33,7 @@
} }
% Style the acronyms % Style the acronyms
\renewcommand*{\glstextformat}[1]{\textcolor{black}{#1}} % Hyperlink in black \renewcommand*{\glstextformat}[1]{\textcolor{black}{#1}}% Hyperlink in black
\acronym[TIFC]{2IFC}{two-interval forced choice} \acronym[TIFC]{2IFC}{two-interval forced choice}
\acronym[TwoD]{2D}{two-dimensional} \acronym[TwoD]{2D}{two-dimensional}

View File

@@ -1,29 +1,39 @@
% Changes
\usepackage[draft, defaultcolor=Blue, xcolor=dvipsnames]{changes} % Track changes
\definechangesauthor[color=RawSienna]{CP}
\newcommand{\CP}[1]{\comment[id=CP]{#1}}
% Images % Images
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{caption} % Point references to the figure not the caption \usepackage{caption}% Point references to the figure not the caption
\usepackage[export]{adjustbox} % For valign in subfigs \usepackage[export]{adjustbox}% For valign in subfigs
% Includes % Includes
\usepackage{bookmark} % Manage bookmarks \usepackage{bookmark}% Manage bookmarks
\usepackage{import} % Allow relative paths \usepackage{import}% Allow relative paths
\usepackage{pdfpages} % Include PDFs \usepackage{pdfpages}% Include PDFs
\usepackage{pdflscape} % Landscape pages \usepackage{pdflscape}% Landscape pages
\usepackage{afterpage} % Execute command after the next page break \usepackage{afterpage}% Execute command after the next page break
% Floatings (images and tables) : less restrictive constraints (https://robjhyndman.com/hyndsight/latex-floats/index.html)
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.15}
\renewcommand{\floatpagefraction}{0.7}
% Formatting % Formatting
\usepackage[autostyle]{csquotes} % For quotes \usepackage[autostyle]{csquotes}% For quotes
\usepackage[dvipsnames]{xcolor} % More colors \usepackage[dvipsnames]{xcolor}% More colors
\usepackage{tocloft} % Customise the table of contents \usepackage{tocloft}% Customise the table of contents
\usepackage{tocbibind} % Add bibliography and lists to the table of contents \usepackage{tocbibind}% Add bibliography and lists to the table of contents
% Footnotes % Footnotes
\usepackage[hang]{footmisc} \usepackage[hang]{footmisc}
\setlength{\footnotemargin}{3mm} % Margin between footnote number and text \setlength{\footnotemargin}{3mm}% Margin between footnote number and text
% Less hbox/vbox badness messages
\hfuzz=20pt
\vfuzz=20pt
\hbadness=2000
\vbadness=\maxdimen
% Links % Links
\usepackage{hyperref} \usepackage{hyperref}
@@ -41,19 +51,19 @@
} }
% Lists % Lists
\usepackage[inline]{enumitem} % Customise lists \usepackage[inline]{enumitem}% Customise lists
\setlist{nolistsep} % No space before and after lists \setlist{nolistsep}% No space before and after lists
\setitemize{noitemsep} % No space between items in itemize \setitemize{noitemsep}% No space between items in itemize
% Tables % Tables
\usepackage{booktabs} % Better tables \usepackage{booktabs}% Better tables
\usepackage{makecell} % For multi-line cells in tables \usepackage{makecell}% For multi-line cells in tables
\usepackage{multirow} % Multi-row cells in tables \usepackage{multirow}% Multi-row cells in tables
\usepackage{tabularx} % For tables with fixed width \usepackage{tabularx}% For tables with fixed width
% Units % Units
\usepackage{siunitx} % For numbers with units \usepackage{siunitx}% For numbers with units
\sisetup{ \sisetup{
retain-explicit-plus=true, % Keep + in numbers retain-explicit-plus = true, % Keep + in numbers
uncertainty-mode=separate % Separate uncertainty with +- instead of () uncertainty-mode = separate % Separate uncertainty with +- instead of ()
} }

View File

@@ -1,6 +1,6 @@
% Margins % Margins
\usepackage[inner=25mm, outer=25mm, top=35mm, bottom=30mm]{geometry} \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 % Set line spacing to 1.15
\usepackage{setspace} \usepackage{setspace}
@@ -11,16 +11,16 @@
\ifluatex \ifluatex
\usepackage{libertinus-otf} \usepackage{libertinus-otf}
\else \else
\usepackage{mathtools} % Math improvements \usepackage{mathtools}% Math improvements
\usepackage{libertinus} % Libertinus font for text and math \usepackage{libertinus}% Libertinus font for text and math
\usepackage[T1]{fontenc} % Use T1 font encoding \usepackage[T1]{fontenc}% Use T1 font encoding
\usepackage{textcomp} % Additional symbols \usepackage{textcomp}% Additional symbols
\usepackage[varqu, varl]{inconsolata} % Better monospace font (with alternative "quote" [varqu] and "l" [varl]) \usepackage[varqu, varl]{inconsolata}% Better monospace font (with alternative "quote" [varqu] and "l" [varl])
%\usepackage{libertinust1math} % Libertinus math font %\usepackage{libertinust1math}% Libertinus math font
\fi \fi
\usepackage[english]{babel} % Typographical rules \usepackage[main=english,french]{babel}% Typographical rules
\usepackage{microtype} % Micro-typography improvements (slightly more compact, better to read) \usepackage{microtype}% Micro-typography improvements (slightly more compact, better to read)
% Fonts: Use sans-serif for sections % Fonts: Use sans-serif for sections
\usepackage{titlesec} \usepackage{titlesec}
@@ -33,7 +33,7 @@
% Parts, chapters and sections % Parts, chapters and sections
\NewCommandCopy{\oldchapter}{\chapter} \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}{% \IfBooleanTF{#1}{%
\oldchapter*{#3}% Starred chapter \oldchapter*{#3}% Starred chapter
\addcontentsline{toc}{chapter}{#3}% Add to the table of contents \addcontentsline{toc}{chapter}{#3}% Add to the table of contents
@@ -43,8 +43,8 @@
}{% }{%
\oldchapter{#3}% Regular chapter \oldchapter{#3}% Regular chapter
}% }%
\addcontentsline{lof}{chapter}{\thechapter.\ #3} % Add to the list of figures \addcontentsline{lof}{chapter}{\thechapter.\ #3}% Add to the list of figures
\addcontentsline{lot}{chapter}{\thechapter.\ #3} % Add to the list of tables \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 \includefrom{#1}{#2}% Include with relative paths \input in the chapter
} }
\setcounter{secnumdepth}{3} % Number subsubsections \setcounter{secnumdepth}{3}% Number subsubsections
% Headers % Headers
\usepackage{emptypage} % Remove headers and footers on empty pages \usepackage{emptypage}% Remove headers and footers on empty pages
\usepackage{etoolbox} % Patching commands \usepackage{etoolbox}% Patching commands
\usepackage{fancyhdr} % Headers and footers \usepackage{fancyhdr}% Headers and footers
\pagestyle{fancy} % Use fancy headers and footers \pagestyle{fancy}% Use fancy headers and footers
\fancyhf{} % Clear headers and footers \fancyhf{}% Clear headers and footers
\fancyhead[LO, RE]{} \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{ \appto\mainmatter{
\renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter~--\ #1}{}} % Chapter formatting \renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter~--\ #1}{}}% Chapter formatting
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} % Section formatting \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}% Section formatting
\fancyhead[LO]{\small\nouppercase{\leftmark}} % Chapter in the left on odd pages \fancyhead[LO]{\small\nouppercase{\leftmark}}% Chapter in the left on odd pages
\fancyhead[RE]{\small\nouppercase{\rightmark}} % Section in the right on even pages \fancyhead[RE]{\small\nouppercase{\rightmark}}% Section in the right on even pages
} }
\setlength{\headheight}{14pt} \setlength{\headheight}{14pt}
% Less hbox/vbox badness messages
\hfuzz=20pt
\vfuzz=20pt
\hbadness=2000
\vbadness=\maxdimen

View File

@@ -13,15 +13,6 @@
\singlespacing \singlespacing
}{} }{}
% Floatings (images and tables) : less restrictive constraints (https://robjhyndman.com/hyndsight/latex-floats/index.html)
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.15}
\renewcommand{\floatpagefraction}{0.7}
% Images % Images
% example: \fig[1]{filename}{Caption}[Additional caption text, not shown in the list of figures] % example: \fig[1]{filename}{Caption}[Additional caption text, not shown in the list of figures]
% reference later with: \figref{filename} % reference later with: \figref{filename}
@@ -118,7 +109,7 @@
\renewcommand{\tabref}[2][\labelprefix]{Table~\ref{#1:tab:#2}} \renewcommand{\tabref}[2][\labelprefix]{Table~\ref{#1:tab:#2}}
% Misc % Misc
\newcommand{\noindentskip}{\bigskip\noindent} % Skip a line and remove the indent \newcommand{\noindentskip}{\bigskip\noindent}% Skip a line and remove the indent
% Tables % Tables
\RenewDocumentEnvironment{tab}{O{htbp} m m O{}}{% #1 = position, #2 = label, #3 = title, #4 = additional caption \RenewDocumentEnvironment{tab}{O{htbp} m m O{}}{% #1 = position, #2 = label, #3 = title, #4 = additional caption
@@ -141,8 +132,6 @@
% Local table of contents % Local table of contents
\usepackage{titletoc} \usepackage{titletoc}
\newcommand{\chaptertoc}{% Print the table of contents for the chapter \newcommand{\chaptertoc}{% Print the table of contents for the chapter
%\hypersetup{linkcolor=black}%
\section*{Contents}% Add a section title \section*{Contents}% Add a section title
\vspace{-1.5em}% \vspace{-1.5em}%
\horizontalrule% \horizontalrule%
@@ -155,3 +144,6 @@
\horizontalrule% \horizontalrule%
\vspace{2em}% \vspace{2em}%
} }
\newcommand{\nochaptertoc}{%
\stopcontents%
}