-
Notifications
You must be signed in to change notification settings - Fork 1
/
includes-preamble.tex
65 lines (55 loc) · 2.05 KB
/
includes-preamble.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
%---------------------------------------- fonts and characters
% font and input - so latex can include and hyphenate characters with glyphs etc.
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
% font
% adobe designed font - charter
% latex font - lmodern
\usepackage{charter}
%\renewcommand{\familydefault}{\sfdefault}
\usepackage[authoryear,round]{natbib}
%----------------------------------------- layout
% page layout
\usepackage{geometry} % paper size, orientation, page elements
\geometry{a4paper, margin=17mm}
% change line spacing
% set space makes it easy to change spacing within document
% e.g. for table of contents and algorithmic
\usepackage{setspace}
\onehalfspacing
%\linespread{1.5}
% remove paragraph indentation
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em}
% add horizontal padding to columns in table
%\setlength\tabcolsep{0.1em}
% ensure no widows
\usepackage[all]{nowidow}
%----------------------------------------- graphics
\usepackage[pdftex]{graphicx} % include graphic
\usepackage[export]{adjustbox} % to vertically align figures
%\graphicspath{ {./figures/} }
\usepackage{wrapfig}
\usepackage[font=small,skip=0pt]{caption}
% for subfigures
\usepackage{subcaption}
% short arrows - including diagonal where up is \shortarrow{0} clockwise thereafter
% https://tex.stackexchange.com/questions/144558/is-there-a-short-diagonal-pointing-arrow-symbol
\usepackage{stmaryrd} % also requires graphicx, amsmath
\makeatletter
\newcommand{\fixed@sra}{$\vrule height 2\fontdimen22\textfont2 width 0pt\shortrightarrow$}
\newcommand{\shortarrow}[1]{%
\mathrel{\text{\rotatebox[origin=c]{\numexpr#1*45}{\fixed@sra}}}
}
\makeatother
%----------------------------------------- table of contents
\usepackage[toc]{appendix}
% etoolbox package provides commands for inserting commands around/within environments
\usepackage{etoolbox}
% Inserts \clearpage before \begin{appendices}
\BeforeBeginEnvironment{appendices}{\clearpage}
%----------------- algorithms
% algorithms
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage[noend]{algpseudocode}