Hi, all,
Yihui,Thanks, I made one based on your sample as the attached zip, and added the script for mhchem you mentioned, however it does not work. And I used the same script in regular Rmarkdown (the second attachment), it works very well and shows me the right format of H2O.Qiang Chen
==> rmarkdown::render_site(encoding = 'UTF-8') Error in rmarkdown::render_site(encoding = "UTF-8") : No site generator found. Execution halted
mhchem is a third-party extension for MathJax. For information on how to load the extension and make the \ce
command available, see the official MathJax docs. In short, use this config:
MathJax.Ajax.config.path["mhchem"] =
"https://cdnjs.cloudflare.com/ajax/libs/mathjax-mhchem/3.1.0";
MathJax.Hub.Config({
TeX: {
extensions: ["[mhchem]/mhchem.js"]
}
});