Last active
July 5, 2018 04:56
-
-
Save nicholastay/5810c097d6975d0f05c68c0ae1a4832f to your computer and use it in GitHub Desktop.
My essay template for pandoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%!TEX TS-program = xelatex | |
% pandoc --template my_essay.tex --pdf-engine=xelatex -o output.pdf input.md | |
\documentclass[11pt]{article} | |
\usepackage[english]{babel} | |
\usepackage[a4paper,margin=2cm,left=4cm,top=1.5cm,includehead,includefoot]{geometry} | |
\usepackage{fontspec} | |
\setmainfont{Times New Roman} | |
\usepackage{hyperref} | |
\def\tightlist{} | |
\usepackage[none]{hyphenat} | |
\usepackage{fancyhdr} | |
\pagestyle{fancy} | |
\fancyhf{} | |
\rhead{Nicholas Tay} | |
\cfoot{\thepage} | |
\setlength{\parindent}{0pt} | |
\setlength{\parskip}{12pt} | |
\renewcommand{\baselinestretch}{1.5} | |
\usepackage{xspace} | |
\newcommand{\textf}[1]{% | |
\underline{\smash{\textit{#1}}}\xspace% | |
} | |
$if(text)$ | |
\newcommand{\text}{% | |
\textf{$text$}\xspace% | |
} | |
$endif$ | |
\begin{document} | |
\sloppy % fixes hyphenat thingo | |
$if(title)$ | |
\textbf{\Large $title$}$if(remark)$ \small{\textit{($remark$)}}$endif$ | |
$endif$ | |
$if(date)$ | |
\\$date$ | |
$endif$ | |
$body$ | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment