我被困住了。我正在努力寻找合适的工具组合来实现一个包含数学方程式,动态生成的图表以及令人赏心悦目的演示文稿。我被方程式困在了。以下是我到目前为止的情况:
我创建了一个.Rmd文件:
---
title: "Test RMD"
author: Foofary Finer
date: "`r Sys.Date()`"
---
# First slide
$$2^{10} - 1$$
# Second slide
```{r plot1}
plot(1:10,1:10)
```
(如何使用rmarkdown :: render直接生成html?但这是另一个问题)
运行knitr(“test.Rmd”)会创建以下标记代码:
---
title: "Test RMD"
author: Foofary Finer
date: "2015-06-22"
---
# First slide
$$2^{10} - 1$$
# Second slide
```r
plot(1:10,1:10)
```
![plot of chunk plot1](figure/plot1-1.png)
到目前为止,这么好。现在我运行pandoc:
pandoc -s -S -i -t revealjs test.md -o test.html --mathjax
数学不会被渲染。检查HTML代码显示以下行:
<script src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
显然,缺少“https:”;如果我手动更正它,数学会正确显示。那么我做错了什么?我试过以下,但无济于事:
pandoc -s -S -i -t revealjs test.md -o test.html --mathjax -V mathjax-url='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'