-
Notifications
You must be signed in to change notification settings - Fork 0
/
han.tex
143 lines (113 loc) · 3.05 KB
/
han.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
\documentclass{article}
\usepackage[nomarginpar, margin=1in, foot=.25in]{geometry}
\usepackage{fontspec}
\newfontfamily\contrastfont[Path=\string./fonts/]{arial-narrow-bold.ttf}
\setmainfont[Path=\string./fonts/]{arial.ttf}
% Setup citations
\usepackage{apacite}
\bibliographystyle{apacite}
\usepackage[dutch]{babel}
\usepackage[utf8]{inputenc}
\usepackage{titling}
\usepackage[table]{xcolor}
\definecolor{LinkUnderlineColor}{HTML}{1155cc}
\definecolor{LinkColor}{HTML}{1155cc}
\definecolor{ContrastColor}{HTML}{e50056}
\definecolor{AccentColor}{HTML}{808080}
\usepackage{graphicx}
\usepackage{svg}
\usepackage{eso-pic}
% Remove dots from toc
\usepackage[titles]{tocloft}
\renewcommand{\cftdot}{}
% Toc title styling
\AtBeginDocument{
\let\mtcontentsname\contentsname
\renewcommand\contentsname{\MakeUppercase\mtcontentsname}
}
% Page headers and footers
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot{} % Remove the page number from the center. This line must be before lfoot and rfoot.
\lhead{This is my name}
\rhead{this is page \thepage}
\rfoot{\thepage}
$if(title)$
\lfoot{
$if(title)$\fontsize{8pt}{10pt}\normalfont\uppercase{$title$}$endif$
}
$endif$
% Title styling
\usepackage{titlesec}
\titleformat{\section}
{\contrastfont\fontsize{16}{12}\upshape\bfseries\uppercase}{\thesection}{1.1em}{}
\titleformat{\subsection}
{\color{ContrastColor}\contrastfont\fontsize{12}{12}\upshape\bfseries\uppercase}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\contrastfont\fontsize{12}{12}\upshape\bfseries\uppercase}{\thesubsubsection}{1em}{}
% Hyper ref
\usepackage[colorlinks=true,allcolors=LinkColor,allbordercolors=LinkUnderlineColor]{hyperref}
\hypersetup{
$if(title-meta)$
pdftitle={$title-meta$},
$endif$
$if(author-meta)$
pdfauthor={$author-meta$},
$endif$
$if(keywords)$
pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
$endif$
$if(subject)$
pdfsubject={$subject$},
$endif$
pdfcreator={XeLaTeX via Pandoc; HAN-theme by Nathan Kolpa},
}
$if(title)$
\title{
{\contrastfont\fontsize{24pt}{12pt}\upshape\bfseries $title$} \fontsize{25pt}{12pt}\normalfont\textcolor{ContrastColor}{\_}
\\
$if(subject)$ \fontsize{18pt}{30pt}\normalfont\textcolor{AccentColor}{$subject$}$endif$
}
\renewcommand\maketitlehooka{\null\mbox{}\vfill}
\renewcommand\maketitlehookd{}
\pretitle{\begin{flushleft}\Large\bfseries}
\posttitle{\par\end{flushleft}\vfill\null}
\preauthor{\begin{flushleft}}
\postauthor{\end{flushleft}}
\predate{\begin{flushleft}}
\postdate{\end{flushleft}}
$endif$
\date{
\fontsize{12pt}{12pt}\normalfont\textcolor{AccentColor}{
$if(date)$
$date$
$else$
\today
$endif$
}
}
$if(author-meta)$
\author{
\fontsize{12pt}{12pt}\normalfont\textcolor{AccentColor}{$author-meta$ }
}
$endif$
\begin{document}
$if(title)$
\begin{titlingpage}
\AddToShipoutPictureBG*{
\AtPageUpperLeft{
\raisebox{-\dimexpr\height+\topskip+1in}{
\hspace*{1in}
\includesvg[width=0.6\textwidth]{./assets/han_logo}
}
}
}
\maketitle
\end{titlingpage}
$endif$
$if(toc)$
\tableofcontents
\newpage
$endif$
$body$
\end{document}