Compare commits
1 Commits
1c2bcf3929
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 172cd5c4e5 |
4
README
4
README
@@ -47,8 +47,8 @@ On other systems, installing a full TeX Live distribution should provide
|
|||||||
everything needed.
|
everything needed.
|
||||||
|
|
||||||
All four templates build with LuaLaTeX (via latexmk -lualatex). The text
|
All four templates build with LuaLaTeX (via latexmk -lualatex). The text
|
||||||
fonts are EB Garamond (provided by texlive-fonts-extra) and TeX Gyre
|
fonts are Libertinus Serif and TeX Gyre Heros, both provided by
|
||||||
Heros.
|
texlive-fonts-extra.
|
||||||
|
|
||||||
================================
|
================================
|
||||||
=== Accessibility ==============
|
=== Accessibility ==============
|
||||||
|
|||||||
@@ -10,7 +10,15 @@
|
|||||||
% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so
|
% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so
|
||||||
% re-enable them globally for every font loaded below.
|
% re-enable them globally for every font loaded below.
|
||||||
\defaultfontfeatures{Ligatures=TeX}
|
\defaultfontfeatures{Ligatures=TeX}
|
||||||
\setmainfont{EB Garamond}
|
\setmainfont{Libertinus Serif}
|
||||||
|
% Mako prefers Adobe Garamond Premier Pro
|
||||||
|
% (https://fonts.adobe.com/fonts/garamond-premier-pro). It is a
|
||||||
|
% commercial font and is not redistributable, so the templates default
|
||||||
|
% to the free Libertinus Serif above. If you have the font installed
|
||||||
|
% (e.g., dropped into ~/.fonts/), comment the line above and uncomment
|
||||||
|
% the next one. CDSC members can contact Mako (mako@atdot.cc) for the
|
||||||
|
% font files.
|
||||||
|
% \setmainfont{Garamond Premier Pro}
|
||||||
\setsansfont{TeX Gyre Heros}
|
\setsansfont{TeX Gyre Heros}
|
||||||
|
|
||||||
\usepackage[letterpaper,left=1.3in,right=1.3in,top=0.8in,bottom=0.8in]{geometry}
|
\usepackage[letterpaper,left=1.3in,right=1.3in,top=0.8in,bottom=0.8in]{geometry}
|
||||||
|
|||||||
@@ -18,7 +18,15 @@
|
|||||||
% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so
|
% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so
|
||||||
% re-enable them globally for every font loaded below.
|
% re-enable them globally for every font loaded below.
|
||||||
\defaultfontfeatures{Ligatures=TeX}
|
\defaultfontfeatures{Ligatures=TeX}
|
||||||
\setmainfont{EB Garamond}
|
\setmainfont{Libertinus Serif}
|
||||||
|
% Mako prefers Adobe Garamond Premier Pro
|
||||||
|
% (https://fonts.adobe.com/fonts/garamond-premier-pro). It is a
|
||||||
|
% commercial font and is not redistributable, so the templates default
|
||||||
|
% to the free Libertinus Serif above. If you have the font installed
|
||||||
|
% (e.g., dropped into ~/.fonts/), comment the line above and uncomment
|
||||||
|
% the next one. CDSC members can contact Mako (mako@atdot.cc) for the
|
||||||
|
% font files.
|
||||||
|
% \setmainfont{Garamond Premier Pro}
|
||||||
\setsansfont{TeX Gyre Heros}
|
\setsansfont{TeX Gyre Heros}
|
||||||
|
|
||||||
\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}
|
||||||
|
|||||||
2
paper_template/.gitignore
vendored
2
paper_template/.gitignore
vendored
@@ -13,5 +13,3 @@
|
|||||||
/*.ttt
|
/*.ttt
|
||||||
/*.bcf
|
/*.bcf
|
||||||
/*.run.xml
|
/*.run.xml
|
||||||
/figures/*
|
|
||||||
/*.tex
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
#!/usr/bin/make
|
#!/usr/bin/make
|
||||||
|
|
||||||
all: $(patsubst %.Rtex,%.pdf,$(wildcard *.Rtex))
|
all: $(patsubst %.tex,%.pdf,$(wildcard *.tex))
|
||||||
|
|
||||||
%.tex: %.Rtex
|
# use the following section for Rnw/knitr documents
|
||||||
Rscript -e "library(knitr); knit('$<')"
|
# all: $(patsubst %.Rnw,%.pdf,$(wildcard *.Rnw))
|
||||||
|
# %.tex: %.Rnw
|
||||||
|
# Rscript -e "library(knitr); knit('$<')"
|
||||||
|
|
||||||
%.pdf: %.tex
|
%.pdf: %.tex
|
||||||
latexmk -f -lualatex $<
|
latexmk -f -lualatex $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@@ -13,9 +15,9 @@ clean:
|
|||||||
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 Rtex/knitr
|
# the following lines are useful for Rnw/knitr
|
||||||
rm -rf cache/ figure/
|
# rm -rf cache/ figure/
|
||||||
rm -f *.tex
|
# rm -f *.tex
|
||||||
|
|
||||||
viewpdf: all
|
viewpdf: all
|
||||||
evince *.pdf
|
evince *.pdf
|
||||||
@@ -25,4 +27,4 @@ vc: resources/vc-git
|
|||||||
pdf: all
|
pdf: all
|
||||||
|
|
||||||
.PHONY: clean all
|
.PHONY: clean all
|
||||||
.PRECIOUS: %.tex
|
# .PRECIOUS: %.tex
|
||||||
|
|||||||
Binary file not shown.
@@ -1,50 +0,0 @@
|
|||||||
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=""))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,23 +13,20 @@
|
|||||||
\usepackage{tagpdf}
|
\usepackage{tagpdf}
|
||||||
\tagpdfsetup{activate-all}
|
\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}
|
\usepackage{fontspec}
|
||||||
% fontspec disables the classic TeX input ligatures by default
|
% fontspec disables the classic TeX input ligatures by default
|
||||||
% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so
|
% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so
|
||||||
% re-enable them globally for every font loaded below.
|
% re-enable them globally for every font loaded below.
|
||||||
\defaultfontfeatures{Ligatures=TeX}
|
\defaultfontfeatures{Ligatures=TeX}
|
||||||
\setmainfont{EB Garamond}
|
\setmainfont{Libertinus Serif}
|
||||||
|
% Mako prefers Adobe Garamond Premier Pro
|
||||||
|
% (https://fonts.adobe.com/fonts/garamond-premier-pro). It is a
|
||||||
|
% commercial font and is not redistributable, so the templates default
|
||||||
|
% to the free Libertinus Serif above. If you have the font installed
|
||||||
|
% (e.g., dropped into ~/.fonts/), comment the line above and uncomment
|
||||||
|
% the next one. CDSC members can contact Mako (mako@atdot.cc) for the
|
||||||
|
% font files.
|
||||||
|
% \setmainfont{Garamond Premier Pro}
|
||||||
\setsansfont{TeX Gyre Heros}
|
\setsansfont{TeX Gyre Heros}
|
||||||
\usepackage{wrapfig}
|
\usepackage{wrapfig}
|
||||||
|
|
||||||
@@ -65,7 +62,7 @@ source("resources/preamble.R")
|
|||||||
\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}
|
||||||
@@ -128,7 +125,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
|
||||||
|
|
||||||
@@ -148,14 +145,45 @@ 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}.
|
||||||
|
|
||||||
\begin{table}
|
The quick brown fox jumps over the lazy dog. The quick brown fox jumps
|
||||||
\centering
|
over the lazy dog. The quick brown fox jumps over the lazy dog. The
|
||||||
<<test_table, echo=FALSE>>=
|
quick brown fox jumps over the lazy dog. The quick brown fox jumps over
|
||||||
kable(form.copy, format="latex")
|
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
|
||||||
\caption{This is a test table. There are \Sexpr{f(nrow(form.copy))} rows in the table.}
|
lazy dog. The quick brown fox jumps over the lazy dog. The quick brown
|
||||||
\label{tab:test}
|
fox jumps over the lazy dog \citep{989866}.
|
||||||
\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
|
||||||
@@ -180,4 +208,4 @@ fox jumps over the lazy dog \citep{989866}.
|
|||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
||||||
% LocalWords:
|
% LocalWords:
|
||||||
Reference in New Issue
Block a user