From: Benjamin Mako Hill Date: Sat, 4 Aug 2018 18:12:16 +0000 (-0700) Subject: Merge branch 'master' into knitr X-Git-Url: https://code.communitydata.science/cdsc_tex.git/commitdiff_plain/5526efbaee21eb694451541f7b11c7a5e0755c24?hp=-c Merge branch 'master' into knitr - merged in CDSC branding from the master branch --- 5526efbaee21eb694451541f7b11c7a5e0755c24 diff --combined paper_template/text.Rnw index 1f38026,1a316cd..faf5f9c --- a/paper_template/text.Rnw +++ b/paper_template/text.Rnw @@@ -1,26 -1,14 +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} @@@ -37,7 -25,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} @@@ -72,11 -62,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} @@@ -144,15 -134,6 +143,15 @@@ brown fox jumps over the lazy dog. Th 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