Add assignment template and metadata snippet
This commit is contained in:
parent
a68a7a992d
commit
632f808603
|
@ -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}
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue