Example files for writing an APA-formatted academic paper via LaTeX and knitr. To compile:
- Ensure that these files are in R's working folder. Then, in R, run
knitr::knit("template.Rnw") - From the command line (outside R), run
pdflatex template.tex - From the command line (outside R), run
biber template - From the command line (outside R), run
pdflatex template.textwo more times to get the references in place.
Steps 2-4 require that LaTeX is installed on your system. If you haven't done this, see the tinytex package, especially its tinytex::pdflatex() command (where Steps 2-4 would then be run inside R, as opposed to outside R).