Skip to content

Instantly share code, notes, and snippets.

@wridgers
Last active December 10, 2015 21:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wridgers/4492974 to your computer and use it in GitHub Desktop.
Save wridgers/4492974 to your computer and use it in GitHub Desktop.
\documentclass[a4paper]{article}
% variables! for nice stuff.
\newcommand{\documentTitle}{TITLE OF YOUR DOCUMENT}
\newcommand{\documentAuthor}{YOUR NAME}
\newcommand{\documentDate}{\today}
% unicode please
\usepackage[utf8]{inputenc}
% ams Maths packages
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
% fixes font sizing
\usepackage{fix-cm}
% theorem stuff
\newtheorem{defn}{Definition}[section]
\newtheorem{thm}{Theorem}[section]
\newtheorem{prop}{Proposition}[section]
\newtheorem{exmp}{Example}[section]
\newtheorem{remark}{Remark}[section]
% formatting page
\usepackage[a4paper]{geometry}
% fancy header
\usepackage{fancyhdr}
\fancypagestyle{plain}{%
\fancyhf{}
\fancyhead[L]{\rule[-2ex]{0pt}{2ex}\small \leftmark}
\fancyhead[R]{\small \rightmark}
\fancyfoot[L]{\small \documentAuthor}
\fancyfoot[C]{-- \thepage\ --}
\fancyfoot[R]{\small \documentDate}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}}
\pagestyle{plain}
% fix a warning
\setlength{\headheight}{17pt}
% a nice font
\usepackage[light,math]{iwona}
\usepackage[T1]{fontenc}
% colour package is useful
\usepackage[dvipsnames]{xcolor}
% images
\usepackage{graphicx}
\graphicspath{{./img/}}
\usepackage{float}
\usepackage{wrapfig}
% nice code, and make it pretty
\usepackage{listings}
\lstset{
basicstyle=\footnotesize\ttfamily,
numbers=left,
numberstyle=\tiny,
identifierstyle=\color{CornflowerBlue},
keywordstyle=\color{RoyalBlue},
stringstyle=\color{ForestGreen},
commentstyle=\color{BrickRed},
showspaces=false,
showtabs=false,
frame=single
}
% margin note
\newcommand{\marginnote}[1]{\marginpar{\footnotesize\textcolor{red}{#1}}}
\newcommand{\note}[1]{\begin{center}\textcolor{red}{#1}\end{center}}
% let the fun begin!
\begin{document}
% title
\title{\documentTitle}
\author{\documentAuthor}
\date{\documentDate}
\maketitle
\newpage
% table of contents
\tableofcontents
\newpage
% start here!
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment