├── .gitignore ├── README.md ├── latex-article ├── article.pdf ├── article.tex ├── auxiliary │ ├── article.bbl-SAVE-ERROR │ └── article.bcf-SAVE-ERROR ├── base.pdf ├── base.tex ├── math.sty ├── online_supplement.pdf ├── online_supplement.tex ├── paper.sty ├── references.bib └── tables │ └── summary.tex ├── latex-slides ├── base.pdf ├── base.tex ├── figures │ ├── plot_did2s_retail_slides.pdf │ └── plot_did2s_retail_slides.tex ├── math.sty ├── references.bib ├── slides.pdf ├── slides.sty └── slides.tex ├── referee-response ├── referee-response.sty ├── responses.pdf └── responses.tex ├── render.R └── thumbnails ├── latex-article-1.png ├── latex-article-2.png ├── latex-slides-1.png ├── latex-slides-2.png ├── latex-slides-3.png └── referee-response-1.png /.gitignore: -------------------------------------------------------------------------------- 1 | # DS_Store on mac 2 | **/.DS_Store 3 | 4 | # Quarto specific files 5 | docs/* 6 | **/.quarto/ 7 | **/site_libs/ 8 | **/_site/* 9 | 10 | # R files 11 | .Rhistory 12 | .Rapp.history 13 | .RData 14 | .RDataTmp 15 | .Ruserdata 16 | .Rproj.user/ 17 | *_cache/ 18 | /cache/ 19 | *.utf8.md 20 | *.knit.md 21 | .Renviron 22 | 23 | # Latex auxiliary files 24 | *.aux 25 | *.lof 26 | *.log 27 | *.lot 28 | *.fls 29 | *.out 30 | *.toc 31 | *.fmt 32 | *.fot 33 | *.cb 34 | *.cb2 35 | .*.lb 36 | *.bbl 37 | *.bcf 38 | *.blg 39 | *.fdb_latexmk 40 | *.run.xml 41 | *.synctex.gz 42 | *.nav 43 | *.snm 44 | *.listing 45 | *.vrb 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Latex templates 2 | 3 | This is a repository of all my latex templates. I've done my best to document every line of code for these themes so that you can understand what it does and delete/modify things as you see fit. You can see a live preview of each one here: 4 | 5 | [Slides](https://raw.githack.com/kylebutts/latex-templates/main/latex-slides/slides.pdf) | 6 | [Article](https://raw.githack.com/kylebutts/latex-templates/main/latex-article/article.pdf) | 7 | [Referee Report](https://raw.githack.com/kylebutts/latex-templates/main/referee-response/responses.pdf) 8 | 9 | 10 | ## Latex Slides 11 | 12 | 13 | [](thumbnails/latex-slides-1.png) 14 | [](thumbnails/latex-slides-2.png) 15 | [](thumbnails/latex-slides-3.png) 16 | 17 | 18 | This latex slide aims for nice typography, minimal aesthetics so the focus is on the content, and a set of helpful commands including easily colored words, full-size image frames, table highlighting, multi-column layouts, and more. The theme is highly customizable with (1) a well commented `slides.sty` file so you can tweak it and make it your own and (2) by defining the colors in the top of your document: 19 | 20 | ```latex 21 | % Define `accent`/`accent2` colors for theme customization 22 | \definecolor{accent}{HTML}{006896} 23 | \definecolor{accent2}{HTML}{E64173} 24 | \usepackage{slides} 25 | ``` 26 | 27 | 28 | ## Latex Article 29 | 30 | 31 | [](thumbnails/latex-article-1.png) 32 | [](thumbnails/latex-article-2.png) 33 | 34 | 35 | 36 | 37 | This is how I write my papers. There's not many special bells and whistles, but I think it looks nice and clean. 38 | 39 | ### Math commands 40 | 41 | I have a set of math commands in `math.sty` that borrow heavily from [Pascal Michaillat](https://github.com/pmichaillat/latex-math). See the document for examples of what I've included. 42 | 43 | ### Easily-hideable comments in paper 44 | 45 | This also includes a very useful way to leave notes in a document. Then, you can comment `\kyle{Thoughts here}` to leave a comment. Toggling `\booltrue` to `\boolfalse` will hide the comments from the document. 46 | 47 | ```tex 48 | % Conditionally display thoughts (hide by switching to `\boolfalse`) 49 | \booltrue{INCLUDECOMMENTS} 50 | \newcommand{\kyle}[1]{\coauthorComment[Kyle]{#1}} 51 | ``` 52 | 53 | #### Use `biblatex` instead of `natbib` 54 | 55 | In paper.sty, replace 56 | ```tex 57 | \usepackage{natbib} 58 | \bibliographystyle{econ-aea} 59 | ``` 60 | with 61 | ```tex 62 | \usepackage[ 63 | style = chicago-authordate, 64 | doi = true, 65 | backend = biber, 66 | natbib = true 67 | ]{biblatex} 68 | \usepackage[authordate, backend = biber]{biblatex-chicago} 69 | ``` 70 | 71 | 2. Add the following 72 | 73 | In the main document, do the following: 74 | 1. Add `\addbibresource{references.bib}` before `\begin{document}` 75 | 2. Replace `\bibliography{references.bib}` with ` ` 76 | 77 | 78 | 79 | ## Response to Referees 80 | 81 | 82 | [](thumbnails/referee-response-1.png) 83 | 84 | 85 | The goal of this is to make referee reports look nice and make it easy to structure the document. For each referee, use this to create a section with the referee: 86 | 87 | ```tex 88 | \NewRef{Referee 1}{R1} 89 | ``` 90 | 91 | Then for each comment, wrap the referee's comment with a `refcomment` environment and it will create a subsection and automatically number the comments 92 | ```tex 93 | \begin{refcomment} 94 | 95 | \end{refcomment} 96 | ``` 97 | 98 | 99 | ## .gitignore 100 | 101 | This is a recommended set of files to include in `.gitignore` to not commit ugly latex auxiliary files: 102 | 103 | ```text 104 | *.aux 105 | *.lof 106 | *.log 107 | *.lot 108 | *.fls 109 | *.out 110 | *.toc 111 | *.fmt 112 | *.fot 113 | *.cb 114 | *.cb2 115 | .*.lb 116 | *.bbl 117 | *.bcf 118 | *.blg 119 | *.fdb_latexmk 120 | *.run.xml 121 | *.synctex.gz 122 | *.nav 123 | *.snm 124 | *.listing 125 | *.vrb 126 | ``` 127 | -------------------------------------------------------------------------------- /latex-article/article.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/latex-article/article.pdf -------------------------------------------------------------------------------- /latex-article/article.tex: -------------------------------------------------------------------------------- 1 | \documentclass[12pt]{article} 2 | \usepackage{paper,math} 3 | \addbibresource{references.bib} 4 | 5 | \title{Example Paper Title\thanks{\acknlowledgements}} 6 | \author{ 7 | Author One\\ {\itshape\large Affiliation} 8 | \and 9 | Author Two\\ {\itshape\large Affiliation} 10 | } 11 | \date{\today} 12 | \def\acknlowledgements{% 13 | One: \href{mailto:email@gmail.com}{email@gmail.com}. 14 | Two: \href{mailto:email@gmail.com}{email@gmail.com}. 15 | Acknlowedgements start here 16 | } 17 | \hypersetup{ 18 | pdftitle = {Example Paper Title}, 19 | pdfauthor = {Author One, Author Two}, 20 | } 21 | 22 | % Conditionally display thoughts (hide by switching to `\boolfalse`) 23 | \booltrue{INCLUDECOMMENTS} 24 | \newcommand{\kyle}[1]{\coauthorComment[Kyle]{#1}} 25 | 26 | \begin{document} 27 | 28 | % Title Page ------------------------------------------------------------------- 29 | \maketitle 30 | \begin{abstract} 31 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 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. 32 | 33 | \par~\par\noindent 34 | {\color{zinc700}Keywords:} ... 35 | \par\noindent 36 | {\color{zinc700}JEL-Classification:} ... 37 | \par\vspace{-2.5mm} 38 | \end{abstract} 39 | \newpage 40 | 41 | % Paper ------------------------------------------------------------------------ 42 | % ------------------------------------------------------------------------------ 43 | \section{Introduction} 44 | % ------------------------------------------------------------------------------ 45 | 46 | Hi and welcome to my default paper template. I tried to make the theme minimal and beautiful while able to do all the things that I want it to do. These include making it easy to make figures/tables with notes; have powerful math commands; have nice readable typography; make co-authoring in a document easy; have a nice looking bibliography; and make appendices easy. 47 | I'll show off these things, but make sure to check the source code alongside to see how simple it is to typset with this. 48 | \kyle{I'm including this comment for coauthors. If I switch above to \texttt{togglefalse}, this will dissapear.} 49 | 50 | See below for \autoref{thm:residue_thm}, the regression specification (\ref{eq:fe_reg}), \autoref{tab:summ_stat}, \autoref{fig:event_timing}, appendix \autoref{tab:reg1}. Of course, make sure to touch up on your micro theory with \citet{mas1995microeconomic}. I also provide a set of colors: \navy{Navy}, \teal{Teal}, \purple{Purple}, \cranberry{Cranberry}, \orange{Orange}. 51 | 52 | % ------------------------------------------------------------------------------ 53 | \section{Highlights} 54 | % ------------------------------------------------------------------------------ 55 | 56 | % ------------------------------------------------------------------------------ 57 | \subsection{Math Commands} 58 | % ------------------------------------------------------------------------------ 59 | 60 | Theorem environments look nice. There are the following environments and their numbering resets automatically for appendices: \texttt{theorem}, \texttt{proposition}, \texttt{assumption}, \texttt{example}, \texttt{lemma}, \texttt{corollary}, \texttt{definition}, \texttt{remark} 61 | 62 | \begin{theorem}[Example Theorem]\label{thm:residue_thm} 63 | This is an example theorem \[ 64 | \hat{\beta}=\frac{\sum_{\ell}e_{\ell}z_{\ell}y_{\ell}^{\perp}}{\sum_{\ell}e_{\ell}z_{\ell}x_{\ell}^{\perp}} 65 | \] 66 | \end{theorem} 67 | 68 | Jibberish math to show off symbols: 69 | 70 | \begin{equation}\label{eq:fe_reg} 71 | y = f(X) + \varepsilon = X \beta + \psi_i + \nu_t + w_{i,t} + \varepsilon_{i,t} 72 | \end{equation} 73 | 74 | I've included a file \texttt{math.sty} that has a set of math operators that I find useful.\footnote{Credit to \url{https://pascalmichaillat.org/d3/} for his math commands package which I took almost all of this from.} 75 | 76 | The command \texttt{\textbackslash E[optional]\{optional\}\{optional\}} now lets you specify subscript, the inner term, and a second bracket to do conditional expectation. All three are optional and \textbackslash expec is a alias. 77 | $$\E \quad \E[i] \quad \E{X_i} \quad \E[i]{X_i} \quad \E{X_i}{n} \quad \E[i]{X_i}{n}$$ 78 | 79 | \texttt{\textbackslash P}, \texttt{\textbackslash prob}, \texttt{\textbackslash cov}, and \texttt{\textbackslash var} work the same way too: 80 | $$\P \quad \P[i] \quad \P{X_i} \quad \P[i]{D_i} \quad \P{\bar{X}_n > \bar{X}}{\mu = \mu_0} \quad \P[\mu]{X}{D = 1}$$ 81 | $$\cov{X_n, Y_n} \quad \var[i](\bar{X}_n) \quad \diag{x_i}$$ 82 | 83 | \texttt{\textbackslash one} does an indicator. Same as above, but no conditional: 84 | $$\one{X_i > 0} \quad (Y_i, D_i) \indep X_i$$ 85 | 86 | We have \texttt{\textbackslash asto}, \texttt{\textbackslash pto}, and \texttt{\textbackslash dto} for convergence symbols: 87 | $$\bar{x}_n \asto \mu \quad \bar{x}_n \pto \mu \quad \bar{x}_n \dto N(0, 1)$$ 88 | 89 | There's also \texttt{\textbackslash iid} and \texttt{\textbackslash plim} for the probability limit operator: 90 | $$\plim_{n\to \infty} \frac{1}{n} X' X = S_{X'X} \quad X_i \iid N(0, 1)$$ 91 | 92 | To wrap things in automatically scaling wrappers, can use \texttt{\textbackslash bp} for parenthesis, \texttt{\textbackslash bc} for curly braces, and \texttt{\textbackslash bs} for square brackets: 93 | $$\bp{y_i} \quad \bc{y_i} \quad \bs{y_i}$$ 94 | 95 | Similar to expectations, I have `upgraded' \texttt{\textbackslash min}, \texttt{\textbackslash inf}, \texttt{\textbackslash liminf}, \texttt{\textbackslash max}, \texttt{\textbackslash sup}, and \texttt{\textbackslash limsup} commands to use the optional `\texttt{[]}' for subscript: 96 | $$\min[i]{x_i} \quad \inf[i]{x_i} \quad \liminf[n \to \infty]{x_i}$$ 97 | $$\max[i]{x_i} \quad \sup[i]{x_i} \quad \limsup[n \to \infty]{x_i}$$ 98 | 99 | 100 | % ------------------------------------------------------------------------------ 101 | \subsection{Tables} 102 | % ------------------------------------------------------------------------------ 103 | 104 | For tables, I use the \texttt{tabular} and \texttt{booktabs} packages. For table and figure notes, I use a custom \texttt{\textbackslash note} command. It uses \texttt{\textbackslash parbox} under the hood. You can use it in one of of four ways: 105 | \begin{enumerate} 106 | \item \texttt{\textbackslash note\{text\}} 107 | \item \texttt{\textbackslash note[Notes.]\{text\}} 108 | \item \texttt{\textbackslash note\{0.6\textbackslash textwidth\}\{text\}} 109 | \item \texttt{\textbackslash note[Notes.]\{0.6\textbackslash textwidth\}\{text\}} 110 | \end{enumerate} 111 | 112 | In addition, I use the \texttt{adjustbox} package for resizing figures/tables. It automatically scales the figure/table proportionally, so things look right. For example, here's a table that's too wide. I use the \texttt{adjustbox} package to fix it. 113 | 114 | \begin{table}[ht] 115 | \caption{Table Too Wide (adjustbox)}\label{tab:summ_stat} 116 | \centering 117 | 118 | \begin{adjustbox}{width = \textwidth, center} 119 | \begin{tabular}{ 120 | @{} @{\extracolsep{5pt}} l*{8}{r} @{} 121 | } 122 | % Head 123 | \toprule 124 | & & & \multicolumn{2}{c}{Market Access} & \multicolumn{2}{c}{Urban Weekly Wage} & \multicolumn{2}{c}{Nonurban Weekly Wage} \\ 125 | \cmidrule{4-5} \cmidrule{6-7} \cmidrule{8-9} 126 | Year & \multicolumn{1}{c}{N} & \% Urban & Mean & SD & Mean & SD & Mean & SD \\ 127 | \hline 128 | 129 | % Body 130 | \input{tables/summary.tex} 131 | 132 | \bottomrule 133 | \end{tabular} 134 | \end{adjustbox} 135 | 136 | \note{Weekly wage is reported in 2015.} 137 | \end{table} 138 | 139 | Figures also use the \texttt{\textbackslash note} and the \texttt{adjustbox} package. Here's an example figure: 140 | 141 | \begin{figure}[b!] 142 | \caption{Event-timing}\label{fig:event_timing} 143 | \begin{adjustbox}{width = 0.6\textwidth, center} 144 | \begin{tikzpicture} 145 | \draw (0,0) -- (11,0); 146 | \foreach \x in {0.8,4,5.5,7,10.2} 147 | \draw(\x cm,3pt) -- (\x cm, -3pt); 148 | \draw (0.8,0) node[below=3pt] {$T_0$}; 149 | \draw (4,0) node[below=3pt] {$T_1$}; 150 | \draw (5.5,0) node[below=3pt] {$0$}; 151 | \draw (7,0) node[below=3pt] {$T_2$}; 152 | \draw (10.2,0) node[below=3pt] {$T_3$}; 153 | \draw (2.35,0) node[above=6pt, align=center] 154 | {\begin{tabular}{c}Estimation \\Window\end{tabular}}; 155 | \end{tikzpicture} 156 | \end{adjustbox} 157 | 158 | \begin{center} 159 | \note{0.6\textwidth}{This is an example figure in the paper} 160 | \end{center} 161 | \end{figure} 162 | 163 | % ------------------------------------------------------------------------------ 164 | \newpage~\printbibliography 165 | % \bibliography{references.bib} % Uncomment this if using `natbib` 166 | % ------------------------------------------------------------------------------ 167 | 168 | % ------------------------------------------------------------------------------ 169 | \newpage~\appendix 170 | % ------------------------------------------------------------------------------ 171 | 172 | % ------------------------------------------------------------------------------ 173 | \section{Additional Results} 174 | % ------------------------------------------------------------------------------ 175 | 176 | The appendix will automatically start numbering tables, figures, and theorem-like environments using the appendix section \textbackslash Alph (e.g. \autoref{tab:reg1}). 177 | 178 | \citet{mas1995microeconomic} 179 | 180 | % ------------------------------------------------------------------------------ 181 | \subsection{Regression Results} 182 | % ------------------------------------------------------------------------------ 183 | 184 | The main regression equation is 185 | \begin{equation} 186 | y_i = \bm{X}_i \beta + u_i. 187 | \end{equation} 188 | 189 | Results are presented in \autoref{tab:reg1}. In this table example, the table is narrower than textwidth, so I adjust the \texttt{\textbackslash note} width. 190 | 191 | \begin{table}[h!] 192 | \caption{Regression Results} 193 | \label{tab:reg1} 194 | \begin{center} 195 | \begin{tabular}{@{} lrr @{}} 196 | % Head 197 | \toprule 198 | & \multicolumn{2}{c}{\textit{Dependent variable:} \ Overall Rating} \\ 199 | \cmidrule{2-3} 200 | & (1) & (2) \\ 201 | \hline 202 | 203 | % Body 204 | Handling of Complaints & 0.692$^{***}$ (0.149) & 0.682$^{***}$ (0.129) \\ 205 | No Special Privileges & $-$0.104 (0.135) & $-$0.103 (0.129) \\ 206 | Opportunity to Learn & 0.249 (0.160) & 0.238$^{*}$ (0.139) \\ 207 | Performance-Based Raises & $-$0.033 (0.202) & \\ 208 | Too Critical & 0.015 (0.147) & \\ 209 | Advancement & 11.011 (11.704) & 11.258 (7.318) \\ 210 | \hline 211 | Observations & 30 & 30 \\ 212 | Adjusted R$^{2}$ & 0.656 & 0.682 \\ 213 | 214 | \bottomrule 215 | \end{tabular} 216 | 217 | \note{0.68\textwidth}{Using R base dataframe attitude. 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.} 218 | \note[]{0.68\textwidth}{$^{*}$ $p < 0.1$; $^{**}$ $p < 0.05$; $^{***}$ $p < 0.01$.} 219 | \end{center} 220 | \end{table} 221 | 222 | 223 | \end{document} 224 | -------------------------------------------------------------------------------- /latex-article/auxiliary/article.bbl-SAVE-ERROR: -------------------------------------------------------------------------------- 1 | % $ biblatex auxiliary file $ 2 | % $ biblatex bbl format version 3.3 $ 3 | % Do not modify the above lines! 4 | % 5 | % This is an auxiliary file used by the 'biblatex' package. 6 | % This file may safely be deleted. It will be recreated by 7 | % biber as required. 8 | % 9 | \begingroup 10 | \makeatletter 11 | \@ifundefined{ver@biblatex.sty} 12 | {\@latex@error 13 | {Missing 'biblatex' package} 14 | {The bibliography requires the 'biblatex' package.} 15 | \aftergroup\endinput} 16 | {} 17 | \endgroup 18 | 19 | 20 | \refsection{0} 21 | \datalist[entry]{cms/global//global/global/global} 22 | \entry{mas1995microeconomic}{book}{}{} 23 | \name{author}{3}{}{% 24 | {{hash=b76f97409971b7c349c5ca95c956f216}{% 25 | family={Mas-Colell}, 26 | familyi={M\bibinithyphendelim C\bibinitperiod}, 27 | given={Andreu}, 28 | giveni={A\bibinitperiod}}}% 29 | {{hash=af8fb43e720fb828e2675ca752dab059}{% 30 | family={Whinston}, 31 | familyi={W\bibinitperiod}, 32 | given={Michael\bibnamedelima Dennis}, 33 | giveni={M\bibinitperiod\bibinitdelim D\bibinitperiod}}}% 34 | {{hash=3351d53ca164d7525b03413fc0e38b7c}{% 35 | family={Green}, 36 | familyi={G\bibinitperiod}, 37 | given={Jerry\bibnamedelima R}, 38 | giveni={J\bibinitperiod\bibinitdelim R\bibinitperiod}}}% 39 | } 40 | \list{publisher}{1}{% 41 | {Oxford university press New York}% 42 | } 43 | \strng{namehash}{eba193a65b833f23ce32186bd3529df8} 44 | \strng{fullhash}{eba193a65b833f23ce32186bd3529df8} 45 | \strng{fullhashraw}{eba193a65b833f23ce32186bd3529df8} 46 | \strng{bibnamehash}{eba193a65b833f23ce32186bd3529df8} 47 | \strng{authorbibnamehash}{eba193a65b833f23ce32186bd3529df8} 48 | \strng{authornamehash}{eba193a65b833f23ce32186bd3529df8} 49 | \strng{authorfullhash}{eba193a65b833f23ce32186bd3529df8} 50 | \strng{authorfullhashraw}{eba193a65b833f23ce32186bd3529df8} 51 | \field{sortinit}{M} 52 | \field{sortinithash}{4625c616857f13d17ce56f7d4f97d451} 53 | \field{extradatescope}{labelyear} 54 | \field{labeldatesource}{} 55 | \field{labelnamesource}{author} 56 | \field{labeltitlesource}{title} 57 | \field{title}{Microeconomic theory} 58 | \field{volume}{1} 59 | \field{year}{1995} 60 | \endentry 61 | \enddatalist 62 | \endrefsection 63 | \endinput 64 | 65 | -------------------------------------------------------------------------------- /latex-article/base.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/latex-article/base.pdf -------------------------------------------------------------------------------- /latex-article/base.tex: -------------------------------------------------------------------------------- 1 | \documentclass[12pt]{article} 2 | \usepackage{paper,math} 3 | \addbibresource{references.bib} 4 | 5 | \title{Example Paper Title\thanks{\acknlowledgements}} 6 | \author{ 7 | Author One\\ {\itshape\large Affiliation} 8 | \and 9 | Author Two\\ {\itshape\large Affiliation} 10 | } 11 | \date{\today} 12 | \def\acknlowledgements{% 13 | One: \href{mailto:email@gmail.com}{email@gmail.com}. 14 | Two: \href{mailto:email@gmail.com}{email@gmail.com}. 15 | Acknlowedgements start here 16 | } 17 | \hypersetup{ 18 | pdftitle = {Example Paper Title}, 19 | pdfauthor = {Author One, Author Two}, 20 | } 21 | 22 | % Conditionally display thoughts (hide by switching to `\boolfalse`) 23 | \booltrue{INCLUDECOMMENTS} 24 | \newcommand{\kyle}[1]{\coauthorComment[Kyle]{#1}} 25 | 26 | \begin{document} 27 | 28 | % Title Page ------------------------------------------------------------------- 29 | \maketitle 30 | \begin{abstract} 31 | Abstract goes here ... 32 | 33 | 34 | \par~\par\noindent 35 | {\color{asher}JEL-Classification:} ... 36 | \par\noindent 37 | {\color{asher}Keywords:} ... 38 | \par\vspace{-2.5mm} 39 | \end{abstract} 40 | 41 | \newpage 42 | 43 | 44 | % Paper ------------------------------------------------------------------------ 45 | 46 | % ------------------------------------------------------------------------------ 47 | \section{Introduction} 48 | % ------------------------------------------------------------------------------ 49 | 50 | 51 | 52 | 53 | 54 | % ------------------------------------------------------------------------------ 55 | % \printbibliography 56 | % ------------------------------------------------------------------------------ 57 | 58 | 59 | % ------------------------------------------------------------------------------ 60 | \newpage~\appendix 61 | % ------------------------------------------------------------------------------ 62 | 63 | \section{Appendix Section} 64 | 65 | hm 66 | 67 | Text goes here 68 | 69 | 70 | 71 | \end{document} 72 | -------------------------------------------------------------------------------- /latex-article/math.sty: -------------------------------------------------------------------------------- 1 | % Lightly modified from: https://pascalmichaillat.org/d3/ 2 | \usepackage{xparse} 3 | 4 | % --- Brackets --- 5 | \newcommand{\bc}[1]{\left\lbrace #1 \right\rbrace} 6 | \newcommand{\bp}[1]{\left( #1 \right)} 7 | \newcommand{\bs}[1]{\left[ #1 \right]} 8 | \newcommand{\abs}[1]{\left\lvert #1 \right\rvert} 9 | \newcommand{\absx}[1]{\lvert #1 \rvert} 10 | \newcommand{\norm}[1]{\left\lVert #1 \right\rVert} 11 | \newcommand{\normx}[1]{\lVert #1 \rVert} 12 | \newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor} 13 | \newcommand{\floorx}[1]{\lfloor #1 \rfloor} 14 | \newcommand{\of}[1]{{\left( #1 \right)}} 15 | 16 | % --- Operators --- 17 | % Logarithm 18 | \let\oldln\ln 19 | \RenewDocumentCommand{\ln}{g}{\IfNoValueTF{#1}{\oldln}{\,{\oldln}{\bp{#1}}}} 20 | 21 | % Exponential 22 | \let\oldexp\exp 23 | \RenewDocumentCommand{\exp}{g}{\IfNoValueTF{#1}{\oldexp}{\,{\oldexp}{\bp{#1}}}} 24 | 25 | % Maximum / Supremum / Limit Supremum 26 | \let\oldmax\max 27 | \RenewDocumentCommand{\max}{o g}{% 28 | \IfNoValueTF{#2}{\oldmax\IfValueT{#1}{_{#1}}}% 29 | {\,{\oldmax\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 30 | 31 | \let\oldsup\sup 32 | \RenewDocumentCommand{\sup}{o g}{% 33 | \IfNoValueTF{#2}{\oldsup\IfValueT{#1}{_{#1}}}% 34 | {\,{\oldsup\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 35 | 36 | \let\oldlimsup\limsup 37 | \RenewDocumentCommand{\limsup}{o g}{% 38 | \IfNoValueTF{#2}{\oldlimsup\IfValueT{#1}{_{#1}}}% 39 | {\,{\oldlimsup\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 40 | 41 | % Argmax 42 | \DeclareMathOperator*{\argmax}{argmax} 43 | 44 | % Minimum / Infimum / Limit Infimum 45 | \let\oldmin\min 46 | \RenewDocumentCommand{\min}{o g}{% 47 | \IfNoValueTF{#2}{\oldmin\IfValueT{#1}{_{#1}}}% 48 | {\,{\oldmin\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 49 | 50 | \let\oldinf\inf 51 | \RenewDocumentCommand{\inf}{o g}{% 52 | \IfNoValueTF{#2}{\oldinf\IfValueT{#1}{_{#1}}}% 53 | {\,{\oldinf\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 54 | 55 | \let\oldliminf\liminf 56 | \RenewDocumentCommand{\liminf}{o g}{% 57 | \IfNoValueTF{#2}{\oldliminf\IfValueT{#1}{_{#1}}}% 58 | {\,{\oldliminf\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 59 | 60 | % Argmin 61 | \DeclareMathOperator*{\argmin}{argmin} 62 | 63 | % Expectation 64 | \NewDocumentCommand{\E}{o g g}{% 65 | \IfNoValueTF{#2}{% 66 | \operatorname{\mathbb{E}}\IfValueT{#1}{_{#1}}% 67 | }{% 68 | \IfNoValueTF{#3}{% 69 | \,\mathbb{E}\IfValueT{#1}{_{#1}}{\bs{#2}} 70 | }{% 71 | \,\mathbb{E}\IfValueT{#1}{_{#1}}{\bs{#2 \ |\ #3}} 72 | } 73 | } 74 | } 75 | \NewDocumentCommand{\expec}{o g g}{% 76 | \IfNoValueTF{#2}{% 77 | \operatorname{\mathbb{E}}\IfValueT{#1}{_{#1}}% 78 | }{% 79 | \IfNoValueTF{#3}{% 80 | \,\mathbb{E}\IfValueT{#1}{_{#1}}{\bs{#2}} 81 | }{% 82 | \,\mathbb{E}\IfValueT{#1}{_{#1}}{\bs{#2 \ |\ #3}} 83 | } 84 | } 85 | } 86 | 87 | % Probability 88 | \RenewDocumentCommand{\P}{o g g}{% 89 | \IfNoValueTF{#2}{% 90 | \operatorname{\mathbb{P}}\IfValueT{#1}{_{#1}}% 91 | }{% 92 | \IfNoValueTF{#3}{% 93 | \,\mathbb{P}\IfValueT{#1}{_{#1}}{\bs{#2}} 94 | }{% 95 | \,\mathbb{P}\IfValueT{#1}{_{#1}}{\bs{#2 \ |\ #3}} 96 | } 97 | } 98 | } 99 | \NewDocumentCommand{\prob}{o g g}{% 100 | \IfNoValueTF{#2}{% 101 | \operatorname{\mathbb{P}}\IfValueT{#1}{_{#1}}% 102 | }{% 103 | \IfNoValueTF{#3}{% 104 | \,\mathbb{P}\IfValueT{#1}{_{#1}}{\bs{#2}} 105 | }{% 106 | \,\mathbb{P}\IfValueT{#1}{_{#1}}{\bs{#2 \ |\ #3}} 107 | } 108 | } 109 | } 110 | 111 | % Variance 112 | \NewDocumentCommand{\var}{o g g}{% 113 | \IfNoValueTF{#2}{% 114 | \operatorname{\operatorname{Var}}\IfValueT{#1}{_{#1}}% 115 | }{% 116 | \IfNoValueTF{#3}{% 117 | \,\operatorname{Var}\IfValueT{#1}{_{#1}}{\bp{#2}} 118 | }{% 119 | \,\operatorname{Var}\IfValueT{#1}{_{#1}}{\bp{#2 \ |\ #3}} 120 | } 121 | } 122 | } 123 | 124 | % Covariance 125 | \NewDocumentCommand{\cov}{o g g}{% 126 | \IfNoValueTF{#2}{% 127 | \operatorname{\operatorname{Cov}}\IfValueT{#1}{_{#1}}% 128 | }{% 129 | \IfNoValueTF{#3}{% 130 | \,\operatorname{Cov}\IfValueT{#1}{_{#1}}{\bp{#2}} 131 | }{% 132 | \,\operatorname{Cov}\IfValueT{#1}{_{#1}}{\bp{#2 \ |\ #3}} 133 | } 134 | } 135 | } 136 | 137 | % Indicator 138 | \NewDocumentCommand{\one}{g}{% 139 | \IfNoValueTF{#1}{ 140 | \operatorname{1} 141 | }{% 142 | \,\operatorname{1}{\bs{#1}} 143 | } 144 | } 145 | 146 | % Independence 147 | \newcommand{\indep}{\perp\!\!\!\perp} 148 | 149 | % Trace 150 | \NewDocumentCommand{\tr}{g}{% 151 | \IfNoValueTF{#1}{\operatorname{tr}}% 152 | {\,{\operatorname{tr}}{\bp{#1}}}} 153 | 154 | % Correlation 155 | \NewDocumentCommand{\corr}{g}{% 156 | \IfNoValueTF{#1}{\operatorname{corr}}% 157 | {\,{\operatorname{corr}}{\bp{#1}}}} 158 | 159 | % Standard deviation 160 | \NewDocumentCommand{\sd}{g}{% 161 | \IfNoValueTF{#1}{\operatorname{sd}}% 162 | {\,{\operatorname{sd}}{\bp{#1}}}} 163 | 164 | % Standard error 165 | \NewDocumentCommand{\se}{g}{% 166 | \IfNoValueTF{#1}{\operatorname{se}}% 167 | {\,{\operatorname{se}}{\bp{#1}}}} 168 | 169 | % Diag 170 | \NewDocumentCommand{\diag}{g}{% 171 | \IfNoValueTF{#1}{\operatorname{diag}}% 172 | {\,{\operatorname{diag}}{\bp{#1}}}} 173 | 174 | % Distributed iid 175 | \newcommand{\iid}{\mathbin{\overset{iid}{\sim}}} 176 | 177 | % Limits 178 | % \newcommand{\convd}{\mathbin{\overset{d}{\to}}} 179 | % \newcommand{\convp}{\mathbin{\overset{p}{\to}}} 180 | % \newcommand{\convas}{\mathbin{\overset{p}{\to}}} 181 | \newcommand{\asto}{\mathbin{\overset{as}{\to}}} 182 | \newcommand{\dto}{\mathbin{\overset{d}{\to}}} 183 | \newcommand{\pto}{\mathbin{\overset{p}{\to}}} 184 | \newcommand{\plim}{\operatorname{plim}} 185 | 186 | -------------------------------------------------------------------------------- /latex-article/online_supplement.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/latex-article/online_supplement.pdf -------------------------------------------------------------------------------- /latex-article/online_supplement.tex: -------------------------------------------------------------------------------- 1 | \documentclass[12pt]{article} 2 | \usepackage{paper,math} 3 | \addbibresource{references.bib} 4 | 5 | \title{Online Supplement for ``Example Paper''} 6 | \author{ 7 | Author One 8 | \and 9 | Author Two 10 | } 11 | \date{\textsc{\today}} 12 | 13 | % Conditionally display thoughts (hide by switching to `\boolfalse`) 14 | \booltrue{INCLUDECOMMENTS} 15 | \newcommand{\kyle}[1]{\coauthorComment[Kyle]{#1}} 16 | 17 | % Reference main document ------------------------------------------------------ 18 | % Note: I compile to `auxiliary/` to avoid cluttering the main directory. You might neeed to delete `auxiliary/` 19 | \usepackage{xr,xr-hyper} 20 | \externaldocument[main-][nocite]{auxiliary/article} 21 | \hypersetup{filecolor = black} % Remove colors from xr-references 22 | 23 | \begin{document} 24 | 25 | % Title Page ------------------------------------------------------------------- 26 | \maketitle 27 | \appendix 28 | \renewcommand{\thesection}{S.\arabic{section}} 29 | % ------------------------------------------------------------------------------ 30 | 31 | \section{New Section} 32 | \subsection{New Subsection} 33 | 34 | Referencing \autoref{main-thm:residue_thm} of main text. The proof follows from \citet{mas1995microeconomic}. 35 | 36 | \begin{equation} 37 | 1 + 1 = 2 38 | \end{equation} 39 | 40 | \section{New Section} 41 | \subsection{New Subsection} 42 | 43 | 44 | 45 | 46 | % ------------------------------------------------------------------------------ 47 | \newpage 48 | \printbibliography 49 | % ------------------------------------------------------------------------------ 50 | 51 | \end{document} 52 | -------------------------------------------------------------------------------- /latex-article/paper.sty: -------------------------------------------------------------------------------- 1 | % Page setup ------------------------------------------------------------------- 2 | \usepackage[margin=1in]{geometry} 3 | \usepackage{setspace} 4 | \renewcommand{\baselinestretch}{1.5} 5 | 6 | % Remove annoying over-full box warnings when it is small 7 | \vfuzz=2pt 8 | \hfuzz=2pt 9 | 10 | % Latex Programming tools ------------------------------------------------------ 11 | \usepackage{etoolbox,xparse} 12 | 13 | % Font ------------------------------------------------------------------------- 14 | % T1 removes errors for things like \textbackslash 15 | \usepackage[T1]{fontenc} 16 | \usepackage{inputenc} 17 | 18 | % Serif option (this is better for people with reading challenges) 19 | % Libertine for serif text font 20 | \usepackage{libertine} 21 | % Source Code Pro for monospace font 22 | \usepackage[scale=0.88]{plex-mono} 23 | \renewcommand{\ttdefault}{\plexmonofamily} 24 | 25 | % % Sans-serif option: 26 | % % Lato for sans-serif text font 27 | % \usepackage[default]{lato} 28 | % % Source Code Pro for monospace font 29 | % \usepackage[scale=0.95]{plex-mono} 30 | % \renewcommand{\ttdefault}{\plexmonofamily} 31 | 32 | % Small adjustments to text kerning 33 | \usepackage{microtype} 34 | 35 | % Math stuff ------------------------------------------------------------------- 36 | \usepackage{amsmath,amsthm,amssymb} 37 | \usepackage{bm} 38 | \usepackage{dsfont} 39 | 40 | % Define Theorems -------------------------------------------------------------- 41 | % Put proper spacing after Theorem #. 42 | \newtheoremstyle{spacing} 43 | {\topsep}{\topsep}% Space above nad below 44 | {}% Body font 45 | {}% Indent amount (empty = no indent, \parindent = para indent) 46 | {\bfseries}% Thm head font 47 | {.}% Punctuation after thm head 48 | {1em}% Space after thm head: \newline = linebreak 49 | {}% Thm head spec (can be left empty, meaning `normal') 50 | 51 | % Create different theorem environments and setup \autoref for them 52 | % \label{X:label_name} should match \Xautorefname 53 | \theoremstyle{spacing} 54 | \newtheorem{theorem}{Theorem} 55 | \newcommand{\theoremautorefname}{Theorem} 56 | \newtheorem{proposition}{Proposition} 57 | \newcommand{\propositionautorefname}{Proposition} 58 | \newtheorem{assumption}{Assumption} 59 | \newcommand{\assumptionautorefname}{Assumption} 60 | \newtheorem{example}{Example} 61 | \newcommand{\exampleautorefname}{Example} 62 | \newtheorem{lemma}{Lemma} 63 | \newcommand{\lemmaautorefname}{Lemma} 64 | \newtheorem{corollary}{Corollary} 65 | \newcommand{\corollaryautorefname}{Corollary} 66 | \newtheorem{definition}{Definition} 67 | \newcommand{\definitionautorefname}{Definition} 68 | \newtheorem{remark}{Remark} 69 | \newcommand{\remarkautorefname}{Remark} 70 | 71 | 72 | % Appendix --------------------------------------------------------------------- 73 | % when calling \appendix in the main document, appends this after 74 | \apptocmd{\appendix}{ 75 | % Section numbering (A.1) 76 | \renewcommand{\thesection}{\Alph{section}} 77 | \renewcommand{\thesubsection}{\thesection.\arabic{subsection}} 78 | 79 | % Figures and tables 80 | \numberwithin{figure}{section} 81 | \numberwithin{table}{section} 82 | \setcounter{table}{0} 83 | \setcounter{figure}{0} 84 | \renewcommand{\thetable}{\thesection\arabic{table}} 85 | \renewcommand{\thefigure}{\thesection\arabic{figure}} 86 | 87 | % Equations 88 | \numberwithin{equation}{section} 89 | \setcounter{equation}{0} 90 | 91 | % Theorems 92 | \setcounter{theorem}{0} 93 | \setcounter{proposition}{0} 94 | \setcounter{lemma}{0} 95 | \setcounter{corollary}{0} 96 | \setcounter{definition}{0} 97 | \setcounter{assumption}{0} 98 | \setcounter{remark}{0} 99 | \renewcommand{\theequation}{\thesection.\arabic{equation}} 100 | \renewcommand{\thetheorem}{\thesection.\arabic{theorem}} 101 | \renewcommand{\theproposition}{\thesection.\arabic{proposition}} 102 | \renewcommand{\thelemma}{\thesection.\arabic{lemma}} 103 | \renewcommand{\thecorollary}{\thesection.\arabic{corollary}} 104 | \renewcommand{\thedefinition}{\thesection.\arabic{definition}} 105 | \renewcommand{\theassumption}{\thesection.\arabic{assumption}} 106 | \renewcommand{\theremark}{\thesection.\arabic{remark}} 107 | }{}{} 108 | 109 | 110 | % Colors ----------------------------------------------------------------------- 111 | 112 | \usepackage{xcolor} 113 | 114 | % High contrast colors 115 | \definecolor{purple}{HTML}{5601A4} 116 | \definecolor{cranberry}{HTML}{E64173} 117 | \definecolor{orange}{HTML}{D65616} 118 | \definecolor{navy}{HTML}{006896} 119 | \definecolor{teal}{HTML}{1A505A} 120 | \newcommand\purple[1]{{\color{purple}#1}} 121 | \newcommand\cranberry[1]{{\color{cranberry}#1}} 122 | \newcommand\orange[1]{{\color{orange}#1}} 123 | \newcommand\navy[1]{{\color{navy}#1}} 124 | \newcommand\teal[1]{{\color{teal}#1}} 125 | 126 | % Kyle's colors 127 | \definecolor{ruby}{HTML}{9a2515} 128 | \definecolor{alice}{HTML}{107895} 129 | \definecolor{daisy}{HTML}{EBC944} 130 | \definecolor{coral}{HTML}{F26D21} 131 | \definecolor{kelly}{HTML}{829356} 132 | \definecolor{jet}{HTML}{131516} 133 | \definecolor{asher}{HTML}{555F61} 134 | \definecolor{slate}{HTML}{314F4F} 135 | \newcommand\kelly[1]{{\color{kelly}#1}} 136 | \newcommand\ruby[1]{{\color{ruby}#1}} 137 | \newcommand\alice[1]{{\color{alice}#1}} 138 | \newcommand\daisy[1]{{\color{daisy}#1}} 139 | \newcommand\coral[1]{{\color{coral}#1}} 140 | \newcommand\slate[1]{{\color{slate}#1}} 141 | \newcommand\jet[1]{{\color{jet}#1}} 142 | \newcommand\asher[1]{{\color{asher}#1}} 143 | 144 | % Zinc from Tailwind Colors 145 | \definecolor{zinc50}{HTML}{fafafa} 146 | \definecolor{zinc100}{HTML}{f4f4f5} 147 | \definecolor{zinc200}{HTML}{e4e4e7} 148 | \definecolor{zinc300}{HTML}{d4d4d8} 149 | \definecolor{zinc400}{HTML}{a1a1aa} 150 | \definecolor{zinc500}{HTML}{71717a} 151 | \definecolor{zinc600}{HTML}{52525b} 152 | \definecolor{zinc700}{HTML}{3f3f46} 153 | \definecolor{zinc800}{HTML}{27272a} 154 | \definecolor{zinc900}{HTML}{18181b} 155 | \definecolor{zinc950}{HTML}{09090b} 156 | 157 | 158 | % Hyperlinks ------------------------------------------------------------------- 159 | \usepackage{hyperref} 160 | \hypersetup{ 161 | colorlinks = true, 162 | allcolors = purple, 163 | breaklinks = true, 164 | bookmarksopen = true 165 | } 166 | 167 | % Section and Subsection Styling ----------------------------------------------- 168 | \usepackage[explicit]{titlesec} 169 | 170 | \titleformat{\section} 171 | {\large \bf} 172 | {\thesection \,---} 173 | {0.25em} 174 | {#1} 175 | 176 | \titleformat{\subsection} 177 | {\fontsize{12}{10}\it} 178 | {\thesubsection.} 179 | {0.5em} 180 | {#1} 181 | 182 | 183 | % Titlepage -------------------------------------------------------------------- 184 | \usepackage{titling} 185 | 186 | % \today => Month Year 187 | \renewcommand{\today}{\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\ \number \year} 188 | 189 | % Title 190 | \pretitle{\begin{center}\huge} 191 | \posttitle{\par\end{center}} 192 | 193 | % Author 194 | \preauthor{ 195 | \begin{center}\Large\renewcommand{\arraystretch}{0.75} 196 | \begin{tabular}[t]{c} 197 | } 198 | \postauthor{ 199 | \end{tabular} 200 | \end{center} 201 | } 202 | 203 | % Date 204 | \predate{\begin{center}\large\scshape\color{zinc700}} 205 | \postdate{\end{center}} 206 | 207 | % Abstract 208 | \renewenvironment{abstract} 209 | {\noindent\rule{\linewidth}{.5pt}\noindent} 210 | {\noindent\rule{\linewidth}{.5pt}} 211 | 212 | 213 | % Footnote --------------------------------------------------------------------- 214 | % Spacing between footnotes on same page 215 | \addtolength{\footnotesep}{1mm} 216 | 217 | % Space after footnote number 218 | \let\oldfootnote\footnote 219 | \renewcommand\footnote[1]{\oldfootnote{\ #1}} 220 | 221 | % No footnote line 222 | \renewcommand\footnoterule{} 223 | 224 | % No supsercript in footer 225 | \makeatletter 226 | \renewcommand\@makefntext[1]{% 227 | \parindent 1em \noindent% 228 | \hb@xt@1.8em{\hss\normalfont\@thefnmark.\hfill}#1% 229 | } 230 | \makeatother 231 | 232 | 233 | % Table and Figure labelling --------------------------------------------------- 234 | \usepackage{caption} 235 | \usepackage{graphicx} 236 | 237 | \DeclareCaptionLabelSeparator{threedash}{\,---\,} 238 | \DeclareCaptionFont{jet}{\color{jet}} 239 | \captionsetup*[table]{format=plain, labelsep=threedash, font={bf}} 240 | \captionsetup*[figure]{format=plain, labelsep=threedash, font={bf}} 241 | 242 | % Alternative: Left align captions 243 | % \captionsetup[table]{labelfont=it, textfont={bf}, labelsep=newline, justification=raggedright, singlelinecheck=off} 244 | % \captionsetup[figure]{labelfont=it, textfont={bf}, labelsep=newline, justification=raggedright, singlelinecheck=off} 245 | 246 | % multifigure with \caption 247 | % \begin{subfigure}\caption{} \end{subfigure} 248 | \usepackage{subcaption} 249 | \captionsetup*[subfigure]{format=plain, font={jet, footnotesize, bf}} 250 | 251 | 252 | % Tables ----------------------------------------------------------------------- 253 | % Fix \input with tables 254 | % \input fails when \\ is at end of external .tex file 255 | \makeatletter 256 | \let\input\@@input 257 | \makeatother 258 | 259 | % Slighty more spacing between rows 260 | \usepackage{array} 261 | \renewcommand\arraystretch{1.2} 262 | 263 | % Scale table proportionally to a width 264 | % \begin{adjustbox}{width=\textwidth, center} 265 | % ... 266 | % \end{adjustbox} 267 | \usepackage{adjustbox} 268 | 269 | % Table notes with \notes{...} or \notes[Source:]{...} command 270 | \NewDocumentCommand{\note}{O{Notes.} m g}{% 271 | \IfNoValueTF{#3}{% 272 | \parbox{\textwidth}{\footnotesize\vspace*{\medskipamount}% 273 | \noindent\emph{#1} #2 274 | }% 275 | }{% 276 | \parbox{#2}{\footnotesize\vspace*{\medskipamount}% 277 | \noindent\emph{#1} #3 278 | }% 279 | } 280 | } 281 | 282 | % \toprule, \cmidrule, \bottomrule 283 | \usepackage{booktabs} 284 | 285 | % If tables are too narrow, fill columns using: 286 | % \begin{tabularx}{\linewidth}{cols} 287 | % col-types: X - center, L - left, R -right 288 | % If you want relative scale for columns: 289 | % >{\hsize=.8\hsize}X/L/R 290 | \usepackage{tabularx} 291 | \newcolumntype{L}{>{\raggedright\arraybackslash}X} 292 | \newcolumntype{R}{>{\raggedleft\arraybackslash}X} 293 | \newcolumntype{C}{>{\centering\arraybackslash}X} 294 | 295 | % Landscape table 296 | % \begin{landscape}\pagestyle{lscaped} 297 | % ... 298 | % \end{landscsape} 299 | % \usepackage{lscape} - does not rotate page in pdf (tilt of head required) 300 | % \usepackage{pdflscape} - rotates page (no tilt of head required) 301 | \usepackage{pdflscape} 302 | 303 | % For landscape, fix page number location 304 | \usepackage{fancyhdr} 305 | \fancypagestyle{lscaped}{% 306 | \fancyhf{} 307 | \renewcommand{\headrulewidth}{0pt} 308 | \textnormal 309 | \fancyfoot{% 310 | \tikz[remember picture,overlay] 311 | \node[outer sep=2.5cm,above,rotate=90] at (current page.east) {\thepage}; 312 | } 313 | } 314 | 315 | % Bibliography ----------------------------------------------------------------- 316 | % You can use either biblatex or natbib, see https://tex.stackexchange.com/questions/25701/bibtex-vs-biber-and-biblatex-vs-natbib for discussion 317 | 318 | % % Natbib 319 | % % To use, do the following: 320 | % % 1. Delete \addbibresource{references.bib} before \begin{document} 321 | % % 2. Put \bibliography{references.bib} before \printbibliography 322 | % \usepackage{natbib} 323 | % \bibliographystyle{econ-aea} 324 | 325 | % Biblatex 326 | % 327 | % Source: https://social-science-data-editors.github.io/guidance/citations/guidance_data_citations_biblatex.pdf 328 | % Source: https://github.com/dmsul/biblatex-aer/blob/master/biblatex-aer.tex 329 | \usepackage[ 330 | style = chicago-authordate, 331 | doi = true, 332 | backend = biber, 333 | backref = true, % Prints back references e.g (cit. pp. 1) 334 | backrefstyle = none, % How to sequence page numbers in back references 335 | hyperref = true, % Enables hyperref 336 | indexing = true, 337 | natbib = true 338 | ]{biblatex} 339 | \usepackage[ 340 | authordate, 341 | backend = biber, 342 | uniquename = false, 343 | noibid 344 | ]{biblatex-chicago} 345 | 346 | % Reduced spacing in bibliography 347 | \AtBeginEnvironment{thebibliography}{\setstretch{1.1}} 348 | 349 | % Breaks long citations to new lines 350 | \usepackage{breakcites} 351 | 352 | % change display of DOI fields 353 | \DeclareFieldFormat{doi}{% 354 | \href{https://doi.org/#1}{\nolinkurl{https://doi.org/#1}}% 355 | } 356 | 357 | % Make author names bold in References but not in body of paper 358 | % 1. Check if name belongs to 'labelname' (Whoever the bib entry is sorted on, i.e., the author(s) or, if no author, editor(s), but not an editor if an author is present). This check keeps entries with both authors and editors from having both sets of names bolded. 359 | \def\ifmknamebold{\ifboolexpr{% 360 | test {\ifcurrentname{labelname}} 361 | or test {\ifcurrentname{author}} 362 | or ( test {\ifnameundef{author}} and test {\ifcurrentname{editor}} ) 363 | }} 364 | 365 | % Re-define naming commands to bold if necessary (but only in bibliography) 366 | \AtBeginBibliography{ 367 | \renewcommand*{\mkbibnamefamily}[1]{\ifmknamebold{\mkbibbold{#1}}{#1}} 368 | \renewcommand*{\mkbibnamegiven}[1]{\ifmknamebold{\mkbibbold{#1}}{#1}} 369 | \renewcommand*{\mkbibnameprefix}[1]{\ifmknamebold{\mkbibbold{#1}}{#1}} 370 | \renewcommand*{\mkbibnamesuffix}[1]{\ifmknamebold{\mkbibbold{#1}}{#1}} 371 | \renewcommand*{\finalnamedelim}{\ifmknamebold{% 372 | \mkbibbold{\finalandcomma\addspace\bibstring{and}\addspace}% 373 | }{% 374 | % Check for 'if editors with no author, only add a comma before 'and' if there are more than three authors. ('labelname' guys don't need these check because first name is reversed and so always has a comma, even with only two people, e.g., Nash, Steve, and Amare Stoudamire. 375 | \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}\addspace\bibstring{and}\addspace% 376 | }} 377 | } 378 | 379 | 380 | % Enumerate/Itemize ------------------------------------------------------------ 381 | \usepackage[shortlabels]{enumitem} 382 | \setlist{nosep} 383 | \setlist[itemize,1]{leftmargin=\parindent,label=\color{zinc600}{\upshape\textbullet}} 384 | \setlist[itemize,2]{leftmargin=2\parindent,label=\color{zinc600}{\upshape\textendash}} 385 | \setlist[enumerate,1]{leftmargin=\parindent,label=\color{zinc600}{\upshape\arabic*.}} 386 | \setlist[enumerate,2]{leftmargin=2\parindent,label=\color{zinc600}{\upshape\roman*.}} 387 | 388 | 389 | % tikz support ----------------------------------------------------------------- 390 | \usepackage{tikz} 391 | \usepackage{pgfplots} 392 | \pgfplotsset{compat=1.18} 393 | 394 | 395 | % Coauthors comments that you can hide ----------------------------------------- 396 | % Define in the main document: 397 | % \booltrue{INCLUDECOMMENTS} 398 | % \newcommand{\kyle}[1]{\comment[Kyle]{#1}} 399 | \newbool{INCLUDECOMMENTS} 400 | \NewDocumentCommand{\coauthorComment}{O{NAME} +m}{% 401 | \ifbool{INCLUDECOMMENTS}{{\color{cranberry}\textbf{#1:} #2}}{} 402 | } 403 | 404 | -------------------------------------------------------------------------------- /latex-article/references.bib: -------------------------------------------------------------------------------- 1 | @book{mas1995microeconomic, 2 | title={Microeconomic theory}, 3 | author={Mas-Colell, Andreu and Whinston, Michael Dennis and Green, Jerry R}, 4 | volume={1}, 5 | year={1995}, 6 | publisher={Oxford university press New York} 7 | } 8 | -------------------------------------------------------------------------------- /latex-article/tables/summary.tex: -------------------------------------------------------------------------------- 1 | 1940 & 16,875,829 & 0.66 & 10,708.21 & 14,819.55 & 33.22 & 19.66 & 25.23 & 16.56\\ 2 | 1950 & 67,790 & 0.69 & 23,166.06 & 26,600.85 & 70.05 & 32.70 & 58.27 & 29.24\\ 3 | 1960 & 1,338,491 & 0.66 & 40,328.17 & 45,385.47 & 124.11 & 77.55 & 99.37 & 59.01\\ 4 | 1970 & 277,951 & 0.75 & 65,373.07 & 68,048.88 & 205.42 & 137.80 & 165.61 & 104.49\\ 5 | 1980 & 1,907,836 & 0.73 & 73,223.43 & 74,906.62 & 408.83 & 284.44 & 340.82 & 220.68\\ 6 | 1990 & 2,257,874 & 0.68 & 224,312.50 & 168,933.04 & 711.77 & 574.58 & 550.26 & 392.90\\ 7 | 2000 & 2,581,741 & 0.73 & 288,195.77 & 199,100.92 & 1,010.36 & 1,022.77 & 754.10 & 649.57\\ 8 | 2010 & 530,359 & 0.76 & 273,754.31 & 195,220.04 & 1,306.70 & 1,281.34 & 972.40 & 817.94\\ 9 | -------------------------------------------------------------------------------- /latex-slides/base.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/latex-slides/base.pdf -------------------------------------------------------------------------------- /latex-slides/base.tex: -------------------------------------------------------------------------------- 1 | \documentclass[aspectratio=169,t]{beamer} 2 | % \documentclass[aspectratio=43,t]{beamer} 3 | \usepackage{slides} 4 | 5 | % Define `accent`/`accent2` colors for theme customization: 6 | \definecolor{accent}{HTML}{006896} 7 | \definecolor{accent2}{HTML}{695693} 8 | 9 | \title{What is the Effect of X on Y?} 10 | \date{\today} 11 | \author{Kyle Butts} 12 | \addbibresource{references.bib} 13 | \begin{document} 14 | 15 | % ------------------------------------------------------------------------------ 16 | \begin{frame} 17 | \maketitle 18 | 19 | % \vspace{2.5mm} 20 | % {\footnotesize $^*$ A bit of extra info here. Add an asterich to title or author} 21 | \end{frame} 22 | % ------------------------------------------------------------------------------ 23 | 24 | \section{Motivation} 25 | 26 | \begin{frame}{Title} 27 | Testing fonts: \citet{Fajgelbaum_Morales_Serrato_Zidar_2018} 28 | \end{frame} 29 | 30 | 31 | % ------------------------------------------------------------------------------ 32 | \begin{frame}[allowframebreaks]{References} 33 | \printbibliography 34 | \end{frame} 35 | \appendix 36 | % ------------------------------------------------------------------------------ 37 | 38 | 39 | \end{document} 40 | -------------------------------------------------------------------------------- /latex-slides/figures/plot_did2s_retail_slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/latex-slides/figures/plot_did2s_retail_slides.pdf -------------------------------------------------------------------------------- /latex-slides/figures/plot_did2s_retail_slides.tex: -------------------------------------------------------------------------------- 1 | % Created by tikzDevice version 0.12.4 on 2023-10-26 11:29:03 2 | % !TEX encoding = UTF-8 Unicode 3 | \begin{tikzpicture}[x=1pt,y=1pt] 4 | \definecolor{fillColor}{RGB}{255,255,255} 5 | \path[use as bounding box,fill=fillColor,fill opacity=0.00] (0,0) rectangle (722.70,406.52); 6 | \begin{scope} 7 | \path[clip] ( 0.00, 0.00) rectangle (722.70,406.52); 8 | \definecolor{fillColor}{RGB}{255,255,255} 9 | 10 | \path[fill=fillColor] ( -0.00, 0.00) rectangle (722.70,406.52); 11 | \end{scope} 12 | \begin{scope} 13 | \path[clip] ( 77.13, 37.33) rectangle (706.70,364.33); 14 | \definecolor{fillColor}{RGB}{255,255,255} 15 | 16 | \path[fill=fillColor] ( 77.13, 37.33) rectangle (706.70,364.33); 17 | \definecolor{drawColor}{gray}{0.92} 18 | 19 | \path[draw=drawColor,line width= 0.4pt,line join=round] ( 77.13, 81.92) -- 20 | (706.70, 81.92); 21 | 22 | \path[draw=drawColor,line width= 0.4pt,line join=round] ( 77.13,141.38) -- 23 | (706.70,141.38); 24 | 25 | \path[draw=drawColor,line width= 0.4pt,line join=round] ( 77.13,200.83) -- 26 | (706.70,200.83); 27 | 28 | \path[draw=drawColor,line width= 0.4pt,line join=round] ( 77.13,260.29) -- 29 | (706.70,260.29); 30 | 31 | \path[draw=drawColor,line width= 0.4pt,line join=round] ( 77.13,319.74) -- 32 | (706.70,319.74); 33 | 34 | \path[draw=drawColor,line width= 0.4pt,line join=round] (223.11, 37.33) -- 35 | (223.11,364.33); 36 | 37 | \path[draw=drawColor,line width= 0.4pt,line join=round] (383.88, 37.33) -- 38 | (383.88,364.33); 39 | 40 | \path[draw=drawColor,line width= 0.4pt,line join=round] (544.64, 37.33) -- 41 | (544.64,364.33); 42 | 43 | \path[draw=drawColor,line width= 0.4pt,line join=round] (705.41, 37.33) -- 44 | (705.41,364.33); 45 | 46 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 77.13, 52.19) -- 47 | (706.70, 52.19); 48 | 49 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 77.13,111.65) -- 50 | (706.70,111.65); 51 | 52 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 77.13,171.10) -- 53 | (706.70,171.10); 54 | 55 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 77.13,230.56) -- 56 | (706.70,230.56); 57 | 58 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 77.13,290.01) -- 59 | (706.70,290.01); 60 | 61 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 77.13,349.47) -- 62 | (706.70,349.47); 63 | 64 | \path[draw=drawColor,line width= 0.8pt,line join=round] (142.72, 37.33) -- 65 | (142.72,364.33); 66 | 67 | \path[draw=drawColor,line width= 0.8pt,line join=round] (303.49, 37.33) -- 68 | (303.49,364.33); 69 | 70 | \path[draw=drawColor,line width= 0.8pt,line join=round] (464.26, 37.33) -- 71 | (464.26,364.33); 72 | 73 | \path[draw=drawColor,line width= 0.8pt,line join=round] (625.03, 37.33) -- 74 | (625.03,364.33); 75 | \definecolor{drawColor}{RGB}{0,0,0} 76 | 77 | \path[draw=drawColor,line width= 0.9pt,dash pattern=on 4pt off 4pt ,line join=round] (-552.44,171.10) -- (1336.27,171.10); 78 | \definecolor{drawColor}{RGB}{154,36,21} 79 | 80 | \path[draw=drawColor,line width= 2.3pt,line join=round] (-552.44, 60.72) -- (1336.27,296.63); 81 | \definecolor{fillColor}{RGB}{154,36,21} 82 | 83 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (110.57,117.31) circle ( 3.57); 84 | 85 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (126.65,131.01) circle ( 3.57); 86 | 87 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (142.72,128.70) circle ( 3.57); 88 | 89 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (158.80,133.31) circle ( 3.57); 90 | 91 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (174.88,144.08) circle ( 3.57); 92 | 93 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (190.95,146.58) circle ( 3.57); 94 | 95 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (207.03,153.07) circle ( 3.57); 96 | 97 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (223.11,158.01) circle ( 3.57); 98 | 99 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (239.18,160.98) circle ( 3.57); 100 | 101 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (255.26,161.49) circle ( 3.57); 102 | 103 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (271.34,163.00) circle ( 3.57); 104 | 105 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (287.41,164.09) circle ( 3.57); 106 | 107 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (303.49,167.17) circle ( 3.57); 108 | 109 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (319.57,168.02) circle ( 3.57); 110 | 111 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (335.65,171.37) circle ( 3.57); 112 | 113 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (351.72,174.56) circle ( 3.57); 114 | 115 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (367.80,175.65) circle ( 3.57); 116 | 117 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (383.88,178.84) circle ( 3.57); 118 | 119 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (399.95,182.12) circle ( 3.57); 120 | 121 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (416.03,182.44) circle ( 3.57); 122 | 123 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (432.11,183.11) circle ( 3.57); 124 | 125 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (448.18,183.79) circle ( 3.57); 126 | \definecolor{drawColor}{RGB}{16,120,149} 127 | \definecolor{fillColor}{RGB}{16,120,149} 128 | 129 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (464.26,198.30) circle ( 3.57); 130 | 131 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (480.34,217.26) circle ( 3.57); 132 | 133 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (496.41,217.48) circle ( 3.57); 134 | 135 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (512.49,218.41) circle ( 3.57); 136 | 137 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (528.57,221.68) circle ( 3.57); 138 | 139 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (544.64,228.53) circle ( 3.57); 140 | 141 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (560.72,235.70) circle ( 3.57); 142 | 143 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (576.80,246.00) circle ( 3.57); 144 | 145 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (592.88,252.69) circle ( 3.57); 146 | 147 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (608.95,253.73) circle ( 3.57); 148 | 149 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (625.03,262.88) circle ( 3.57); 150 | 151 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (641.11,264.33) circle ( 3.57); 152 | 153 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (657.18,263.49) circle ( 3.57); 154 | 155 | \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (673.26,282.74) circle ( 3.57); 156 | \definecolor{drawColor}{RGB}{154,36,21} 157 | 158 | \path[draw=drawColor,line width= 2.3pt,line join=round] (105.75,162.70) -- 159 | (115.39,162.70); 160 | 161 | \path[draw=drawColor,line width= 2.3pt,line join=round] (110.57,162.70) -- 162 | (110.57, 69.77); 163 | 164 | \path[draw=drawColor,line width= 2.3pt,line join=round] (105.75, 69.77) -- 165 | (115.39, 69.77); 166 | 167 | \path[draw=drawColor,line width= 2.3pt,line join=round] (121.82,160.92) -- 168 | (131.47,160.92); 169 | 170 | \path[draw=drawColor,line width= 2.3pt,line join=round] (126.65,160.92) -- 171 | (126.65,102.86); 172 | 173 | \path[draw=drawColor,line width= 2.3pt,line join=round] (121.82,102.86) -- 174 | (131.47,102.86); 175 | 176 | \path[draw=drawColor,line width= 2.3pt,line join=round] (137.90,148.24) -- 177 | (147.55,148.24); 178 | 179 | \path[draw=drawColor,line width= 2.3pt,line join=round] (142.72,148.24) -- 180 | (142.72,109.27); 181 | 182 | \path[draw=drawColor,line width= 2.3pt,line join=round] (137.90,109.27) -- 183 | (147.55,109.27); 184 | 185 | \path[draw=drawColor,line width= 2.3pt,line join=round] (153.98,149.75) -- 186 | (163.62,149.75); 187 | 188 | \path[draw=drawColor,line width= 2.3pt,line join=round] (158.80,149.75) -- 189 | (158.80,116.33); 190 | 191 | \path[draw=drawColor,line width= 2.3pt,line join=round] (153.98,116.33) -- 192 | (163.62,116.33); 193 | 194 | \path[draw=drawColor,line width= 2.3pt,line join=round] (170.05,156.09) -- 195 | (179.70,156.09); 196 | 197 | \path[draw=drawColor,line width= 2.3pt,line join=round] (174.88,156.09) -- 198 | (174.88,130.94); 199 | 200 | \path[draw=drawColor,line width= 2.3pt,line join=round] (170.05,130.94) -- 201 | (179.70,130.94); 202 | 203 | \path[draw=drawColor,line width= 2.3pt,line join=round] (186.13,155.38) -- 204 | (195.78,155.38); 205 | 206 | \path[draw=drawColor,line width= 2.3pt,line join=round] (190.95,155.38) -- 207 | (190.95,137.10); 208 | 209 | \path[draw=drawColor,line width= 2.3pt,line join=round] (186.13,137.10) -- 210 | (195.78,137.10); 211 | 212 | \path[draw=drawColor,line width= 2.3pt,line join=round] (202.21,159.81) -- 213 | (211.85,159.81); 214 | 215 | \path[draw=drawColor,line width= 2.3pt,line join=round] (207.03,159.81) -- 216 | (207.03,146.44); 217 | 218 | \path[draw=drawColor,line width= 2.3pt,line join=round] (202.21,146.44) -- 219 | (211.85,146.44); 220 | 221 | \path[draw=drawColor,line width= 2.3pt,line join=round] (218.28,163.34) -- 222 | (227.93,163.34); 223 | 224 | \path[draw=drawColor,line width= 2.3pt,line join=round] (223.11,163.34) -- 225 | (223.11,152.98); 226 | 227 | \path[draw=drawColor,line width= 2.3pt,line join=round] (218.28,152.98) -- 228 | (227.93,152.98); 229 | 230 | \path[draw=drawColor,line width= 2.3pt,line join=round] (234.36,165.64) -- 231 | (244.01,165.64); 232 | 233 | \path[draw=drawColor,line width= 2.3pt,line join=round] (239.18,165.64) -- 234 | (239.18,155.44); 235 | 236 | \path[draw=drawColor,line width= 2.3pt,line join=round] (234.36,155.44) -- 237 | (244.01,155.44); 238 | 239 | \path[draw=drawColor,line width= 2.3pt,line join=round] (250.44,166.18) -- 240 | (260.08,166.18); 241 | 242 | \path[draw=drawColor,line width= 2.3pt,line join=round] (255.26,166.18) -- 243 | (255.26,156.61); 244 | 245 | \path[draw=drawColor,line width= 2.3pt,line join=round] (250.44,156.61) -- 246 | (260.08,156.61); 247 | 248 | \path[draw=drawColor,line width= 2.3pt,line join=round] (266.51,166.69) -- 249 | (276.16,166.69); 250 | 251 | \path[draw=drawColor,line width= 2.3pt,line join=round] (271.34,166.69) -- 252 | (271.34,159.06); 253 | 254 | \path[draw=drawColor,line width= 2.3pt,line join=round] (266.51,159.06) -- 255 | (276.16,159.06); 256 | 257 | \path[draw=drawColor,line width= 2.3pt,line join=round] (282.59,167.77) -- 258 | (292.24,167.77); 259 | 260 | \path[draw=drawColor,line width= 2.3pt,line join=round] (287.41,167.77) -- 261 | (287.41,160.78); 262 | 263 | \path[draw=drawColor,line width= 2.3pt,line join=round] (282.59,160.78) -- 264 | (292.24,160.78); 265 | 266 | \path[draw=drawColor,line width= 2.3pt,line join=round] (298.67,170.88) -- 267 | (308.31,170.88); 268 | 269 | \path[draw=drawColor,line width= 2.3pt,line join=round] (303.49,170.88) -- 270 | (303.49,163.70); 271 | 272 | \path[draw=drawColor,line width= 2.3pt,line join=round] (298.67,163.70) -- 273 | (308.31,163.70); 274 | 275 | \path[draw=drawColor,line width= 2.3pt,line join=round] (314.75,171.61) -- 276 | (324.39,171.61); 277 | 278 | \path[draw=drawColor,line width= 2.3pt,line join=round] (319.57,171.61) -- 279 | (319.57,164.94); 280 | 281 | \path[draw=drawColor,line width= 2.3pt,line join=round] (314.75,164.94) -- 282 | (324.39,164.94); 283 | 284 | \path[draw=drawColor,line width= 2.3pt,line join=round] (330.82,174.39) -- 285 | (340.47,174.39); 286 | 287 | \path[draw=drawColor,line width= 2.3pt,line join=round] (335.65,174.39) -- 288 | (335.65,168.62); 289 | 290 | \path[draw=drawColor,line width= 2.3pt,line join=round] (330.82,168.62) -- 291 | (340.47,168.62); 292 | 293 | \path[draw=drawColor,line width= 2.3pt,line join=round] (346.90,177.52) -- 294 | (356.55,177.52); 295 | 296 | \path[draw=drawColor,line width= 2.3pt,line join=round] (351.72,177.52) -- 297 | (351.72,171.64); 298 | 299 | \path[draw=drawColor,line width= 2.3pt,line join=round] (346.90,171.64) -- 300 | (356.55,171.64); 301 | 302 | \path[draw=drawColor,line width= 2.3pt,line join=round] (362.98,178.29) -- 303 | (372.62,178.29); 304 | 305 | \path[draw=drawColor,line width= 2.3pt,line join=round] (367.80,178.29) -- 306 | (367.80,173.12); 307 | 308 | \path[draw=drawColor,line width= 2.3pt,line join=round] (362.98,173.12) -- 309 | (372.62,173.12); 310 | 311 | \path[draw=drawColor,line width= 2.3pt,line join=round] (379.05,181.66) -- 312 | (388.70,181.66); 313 | 314 | \path[draw=drawColor,line width= 2.3pt,line join=round] (383.88,181.66) -- 315 | (383.88,176.09); 316 | 317 | \path[draw=drawColor,line width= 2.3pt,line join=round] (379.05,176.09) -- 318 | (388.70,176.09); 319 | 320 | \path[draw=drawColor,line width= 2.3pt,line join=round] (395.13,185.19) -- 321 | (404.78,185.19); 322 | 323 | \path[draw=drawColor,line width= 2.3pt,line join=round] (399.95,185.19) -- 324 | (399.95,179.09); 325 | 326 | \path[draw=drawColor,line width= 2.3pt,line join=round] (395.13,179.09) -- 327 | (404.78,179.09); 328 | 329 | \path[draw=drawColor,line width= 2.3pt,line join=round] (411.21,185.95) -- 330 | (420.85,185.95); 331 | 332 | \path[draw=drawColor,line width= 2.3pt,line join=round] (416.03,185.95) -- 333 | (416.03,178.80); 334 | 335 | \path[draw=drawColor,line width= 2.3pt,line join=round] (411.21,178.80) -- 336 | (420.85,178.80); 337 | 338 | \path[draw=drawColor,line width= 2.3pt,line join=round] (427.28,187.38) -- 339 | (436.93,187.38); 340 | 341 | \path[draw=drawColor,line width= 2.3pt,line join=round] (432.11,187.38) -- 342 | (432.11,178.50); 343 | 344 | \path[draw=drawColor,line width= 2.3pt,line join=round] (427.28,178.50) -- 345 | (436.93,178.50); 346 | 347 | \path[draw=drawColor,line width= 2.3pt,line join=round] (443.36,189.28) -- 348 | (453.01,189.28); 349 | 350 | \path[draw=drawColor,line width= 2.3pt,line join=round] (448.18,189.28) -- 351 | (448.18,178.73); 352 | 353 | \path[draw=drawColor,line width= 2.3pt,line join=round] (443.36,178.73) -- 354 | (453.01,178.73); 355 | \definecolor{drawColor}{RGB}{16,120,149} 356 | 357 | \path[draw=drawColor,line width= 2.3pt,line join=round] (459.44,205.22) -- 358 | (469.08,205.22); 359 | 360 | \path[draw=drawColor,line width= 2.3pt,line join=round] (464.26,205.22) -- 361 | (464.26,191.77); 362 | 363 | \path[draw=drawColor,line width= 2.3pt,line join=round] (459.44,191.77) -- 364 | (469.08,191.77); 365 | 366 | \path[draw=drawColor,line width= 2.3pt,line join=round] (475.51,225.18) -- 367 | (485.16,225.18); 368 | 369 | \path[draw=drawColor,line width= 2.3pt,line join=round] (480.34,225.18) -- 370 | (480.34,209.57); 371 | 372 | \path[draw=drawColor,line width= 2.3pt,line join=round] (475.51,209.57) -- 373 | (485.16,209.57); 374 | 375 | \path[draw=drawColor,line width= 2.3pt,line join=round] (491.59,226.39) -- 376 | (501.24,226.39); 377 | 378 | \path[draw=drawColor,line width= 2.3pt,line join=round] (496.41,226.39) -- 379 | (496.41,208.94); 380 | 381 | \path[draw=drawColor,line width= 2.3pt,line join=round] (491.59,208.94) -- 382 | (501.24,208.94); 383 | 384 | \path[draw=drawColor,line width= 2.3pt,line join=round] (507.67,228.59) -- 385 | (517.31,228.59); 386 | 387 | \path[draw=drawColor,line width= 2.3pt,line join=round] (512.49,228.59) -- 388 | (512.49,208.07); 389 | 390 | \path[draw=drawColor,line width= 2.3pt,line join=round] (507.67,208.07) -- 391 | (517.31,208.07); 392 | 393 | \path[draw=drawColor,line width= 2.3pt,line join=round] (523.74,233.37) -- 394 | (533.39,233.37); 395 | 396 | \path[draw=drawColor,line width= 2.3pt,line join=round] (528.57,233.37) -- 397 | (528.57,210.17); 398 | 399 | \path[draw=drawColor,line width= 2.3pt,line join=round] (523.74,210.17) -- 400 | (533.39,210.17); 401 | 402 | \path[draw=drawColor,line width= 2.3pt,line join=round] (539.82,240.83) -- 403 | (549.47,240.83); 404 | 405 | \path[draw=drawColor,line width= 2.3pt,line join=round] (544.64,240.83) -- 406 | (544.64,215.37); 407 | 408 | \path[draw=drawColor,line width= 2.3pt,line join=round] (539.82,215.37) -- 409 | (549.47,215.37); 410 | 411 | \path[draw=drawColor,line width= 2.3pt,line join=round] (555.90,249.95) -- 412 | (565.54,249.95); 413 | 414 | \path[draw=drawColor,line width= 2.3pt,line join=round] (560.72,249.95) -- 415 | (560.72,220.95); 416 | 417 | \path[draw=drawColor,line width= 2.3pt,line join=round] (555.90,220.95) -- 418 | (565.54,220.95); 419 | 420 | \path[draw=drawColor,line width= 2.3pt,line join=round] (571.98,261.80) -- 421 | (581.62,261.80); 422 | 423 | \path[draw=drawColor,line width= 2.3pt,line join=round] (576.80,261.80) -- 424 | (576.80,229.34); 425 | 426 | \path[draw=drawColor,line width= 2.3pt,line join=round] (571.98,229.34) -- 427 | (581.62,229.34); 428 | 429 | \path[draw=drawColor,line width= 2.3pt,line join=round] (588.05,270.16) -- 430 | (597.70,270.16); 431 | 432 | \path[draw=drawColor,line width= 2.3pt,line join=round] (592.88,270.16) -- 433 | (592.88,235.66); 434 | 435 | \path[draw=drawColor,line width= 2.3pt,line join=round] (588.05,235.66) -- 436 | (597.70,235.66); 437 | 438 | \path[draw=drawColor,line width= 2.3pt,line join=round] (604.13,272.25) -- 439 | (613.78,272.25); 440 | 441 | \path[draw=drawColor,line width= 2.3pt,line join=round] (608.95,272.25) -- 442 | (608.95,234.88); 443 | 444 | \path[draw=drawColor,line width= 2.3pt,line join=round] (604.13,234.88) -- 445 | (613.78,234.88); 446 | 447 | \path[draw=drawColor,line width= 2.3pt,line join=round] (620.21,285.04) -- 448 | (629.85,285.04); 449 | 450 | \path[draw=drawColor,line width= 2.3pt,line join=round] (625.03,285.04) -- 451 | (625.03,240.57); 452 | 453 | \path[draw=drawColor,line width= 2.3pt,line join=round] (620.21,240.57) -- 454 | (629.85,240.57); 455 | 456 | \path[draw=drawColor,line width= 2.3pt,line join=round] (636.28,292.33) -- 457 | (645.93,292.33); 458 | 459 | \path[draw=drawColor,line width= 2.3pt,line join=round] (641.11,292.33) -- 460 | (641.11,237.46); 461 | 462 | \path[draw=drawColor,line width= 2.3pt,line join=round] (636.28,237.46) -- 463 | (645.93,237.46); 464 | 465 | \path[draw=drawColor,line width= 2.3pt,line join=round] (652.36,298.77) -- 466 | (662.01,298.77); 467 | 468 | \path[draw=drawColor,line width= 2.3pt,line join=round] (657.18,298.77) -- 469 | (657.18,228.92); 470 | 471 | \path[draw=drawColor,line width= 2.3pt,line join=round] (652.36,228.92) -- 472 | (662.01,228.92); 473 | 474 | \path[draw=drawColor,line width= 2.3pt,line join=round] (668.44,332.90) -- 475 | (678.08,332.90); 476 | 477 | \path[draw=drawColor,line width= 2.3pt,line join=round] (673.26,332.90) -- 478 | (673.26,232.32); 479 | 480 | \path[draw=drawColor,line width= 2.3pt,line join=round] (668.44,232.32) -- 481 | (678.08,232.32); 482 | 483 | \path[] ( 77.13, 37.33) rectangle (706.70,364.33); 484 | \end{scope} 485 | \begin{scope} 486 | \path[clip] ( 0.00, 0.00) rectangle (722.70,406.52); 487 | \definecolor{drawColor}{gray}{0.40} 488 | 489 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 77.13, 37.33) -- 490 | ( 77.13,364.33); 491 | \end{scope} 492 | \begin{scope} 493 | \path[clip] ( 0.00, 0.00) rectangle (722.70,406.52); 494 | \definecolor{drawColor}{gray}{0.13} 495 | 496 | \node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 1.60] at ( 69.93, 46.68) {-0.2}; 497 | 498 | \node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 1.60] at ( 69.93,106.14) {-0.1}; 499 | 500 | \node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 1.60] at ( 69.93,165.59) {0.0}; 501 | 502 | \node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 1.60] at ( 69.93,225.05) {0.1}; 503 | 504 | \node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 1.60] at ( 69.93,284.50) {0.2}; 505 | 506 | \node[text=drawColor,anchor=base east,inner sep=0pt, outer sep=0pt, scale= 1.60] at ( 69.93,343.96) {0.3}; 507 | \end{scope} 508 | \begin{scope} 509 | \path[clip] ( 0.00, 0.00) rectangle (722.70,406.52); 510 | \definecolor{drawColor}{gray}{0.40} 511 | 512 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 73.13, 52.19) -- 513 | ( 77.13, 52.19); 514 | 515 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 73.13,111.65) -- 516 | ( 77.13,111.65); 517 | 518 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 73.13,171.10) -- 519 | ( 77.13,171.10); 520 | 521 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 73.13,230.56) -- 522 | ( 77.13,230.56); 523 | 524 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 73.13,290.01) -- 525 | ( 77.13,290.01); 526 | 527 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 73.13,349.47) -- 528 | ( 77.13,349.47); 529 | \end{scope} 530 | \begin{scope} 531 | \path[clip] ( 0.00, 0.00) rectangle (722.70,406.52); 532 | \definecolor{drawColor}{gray}{0.40} 533 | 534 | \path[draw=drawColor,line width= 0.8pt,line join=round] ( 77.13, 37.33) -- 535 | (706.70, 37.33); 536 | \end{scope} 537 | \begin{scope} 538 | \path[clip] ( 0.00, 0.00) rectangle (722.70,406.52); 539 | \definecolor{drawColor}{gray}{0.40} 540 | 541 | \path[draw=drawColor,line width= 0.8pt,line join=round] (142.72, 33.33) -- 542 | (142.72, 37.33); 543 | 544 | \path[draw=drawColor,line width= 0.8pt,line join=round] (303.49, 33.33) -- 545 | (303.49, 37.33); 546 | 547 | \path[draw=drawColor,line width= 0.8pt,line join=round] (464.26, 33.33) -- 548 | (464.26, 37.33); 549 | 550 | \path[draw=drawColor,line width= 0.8pt,line join=round] (625.03, 33.33) -- 551 | (625.03, 37.33); 552 | \end{scope} 553 | \begin{scope} 554 | \path[clip] ( 0.00, 0.00) rectangle (722.70,406.52); 555 | \definecolor{drawColor}{gray}{0.13} 556 | 557 | \node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale= 1.60] at (142.72, 19.11) {-20}; 558 | 559 | \node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale= 1.60] at (303.49, 19.11) {-10}; 560 | 561 | \node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale= 1.60] at (464.26, 19.11) {0}; 562 | 563 | \node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale= 1.60] at (625.03, 19.11) {10}; 564 | \end{scope} 565 | \begin{scope} 566 | \path[clip] ( 0.00, 0.00) rectangle (722.70,406.52); 567 | \definecolor{drawColor}{gray}{0.27} 568 | 569 | \node[text=drawColor,rotate= 90.00,anchor=base,inner sep=0pt, outer sep=0pt, scale= 2.06] at ( 30.16,200.83) {Estimated Effect}; 570 | \end{scope} 571 | \begin{scope} 572 | \path[clip] ( 0.00, 0.00) rectangle (722.70,406.52); 573 | \definecolor{drawColor}{gray}{0.27} 574 | 575 | \node[text=drawColor,anchor=base west,inner sep=0pt, outer sep=0pt, scale= 2.06] at ( 16.00,376.33) {\bfseries Estimated impact of Walmart on Local Retail Employment}; 576 | \end{scope} 577 | \end{tikzpicture} 578 | -------------------------------------------------------------------------------- /latex-slides/math.sty: -------------------------------------------------------------------------------- 1 | % Lightly modified from: https://pascalmichaillat.org/d3/ 2 | \usepackage{xparse} 3 | 4 | % --- Brackets --- 5 | \newcommand{\bc}[1]{\left\lbrace #1 \right\rbrace} 6 | \newcommand{\bp}[1]{\left( #1 \right)} 7 | \newcommand{\bs}[1]{\left[ #1 \right]} 8 | \newcommand{\abs}[1]{\left\lvert #1 \right\rvert} 9 | \newcommand{\absx}[1]{\lvert #1 \rvert} 10 | \newcommand{\norm}[1]{\left\lVert #1 \right\rVert} 11 | \newcommand{\normx}[1]{\lVert #1 \rVert} 12 | \newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor} 13 | \newcommand{\floorx}[1]{\lfloor #1 \rfloor} 14 | \newcommand{\of}[1]{{\left( #1 \right)}} 15 | 16 | % --- Operators --- 17 | % Logarithm 18 | \let\oldln\ln 19 | \RenewDocumentCommand{\ln}{g}{\IfNoValueTF{#1}{\oldln}{\,{\oldln}{\bp{#1}}}} 20 | 21 | % Exponential 22 | \let\oldexp\exp 23 | \RenewDocumentCommand{\exp}{g}{\IfNoValueTF{#1}{\oldexp}{\,{\oldexp}{\bp{#1}}}} 24 | 25 | % Maximum / Supremum / Limit Supremum 26 | \let\oldmax\max 27 | \RenewDocumentCommand{\max}{o g}{% 28 | \IfNoValueTF{#2}{\oldmax\IfValueT{#1}{_{#1}}}% 29 | {\,{\oldmax\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 30 | 31 | \let\oldsup\sup 32 | \RenewDocumentCommand{\sup}{o g}{% 33 | \IfNoValueTF{#2}{\oldsup\IfValueT{#1}{_{#1}}}% 34 | {\,{\oldsup\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 35 | 36 | \let\oldlimsup\limsup 37 | \RenewDocumentCommand{\limsup}{o g}{% 38 | \IfNoValueTF{#2}{\oldlimsup\IfValueT{#1}{_{#1}}}% 39 | {\,{\oldlimsup\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 40 | 41 | % Argmax 42 | \DeclareMathOperator*{\argmax}{argmax} 43 | 44 | % Minimum / Infimum / Limit Infimum 45 | \let\oldmin\min 46 | \RenewDocumentCommand{\min}{o g}{% 47 | \IfNoValueTF{#2}{\oldmin\IfValueT{#1}{_{#1}}}% 48 | {\,{\oldmin\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 49 | 50 | \let\oldinf\inf 51 | \RenewDocumentCommand{\inf}{o g}{% 52 | \IfNoValueTF{#2}{\oldinf\IfValueT{#1}{_{#1}}}% 53 | {\,{\oldinf\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 54 | 55 | \let\oldliminf\liminf 56 | \RenewDocumentCommand{\liminf}{o g}{% 57 | \IfNoValueTF{#2}{\oldliminf\IfValueT{#1}{_{#1}}}% 58 | {\,{\oldliminf\IfValueT{#1}{_{#1}}}{\bc{#2}}}} 59 | 60 | % Argmin 61 | \DeclareMathOperator*{\argmin}{argmin} 62 | 63 | % Expectation 64 | \NewDocumentCommand{\E}{o g g}{% 65 | \IfNoValueTF{#2}{% 66 | \operatorname{\mathbb{E}}\IfValueT{#1}{_{#1}}% 67 | }{% 68 | \IfNoValueTF{#3}{% 69 | \,\mathbb{E}\IfValueT{#1}{_{#1}}{\bs{#2}} 70 | }{% 71 | \,\mathbb{E}\IfValueT{#1}{_{#1}}{\bs{#2 \ |\ #3}} 72 | } 73 | } 74 | } 75 | \NewDocumentCommand{\expec}{o g g}{% 76 | \IfNoValueTF{#2}{% 77 | \operatorname{\mathbb{E}}\IfValueT{#1}{_{#1}}% 78 | }{% 79 | \IfNoValueTF{#3}{% 80 | \,\mathbb{E}\IfValueT{#1}{_{#1}}{\bs{#2}} 81 | }{% 82 | \,\mathbb{E}\IfValueT{#1}{_{#1}}{\bs{#2 \ |\ #3}} 83 | } 84 | } 85 | } 86 | 87 | % Probability 88 | \RenewDocumentCommand{\P}{o g g}{% 89 | \IfNoValueTF{#2}{% 90 | \operatorname{\mathbb{P}}\IfValueT{#1}{_{#1}}% 91 | }{% 92 | \IfNoValueTF{#3}{% 93 | \,\mathbb{P}\IfValueT{#1}{_{#1}}{\bs{#2}} 94 | }{% 95 | \,\mathbb{P}\IfValueT{#1}{_{#1}}{\bs{#2 \ |\ #3}} 96 | } 97 | } 98 | } 99 | \NewDocumentCommand{\prob}{o g g}{% 100 | \IfNoValueTF{#2}{% 101 | \operatorname{\mathbb{P}}\IfValueT{#1}{_{#1}}% 102 | }{% 103 | \IfNoValueTF{#3}{% 104 | \,\mathbb{P}\IfValueT{#1}{_{#1}}{\bs{#2}} 105 | }{% 106 | \,\mathbb{P}\IfValueT{#1}{_{#1}}{\bs{#2 \ |\ #3}} 107 | } 108 | } 109 | } 110 | 111 | % Variance 112 | \NewDocumentCommand{\var}{o g g}{% 113 | \IfNoValueTF{#2}{% 114 | \operatorname{\operatorname{Var}}\IfValueT{#1}{_{#1}}% 115 | }{% 116 | \IfNoValueTF{#3}{% 117 | \,\operatorname{Var}\IfValueT{#1}{_{#1}}{\bp{#2}} 118 | }{% 119 | \,\operatorname{Var}\IfValueT{#1}{_{#1}}{\bp{#2 \ |\ #3}} 120 | } 121 | } 122 | } 123 | 124 | % Covariance 125 | \NewDocumentCommand{\cov}{o g g}{% 126 | \IfNoValueTF{#2}{% 127 | \operatorname{\operatorname{Cov}}\IfValueT{#1}{_{#1}}% 128 | }{% 129 | \IfNoValueTF{#3}{% 130 | \,\operatorname{Cov}\IfValueT{#1}{_{#1}}{\bp{#2}} 131 | }{% 132 | \,\operatorname{Cov}\IfValueT{#1}{_{#1}}{\bp{#2 \ |\ #3}} 133 | } 134 | } 135 | } 136 | 137 | % Indicator 138 | \NewDocumentCommand{\one}{g}{% 139 | \IfNoValueTF{#1}{ 140 | \operatorname{1} 141 | }{% 142 | \,\operatorname{1}{\bs{#1}} 143 | } 144 | } 145 | 146 | % Independence 147 | \newcommand{\indep}{\perp\!\!\!\perp} 148 | 149 | % Trace 150 | \NewDocumentCommand{\tr}{g}{% 151 | \IfNoValueTF{#1}{\operatorname{tr}}% 152 | {\,{\operatorname{tr}}{\bp{#1}}}} 153 | 154 | % Correlation 155 | \NewDocumentCommand{\corr}{g}{% 156 | \IfNoValueTF{#1}{\operatorname{corr}}% 157 | {\,{\operatorname{corr}}{\bp{#1}}}} 158 | 159 | % Standard deviation 160 | \NewDocumentCommand{\sd}{g}{% 161 | \IfNoValueTF{#1}{\operatorname{sd}}% 162 | {\,{\operatorname{sd}}{\bp{#1}}}} 163 | 164 | % Standard error 165 | \NewDocumentCommand{\se}{g}{% 166 | \IfNoValueTF{#1}{\operatorname{se}}% 167 | {\,{\operatorname{se}}{\bp{#1}}}} 168 | 169 | % Distributed iid 170 | \newcommand{\iid}{\mathbin{\overset{iid}{\sim}}} 171 | 172 | % Limits 173 | % \newcommand{\convd}{\mathbin{\overset{d}{\to}}} 174 | % \newcommand{\convp}{\mathbin{\overset{p}{\to}}} 175 | % \newcommand{\convas}{\mathbin{\overset{p}{\to}}} 176 | \newcommand{\asto}{\mathbin{\overset{as}{\to}}} 177 | \newcommand{\dto}{\mathbin{\overset{d}{\to}}} 178 | \newcommand{\pto}{\mathbin{\overset{p}{\to}}} 179 | \newcommand{\plim}{\operatorname{plim}} 180 | 181 | -------------------------------------------------------------------------------- /latex-slides/references.bib: -------------------------------------------------------------------------------- 1 | @article{Fajgelbaum_Morales_Serrato_Zidar_2018, 2 | title = {State Taxes and Spatial Misallocation}, 3 | author = {Fajgelbaum, Pablo D and Morales, Eduardo and Serrato, Juan Carlos Suarez and Zidar, Owen}, 4 | journal = {The Review of Economic Studies}, 5 | year = {2018} 6 | } 7 | @article{Hsieh_Moretti_2019, 8 | title = {Housing Constraints and Spatial Misallocation}, 9 | volume = {11}, 10 | number = {2}, 11 | journal = {American Economic Journal: Macroeconomics}, 12 | author = {Hsieh, Chang-Tai and Moretti, Enrico}, 13 | year = {2019} 14 | } 15 | @inbook{Moretti_2011, 16 | title = {Local Labor Markets}, 17 | booktitle = {Handbook of Labor Economics}, 18 | volume = {4}, 19 | publisher = {Elsevier}, 20 | author = {Moretti, Enrico}, 21 | year = {2011} 22 | } 23 | @article{Suárez_Serrato_Zidar_2016, 24 | title = {Who Benefits from State Corporate Tax Cuts? A Local Labor Markets Approach with Heterogeneous Firms}, 25 | journal = {American Economic Review}, 26 | volume = {106}, 27 | number = {9}, 28 | author = {Suárez Serrato, Juan Carlos and Zidar, Owen}, 29 | year = {2016} 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /latex-slides/slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/latex-slides/slides.pdf -------------------------------------------------------------------------------- /latex-slides/slides.sty: -------------------------------------------------------------------------------- 1 | % Latex Programming tools ------------------------------------------------------ 2 | % \AtBeginEnvironment 3 | % https://tex.stackexchange.com/questions/33576/conditional-typesetting-build 4 | \usepackage{etoolbox} 5 | \usepackage{xparse} 6 | 7 | % Remove annoying over-full box warnings 8 | \vfuzz=2pt 9 | \hfuzz=2pt 10 | 11 | % Define colors ---------------------------------------------------------------- 12 | \usepackage{xcolor} 13 | 14 | % Define `accent`/`accent2` colors for theme customization 15 | % If accent/accent2 are not defined, then use defaults 16 | \providecolor{accent}{HTML}{006896} 17 | \providecolor{accent2}{HTML}{E64173} 18 | 19 | % Fonts ------------------------------------------------------------------------ 20 | % Beamer Option to use custom fonts 21 | \usefonttheme{professionalfonts} 22 | % T1 removes errors for things like \textbackslash 23 | \usepackage[T1]{fontenc} 24 | \usepackage{inputenc} 25 | 26 | % Serif option: 27 | % Libertine for serif text font 28 | % \usepackage{libertine} 29 | % Source Code Pro for monospace font 30 | % \usepackage[scale=0.88]{plex-mono} 31 | % \renewcommand{\ttdefault}{\plexmonofamily} 32 | 33 | % Sans-serif option: 34 | \usepackage[sfdefault]{roboto} 35 | \usepackage[scale=0.95]{plex-mono} 36 | \renewcommand{\ttdefault}{\plexmonofamily} 37 | 38 | % Small adjustments to text kerning 39 | \usepackage{microtype} 40 | 41 | % Beamer Options --------------------------------------------------------------- 42 | % Background 43 | \setbeamercolor{background canvas}{bg = white} 44 | 45 | % Change text margins 46 | \setbeamersize{text margin left = 20pt, text margin right = 20pt} 47 | 48 | % \alert 49 | \setbeamercolor{alerted text}{fg = accent2} 50 | 51 | % Frame title 52 | \setbeamercolor{frametitle}{bg = white, fg = zinc900} 53 | \setbeamercolor{framesubtitle}{bg = white, fg = accent} 54 | \setbeamerfont{framesubtitle}{size = \small, shape = \itshape} 55 | 56 | % Page numbering 57 | % Slightly modified for nicer page numbering 58 | \setbeamercolor{page number in head/foot}{fg=zinc600} 59 | \setbeamerfont{footline}{size=\scriptsize, family=\ttfamily} 60 | \defbeamertemplate{footline}{frame number spacing}{ 61 | \hfill% 62 | \usebeamercolor[fg]{page number in head/foot}% 63 | \usebeamerfont{page number in head/foot}% 64 | \strut\usebeamertemplate*{page number in head/foot}\kern0.6em\vskip1.4pt% 65 | } 66 | [action] 67 | { 68 | \setbeamertemplate{page number in head/foot}[totalframenumber]% 69 | } 70 | \setbeamertemplate{footline}[frame number spacing]{} 71 | 72 | % Appendix numbering 73 | \usepackage{appendixnumberbeamer} 74 | \renewcommand\appendixname{Appendix} 75 | 76 | % Button 77 | \setbeamercolor{button}{bg = white, fg = zinc600!80!accent} 78 | \setbeamerfont{button}{family = \ttfamily} 79 | \setbeamercolor{button border}{fg = black} 80 | 81 | % Let's you put \beamerbutton in bottom right corner 82 | \usepackage[absolute,overlay]{textpos} 83 | \newcommand\bottomleft[1]{% 84 | \begin{textblock*}{\paperwidth}(0pt,{\dimexpr\textheight + 5pt}) 85 | \hspace{8pt}\raggedright #1 86 | \end{textblock*} 87 | } 88 | \newcommand\bottomright[1]{% 89 | \begin{textblock*}{\paperwidth}(0pt,\textheight) 90 | \raggedleft #1\hspace{8pt} 91 | \end{textblock*} 92 | } 93 | 94 | % Remove navigation symbols 95 | \setbeamertemplate{navigation symbols}{} 96 | 97 | % Table and Figure captions 98 | \setbeamercolor{caption}{fg = zinc900!70!white} 99 | \setbeamercolor{caption name}{fg=zinc900} 100 | \setbeamerfont{caption name}{shape = \itshape} 101 | 102 | % Line spacing 103 | \usepackage{setspace} 104 | \setstretch{1.3} 105 | 106 | % Chance spacing around equations 107 | \AtBeginDocument{\setlength\abovedisplayskip{\medskipamount}} 108 | \AtBeginDocument{\setlength\belowdisplayskip{\bigskipamount}} 109 | \AtBeginDocument{\setlength\abovedisplayshortskip{\medskipamount}} 110 | \AtBeginDocument{\setlength\belowdisplayshortskip{\bigskipamount}} 111 | 112 | 113 | % Title page ------------------------------------------------------------------- 114 | \setbeamercolor{title}{fg = zinc900} 115 | \setbeamercolor{subtitle}{fg = accent} 116 | 117 | % \today => Month Year 118 | \renewcommand{\today}{\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\ \number \year} 119 | 120 | %% Custom \maketitle and \titlepage 121 | \setbeamertemplate{title page} 122 | { 123 | %\begin{centering} 124 | \vspace{20mm} 125 | {\Large \usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle}\\ \vskip0.25em% 126 | \ifx\insertsubtitle\@empty% 127 | \else% 128 | {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}% 129 | \fi% 130 | {\vspace{10mm}\insertauthor}\\ 131 | {\color{zinc500}\small{\today}}\\ 132 | %\end{centering} 133 | } 134 | 135 | % Table of Contents with Sections ---------------------------------------------- 136 | \setbeamerfont{section in toc}{size = \large, series = \bfseries} 137 | \setbeamerfont{section in toc shaded}{size = \large} 138 | \setbeamercolor{section in toc}{fg = zinc800} 139 | \setbeamertemplate{section in toc shaded}[default][60] % opacity 140 | \AtBeginSection[]{ 141 | { 142 | \hypersetup{hidelinks} 143 | \begin{frame}[noframenumbering,plain]{\ } 144 | \tableofcontents[currentsection] 145 | \end{frame} 146 | } 147 | } 148 | 149 | % Bullet points ---------------------------------------------------------------- 150 | 151 | %% Fix left-margins 152 | \settowidth{\leftmargini}{\usebeamertemplate{itemize item}} 153 | \addtolength{\leftmargini}{\labelsep} 154 | 155 | %% enumerate item color 156 | \setbeamercolor{enumerate item}{fg = zinc600} 157 | \setbeamerfont{enumerate item}{size = \small} 158 | \setbeamertemplate{enumerate item}{\insertenumlabel.} 159 | 160 | %% enumerate subitems and subsubitems 161 | \setbeamercolor{enumerate subitem}{fg = zinc600} 162 | \setbeamercolor{enumerate subsubitem}{fg = zinc600} 163 | 164 | %% itemize item 165 | \setbeamercolor{itemize item}{fg = zinc600} 166 | \setbeamerfont{itemize item}{size = \small} 167 | \setbeamertemplate{itemize item}[circle] 168 | 169 | %% right arrow for subitems 170 | \setbeamercolor{itemize subitem}{fg = zinc600} 171 | \setbeamerfont{itemize subitem}{size = \small} 172 | \setbeamertemplate{itemize subitem}{$\rightarrow$} 173 | 174 | %% square for subsubitems 175 | \setbeamercolor{itemize subsubitem}{fg = zinc600} 176 | \setbeamerfont{itemize subsubitem}{size = \small} 177 | \setbeamertemplate{itemize subsubitem}[square] 178 | 179 | % References ------------------------------------------------------------------- 180 | 181 | % biblatex 182 | \usepackage[ 183 | natbib = true, 184 | backend = biber, 185 | citestyle= authoryear, 186 | style = ext-authoryear-ecomp, 187 | url = false, 188 | ]{biblatex} 189 | 190 | % Smaller font-size for references 191 | \renewcommand*{\bibfont}{\small} 192 | 193 | % % Remove "In:" 194 | \renewbibmacro{in:}{} 195 | 196 | % Color citations for slides \citecolor{} 197 | \newcommand{\citecolor}[1]{% 198 | {\footnotesize\begin{color}{zinc500}% 199 | #1% 200 | \end{color}}% 201 | } 202 | 203 | % Bibliography Font, roughly matching AEA 204 | \setbeamertemplate{bibliography item}{} 205 | 206 | \setbeamerfont{bibliography entry author}{size = \footnotesize, series = \bfseries} 207 | \setbeamercolor{bibliography entry author}{fg = zinc900} 208 | 209 | \setbeamerfont{bibliography entry title}{size = \footnotesize, series = \mdseries} 210 | \setbeamercolor{bibliography entry title}{fg = zinc900} 211 | 212 | \setbeamerfont{bibliography entry location}{size = \footnotesize, shape = \itshape, series = \mdseries} 213 | \setbeamercolor{bibliography entry location}{fg = zinc900} 214 | 215 | \setbeamerfont{bibliography entry note}{size = \footnotesize, series = \mdseries} 216 | \setbeamercolor{bibliography entry note}{fg = zinc900} 217 | 218 | % Pause in align fix ----------------------------------------------------------- 219 | % https://tex.stackexchange.com/a/75550/334034 220 | \makeatletter 221 | \let\save@measuring@true\measuring@true 222 | \def\measuring@true{% 223 | \save@measuring@true 224 | % might not be necessary and might have unwarranted side effects 225 | \def\beamer@sortzero##1{\beamer@ifnextcharospec{\beamer@sortzeroread{##1}}{}}% 226 | \def\beamer@sortzeroread##1<##2>{}% 227 | \def\beamer@finalnospec{}% 228 | } 229 | \makeatother 230 | 231 | % Hyperref --------------------------------------------------------------------- 232 | \usepackage{hyperref} 233 | \hypersetup{ 234 | colorlinks = true, 235 | linkcolor = accent2, 236 | filecolor = accent2, 237 | urlcolor = accent2, 238 | citecolor = accent2, 239 | } 240 | 241 | % Kyle's colors ---------------------------------------------------------------- 242 | % Zinc from Tailwind Colors 243 | \definecolor{zinc50}{HTML}{fafafa} 244 | \definecolor{zinc100}{HTML}{f4f4f5} 245 | \definecolor{zinc200}{HTML}{e4e4e7} 246 | \definecolor{zinc300}{HTML}{d4d4d8} 247 | \definecolor{zinc400}{HTML}{a1a1aa} 248 | \definecolor{zinc500}{HTML}{71717a} 249 | \definecolor{zinc600}{HTML}{52525b} 250 | \definecolor{zinc700}{HTML}{3f3f46} 251 | \definecolor{zinc800}{HTML}{27272a} 252 | \definecolor{zinc900}{HTML}{18181b} 253 | \definecolor{zinc950}{HTML}{09090b} 254 | 255 | \definecolor{navy}{HTML}{002C55} 256 | \definecolor{raspberry}{HTML}{940034} 257 | \definecolor{cranberry}{HTML}{B3114B} 258 | \definecolor{orange}{HTML}{D65616} 259 | \definecolor{purple}{HTML}{5C4CBF} 260 | \definecolor{blue}{HTML}{0188AC} 261 | \definecolor{green}{HTML}{2DB25F} 262 | \definecolor{rose}{HTML}{FB7185} 263 | \definecolor{yellow}{HTML}{ffc517} 264 | 265 | % Easily color text 266 | \newcommand\navy[1]{{\color{navy}#1}} 267 | \newcommand\raspberry[1]{{\color{raspberry}#1}} 268 | \newcommand\cranberry[1]{{\color{cranberry}#1}} 269 | \newcommand\orange[1]{{\color{orange}#1}} 270 | \newcommand\purple[1]{{\color{purple}#1}} 271 | \newcommand\blue[1]{{\color{blue}#1}} 272 | \newcommand\green[1]{{\color{green}#1}} 273 | \newcommand\rose[1]{{\color{rose}#1}} 274 | \newcommand\yellow[1]{{\color{yellow}#1}} 275 | 276 | % lightened via: https://uicolors.app/create 277 | \definecolor{bgNavy}{HTML}{b2e3ff} 278 | \definecolor{bgRaspberry}{HTML}{ff96a9} 279 | \definecolor{bgCranberry}{HTML}{fda4d0} 280 | \definecolor{bgOrange}{HTML}{f6b97b} 281 | \definecolor{bgPurple}{HTML}{adb4f4} 282 | \definecolor{bgBlue}{HTML}{cdfbff} 283 | \definecolor{bgGreen}{HTML}{8ee7af} 284 | \definecolor{bgRose}{HTML}{fecdd4} 285 | \definecolor{bgYellow}{HTML}{ffea88} 286 | 287 | % Color background of text 288 | \newcommand\bgNavy[1]{\colorbox{bgNavy}{#1}} 289 | \newcommand\bgRaspberry[1]{\colorbox{bgRaspberry}{#1}} 290 | \newcommand\bgCranberry[1]{\colorbox{bgCranberry}{#1}} 291 | \newcommand\bgOrange[1]{\colorbox{bgOrange}{#1}} 292 | \newcommand\bgPurple[1]{\colorbox{bgPurple}{#1}} 293 | \newcommand\bgBlue[1]{\colorbox{bgBlue}{#1}} 294 | \newcommand\bgGreen[1]{\colorbox{bgGreen}{#1}} 295 | \newcommand\bgRose[1]{\colorbox{bgRose}{#1}} 296 | \newcommand\bgYellow[1]{\colorbox{bgYellow}{#1}} 297 | 298 | % old colors: have fallen out of grace 299 | % \definecolor{ruby}{HTML}{9a2515} 300 | % \definecolor{alice}{HTML}{107895} 301 | % \definecolor{daisy}{HTML}{EBC944} 302 | % \definecolor{coral}{HTML}{F26D21} 303 | % \definecolor{kelly}{HTML}{829356} 304 | % \newcommand\kelly[1]{{\color{kelly}#1}} 305 | % \newcommand\ruby[1]{{\color{ruby}#1}} 306 | % \newcommand\alice[1]{{\color{alice}#1}} 307 | % \newcommand\daisy[1]{{\color{daisy}#1}} 308 | % \newcommand\coral[1]{{\color{coral}#1}} 309 | % \newcommand\bgKelly[1]{{\colorbox{kelly!80!white}{#1}}} 310 | % \newcommand\bgRuby[1]{{\colorbox{ruby!80!white}{#1}}} 311 | % \newcommand\bgAlice[1]{{\colorbox{alice!80!white}{#1}}} 312 | % \newcommand\bgDaisy[1]{{\colorbox{daisy!80!white}{#1}}} 313 | % \newcommand\bgCoral[1]{{\colorbox{coral!80!white}{#1}}} 314 | 315 | 316 | % Math stuff ------------------------------------------------------------------- 317 | \usepackage{amsmath} 318 | \usepackage{amsfonts} 319 | \usepackage{amsthm} 320 | \usepackage{graphicx} 321 | \usepackage{bm} 322 | 323 | % Load tcolorbox and tikz ------------------------------------------------------ 324 | \usepackage[beamer,customcolors]{hf-tikz} 325 | \usetikzlibrary{calc, fit, shapes.misc, shadows, arrows.meta} 326 | \usepackage[most,skins]{tcolorbox} 327 | \tcbuselibrary{breakable} 328 | \tcbset{ 329 | highlight math/.style={ 330 | notitle, enhanced, 331 | on line, boxsep=2pt, left=0pt, right=0pt, top=0pt, bottom=0pt, 332 | colback = bgRaspberry, colframe = white, 333 | } 334 | } 335 | 336 | % Block ------------------------------------------------------------------------ 337 | % TODO: Update default blocks 338 | \defbeamertemplate{block begin}{framed}[1][] { 339 | \begin{tcolorbox}[colback=zinc50, colframe=zinc200, arc=0mm] 340 | { 341 | \vskip\smallskipamount% 342 | \ifthenelse{\equal{\insertblocktitle}{}}{}{% 343 | \raggedright\usebeamerfont*{block title}\usebeamercolor[fg]{title}% 344 | \textbf{\insertblocktitle}% 345 | \vskip\medskipamount% 346 | } 347 | }% 348 | \raggedright% 349 | \usebeamerfont{block body}% 350 | } 351 | \defbeamertemplate{block end}{framed}[1][] { 352 | \vskip\smallskipamount\end{tcolorbox} 353 | } 354 | \setbeamertemplate{blocks}[framed] 355 | 356 | \newenvironment*{zincBlock}[1]{% 357 | \begin{tcolorbox}[colback=zinc50, colframe=zinc200, arc=0mm]{ 358 | \vskip\smallskipamount% 359 | \ifthenelse{\equal{#1}{}}{}{% 360 | \raggedright\usebeamerfont*{block title}\usebeamercolor[fg]{title}% 361 | \textbf{#1}% 362 | \vskip\medskipamount% 363 | }% 364 | }% 365 | \raggedright% 366 | \usebeamerfont{block body}% 367 | }{% 368 | \vskip\smallskipamount\end{tcolorbox} 369 | } 370 | 371 | % Colors from plugging base color into https://uicolors.app/create 372 | \definecolor{purple50}{HTML}{f9f8fc} 373 | \definecolor{purple100}{HTML}{f1eff8} 374 | \definecolor{purple200}{HTML}{e6e2f2} 375 | \newenvironment*{purpleBlock}[1]{% 376 | \begin{tcolorbox}[colback=purple50, colframe=purple200, arc=0mm]{ 377 | \vskip\smallskipamount% 378 | \ifthenelse{\equal{#1}{}}{}{% 379 | \raggedright\usebeamerfont*{block title}\usebeamercolor[fg]{title}% 380 | \textbf{#1}% 381 | \vskip\medskipamount% 382 | }% 383 | }% 384 | \raggedright% 385 | \usebeamerfont{block body}% 386 | }{% 387 | \vskip\smallskipamount\end{tcolorbox} 388 | } 389 | 390 | \definecolor{cranberry50}{HTML}{fdf2f6} 391 | \definecolor{cranberry100}{HTML}{fbe8ef} 392 | \definecolor{cranberry200}{HTML}{fad0e0} 393 | \newenvironment*{cranberryBlock}[1]{% 394 | \begin{tcolorbox}[colback=cranberry50, colframe=cranberry200, arc=0mm]{ 395 | \vskip\smallskipamount% 396 | \raggedright\usebeamerfont*{block title}\usebeamercolor[fg]{title}% 397 | \textbf{#1}% 398 | }% 399 | \vskip\medskipamount% 400 | \raggedright% 401 | \usebeamerfont{block body}% 402 | }{% 403 | \vskip\smallskipamount\end{tcolorbox} 404 | } 405 | 406 | 407 | % Code listings ---------------------------------------------------------------- 408 | \usepackage{listings} 409 | \tcbuselibrary{listings,listingsutf8,skins} 410 | \tcbset{ 411 | codelanguage/.style={language = #1}, 412 | codelanguage/.default = R, 413 | } 414 | \DeclareTCBListing{codeblock}{ !O{R} }{ 415 | listing only, 416 | interior hidden, 417 | top = -6pt, 418 | bottom = -6pt, 419 | left = 4pt, 420 | right = 0pt, 421 | boxrule = 0pt, 422 | frame hidden, 423 | sharp corners, 424 | borderline west = {2pt}{0pt}{zinc400}, 425 | enhanced, 426 | breakable, 427 | listing options={ 428 | basicstyle = \small\ttfamily, 429 | columns = fixed, 430 | keepspaces = true, 431 | language = #1 432 | } 433 | } 434 | 435 | 436 | % \begin{columns} -------------------------------------------------------------- 437 | \usepackage{multicol} 438 | 439 | % Tables ----------------------------------------------------------------------- 440 | % Fix \input with tables 441 | % \input fails when \\ is at end of external .tex file 442 | \makeatletter 443 | \let\input\@@input 444 | \makeatother 445 | 446 | % Slighty more spacing between rows 447 | \usepackage{array} 448 | \renewcommand\arraystretch{1} 449 | 450 | % Scale table proportionally to a width 451 | % \begin{adjustbox}{width=\textwidth, center} 452 | % ... 453 | % \end{adjustbox} 454 | \usepackage{adjustbox} 455 | 456 | % \toprule, \cmidrule, \bottomrule 457 | \usepackage{booktabs} 458 | 459 | % Tables too narrow 460 | % \begin{tabularx}{\linewidth}{cols} 461 | % col-types: X - center, L - left, R -right 462 | % Relative scale: >{\hsize=.8\hsize}X/L/R 463 | \usepackage{tabularx} 464 | \newcolumntype{L}{>{\raggedright\arraybackslash}X} 465 | \newcolumntype{R}{>{\raggedleft\arraybackslash}X} 466 | \newcolumntype{C}{>{\centering\arraybackslash}X} 467 | 468 | % Table notes with \note{...} or \note[Source:]{...} command 469 | \RenewDocumentCommand{\note}{O{Notes.} m g}{% 470 | \IfNoValueTF{#3}{% 471 | \footnotesize\vspace*{\medskipamount}% 472 | \noindent\emph{#1} #2 473 | }{% 474 | \parbox{#2}{\footnotesize\vspace*{\medskipamount}% 475 | \noindent\emph{#1} #3 476 | }% 477 | } 478 | } 479 | 480 | % Since we don't use `table` environments in slides 481 | \NewDocumentCommand{\tabletitle}{O{Outcome:} m}{% 482 | {\footnotesize\textsc{#1} #2 \\[\medskipamount]} 483 | } 484 | 485 | % Table Highlighting ----------------------------------------------------------- 486 | 487 | % Create top-left and bottom-right markets in tabular cells with a unique matching id and these commands will outline those cells 488 | \usepackage[beamer,customcolors]{hf-tikz} 489 | \usetikzlibrary{calc} 490 | \usetikzlibrary{fit,shapes.misc} 491 | 492 | % To set the hypothesis highlighting boxes red. 493 | \newcommand\marktopleft[1]{% 494 | \tikz[overlay,remember picture] 495 | \node (marker-#1-a) at (0,1.5ex) {};% 496 | } 497 | \newcommand\markbottomright[1]{% 498 | \tikz[overlay,remember picture] 499 | \node (marker-#1-b) at (0,0) {};% 500 | \tikz[accent!80!zinc900, ultra thick, overlay, remember picture, inner sep=4pt] 501 | \node[draw, rectangle, fit=(marker-#1-a.center) (marker-#1-b.center)] {};% 502 | } 503 | 504 | % \cellcolor<#>{color} 505 | \renewcommand<>\cellcolor[1]{\only#2{\beameroriginal\cellcolor{#1}}} 506 | 507 | % https://tex.stackexchange.com/questions/18427/why-cant-i-wrap-rowcolor-in-only-beamer 508 | % Redefine `\rowcolor` to allow a beamer overlay specifier 509 | % New syntax: \rowcolor[color model]{color}[left overhang][right overhang] 510 | \makeatletter 511 | % Open `\noalign` and check for overlay specification: 512 | \def\rowcolor{\noalign{\ifnum0=`}\fi\bmr@rowcolor} 513 | \newcommand<>{\bmr@rowcolor}{% 514 | \alt#1% 515 | {\global\let\CT@do@color\CT@@do@color\@ifnextchar[\CT@rowa\CT@rowb}% Rest of original `\rowcolor` 516 | {\ifnum0=`{\fi}\@gooble@rowcolor}% End `\noalign` and gobble all arguments of `\rowcolor`. 517 | } 518 | % Gobble all normal arguments of `\rowcolor`: 519 | \newcommand{\@gooble@rowcolor}[2][]{\@gooble@rowcolor@} 520 | \newcommand{\@gooble@rowcolor@}[1][]{\@gooble@rowcolor@@} 521 | \newcommand{\@gooble@rowcolor@@}[1][]{\ignorespaces} 522 | \makeatother 523 | 524 | % Test 525 | \usepackage{dcolumn} 526 | \newcolumntype{d}[0]{D{.}{.}{-1}} 527 | 528 | 529 | % Figures ---------------------------------------------------------------------- 530 | 531 | % \imageframe{img_name} 532 | % from https://github.com/mattzinc900well/cousteau 533 | \newcommand{\imageframe}[1]{% 534 | \begin{frame}[plain] 535 | \begin{tikzpicture}[remember picture, overlay] 536 | \node[at = (current page.center), xshift = 0cm] (cover) {% 537 | \includegraphics[keepaspectratio, width=\paperwidth, height=\paperheight]{#1} 538 | }; 539 | \end{tikzpicture} 540 | \end{frame}% 541 | } 542 | 543 | % subfigures 544 | \usepackage{subfigure} 545 | 546 | % Highlight slide -------------------------------------------------------------- 547 | % \begin{transitionframe} Text \end{transitionframe} 548 | % from paulgp's beamer tips 549 | \newenvironment{transitionframe}{ 550 | \setbeamercolor{background canvas}{bg=accent!60!black} 551 | \begin{frame}[noframenumbering,plain,c]\color{white}\LARGE\centering 552 | }{ 553 | \end{frame} 554 | } 555 | 556 | % Define custom slide coordinate system ---------------------------------------- 557 | % https://tex.stackexchange.com/questions/89588/positioning-relative-to-page-in-tikz 558 | % Defining a new coordinate system for the page: 559 | % 560 | % ┌──────────────────────────────────────────────┐ 561 | % │ (0, 0) (1, 0) │ 562 | % │ │ 563 | % │ │ 564 | % │ │ 565 | % │ │ 566 | % │ │ 567 | % │ (0, 1) (1, 1) │ 568 | % └──────────────────────────────────────────────┘ 569 | % 570 | % source: https://tex.stackexchange.com/questions/89588/positioning-relative-to-page-in-tikz 571 | % 572 | \makeatletter 573 | \def\parsecomma#1,#2\endparsecomma{\def\page@x{#1}\def\page@y{#2}} 574 | \tikzdeclarecoordinatesystem{page}{ 575 | \parsecomma#1\endparsecomma 576 | \pgfpointanchor{current page}{north west} 577 | % Save the upper left corner 578 | \pgf@xa=\pgf@x% 579 | \pgf@ya=\pgf@y% 580 | % save the lower right corner 581 | \pgfpointanchor{current page}{south east} 582 | \pgf@xb=\pgf@x% 583 | \pgf@yb=\pgf@y% 584 | % Transform to the correct placement 585 | \pgfmathparse{(\pgf@xb-\pgf@xa)*\page@x+\pgf@xa} 586 | \expandafter\pgf@x\expandafter=\pgfmathresult pt 587 | \pgfmathparse{(\pgf@yb-\pgf@ya)*\page@y+\pgf@ya} 588 | \expandafter\pgf@y\expandafter=\pgfmathresult pt 589 | } 590 | \makeatother 591 | 592 | % To overlay on beamer slides, use the following: 593 | % 594 | % \begin{tikzpicture}[remember picture, overlay] 595 | % \node[anchor = north west] (anchor_name) at (page cs:0.0, 0.0) { 596 | % CONTENT HERE 597 | % }; 598 | % \end{tikzpicture} 599 | % 600 | % Note page cs is the coordinate system from above 601 | 602 | % To help with placement, I will use `\devgrid` on a slide to figure out the coordinates of `page cs` to the 0.1 603 | \newcommand{\devgrid}{ 604 | \begin{tikzpicture}[remember picture, overlay] 605 | % vertical lines 606 | \draw (page cs: 0.1, 0.0) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 0.1, 1.0); 607 | \draw (page cs: 0.2, 0.0) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 0.2, 1.0); 608 | \draw (page cs: 0.3, 0.0) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 0.3, 1.0); 609 | \draw (page cs: 0.4, 0.0) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 0.4, 1.0); 610 | \draw (page cs: 0.5, 0.0) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 0.5, 1.0); 611 | \draw (page cs: 0.6, 0.0) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 0.6, 1.0); 612 | \draw (page cs: 0.7, 0.0) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 0.7, 1.0); 613 | \draw (page cs: 0.8, 0.0) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 0.8, 1.0); 614 | \draw (page cs: 0.9, 0.0) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 0.9, 1.0); 615 | 616 | % horizontal lines 617 | \draw (page cs: 0.0, 0.1) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 1.0, 0.1); 618 | \draw (page cs: 0.0, 0.2) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 1.0, 0.2); 619 | \draw (page cs: 0.0, 0.3) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 1.0, 0.3); 620 | \draw (page cs: 0.0, 0.4) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 1.0, 0.4); 621 | \draw (page cs: 0.0, 0.5) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 1.0, 0.5); 622 | \draw (page cs: 0.0, 0.6) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 1.0, 0.6); 623 | \draw (page cs: 0.0, 0.7) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 1.0, 0.7); 624 | \draw (page cs: 0.0, 0.8) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 1.0, 0.8); 625 | \draw (page cs: 0.0, 0.9) edge[black!20!white, line width = 0.3mm, dotted] (page cs: 1.0, 0.9); 626 | \end{tikzpicture} 627 | } 628 | 629 | 630 | 631 | -------------------------------------------------------------------------------- /latex-slides/slides.tex: -------------------------------------------------------------------------------- 1 | \documentclass[aspectratio=169,t,11pt,table]{beamer} 2 | \usepackage{slides,math} 3 | 4 | % Optionally define `accent`/`accent2` colors for theme customization 5 | % I recommend changing the top slider on this: https://hslpicker.com/#1e9400 6 | \definecolor{accent}{HTML}{940034} 7 | \definecolor{accent2}{HTML}{006896} 8 | 9 | \title{What is the Effect of X on Y?} 10 | \date{\today} 11 | \author{Kyle Butts} 12 | \addbibresource{references.bib} 13 | 14 | \begin{document} 15 | 16 | % ------------------------------------------------------------------------------ 17 | \begin{frame}[noframenumbering,plain] 18 | \maketitle 19 | 20 | % \bottomleft{\footnotesize $^*$A bit of extra info here. Add an asterich to title or author} 21 | \end{frame} 22 | % ------------------------------------------------------------------------------ 23 | 24 | \begin{frame}{Customizing template} 25 | At the top of the template is two accent color definitions. Change these and they should populate throughout the slides. 26 | \end{frame} 27 | 28 | % ------------------------------------------------------------------------------ 29 | \section{Common Items} 30 | % ------------------------------------------------------------------------------ 31 | 32 | \begin{frame}{Components}\label{main1} 33 | This section highlights commonly used components and their theming 34 | 35 | \begin{itemize} 36 | \item Can emphasize with \alert{the alert command} which uses the \texttt{accent2} color 37 | 38 | \begin{itemize} 39 | \item This allows you to draw attention to specific words/phrases 40 | \end{itemize} 41 | 42 | \item To include things in appendix, you must first label the slide and the appendix slide and then include a hyperlink. The command \texttt{\textbackslash bottomleft} will position in the bottom left corner nicely 43 | \end{itemize} 44 | 45 | \bottomleft{ 46 | \hyperlink{appendix1}{\beamergotobutton{Appendix}} 47 | \beamergotobutton{Button 2} 48 | } 49 | \end{frame} 50 | 51 | \begin{frame}{Numbered Lists} 52 | You can also use numbered items that look a bit more professional 53 | 54 | \begin{enumerate} 55 | \item Pretty good 56 | 57 | \item To include things in appendix 58 | \end{enumerate} 59 | \end{frame} 60 | 61 | \begin{frame}{Citations} 62 | Topic 1: Spatial Frictions 63 | \citecolor{ 64 | [\citet{Fajgelbaum_Morales_Serrato_Zidar_2018}, \citet{Hsieh_Moretti_2019}, and \citet{Moretti_2011}] 65 | } 66 | 67 | \vspace{5mm} 68 | Topic 2: Blah 69 | \citecolor{ 70 | [\citet{Suárez_Serrato_Zidar_2016}] 71 | } 72 | \end{frame} 73 | 74 | \begin{frame}{Colors} 75 | I have a set of colors that I use: 76 | 77 | \navy{navy}, 78 | \raspberry{raspberry}, 79 | \cranberry{cranberry}, 80 | \orange{orange}, 81 | \purple{purple}, 82 | \blue{blue}, 83 | \green{green}, 84 | \rose{rose}, and 85 | \yellow{yellow} 86 | 87 | \bigskip 88 | If you want to color text with them, use \texttt{\textbackslash colorname\{...\}} 89 | \end{frame} 90 | 91 | \begin{frame}{Color boxes} 92 | You can also use color boxes. Some of the colors look ugly when made lighter, so I won't show them: 93 | 94 | \bgNavy{bgNavy}, 95 | \bgRaspberry{bgRaspberry}, 96 | \bgCranberry{bgCranberry}, 97 | \bgOrange{bgOrange}, 98 | \bgPurple{bgPurple}, 99 | \bgGreen{bgGreen}, 100 | \bgYellow{bgYellow} 101 | 102 | \bigskip 103 | If you want to color text with them, use \texttt{\textbackslash bgColorname\{...\}} 104 | \end{frame} 105 | 106 | \begin{frame}{Highlight Math} 107 | Can also highlight in an equation with \texttt{\textbackslash tcbhighmath[colback = bgColor]\{...\}}. If you don't include the brackets, it will default to \texttt{bgRaspberry}. 108 | 109 | $$ 110 | \int_{ \tcbhighmath[colback = bgNavy]{\Omega} } f(x) \, dx \approx 111 | \frac{\tcbhighmath[colback = bgRaspberry]{ |\Omega| }}{N} 112 | \sum_{i=1}^{N} f( \tcbhighmath[colback = bgPurple]{ X_i } ) 113 | $$ 114 | \end{frame} 115 | 116 | \begin{frame}[fragile]{Code listings} 117 | The \texttt{codeblock} environment lets you copy text verbatim. It is important you use \texttt{[fragile]} as a frame option in beamer 118 | 119 | \begin{codeblock} 120 | library(fixest) 121 | feols(mpg ~ 1, data = mtcars) 122 | #> OLS estimation, Dep. Var.: mpg 123 | #> Observations: 32 124 | #> Estimate Std. Error t value Pr(>|t|) 125 | #> (Intercept) 20.0906 1.06542 18.8569 < 2.2e-16 *** 126 | #> --- 127 | #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 128 | \end{codeblock} 129 | \end{frame} 130 | 131 | \begin{frame}{Blocks} 132 | \begin{block}{Theorem 1} 133 | The main specificaiton is as follows: 134 | $$ 135 | y_{it} = X_{it} \beta + \mu_i + \varepsilon_{it} 136 | $$ 137 | \end{block} 138 | \end{frame} 139 | 140 | \begin{frame}{Blocks} 141 | If you want something more colorful, use \texttt{colornameBlock} 142 | \begin{purpleBlock}{} 143 | This is a purple block 144 | \end{purpleBlock} 145 | 146 | \begin{cranberryBlock}{With Title} 147 | This is a cranberry block 148 | \end{cranberryBlock} 149 | \end{frame} 150 | 151 | \begin{frame}{Two Columns} 152 | \begin{columns}[T] 153 | \begin{column}{.50\textwidth} 154 | \vspace{0pt} 155 | % {\color{zinc400}\rule{\linewidth}{2pt}} 156 | Column 1 157 | 158 | \begin{enumerate} 159 | \item Bullet points for this column that can go over lines 160 | \item b 161 | \item c 162 | \end{enumerate} 163 | \end{column} 164 | 165 | \hfill 166 | 167 | \begin{column}{.50\textwidth} 168 | % {\color{zinc400}\rule{\linewidth}{2pt}} 169 | Column 2 170 | 171 | \begin{itemize} 172 | \item a 173 | \item b 174 | \item c 175 | \end{itemize} 176 | \end{column} 177 | \end{columns} 178 | \end{frame} 179 | 180 | \begin{frame}{Two Columns with Figure} 181 | \begin{columns}[T] 182 | \begin{column}{.6\textwidth} 183 | \includegraphics[width=\textwidth]{figures/plot_did2s_retail_slides.pdf} 184 | \end{column} 185 | \hfill 186 | \begin{column}{.4\textwidth} 187 | A point about the figure that is potentially important. 188 | 189 | \bigskip 190 | Another point about the figure that is also potentially important. 191 | \end{column} 192 | \end{columns} 193 | \end{frame} 194 | 195 | % ------------------------------------------------------------------------------ 196 | \section{Table} 197 | % ------------------------------------------------------------------------------ 198 | 199 | \begin{frame}{Table with cell / row highlighting}{} 200 | Use \texttt{\textbackslash cellcolor<\#>\{color\}} and \texttt{\textbackslash rowcolor<\#>\{color\}} to color cell / row. The \texttt{<\#>} is an optional overlay specification 201 | 202 | \bigskip 203 | \begin{center} 204 | {\footnotesize\textsc{Outcome:} Log of Real Per Capita Income \\} 205 | 206 | \bigskip 207 | \begin{tabular}{l cc} 208 | \toprule 209 | & (1) & (2) \\ 210 | \midrule 211 | Policy Enacted $= 1$ & \cellcolor<1>{accent!15!white} 0.0694* & \cellcolor<2>{accent!15!white} 0.0713** \\ 212 | & (0.0401) & (0.0381) \\ 213 | \hline 214 | \rowcolor<3>{accent!15!white} State Fixed Effects & & $\checkmark$ \\ 215 | Observations & 1,673 & 1,673 \\ 216 | \bottomrule 217 | \end{tabular} 218 | \end{center} 219 | \end{frame} 220 | 221 | \begin{frame}{Table} 222 | \begin{columns}[T] 223 | \begin{column}{.4\textwidth} 224 | \begin{adjustbox}{max width = \textwidth, center} 225 | \begin{tabular}{@{} l *{2}{r} @{}} 226 | \toprule 227 | & (1) & (2)\\ 228 | \midrule 229 | 230 | \only<2>{ 231 | \marktopleft{ex1}Handling of Complaints & 0.692$^{***}$& 0.682$^{***}$ \\ 232 | & (0.149) & (0.129) \markbottomright{ex1} \\ 233 | } 234 | \only<1>{ 235 | Handling of Complaints & 0.692$^{***}$& 0.682$^{***}$ \\ 236 | & (0.149) & (0.129) \\ 237 | } 238 | No Special Privileges & -0.104 & $-$0.103 \\ 239 | & (0.135) & (0.129) \\ 240 | Opportunity to Learn & 0.249 & 0.238$^{*}$ \\ 241 | & (0.160) & (0.139) \\ 242 | 243 | \midrule 244 | Observations & 30 & 30 \\ 245 | R$^{2}$ & 0.715 & 0.715 \\ 246 | \bottomrule 247 | 248 | \end{tabular} 249 | \end{adjustbox} 250 | 251 | \note{$^{*} p<0.1$; $^{**} p<0.05$; $^{***} p<0.01$.} 252 | \end{column} 253 | \hfill 254 | \begin{column}{.5\textwidth} 255 | \begin{itemize} 256 | \item Use \texttt{\textbackslash marktopleft\{name\}} and \texttt{\textbackslash markbottomright\{name\}} within the table to create box. 257 | \item Using \texttt{\textbackslash only} or \texttt{\textbackslash on} lets you conditionally display box 258 | \end{itemize} 259 | \end{column} 260 | \end{columns} 261 | \end{frame} 262 | 263 | % ------------------------------------------------------------------------------ 264 | \section{Figures} 265 | % ------------------------------------------------------------------------------ 266 | 267 | \begin{frame}{Figure}{Full-size Figures} 268 | You can use the command \texttt{\textbackslash imageframe\{img-path\}} and it will create a full-frame of a picture. 269 | 270 | \begin{itemize} 271 | \item Ideally, your figure is the same aspect as the frame (\texttt{4:3} or \texttt{16:9}) or else there will be white space in one of the directions. 272 | \end{itemize} 273 | \end{frame} 274 | 275 | % Try to make figures the correct aspect ratio otherwise white will be filled in around the image 276 | \imageframe{figures/plot_did2s_retail_slides.pdf} 277 | 278 | \begin{frame}{Figure} 279 | \begin{figure} 280 | \begin{adjustbox}{width = 0.75\textwidth, center} 281 | \includegraphics{figures/plot_did2s_retail_slides.pdf} 282 | \end{adjustbox} 283 | 284 | \vspace*{-\medskipamount} 285 | \note{0.75\textwidth}{The \texttt{adjustbox} environment helps resize figures/tables} 286 | \end{figure} 287 | \end{frame} 288 | 289 | \section{Advanced Tools} 290 | 291 | \begin{frame}[fragile]{Overlaying objects} 292 | This template provides some tools to make overlaying text / objects over the slides easier (an e.g. of this is the \texttt{\textbackslash bottomleft} overlay buttons). This feature is heavily inspired from Keenan Crane's excellent slides. 293 | 294 | \bigskip 295 | To use this, you can 296 | \begin{codeblock}[tex] 297 | \begin{tikzpicture}[remember picture, overlay] 298 | \node [text width = 0.3\textwidth] at (page cs: x, y) 299 | \end{tikzpicture} 300 | \end{codeblock} 301 | where \texttt{x, y} are the x and y coordinates of the slide and are between 0.0 and 1.0. 302 | 303 | 304 | \end{frame} 305 | 306 | \begin{frame}{} 307 | \medskip\medskip 308 | \parbox[]{0.8\textwidth}{ 309 | 310 | \textit{Proof.} First note that, since the $X_i$ are independent, 311 | \[ 312 | \text{Var} \left( \overline{X}_N \right) = \text{Var} \left( \frac{1}{N} \sum_{i=1}^{N} X_i \right) = \frac{1}{N^2} \sum_{i=1}^{N} \text{Var}(X_i) = \frac{\sigma^2}{N}. 313 | \] 314 | 315 | From Chebyshev's inequality, we then have 316 | \[ 317 | P\left( |\overline{X}_N - \mu| \geq \varepsilon \right) \leq \frac{\text{Var}[\overline{X}_N]}{\varepsilon^2} = \frac{\sigma^2}{N^2 \varepsilon^2}, 318 | \] 319 | and 320 | \[ 321 | \lim_{N \to \infty} \frac{\sigma^2}{N^2 \varepsilon^2} = 0. 322 | \] 323 | 324 | } 325 | 326 | % \devgrid{} 327 | 328 | \begin{tikzpicture}[remember picture, overlay] 329 | \coordinate (arrow1_a) at (page cs:0.8, 0.37); 330 | \coordinate (arrow1_b) at (page cs:0.7, 0.21); 331 | \draw (arrow1_a) edge[zinc500, out = 100, in = 0, line width = 0.6mm, -Stealth] (arrow1_b); 332 | 333 | \coordinate (arrow2_a) at (page cs:0.72, 0.54); 334 | \coordinate (arrow2_b) at (page cs:0.57, 0.54); 335 | \draw (arrow2_a) edge[zinc500, out = -150, in = -40, line width = 0.6mm, -Stealth] (arrow2_b); 336 | 337 | \node [text width = 0.34\textwidth, rotate = 1] at (page cs:0.8,0.44) { 338 | \begin{tcolorbox}[ 339 | enhanced, 340 | width = \textwidth, 341 | colback = white, 342 | colframe = zinc300, 343 | boxrule = 0.4mm, 344 | arc = 0.5mm, 345 | % sharp corners, 346 | left = 0.5mm, right = 0.5mm, 347 | top = 1mm, bottom = 1mm, 348 | fuzzy shadow = {0mm}{-0.5mm}{-1pt}{0.2mm}{zinc300}, 349 | fontupper = \rmfamily, 350 | % drop fuzzy shadow 351 | ] 352 | \setstretch{1} 353 | {\small 354 | \textbf{In summary:} averaging reduces variance; 355 | Chebyshev says that random variables with small variance will be close to their mean. 356 | } 357 | \end{tcolorbox} 358 | }; 359 | 360 | \end{tikzpicture} 361 | \end{frame} 362 | 363 | \begin{frame}{Example of labelling equations} 364 | % \devgrid 365 | 366 | We can use monte carlo simulation to draw $N$ observations from the domain $\Omega$: 367 | 368 | \medskip 369 | $$ 370 | \int_{ \Omega } f(x) \, dx \approx 371 | \frac{\tcbhighmath{ |\Omega| }}{N} 372 | \sum_{i=1}^{N} f( \tcbhighmath{ X_i } ) 373 | $$ 374 | 375 | \begin{tikzpicture}[remember picture, overlay] 376 | \node [anchor = south, text width = 0.12\textwidth] at (page cs:0.45,0.375) { 377 | \begin{center} 378 | \setstretch{0.7} 379 | {\footnotesize\color{raspberry} \emph{volume of domain}} 380 | \end{center} 381 | }; 382 | 383 | \node [anchor = north, text width = 0.1\textwidth] at (page cs:0.65,0.41) { 384 | \begin{center} 385 | \setstretch{0.7} 386 | {\footnotesize\color{raspberry} \emph{Draw from $\Omega$}} 387 | \end{center} 388 | }; 389 | \end{tikzpicture} 390 | \end{frame} 391 | 392 | \begin{frame}{} 393 | \devgrid 394 | 395 | It can be a bit tedious to try and place these elements. For that reason, I added \texttt{\textbackslash devgrid} command that will lay every 0.1 unit of the slide. Counting will get you in the ball park and manual tweaking will finish the job. 396 | 397 | % Absolute positioned tikzpicture 398 | \begin{tikzpicture}[remember picture, overlay] 399 | \node[anchor = north west] (topleft) 400 | at (page cs:0.0, 0.0) { $\blacksquare$ }; 401 | \node[anchor = north east] (topright) 402 | at (page cs:1.0, 0.0) { $\blacksquare$ }; 403 | \node[anchor = south west] (bottomleft) 404 | at (page cs:0.0, 1.0) { $\blacksquare$ }; 405 | \node[anchor = south east] (bottomright) 406 | at (page cs:1.0, 1.0) { $\blacksquare$ }; 407 | \end{tikzpicture} 408 | \end{frame} 409 | 410 | 411 | 412 | 413 | 414 | % ------------------------------------------------------------------------------ 415 | \begin{frame}[allowframebreaks,noframenumbering]{References} 416 | \thispagestyle{empty} 417 | \printbibliography 418 | \end{frame} 419 | \appendix 420 | % ------------------------------------------------------------------------------ 421 | 422 | \begin{frame}{Appendix Slide}{Summary Slides}\label{appendix1} 423 | \begin{table}[t] 424 | % \caption{Summary Statistics}\label{tab:summary_stats} 425 | \begin{adjustbox}{width = 0.8\textwidth} 426 | \begin{tabular}{@{} lccccccc @{}} 427 | \toprule 428 | Statistic & \multicolumn{1}{c}{N} & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{St. Dev.} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Pctl(25)} & \multicolumn{1}{c}{Pctl(75)} & \multicolumn{1}{c}{Max} \\ 429 | \hline \\[-1.8ex] 430 | rating & 30 & 64.633 & 12.173 & 40 & 58.8 & 71.8 & 85 \\ 431 | complaints & 30 & 66.600 & 13.315 & 37 & 58.5 & 77 & 90 \\ 432 | privileges & 30 & 53.133 & 12.235 & 30 & 45 & 62.5 & 83 \\ 433 | learning & 30 & 56.367 & 11.737 & 34 & 47 & 66.8 & 75 \\ 434 | raises & 30 & 64.633 & 10.397 & 43 & 58.2 & 71 & 88 \\ 435 | \bottomrule 436 | \end{tabular} 437 | \end{adjustbox} 438 | 439 | \note{0.8\textwidth}{Using R base dataframe \texttt{attitude}. I use my custom \texttt{\textbackslash note} command for notes} 440 | \end{table} 441 | 442 | \bottomleft{ 443 | \hyperlink{main1}{\beamerreturnbutton{Back}}} 444 | % \bottomright{\hyperlink{main1}{\beamerreturnbutton{Back}}} 445 | \end{frame} 446 | 447 | \end{document} 448 | -------------------------------------------------------------------------------- /referee-response/referee-response.sty: -------------------------------------------------------------------------------- 1 | % \usepackage{xparse} 2 | % 3 | % \let\oldsection\section 4 | % \let\oldsubsection\subsection 5 | % 6 | % \makeatletter 7 | % \newcounter{@secnumdepth} 8 | % \RenewDocumentCommand{\section}{s o m}{% 9 | % \IfBooleanTF{#1} 10 | % {\setcounter{@secnumdepth}{\value{secnumdepth}}% Store secnumdepth 11 | % \setcounter{secnumdepth}{0}% Print only up to \chapter numbers 12 | % \oldsection{#3}% \section* 13 | % \setcounter{secnumdepth}{\value{@secnumdepth}}}% Restore secnumdepth 14 | % {\IfValueTF{#2}% \section 15 | % {\oldsection[#2]{#3}}% \section[.]{..} 16 | % {\oldsection{#3}}}% \section{..} 17 | % } 18 | % \RenewDocumentCommand{\subsection}{s o m}{% 19 | % \IfBooleanTF{#1}{% 20 | % \setcounter{@secnumdepth}{\value{secnumdepth}}% Store secnumdepth 21 | % \setcounter{secnumdepth}{1}% Print only up to \chapter numbers 22 | % \oldsubsection{#3}% \subsection* 23 | % \setcounter{secnumdepth}{\value{@secnumdepth}} 24 | % }% Restore secnumdepth 25 | % { 26 | % \IfValueTF{#2}% \subsection 27 | % {\oldsubsection[#2]{#3}}% \subsection[.]{..} 28 | % {\oldsubsection{#3}}% \subsection{..} 29 | % } 30 | % } 31 | % \makeatother 32 | 33 | \setcounter{tocdepth}{3} 34 | 35 | % Referee Comments 36 | \usepackage{tcolorbox} 37 | \tcbuselibrary{breakable, skins} 38 | \newtcolorbox{commentbox}{ 39 | blanker, breakable, left=1em, 40 | top = 0.5em, bottom = 0.5em, 41 | borderline west={2pt}{0pt}{jet} 42 | } 43 | 44 | 45 | \newcommand{\RefName}{} 46 | \newcommand{\RefAbbr}{} 47 | \newcounter{commentcount} 48 | \setcounter{commentcount}{1} 49 | \newenvironment{refcomment}{ 50 | \subsection{\RefAbbr \ Comment \thecommentcount} 51 | \addtocounter{commentcount}{1} 52 | \begin{commentbox}\color{jet} 53 | }{ 54 | \end{commentbox} 55 | } 56 | 57 | % Reset counter and create section 58 | \newcommand{\NewRef}[2]{ 59 | \renewcommand{\RefName}{#1} 60 | \renewcommand{\RefAbbr}{#2} 61 | \section{Responses to \RefName} 62 | \setcounter{commentcount}{1} 63 | } 64 | 65 | % Styling sections 66 | \usepackage[explicit]{titlesec} 67 | \titleformat{\section} 68 | {\large \bf} 69 | {} 70 | {0em} 71 | {#1} 72 | 73 | \titleformat{\subsection} 74 | {\fontsize{12}{10}\it} 75 | {} 76 | {0em} 77 | {#1} 78 | -------------------------------------------------------------------------------- /referee-response/responses.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/referee-response/responses.pdf -------------------------------------------------------------------------------- /referee-response/responses.tex: -------------------------------------------------------------------------------- 1 | \documentclass[12pt]{article} 2 | % Should copy over the .sty files from latex-article 3 | \usepackage{../latex-article/paper} 4 | \usepackage{../latex-article/math} 5 | \usepackage{referee-response} 6 | 7 | % Conditionally display thoughts (hide by switching to `\boolfalse`) 8 | \booltrue{INCLUDECOMMENTS} 9 | \newcommand{\kyle}[1]{\coauthorComment[Kyle]{#1}} 10 | 11 | % Reference main document ------------------------------------------------------ 12 | % Note: I compile to `auxiliary/` to avoid cluttering the main directory. You might neeed to delete `auxiliary/` 13 | % Note: The numbering of the main document is colored, but not clickable which is kind of confusing. Not sure if I like this approach or not 14 | % \usepackage{xr,xr-hyper} 15 | % \externaldocument[main-]{auxiliary/article} 16 | 17 | \begin{document} 18 | 19 | % Title ------------------------------------------------------------------------ 20 | \begin{center} 21 | {\large\bf Paper Title} 22 | 23 | \emph{Authors' Responses to Referee Comments} 24 | 25 | \emph{Journal} (\texttt{Review Number}) 26 | \end{center} 27 | % ------------------------------------------------------------------------------ 28 | 29 | \noindent We would like to thank the referees for their time and detailed feedback on our paper. We have done our best to respond to each and every comment. Below, the reviewer's comment is marked with a left border. Our responses follow below each comment. 30 | 31 | \section{Summary of Revisions} 32 | 33 | The major changes in this draft include .... 34 | 35 | % ------------------------------------------------------------------------------ 36 | \vspace*{\bigskipamount}\NewRef{Referee 1}{R1} 37 | % ------------------------------------------------------------------------------ 38 | 39 | \begin{refcomment} 40 | Full text of the referee's comment. It will automatically create a \texttt{\textbackslash subsection} with the comment number. 41 | \end{refcomment} 42 | 43 | \kyle{ 44 | Thoughts / plan of action. These can be hidden by toggling \texttt{INCLUDETODOS} to \texttt{\textbackslash boolfalse}. 45 | } 46 | 47 | Response 48 | 49 | \begin{refcomment} 50 | Comment 51 | \end{refcomment} 52 | 53 | Response 54 | 55 | 56 | 57 | 58 | % ------------------------------------------------------------------------------ 59 | \vspace*{\bigskipamount}\NewRef{Referee 2}{R2} 60 | % ------------------------------------------------------------------------------ 61 | 62 | \begin{refcomment} 63 | Comment 64 | \end{refcomment} 65 | 66 | 67 | 68 | 69 | % ------------------------------------------------------------------------------ 70 | \newpage 71 | \section*{How to use this template} 72 | % ------------------------------------------------------------------------------ 73 | 74 | There are two main commands provided by the document. First, for each referee, a \texttt{\textbackslash section} is created using the \texttt{\textbackslash NewRef\{Name\}\{Abbreviation\}} command. The \texttt{Name} is what will be displayed by the section and \texttt{Abbreviation} is what will label each comment. 75 | 76 | Within each section, each referee comment will be written using \texttt{\textbackslash begin\{refcomment\} ... \textbackslash end\{refcomment\}}. This command automatically numbers the comments and labels it using the \texttt{Abbreviation} from the \texttt{NewRef} declaration. Responses to the comment should go below the \texttt{refcomment} block. 77 | 78 | 79 | \end{document} 80 | -------------------------------------------------------------------------------- /render.R: -------------------------------------------------------------------------------- 1 | #' Credit to https://github.com/andrewheiss/hikmah-academic-quarto/tree/main 2 | 3 | # %% 4 | library(tidyverse) 5 | library(magick) 6 | library(fs) 7 | 8 | file_delete(dir_ls("thumbnails/")) 9 | dir_create("thumbnails/") 10 | 11 | # %% 12 | # @param tile Number of images per row 13 | thumbify <- function(to_convert, which_pages = TRUE, tile = 3) { 14 | template_name <- path_split(to_convert)[[1]][1] 15 | 16 | # Convert each rendered PDF to a collage and save as PNG 17 | pages <- image_read_pdf(to_convert) 18 | 19 | if (isTRUE(which_pages)) { 20 | which_pages <- seq_len(length(pages)) 21 | } 22 | pages_split <- split(which_pages, ceiling(seq_along(which_pages) / tile)) 23 | 24 | images <- c() 25 | for (i in seq_along(pages_split)) { 26 | curr_pages <- pages_split[[i]] 27 | thumbnail_name <- path("thumbnails/", sprintf("%s-%s.png", template_name, i)) 28 | 29 | pages[curr_pages] |> 30 | image_montage( 31 | geometry = "x2000+25+35", 32 | tile = tile, 33 | bg = "grey92", 34 | shadow = FALSE 35 | ) |> 36 | image_convert(format = "png") |> 37 | image_write(thumbnail_name) 38 | 39 | images <- c(images, thumbnail_name) 40 | } 41 | 42 | return(images) 43 | } 44 | 45 | # %% 46 | article_images <- thumbify( 47 | "latex-article/article.pdf", 48 | which_pages = TRUE, 49 | tile = 3 50 | ) 51 | slides_images <- thumbify( 52 | "latex-slides/slides.pdf", 53 | which_pages = c(1, 4, 9, 10, 11, 18, 23, 26, 30), 54 | tile = 3 55 | ) 56 | response_images <- thumbify( 57 | "referee-response/responses.pdf", 58 | which_pages = c(1, 2), 59 | tile = 2 60 | ) 61 | 62 | 63 | # %% 64 | #| label: 'Create README.md images' 65 | readme <- xfun::read_utf8("README.md") 66 | 67 | article_md <- sprintf( 68 | '[](%s)', 69 | article_images, article_images 70 | ) 71 | insert_idx <- which(str_detect(readme, "")) 72 | readme <- c( 73 | readme[1:insert_idx[1]], 74 | article_md, 75 | readme[insert_idx[2]:length(readme)] 76 | ) 77 | 78 | slides_md <- sprintf( 79 | '[](%s)', 80 | slides_images, slides_images 81 | ) 82 | insert_idx <- which(str_detect(readme, "")) 83 | readme <- c( 84 | readme[1:insert_idx[1]], 85 | slides_md, 86 | readme[insert_idx[2]:length(readme)] 87 | ) 88 | 89 | response_md <- sprintf( 90 | '[](%s)', 91 | response_images, response_images 92 | ) 93 | insert_idx <- which(str_detect(readme, "")) 94 | readme <- c( 95 | readme[1:insert_idx[1]], 96 | response_md, 97 | readme[insert_idx[2]:length(readme)] 98 | ) 99 | 100 | xfun::write_utf8(readme, "README.md") 101 | -------------------------------------------------------------------------------- /thumbnails/latex-article-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/thumbnails/latex-article-1.png -------------------------------------------------------------------------------- /thumbnails/latex-article-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/thumbnails/latex-article-2.png -------------------------------------------------------------------------------- /thumbnails/latex-slides-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/thumbnails/latex-slides-1.png -------------------------------------------------------------------------------- /thumbnails/latex-slides-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/thumbnails/latex-slides-2.png -------------------------------------------------------------------------------- /thumbnails/latex-slides-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/thumbnails/latex-slides-3.png -------------------------------------------------------------------------------- /thumbnails/referee-response-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylebutts/latex-templates/eac61cf136cb9b929091e39ee8e8a26d525836b1/thumbnails/referee-response-1.png --------------------------------------------------------------------------------