emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Latex strikethrough or cancel?
Date: Thu, 08 Oct 2015 11:12:27 -0400	[thread overview]
Message-ID: <87h9m1l7hg.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: 87lhbdlsth.fsf@alphaville.usersys.redhat.com

Nick Dokos <ndokos@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	other threads:[~2015-10-08 15:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08  3:35 Latex strikethrough or cancel? Lawrence Bottorff
2015-10-08  7:06 ` Suvayu Ali
2015-10-08  7:31 ` Nick Dokos
2015-10-08 15:12   ` Nick Dokos [this message]
2015-10-08 16:30     ` Lawrence Bottorff
2015-10-08  7:49 ` Eric S Fraga
2015-10-08 14:29   ` Lawrence Bottorff
2015-10-08 17:35     ` Eric S Fraga
2015-10-10 15:28       ` Lawrence Bottorff
2015-10-11  0:49         ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9m1l7hg.fsf@alphaville.usersys.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).