From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Re: Latex strikethrough or cancel? Date: Thu, 8 Oct 2015 16:30:05 +0000 Message-ID: References: <87lhbdlsth.fsf@alphaville.usersys.redhat.com> <87h9m1l7hg.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ffee025c23705219a60a0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkE65-00044r-TN for emacs-orgmode@gnu.org; Thu, 08 Oct 2015 12:32:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkE51-0007Kq-RD for emacs-orgmode@gnu.org; Thu, 08 Oct 2015 12:31:13 -0400 Received: from mail-lb0-x22c.google.com ([2a00:1450:4010:c04::22c]:34738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkE50-0007Dz-H3 for emacs-orgmode@gnu.org; Thu, 08 Oct 2015 12:30:07 -0400 Received: by lbbwt4 with SMTP id wt4so53298178lbb.1 for ; Thu, 08 Oct 2015 09:30:05 -0700 (PDT) In-Reply-To: <87h9m1l7hg.fsf@alphaville.usersys.redhat.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Mailinglist --001a113ffee025c23705219a60a0 Content-Type: text/plain; charset=UTF-8 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 wrote: > Nick Dokos 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 " > > ")) > --8<---------------cut here---------------end--------------->8--- > > -- > Nick > > > --001a113ffee025c23705219a60a0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, Nick, I put it in my init and it worked. Amazing to m= e is how an elisp concat just works, so I don't have to hack around wit= h the org-html-mathjax-template (Too close to Halloween). Thanks, everyone.=

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

> ...
> You must mean HTML export - MathJax apparently does n= ot know about
> \cancel. There is an extension mechanism:
>
>=C2=A0 =C2=A0https://docs.mathjax.org/e= n/latest/extension-writing.html
>
> but that's as far as my knowledge extends. If you make it work, pl= ease
> share.
>

It's actually simple - the documentation tells you exactly how t= o do it
using the cancel package as an example :-) - see the section "TeX and<= br> LaTeX extensions" in

=C2=A0 =C2=A0https://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=3D\"text/x-mathjax-config\">
MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function () {<= br> =C2=A0 MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{
=C2=A0 =C2=A0 cancel: [\"Extension\",\"cancel\"],
=C2=A0 =C2=A0 bcancel: [\"Extension\",\"cancel\"],
=C2=A0 =C2=A0 xcancel: [\"Extension\",\"cancel\"],
=C2=A0 =C2=A0 cancelto: [\"Extension\",\"cancel\"]
=C2=A0 });
});
</script>
"))
--8<---------------cut here---------------end--------------->8---

--
Nick



--001a113ffee025c23705219a60a0--