Export to PDF using rmarkdown render without PDF navigation buttons - r

I am using the render function from rmarkdown to export a .Rmd file to PDF.
The .Rmd file is the template generated within RStudio using
New File > R Markdown > Presentation > PDF (Beamer)
When export to PDF, each PDF page has navigation buttons at the bottom of the page which I would like to exclude during the export process. Below are the buttons.
Does anyone know how to exclude these navigation buttons?

You can add a command to turn them off in your header:
---
title: "Untitled"
output: beamer_presentation
header-includes:
- \beamertemplatenavigationsymbolsempty
---

Related

Rmd: Make the figure larger when clicked on it

I have a Rmarkdown file where I include figures with
knitr::include_graphics
The figures show up in the knitted document nicely. However, when I'm reading the knitted document, if I want to focus on one figure, I use the zoom option of the browser, which is not ideal.
Is it possible to add open the figure in a larger window when clicked on it?
PS: I use gitbook and/or bookdown::html for the output format of my Rmd files.
You can try out the themes from rmdformats package which implement this feature. They call it lightbox. To enable,you just need to set lightbox to true in the RMD yaml.
Example:
---
title: "My document"
output:
rmdformats::downcute:
lightbox: true
---

Apostrophe rendered differently in html, notebook and Rstudio

This is a problem I have been having for the longest time and have found no solution.
When a rmd file below is used to render html, notebook and pdf, the apostrophe is rendered differently.
In Rstudio it is also rendered differently.
---
title: "R Notebook"
output:
html_document: default
html_notebook: default
pdf_document: default
---
```{r}
library(tidyverse)
```
I am using RStudio (Version 1.3.1093) on Windows 10 Pro
Language settings on English USA
How to fix such that the Rstudio and notebook renders the apostrophe correctly?
HTML Document render
Notebook document render
PDF Document render
RStudio Rmarkdown render

Displaying figures from RMarkdown with github_document output

I am trying to display figures on github from RMarkdown without success.
The figure is displayed on the local html preview.
After pushing on Github the md file the figure is not displayed.
title: "Untitled"
output: github_document
summary(cars)
plot(pressure)
Need to push the images files containing figures too.

embedding svg figures in rmarkdown child files

I have a Rmd report that looks like this:
---
output:
pdf_document:
latex_engine: xelatex
---
Some text
```{r child="children/stuff.Rmd", results="asis", cache=FALSE}
```
The stuff.Rmd file is in a subfolder of the project called children. The image I want to include is in a subfolder of the project called figures.
stuff.Rmd looks like this, and the image preview in RStudio works:
something, something
![this is a picture](figures/school_stages.svg)
It seems to be erroring out on the child rmd not being able to find the _school_stages.svg_, you can see this error when editing the child
(no image at path figures/school_stages.svg)
knitting the file gives an error, apparently from the child Rmd:
! Unable to load picture or PDF file 'figures/school_stages.svg'.
Changing figure.Rmd to:
something, something
![this is a picture](../figures/school_stages.svg)
gets rid of the error in edit mode but on knitting gives:
! Unable to load picture or PDF file '../figures/school_stages.svg'.
Any idea how to resolve this?
RStudio Version 1.2.1335
Knitr version 1.23
This is highly dependent on the image type. .png and .pdf are fine, but .svg (plain or inkscape versions don't currently work)

use highlight.js theme in rmarkdown::html_document() .Rmd

Can I specify a highlight.js style in RMarkdown front matter when using html_document?
example:
Instead of using pandoc's espresso highlighting say I want highlight.js's tommorrow highlithing which lives here
---
title: "Untitled"
output:
html_document:
highlight: espresso
---
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r}
summary(cars)
```
etc...
How might I do this?
As far as I know, there is not built-in way to do this but you can add the following lines at the beginning of your Rmd document to get what you want:
<style type="text/css">
#import "https://highlightjs.org/static/demo/styles/tomorrow.css";
</style>

Resources