Skip to content

Instantly share code, notes, and snippets.

@deadbok
Created November 15, 2017 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deadbok/02140d73cbd78de231ba75b2d3cc2499 to your computer and use it in GitHub Desktop.
Save deadbok/02140d73cbd78de231ba75b2d3cc2499 to your computer and use it in GitHub Desktop.
handin template for pandoc
% !TEX TS-program = xelatex
% !TEX encoding = UTF-8 Unicode
% -----------------
% START OF PREAMBLE
% -----------------
\documentclass[12pt,a4paper]{scrartcl}
% Commands
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
% Packages
\usepackage{fontspec}
\usepackage{eurosym}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{upquote}
\usepackage{microtype}
\usepackage{longtable,booktabs}
\usepackage{graphicx}
\graphicspath{ {images/}{template/} }
\usepackage{grffile}
\usepackage[normalem]{ulem}
\usepackage{fancyhdr}
\usepackage[setpagesize=false,
unicode=true,
colorlinks=true,
urlcolor=blue,
linkcolor=black]{hyperref}
\usepackage[yyyymmdd]{datetime}
\renewcommand{\dateseparator}{--}
\usepackage{lastpage}
% Required fix for fancyhdr
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
% Fancy headers and footers settings
\pagestyle{fancy}
\lhead{$left-header$}
\rhead{$right-header$}
\fancyfoot[L]{$email$}
\fancyfoot[C]{$if(main_author)${$main_author$}$endif$}
\fancyfoot[R]{Page \thepage \hspace{1pt} of \pageref{LastPage}}
% Required for syntax highlighting
$highlighting-macros$
% Don't let images overflow the page
% Can still explicit set width/height/options for an image
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Make links footnotes instead of hotlinks
\renewcommand{\href}[2]{#2\footnote{\url{#1}}}
% Avoid problems with \sout in headers with hyperref:
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
% No paragraph indentation
% and set space between paragraphs
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em} % prevent overfull lines
% No section numbering
\makeatletter
\def\@seccntformat#1{%
\expandafter\ifx\csname c@#1\endcsname\c@section\else
\csname the#1\endcsname\quad
\fi}
\makeatother
%
% TOC depth and
% section numbering depth
%
\setcounter{tocdepth}{3}
$if(numbersections)$
\setcounter{secnumdepth}{3}
$endif$
% -----------------
% END OF PREAMBLE
% -----------------
\begin{document}
\thispagestyle{empty}
\begin{center}
\hfill \break%
\vfill
$if(title)$\Huge\textbf{$title$}\\[0.5em]$endif$
$if(subtitle)$\Large{$subtitle$}\\[0.5em]$endif$
\end{center}
\begin{flushright}
\vspace{8cm}\includegraphics[width=3cm, height=3cm]{eal-logo}\\
$if(institution)${$institution$}\\$endif$
\vspace{1cm}\large{Authors:}\\
$if(authors)$\small{$authors$}\\$endif$
\vspace{1cm}\textbf{{$date$}}\\
\end{flushright}
\newpage
\thispagestyle{empty}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\tableofcontents
\newpage
$body$
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment