-
Notifications
You must be signed in to change notification settings - Fork 2
/
demopdf.tex
67 lines (59 loc) · 1.85 KB
/
demopdf.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
%% Adapted from https://github.com/nrennie/PrettyPDF
% load packages
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{eso-pic}
\usepackage{fancyhdr}
\usepackage{sectsty}
\usepackage{fontspec}
\usepackage{titlesec}
%% Set page size with a wider right margin
\geometry{a4paper, total={170mm,257mm}, left=20mm, top=20mm, bottom=20mm, right=50mm}
\definecolor{light}{HTML}{EEF3F6}
\definecolor{highlight}{HTML}{86C7ED}
\definecolor{dark}{HTML}{040548}
\AddToShipoutPicture{%
\AtPageLowerLeft{%
\put(\LenToUnit{\dimexpr\paperwidth-3cm},0){%
\color{light}\rule{3cm}{\LenToUnit\paperheight}%
}%
}%
% logo
\AtPageLowerLeft{% start the bar at the bottom right of the page
\put(\LenToUnit{\dimexpr\paperwidth-2.25cm},27.2cm){% move it to the top right
\color{light}\includegraphics[width=1.5cm]{_extensions/demopdf/logo.png}
}%
}%
}
%% Style the page number
\fancypagestyle{mystyle}{
\fancyhf{}
\renewcommand\headrulewidth{0pt}
\fancyfoot[R]{\thepage}
\fancyfootoffset{3.5cm}
}
\setlength{\footskip}{20pt}
%% style the chapter/section fonts
\chapterfont{\color{dark}\fontsize{20}{16.8}\selectfont}
\sectionfont{\color{dark}\fontsize{20}{16.8}\selectfont}
\subsectionfont{\color{dark}\fontsize{14}{16.8}\selectfont}
\titleformat{\subsection}
{\color{dark}\sffamily\Large\bfseries}{\thesection}{1em}{}[{\titlerule[0.8pt]}]
% left align title
\makeatletter
\renewcommand{\maketitle}{\bgroup\setlength{\parindent}{0pt}
\begin{flushleft}
{\color{dark}\sffamily\huge\textbf{\MakeUppercase{\@title}}} \vspace{0.3cm} \newline
{\Large\color{dark} {\@subtitle}} \newline
\@author
\end{flushleft}\egroup
}
\makeatother
\setmainfont{SourceSans3}[
Path=_extensions/demopdf/SourceSans3/,
Scale=0.9,
Extension = .ttf,
UprightFont=*-Regular,
BoldFont=*-Bold,
ItalicFont=*-Italic,
]