Jeremie Juste <jeremieju...@gmail.com> writes: Hello,
looking deeper into the docs I saw that we could modify the org-html-mathjax-template in the following way to add the macro. (setq (org-html-mathjax-template "<script type=\"text/x-mathjax-config\"> MathJax.Hub.Config({ displayAlign: \"%ALIGN\", displayIndent: \"%INDENT\", \"HTML-CSS\": { scale: %SCALE, linebreaks: { automatic: \"%LINEBREAKS\" }, webFont: \"%FONT\" }, SVG: {scale: %SCALE, linebreaks: { automatic: \"%LINEBREAKS\" }, font: \"%FONT\"}, NativeMML: {scale: %SCALE}, TeX: { equationNumbers: {autoNumber: \"%AUTONUMBER\"}, MultLineWidth: \"%MULTLINEWIDTH\", TagSide: \"%TAGSIDE\", TagIndent: \"%TAGINDENT\", Macros: { R: '{\\\\mathbb{R}}', arr: '{#1_{^{}_{#3}}^{^{#2}}}', myperm: '{\\\\frac{#2!}{(#2-#1)!}}' } } }); </script> <script type=\"text/javascript\" src=\"%PATH\"></script>")) another quick option is just to define the latex macro directly in the main body as follows before exporting to html but this would generate an <error LaTeX Error: Command \R already defined> when exporting to latex $\newcommand{\R}{\mathbb{R}}$ Hope it helps, Jeremie > Hello, > > I was wondering how to set up mathjax macro in org-mode. For instance > would it be possible to use #+HTML_MATHJAX: to include the following macro? > > Macros: { > R: '{\\mathbb{R}}', > bold: ['{\\bf #1}',1] > } > > So far my attempts have been unsuccessful. > > Best regards, > > Jeremie