diff --git a/pandoc/.pandoc/templates/assignment.latex b/pandoc/.pandoc/templates/assignment.latex new file mode 100644 index 0000000..5593451 --- /dev/null +++ b/pandoc/.pandoc/templates/assignment.latex @@ -0,0 +1,91 @@ +% !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} +\usepackage{grffile} +\usepackage[normalem]{ulem} +\usepackage{fancyhdr} +\usepackage[setpagesize=false, + unicode=false, + colorlinks=true, + urlcolor=blue, + linkcolor=black]{hyperref} + + +% Required fix for fancyhdr +\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} +% Fancy headers and footers settings +\pagestyle{fancy} +\lhead{$left-header$} +\rhead{$right-header$} + + +% 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 + + +% ----------------- +% END OF PREAMBLE +% ----------------- +\begin{document} + +\begin{center} + \hfill \break% + $if(title)$\Huge{$title$}\\[0.5em]$endif$ + $if(authors)$\Large{$authors$}\\[2.5em]$endif$ +\end{center} + +$body$ + +\end{document} diff --git a/vim/.vim/UltiSnips/markdown.snippets b/vim/.vim/UltiSnips/markdown.snippets index c423a92..d2bf817 100644 --- a/vim/.vim/UltiSnips/markdown.snippets +++ b/vim/.vim/UltiSnips/markdown.snippets @@ -32,6 +32,16 @@ fontsize: 12pt endsnippet +snippet ass "YAML metadata for assignment" +--- +title: $1 +authors: Amin Kasrou Aouam +left-header: +right-header: `date +%F` +--- + +endsnippet + snippet slides "YAML metadata for the Metropolis template" --- title: "$1"