 \documentclass[12pt]{memoir}

\usepackage{cdsc-memoir}
% there are two chapter styles: cdsc-article and cdsc-memo
% memo assumes that you remove the "\\" and the email address from the
% \author field below as well as that you will comment out the
% \published tag
\chapterstyle{cdsc-article}

\usepackage[utf8]{inputenc}
\usepackage{wrapfig}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
% \usepackage[garamond]{mathdesign}
\let\circledS\undefined

\usepackage[letterpaper,left=1in,right=1in,top=1in,bottom=1in]{geometry}

% packages i use in essentially every document
\usepackage{graphicx}
\usepackage{enumerate}
\newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX
\newcommand{\maxwidth}{\linewidth}
% packages i use in many documents but leave off by default
\usepackage{amsmath, amsthm, amssymb}
\usepackage{dcolumn}
% \usepackage{endfloat}

% import and customize urls
\usepackage[usenames,dvipsnames]{color}
\usepackage[breaklinks]{hyperref}

\hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Blue,
    urlcolor=Blue, unicode=true}

\usepackage{xcolor}
\definecolor{shadecolor}{rgb}{.97, .97, .97}
\definecolor{messagecolor}{rgb}{0, 0, 0}
\definecolor{warningcolor}{rgb}{1, 0, 1}
\definecolor{errorcolor}{rgb}{1, 0, 0}
\definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345}

\definecolor{mygreen}{HTML}{43bf71}

% list of footnote symbols for \thanks{}
\makeatletter
\renewcommand*{\@fnsymbol}[1]{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or
 \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger
  \or \ddagger\ddagger \else\@ctrerr\fi}}
