* mathjax macro in org-mode
@ 2018-10-14 21:02 Jeremie Juste
2018-10-15 15:24 ` Jeremie Juste
0 siblings, 1 reply; 2+ messages in thread
From: Jeremie Juste @ 2018-10-14 21:02 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mathjax macro in org-mode
2018-10-14 21:02 mathjax macro in org-mode Jeremie Juste
@ 2018-10-15 15:24 ` Jeremie Juste
0 siblings, 0 replies; 2+ messages in thread
From: Jeremie Juste @ 2018-10-15 15:24 UTC (permalink / raw)
To: emacs-orgmode
Jeremie Juste <jeremiejuste@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-15 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-14 21:02 mathjax macro in org-mode Jeremie Juste
2018-10-15 15:24 ` Jeremie Juste
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).