diff --git a/handin/handin.md b/handin/handin.md index 98d4840..666ae9a 100644 --- a/handin/handin.md +++ b/handin/handin.md @@ -1,27 +1,73 @@ --- -course: -title: -subtitle: -author_name: -author_group: -author_id: -lang: danish - +course: Lorem +title: Ipsum +subtitle: Dolor +author: Sit +lang: english # Settings -mainfont: Linux Libertine -# mainfont: Iowan Old Style -#mainfont: Times New Roman -#altfont: Helvetica Neue -altfont: Linux Biolinum -#monofont: Courrier -monofont: DejaVu Sans Mono -fontsize: 10pt -geometry: a4paper, left=20mm, right=20mm, top=30mm, bottom=30mm -parskip: 0.6em -parindent: 0em -multicol: true -columns: 2 -columnsep: 0.8cm -# customdate: YYYY-MM-DD ---- +classoptions: a4paper,article,onecolumn,10pt +## XeTeX +mainfont: Linux Libertine +altfont: Linux Biolinum +monofont: DejaVu Sans Mono +# customdate: YYYY-MM-DD +... +# Lorem ipsum + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc erat nibh, +molestie id purus bibendum, scelerisque sodales erat. Vivamus venenatis massa +vel justo vestibulum, quis scelerisque neque varius. Nam neque dui, maximus eget +vulputate vitae, elementum a nisi. Etiam sagittis tincidunt quam, ut luctus +purus. Pellentesque habitant morbi tristique senectus et netus et malesuada +fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et +ultrices posuere cubilia Curae; Aenean feugiat blandit est, pharetra efficitur +mauris congue vel. Phasellus euismod nibh ut odio consequat, non faucibus risus +elementum. Vivamus mollis magna vitae libero viverra, sed interdum massa +mollis. Donec et nibh arcu. Nam velit felis, pellentesque in turpis sed, +condimentum faucibus arcu. Duis facilisis maximus lectus ac condimentum. Sed non +massa nec nunc suscipit facilisis. In malesuada magna accumsan elit lacinia +sagittis. Aenean sit amet eros rutrum, volutpat leo et, fermentum dolor. + +## Duis Henderit + +Duis hendrerit, velit ut dapibus sodales, diam dolor mattis nunc, ut sodales +justo lacus sit amet massa. Etiam lobortis tincidunt tortor at +consectetur. Aliquam auctor, elit ut fringilla accumsan, neque ligula egestas +lacus, eget vestibulum dui augue id ante. Ut nec arcu viverra purus vestibulum +gravida a a leo. Ut commodo magna semper nunc aliquam volutpat. Nulla a risus ut +nunc dignissim gravida. Vivamus bibendum commodo sagittis. Aliquam egestas +fermentum fringilla. Etiam ornare porttitor elementum. + +Vestibulum convallis aliquet malesuada. Integer erat augue, ultrices vitae +sagittis et, venenatis sit amet libero. Pellentesque eu ligula in augue pretium +lobortis vitae in ex. Nam dictum orci quis quam cursus, ut posuere magna +congue. Quisque pellentesque neque at mi facilisis, et vehicula mi +commodo. Etiam eu sollicitudin dui, at consequat lorem. Integer scelerisque id +leo ac fermentum. Quisque porttitor lacus in mauris ornare, sit amet dictum enim +suscipit. Sed quis metus lacinia, efficitur arcu a, mollis lacus. Nunc sed erat +eu metus malesuada ultrices vitae vel nisi. Maecenas congue turpis quam, eget +malesuada metus faucibus non. Praesent blandit egestas libero nec dictum. In +ullamcorper quam turpis, ac pulvinar nulla dictum fermentum. Sed nec vehicula +libero, at pulvinar enim. Sed arcu felis, posuere at nisi tincidunt, ornare +pulvinar velit. + +Nunc rhoncus ex quis condimentum finibus. Fusce venenatis risus in feugiat +ultricies. Donec egestas, massa et commodo faucibus, ex quam ultricies nisl, vel +bibendum urna augue sit amet leo. Proin dictum suscipit lorem, sed condimentum +augue tincidunt a. Nulla eget ante euismod, ornare massa vitae, tristique +tortor. Cras fermentum, mi vitae interdum pretium, tellus libero gravida neque, +at efficitur metus risus ut leo. Pellentesque pharetra tellus nunc, cursus +pellentesque nisi interdum vel. Donec luctus diam turpis, sed ultricies justo +varius at. Sed convallis purus eu dolor imperdiet pulvinar. Curabitur feugiat +suscipit nibh. Sed tempor eget sem a condimentum. Sed sit amet mattis ante, +vitae accumsan lectus. Sed eget magna eros. + +Quisque pellentesque sodales velit at mollis. Vestibulum tristique dolor tellus, +id pretium massa semper a. Pellentesque mattis pulvinar accumsan. Morbi sodales +faucibus lacinia. Vivamus egestas ligula non neque hendrerit, ut lacinia orci +efficitur. Curabitur pellentesque mi fermentum ipsum sodales, quis posuere enim +aliquam. Sed consectetur metus mauris, sit amet pharetra quam hendrerit +et. Integer bibendum viverra nunc, in tincidunt orci egestas vitae. Praesent +sollicitudin tincidunt leo quis iaculis. Maecenas sollicitudin dignissim velit a +blandit. diff --git a/handin/template.tex b/handin/template.tex index c291b80..6b89da6 100644 --- a/handin/template.tex +++ b/handin/template.tex @@ -1,65 +1,96 @@ -%!TEX TS-program = xelatex +%!TEX TS-program = pdflatex %!TEX encoding = UTF-8 Unicode -%\documentclass[$fontsize$, a4paper]{article} -\documentclass[$fontsize$, a4paper, headings=small, markcase=upper]{scrartcl} -\usepackage{fontspec} +\documentclass[$classoptions$]{memoir} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{newpxtext,newpxmath} +%\usepackage{palatino} +%\usepackage{eulervm} +%\usepackage{libertine} +%\usepackage[libertine]{newtxmath} +% \usepackage{ebgaramond} + + +% Memoir +%-------------------------------- +\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 +%-------------------------------- +\usepackage[protrusion=true,final]{microtype} % Does this do anything? +\linespread{1.040} + +\usepackage[english]{babel} +\usepackage{listings} % Has to come after babel package + % due to LaTeX being LaTeX… + +% 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} -% KOMASCRIPT +%% ~ornaments~ %% +%\usepackage{pgfornament} + +%% SI Units and proper alignment %% +%% in tables %% +%\usepackage{siunitx} +%\sisetup{detect-all} + +% Paragraph spacing %-------------------------------- -\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} -\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} -\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} -\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} -\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} -\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} -\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} -\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} -\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} -\makeatletter +%% \setlength{\parskip}{1em} +%% \setlength{\parindent}{0pt} -% LAYOUT -%-------------------------------- -\usepackage{geometry} -\geometry{$geometry$} - -% Trim excessive whitespace before lists -\usepackage{enumitem} -\setlist{nolistsep} - -% 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} - -% Multi-column support -$if(multicol)$ -\usepackage{multicol} -\setlength{\columnsep}{$columnsep$} -$endif$ - -% Header and footer -\usepackage[headsepline,automark]{scrlayer-scrpage} -\pagestyle{scrheadings} -\ihead{$course$ - $title$$if(subtitle)$ - $subtitle$$endif$} -\ohead[]{\headmark} -\chead{} -%\renewcommand*{\titlepagestyle}{scrheadings} - -% Figure floats +% Fix figure/table floats in place +%---------------------------------- \usepackage{float} \let\origfigure=\figure \let\endorigfigure=\endfigure @@ -68,56 +99,37 @@ $endif$ }{% \endorigfigure } - -% LANGUAGE -%-------------------------------- -$if(lang)$ -\usepackage{polyglossia} -\setmainlanguage{$lang$} -$endif$ - -% TYPOGRAPHY -%-------------------------------- -\usepackage{xunicode} -\usepackage{xltxtra} -\usepackage[protrusion=true,final]{microtype} - -% converts LaTeX specials (quotes, dashes etc.) to Unicode -\defaultfontfeatures{Mapping=tex-text} -%\setromanfont [Ligatures={Common}, Numbers={OldStyle}]{$mainfont$} -\setromanfont[Ligatures={Common}]{$mainfont$} -\setsansfont[Scale=1]{$altfont$} -\setmonofont[Scale=0.8]{$monofont$} - -% Set paragraph break -\setlength{\parskip}{$parskip$} -\setlength{\parindent}{$parindent$} - -% Custom ampersand -\newcommand{\amper}{{\fontspec[Scale=.95]{$mainfont$}\selectfont\itshape\&}} - -% Upper-case section headings -\renewcommand\sectionlinesformat[4]{% - \@hangfrom{\hskip#2#3}{\MakeUppercase{#4}}% +\let\origtable=\table +\let\endorigtable=\endtable +\renewenvironment{table}[1][]{% + \origtable[H] +}{% + \endorigtable } -% Remove numbers from section headings -\renewcommand*{\sectionformat}{} -\renewcommand*{\subsectionformat}{} -\renewcommand*{\subsubsectionformat}{} -% Make section headings slightly bigger than subsection headings -\addtokomafont{section}{\large} +% Trim excessive whitespace before lists +%---------------------------------------- +\usepackage{enumitem} +\setlist{nolistsep} -% Center sectionheads -%\let\raggedsection\centering - -$if(mainfont)$ - \setmainfont{$mainfont$} -$endif$ -$if(altfont)$ - \setsansfont{$altfont$} -$endif$ +% 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} % Command required by how Pandoc handles the list conversion \providecommand{\tightlist}{ @@ -125,7 +137,7 @@ $endif$ % PDF SETUP %-------------------------------- -\usepackage[xetex, bookmarks, colorlinks, breaklinks]{hyperref} +\usepackage[bookmarks, colorlinks, breaklinks]{hyperref} \hypersetup { pdfauthor={$author$}, @@ -141,36 +153,32 @@ $endif$ %citecolor=[rgb]{0.117,0.682,0.858} } -% To display custom date in the example +% Display custom date +%--------------------------------------- $if(customdate)$ \usepackage[$lang$]{datetime2} \DTMsavedate{customdate}{$customdate$} $endif$ + +% Title and author +%-------------------------------- +\title{$course$\\$title$\\$subtitle$} +\author{\vspace{-1ex} + $for(author)$$author$$sep$\and $endfor$ +} +\date{\vspace{-1ex} + \today +} + + % DOCUMENT %-------------------------------- + \begin{document} - -\subject{\vspace{-6ex}$course$\vspace{-1.5ex}} -\title{$title$} -$if(subtitle)$ -\subtitle{$subtitle$} -$endif$ -\author{\vspace{-1ex}$author_name$, $author_group$, $author_id$} -\date{\vspace{-1ex} -\today} -%\begin{spacing}{1} -%\maketitle \end{spacing} +\mainmatter \maketitle -$if(multicol)$ -\begin{multicols}{$columns$} -$endif$ - $body$ -$if(multicol)$ -\end{multicols} -$endif$ - \end{document}