X-Git-Url: https://code.communitydata.science/cdsc_tex.git/blobdiff_plain/c46fe4b78e38b4a4284f18c844e64cac1a4e4ea1..5526efbaee21eb694451541f7b11c7a5e0755c24:/paper_template/text.Rnw diff --git a/paper_template/text.Rnw b/paper_template/text.Rnw index a58ce91..faf5f9c 100644 --- a/paper_template/text.Rnw +++ b/paper_template/text.Rnw @@ -1,15 +1,25 @@ \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} + +<>= +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} @@ -26,9 +36,7 @@ % \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} @@ -63,11 +71,11 @@ % 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} @@ -135,6 +143,15 @@ 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 +<>= +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