Pagedown: mathjax support for `html_resume`

Created on 11 Oct 2019  路  2Comments  路  Source: rstudio/pagedown

Hello,
thanks a lot for a wonderful package and nice template.
For the html_resume I cannot make mathjax to work.
I tried self_contained: true or false, mathjax: local or not and doesn't work.

short example below:

output:
  pagedown::html_resume:
    self_contained: true
---

Education
--------------------------------------------------------------------------------

### Hydrosoluble [6)-O- $\alpha$ -D-Glcp-(1 $\rightarrow$ ]

**WO 2010/072754 A1**,

- Hydrosoluble [6)-O- $\alpha$ -D-Glcp-(1 $\rightarrow$ ]$_n$-6-O-$\beta$

N/A

2010

Mathjax expressions are not rendered. If I changed pagedown::html_resume: to html_document: it works well.

Of note, adding this in the hmtl brings in the desired functionality

<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "Untitled2_files/mathjax-local/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>

Thanks again!

enhancement

Most helpful comment

The support for MathJax for html_resumewas implemented through https://github.com/rstudio/pagedown/commit/f20e3b2160afb009b88fe3c8a534c92466958823.
You can try it using the development version of pagedown:

remotes::install_github("rstudio/pagedown")

All 2 comments

The support for MathJax for html_resumewas implemented through https://github.com/rstudio/pagedown/commit/f20e3b2160afb009b88fe3c8a534c92466958823.
You can try it using the development version of pagedown:

remotes::install_github("rstudio/pagedown")

works perfectly, thanks !

Was this page helpful?
0 / 5 - 0 ratings