pandoc-templates/handin/template.tex

185 lines
4.3 KiB
TeX
Raw Permalink Normal View History

2017-10-24 00:16:03 +00:00
%!TEX TS-program = pdflatex
2016-11-10 14:13:26 +00:00
%!TEX encoding = UTF-8 Unicode
2017-10-24 00:16:03 +00:00
\documentclass[$classoptions$]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{newpxtext,newpxmath}
%\usepackage{palatino}
%\usepackage{eulervm}
%\usepackage{libertine}
%\usepackage[libertine]{newtxmath}
% \usepackage{ebgaramond}
2016-11-10 14:13:26 +00:00
2017-10-24 00:16:03 +00:00
% Memoir
2016-11-10 16:29:44 +00:00
%--------------------------------
2017-10-24 00:16:03 +00:00
\pagestyle{ruled}
% \renewcommand*{\chaptitlefont}{\scshape}
\setsecnumdepth{subsection}
\chapterstyle{article}
%% Sans-serif overskrifter
%% % til kapiteloverskrifter
%% \renewcommand\chapnamefont{\Large\bfseries\sffamily}
%% \renewcommand\chapnumfont{\chapnamefont}
%% \renewcommand\chaptitlefont{\Large\bfseries\sffamily\raggedright}
%% % til afsnitsoverskrifter
%% \setsecheadstyle{\Large\bfseries\sffamily\raggedright}
%% \setsubsecheadstyle{\large\bfseries\sffamily\raggedright}
%% \setsubsubsecheadstyle{\normalsize\bfseries\sffamily\raggedright}
\raggedbottomsectiontrue
% Typesetting
2016-11-10 14:13:26 +00:00
%--------------------------------
2017-10-24 00:16:03 +00:00
\usepackage[protrusion=true,final]{microtype} % Does this do anything?
\linespread{1.040}
2016-11-10 14:13:26 +00:00
2017-10-24 00:16:03 +00:00
\usepackage[english]{babel}
\usepackage{listings} % Has to come after babel package
% due to LaTeX being LaTeX…
2016-11-10 14:13:26 +00:00
2017-10-24 00:16:03 +00:00
% XeTeX
%--------------------------------
%% \usepackage{xunicode}
%% \usepackage{xltxtra}
%% \usepackage{fontspec}
%% \setmainfont[Mapping=tex-text]{TeX Gyre Pagella}
%%
%% $if(lang)$
%% \usepackage{polyglossia}
%% \setmainlanguage{$lang$}
%% $endif$
%%
%% % converts LaTeX specials (quotes, dashes etc.) to Unicode
%% \defaultfontfeatures{Mapping=tex-text}
%% \setromanfont[Ligatures={Common}]{$mainfont$}
%% \setsansfont[Scale=1]{$altfont$}
%% \setmonofont[Scale=0.8]{$monofont$}
%%
%% % Custom ampersand
%% \newcommand{\amper}{{\fontspec[Scale=.95]{$mainfont$}\selectfont\itshape\&}}
%%
%% $if(mainfont)$
%% \setmainfont{$mainfont$}
%% $endif$
%% $if(altfont)$
%% \setsansfont{$altfont$}
%% $endif$
% Packages
%--------------------------------
\usepackage{lastpage} % What does this do?
\usepackage{amsmath}
2016-11-10 16:29:44 +00:00
2017-10-24 00:16:03 +00:00
%% ~ornaments~ %%
%\usepackage{pgfornament}
%% SI Units and proper alignment %%
%% in tables %%
%\usepackage{siunitx}
%\sisetup{detect-all}
% Paragraph spacing
%--------------------------------
%% \setlength{\parskip}{1em}
%% \setlength{\parindent}{0pt}
2016-11-10 16:29:44 +00:00
2017-10-24 00:16:03 +00:00
% Fix figure/table floats in place
%----------------------------------
2016-11-23 21:48:44 +00:00
\usepackage{float}
\let\origfigure=\figure
\let\endorigfigure=\endfigure
\renewenvironment{figure}[1][]{%
\origfigure[H]
}{%
\endorigfigure
}
2017-10-24 00:16:03 +00:00
\let\origtable=\table
\let\endorigtable=\endtable
\renewenvironment{table}[1][]{%
\origtable[H]
}{%
\endorigtable
2016-11-10 16:29:44 +00:00
}
2016-11-23 21:48:44 +00:00
2017-10-24 00:16:03 +00:00
% Trim excessive whitespace before lists
%----------------------------------------
\usepackage{enumitem}
\setlist{nolistsep}
2016-11-23 21:48:44 +00:00
2017-10-24 00:16:03 +00:00
% Spacing after section headers
%-------------------------------
%% \RedeclareSectionCommand[
%% beforeskip=-\baselineskip,
%% afterskip=.1\baselineskip]{section}
%% \RedeclareSectionCommand[
%% beforeskip=-.75\baselineskip,
%% afterskip=.1\baselineskip]{subsection}
%% \RedeclareSectionCommand[
%% beforeskip=-.5\baselineskip,
%% afterskip=.1\baselineskip]{subsubsection}
%% \RedeclareSectionCommand[
%% beforeskip=.5\baselineskip,
%% afterskip=-1em]{paragraph}
%% \RedeclareSectionCommand[
%% beforeskip=-.5\baselineskip,
%% afterskip=-1em]{subparagraph}
2016-11-10 14:13:26 +00:00
% Command required by how Pandoc handles the list conversion
\providecommand{\tightlist}{
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
% PDF SETUP
%--------------------------------
2017-10-24 00:16:03 +00:00
\usepackage[bookmarks, colorlinks, breaklinks]{hyperref}
2016-11-10 14:13:26 +00:00
\hypersetup
{
pdfauthor={$author$},
pdfsubject={$course$},
2016-11-10 16:29:44 +00:00
pdftitle={$course$ - $title$},
2016-11-10 14:13:26 +00:00
colorlinks,breaklinks,
filecolor=black,
2016-11-23 21:48:44 +00:00
urlcolor=[rgb]{0,0,0.7},
linkcolor=[rgb]{0,0,0.7},
citecolor=[rgb]{0,0,0.7}
%urlcolor=[rgb]{0.117,0.682,0.858},
%linkcolor=[rgb]{0.117,0.682,0.858},
%citecolor=[rgb]{0.117,0.682,0.858}
2016-11-10 14:13:26 +00:00
}
2017-10-24 00:16:03 +00:00
% Display custom date
%---------------------------------------
2016-11-10 14:13:26 +00:00
$if(customdate)$
\usepackage[$lang$]{datetime2}
\DTMsavedate{customdate}{$customdate$}
$endif$
2017-10-24 00:16:03 +00:00
% Title and author
%--------------------------------
2017-10-24 13:04:53 +00:00
\title{$course$\\$title$$if(subtitle)$\\$subtitle$$endif$}
2017-10-24 00:16:03 +00:00
\author{\vspace{-1ex}
$for(author)$$author$$sep$\and $endfor$
}
\date{\vspace{-1ex}
\today
}
2016-11-10 14:13:26 +00:00
% DOCUMENT
%--------------------------------
2017-10-24 00:16:03 +00:00
\begin{document}
\mainmatter
2016-11-10 14:13:26 +00:00
\maketitle
$body$
\end{document}