Open ozanj opened 6 years ago
@ozanj @mpatricia01 Similar to the images, it looks like there's no easy way to get urls from the web for latex. But I think if we add this to each Rmd file (similar to the images):
```{r, echo=FALSE, include=FALSE}
download.file(url = 'https://raw.githubusercontent.com/ozanj/rclass/master/lectures/beamer_header.tex',
destfile = '../beamer_header.tex',
mode = 'wb')
These code chunks should get run first before the includes `in_header: ../beamer_header.tex` part in the YAML, and should download the latest version each time the file is run!
@cyouh95 @ozanj Hi Crystal, how would these code chunks be run first before the YAML header? I tried including the code chunk before the YAML header and it knits to an html because it is not reading the YAML header when it does not start from line 1.
@mpatricia01 Sorry for the confusion! You don't need to put the code chunk in front of the YAML header - it should go after (just like where you put the code chunks to dl the images). I just meant when you hit Knit
, I think it automatically runs all code chunks it finds in the file first, before the YAML part (according to what gets outputted in the console area)
@cyouh95 Thanks you, Crystal!
@cyouh95 @mpatricia01
Hey, for the R class, I just made a slight change to beamer_header.tex to add page numbers to beamer_presentation slides.
right now the YAML header has this code to include beamer_header.tex
Is it possible to put link to URL for beamer_header.tex rather than relative filepath to beamer_header.tex?
This way, student would not have to download new version of beamer_header.tex and save to correct folder every time I make a change.
Crystal - can you investigate this. I know patricia is working lecture slides and office hours right now.
thanks! ozan