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