-
Notifications
You must be signed in to change notification settings - Fork 20
/
preamble.tex
186 lines (161 loc) · 5.75 KB
/
preamble.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
% explicitly call these packages to avoid this issue:
% https://stackoverflow.com/questions/46080853/why-does-rendering-a-pdf-from-rmarkdown-require-closing-rstudio-between-renders?
% utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{array}
\usepackage{multirow}
\usepackage{color} % enables font colors
\usepackage{wrapfig}
\usepackage{float}
\usepackage{colortbl}
\usepackage{pdflscape}
\usepackage{tabu}
\usepackage{threeparttable}
\usepackage[normalem]{ulem}
\usepackage[export]{adjustbox} % enables two column images at the top
\usepackage{makecell} % for library(kableExtra)
%\usepackage{tabularx} % for library(kableExtra)
% set font encoding for PDFLaTeX or XeLaTeX
\usepackage[utf8]{inputenc} % sets document encoding to utf8
\usepackage[default]{lato} % sets default font to Lato
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{memhfixc}
\usepackage{amssymb} % for itemized list styles
% document setup
\definecolor{urbnblue}{HTML}{1696D2} % defines the Urban Institute blue color
\usepackage{enumitem} % bullet alignment
\setlist[2]{nosep} % sets the itemsep and parsep for all level two lists to 0
\setenumerate{nosep} % sets no itemsep for enumerate lists only
\pagenumbering{gobble} % disable page numbering
\usepackage[hang,flushmargin]{footmisc} % don't indent footnotes
\usepackage[document]{ragged2e} % ragged right
\usepackage[none]{hyphenat} % disable work breaks
\renewcommand\thefootnote{\textcolor{urbnblue}{\arabic{footnote}}} % change the color of the footnote indicator
\hypersetup{
colorlinks,
linkcolor=urbnblue,
urlcolor=urbnblue,
}
\usepackage{parskip}
\setlength{\parskip}{0.1in} % set paragraph spacing
% urban institute logo
\newcommand{\urbnlogo}[0]{
\begin{figure}
\hspace{-0.12in}
\includegraphics[width=1.5in]{design/urban_grid_blue_white.jpg}
\label{fig:boat1}
\end{figure}
}
% contact information
\newcommand{\contactinfo}[0]{
\thispagestyle{empty}
\begin{tikzpicture}[remember picture, overlay]
\draw
node[anchor=south west, minimum height=0.5in, minimum width=8.5in, text width=8in] at ($(current page.south west) + (0.75in,0.13in)$)
{\color{gray}Urban Institute \space
\color{urbnblue}$\blacksquare$ \space
\color{gray}500 L'Enfant Plaza \space
\color{urbnblue}$\blacksquare$ \space
\color{gray}Washington, DC 20024 \space
\color{urbnblue}$\blacksquare$ \space
\color{gray}202.833.7200 \space
\color{urbnblue}$\blacksquare$ \space
\textcolor{urbnblue}{www.urban.org}};
\end{tikzpicture}
}
% titles (14pt font)
\newcommand{\urbntitle}[1]{
\begin{center}
\textbf{\LARGE{#1}}
\end{center}
}
% subtitles (12pt font)
\newcommand{\urbnsubtitle}[1]{
\begin{center}
\Large{\textcolor{urbnblue}{#1}}
\vspace{0.25in}
\end{center}
}
% authors (11pt font)
\newcommand{\urbnauthors}[1]{
\begin{center}
\textit{\large{#1}}
\vspace{0.25in}
\end{center}
}
% heading 1
\newcommand{\urbnheadingone}[1]{
\textbf{\LARGE{\\} \large{#1}}
}
% heading 2
\newcommand{\urbnheadingtwo}[1]{
\textbf{\textcolor{urbnblue}{#1}}
}
% figure label
\newcommand{\urbnfigurenumber}[1]{
\textcolor{urbnblue}{\tiny{\\} \normalsize{FIGURE #1 \\}}
}
% figure title
\newcommand{\urbnfiguretitle}[1]{
\textbf{\normalsize{#1} \\}
}
% figure source
\newcommand{\urbnsource}[1]{
\footnotesize{\textbf{Source: }#1} \normalsize\break
}
% figure note
\newcommand{\urbnnote}[1]{
\footnotesize{\textbf{Note: }#1} \normalsize\break
}
% table label
\newcommand{\urbntablenumber}[1]{
\textcolor{urbnblue}{\tiny{\\} \normalsize{TABLE #1 \\}}
}
% table title
\newcommand{\urbntabletitle}[1]{
\textbf{\normalsize{#1} \\}
}
% table sub title
\newcommand{\urbntablesubtitle}[1]{
\textit{\normalsize{#1} \\}
}
% bullet points
\renewcommand{\labelitemi}{\color{urbnblue}\tiny$\blacksquare$} % blue square
\renewcommand{\labelitemii}{\color{urbnblue}\tiny$\blacksquare$} % blue square
\renewcommand{\labelitemiii}{\color{urbnblue}\tiny$\blacksquare$} % blue square
\renewcommand{\labelitemiv}{\color{urbnblue}\tiny$\blacksquare$} % blue square
\newenvironment{urbnbullets}
{\begin{itemize}[leftmargin=*,labelindent=0.25in,labelsep=0.1875in]
\setlength{\itemsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}}
{\end{itemize}}
% numbered list
\newenvironment{urbnenumerate}
{\begin{enumerate}[leftmargin=*,labelindent=0.25in,labelsep=0.15625in]
\setlength{\itemsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}}
{\end{enumerate}}
% boiler plate
\newcommand{\urbnboilerplate}[3]{
\thispagestyle{empty}
\begin{tikzpicture}[remember picture, overlay]
% horizontal line
\draw (current page.south west) + (1in,1.25in) -- ($(current page.south east) + (-1in, 1.25in)$);
% boilerplat language
\draw
node[align=left, anchor=south west, minimum height=0.5in, minimum width=8.5in, text width=6.5in] at ($(current page.south west) + (0in,0.38in)$)
{
\small{This fact sheet was funded by #1. The views expressed are those of the author/authors and should not be attributed to the Urban Institute, its trustees, or its funders. Further information on the Urban Institute’s funding principles is available at \href{https://www.urban.org/aboutus/our-funding/funding-principles}{urban.org/fundingprinciples.}
Copyright © #2 #3. Urban Institute. Permission is granted for reproduction of this file, with attribution to the Urban Institute.}
};
\end{tikzpicture}
}
% eliminates top border line for the table
\def\toprule{}
% sets midline at 1pt
\setlength{\lightrulewidth}{1pt}