\documentclass[12pt]{memoir}
-% article-1 and article-2 styles were originally based on kieran healy's
-% templates
-\usepackage{mako-mem}
-\chapterstyle{article-2}
-
-% with article-3 \chapterstyle, change to: \pagestyle{memo}
-\pagestyle{mako-mem}
+\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{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}
% 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{mako-mem-git}
+% \pagestyle{cdsc-page-git}
% LATEX NOTE: this alternative line will just input a timestamp at the
% build process, useful for sharelatex
-% \pagestyle{mako-mem-sharelatex}
+% \pagestyle{cdsc-page-sharelatex}
\begin{document}
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