-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.tex
93 lines (80 loc) · 2.96 KB
/
template.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
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{{extarticle}}
% parts used from default template
\usepackage{hyperref}
\hypersetup{unicode=true,
pdftitle={$title$},
pdfborder={0 0 0},
breaklinks=true}
\urlstyle{same} % don't use monospace font for urls
\usepackage{parskip}
%%% Change title format to be more compact
\usepackage{titling}
% Create subtitle command for use in maketitle
\newcommand{\subtitle}[1]{
\posttitle{
\begin{center}\large#1\end{center}
}
}
\setlength{\droptitle}{-2em}
\title{$title$}
\pretitle{\vspace{\droptitle}\centering\huge}
\posttitle{\par}
\author{}
\preauthor{}\postauthor{}
\date{}
\predate{}\postdate{}
% customisations
\usepackage[margin=1in,includeheadfoot,headsep=0in,headheight=0in,footskip=17pt]{geometry} % footskip must be min 16.11801pt
\usepackage{graphicx,grffile}
\usepackage{mathspec}
\usepackage{fontspec}
\usepackage[default,scale=0.95]{opensans}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{fancyhdr}
\usepackage{varwidth}
\usepackage{tcolorbox}
% avoid warnings from legacy everypage package
\newcommand*{\AddEverypageHook}[1]{%
\AddToHook{shipout/background}{\put(1in,-1in){#1}}}
\newcommand*{\AddThispageHook}[1]{%
\AddToHookNext{shipout/background}{\put(1in,-1in){#1}}}
\makeatletter
\disable@package@load{everypage}{}
\makeatother
\usepackage{background}
\tcbuselibrary{skins} % needed for border image (enhanced box type)
\definecolor{Rblue}{HTML}{2369bd}
\backgroundsetup{contents={
\begin{tcolorbox}[
enhanced, % box type
colback=white, % can't be transparent (else see frame image)
$if(border_image)$
frame style image=color7_border.pdf, % image behind interior box
$else$
colframe=Rblue, % colour if image does not exist
$endif$
watermark graphics=logo.png, % (on top of colback)
watermark zoom=0.9, % zoom relative to interior of box
outer arc=0mm, arc=0mm, % square corners
boxrule=8pt, % border thickness
add to width = 1in] % 1in wider than \textwidth
\vspace{\textheight} % make as tall as body (inc. header and footer)
\vspace{1in} % ...plus 1in
\end{tcolorbox}
}, angle=0, scale=1} % background fills page
% define \opensans if necessary (older version of opensans package)
\providecommand{\opensans}{\normalfont}
\fancypagestyle{plain}{% the preset of fancyhdr
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[CO]{
\opensans $organization$: \href{https://$organization_url$}{\nolinkurl{$organization_url$}}}}% https:// in variable causes compilation issues
\begin{document}
\opensans
$if(title)$
\maketitle
$endif$
$body$
\end{document}