Click Use this template
from the GitHub
interface.
Choose a name for your new repository.
You will get a copy of this repository with all the files but none of the commit history.
It is probably helpful to make sure all of your packages are up to date!
At the very least:
rmarkdown
knitr
kableExtra
magrittr
- Rename
PresentationSlides.Rmd
to whatever you want it to be - Rename the value of the
SLIDES
variable inMakefile
to match your newRmd
file name. - Remove
Model.png
and the contents ofreferences.bib
. - Update
Makefile
to reflect removingModel.png
- Write your slides!
If you add external images to this repository that will be graphics for slides:
- Commit them!
- Add them to the
IMAGES
variable inMakefile
so that your slides rebuild if they change.
Execute make
.
If you use a vim
-like editor, then execute this command when in normal
mode:
:make
- Get a new
beamer
theme, add it to your repository and commit it. - Change
theme:
in theYAML
block at the top of yourRmd
file.
Change output:
in the YAML
block of the Rmd
file.
For example, to get a slidy
HTML
presentation:
output: slidy_presentation
Once you change the output format, the theme:
is no longer relevant and can be deleted from the YAML
block.
Other things probably change as well:
- You may want to avoid using figure/table captions and cross references. Doing so is probably fine--they're a bit over the top for most presentations.
- Using
kable
for tables now requires some nuance, as you need to do different things forHTML
output, etc..
The way to do this is to use the functionsknitr::is_html_output
andknitr::is_latex_output
.
To generate both PDF
and HTML
output, you can make changes like this to the Makefile
.
First, add an html
output file target:
SLIDES:=PresentationSlides.pdf PresentationSlides.html
Then, add a build pattern to convert Rmd
to html
:
%.html: %.Rmd
R --no-save --quiet -e "rmarkdown::render('$<', output_format='slidy_presentation')"
- Add your changes to
preamble.tex
.
- Make the changes to the
r setup
block near the top of theRmd
file.
- If you aren't using Python, remove these two lines:
library(reticulate) # For Python
use_python("/usr/bin/python3", required=T)
- You may need to configure the path in the
use_python
command.