-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.tex
231 lines (231 loc) · 9.92 KB
/
config.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
% \input{markdraft} # DRAFT
% \usepackage{showframe}\def\ShowFrameColor{\color{lightgray}} % DEBUG
%---------------------------------------------------------------------------------------------------
% fonts
\usepackage{mathtools,bm,newtxsf,underscore}
\usepackage[tabular,osf,sfdefault]{gandhi}
\usepackage[italic]{mathastext}
\usepackage[scale=.8]{FiraMono}
\usepackage{microtype}\DisableLigatures{shape=sc}
\let\obfseries\bfseries\renewcommand\bfseries{\boldmath\obfseries}
\usepackage[T1]{fontenc}
%---------------------------------------------------------------------------------------------------
% spacing
\frenchspacing
\setlength{\parskip}{1ex plus .2ex minus .2ex}
\setlength{\parindent}{0ex}
\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.67}
\widowpenalty9999
\clubpenalty9999
%---------------------------------------------------------------------------------------------------
% footnotes + sections
\usepackage[marginal,bottom,stable]{footmisc}
\addtolength{\skip\footins}{2ex plus 1ex minus 1ex}
\setcounter{secnumdepth}{4}
\renewcommand{\paragraph}[1]{\par\textbf{#1.}\ }
%---------------------------------------------------------------------------------------------------
% frontmatter
\usepackage{xpatch}
\xpatchcmd{\maketitle}{\@title}%
% {\@title\vfill\vfill\vfill\vfill}{}{} % for ProQuest
{\@title\vfill\vfill\includegraphics[height=.2\textheight]{ut-crest}\vfill}{}{}
\newcommand{\singlespaced}[1]{%
\pretocmd{#1}{\begingroup\singlespacing}{}{}%
\apptocmd{#1}{\endgroup}{}{}}
\singlespaced{\tableofcontents}
\singlespaced{\listoffigures}
\singlespaced{\listoftables}
\newenvironment{acknowlist}
{\begin{itemize}[leftmargin=2em,itemindent=-2em,parsep=0pt,label=]}{\end{itemize}}
\newcommand{\ack}[2]{\item #1 --- #2}
\let\contributions\acknowledgements
\let\endcontributions\endacknowledgements
\xpatchcmd{\contributions}{Acknowledgements}{Contributions}{}{}
%---------------------------------------------------------------------------------------------------
% headers
\makeatletter
\renewcommand{\headerstyle}[1]{\footnotesize\textsc{#1}}
\renewcommand*{\ps@headings}%
{\let\@mkboth\markboth
\let\@oddfoot\@empty
\let\@evenfoot\@empty
\def\@oddhead{\headerstyle{\rightmark\hfil\thepage}}%
\def\sectionmark##1{\markright{%
\if@mainmatter\headerstyle{\thesection\hskip.8em##1}\fi}}}
\makeatother
%---------------------------------------------------------------------------------------------------
% bibliography
\usepackage[
style=numeric-comp,
sorting=none,
date=year,
doi=false,
url=true,
isbn=false,
eprint=false,
natbib=true,
backend=biber,
]{biblatex}
\addbibresource{/home/jesse/refs/library.bib}
\renewcommand{\bibfont}{\footnotesize}
\renewcommand*{\multicitedelim}{\addcomma\,}
\DeclareSourcemap{\maps[datatype=bibtex]{%
\map{\step[fieldset=abstract,null]}}}
\DeclareSourcemap{\maps[datatype=bibtex]{%
\map{\step[typesource=techreport,typetarget=report]}}}
\DeclareFieldFormat{url}{\url{#1}}
\renewbibmacro{in:}{}
\newcommand{\printchapterbibliography}[1][]{} % TODO: (~) remove
\defbibnote{bibhead}{\markboth{\refname}{\refname}}
\newcommand{\printfullbibliography}{%
\printbibliography[prenote=bibhead,heading=bibintoc,title=\refname]}
%---------------------------------------------------------------------------------------------------
% colors
\usepackage{xcolor}
\input{colors}
%---------------------------------------------------------------------------------------------------
% hyperlinks
\usepackage[
colorlinks,
linkcolor=link,
citecolor=cite,
urlcolor=url,
]{hyperref}
\usepackage{nameref}
\makeatletter
\hypersetup{pdftitle={\@title},pdfauthor={\@author}}
\makeatother
%---------------------------------------------------------------------------------------------------
% floatfoot
\newcommand{\floatfoot}[2][1]{\nopagebreak\vskip\abovecaptionskip\par
\parbox{#1\linewidth}{\footnotesize#2}}
\newcommand{\ffpbar}[1][calibration target]{points and error bars: mean and 95\%~CI for each #1}
\newcommand{\ffbox}[1][model fits]{whiskers, boxes, and midlines: 95\%~CI, 50\%~CI, median of #1}
\newcommand{\ffribbon}[1][model fits]{ribbon and curve: range and median of #1}
\newcommand{\ffast}[1]{Asterisks denote significance of #1, where $p < 0.1$: *, $p < 0.01$: **, etc.}
\newcommand{\fffsw}[1]{%
\foreach \year/\status in {2011/serologic,2014/self-reported}{
\foreach \var/\lab in {f/factor,c/continuous}{
\sfref{#1.\year.\var} \year, \status\ HIV status, \lab\ variables;}}}
\newcommand{\ffpops}{Low: lowest activity; Med: medium activity;
LR/HR: lower/higher risk; FSW: female sex workers; Clients: of FSW}
\newcommand{\ffpopz}{Lower Risk: all women and men not involved in sex work;
FSW: female sex workers; Clients: of FSW}
\newcommand{\fffit}{1000 model fits (top 1\% by likelihood among 100,000 sampled parameter sets)}
\newcommand{\ffpar}{Table~\ref{tab:par.defs} givs parameter definitions}
\newcommand{\fffoi}{Table~\ref{tab:foi.models} gives approach definitions}
\newcommand{\ffart}{Base case: \cashi by 2020;
``left behind'' counterfactual scenarios: \casmd overall by 2020,
with reduced cascade (\caslo) among FSW, clients of FSW, both, or neither}
\newcommand{\ffcas}{PLHIV: people living with HIV; VLS: viral load unsuppressed}
\newcommand{\ffwiw}{median numbers of infections across all model fits shown}
\newcommand{\fftpaf}{TPAF: transmission population attributable fraction, \sref{foi.exp.model.tpaf}}
%---------------------------------------------------------------------------------------------------
% figures
\usepackage{subcaption,graphicx,lscape}
\graphicspath{
{front/fig/}
{intro/fig/}
{sr/fig/}
{model/fig/}{model/fig/fsw/}{model/fig/fit/}
{foi/fig/}{foi/fig/fit/}
{art/fig/}}
\newcommand{\subcapoverlap}{\captionsetup[subfigure]{skip=-\baselineskip,margin=0pt}}
\newcommand{\iterfig}[6][]{\vskip\textfloatsep
\setcaptiontype{figure}
\foreach \var/\cap in #4{
\parbox[t]{\dimexpr#3\linewidth-1em}{%
\includegraphics[width=\linewidth]{#2.\var}
\subcaption{\cap}\label{fig:#2.\var}}\ifx1#3\par\fi}
\caption{#5}\label{fig:#2#1}\floatfoot{#6}}
\def\fitscale{.475}
%---------------------------------------------------------------------------------------------------
% tables
\usepackage{booktabs,longtable,rotating,multicol,multirow,csvsimple}
\newcommand{\tn}[1]{\textsuperscript{\rlap{\,#1}}}
\newcommand{\tnt}[2][*]{\textsuperscript{#1\,}{#2}}
\newcommand{\tabitem}{{\textbullet}\hskip.5em}
\renewcommand{\d}{\hphantom{0}}
\newcommand{\m}{\hphantom{-}}
\newcommand{\s}{\rlap{\tsup{*}}}
\newcommand{\vsig}{\llap{$<$}0.001\s\xspace}
\makeatletter
\let\olongtable\longtable\let\oendlongtable\endlongtable
\renewenvironment{longtable}[5][]{% fmt,cols,caption,header,footer
\begingroup\singlespacing#1
\olongtable[#1]{#2}\caption{#3} \\
\toprule #4 \\ \midrule \endfirsthead
\multicolumn{\LT@cols}{l}{\dots~continued} \\ \midrule #4 \\ \midrule \endhead
\midrule \multicolumn{\LT@cols}{l}{continued~\dots} \endfoot
\bottomrule \noalign{\vskip\abovecaptionskip} \multicolumn{\LT@cols}{l}{%
\begin{minipage}{\dimexpr\linewidth-2\tabcolsep} \footnotesize#5 \end{minipage}} \endlastfoot
}{\oendlongtable\endgroup}
\makeatother
%---------------------------------------------------------------------------------------------------
% acronyms & symbols
\usepackage{xspace,pifont}
\newcommand{\eg}{{e.g.,}\xspace}
\newcommand{\ie}{{i.e.,}\xspace}
\newcommand{\nb}{{n.b.}\xspace}
\newcommand{\vs}{{vs.}\xspace}
\newcommand{\ttilde}{\textasciitilde\,}
\newcommand{\hivp}{HIV$+$\xspace}
\newcommand{\hivn}{HIV$-$\xspace}
\newcommand{\hivu}{HIV\,?\,\xspace}
\newcommand{\REF}{\textsc{ref}\xspace}
\newcommand{\wph}{\textsc{wph}\xspace}
\newcommand{\bph}{\textsc{bph}\xspace}
\newcommand{\ir}{\textsc{ir}\xspace}
\newcommand{\ip}{\textsc{ip}\xspace}
\newcommand{\covid}{COVID-19\xspace}
\newcommand{\ird}{\textcolor{ird}{\textsc{ird}}\xspace}
\newcommand{\iry}{\textcolor{iry}{\textsc{iry}}\xspace}
\newcommand{\ipy}{\textcolor{ipy}{\textsc{ipy}}\xspace}
\newcommand{\epa}{\textcolor{epa}{\textsc{epa}}\xspace}
\newcommand{\caslo}{\textcolor{caslo}{\mbox{60-40-80}}\xspace}
\newcommand{\casmd}{\textcolor{casmd}{\mbox{80-80-90}}\xspace}
\newcommand{\cashi}{\textcolor{cashi}{\mbox{95-95-95}}\xspace}
\newcommand{\yes}{\ding{51}\xspace}
\newcommand{\no}{\ding{55}\xspace}
\renewcommand{\ast}{\raisebox{-.5ex}{*}\xspace}
\newcommand{\p}{\bar{p}}
\newcommand{\E}{\txn{E}}
%---------------------------------------------------------------------------------------------------
% short text styles
\newcommand{\tdef}[2]{#1{\,:\,}\txn{#2}}
\newcommand{\opname}[1]{\operatorname{#1}\,}
\newcommand{\tsub}[1]{\textsubscript{#1}}
\newcommand{\tsup}[1]{\textsuperscript{#1}}
\newcommand{\shortquote}[1]{``\emph{#1}''}
\newcommand{\hreftt}[2][https://]{\href{#1#2}{\texttt{#2}}}
\newcommand{\sref}[1]{\S\,\ref{#1}}
\newcommand{\sfref}[1]{(\subref{#1})}
\renewcommand{\eqref}[1]{Eq.~(\ref{#1})}
\newcommand{\eqrefs}[2]{Eqs.~(\ref{#1})~and~(\ref{#2})}
\newcommand{\eqrefr}[2]{Eqs.~(\ref{#1})--(\ref{#2})}
\newcommand{\ifempty}[3]{\if\relax\detokenize{#1}\relax#2\else#3\fi}
\newcommand{\cdf}[2]{\ifempty{#2}{CD4\,$>$\,#1}{\ifempty{#1}{}{#1\,$<$\,}CD4\,$<$\,#2}}
\renewenvironment{quote}{\list{}{\rightmargin=\leftmargin\topsep=0pt}\item\relax\itshape}{\endlist}
\let\txn\textnormal
%---------------------------------------------------------------------------------------------------
% itemize & enumerate
\usepackage{enumitem}
\setitemize{itemsep=0pt,topsep=0pt}
\setenumerate{itemsep=0pt,topsep=0pt}
%---------------------------------------------------------------------------------------------------
% systematic review styles
\usepackage{tikz}
\newcommand{\srds}[1]{Dataset~\hyperref{}{sr.dataset}{#1}{#1}}
\newcommand{\srt}[1]{{\ttfamily#1}}
\newcommand{\srcite}[1]{\quad\tabitem
\parbox{3em}{\parencite{#1}}
\parbox{3em}{\citeyear{#1}}
\citeauthor{#1}}
\newenvironment{srcites}%
{\begin{multicols}{2}\footnotesize\setlength\parskip{0pt}}%
{\end{multicols}}
\usepackage{pdfpages}
% end