-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuideToTemplate.tex
332 lines (267 loc) · 10.9 KB
/
GuideToTemplate.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
\documentclass[notoc, symmetric, nobib, nols]{towcenter-guideto-book}
\hypersetup{colorlinks, hyperfootnotes=true}% uncomment this line if you prefer colored hyperlinks (e.g., for onscreen viewing)
%uncomment to remove hyperlinks for Lulu upload
%\hypersetup{draft}
% creating an "ignore" command to deal with emdash problem \& comments in general
\newcommand{\ignore}[1]{}
\widowpenalty=10000
\usepackage[T1]{fontenc}
\usepackage[at]{easylist}
%\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage[american]{babel}
\usepackage[autostyle]{csquotes}
\usepackage{endnotes}
\usepackage[strict]{changepage}
\usepackage{enumitem}
\setlist{noitemsep}
\usepackage{wrapfig}
\usepackage[notes15,strict,backend=biber,autolang=other,%
bibencoding=latin1,notetype=endonly,ibidtracker=constrict]{biblatex-chicago}
\bibliography{Citations}
%\addbibresource{ChatAppsReadings.bib}
\usepackage{ifthen}
\usepackage{setspace}
\renewcommand*{\biburlsetup}{%
\Urlmuskip=0mu plus 2mu\relax
\mathchardef\UrlBreakPenalty=200\relax
\mathchardef\UrlBigBreakPenalty=100\relax
\mathchardef\UrlEmergencyPenalty=9000\relax
\appto\UrlSpecials{%
\do\0{\mathchar`\0\penalty\UrlEmergencyPenalty}%
\do\1{\mathchar`\1\penalty\UrlEmergencyPenalty}%
\do\2{\mathchar`\2\penalty\UrlEmergencyPenalty}%
\do\3{\mathchar`\3\penalty\UrlEmergencyPenalty}%
\do\4{\mathchar`\4\penalty\UrlEmergencyPenalty}%
\do\5{\mathchar`\5\penalty\UrlEmergencyPenalty}%
\do\6{\mathchar`\6\penalty\UrlEmergencyPenalty}%
\do\7{\mathchar`\7\penalty\UrlEmergencyPenalty}%
\do\8{\mathchar`\8\penalty\UrlEmergencyPenalty}%
\do\9{\mathchar`\9\penalty\UrlEmergencyPenalty}}%
\def\UrlBreaks{%
\do\.\do\@\do\/\do\\\do\!\do\_\do\|\do\;\do\>\do\]\do\)\do\}%
\do\,\do\?\do\'\do\+\do\=\do\#\do\$\do\&\do\*\do\^\do\"}%
\def\UrlBigBreaks{\do\:\do\-}}
\usepackage{url}
%\setcounter{biburllcpenalty}{7000}
%\setcounter{biburlucpenalty}{8000}
\urlstyle{rm}
\appto\bibsetup{\sloppy}
%\appto\biburlsetup{\Urlmuskip=0mu plus 4mu\relax}
\setlength{\dimen\footins}{9.5in}
\renewcommand{\notesname}{}
\geometry{a5paper,left=0.6in,right=0.6in,top=0.6875in,headsep=\baselineskip,
textwidth=4.4in,textheight=6.83in,headheight=\baselineskip,marginparwidth
=.1in, marginparsep=0.1in}
%\geometry{a5paper,left=13mm,top=15mm,headsep=1\baselineskip,textwidth=
%122mm,textheight=185mm,headheight=\baselineskip,marginparwidth=10mm,
%marginparsep=5mm}
%%
% Adding setspace to tighten leading on margin notes
\usepackage{setspace}
%%
% Adding back marginnote functionality that I've stripped from tufte-common.def in the process of creating towcenter-common.def
\usepackage{marginnote}
\renewcommand{\marginnote}[1]{{\marginpar{\raggedright\footnotesize
\setstretch{1.025}%
#1}}}
%%
% Setting the footnote style to roman numerals in this case
\renewcommand{\thefootnote}{\roman{footnote}}
% more on bullet positioning: http://tex.stackexchange.com/questions/78167/indentation-within-an-itemized-list
% \setlist[itemize,1]{leftmargin=\dimexpr 26pt-.5in}
%%
% Resetting the footnote counter every page for clarity (I think)
%\usepackage{perpage} %the perpage package
%\MakePerPage{footnote} %the perpage package command
%%
% Resetting footnote counters every section?!
\makeatletter
\@addtoreset{footnote}{section}
\makeatother
%%
% Book metadata
\title{Sample Tow Center printed report}
\author{Susan E. McGregor - susanemcg}
\publisher{Tow Center for Digital Journalism}
% use fontspec package and set titles to Georgia
\usepackage{fontspec}
\newfontfamily\titlefont{Times}
\newfontfamily\towknightfont{News Gothic MT}
%\newfontfamily\bodyfont{Caslon Regular}
\newfontfamily\frankmedium{Franklin Gothic Medium}
%\newfontfamily\frankregular{Franklin Gothic Regular}
%\newfontfamily\frankdemi{Franklin Gothic Demi}
%\setmainfont{Caslon Regular}
% add color package and define appropriate blues for title page
\usepackage{color}
\definecolor{darkblue}{RGB}{30,69,132}
\definecolor{lightblue}{RGB}{154,196,219}
% framed helps with graphics
\usepackage{framed}
% suppresses names and figure numbers on graphics
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@caption}
{\noindent\csname fnum@#1\endcsname: \ignorespaces}
{}
{}{}
\makeatother
%%
% Just some sample text
\usepackage{lipsum}
%%
% For nicely typeset tabular material
\usepackage{booktabs}
%%
% For graphics / images
\usepackage{graphicx,caption}
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
\graphicspath{{graphics/}}
% The fancyvrb package lets us customize the formatting of verbatim
% environments. We use a slightly smaller font.
\usepackage{fancyvrb}
\fvset{fontsize=\normalsize}
%%
% Prints argument within hanging parentheses (i.e., parentheses that take
% up no horizontal space). Useful in tabular environments.
\newcommand{\hangp}[1]{\makebox[0pt][r]{(}#1\makebox[0pt][l]{)}}
%%
% Prints an asterisk that takes up no horizontal space.
% Useful in tabular environments.
\newcommand{\hangstar}{\makebox[0pt][l]{*}}
%%
% Prints a trailing space in a smart way.
\usepackage{xspace}
% Prints the month name (e.g., January) and the year (e.g., 2008)
\newcommand{\monthyear}{%
\ifcase\month\or January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or
December\fi\space\number\year
}
% Prints an epigraph and speaker in sans serif, all-caps type.
\newcommand{\openepigraph}[2]{%
%\sffamily\fontsize{14}{16}\selectfont
\begin{fullwidth}
\sffamily\large
\begin{doublespace}
\noindent\allcaps{#1}\\% epigraph
\noindent\allcaps{#2}% author
\end{doublespace}
\end{fullwidth}
}
% Inserts a blank page
\newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}
\usepackage{units}
% Typesets the font size, leading, and measure in the form of 10/12x26 pc.
\newcommand{\measure}[3]{#1/#2$\times$\unit[#3]{pc}}
% Macros for typesetting the documentation
\newcommand{\hlred}[1]{\textcolor{Maroon}{#1}}% prints in red
\newcommand{\hangleft}[1]{\makebox[0pt][r]{#1}}
\newcommand{\hairsp}{\hspace{1pt}}% hair space
\newcommand{\hquad}{\hskip0.5em\relax}% half quad space
\newcommand{\TODO}{\textcolor{red}{\bf TODO!}\xspace}
\newcommand{\ie}{\textit{i.\hairsp{}e.}\xspace}
\newcommand{\eg}{\textit{e.\hairsp{}g.}\xspace}
\newcommand{\na}{\quad--}% used in tables for N/A cells
\providecommand{\XeLaTeX}{X\lower.5ex\hbox{\kern-0.15em\reflectbox{E}}\kern-0.1em\LaTeX}
\newcommand{\tXeLaTeX}{\XeLaTeX\index{XeLaTeX@\protect\XeLaTeX}}
% \index{\texttt{\textbackslash xyz}@\hangleft{\texttt{\textbackslash}}\texttt{xyz}}
\newcommand{\towcenterbs}{\symbol{'134}}% a backslash in tt type in OT1/T1
\newcommand{\doccmdnoindex}[2][]{\texttt{\towcenterbs#2}}% command name -- adds backslash automatically (and doesn't add cmd to the index)
\newcommand{\doccmddef}[2][]{%
\hlred{\texttt{\towcenterbs#2}}\label{cmd:#2}%
\ifthenelse{\isempty{#1}}%
{% add the command to the index
\index{#2 command@\protect\hangleft{\texttt{\towcenterbs}}\texttt{#2}}% command name
}%
{% add the command and package to the index
\index{#2 command@\protect\hangleft{\texttt{\towcenterbs}}\texttt{#2} (\texttt{#1} package)}% command name
\index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}% package name
}%
}% command name -- adds backslash automatically
\newcommand{\doccmd}[2][]{%
\texttt{\towcenterbs#2}%
\ifthenelse{\isempty{#1}}%
{% add the command to the index
\index{#2 command@\protect\hangleft{\texttt{\towcenterbs}}\texttt{#2}}% command name
}%
{% add the command and package to the index
\index{#2 command@\protect\hangleft{\texttt{\towcenterbs}}\texttt{#2} (\texttt{#1} package)}% command name
\index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}% package name
}%
}% command name -- adds backslash automatically
\newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument
\newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument
\newenvironment{docspec}{\begin{quotation}\ttfamily\parskip0pt\parindent0pt\ignorespaces}{\end{quotation}}% command specification environment
\newcommand{\docenv}[1]{\texttt{#1}\index{#1 environment@\texttt{#1} environment}\index{environments!#1@\texttt{#1}}}% environment name
\newcommand{\docenvdef}[1]{\hlred{\texttt{#1}}\label{env:#1}\index{#1 environment@\texttt{#1} environment}\index{environments!#1@\texttt{#1}}}% environment name
\newcommand{\docpkg}[1]{\texttt{#1}\index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}}% package name
\newcommand{\doccls}[1]{\texttt{#1}}% document class name
\newcommand{\docclsopt}[1]{\texttt{#1}\index{#1 class option@\texttt{#1} class option}\index{class options!#1@\texttt{#1}}}% document class option name
\newcommand{\docclsoptdef}[1]{\hlred{\texttt{#1}}\label{clsopt:#1}\index{#1 class option@\texttt{#1} class option}\index{class options!#1@\texttt{#1}}}% document class option name defined
\newcommand{\docmsg}[2]{\bigskip\begin{fullwidth}\noindent\ttfamily#1\end{fullwidth}\medskip\par\noindent#2}
\newcommand{\docfilehook}[2]{\texttt{#1}\index{file hooks!#2}\index{#1@\texttt{#1}}}
\newcommand{\doccounter}[1]{\texttt{#1}\index{#1 counter@\texttt{#1} counter}}
% Generates the index
\usepackage{makeidx}
\makeindex
\begin{document}
% Front matter
\frontmatter
% r.1 blank page
\blankpage
% r.3 full title page
%\maketitle
%Using minipages to mimic existing layout for title page
%\cleardoublepage
\begin{figure}
\centering
\makebox[0pt][c]{%
\begin{minipage}[t][1\textheight]{0.2\textwidth}
\vspace{0pt}
\vfill
\includegraphics[width=.6\textwidth]{graphics/ColumbiaLogo.pdf}
\end{minipage}
\hfill
\begin{minipage}[t][1\textheight]{0.80\textwidth}
\vspace{0pt}
\begin{flushleft}
%\textcolor{darkblue}{\towknightfont{\fontsize{30}{30}\selectfont Guide to}}
\textcolor{lightblue}{\towknightfont{\fontsize{47}{47}\selectfont \textbf{Guide to}}}
\vspace{0.4in}
\textcolor{darkblue}{\textbf{\titlefont\fontsize{58}{58}\selectfont
Crowd-\\sourcing}}
\vspace{2.9in}
\textcolor{darkblue}{\towknightfont{\fontsize{16}{16}\selectfont \textbf{Mimi Onuhoa\\Jeanne Pinder\\Jan Schaffer}}}
\vspace{1.45in}
\textcolor{darkblue}{\towknightfont{\fontsize{7}{-3}\selectfont Tow Center for Digital Journalism\hspace{0.3in}Funded by the Tow Foundation and the\\[-0.08in]A Tow/Knight Guide \hspace{0.88in}James S. and John L. Knight Foundation}}
\end{flushleft}
\end{minipage}%
}%
\end{figure}
\blankpage
\blankpage
% v.4 copyright page
\null
\begin{fullwidth}
\noindent\textsf{\textbf{Acknowledgements}} \\[0.3cm]
\noindent\textit{Intro/thank you text goes here
}\\[0.1cm]\noindent\textit{
Usually we put ~0.1cm between these grafs. In the digital version, you'll need to be careful to edit the month below, as it will simply list all the months.
}\\[0.1cm]
\noindent\textit{\monthyear}
\end{fullwidth}
% r.5 contents
\tableofcontents
% r.7 introduction
\cleardoublepage
%%
% Start the main matter (normal chapters)
\mainmatter
%%
% The citations will appear automatically; nothing needs to be added here.
\chapter{Citations}
\blankpage
\theendnotes
\end{document}