Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mathjax="local" not working #13

Closed
bnicenboim opened this issue Dec 25, 2016 · 5 comments
Closed

mathjax="local" not working #13

bnicenboim opened this issue Dec 25, 2016 · 5 comments
Labels

Comments

@bnicenboim
Copy link

I've tried to add mathjax="local" to moon_reader and I get an error:

pandoc: models_files/mathjax-local/MathJax.js?config=TeX-AMS-MML_HTMLorMML: openFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1

It doesn't seem to be a problem of pandoc because it worked with html_document()

@yihui
Copy link
Owner

yihui commented Dec 27, 2016

mathjax='local' is not supported in this package; you have to download a copy of MathJax, and point the option mathjax to the actual path of MathJax.js.

If you use this package in RStudio, you should not worry about MathJax. In theory, your math expressions can be rendered even if you don't have internet connection, since RStudio will use a local version of MathJax.

@bnicenboim
Copy link
Author

(I don't use RStudio)
you mean rmarkdown::render("testcss.Rmd",xaringan::moon_reader(mathjax='path here')) ?

@yihui
Copy link
Owner

yihui commented Dec 28, 2016

Yes. Or specify the MathJax path in YAML (recommended), so you only need rmarkdown::render("testcss.Rmd").

@yihui yihui closed this as completed Dec 28, 2016
@yihui yihui added the question label Dec 28, 2016
@bnicenboim
Copy link
Author

sorry for the non-bugs! Now I feel like Peter and the Wolf.
I tried it here and I get this:

openFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
> 

A minimalistic example with html_document worked:

---
title: "Habits"
output:
  html_document:
    mathjax: "MathJax-2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
---

@yihui
Copy link
Owner

yihui commented Dec 28, 2016

It seems this is a bug of either rmarkdown or Pandoc. I don't have the time to investigate it, and I just provided a workaround in xaringan, so that your example above should work now:

devtools::install_github('yihui/xaringan')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants