Source files for Jake and Ben and Tom's causal inference course materials. This file provides some instructions for ourselves and future collaborators in regards building course materials
We encourage the use of the BIB/Master_Bibliography.bib
file.
- open file in RStudio
- If you have multiple files open, make sure this one's at front
- Press
Compile PDF
button above file edit window - (You may get warnings and or failure messages in the output window even though a PDF was produced.)
- (If the file contains cross-references, you may have to hit
Compile PDF
twice.)
Start R from within the root directory of this repository. We are using renv
https://rstudio.github.io/renv/ to help us keep our packages up to date across collaborators.
library(knitr)
knit("foo.Rnw")
Separately (outside of R), use pdflatex to compile foo.tex
. E.g., from the command line:
$ pdflatex foo.tex
$ pdflatex foo.tex
(Yep, pdflatex
is run twice on the same file.)
Alternatively you can use the knitandtex.sh
shell command file which
uses latexmk
to automagically run latex and bibtex as many times as
necessary. For example,
$ ./knitandtex.sh unit07-Rex
You'll need a LaTeX installation equipped with the beamer package and its dependencies.
Near the top of the .tex file, comment out all but one of these lines, depending on what format you want to produce:
%\input{slidesonly}
%\input{handout}
\input{handout+mynotes}
Latex should be run twice. Or, for a file with \usepackage{tikz}
in
the preamble, three times.
Please don't hesitate to fork this repository, improve these hints (or any other aspect) and then shoot us a pull request explaining your fix.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.