correct way to call mathjax in R markdown (output format is html)

Hi all,

I am a big fan of R markdown and I am now trying to create blogs (in HTML format) with it. However, I have been encountering problems when adding math symbols - I am aware of this post Problems in LaTeX symbols while creating HTML documents by R Mardown and tried to call mathjax with the following codes

---
title: "Hello R Markdown"
output:
  html_document:
    mathjax: "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_CHTML.js"
---

but unfortunately, it did not work. Does anyone know a mathjax link that can work properly?

Many thanks,
Fan

Just generate the HTML file and edit it manually by putting

<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_CHTML.js"></script>

at the end of the header.

It worked! Thanks a lot!

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.