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 03:31:38 -0400	[thread overview]
Message-ID: <87lhbdlsth.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: CAFAhFSVfx4jqGYeog_TMvvCueYRCfjGMRsYtMOhwP=5covxczQ@mail.gmail.com

Lawrence Bottorff <borgauf@gmail.com> writes:

> I've got a fraction done this way in an org file:
>
> \[
>  \frac{1}{(2^3)(5)}
>  \]
>
> and I'd like to strike though or cancel the (5) part. The Latex method I've found says do it this way:
>
> ...
> \usepackage[makeroom]{cancel}
> ...
>
> \[
>  \frac{1}{(2^3)\cancel{(5)}}
>  \]
>
> But it's ignored and comes back verbatim. Of course +(5)+ doesn't work either, again, coming back verbatim with the pluses. How can I do this?
>

Not sure what you tried, but it all works fine here for PDF export. The
following latex file works:

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage[makeroom]{cancel}


\begin{document}

\[
\frac{1}{(2^3)\cancel{(5)}}
\]

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
--8<---------------cut here---------------end--------------->8---

and the following org file works as well:

--8<---------------cut here---------------start------------->8---
#+LATEX_HEADER: \usepackage[makeroom]{cancel}

* Some math
\[
\frac{1}{(2^3)\cancel{(5)}}
\]
--8<---------------cut here---------------end--------------->8---


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.

Alternatively, you can use the (generally inferior) method of exporting
math as images - adding

#+OPTIONS: tex:imagemagick

works OK (assuming you have imagemagick installed of course).
There is also

#+OPTIONS: tex:dvipng

if you have dvipng instead.

--
Nick

  parent reply	other threads:[~2015-10-08  7:31 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 [this message]
2015-10-08 15:12   ` Nick Dokos
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=87lhbdlsth.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).