diff --git a/config/content.tex b/config/content.tex index d7b6079..0acfde5 100644 --- a/config/content.tex +++ b/config/content.tex @@ -1,5 +1,5 @@ % Images -\usepackage{graphicx} +\usepackage{graphicx}% Include images \usepackage{caption}% Point references to the figure not the caption \usepackage[export]{adjustbox}% For valign in subfigs @@ -20,13 +20,13 @@ \renewcommand{\floatpagefraction}{0.7} % Formatting -\usepackage[autostyle]{csquotes}% For quotes +\usepackage[autostyle]{csquotes}% Correctly quote text in different languages \usepackage[dvipsnames]{xcolor}% More colors \usepackage{tocloft}% Customise the table of contents \usepackage[nottoc]{tocbibind}% Add bibliography and lists to the table of contents, and hide the table of contents itself % Footnotes -\usepackage[hang]{footmisc} +\usepackage[hang]{footmisc}% hang: no indentation for footnotes \setlength{\footnotemargin}{3mm}% Margin between footnote number and text \NewCommandCopy{\oldfootnote}{\footnote} @@ -41,16 +41,16 @@ % Links \usepackage{hyperref} \hypersetup{ - bookmarksnumbered = true, % Include section numbers in bookmarks - bookmarksopen = true, % Auto-open bookmarks - bookmarksopenlevel = 0, % Open up to chapters + bookmarksnumbered = true,% Include section numbers in bookmarks + bookmarksopen = true,% Auto-open bookmarks + bookmarksopenlevel = 0,% Open up to chapters } \hypersetup{ - colorlinks = true, % Color links - allcolors = Black, % Default color - citecolor = OliveGreen, % Color of citations - linkcolor = MidnightBlue, % Color of internal links - allbordercolors = White, % No borders around links + colorlinks = true,% Color links + allcolors = Black,% Default color + citecolor = OliveGreen,% Color of citations + linkcolor = MidnightBlue,% Color of internal links + allbordercolors = White,% No borders around links } % Lists @@ -67,6 +67,6 @@ % Units \usepackage{siunitx}% For numbers with units \sisetup{ - retain-explicit-plus = true, % Keep + in numbers - uncertainty-mode = separate % Separate uncertainty with +- instead of () + retain-explicit-plus = true,% Keep + in numbers + uncertainty-mode = separate% Separate uncertainty with +- instead of () } diff --git a/utils/commands.tex b/utils/commands.tex index e6fc3e7..e308e6c 100644 --- a/utils/commands.tex +++ b/utils/commands.tex @@ -1,5 +1,5 @@ %% Packages required -\usepackage[caption=false]{subfig} % Good looking subfigs +\usepackage[caption=false]{subfig}% Good looking subfigs %% Abbreviations \newcommand{\etal}{\textit{et al.}} @@ -93,11 +93,11 @@ } %% Footnotes -\newcommand{\footnotemarkrepeat}{\footnotemark[\value{footnote}]} % Repeat the last footnote mark +\newcommand{\footnotemarkrepeat}{\footnotemark[\value{footnote}]}% Repeat the last footnote mark \newcommand{\footnoteurl}[1]{\footnote{\ \url{#1}}} %% Lists -\renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textit{#1}} % Use italics instead of bold for descriptions +\renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textit{#1}}% Use italics instead of bold for descriptions %% Maths \newcommand{\measure}[3]{$\mathrm{#1} = \qty{#2}{#3}$} @@ -167,11 +167,23 @@ \endgroup% } +\newcommand{\sectionstartoc}[1]{% + \section*{#1}% + \addcontentsline{toc}{section}{#1}% +} +\newcommand{\sectionstarbookmark}[1]{% + \pdfbookmark[section]{#1}{#1}% + \section*{#1}% +} -\newcommand{\subsectionstartoc}[1]{ -\subsection*{#1}\addcontentsline{toc}{subsection}{#1}} -\newcommand{\subsectionstarbookmark}[1]{\pdfbookmark[subsection]{#1}{#1} -\subsection*{#1}} +\newcommand{\subsectionstartoc}[1]{% + \subsection*{#1}% + \addcontentsline{toc}{subsection}{#1}% +} +\newcommand{\subsectionstarbookmark}[1]{% + \pdfbookmark[subsection]{#1}{#1}% + \subsection*{#1}% +} \newcommand{\subsubsubsection}[1]{\paragraph*{\textit{#1}}} @@ -210,10 +222,10 @@ \newcolumntype{P}[1]{>{\raggedright}p{#1}} %% Other -\newcommand{\horizontalrule}{\par\noindent\rule{\textwidth}{0.4pt}} % Horizontal line +\newcommand{\horizontalrule}{\par\noindent\rule{\textwidth}{0.4pt}}% Horizontal line \makeatletter -\def\convertto#1#2{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1} % Convert units. Usage: \convertto{cm}{1pt}. From: https://tex.stackexchange.com/a/8337 +\def\convertto#1#2{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1}% Convert units. Usage: \convertto{cm}{1pt}. From: https://tex.stackexchange.com/a/8337 \makeatother %% User studies