-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathpaper.tex
329 lines (288 loc) · 10.2 KB
/
paper.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
\documentclass[11pt]{report}
\usepackage[
dissertation
,final
,raggedbottom
%,tocbold % uncomment to enable bold chapter titles in the ToC
%
% the style guidelines state that page numbers in the
% ToC should not be bold, but leave it up to the author
% and specific department guidelines as to how the
% chapter (or other section) titles should be typeset.
]{USCthesis}
% guidelines for manuscript formatting: https://graduateschool.usc.edu/wp-content/uploads/2020/11/Manuscript_Formatting_and_Documentation_Styles.pdf
%% our customizations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[export]{adjustbox} % for frame option in \includegraphics
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{array}
\usepackage[utf8]{inputenc} % load inputenc before csquotes
\usepackage[english]{babel}
\usepackage[
backend = biber,
doi = true,
hyperref = true,
maxbibnames = 99,
sortlocale = en_US,
style = numeric,
]{biblatex}
\usepackage{booktabs}
\usepackage{color, colortbl}
\usepackage{csquotes}
\usepackage{efbox}
\usepackage{enumitem}
\usepackage[shortcuts]{extdash} % use `\-/' to hyphenate words/phrases that have a dash in them
\usepackage[tt=false]{libertine} % libertine's \ttfamily isn't that great
\usepackage[T1]{fontenc} % load fonts before fontenc
\usepackage[symbol]{footmisc}
\usepackage[
showframe = false,% draw a border around textwidth
pass = true, % force 8.5"x11" pagesize
]{geometry}
\usepackage{graphicx}
%\usepackage[notquote]{hanging} % enables negative indents in paragraphs
\usepackage{hyphenat}
\usepackage{ifthen}
\usepackage{lipsum}
\usepackage{multirow}
\usepackage{parnotes}
\usepackage{pdflscape} % rotate some pages in an {landscape} environment
\usepackage{pifont}
\usepackage{ragged2e}
\usepackage{seqsplit}
\usepackage{siunitx}
\usepackage{subcaption}
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{xspace}
\usepackage{url}
\usepackage[
breaklinks = true,
colorlinks = true,
hypertexnames = false,
pdfpagelabels = false,
citecolor = {blue!80!black},
linkcolor = {blue!80!black},
urlcolor = {blue!80!black},
]{hyperref} % load hyperref as the last package
% pkg: biblatex
\setlength\bibitemsep{0.5\baselineskip} % add a line between entries
\AtEveryBibitem{\iffieldundef{doi}{}{\clearfield{url}}} % if DOI, hide URL
\addbibresource{paper.bib}
% pkg: siunitx
% some guidelines https://physics.nist.gov/cuu/Units/checklist.html
\sisetup{
tight-spacing = true
,detect-family = true
,detect-mode = true
,binary-units = true % support for MB, GB, etc.
,range-units = single % "3% to 5%" -> "3 to 5%"
,range-phrase = -- % "3 to 5%" -> "3--5%"
}
% pkg: babel, hyperref
\addto\extrasenglish{%
\renewcommand{\chapterautorefname}{Chapter}
\renewcommand{\sectionautorefname}{Section}
\renewcommand{\subsectionautorefname}{Section}
\renewcommand{\subsubsectionautorefname}{Section}
}
% pkg: url
\renewcommand{\UrlFont}{\footnotesize\tt}
% our custom commands
\renewcommand{\ttdefault}{cmtt} % use computer modern for teletype
%%% draft mode / toggle commands %%%
\usepackage{etoolbox}
\newtoggle{draft}
\settoggle{draft}{true} % change toggle for draft or final versions
\iftoggle{draft}{
% if 'draft' toggle is true
\overfullrule=10pt % highlight overfull hboxes
}{
% if 'draft' toggle is false
\PassOptionsToPackage{final}{showlabels} % hide labels on figures, etc
}
% if you're including existing papers into your thesis, it helps to put
% content behind a toggle (or conditional) so you only have to maintain
% and keep consistency on one copy. see "introduction.tex".
\newtoggle{thesis}
\settoggle{thesis}{true}
\usepackage[inline]{showlabels}
\renewcommand{\showlabelfont}{\sffamily \color{blue}}
\renewcommand{\showlabelsetlabel}[1]{\efbox{\showlabelfont #1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% front matter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
% title should be all caps
\title{[DISSERTATION TITLE]}
% use your full name!
% https://cs.stanford.edu/~knuth/news19.html
% "Let's celebrate everybody's full names"
\author{[Full Name]}
% major should be all caps
\majorfield{[MAJOR]}
% date should be May, August, or December (when degrees are conferred)
\submitdate{August 20XX}
%%% preface %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{preface}
\prefacesection{Dedication}
\input{dedication.tex}
\prefacesection{Acknowledgements}
\input{acknowledgements.tex}
{
\hypersetup{hidelinks} % color all links black in the preface
\tableofcontents
\listoftables
\listoffigures
}
\prefacesection{Abstract}
\input{abstract.tex}
\end{preface}
%%% introduction %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Introduction}
\label{ch:introduction}
\graphicspath{}
\input{introduction.tex}
%%% chapter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% if you're "stapling" together papers, it's easy to include your paper
% directory by way of symlinks, or copying the entire paper as a
% subdirectory.
%
% for example, if your paper directory looks like the following:
%
% foobar/ - top level paper directory
% foobar/fig/ - where all graphics and figures live
% foobar/paper.bib - bibliography
% foobar/paper.tex - monolithic .tex file for paper
%
% then you might use the folloiwng:
%
% \graphicspath{foobar/fig}
% \addbibresource{foobar/paper.bib}
% \input{foobar/paper.tex}
%
% note that you'll have to modify the input file to make sure that the
% preamble (\documentclass, etc.) isn't included. to make your life
% easier, you could use some TeX conditionals to make it seamless.
%
% this requires some planning, but enables you to edit the individual
% paper and thesis chapter without tracking and porting changes between
% multiple directories and repositories:
%
% for example, at the beginning of foobar/paper.tex (before
% \documentclass):
%
% \newif\ifdissertation
% \dissertationtrue % (or \dissertationfalse for the standalone)
%
% \ifdissertation
% \else
% \documentclass...
% \fi
%
% \ifdissertation
% \else
% \begin{document}
% \fi
%
% [...paper content here...]
%
% \ifdissertation
% \else
% \end{document}
% \fi
%%% chapters: lorem ipsum %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following text is to test ToC alignment:
% - of extremely long chapter, section, subsection, and
% subsubsection titles
% - when chapter numbers are double digits
\chapter{This is a very long title which will take up more than one line
lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ultrices vitae
auctor eu augue ut lectus arcu. Enim nunc faucibus a pellentesque sit
amet porttitor eget. Consequat mauris nunc congue nisi vitae.}
\label{ch:long-title}
\section{Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat}
\subsection{Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
id est laborum.}
\subsubsection{Etiam erat velit scelerisque in dictum non. Sit amet
justo donec enim diam. Amet justo donec enim diam. Metus vulputate eu
scelerisque felis imperdiet proin. In nulla posuere sollicitudin aliquam
ultrices. Turpis in eu mi bibendum.}
\chapter{Lorem Ipsum}
\chapter{Lorem Ipsum}
\chapter{Lorem Ipsum}
\chapter{Lorem Ipsum}
\chapter{Lorem Ipsum}
\chapter{Lorem Ipsum}
\chapter{Lorem Ipsum}
\chapter{Lorem Ipsum}
\chapter{Etiam erat velit scelerisque in dictum non. Sit amet
justo donec enim diam. Amet justo donec enim diam. Metus vulputate eu
scelerisque felis imperdiet proin. In nulla posuere sollicitudin aliquam
ultrices. Turpis in eu mi bibendum.}
\begin{table}
\centering
\begin{tabular}{lS}
\toprule
$x$ & \textbf{value} \\
\midrule
a & 1.23 \\
b & 3.456 \\
c & 100.0002 \\
d & 12345.0 \\
\bottomrule
\end{tabular}
\caption[In hendrerit gravida rutrum quisque non tellus orci ac. Iaculis
urna id volutpat lacus laoreet non curabitur gravida arcu. Mauris
ultrices eros in cursus turpis massa. Sed tempus urna et pharetra
pharetra massa massa. Eget sit amet tellus cras adipiscing enim eu
turpis egestas. Morbi blandit cursus risus at ultrices.]
{In hendrerit gravida rutrum quisque non tellus orci ac. Iaculis
urna id volutpat lacus laoreet non curabitur gravida arcu.
Mauris ultrices eros in cursus turpis massa. Sed tempus urna et
pharetra pharetra massa massa. Eget sit amet tellus cras
adipiscing enim eu turpis egestas. Morbi blandit cursus risus at
ultrices.}
\label{tbl:example-2}
\end{table}
%%% conclusions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Conclusions}
\label{ch:conclusions}
\graphicspath{}
\input{conclusions}
%%% bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \printbibliography in biblatex is great, but doesn't allow for the
% greatest customization, so we'll use the package biblatex + biber
% backend to meet some requirements:
%
% * bibliography should be an un-numbered chapter, and still have a
% pdfbookmark and a line in the table of contents
%
% * bibliography contents should be singlespace, and optionally a smaller
% font
%
% * first line of this "chapter" should be in the same spot as the first
% line of preface sections (e.g., acknowledgement)
%
% * we use \raggedright so things like URLs and DOIs aren't stretched out.
%
\clearpage
\chapter*{Bibliography}
\addcontentsline{toc}{chapter}{Bibliography}
\begin{singlespace}
% increase penalty such that we don't break entries over pages
% source: https://tex.stackexchange.com/a/43275
\patchcmd{\bibsetup}{\interlinepenalty=5000}{\interlinepenalty=10000}{}{}
% reduce spacing between each bibentry
\setlength\bibitemsep{0.9\baselineskip}
% don't justify-align entries: this prevents stretching out each line
\raggedright
\printbibliography[
heading = none
]
\end{singlespace}
\end{document}