-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.Rmd
42 lines (34 loc) · 1.14 KB
/
makefile.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
title: "BIVAN makefile, compiliation notes"
author: "Daniel Reuman"
date: ""
output: pdf_document
---
<!--checkpoint package-->
```{r checkpoint_chunk, echo=F, warning=F, message=F, results="hide"}
library(checkpoint)
if (!dir.exists("./.checkpoint/")){
dir.create("./.checkpoint/")
}
checkpoint("2018-03-29",checkpointLocation = "./")
```
# Get tex files and pdf files for the supp mat, but the pdf files
#are missing the external references
```{r tex_for_supp_mat}
library(rmarkdown)
rmarkdown::render(input="SupportingInformation.Rmd")
```
# Get tex files and pdf files for the main text, but the pdf files
#are missing the external references
```{r tex_for_main_text}
rmarkdown::render(input="Paper.Rmd")
```
# Now recompile the latex
```{r recompile_latex}
#do it once
system2(command="pdflatex",args="SupportingInformation.tex",stdout=TRUE,stderr=TRUE)
system2(command="pdflatex",args="Paper.tex",stdout=TRUE,stderr=TRUE)
#do it again to make sure to get the external references right
system2(command="pdflatex",args="SupportingInformation.tex",stdout=TRUE,stderr=TRUE)
system2(command="pdflatex",args="Paper.tex",stdout=TRUE,stderr=TRUE)
```