Yes, Nick, I put it in my init and it worked. Amazing to me is how an elisp
concat just works, so I don't have to hack around with the
org-html-mathjax-template (Too close to Halloween). Thanks, everyone.

On Thu, Oct 8, 2015 at 3:12 PM, Nick Dokos <ndo...@gmail.com> wrote:

> Nick Dokos <ndo...@gmail.com> writes:
>
> > ...
> > You must mean HTML export - MathJax apparently does not know about
> > \cancel. There is an extension mechanism:
> >
> >   https://docs.mathjax.org/en/latest/extension-writing.html
> >
> > but that's as far as my knowledge extends. If you make it work, please
> > share.
> >
>
> It's actually simple - the documentation tells you exactly how to do it
> using the cancel package as an example :-) - see the section "TeX and
> LaTeX extensions" in
>
>    https://docs.mathjax.org/en/v2.5-latest/tex.html
>
> All you need to do to incorporate that into org is to make it add the
> script when you export. That is done by appending it to
> org-html-mathjax-template:
>
> --8<---------------cut here---------------start------------->8---
> (setq org-html-mathjax-template (concat org-html-mathjax-template "
> <script type=\"text/x-mathjax-config\">
> MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function () {
>   MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{
>     cancel: [\"Extension\",\"cancel\"],
>     bcancel: [\"Extension\",\"cancel\"],
>     xcancel: [\"Extension\",\"cancel\"],
>     cancelto: [\"Extension\",\"cancel\"]
>   });
> });
> </script>
> "))
> --8<---------------cut here---------------end--------------->8---
>
> --
> Nick
>
>
>

Reply via email to