From 18032a8e03aa55d333eca7a184dcdb745a101e36 Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 25 Nov 2019 20:20:38 +0100 Subject: [PATCH] Add report pandoc template --- pandoc/.pandoc/templates/report.latex | 82 +++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 pandoc/.pandoc/templates/report.latex diff --git a/pandoc/.pandoc/templates/report.latex b/pandoc/.pandoc/templates/report.latex new file mode 100644 index 0000000..79bbd02 --- /dev/null +++ b/pandoc/.pandoc/templates/report.latex @@ -0,0 +1,82 @@ +% !TEX TS-program = xelatex +% !TEX encoding = UTF-8 Unicode + +% ----------------- +% START OF PREAMBLE +% ----------------- +\documentclass[12pt,a4paper]{scrreprt} + + +% Commands +\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} + + +% Packages +\usepackage{fontspec} +\usepackage{eurosym} +\usepackage{amssymb} +\usepackage{mathtools} +\usepackage{upquote} +\usepackage{microtype} +\usepackage{polyglossia} +\usepackage{longtable,booktabs} +\usepackage{graphicx} +\usepackage{grffile} +\usepackage[normalem]{ulem} +\usepackage[setpagesize=false, + unicode=false, + colorlinks=true, + urlcolor=blue, + linkcolor=black]{hyperref} + + +% Polyglossia settings +\setmainlanguage{english} % or danish +\addto\captionsenglish{% + \renewcommand{\contentsname}{Table of Contents} +} +\addto\captionsdanish{% + \renewcommand{\contentsname}{Indholdsfortegnelse} +} + + +% 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 + + +% ----------------- +% END OF PREAMBLE +% ----------------- +\begin{document} + +% chapter: 0, section: 1, subsection: 2 etc +\setcounter{secnumdepth}{1} +\tableofcontents + +$body$ + +\end{document}