-
Notifications
You must be signed in to change notification settings - Fork 498
/
Copy pathpdf-template.tex
140 lines (94 loc) · 2.48 KB
/
pdf-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
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
\documentclass{book}
% Fonts and typography
%% Typography
\usepackage[no-math]{fontspec}
\defaultfontfeatures{Mapping = tex-text, Scale = MatchLowercase}
%% Fonts
\setmainfont{Verdana}
\setsansfont{Verdana}
\setmonofont[Mapping=tex-ansi]{Menlo}
%% Set Sans font in headings
\usepackage{sectsty}
\allsectionsfont{\sffamily}
%% Set polyglossia language
\usepackage{polyglossia}
\setdefaultlanguage{english}
% Page
%% Use full page in book style
\usepackage{fullpage}
%% Set line spacing
\usepackage{setspace}
\setstretch{1.2}
%% Disable paragraph indentation
\usepackage{parskip}
%% Start sections from new page
\let\stdsection\section
\renewcommand\section{\newpage\stdsection}
% Colors
\usepackage{xcolor}
%% Tango color scheme
\definecolor{SkyBlue}{HTML}{3465A4}
\definecolor{DarkSkyBlue}{HTML}{204A87}
\definecolor{Plum}{HTML}{75507B}
\definecolor{ScarletRed}{HTML}{CC0000}
\definecolor{Aluminium1}{HTML}{EEEEEC}
\definecolor{Aluminium6}{HTML}{2e3436}
\definecolor{Black}{HTML}{000000}
% Listings
\usepackage{listings}
\lstdefinelanguage{JavaScript}{
keywords = {typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break},
keywordstyle = \color{SkyBlue}\bfseries,
ndkeywords = {class, export, boolean, throw, implements, import, this},
ndkeywordstyle = \color{Aluminium6}\bfseries,
identifierstyle = \color{Black},
sensitive = false,
comment = [l]{//},
morecomment = [s]{/*}{*/},
commentstyle = \color{Plum}\ttfamily,
stringstyle = \color{ScarletRed}\ttfamily,
morestring = [b]',
morestring = [b]"
}
\lstset{
language = JavaScript,
backgroundcolor = \color{Aluminium1},
extendedchars = true,
basicstyle = \normalsize\ttfamily,
showstringspaces = false,
showspaces = false,
tabsize = 1,
breaklines = true,
showtabs = false
}
\def\tightlist{}
% Links
%% Hyperref
\usepackage[colorlinks, breaklinks, bookmarks, xetex]{hyperref}
\hypersetup {
linkcolor = DarkSkyBlue,
citecolor = DarkSkyBlue,
filecolor = DarkSkyBlue,
urlcolor = DarkSkyBlue
}
%% Don’t use Mono font for URLs
\urlstyle{same}
% Images
\usepackage{graphicx}
% Pandoc hacks
%% Normal enumerates processing
\usepackage{enumerate}
%% Disable section numbers
\setcounter{secnumdepth}{0}
\begin{document}
% Title page
\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
\includegraphics[width=0.7\textwidth]{title}
\end{center}
\vspace*{\fill}
\setcounter{page}{0}
% Book contents
$body$
\end{document}