[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] mathjax macro in org-mode
From: |
Jeremie Juste |
Subject: |
Re: [O] mathjax macro in org-mode |
Date: |
Mon, 15 Oct 2018 17:24:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Jeremie Juste <address@hidden> 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