X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=preamble.tex;h=20ba25a98d872843f62f783fed0f2e756d9d47af;hb=40c364b9de5d27b8afedcfd83d76499acc9e31af;hp=11c34d8bbedb52bce28e72911615dc0555322cb8;hpb=c590c9a29ba0f88f0a4b19b3be89ed6c52bfd0f9;p=phd-thesis.git diff --git a/preamble.tex b/preamble.tex index 11c34d8..20ba25a 100644 --- a/preamble.tex +++ b/preamble.tex @@ -16,6 +16,7 @@ \usepackage{siunitx} % typeset units \usepackage{xcolor} % colors \usepackage{fnpct} % footnotekerning +\usepackage[all]{nowidow} % Kill widows and orphans \DeclareSIUnit\noop{\relax} \DeclareSIUnit\celcius{{}^{\circ}\kern-\scriptspace\mathsf{C}} \everymath{\it\/} @@ -50,14 +51,15 @@ chapterlistsgaps=on, ]{equ} \usepackage{fancyhdr} % Custom headers and footers +\usepackage[fit]{truncate} %\pagestyle{headings} \pagestyle{fancy} \fancyhead{} \fancyfoot{} \setlength{\unitlength}{18mm} \newcommand{\blob}{{\color{gray}\rule[-.2\unitlength]{2\unitlength}{.5\unitlength}}} -\fancyhead[RE]{\rightmark} -\fancyhead[LO]{\leftmark} +\fancyhead[RE]{\truncate{.95\headwidth}{\rightmark}} +\fancyhead[LO]{\truncate{.95\headwidth}{\leftmark}} \newcommand{\frontmatterfancy}[0]{ \fancyhead[RO]{\thepage} \fancyhead[LE]{\thepage} @@ -116,7 +118,11 @@ \def\part@nostar@nopt#1{\NR@gettitle{#1}\titlesec@part{#1}} \def\part@nostar@opt[#1]#2{\NR@gettitle{#1}\titlesec@part[#1]{#2}} \makeatother -\newenvironment{chapterabstract}{\begin{quotation}\em}{\end{quotation}} %chktex 6 + +\usepackage{framed} +\definecolor{lstbg}{gray}{.95} +\definecolor{shadecolor}{named}{lstbg} +\newenvironment{chapterabstract}{\begin{shaded}\begin{quotation}}{\end{quotation}\end{shaded}} %chktex 6 % Increase the depth for the table of contents \setcounter{secnumdepth}{3} @@ -129,15 +135,16 @@ \usepackage{appendix} % subappendices, appendices per chapter % Bibliography -\usepackage{natbib} % Cite bib entry completely +\usepackage[square]{natbib} % Cite bib entry completely \setlength{\bibsep}{0.0pt} -\def\bibfont{\small} +%\def\bibfont{\small} %\bibliographystyle{alpha} \bibliographystyle{abbrvnat} -\apptocmd{\thebibliography}{\raggedright}{}{} +%\apptocmd{\thebibliography}{\raggedright}{}{} \usepackage{bibentry} % Cite bib entry completely \nobibliography* \newcommand{\citeentry}[1]{\begin{NoHyper}\bibentry{#1}\end{NoHyper}. \citep{#1}} +\newcommand{\refurl}[2]{\url{#1}, accessed on: #2} \makeatletter \newcommand{\citepage}[1]{p.~#1} @@ -150,17 +157,9 @@ %\newcommand{\citesections}[1]{\S\S.~#1} \newcommand{\citeparagraph}[1]{\P.~#1} \newcommand{\citeparagraphs}[1]{\P\P.~#1} +\newcommand{\citelisting}[1]{\cref@listing@name~#1} \makeatother -% Graphics -\usepackage{graphicx} % Images -\graphicspath{{img/},{intro/img},{top/img},{tvt/img}} -\usepackage{caption} % subfigures/captionof -\usepackage{subcaption} -\usepackage{rotating} -\newcommand{\orcid}[1]{\href{https://orcid.org/#1}{\hspace{1mm}\includegraphics[width=1em]{orcid}\hspace{2mm} https://orcid.org/#1}} -\usepackage{tikz} - % Tables \usepackage{booktabs} % Nicer tables \usepackage{multirow} % Multirow cells @@ -174,13 +173,13 @@ % Fix the algorithm font \renewcommand\AlCapFnt{\normalfont} \usepackage{listings} +\newcounter{tmp} % https://tex.stackexchange.com/questions/149056/how-can-i-define-additional-literate-replacements-without-deleting-existing-ones \makeatletter \def\addToLiterate#1{\edef\lst@literate{\unexpanded\expandafter{\lst@literate}\unexpanded{#1}}} \lst@Key{moreliterate}{}{\addToLiterate{#1}} \makeatother % General listings settings -\definecolor{lstbg}{gray}{.95} \lstset{% basewidth=0.5em, basicstyle=\tt\small, @@ -264,8 +263,26 @@ } {} +% Graphics +\usepackage{graphicx} % Images +\graphicspath{{img/},{intro/img},{top/img},{tvt/img}} +\usepackage{caption} % subfigures/captionof +\usepackage{subcaption} +\usepackage{rotating} +\newcommand{\orcid}[1]{\href{https://orcid.org/#1}{\hspace{1mm}\includegraphics[width=1em]{orcid}\hspace{2mm} https://orcid.org/#1}} +\usepackage{tikz} + +% Index +%\usepackage{makeidx} +%\makeindex% Enable the index + +% Custom enumerations +\usepackage[inline,shortlabels]{enumitem} +\setlist{noitemsep} +\setlist[description]{leftmargin=\parindent} + % Hyperlinks and metadata - \usepackage[hyphens]{url} +\usepackage[hyphens]{url} \usepackage[pdflang={en-GB},pagebackref,breaklinks]{hyperref} % hyperlinks \usepackage{xr} % hyperlinks \renewcommand*{\backref}[1]{} @@ -321,15 +338,6 @@ \def\MakeUppercase#1{}% } -% Index -%\usepackage{makeidx} -%\makeindex% Enable the index - -% Custom enumerations -\usepackage[inline,shortlabels]{enumitem} -\setlist{noitemsep} -\setlist[description]{leftmargin=\parindent} - % Initialize the glossaries \makeglossaries% \input{glossaries}