[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Latex strikethrough or cancel?
From: |
Nick Dokos |
Subject: |
Re: [O] Latex strikethrough or cancel? |
Date: |
Thu, 08 Oct 2015 11:12:27 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
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