0

When I create a html Presentation with slidy (Rmarkdown and Rstudio) and knit it to an html, any latex equation are not displayed properly if I am offline.

How can I change that?

---
title: "MinimalExample"
author: "keks"
date: "9 9 2019"
output: slidy_presentation
---

## R Markdown

$\pi = \frac{ a }{ b }$

```{r}
plot(seq(1,19))
```

Here is a minimal example, where the $xyz$ Equation is only properly shown, if I am online.

kEks
  • 304
  • 1
  • 9
  • ah yes, you're right that pandoc's [`--self-contained` option](https://pandoc.org/MANUAL.html#options-affecting-specific-writers) doesn't work for mathjax. so either use `--katex` or download the [mathjax](https://www.mathjax.org/) files and use `--mathjax myLocalMathjax.js` – mb21 Sep 11 '19 at 07:44
  • The local mathjax version does not seem to work. I downloaded the zip from https://github.com/mathjax/MathJax/archive/2.7.3.zip and put the path in the markdown header. `output:` `html_document:` `mathjax: "MathJax-2.7.3/MathJax.js"` The problem still persists. – kEks Sep 13 '19 at 07:34
  • ah yes, seems [this is quite hard to do](https://github.com/jgm/pandoc/issues/682), as the MathJax script loads more files at runtime... but why not use `pandoc --katex --self-contained` – mb21 Sep 13 '19 at 07:56
  • I have two problems with that. The one thing is that I have R code included which does not compile (I change the minimum example accordingly). And the html is now one page, instead of a slide show. – kEks Sep 18 '19 at 17:47

0 Answers0