rewrote handin template
This commit is contained in:
parent
d8519819e4
commit
359cf80f0c
|
@ -1,27 +1,73 @@
|
||||||
---
|
---
|
||||||
course:
|
course: Lorem
|
||||||
title:
|
title: Ipsum
|
||||||
subtitle:
|
subtitle: Dolor
|
||||||
author_name:
|
author: Sit
|
||||||
author_group:
|
lang: english
|
||||||
author_id:
|
|
||||||
lang: danish
|
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
mainfont: Linux Libertine
|
classoptions: a4paper,article,onecolumn,10pt
|
||||||
# mainfont: Iowan Old Style
|
## XeTeX
|
||||||
#mainfont: Times New Roman
|
mainfont: Linux Libertine
|
||||||
#altfont: Helvetica Neue
|
altfont: Linux Biolinum
|
||||||
altfont: Linux Biolinum
|
monofont: DejaVu Sans Mono
|
||||||
#monofont: Courrier
|
# customdate: YYYY-MM-DD
|
||||||
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
|
|
||||||
---
|
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
|
@ -1,65 +1,96 @@
|
||||||
%!TEX TS-program = xelatex
|
%!TEX TS-program = pdflatex
|
||||||
%!TEX encoding = UTF-8 Unicode
|
%!TEX encoding = UTF-8 Unicode
|
||||||
|
|
||||||
%\documentclass[$fontsize$, a4paper]{article}
|
\documentclass[$classoptions$]{memoir}
|
||||||
\documentclass[$fontsize$, a4paper, headings=small, markcase=upper]{scrartcl}
|
\usepackage[T1]{fontenc}
|
||||||
\usepackage{fontspec}
|
\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}
|
\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}
|
%% \setlength{\parskip}{1em}
|
||||||
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
|
%% \setlength{\parindent}{0pt}
|
||||||
\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
|
|
||||||
|
|
||||||
% LAYOUT
|
% Fix figure/table floats in place
|
||||||
%--------------------------------
|
%----------------------------------
|
||||||
\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
|
|
||||||
\usepackage{float}
|
\usepackage{float}
|
||||||
\let\origfigure=\figure
|
\let\origfigure=\figure
|
||||||
\let\endorigfigure=\endfigure
|
\let\endorigfigure=\endfigure
|
||||||
|
@ -68,56 +99,37 @@ $endif$
|
||||||
}{%
|
}{%
|
||||||
\endorigfigure
|
\endorigfigure
|
||||||
}
|
}
|
||||||
|
\let\origtable=\table
|
||||||
% LANGUAGE
|
\let\endorigtable=\endtable
|
||||||
%--------------------------------
|
\renewenvironment{table}[1][]{%
|
||||||
$if(lang)$
|
\origtable[H]
|
||||||
\usepackage{polyglossia}
|
}{%
|
||||||
\setmainlanguage{$lang$}
|
\endorigtable
|
||||||
$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}}%
|
|
||||||
}
|
}
|
||||||
|
|
||||||
% Remove numbers from section headings
|
|
||||||
\renewcommand*{\sectionformat}{}
|
|
||||||
\renewcommand*{\subsectionformat}{}
|
|
||||||
\renewcommand*{\subsubsectionformat}{}
|
|
||||||
|
|
||||||
% Make section headings slightly bigger than subsection headings
|
% Trim excessive whitespace before lists
|
||||||
\addtokomafont{section}{\large}
|
%----------------------------------------
|
||||||
|
\usepackage{enumitem}
|
||||||
|
\setlist{nolistsep}
|
||||||
|
|
||||||
% Center sectionheads
|
% Spacing after section headers
|
||||||
%\let\raggedsection\centering
|
%-------------------------------
|
||||||
|
%% \RedeclareSectionCommand[
|
||||||
$if(mainfont)$
|
%% beforeskip=-\baselineskip,
|
||||||
\setmainfont{$mainfont$}
|
%% afterskip=.1\baselineskip]{section}
|
||||||
$endif$
|
%% \RedeclareSectionCommand[
|
||||||
$if(altfont)$
|
%% beforeskip=-.75\baselineskip,
|
||||||
\setsansfont{$altfont$}
|
%% afterskip=.1\baselineskip]{subsection}
|
||||||
$endif$
|
%% \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
|
% Command required by how Pandoc handles the list conversion
|
||||||
\providecommand{\tightlist}{
|
\providecommand{\tightlist}{
|
||||||
|
@ -125,7 +137,7 @@ $endif$
|
||||||
|
|
||||||
% PDF SETUP
|
% PDF SETUP
|
||||||
%--------------------------------
|
%--------------------------------
|
||||||
\usepackage[xetex, bookmarks, colorlinks, breaklinks]{hyperref}
|
\usepackage[bookmarks, colorlinks, breaklinks]{hyperref}
|
||||||
\hypersetup
|
\hypersetup
|
||||||
{
|
{
|
||||||
pdfauthor={$author$},
|
pdfauthor={$author$},
|
||||||
|
@ -141,36 +153,32 @@ $endif$
|
||||||
%citecolor=[rgb]{0.117,0.682,0.858}
|
%citecolor=[rgb]{0.117,0.682,0.858}
|
||||||
}
|
}
|
||||||
|
|
||||||
% To display custom date in the example
|
% Display custom date
|
||||||
|
%---------------------------------------
|
||||||
$if(customdate)$
|
$if(customdate)$
|
||||||
\usepackage[$lang$]{datetime2}
|
\usepackage[$lang$]{datetime2}
|
||||||
\DTMsavedate{customdate}{$customdate$}
|
\DTMsavedate{customdate}{$customdate$}
|
||||||
$endif$
|
$endif$
|
||||||
|
|
||||||
|
|
||||||
|
% Title and author
|
||||||
|
%--------------------------------
|
||||||
|
\title{$course$\\$title$\\$subtitle$}
|
||||||
|
\author{\vspace{-1ex}
|
||||||
|
$for(author)$$author$$sep$\and $endfor$
|
||||||
|
}
|
||||||
|
\date{\vspace{-1ex}
|
||||||
|
\today
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
% DOCUMENT
|
% DOCUMENT
|
||||||
%--------------------------------
|
%--------------------------------
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
\mainmatter
|
||||||
\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}
|
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
$if(multicol)$
|
|
||||||
\begin{multicols}{$columns$}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
$body$
|
$body$
|
||||||
|
|
||||||
$if(multicol)$
|
|
||||||
\end{multicols}
|
|
||||||
$endif$
|
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user