\makeatother
\newcommand*\samethanks[1][\value{footnote}]{\footnotemark[#1]}

% add bibliographic stuff 
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[natbib=true, style=apa, backend=biber]{biblatex}
%\addbibresource{ecological_models.bib}
%\addbibresource{ch1_intro.bib}
\addbibresource{articlequality.bib}
\addbibresource{equalogy_refs.bib}
\addbibresource{refs.bib}
\addbibresource{ReadingTime.bib}
\addbibresource{ores_fairness.bib}
\DeclareLanguageMapping{american}{american-apa}

\defbibheading{secbib}[\bibname]{%
  \section*{#1}%
  \markboth{#1}{#1}%
  \baselineskip 14.2pt%
  \prebibhook}

\def\citepos#1{\citeauthor{#1}'s (\citeyear{#1})}
\def\citespos#1{\citeauthor{#1}' (\citeyear{#1})}



% memoir function to take out of the space out of the whitespace lists
\firmlists

% \newcommand*\abstract[1]{

% LATEX NOTE: these lines will import vc stuff after running `make vc` which
% will add version control information to the bottom of each page. This can be
% useful for keeping track of which version of a document somebody has:
% \input{vc}
% \pagestyle{cdsc-page-git}

% LATEX NOTE: this alternative line will just input a timestamp at the
% build process, useful for Overleaf
% \pagestyle{cdsc-page-overleaf}

% \definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345}
% \newcommand{\hlnum}[1]{\textcolor[rgb]{0.686,0.059,0.569}{#1}}%
% \newcommand{\hlstr}[1]{\textcolor[rgb]{0.192,0.494,0.8}{#1}}%
% \newcommand{\hlcom}[1]{\textcolor[rgb]{0.678,0.584,0.686}{\textit{#1}}}%
% \newcommand{\hlopt}[1]{\textcolor[rgb]{0,0,0}{#1}}%
% \newcommand{\hlstd}[1]{\textcolor[rgb]{0.345,0.345,0.345}{#1}}%
% \newcommand{\hlkwa}[1]{\textcolor[rgb]{0.161,0.373,0.58}{\textbf{#1}}}%
% \newcommand{\hlkwb}[1]{\textcolor[rgb]{0.69,0.353,0.396}{#1}}%
% \newcommand{\hlkwc}[1]{\textcolor[rgb]{0.333,0.667,0.333}{#1}}%
% \newcommand{\hlkwd}[1]{\textcolor[rgb]{0.737,0.353,0.396}{\textbf{#1}}}%
% \let\hlipl\hlkwb

% \usepackage{framed}
% \makeatletter
% \newenvironment{kframe}{%
%  \def\at@end@of@kframe{}%
%  \ifinner\ifhmode%
%   \def\at@end@of@kframe{\end{minipage}}%
%   \begin{minipage}{\columnwidth}%
%  \fi\fi%
%  \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep
%  \colorbox{shadecolor}{##1}\hskip-\fboxsep
%      % There is no \\@totalrightmargin, so:
%      \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
%  \MakeFramed {\advance\hsize-\width
%    \@totalleftmargin\z@ \linewidth\hsize
%    \@setminipage}}%
%  {\par\unskip\endMakeFramed%
%  \at@end@of@kframe}
% \makeatother

% \definecolor{shadecolor}{rgb}{.97, .97, .97}
% \definecolor{messagecolor}{rgb}{0, 0, 0}
% \definecolor{warningcolor}{rgb}{1, 0, 1}
% \definecolor{errorcolor}{rgb}{1, 0, 0}
% \newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX

\usepackage{alltt}

\definecolor{c77a1d2}{RGB}{119,161,210}
\definecolor{bf9837}{RGB}{191,152,55}
\definecolor{cc0c0c0}{RGB}{192,192,192}
\def \globalscale {0.2}

\definecolor{mycomp}{RGB}{250,198,49}
\definecolor{mymut}{RGB}{13,8,135}


%\usepackage{wrapfig}
\usepackage{tikz}
\usepackage{booktabs}
\usepackage{multicol}

% TODO make table of contents HERE

% TODO add Acknowledgements HERE


% \begin{acks}

% \end{acks}


% TODO add Dedication HERE

% Add Chapter Titles

\usepackage{subcaption}
\def\citepos#1{{\hypersetup{citecolor=black}\citeauthor{#1}}'s \citep{#1}}
\def\citespos#1{{\hypersetup{citecolor=black}\citeauthor{#1}}' \citep{#1}}
\let\oldciteauthor=\citeauthor
\def\citeauthor#1{{\hypersetup{citecolor=black}\oldciteauthor{#1}}}
%%
\usepackage[htt]{hyphenat}
\usepackage{commath}
\usepackage{mathtools}

\renewcommand{\widetilde}[1]{\mathbin{%
    \stackrel{\sim}{\smash{#1} \rule{0pt}{1.15ex}}%
    }}


\let\oldnorm\norm   % <-- Store original \norm as \oldnorm
\let\norm\undefined % <-- "Undefine" \norm
\DeclarePairedDelimiter\norm{\lVert}{\rVert}

%% end of the preamble, start of the body of the document source.
\hyphenation{shit-gun-con-trol-lers-say com-mer-cial-real-est-ate real-est-ate sub-red-dit sub-red-dits real-est-ate-in-vest-ing fin-an-cial-in-de-pen-dence in-fin-ite-war-fare vint-age-aud-io rus-sia-la-go march-ag-ainst-trump}
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}

\def\Slash{\slash\hspace{0pt}}

% \chapterstyle{thatcher}

% this one is also good and more formal
% \chapterstyle{thatcher}

% \renewcommand*{\chapterheadstart}{\begingroup
%   \vspace*{\beforechapskip}%
%   \begin{adjustwidth}{}{-\chapindent}%
%   \hrulefill
%   \smash{\rule{0.4pt}{15mm}}
%   \end{adjustwidth}\endgroup}
\usepackage{longtable}
\usepackage{color, colortbl}
\definecolor{lavenderblue}{rgb}{0.9, 0.9, 0.98}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{svg}
\usepackage{afterpage}

%% magic command to not add links on \citeauthor
\usepackage{etoolbox}
\makeatletter
\pretocmd{\NAT@citexnum}{\@ifnum{\NAT@ctype>\z@}{\let\NAT@hyper@\relax}{}}{}{}
\makeatother

\DeclareMathOperator*{\argmin}{arg\,min} % thin space, limits underneath in displays
\DeclareMathOperator*{\argmax}{arg\,max} % thin space, limits underneath in displays


\begin{document}
\tableofcontents
\listoffigures
\listoftables
\chapter*[Acknowledgments]{Acknowledgments}

I am grateful to the many academic friends, colleagues, and mentors who have cultivated my intellectual development, helped me work on these ideas, and in every other way made possible my success. 
In particular I would like to thank members of the  Community Data Science Collective and Aaron Shaw, Sohyeon Hwang, Jeremy Foote,  Carl Colglazier, Floor Fiers, Sejal Khatri, Sefania Druga, Nicholas Vincent, and Kaylea Champion in particular for their helpful feedback on parts of this work.
Also thanks to Mako and Aaron for their innovation, dedication and care in organizing this very special research group.
I am also grateful to my collaborators I have not yet mentioned: Isabella Brown, Laura (Alia) Levi, Nicole McGinnis, Tilman Bayer, Olga Vasileva, and Aaron Halfaker.
Special thanks to Daryn McElroy for her work to externally validate our clusters.
Thanks to Mark Kott for his excellent course on mathematical ecology which inspired an important turning point in the direction of this work and to Carmen Gonzalez and Matthew Powers' for their fantastic course on fieldwork research methods. The importance of this education in qualitative research to this work suprised me, but I doubt it would suprise them.   
I am also grateful to the organizers and participants in the social computing reading group (SCRG) at the University of Washington.  My participation in this reading group has been invaluable to any ability I have to make contributions to social computing or HCI.
I owe special gratitude to my 20 interview participants for their time and knowledge.
I am thankful to the organizers and members of UAW Local 4121 for their strength and solidarity.  
Thanks to Jason Baumgartner and pushshift.io for the Reddit data archive.
This work was made possible by generous financial support from the National science foundation  grants IIS-1908850 and IIS-1910202 and GRFP2016220885 and was facilitated through the use of the advanced computational infrastructure provided by the Hyak supercomputer system at the University of Washington.

\chapter*[Dedication]{Dedication}
To Amanda, my dear full mutualist.


\chapter*[Preface to Chapter 1]{Preface to Chapter 1}
Several paragraphs in beginning of the following chapter adapt from text I wrote for a grant proposal submitted to the National Science Foundation (\url{https://www.nsf.gov/awardsearch/showAward?AWD_ID=1910202}, 1910202)
\begin{refsection}
\chapter[An Ecology of Digital Affiliation]{Introduction: An Ecology of Digital Affiliation}
\input{ch1_intro.tex}
% \end{refsection}
% \begin{refsection}
\chapter*[Preface to Chapter 2]{Preface to Chapter 2}
The following chapter is a collaborative work with Benjamin Mako Hill.

\noindent It was honored with a Top Paper award from the Computational Methods Division of the International Communication Association's 2021 annual meeting.  An early version of this chapter was presented at the 2020 International Conference for Computational Social Science (IC2S2 2020).  
\chapter[Identifying Competition and Mutualism]{Identifying Competition and Mutualism Between Online Groups}
\input{ch2_identifying.tex}
% \end{refsection} 
% \begin{refsection}
\chapter*[Preface to Chapter 3]{Preface to Chapter 3}

An important finding from Chapter 2 is that mutualism is much more common than competition among overlapping subreddits.  This finding was also surprising because ecological theory and prior results in social computing suggest that greater niche overlaps result in stronger competition.  Furthermore, theories of organizational ecology were insufficient for explaining the reasons why overlapping online communities exist in the first place. Therefore, the qualitative investigation presented in Chapter 3 provided important explanation and validation of the quantitative finding of widespread mutualism in terms of the experiences and understandings of active participants in overlapping subreddits.  If the findings from Chapter 3 had been known in advance of Chapter 2's study, Chapter 2 would have been more likely to anticipate widespread mutualism and may have been designed to explain it.  

Because Chapters 2, 3, and 4 are each written as stand-alone articles, some parts of the background section of Chapter 3, most notably the first 3 paragraphs of §3.2 makes some of the same points as the background section of Chapter 2.
Also, the interview recruitment process uses  an earlier version of clustering algorithm from Chapter 2 (before it was improved during a revise and resubmit process). The second paragraph of §3.5 summarizes the clustering procedure.  Readers of Chapter 2 may quickly pass over the these paragraphs.

This chapter is a collaborative work with Charles Kiene, Isabella Brown, Laura (Alia) Levi, Nicole McGinnis, and Benjamin Mako Hill and is under review in Proceedings of the ACM on Human-Computer Interaction: Computer Supported Cooperative Work.

  \chapter[No Community Can Do Everything]{No Community Can Do Everything: Why People Participate in Similar Online Communities}
\input{equalogy.tex}
% \end{refsection} 
% \begin{refsection}
\chapter*[Preface to Chapter 4]{Preface to Chapter 4}
As was the case with Chapter 3, Chapter 4 is written as a stand-alone article building upon Chapter 3.  It repeats some of the same motivating points in the first paragraph of §4.1, and the first two paragraphs of §4.2.

This study also reuses the clustering procedure from Chapter 2, but on a larger dataset. The first three paragraphs of §4.3 describe the clustering procedure. Those who have read Chapter 2 may quickly pass over these paragraphs, noting that the sample size, dimensionality of LSI, and the number of clusters are different from Chapter 2. 

\chapter[Dynamics of Ecological Adaptation]{Dynamics of Ecological Adaptation in Online Communities}
\input{ch4_competitive_exclusion.tex}
% \end{refsection} 
% \begin{refsection}
\chapter[Future Directions]{Future Directions in the Ecology of Online Communities}
\input{ch5_conclusion.tex}
\end{refsection}                
\appendix
\begin{refsection}
\chapter*[Preface to Appendix A]{Preface to Appendix A}
The following appendix is published in the Proceedings of The 17th International Symposium on Open Collaboration.

\chapter[Measuring Article Quality]{Measuring Wikipedia Article Quality in One Dimension by Extending ORES with Ordinal Regression}
\input{appendix_A_articlequality.tex}
\end{refsection} 
\chapter*[Preface to Appendix B]{Preface to Appendix B}
 The following appendix is a collaborative work with Tilman Bayer and Olga Vasileva and is published in the Proceedings of The 15th International Symposium on Open Collaboration.
\begin{refsection}
  \chapter[Dwelling on Wikipedia]{Dwelling on Wikipedia: Investigating time spent by global encyclopedia readers}
\input{appendix_B_readingtime.tex}
\end{refsection} 
\chapter*[Preface to Appendix C]{Preface to Appendix C}
  The following appendix is a collaborative work with Benjamin Mako Hill and Aaron Halfaker and is published in the Proceedings of ACM on Human-Computer Interaction: Computer Supported Cooperative Work.
\begin{refsection}
  \chapter[Effects of Algorithmic Flagging on Fairness]{Effects of Algorithmic Flagging on Fairness: Quasi-experimental Evidence from Wikipedia}
\input{appendix_C_oresfairness.tex}
\end{refsection} 

% \appendix

%\renewcommand{\thechapter}{A} after \chapter{Test Appendix}

% \addtocontents{toc}{\setlength\cftchapternumwidth{1em}}
% \renewcommand\thechapter{}



% \begin{refsection}
%   \chapter[Future Directions]{Future Directions in the Ecology of Online Communities}
% \input{appendix_B.tex}
% \end{refsection} 
% \begin{refsection}
%   \chapter[Future Directions]{Future Directions in the Ecology of Online Communities}
% \input{appendix_C.tex}
% \end{refsection} 



% bibliography here
% \setcounter{biburlnumpenalty}{9001}
% \printbibliography[title = {References}, heading=secbib]
\end{document}

%  LocalWords:  
