How to cancel `--mathjax` argument for `blogdown::html_page` output?

I wish to have equations stored as MathML on my static Blogdown site, so I wrote in my front matter (I use .Rmd extension to enjoy pandoc):

    pandoc_args: --mathml

Which doesn't work and I still get <span class="math"> containing raw LaTeX in my output. I checked the console and I found --mathjax argument at the end of the command passed to pandoc. It read like

"C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output foo.html~ {{something unrelated}} --mathml {{something unrelated}} --mathjax

I think that default --mathjax overrode my --mathml. What should I do to cancel it? Thanks for any help.

Yes Mathjax is used by default in almost all the format. You need to deactivate it.

See help page for the format

The function is based on bookdown::html_document2(), which is based on rmarkdown::html_document()

You'll find the mathjax argument that you need to set to NULL
So probably this would work

    mathjax: NULL
    pandoc_args: --mathml

Hope it helps

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.