transfer from old repo

This commit is contained in:
Andreas Gammelgaard Damsbo 2026-08-19 09:27:27 +02:00
commit 277e2b8cf3
No known key found for this signature in database
1111 changed files with 83736 additions and 0 deletions

View file

@ -0,0 +1,22 @@
\IfFileExists{Images/bookcover.pdf}{\includepdf{Images/bookcover.pdf}\clearpage}{}
$if(has-frontmatter)$
\frontmatter
$endif$
$if(title)$
$if(beamer)$
\frame{\titlepage}
$else$
\maketitle
\pagenumbering{gobble}
\IfFileExists{01-Front/copyright.tex}{\input{01-Front/copyright.tex}\clearpage}{}
\IfFileExists{01-Front/dedication.tex}{\input{01-Front/dedication.tex}\clearpage}{}
\IfFileExists{01-Front/epigraph.tex}{\input{01-Front/epigraph.tex}\clearpage}{}
$endif$
$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$
$endif$
\pagenumbering{arabic}

View file

@ -0,0 +1,108 @@
% DEFINITIONS
% The fancyvrb package lets us customize the formatting of verbatim
% environments. We use a slightly smaller font.
\usepackage{fancyvrb}
\fvset{fontsize=\normalsize}
%%
% Prints argument within hanging parentheses (i.e., parentheses that take
% up no horizontal space). Useful in tabular environments.
\newcommand{\hangp}[1]{\makebox[0pt][r]{(}#1\makebox[0pt][l]{)}}
%%
% Prints an asterisk that takes up no horizontal space.
% Useful in tabular environments.
\newcommand{\hangstar}{\makebox[0pt][l]{*}}
%%
% Prints a trailing space in a smart way.
\usepackage{xspace}
% Prints the month name (e.g., January) and the year (e.g., 2008)
\newcommand{\monthyear}{%
\ifcase\month\or January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or
December\fi\space\number\year
}
% Prints an epigraph and speaker in sans serif, all-caps type.
\newcommand{\epigraph}[2]{%
\begin{fullwidth}
\begin{flushright}
\sffamily\fontsize{8}{10}\selectfont
\sffamily\footnotesize
\begin{doublespace}
\vspace{-8cm}\noindent\allcaps{#1}\\% epigraph
\noindent\allcaps{#2}\\% author
\end{doublespace}
\vspace{5.1cm}
\end{flushright}
\end{fullwidth}
\normalfont
}
\newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}
% insert 4cm before quote
\renewenvironment{quote}{
\list{}{\leftmargin=3.5cm\topsep=0pt}
\item\relax\small\itshape
}
{\endlist}
% change chapter formatting
\titlespacing*{\chapter}{0pt}{5cm}{1cm}
% \titlespacing*{\section}{0pt}{.6em}{.3em}
% \titlespacing*{\subsection}{0pt}{.4em}{.2em}
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
% Change Figure Caption in the Margin size
% \renewenvironment{@tufte@margin@float}[2][-1.2ex]%
% {\FloatBarrier% process all floats before this point so the figure/table numbers stay in order.
% \begin{lrbox}{\@tufte@margin@floatbox}%
% \begin{minipage}{\marginparwidth}%
% \@tufte@caption@font\footnotesize% <-- Add fontnotesize
% \def\@captype{#2}%
% \hbox{}\vspace*{#1}%
% \@tufte@caption@justification%
% \@tufte@margin@par%
% \noindent\normalsize%<-- restored size
% }
% {\end{minipage}%
% \end{lrbox}%
% \marginpar{\usebox{\@tufte@margin@floatbox}}%
% }
% \renewcommand\footnotesize{%
% \@setfontsize\footnotesize\@viiipt{9}%
% \abovedisplayskip 5\p@ \@plus2\p@ \@minus4\p@
% \abovedisplayshortskip \z@ \@plus\p@
% \belowdisplayshortskip 2.8\p@ \@plus\p@ \@minus2\p@
% \def\@listi{\leftmargin\leftmargini
% \topsep 2.5\p@ \@plus\p@ \@minus\p@
% \parsep 2\p@ \@plus\p@ \@minus\p@
% \itemsep \parsep}%
% \belowdisplayskip \abovedisplayskip
% }
% % Define Tuftian float styles (with the caption in the margin)
% \newcommand{\floatc@tufteplain}[2]{%
% \begin{lrbox}{\@tufte@caption@box}%
% \begin{minipage}[\floatalignment]{\marginparwidth}\hbox{}%
% \footnotesize\@tufte@caption@font{\@fs@cfont #1:} #2\par\normalsize%
% \end{minipage}%
% \end{lrbox}%
% \smash{\hspace{\@tufte@caption@fill}\usebox{\@tufte@caption@box}}%
% }

View file

@ -0,0 +1,77 @@
% FIX Marginnote duplication
\usepackage{savesym}
\savesymbol{marginfigure}
\savesymbol{marginnote}
\savesymbol{sidenote}
%%%%%%%
% FIX Makeuppercase error
% FIX Font clash Math error
% See https://tex.stackexchange.com/q/202142/157312
%
\renewcommand{\textls}[2][5]{%
\begingroup\addfontfeatures{LetterSpace=#1}#2\endgroup
}
\renewcommand{\allcapsspacing}[1]{\textls[15]{#1}}
\renewcommand{\smallcapsspacing}[1]{\textls[10]{#1}}
\renewcommand{\allcaps}[1]{\textls[15]{\MakeTextUppercase{#1}}}
\renewcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}}
\renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}
\PassOptionsToPackage{no-math}{fontspec}
% \usepackage[mathlf, minionint,footnotefigures, frenchmath]{MinionPro}
% \setmainfont{$$}
% \setsansfont{TeX Gyre Heros}[Scale=MatchUppercase]
\ExplSyntaxOn
\int_new:N \l_mathcode_minus_int
\int_new:N \l_mathcode_equal_int
\exp_args:Nx \AtBeginDocument {
\exp_not:n {
\int_set:Nn \l_mathcode_minus_int { \XeTeXmathcodenum `\- }
\int_set:Nn \l_mathcode_equal_int { \XeTeXmathcodenum `\= }
}
\mathcode \int_eval:n { `\- } = \number \mathcode `\- \scan_stop:
\mathcode \int_eval:n { `\= } = \number \mathcode `\= \scan_stop:
}
\AtBeginDocument {
\XeTeXmathcodenum `\- = \l_mathcode_minus_int
\XeTeXmathcodenum `\= = \l_mathcode_equal_int
}
\ExplSyntaxOff
\usepackage[italic]{mathastext}
% \setromanfont{TeX Gyre Termes}
%%%%%%%
\usepackage{pdfpages} % for cover page
\graphicspath{{Images/}} % Make Images/ default figure path
\setlength{\parindent}{0pt}%
\setlength{\RaggedRightParindent}{0pt}
\setlength{\JustifyingParindent}{0pt}%
\setlength{\parskip}{\baselineskip}
%%
% Produces a full title page
\renewcommand{\maketitlepage}[0]{%
\cleardoublepage%
{%
\sffamily%
\begin{fullwidth}%
\fontsize{12}{14}\selectfont\par\noindent\textcolor{darkgray}{\allcaps{\thanklessauthor}}%
\vspace{12.5pc}%
\fontsize{20}{28}\selectfont\par\noindent\textcolor{darkgray}{\allcaps{\thanklesstitle}}%
\vfill%
\fontsize{10}{12}\selectfont\par\noindent\allcaps{\thanklesspublisher}%
\end{fullwidth}%
}
\thispagestyle{empty}%
\clearpage%
}

View file

@ -0,0 +1,17 @@
% TITLE PAGE
$if(book.title)$
\title[$book.title-short$]{$title$}
$endif$
$if(book.author)$
\author{$author$}
$endif$
$if(book.publisher)$
\publisher{$book.publisher$}
$endif$