improved handin template
This commit is contained in:
parent
3a951233d9
commit
ffb4ba12ed
|
@ -1,26 +1,27 @@
|
||||||
---
|
---
|
||||||
course: Concurrency
|
course:
|
||||||
title: Threaded Prime Number Counting
|
title:
|
||||||
author_name: Christoffer Müller Madsen
|
subtitle:
|
||||||
author_group: DA3
|
author_name:
|
||||||
author_id: 201506991
|
author_group:
|
||||||
|
author_id:
|
||||||
|
lang: danish
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
# mainfont: Linux Libertine
|
mainfont: Linux Libertine
|
||||||
# mainfont: Iowan Old Style
|
# mainfont: Iowan Old Style
|
||||||
mainfont: Times New Roman
|
#mainfont: Times New Roman
|
||||||
altfont: Helvetica Neue
|
#altfont: Helvetica Neue
|
||||||
monofont: Courier
|
altfont: Linux Biolinum
|
||||||
lang: english
|
#monofont: Courrier
|
||||||
|
monofont: DejaVu Sans Mono
|
||||||
fontsize: 10pt
|
fontsize: 10pt
|
||||||
geometry: a4paper, left=25mm, right=25mm, top=30mm, bottom=30mm
|
geometry: a4paper, left=20mm, right=20mm, top=30mm, bottom=30mm
|
||||||
parskip: 0.8em
|
parskip: 0.6em
|
||||||
parindent: 0em
|
parindent: 0em
|
||||||
secspacingdiff: 0em
|
|
||||||
multicol: true
|
multicol: true
|
||||||
columns: 2
|
columns: 2
|
||||||
columnsep: 0.8cm
|
columnsep: 0.8cm
|
||||||
# customdate: YYYY-MM-DD
|
# customdate: YYYY-MM-DD
|
||||||
---
|
---
|
||||||
|
|
||||||
Text goes here
|
|
|
@ -1,10 +1,18 @@
|
||||||
TEX = pandoc
|
TEX = pandoc
|
||||||
src = template.tex handin.md
|
texsrc = template.tex handin.md
|
||||||
|
src = output.pdf
|
||||||
FLAGS = --latex-engine=xelatex
|
FLAGS = --latex-engine=xelatex
|
||||||
|
pdfname = $(shell basename $(CURDIR))
|
||||||
|
|
||||||
output.pdf : $(src)
|
package: $(src)
|
||||||
|
mkdir -p output
|
||||||
|
cp $(src) output/
|
||||||
|
mv output/output.pdf output/$(pdfname)
|
||||||
|
|
||||||
|
output.pdf : $(texsrc)
|
||||||
$(TEX) $(filter-out $<,$^ ) -o $@ --template=$< $(FLAGS)
|
$(TEX) $(filter-out $<,$^ ) -o $@ --template=$< $(FLAGS)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean :
|
clean :
|
||||||
rm output.pdf
|
rm output.pdf
|
||||||
|
rm -R output
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
%\documentclass[$fontsize$, a4paper]{article}
|
%\documentclass[$fontsize$, a4paper]{article}
|
||||||
\documentclass[$fontsize$, a4paper, headings=small, markcase=upper]{scrartcl}
|
\documentclass[$fontsize$, a4paper, headings=small, markcase=upper]{scrartcl}
|
||||||
\usepackage{fontspec}
|
\usepackage{fontspec}
|
||||||
|
\usepackage{amsmath}
|
||||||
|
|
||||||
% KOMASCRIPT
|
% KOMASCRIPT
|
||||||
%--------------------------------
|
%--------------------------------
|
||||||
|
@ -53,11 +54,21 @@ $endif$
|
||||||
% Header and footer
|
% Header and footer
|
||||||
\usepackage[headsepline,automark]{scrlayer-scrpage}
|
\usepackage[headsepline,automark]{scrlayer-scrpage}
|
||||||
\pagestyle{scrheadings}
|
\pagestyle{scrheadings}
|
||||||
\ihead{$course$ - $title$}
|
\ihead{$course$ - $title$$if(subtitle)$ - $subtitle$$endif$}
|
||||||
\ohead[]{\headmark}
|
\ohead[]{\headmark}
|
||||||
\chead{}
|
\chead{}
|
||||||
%\renewcommand*{\titlepagestyle}{scrheadings}
|
%\renewcommand*{\titlepagestyle}{scrheadings}
|
||||||
|
|
||||||
|
% Figure floats
|
||||||
|
\usepackage{float}
|
||||||
|
\let\origfigure=\figure
|
||||||
|
\let\endorigfigure=\endfigure
|
||||||
|
\renewenvironment{figure}[1][]{%
|
||||||
|
\origfigure[H]
|
||||||
|
}{%
|
||||||
|
\endorigfigure
|
||||||
|
}
|
||||||
|
|
||||||
% LANGUAGE
|
% LANGUAGE
|
||||||
%--------------------------------
|
%--------------------------------
|
||||||
$if(lang)$
|
$if(lang)$
|
||||||
|
@ -73,8 +84,9 @@ $endif$
|
||||||
|
|
||||||
% converts LaTeX specials (quotes, dashes etc.) to Unicode
|
% converts LaTeX specials (quotes, dashes etc.) to Unicode
|
||||||
\defaultfontfeatures{Mapping=tex-text}
|
\defaultfontfeatures{Mapping=tex-text}
|
||||||
\setromanfont [Ligatures={Common}, Numbers={OldStyle}]{$mainfont$}
|
%\setromanfont [Ligatures={Common}, Numbers={OldStyle}]{$mainfont$}
|
||||||
\setsansfont[Scale=0.9]{$altfont$}
|
\setromanfont[Ligatures={Common}]{$mainfont$}
|
||||||
|
\setsansfont[Scale=1]{$altfont$}
|
||||||
\setmonofont[Scale=0.8]{$monofont$}
|
\setmonofont[Scale=0.8]{$monofont$}
|
||||||
|
|
||||||
% Set paragraph break
|
% Set paragraph break
|
||||||
|
@ -89,6 +101,17 @@ $endif$
|
||||||
\@hangfrom{\hskip#2#3}{\MakeUppercase{#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
|
||||||
|
\addtokomafont{section}{\large}
|
||||||
|
|
||||||
|
% Center sectionheads
|
||||||
|
%\let\raggedsection\centering
|
||||||
|
|
||||||
$if(mainfont)$
|
$if(mainfont)$
|
||||||
\setmainfont{$mainfont$}
|
\setmainfont{$mainfont$}
|
||||||
$endif$
|
$endif$
|
||||||
|
@ -110,10 +133,12 @@ $endif$
|
||||||
pdftitle={$course$ - $title$},
|
pdftitle={$course$ - $title$},
|
||||||
colorlinks,breaklinks,
|
colorlinks,breaklinks,
|
||||||
filecolor=black,
|
filecolor=black,
|
||||||
urlcolor=[rgb]{0.117,0.682,0.858},
|
urlcolor=[rgb]{0,0,0.7},
|
||||||
linkcolor=[rgb]{0.117,0.682,0.858},
|
linkcolor=[rgb]{0,0,0.7},
|
||||||
linkcolor=[rgb]{0.117,0.682,0.858},
|
citecolor=[rgb]{0,0,0.7}
|
||||||
citecolor=[rgb]{0.117,0.682,0.858}
|
%urlcolor=[rgb]{0.117,0.682,0.858},
|
||||||
|
%linkcolor=[rgb]{0.117,0.682,0.858},
|
||||||
|
%citecolor=[rgb]{0.117,0.682,0.858}
|
||||||
}
|
}
|
||||||
|
|
||||||
% To display custom date in the example
|
% To display custom date in the example
|
||||||
|
@ -127,8 +152,11 @@ $endif$
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\subject{\vspace{-6ex}$course$\vspace{-1.5ex}}
|
\subject{\vspace{-6ex}$course$\vspace{-1.5ex}}
|
||||||
\title{$title$\vspace{-1ex}}
|
\title{$title$}
|
||||||
\author{$author_name$, $author_group$, $author_id$}
|
$if(subtitle)$
|
||||||
|
\subtitle{$subtitle$}
|
||||||
|
$endif$
|
||||||
|
\author{\vspace{-1ex}$author_name$, $author_group$, $author_id$}
|
||||||
\date{\vspace{-1ex}
|
\date{\vspace{-1ex}
|
||||||
\today}
|
\today}
|
||||||
%\begin{spacing}{1}
|
%\begin{spacing}{1}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user