-
Notifications
You must be signed in to change notification settings - Fork 0
/
outline.tex
477 lines (406 loc) · 12.7 KB
/
outline.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
\renewcommand{\rmdefault}{phv} % Arial
\renewcommand{\sfdefault}{phv} % Arial
\let\tightlist\relax
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\documentclass[11pt]{article}
\RequirePackage[top=0.5in,left=0.5in,right=0.5in,bottom=0.5in]{geometry}
% hack for markdown processing. by default, text enclosed between latex \begin
% and \end tags will *not* be parsed by pandoc. If we *do* want to parse that
% code (because it's written in markdown), we can just add aliases for \Begin
% and \End, which are not flagged by pandoc as "avoid parsing". So markdown
% enclosed by \Begin and \End will be parsed as by pandoc.
% Use this to define a two-column reference sectiona t the end of your document
% like this:
% \Begin{multicols}{2}
% \tiny
% \setlength{\parskip}{0.2em}
% <div id="refs"></div>
% \End{multicols}
\let\Begin\begin
\let\End\end
\renewcommand{\thesection}{}
\renewcommand{\thesubsection}{\arabic{subsection}}
\renewcommand{\thesubsubsection}{\arabic{subsection}.\arabic{subsubsection}}
% This is used to allow Shaded environment
$if(highlighting-macros)$
$highlighting-macros$
$endif$
\usepackage{pdfpages}
\usepackage{fancyhdr}
\usepackage{multicol}
\usepackage{wrapfig}
\usepackage[skip=2pt, font=footnotesize, format=plain, labelfont=it, textfont=it, tableposition=below]{caption}
% longtable is required for markdown-format tables to be rendered in latex
\usepackage{longtable}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifxetex
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\else
\ifluatex
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\else
\usepackage[utf8]{inputenc}
\fi
\fi
$if(natbib)$
\usepackage{natbib}
\bibliographystyle{plainnat}
$endif$
$if(biblatex)$
\usepackage{biblatex}
$if(biblio-files)$
\bibliography{$biblio-files$}
$endif$
$endif$
$if(lhs)$
\usepackage{listings}
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
$endif$
$if(fancy-enums)$
% Redefine labelwidth for lists; otherwise, the enumerate package will cause
% markers to extend beyond the left margin.
\makeatletter\AtBeginDocument{%
\renewcommand{\@listi}
{\setlength{\labelwidth}{4em}}
}\makeatother
$endif$
$if(tables)$
\usepackage{ctable}
\usepackage{float} % provides the H option for float placement
$endif$
$if(url)$
\usepackage{url}
$endif$
$if(graphics)$
\usepackage{graphicx}
% We will generate all images so they have a width \maxwidth. This means
% that they will get their normal width if they fit onto the page, but
% are scaled down if they would overflow the margins.
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
\else\Gin@nat@width\fi}
\makeatother
\let\Oldincludegraphics\includegraphics
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
$endif$
\usepackage{caption}
\DeclareCaptionLabelFormat{nolabel}{}
\captionsetup{labelformat=nolabel}
\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
xetex]{hyperref}
\else
\usepackage[unicode=true]{hyperref}
\fi
\hypersetup{breaklinks=true, pdfborder={0 0 0}, colorlinks=true, urlcolor=bluehaze, linkcolor=bluehaze, citecolor=bluehaze, anchorcolor=bluehaze}
$if(strikeout)$
\usepackage[normalem]{ulem}
% avoid problems with \sout in headers with hyperref:
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
$endif$
$if(subscript)$
\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
$endif$
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em} % prevent overfull lines
$if(listings)$
\usepackage{listings}
$endif$
$if(numbersections)$
$else$
\setcounter{secnumdepth}{0}
$endif$
$if(verbatim-in-note)$
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$for(header-includes)$
$header-includes$
$endfor$
$if(title)$
\title{$title$}
$endif$
$if(author)$
\author{$for(author)$$author$$sep$ \and $endfor$}
$endif$
$if(date)$
\date{$date$}
$endif$
% my page number
%\pagestyle{fancy}
%\fancyhead[RO]{Sheffield \thepage}
\fancyhead{} % empty
% \fancyfoot{} % empty out the default, which is page number in center
\renewcommand{\headrulewidth}{0pt}
% \pagenumbering{gobble}
\usepackage{titlesec}
% colors
\definecolor{bluehaze}{RGB}{54,95,145}
\definecolor{maroonhaze}{RGB}{148,54,52}
\definecolor{orangehaze}{RGB}{227,108,10}
\definecolor{black}{RGB}{0,0,0}
% \definecolor{lightblack}{RGB}{55,55,55}
\definecolor{bluetint}{RGB}{0,50,100}
\definecolor{bluetint2}{RGB}{0,30,60}
\definecolor{lightblack}{RGB}{75,75,75}
\definecolor{almostwhite}{RGB}{235,235,245}
%\usepackage{sectsty}% http://ctan.org/pkg/sectsty
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
% \sectionfont{\color{bluehaze}\normalfont\fontsize{12}{3}\selectfont}
\usepackage{needspace}
% \titleformat{\paragraph}[leftmargin]{\normalfont\normalsize\bfseries\filleft}{\theparagraph}{15pt}{}
$if(linespread)$\linespread{$linespread$}$else$
\linespread{1.0}
$endif$
$if(titleneedspace)$
\def \titleneedspace{$titleneedspace$}
$else$
\def \titleneedspace{0cm}
$endif$
% Here I am using the needspace thing to make sure that the title headings don't
% show up on the very last line of a page.
\titleformat{\section}
{\needspace{\titleneedspace}\normalfont\fontfamily{phv}\fontsize{18pt}{18pt}\selectfont\color{black}\bfseries}{\thesection}{0in}{}
\titleformat{\subsection}[hang]
{\needspace{\titleneedspace}\normalfont\fontfamily{phv}\fontsize{16pt}{16pt}\selectfont\color{black}\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\needspace{\titleneedspace}\normalfont\fontfamily{phv}\fontsize{14pt}{14pt}\selectfont\color{black}\bfseries}{\thesubsubsection}{1em}{}
% use amsthm for addpunct, to add periods to the end of non-punctuated
% paragraph titles (header level 4; ####)
\usepackage{amsthm}
\makeatletter
\newcommand{\addperiod}[1]{#1\@addpunct{.}}
\makeatother
% use [runin] to specify no newline
\titleformat{\paragraph}
{\normalfont\fontfamily{phv}\fontsize{12pt}{12pt}\selectfont\color{bluetint2}\bfseries}{\theparagraph}{}{}
\titleformat{\subparagraph}
{\normalfont\fontfamily{phv}\fontsize{11pt}{11pt}\selectfont\color{lightblack}\itshape}{\theparagraph}{}{\addperiod}
% \titlespacing{command}{left spacing}{before spacing}{after spacing}[right]
\titlespacing{\section}{0pt}{16pt plus 4pt minus 2pt}{4pt plus 2pt minus 2pt}
\titlespacing{\subsection}{0pt}{14pt plus 20pt minus 2pt}{2pt plus 2pt minus 2pt}
\titlespacing{\subsubsection}{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 1pt}
% for these ones, the 'after spacing' (slot 3) corresponds to right-side spacing,
% since it's paragraph-level (no newline afterwards)
\titlespacing{\paragraph}{0pt}{4pt plus 4pt minus 2pt}{-2pt plus 2pt minus 1pt}
\titlespacing{\subparagraph}{0pt}{1pt plus 4pt minus 2pt}{-4pt plus 2pt minus 1pt}
% Attempt to smash lists together
\usepackage{enumerate}
\usepackage{enumitem}
\setlist[itemize]{topsep=-4pt,parsep=-2pt,itemindent=0pt,leftmargin=18pt}
\def\labelitemi{\raisebox{0.5ex}{\tiny\textbullet}}
% % The maximum part of the top or bottom of a text page that can be
% % occupied by floats. This is set so that at least four lines of text
% % fit on the page.
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
% % The minimum amount of a text page that must be occupied by text.
% % This should accomodate four lines of text.
\renewcommand\textfraction{.06}
% % The minimum amount of a float page that must be occupied by floats.
\renewcommand\floatpagefraction{.94}
% % The same parameters repeated for double column output
% \renewcommand\dbltopfraction{.9}
% \renewcommand\dblfloatpagefraction{.9}
% The maximum part of the top or bottom of a text page that can be
% occupied by floats. This is set so that at least four lines of text
% fit on the page.
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
% The minimum amount of a text page that must be occupied by text.
% This should accomodate four lines of text.
\renewcommand\textfraction{.06}
% The minimum amount of a float page that must be occupied by floats.
\renewcommand\floatpagefraction{.94}
% The same parameters repeated for double column output
\renewcommand\dbltopfraction{.9}
\renewcommand\dblfloatpagefraction{.9}
% Disallow widows and orphans
\clubpenalty 10000
\widowpenalty 10000
%\subsectionfont{\color{maroonhaze}}
%\subsubsectionfont{\color{orangehaze}}
% end colors
% this code uses titles.sty to make a pagebreak with every header 1
% so each section will begin on a new page.
%\newcommand{\sectionbreak}{\clearpage}
% This section was added with pandoc 2.9.
$if(csl-refs)$
\newlength{\cslhangindent} % set up new length
\setlength{\cslhangindent}{$if(csl-hanging-indent)$2em$else$0em$endif$}
\newenvironment{cslreferences}%
{\everypar{\setlength{\hangindent}{\cslhangindent}}}%
{\par} % by default, this env does not change anything
$endif$
\begin{document}
% $if(title)$
% \maketitle
% $endif$
$for(include-before)$
$include-before$
$endfor$
$if(toc)$
\tableofcontents
$endif$
$body$
$if(natbib)$
$if(biblio-files)$
$if(biblio-title)$
$if(book-class)$
\renewcommand\bibname{$biblio-title$}
$else$
\renewcommand\refname{$biblio-title$}
$endif$
$endif$
\bibliography{$biblio-files$}
$endif$
$endif$
$if(biblatex)$
\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
$endif$
$for(include-after)$
$include-after$
$endfor$
\end{document}
%\documentclass$if(fontsize)$[$fontsize$]$endif${article}
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifxetex
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\else
\ifluatex
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\else
\usepackage[utf8]{inputenc}
\fi
\fi
$if(natbib)$
\usepackage{natbib}
\bibliographystyle{plainnat}
$endif$
$if(biblatex)$
\usepackage{biblatex}
$if(biblio-files)$
\bibliography{$biblio-files$}
$endif$
$endif$
$if(lhs)$
\usepackage{listings}
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
$endif$
$if(fancy-enums)$
% Redefine labelwidth for lists; otherwise, the enumerate package will cause
% markers to extend beyond the left margin.
\makeatletter\AtBeginDocument{%
\renewcommand{\@listi}
{\setlength{\labelwidth}{4em}}
}\makeatother
\usepackage{enumerate}
$endif$
$if(tables)$
\usepackage{ctable}
\usepackage{float} % provides the H option for float placement
$endif$
$if(url)$
\usepackage{url}
$endif$
$if(graphics)$
\usepackage{graphicx}
% We will generate all images so they have a width \maxwidth. This means
% that they will get their normal width if they fit onto the page, but
% are scaled down if they would overflow the margins.
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
\else\Gin@nat@width\fi}
\makeatother
\let\Oldincludegraphics\includegraphics
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
$endif$
\usepackage{caption}
\DeclareCaptionLabelFormat{nolabel}{}
\captionsetup{labelformat=nolabel}
\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
xetex]{hyperref}
\else
\usepackage[unicode=true]{hyperref}
\fi
\hypersetup{breaklinks=true, pdfborder={0 0 0}}
$if(strikeout)$
\usepackage[normalem]{ulem}
% avoid problems with \sout in headers with hyperref:
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
$endif$
$if(subscript)$
\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
$endif$
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em} % prevent overfull lines
$if(listings)$
\usepackage{listings}
$endif$
$if(numbersections)$
$else$
\setcounter{secnumdepth}{0}
$endif$
$if(verbatim-in-note)$
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$for(header-includes)$
$header-includes$
$endfor$
$if(title)$
\title{$title$}
$endif$
$if(author)$
\author{$for(author)$$author$$sep$ \and $endfor$}
$endif$
$if(date)$
\date{$date$}
$endif$
\begin{document}
$if(title)$
\maketitle
$endif$
$for(include-before)$
$include-before$
$endfor$
$if(toc)$
\tableofcontents
$endif$
$body$
$if(natbib)$
$if(biblio-files)$
$if(biblio-title)$
$if(book-class)$
\renewcommand\bibname{$biblio-title$}
$else$
\renewcommand\refname{$biblio-title$}
$endif$
$endif$
\bibliography{$biblio-files$}
$endif$
$endif$
$if(biblatex)$
\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
$endif$
$for(include-after)$
$include-after$
$endfor$
\end{document}