% File produced by Jeremy West. Last updated: July 2024
% This file may be distributed and/or modified:
%   (1.) under the LaTeX Project Public License and/or (2.) under the GNU Public License.
% You may freely use this for noncommercial purposes.

\documentclass[12pt,letterpaper,fleqn]{article}           % fleqn: align equations left

% Document:
\usepackage{geometry}                                     % Custom margins for single page, etc.
\usepackage{fullpage}                                     % Use the full page
\usepackage{setspace}                                     % Enables custom margins, double-spacing, etc.
\usepackage{pdflscape}                                    % Use: \begin{landscape} ... \end{landscape}

% Font/text:
\usepackage[latin9]{inputenc}                             % Font definition and input type
\usepackage[T1]{fontenc}                                  % Font output type 
\usepackage{lmodern}                                      % Latin Modern fonts
\usepackage{textcomp}                                     % Supports many additional symbols
\usepackage{amsmath}                                      % Math equations, etc.
\usepackage{amsthm}                                       % Math theorems, etc.
\usepackage{bbm}                                          % Math format for script 1, etc.
\usepackage{amsfonts}                                     % Math fonts (e.g. script fonts)
\usepackage{amssymb}                                      % Math symbols such as infinity
\DeclareMathOperator*{\Max}{Max}                          % Better looking max function
\DeclareMathOperator*{\Min}{Min}                          % Better looking min function
\DeclareMathOperator{\sgn}{sgn}                           % Better looking sgn function
\usepackage{xcolor}                                       % Enables colored text
\definecolor{darkblue}{rgb}{0.0,0.0,0.66}                 % Custom color: dark blue
\usepackage[hyperfootnotes=false,bookmarksopen]{hyperref} % Enable hyperlinks, expand menu subtree
\hypersetup{                                              % Custom hyperlink settings
    pdffitwindow=false,                                   % true: window fit to page when opened
    pdfstartview={XYZ null null 1.00},                    % Fits the default zoom of the page to 100%
    pdfnewwindow=true,                                    % Links in new window
    colorlinks=true,                                      % false: boxed links; true: colored links
    linkcolor=darkblue,                                   % Color of internal links
    citecolor=darkblue,                                   % Color of links to bibliography
    urlcolor=darkblue  }                                  % Color of external links
\usepackage{makecell}
\usepackage{array}
\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
\newcolumntype{C}[1]{>{\PreserveBackslash\centering}p{#1}}
\newcolumntype{R}[1]{>{\PreserveBackslash\raggedleft}p{#1}}
\newcolumntype{L}[1]{>{\PreserveBackslash\raggedright}p{#1}}
\usepackage{booktabs}

% Images:
\usepackage{graphicx}                                     % Allows more types of images to be included
\usepackage[position=bottom]{subfig}                      % Enables arrayed images
\usepackage[section]{placeins}                            % Forces floats to stay in section
\usepackage{float}                                        % Used with restylefloat
\usepackage[justification=centering]{caption}             % Center captions
\usepackage{tikz}                                         % Drawing figures with Tikz
\usetikzlibrary{decorations}                              % Formatting for Tikz
\usepackage{pdfpages}                                     % Allows for including multipage .pdf files

% Tables (required by Huxtable):
\usepackage{colortbl}                                     % Add color to tables (required by Huxtable)
\usepackage{threeparttable}                               % Table captions and notes (required by Huxtable)
\usepackage{hhline}                                       % Better horizontal lines (required by Huxtable)
\usepackage{adjustbox}                                    % Macros for boxed content (required by Huxtable)

% Miscellaneous:
\interfootnotelinepenalty=10000                           % Footnotes won't break across pages
\usepackage[semicolon]{natbib}                            % Bibliography and citation formatting
\bibliographystyle{abbrvnat}                              % Format for References section with natbib
\usepackage{datetime}                                     % Custom date format for date field
\newdateformat{mydate}{\monthname[\THEMONTH] \THEYEAR}    % Defining month year date format
\usepackage{authblk}                                      % Author affiliation details for title page
\usepackage{soul}                                         % Highlights and strike-throughs

\begin{document}

\begin{titlepage}
\title{Title of the Paper}
\renewcommand\Affilfont{\small}
\renewcommand\Authsep{\hspace{0.7cm}}
\renewcommand{\Authands}{\hspace{0.7cm}}
\author[a]{Coauthor One}
\author[b]{Jeremy West}
\author[ ]{\hspace{-0.65cm}\thanks{Coauthor One: \href{mailto:email}{email}. West (corresponding author): \href{mailto:westj@ucsc.edu}{westj@ucsc.edu}. We thank ... The findings, conclusions, and any errors in this work are those of the authors. The authors have no material financial interests related to this research.}}
\affil[a]{Coauthor One's affiliation}
\affil[b]{University of California, Santa Cruz}
\date{\mydate \today}
\maketitle 
\thispagestyle{empty}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    ABSTRACT
\vspace{-.5cm}
\begin{abstract}
\onehalfspacing

Text of the Abstract. % XX words

\end{abstract} \vspace{0.2cm}
\begin{center} JEL: Codes \end{center}
\begin{center} Keywords: Text \end{center}
\end{titlepage} 
\clearpage
\onehalfspacing

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}\label{sec:Introduction}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    INTRODUCTION

Text ...

\section{Methods}\label{sec:Methods}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    METHODS

Text ...

\section{Data}\label{sec:Data}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    DATA

Text ...

\section{Results}\label{sec:Results}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    RESULTS

Text ...

\section{Conclusions}\label{sec:Conclusions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    CONCLUSIONS

Text ...

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    REFERENCES
\singlespacing \bibliography{references} % Name of .bib references file

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    FIGURES AND TABLES

\section*{Figures and tables}\label{sec:figures_tables}
\addcontentsline{toc}{section}{\nameref{sec:figures_tables}}

\appendix \singlespacing 
\section{Appendix}\label{sec:DataAppendix}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    APPENDIX

\setcounter{table}{0}
\renewcommand\thetable{\Alph{section}\arabic{table}}
\setcounter{figure}{0}
\renewcommand\thefigure{\Alph{section}\arabic{figure}}

TBA...

%\newgeometry{left=2cm,top=2.5cm,right=2cm, bottom=3.6cm}
\restoregeometry
\end{document}
