I have a Xaringan slide that looks like this:
---
title: "Xaringan test"
output:
xaringan::moon_reader:
self_contained: false
chakra: 'assets/remark-latest.min.js'
css: 'assets/presentation.css'
---
### This is a heading
This is some text and numbers 01235.
`Here is some inline code`.
```
block code
```
```{r}
cat("Some R code")
```
$e^{i\pi} + 1 = 0$
The rendered HTML looks like below. Custom font, CSS styles and mathjax all render well. This is how it is intended to look.
Exporting to PDF using Pagedown.
pagedown::chrome_print("test.html",output="test.pdf")
The custom font and css styles are preserved. The default code font has changed and the mathjax expression is not displayed. Apart from the missing mathjax, it is doing a pretty good job.
Exporting to PDF using webshot.
webshot("test.html","test.pdf")
Custom font and css styles are not preserved. The default code font and mathjax is preserved.
Anyone got any tips on how to preserve fonts, CSS style and mathjax while exporting to PDF through function?
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS
webshot_0.5.1
pagedown_0.1
xaringan_0.8