Compare commits
13 Commits
master
...
a3e469ca3f
| Author | SHA1 | Date | |
|---|---|---|---|
| a3e469ca3f | |||
| 887dfdfa8b | |||
| 9b5ca55478 | |||
| da76fb674e | |||
| 5af07a555f | |||
| d8e90cd7d3 | |||
| c92fd3b8be | |||
| ec596703e2 | |||
|
|
ee4ba6c2b4 | ||
| 54c07cb9f5 | |||
| 5526efbaee | |||
| ce30e1ac61 | |||
| c46fe4b78e |
2
paper_template/.gitignore
vendored
2
paper_template/.gitignore
vendored
@@ -13,3 +13,5 @@
|
|||||||
/*.ttt
|
/*.ttt
|
||||||
/*.bcf
|
/*.bcf
|
||||||
/*.run.xml
|
/*.run.xml
|
||||||
|
/figures/*
|
||||||
|
/*.tex
|
||||||
|
|||||||
@@ -1,23 +1,21 @@
|
|||||||
#!/usr/bin/make
|
#!/usr/bin/make
|
||||||
|
|
||||||
all: $(patsubst %.tex,%.pdf,$(wildcard *.tex))
|
all: $(patsubst %.Rtex,%.pdf,$(wildcard *.Rtex))
|
||||||
|
|
||||||
# use the following section for Rnw/knitr documents
|
%.tex: %.Rtex
|
||||||
# all: $(patsubst %.Rnw,%.pdf,$(wildcard *.Rnw))
|
Rscript -e "library(knitr); knit('$<')"
|
||||||
# %.tex: %.Rnw
|
|
||||||
# Rscript -e "library(knitr); knit('$<')"
|
|
||||||
|
|
||||||
%.pdf: %.tex
|
%.pdf: %.tex
|
||||||
latexmk -f -pdf $<
|
latexmk -f -lualatex $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
latexmk -C *.tex
|
latexmk -C *.tex
|
||||||
rm -f *.tmp *.run.xml
|
rm -f *.tmp *.run.xml
|
||||||
rm -f vc
|
rm -f vc
|
||||||
rm -f *.bbl
|
rm -f *.bbl
|
||||||
# the following lines are useful for Rnw/knitr
|
# the following lines are useful for Rtex/knitr
|
||||||
# rm -rf cache/ figure/
|
rm -rf cache/ figure/
|
||||||
# rm -f *.tex
|
rm -f *.tex
|
||||||
|
|
||||||
viewpdf: all
|
viewpdf: all
|
||||||
evince *.pdf
|
evince *.pdf
|
||||||
@@ -27,4 +25,4 @@ vc: resources/vc-git
|
|||||||
pdf: all
|
pdf: all
|
||||||
|
|
||||||
.PHONY: clean all
|
.PHONY: clean all
|
||||||
# .PRECIOUS: %.tex
|
.PRECIOUS: %.tex
|
||||||
|
|||||||
@@ -1,209 +0,0 @@
|
|||||||
% Some article styles and page layout tweaks for the LaTeX Memoir
|
|
||||||
% class.
|
|
||||||
%
|
|
||||||
% Copyright 2009-2018 Benjamin Mako Hill <mako@atdot.cc>
|
|
||||||
% Copyright 2008-2009 Kieran Healy <kjhealy@soc.duke.edu>
|
|
||||||
|
|
||||||
% Distributed as free software under the GNU GPL v3
|
|
||||||
|
|
||||||
% This file was originally based on one by Kieran Healy
|
|
||||||
% available here: http://github.com/kjhealy/latex-custom-kjh/
|
|
||||||
|
|
||||||
%%% Custom styles for headers and footers
|
|
||||||
%%% Basic
|
|
||||||
|
|
||||||
\makepagestyle{cdsc-page}
|
|
||||||
%\makeevenfoot{cdsc-page}{\thepage}{}{}
|
|
||||||
%\makeoddfoot{cdsc-page}{}{}{\thepage}
|
|
||||||
%\makeheadrule{cdsc-page}{\textwidth}{\normalrulethickness}
|
|
||||||
\newcommand{\@cdscmarks}{%
|
|
||||||
\let\@mkboth\markboth
|
|
||||||
\def\chaptermark##1{%
|
|
||||||
\markboth{%
|
|
||||||
\ifnum \c@secnumdepth >\m@ne
|
|
||||||
\if@mainmatter
|
|
||||||
\thechapter. \ %
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
##1}{}}
|
|
||||||
\def\sectionmark##1{%
|
|
||||||
\markright{##1}}
|
|
||||||
}
|
|
||||||
\makepsmarks{cdsc-page}{\@cdscmarks}
|
|
||||||
\makepsmarks{cdsc-page}{}
|
|
||||||
\makeevenhead{cdsc-page}{}{}{\scshape\thepage}
|
|
||||||
\makeoddhead{cdsc-page}{}{}{\scshape\thepage}
|
|
||||||
|
|
||||||
%%% version control info in footers; requires vc package
|
|
||||||
% Make the style for vc-git revision control headers and footers
|
|
||||||
\makepagestyle{cdsc-page-git}
|
|
||||||
\newcommand{\@gitmarks}{%
|
|
||||||
\let\@mkboth\markboth
|
|
||||||
\def\chaptermark##1{%
|
|
||||||
\markboth{%
|
|
||||||
\ifnum \c@secnumdepth >\m@ne
|
|
||||||
\if@mainmatter
|
|
||||||
\thechapter. \ %
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
##1}{}}
|
|
||||||
\def\sectionmark##1{%
|
|
||||||
\markright{##1}}
|
|
||||||
}
|
|
||||||
\makepsmarks{cdsc-page-git}{\@gitmarks}
|
|
||||||
\makeevenhead{cdsc-page-git}{}{}{\scshape\thepage}
|
|
||||||
\makeoddhead{cdsc-page-git}{}{}{\scshape\thepage}
|
|
||||||
\makeevenfoot{cdsc-page-git}{}{\texttt{\footnotesize{\textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}}{}
|
|
||||||
\makeoddfoot{cdsc-page-git}{}{\texttt{\footnotesize \textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}{}
|
|
||||||
|
|
||||||
%%% print a datestamp from ShareLaTeX
|
|
||||||
\makepagestyle{cdsc-page-overleaf}
|
|
||||||
\newcommand{\@slmarks}{%
|
|
||||||
\let\@mkboth\markboth
|
|
||||||
\def\chaptermark##1{%
|
|
||||||
\markboth{%
|
|
||||||
\ifnum \c@secnumdepth >\m@ne
|
|
||||||
\if@mainmatter
|
|
||||||
\thechapter. \ %
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
##1}{}}
|
|
||||||
\def\sectionmark##1{%
|
|
||||||
\markright{##1}}
|
|
||||||
}
|
|
||||||
\makepsmarks{cdsc-page-overleaf}{\@slmarks}
|
|
||||||
\makeevenhead{cdsc-page-overleaf}{}{}{\scshape\thepage}
|
|
||||||
\makeoddhead{cdsc-page-overleaf}{}{}{\scshape\thepage}
|
|
||||||
\makeevenfoot{cdsc-page-overleaf}{}{\texttt{\footnotesize{\textcolor{BrickRed}{Buildstamp/Version:~\pdfdate}}}}{}
|
|
||||||
\makeoddfoot{cdsc-page-overleaf}{}{\texttt{\footnotesize{\textcolor{BrickRed}{Buildstamp/Version:~\pdfdate}}}}{}
|
|
||||||
|
|
||||||
%% Create a command to make a note at the top of the first page describing the
|
|
||||||
%% publication status of the paper.
|
|
||||||
\newcommand{\published}[1]{%
|
|
||||||
\gdef\puB{#1}}
|
|
||||||
\newcommand{\puB}{}
|
|
||||||
\renewcommand{\maketitlehooka}{%
|
|
||||||
\par\noindent\footnotesize \puB}
|
|
||||||
|
|
||||||
\makepagestyle{cdsc-page-memo}
|
|
||||||
\makeevenhead{cdsc-page-memo}{}{}{}
|
|
||||||
\makeoddhead{cdsc-page-memo}{}{}{}
|
|
||||||
\makeevenfoot{cdsc-page-memo}{}{\scshape \thepage/\pageref{LastPage}}{}
|
|
||||||
\makeoddfoot{cdsc-page-memo}{}{\scshape \thepage/\pageref{LastPage}}{}
|
|
||||||
|
|
||||||
\usepackage{lastpage}
|
|
||||||
\usepackage{datetime}
|
|
||||||
|
|
||||||
% blank footnote
|
|
||||||
% Use \symbolfootnote[0]{Footnote text} for a blank footnote.
|
|
||||||
% Useful for initial acknowledgment note.
|
|
||||||
\long\def\symbolfootnote[#1]#2{\begingroup%
|
|
||||||
\def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}
|
|
||||||
|
|
||||||
% put a period after the section numbers
|
|
||||||
\setsecnumformat{\csname the#1\endcsname.\enspace}
|
|
||||||
|
|
||||||
% set fonts to garamond and helvetica
|
|
||||||
\renewcommand{\rmdefault}{ugm}
|
|
||||||
\renewcommand{\sfdefault}{phv}
|
|
||||||
|
|
||||||
% material shared between the two modes
|
|
||||||
|
|
||||||
\setsubsecheadstyle{\normalsize\itshape}
|
|
||||||
\setaftersubsubsecskip{-1em}
|
|
||||||
\setsubsubsecheadstyle{\small\bfseries}
|
|
||||||
\renewcommand{\printchaptername}{}
|
|
||||||
\renewcommand{\chapternamenum}{}
|
|
||||||
\renewcommand{\chapnumfont}{\chaptitlefont}
|
|
||||||
\renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
|
|
||||||
\renewcommand{\afterchapternum}{}
|
|
||||||
\renewcommand{\printchaptername}{\secheadstyle}
|
|
||||||
\renewcommand{\cftchapterfont}{\normalfont}
|
|
||||||
\renewcommand{\cftchapterpagefont}{\normalfont\scshape}
|
|
||||||
\renewcommand{\cftchapterpresnum}{\scshape}
|
|
||||||
\captiontitlefont{\small}
|
|
||||||
|
|
||||||
% turn off chapter numbering
|
|
||||||
\counterwithout{section}{chapter}
|
|
||||||
\counterwithout{figure}{chapter}
|
|
||||||
\counterwithout{table}{chapter}
|
|
||||||
|
|
||||||
% supress chapter numbers
|
|
||||||
\maxsecnumdepth{chapter}
|
|
||||||
\setsecnumdepth{chapter}
|
|
||||||
|
|
||||||
% for numbered sections and subsections:
|
|
||||||
% (a) comment out the above stanza; (b) uncomment the one below
|
|
||||||
% \maxsecnumdepth{subsection}
|
|
||||||
% \setsecnumdepth{subsection}
|
|
||||||
|
|
||||||
% set name of bibliography to 'references'
|
|
||||||
\renewcommand{\bibname}{References}
|
|
||||||
|
|
||||||
% >> cdsc-article <<
|
|
||||||
\makechapterstyle{cdsc-article}{
|
|
||||||
|
|
||||||
% section heading sytle
|
|
||||||
\setsecheadstyle{\large\scshape}
|
|
||||||
|
|
||||||
% reduce skip after section heading
|
|
||||||
\setaftersecskip{1.7ex}
|
|
||||||
|
|
||||||
% Title flush left
|
|
||||||
\pretitle{\flushleft\LARGE \itshape}
|
|
||||||
\posttitle{\par\vskip 0.5em}
|
|
||||||
\preauthor{\flushleft \large \lineskip 1em}
|
|
||||||
\postauthor{\par\lineskip 1em}
|
|
||||||
\predate{\flushleft\footnotesize\vspace{0.65em}}
|
|
||||||
\postdate{\par\vskip 1em}
|
|
||||||
|
|
||||||
% 'abstract' title, bigger skip from title
|
|
||||||
\renewcommand{\abstractname}{Abstract:}
|
|
||||||
\renewcommand{\abstractnamefont}{\normalfont\small\bfseries}
|
|
||||||
\renewcommand{\abstracttextfont}{\normalfont\small}
|
|
||||||
\setlength{\absparindent}{0em}
|
|
||||||
\setlength{\abstitleskip}{-1.5em}
|
|
||||||
\abstractrunin
|
|
||||||
|
|
||||||
% this is the default page style for chapters
|
|
||||||
\pagestyle{cdsc-page}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
% >> cdsc-memo <<
|
|
||||||
\makechapterstyle{cdsc-memo}{
|
|
||||||
|
|
||||||
% section heading sytle
|
|
||||||
\setsecheadstyle{\large\sffamily\bfseries\MakeUppercase}
|
|
||||||
|
|
||||||
% reduce skip after section heading
|
|
||||||
\setaftersecskip{1pt}
|
|
||||||
\setbeforesecskip{-1em}
|
|
||||||
\setaftersubsecskip{1pt}
|
|
||||||
\setbeforesubsecskip{-1em}
|
|
||||||
% \setaftersubsubsecskip{1pt}
|
|
||||||
% \setbeforesubsubsecskip{-1em}
|
|
||||||
|
|
||||||
|
|
||||||
% 'abstract' title, bigger skip from title
|
|
||||||
% \renewcommand{\maketitle}{\{\preauthor \theauthor\} \hfill \thetitle}
|
|
||||||
\renewcommand{\maketitle}{
|
|
||||||
{\Large\sffamily\bfseries\MakeUppercase\thetitle} \hfill
|
|
||||||
{\Large\sffamily\MakeUppercase\theauthor}
|
|
||||||
\vskip 0.7em}
|
|
||||||
\renewcommand{\abstractname}{\normalfont\scriptsize\noindent}
|
|
||||||
\renewcommand{\abstracttextfont}{\normalfont\scriptsize}
|
|
||||||
\abstractrunin
|
|
||||||
|
|
||||||
% set name of bibliography to 'references'
|
|
||||||
\renewcommand{\bibname}{References}
|
|
||||||
|
|
||||||
\parindent 0pt
|
|
||||||
|
|
||||||
% this is the default page style for chapters
|
|
||||||
\pagestyle{cdsc-page-memo}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
\endinput
|
|
||||||
|
|
||||||
110
paper_template/cdsc-paper.sty
Normal file
110
paper_template/cdsc-paper.sty
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
% Article-class styles and page layout for CDSC paper documents.
|
||||||
|
%
|
||||||
|
% This file replaces the older cdsc-memoir.sty. It targets the
|
||||||
|
% standard `article' class so the LaTeX tagging-project can produce
|
||||||
|
% tagged, accessible PDFs --- memoir is currently incompatible with
|
||||||
|
% that work. The look-and-feel is kept as close to the previous
|
||||||
|
% cdsc-article chapterstyle as is practical.
|
||||||
|
%
|
||||||
|
% Copyright 2009-2026 Benjamin Mako Hill <mako@atdot.cc>
|
||||||
|
% Copyright 2008-2009 Kieran Healy <kjhealy@soc.duke.edu>
|
||||||
|
|
||||||
|
% Distributed as free software under the GNU GPL v3
|
||||||
|
|
||||||
|
\usepackage{lastpage}
|
||||||
|
\usepackage{datetime}
|
||||||
|
\usepackage{xcolor}
|
||||||
|
|
||||||
|
%%% Page styles (replaces memoir's \makepagestyle / \makeevenhead etc.)
|
||||||
|
\usepackage{fancyhdr}
|
||||||
|
\setlength{\headheight}{14.5pt}
|
||||||
|
\addtolength{\topmargin}{-2.5pt}
|
||||||
|
|
||||||
|
% Basic: page number in small caps in the upper-right corner
|
||||||
|
\fancypagestyle{cdsc-page}{%
|
||||||
|
\fancyhf{}%
|
||||||
|
\fancyhead[R]{\scshape\thepage}%
|
||||||
|
\renewcommand{\headrulewidth}{0pt}%
|
||||||
|
}
|
||||||
|
|
||||||
|
% Variant with git revision info in the footer (requires the vc package).
|
||||||
|
\fancypagestyle{cdsc-page-git}{%
|
||||||
|
\fancyhf{}%
|
||||||
|
\fancyhead[R]{\scshape\thepage}%
|
||||||
|
\fancyfoot[C]{\texttt{\footnotesize\textcolor{BrickRed}{git revision \VCRevision\ on \VCDateTEX}}}%
|
||||||
|
\renewcommand{\headrulewidth}{0pt}%
|
||||||
|
}
|
||||||
|
|
||||||
|
% Variant with a build timestamp in the footer (useful on Overleaf/etc.)
|
||||||
|
\fancypagestyle{cdsc-page-overleaf}{%
|
||||||
|
\fancyhf{}%
|
||||||
|
\fancyhead[R]{\scshape\thepage}%
|
||||||
|
\fancyfoot[C]{\texttt{\footnotesize\textcolor{BrickRed}{Buildstamp/Version:~\today}}}%
|
||||||
|
\renewcommand{\headrulewidth}{0pt}%
|
||||||
|
}
|
||||||
|
|
||||||
|
\pagestyle{cdsc-page}
|
||||||
|
|
||||||
|
%%% Section heading styles (replaces memoir's \setsecheadstyle etc.)
|
||||||
|
\usepackage{titlesec}
|
||||||
|
|
||||||
|
% Sections: large small caps; period after the number
|
||||||
|
\titleformat{\section}
|
||||||
|
{\large\scshape}{\thesection.}{0.5em}{}
|
||||||
|
\titlespacing*{\section}{0pt}{*2}{1.7ex}
|
||||||
|
|
||||||
|
% Subsections: italic
|
||||||
|
\titleformat{\subsection}
|
||||||
|
{\normalsize\itshape}{\thesubsection.}{0.5em}{}
|
||||||
|
|
||||||
|
% Subsubsections: small bold, runin (matches memoir's negative skip behavior)
|
||||||
|
\titleformat{\subsubsection}[runin]
|
||||||
|
{\small\bfseries}{\thesubsubsection.}{0.5em}{}[\hskip 0.5em]
|
||||||
|
|
||||||
|
% By default, suppress numbering at the section level (matches the
|
||||||
|
% memoir template's default of \setsecnumdepth{chapter}). To enable
|
||||||
|
% numbered sections and subsections, comment the line below and
|
||||||
|
% uncomment the alternative.
|
||||||
|
\setcounter{secnumdepth}{0}
|
||||||
|
% \setcounter{secnumdepth}{2}
|
||||||
|
|
||||||
|
%%% Title block (titling package replaces memoir's title hooks)
|
||||||
|
\usepackage{titling}
|
||||||
|
|
||||||
|
% Title flush left, italic, large
|
||||||
|
\pretitle{\flushleft\LARGE\itshape}
|
||||||
|
\posttitle{\par\vskip 0.5em}
|
||||||
|
\preauthor{\flushleft\large\lineskip 1em}
|
||||||
|
\postauthor{\par\lineskip 1em}
|
||||||
|
\predate{\flushleft\footnotesize\vspace{0.65em}}
|
||||||
|
\postdate{\par\vskip 1em}
|
||||||
|
|
||||||
|
%% \published{...}: a note about the publication status, printed in
|
||||||
|
%% small type at the very top of the title block. Use this for
|
||||||
|
%% draft/working-paper notices.
|
||||||
|
\newcommand{\puB}{}
|
||||||
|
\newcommand{\published}[1]{\gdef\puB{#1}}
|
||||||
|
\renewcommand{\maketitlehooka}{\par\noindent\footnotesize\puB}
|
||||||
|
|
||||||
|
%%% Abstract: runin style ("**Abstract:** the quick brown fox..."),
|
||||||
|
%%% indented from both margins (via the quote environment, which gives
|
||||||
|
%%% the side indent without adding first-line paragraph indentation).
|
||||||
|
\renewenvironment{abstract}%
|
||||||
|
{\par\addvspace{\medskipamount}\small
|
||||||
|
\begin{quote}\noindent\textbf{Abstract:}\hspace{0.5em}\ignorespaces}%
|
||||||
|
{\end{quote}\par\medskip}
|
||||||
|
|
||||||
|
%%% List spacing (replaces memoir's \firmlists --- tighter lists)
|
||||||
|
\usepackage{enumitem}
|
||||||
|
\setlist{topsep=0pt, partopsep=0pt}
|
||||||
|
|
||||||
|
%%% Caption font
|
||||||
|
\usepackage{caption}
|
||||||
|
\captionsetup{font=small}
|
||||||
|
|
||||||
|
%%% Footnote symbol command (for \thanks{} footnotes that should not
|
||||||
|
%%% have a numeric mark). Use as \symbolfootnote[0]{Footnote text}.
|
||||||
|
\long\def\symbolfootnote[#1]#2{\begingroup%
|
||||||
|
\def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}
|
||||||
|
|
||||||
|
\endinput
|
||||||
BIN
paper_template/knitr_rdata/knitr_data.RData
Normal file
BIN
paper_template/knitr_rdata/knitr_data.RData
Normal file
Binary file not shown.
50
paper_template/resources/preamble.R
Normal file
50
paper_template/resources/preamble.R
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
bold <- function(x) {paste('{\\textbf{',x,'}}', sep ='')}
|
||||||
|
gray <- function(x) {paste('{\\textcolor{gray}{',x,'}}', sep ='')}
|
||||||
|
wrapify <- function (x) {paste("{", x, "}", sep="")}
|
||||||
|
|
||||||
|
# load("knitr_data.RData"); now broken up into small files so we'll bring 'em all in together
|
||||||
|
r <- do.call("c", lapply(paste("knitr_rdata/", list.files("knitr_rdata"), sep=""),
|
||||||
|
function (x) {load(x); return(r)}))
|
||||||
|
|
||||||
|
attach(r)
|
||||||
|
|
||||||
|
f <- function (x) {formatC(x, format="d", big.mark=',')}
|
||||||
|
|
||||||
|
format.percent <- function(x) {paste(f(x*100),"\\%",sep='')}
|
||||||
|
|
||||||
|
format.day.ordinal <- function(x) {
|
||||||
|
day <- format(x,format="%d")
|
||||||
|
daylast <- substr(day,nchar(day),nchar(day))
|
||||||
|
dayfirst <- substr(day,1,1)
|
||||||
|
if(dayfirst == '0')
|
||||||
|
day = daylast
|
||||||
|
|
||||||
|
if( daylast == "1")
|
||||||
|
day <- paste0(day,"st")
|
||||||
|
else if(daylast == "2")
|
||||||
|
day <- paste0(day,"nd")
|
||||||
|
else if (daylast == "3")
|
||||||
|
day <- paste0(day,"rd")
|
||||||
|
else
|
||||||
|
day <- paste0(day,"th")
|
||||||
|
|
||||||
|
return(day)
|
||||||
|
}
|
||||||
|
|
||||||
|
format.month <- function(x){
|
||||||
|
return( format(x,format='%B %Y'))
|
||||||
|
}
|
||||||
|
|
||||||
|
format.date <- function(x) {
|
||||||
|
return(paste(format(x,format = '%B'),format.day.ordinal(x),format(x,format='%Y'),sep=' '))
|
||||||
|
}
|
||||||
|
|
||||||
|
format.pvalue <- function (x, digits=3) {
|
||||||
|
threshold <- 1*10^(-1*digits)
|
||||||
|
x <- round(x, digits)
|
||||||
|
if (x < threshold) {
|
||||||
|
return(paste("p<", threshold, sep=""))
|
||||||
|
} else {
|
||||||
|
return(paste("p=", x, sep=""))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +1,37 @@
|
|||||||
\documentclass[12pt]{memoir}
|
% Tagged PDF (PDF/UA-2) accessibility setup. The article class works
|
||||||
|
% with the LaTeX tagging-project, so we use the full \DocumentMetadata
|
||||||
|
% path here.
|
||||||
|
\DocumentMetadata{
|
||||||
|
pdfversion=2.0,
|
||||||
|
pdfstandard=ua-2,
|
||||||
|
lang=en-US,
|
||||||
|
}
|
||||||
|
|
||||||
\usepackage{cdsc-memoir}
|
\documentclass[12pt]{article}
|
||||||
% 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{cdsc-paper}
|
||||||
|
\usepackage{tagpdf}
|
||||||
|
\tagpdfsetup{activate-all}
|
||||||
|
|
||||||
|
<<init, echo=FALSE>>=
|
||||||
|
knit_hooks$set(document = function(x) {
|
||||||
|
x <- sub('\\usepackage[]{xcolor}',
|
||||||
|
'\\usepackage[dvipsnames]{xcolor}', x, fixed = TRUE)
|
||||||
|
x
|
||||||
|
})
|
||||||
|
opts_chunk$set(fig.path="figures/knitr-")
|
||||||
|
|
||||||
|
source("resources/preamble.R")
|
||||||
|
@
|
||||||
|
|
||||||
|
\usepackage{fontspec}
|
||||||
|
% fontspec disables the classic TeX input ligatures by default
|
||||||
|
% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so
|
||||||
|
% re-enable them globally for every font loaded below.
|
||||||
|
\defaultfontfeatures{Ligatures=TeX}
|
||||||
|
\setmainfont{EB Garamond}
|
||||||
|
\setsansfont{TeX Gyre Heros}
|
||||||
\usepackage{wrapfig}
|
\usepackage{wrapfig}
|
||||||
\usepackage[T1]{fontenc}
|
|
||||||
\usepackage{textcomp}
|
|
||||||
\usepackage[garamond]{mathdesign}
|
|
||||||
|
|
||||||
\usepackage[letterpaper,left=1.65in,right=1.65in,top=1.3in,bottom=1.2in]{geometry}
|
\usepackage[letterpaper,left=1.65in,right=1.65in,top=1.3in,bottom=1.2in]{geometry}
|
||||||
|
|
||||||
@@ -28,8 +48,14 @@
|
|||||||
\usepackage[dvipsnames]{xcolor}
|
\usepackage[dvipsnames]{xcolor}
|
||||||
\usepackage[breaklinks]{hyperref}
|
\usepackage[breaklinks]{hyperref}
|
||||||
|
|
||||||
|
% pdftitle/pdfauthor populate PDF and XMP metadata; keep these in sync
|
||||||
|
% with \title{} and \author{} below. UA-2 requires dc:title in XMP.
|
||||||
\hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Blue,
|
\hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Blue,
|
||||||
urlcolor=Blue, unicode=true}
|
urlcolor=Blue, unicode=true,
|
||||||
|
pdftitle={Title},
|
||||||
|
pdfauthor={Your Name},
|
||||||
|
pdflang={en-US},
|
||||||
|
pdfdisplaydoctitle=true}
|
||||||
|
|
||||||
% list of footnote symbols for \thanks{}
|
% list of footnote symbols for \thanks{}
|
||||||
\makeatletter
|
\makeatletter
|
||||||
@@ -39,7 +65,7 @@
|
|||||||
\makeatother
|
\makeatother
|
||||||
\newcommand*\samethanks[1][\value{footnote}]{\footnotemark[#1]}
|
\newcommand*\samethanks[1][\value{footnote}]{\footnotemark[#1]}
|
||||||
|
|
||||||
% add bibliographic stuff
|
% add bibliographic stuff
|
||||||
\usepackage[american]{babel}
|
\usepackage[american]{babel}
|
||||||
\usepackage{csquotes}
|
\usepackage{csquotes}
|
||||||
\usepackage[natbib=true, style=apa, backend=biber]{biblatex}
|
\usepackage[natbib=true, style=apa, backend=biber]{biblatex}
|
||||||
@@ -49,15 +75,11 @@
|
|||||||
\defbibheading{secbib}[\bibname]{%
|
\defbibheading{secbib}[\bibname]{%
|
||||||
\section*{#1}%
|
\section*{#1}%
|
||||||
\markboth{#1}{#1}%
|
\markboth{#1}{#1}%
|
||||||
\baselineskip 14.2pt%
|
\baselineskip 14.2pt}
|
||||||
\prebibhook}
|
|
||||||
|
|
||||||
\def\citepos#1{\citeauthor{#1}'s (\citeyear{#1})}
|
\def\citepos#1{\citeauthor{#1}'s (\citeyear{#1})}
|
||||||
\def\citespos#1{\citeauthor{#1}' (\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
|
% 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
|
% 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:
|
% useful for keeping track of which version of a document somebody has:
|
||||||
@@ -106,7 +128,7 @@ fox jumps over the lazy dog.
|
|||||||
% between 45-90 characters and a rule of thumb for typesetting is that you
|
% 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,
|
% 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
|
% the shorter the line length, the better -- and the smaller the linespacing
|
||||||
% can become. The following line is 3 alphabets (73 characters).
|
% can become. The following line is 3 alphabets (73 characters).
|
||||||
|
|
||||||
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
|
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
|
||||||
|
|
||||||
@@ -126,45 +148,14 @@ 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
|
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||||
fox jumps over the lazy dog \citep{989866}.
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
|
|
||||||
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
\begin{table}
|
||||||
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
\centering
|
||||||
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
<<test_table, echo=FALSE>>=
|
||||||
the lazy dog. The quick brown fox jumps over the lazy dog. The quick
|
kable(form.copy, format="latex")
|
||||||
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
|
\caption{This is a test table. There are \Sexpr{f(nrow(form.copy))} rows in the table.}
|
||||||
fox jumps over the lazy dog \citep{989866}.
|
\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
|
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
|
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||||
@@ -189,4 +180,4 @@ fox jumps over the lazy dog \citep{989866}.
|
|||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
||||||
% LocalWords:
|
% LocalWords:
|
||||||
Reference in New Issue
Block a user