From 4bfbbf1bac1fe3765fae3d27c4e0eaa7d66a758e Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 21 Feb 2024 09:47:56 +0100 Subject: move LaTeX templates to subdir _templates/ --- _report.yml | 2 +- _templates/title.tex | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ title.tex | 71 ---------------------------------------------------- 3 files changed, 72 insertions(+), 72 deletions(-) create mode 100644 _templates/title.tex delete mode 100644 title.tex diff --git a/_report.yml b/_report.yml index 490ce6b..391f970 100644 --- a/_report.yml +++ b/_report.yml @@ -12,7 +12,7 @@ format: csquotes: true papersize: a4 template-partials: - - ../title.tex + - ../_templates/title.tex include-in-header: # recalculate page margins, since mainfont was set after documentclass diff --git a/_templates/title.tex b/_templates/title.tex new file mode 100644 index 0000000..8acfd6d --- /dev/null +++ b/_templates/title.tex @@ -0,0 +1,71 @@ +$if(title)$ +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} +$endif$ +$if(subtitle)$ +$if(beamer)$ +$else$ +\usepackage{etoolbox} +\makeatletter +\providecommand{\subtitle}[1]{% add subtitle to \maketitle + \apptocmd{\@title}{\par {\large #1 \par}}{}{} +} +\makeatother +$endif$ +\subtitle{$subtitle$} +$endif$ +\usepackage{authblk,academicons} +%\renewcommand*{\Authand}{ og } +%\renewcommand*{\Authands}{ og } +\renewcommand*{\Authsep}{\authorcr} +\renewcommand*{\Authand}{\authorcr} +\renewcommand*{\Authands}{\newline} %%new line after each author +\newcommand*{\orcid}[1]{\href{https://orcid.org/#1}{\textcolor[HTML]{A6CE39}{\aiOrcid}}} +\newcommand*{\rorid}[1]{\href{https://ror.org/#1}{\aiROR}} +$for(by-author)$ +$if(it.attributes.equal-contributor)$% %% TODO: instead check lack of by-author.roles.supervisor +\author[$for(it.affiliations)$$it.number$$endfor$$if(it.attributes.equal-contributor)$,∗$endif$$if(it.attributes.corresponding)$,†$endif$]{% + $it.name.literal$% + $if(it.orcid)$% + \,\orcid{$it.orcid$}% + $endif$% +} +$else$ %% FIXME: instead skip and append after author block +\author[$for(it.affiliations)$$it.number$$endfor$$if(it.attributes.equal-contributor)$,∗$endif$$if(it.attributes.corresponding)$,†$endif$]{% + \newline + Vejleder: + $it.name.literal$% + $if(it.orcid)$% + \,\orcid{$it.orcid$}% + $endif$% +} +$endif$ +$endfor$ +$for(by-affiliation)$ +\affil[$it.number$]{% + $it.name$% + $if(it.department)$% + {,}$it.department$% + $endif$% + $if(it.ror)$% + \,\rorid{$it.ror$}% + $endif$% +} +$endfor$ +\affil[∗]{Disse forfattere bidrog ligeværdigt til dette arbejde.} +$for(by-author)$ +$if(it.attributes.corresponding)$% %% TODO: somehow set a flag to ensure printing only once +\affil[†]{Korresponderende forfatter.} +$endif$ +$endfor$ +\date{$date$} +$if(beamer)$ +$if(institute)$ +\institute{$for(institute)$$institute$$sep$ \and $endfor$} +$endif$ +$if(titlegraphic)$ +\titlegraphic{\includegraphics{$titlegraphic$}} +$endif$ +$if(logo)$ +\logo{\includegraphics{$logo$}} +$endif$ +$endif$ \ No newline at end of file diff --git a/title.tex b/title.tex deleted file mode 100644 index 8acfd6d..0000000 --- a/title.tex +++ /dev/null @@ -1,71 +0,0 @@ -$if(title)$ -\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} -$endif$ -$if(subtitle)$ -$if(beamer)$ -$else$ -\usepackage{etoolbox} -\makeatletter -\providecommand{\subtitle}[1]{% add subtitle to \maketitle - \apptocmd{\@title}{\par {\large #1 \par}}{}{} -} -\makeatother -$endif$ -\subtitle{$subtitle$} -$endif$ -\usepackage{authblk,academicons} -%\renewcommand*{\Authand}{ og } -%\renewcommand*{\Authands}{ og } -\renewcommand*{\Authsep}{\authorcr} -\renewcommand*{\Authand}{\authorcr} -\renewcommand*{\Authands}{\newline} %%new line after each author -\newcommand*{\orcid}[1]{\href{https://orcid.org/#1}{\textcolor[HTML]{A6CE39}{\aiOrcid}}} -\newcommand*{\rorid}[1]{\href{https://ror.org/#1}{\aiROR}} -$for(by-author)$ -$if(it.attributes.equal-contributor)$% %% TODO: instead check lack of by-author.roles.supervisor -\author[$for(it.affiliations)$$it.number$$endfor$$if(it.attributes.equal-contributor)$,∗$endif$$if(it.attributes.corresponding)$,†$endif$]{% - $it.name.literal$% - $if(it.orcid)$% - \,\orcid{$it.orcid$}% - $endif$% -} -$else$ %% FIXME: instead skip and append after author block -\author[$for(it.affiliations)$$it.number$$endfor$$if(it.attributes.equal-contributor)$,∗$endif$$if(it.attributes.corresponding)$,†$endif$]{% - \newline - Vejleder: - $it.name.literal$% - $if(it.orcid)$% - \,\orcid{$it.orcid$}% - $endif$% -} -$endif$ -$endfor$ -$for(by-affiliation)$ -\affil[$it.number$]{% - $it.name$% - $if(it.department)$% - {,}$it.department$% - $endif$% - $if(it.ror)$% - \,\rorid{$it.ror$}% - $endif$% -} -$endfor$ -\affil[∗]{Disse forfattere bidrog ligeværdigt til dette arbejde.} -$for(by-author)$ -$if(it.attributes.corresponding)$% %% TODO: somehow set a flag to ensure printing only once -\affil[†]{Korresponderende forfatter.} -$endif$ -$endfor$ -\date{$date$} -$if(beamer)$ -$if(institute)$ -\institute{$for(institute)$$institute$$sep$ \and $endfor$} -$endif$ -$if(titlegraphic)$ -\titlegraphic{\includegraphics{$titlegraphic$}} -$endif$ -$if(logo)$ -\logo{\includegraphics{$logo$}} -$endif$ -$endif$ \ No newline at end of file -- cgit v1.2.3