-
Notifications
You must be signed in to change notification settings - Fork 291
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
Equations not rendering on deployment #62
Comments
@marissabarlaz just a comment on the use of RBlogdown and Hugo themes. The reason why they work is that knitr produces a .md file. On normal RMarkdown, after knitr knits, R calls Pandoc who then transforms your .md file into your selected output (HTML, pdf, etc). In the case of Blogdown, Hugo gets called instead and generates the file as defined by the thems configuration. I guess what I'm trying to get at is that just because something works with Pandoc doesn't mean it's going to work with other HTML generators. In this case, you can solve your issue by going into the {{ if and (not .Params.disable_mathjax) (or (in (string .Content) "\\") (in (string .Content) "$")) }}
<script src="{{ "/js/math-code.js" | relURL }}"></script>
<script async
src="{{ .Site.Params.MathJaxCDN | default "//cdnjs.cloudflare.com/ajax/libs" }}/mathjax/{{ .Site.Params.MathJaxVersion | default "2.7.5" }}/MathJax.js?config=TeX-MML-AM_CHTML"></script>
{{ end }} If you want to include TeX style declarations (like one would do in a TeX file) you can do so in the <!-- Math Jax-->
<script>
MathJax = {
tex: {
macros: {
E: ['\\mathbf{E}'],
V: ['\\mathbf{Var}'],
C: ['\\mathbf{Cov}'],
AV: ['\\mathbf{AVar}']
}
}
};
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script> This way if I use The |
I'm trying to include equations in math mode in my portfolio pages, and they are not rendering properly. My portfolio pages are .Rmd files, so I was under the impression that the equations would be processed and compiled with minimal issue. Is there a setting I need to change in one of the layout files? Thank you!
The text was updated successfully, but these errors were encountered: