emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Latex strikethrough or cancel?


From: Lawrence Bottorff
Subject: Re: [O] Latex strikethrough or cancel?
Date: Thu, 8 Oct 2015 16:30:05 +0000

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 <address@hidden> wrote:
Nick Dokos <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]