Changing to Rtex
This commit is contained in:
210
paper_template/text.Rtex
Normal file
210
paper_template/text.Rtex
Normal file
@@ -0,0 +1,210 @@
|
||||
\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}
|
||||
|
||||
<<init, echo=FALSE>>=
|
||||
knit_hooks$set(document = function(x) {
|
||||
sub('\\usepackage[]{color}',
|
||||
'\\usepackage[usenames,dvipsnames]{color}', x, fixed = TRUE)
|
||||
})
|
||||
opts_chunk$set(fig.path="figures/knitr-")
|
||||
|
||||
source("resources/preamble.R")
|
||||
@
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{textcomp}
|
||||
\usepackage[garamond]{mathdesign}
|
||||
|
||||
\usepackage[letterpaper,left=1.65in,right=1.65in,top=1.3in,bottom=1.2in]{geometry}
|
||||
|
||||
% packages i use in essentially every document
|
||||
\usepackage{graphicx}
|
||||
\usepackage{enumerate}
|
||||
|
||||
% packages i use in many documents but leave off by default
|
||||
% \usepackage{amsmath, amsthm, amssymb}
|
||||
% \usepackage{dcolumn}
|
||||
% \usepackage{endfloat}
|
||||
|
||||
% import and customize urls
|
||||
\usepackage[breaklinks]{hyperref}
|
||||
\hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Blue,
|
||||
urlcolor=Blue, unicode=true}
|
||||
|
||||
% 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{refs.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
|
||||
|
||||
% 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 sharelatex
|
||||
% \pagestyle{cdsc-page-sharelatex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\setlength{\parskip}{4.5pt}
|
||||
% LATEX NOTE: Ideal linespacing is usually said to be between 120-140% the
|
||||
% typeface size. So, for 12pt (default in this document, we're looking for
|
||||
% somewhere between a 14.4-17.4pt \baselineskip. Single; 1.5 lines; and Double
|
||||
% in MSWord are equivalent to ~117%, 175%, and 233%.
|
||||
|
||||
\baselineskip 16pt
|
||||
|
||||
\title{Title}
|
||||
\author{Your Name\\
|
||||
\href{mailto:youremail@uw.edu}{youremail@uw.edu}}
|
||||
\date{}
|
||||
|
||||
\published{\textsc{\textcolor{BrickRed}{This document is an
|
||||
unpublished draft.\\ Please do not distribute or cite without
|
||||
permission.}}}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
||||
brown fox jumps over the lazy dog. The quick brown fox jumps over the
|
||||
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||
fox jumps over the lazy dog.
|
||||
\end{abstract}
|
||||
|
||||
\section{Section}
|
||||
|
||||
% LATEX NOTE: This alphabet below is here so we can measure the line-length of
|
||||
% different layouts. Typesetters suggest that an average line-length of
|
||||
% between 45-90 characters and a rule of thumb for typesetting is that you
|
||||
% should be able to fit between 2-3 alphabets on one line. Generally speaking,
|
||||
% the shorter the line length, the better -- and the smaller the linespacing
|
||||
% can become. The following line is 3 alphabets (73 characters).
|
||||
|
||||
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
|
||||
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
||||
brown fox jumps over the lazy dog. The quick brown fox jumps over the
|
||||
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||
fox jumps over the lazy dog \citep{989866}.
|
||||
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
||||
brown fox jumps over the lazy dog. The quick brown fox jumps over the
|
||||
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||
fox jumps over the lazy dog \citep{989866}.
|
||||
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
||||
brown fox jumps over the lazy dog. The quick brown fox jumps over the
|
||||
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||
fox jumps over the lazy dog \citep{989866}.
|
||||
|
||||
\begin{table}
|
||||
\centering
|
||||
<<test_table, echo=FALSE>>=
|
||||
kable(form.copy, format="latex")
|
||||
@
|
||||
\caption{This is a test table. There are \Sexpr{f(nrow(form.copy))} rows in the table.}
|
||||
\label{tab:test}
|
||||
\end{table}
|
||||
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
||||
brown fox jumps over the lazy dog. The quick brown fox jumps over the
|
||||
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||
fox jumps over the lazy dog \citep{989866}.
|
||||
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
||||
brown fox jumps over the lazy dog. The quick brown fox jumps over the
|
||||
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||
fox jumps over the lazy dog \citep{989866}.
|
||||
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
||||
brown fox jumps over the lazy dog. The quick brown fox jumps over the
|
||||
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||
fox jumps over the lazy dog \citep{989866}.
|
||||
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
||||
brown fox jumps over the lazy dog. The quick brown fox jumps over the
|
||||
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||
fox jumps over the lazy dog \citep{989866}.
|
||||
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
||||
brown fox jumps over the lazy dog. The quick brown fox jumps over the
|
||||
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||
fox jumps over the lazy dog \citep{989866}.
|
||||
|
||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
||||
brown fox jumps over the lazy dog. The quick brown fox jumps over the
|
||||
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||
fox jumps over the lazy dog \citep{989866}.
|
||||
|
||||
% bibliography here
|
||||
\setcounter{biburlnumpenalty}{9001}
|
||||
\printbibliography[title = {References}, heading=secbib]
|
||||
|
||||
|
||||
\end{document}
|
||||
|
||||
% LocalWords:
|
||||
Reference in New Issue
Block a user