[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 03:31:38 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Lawrence Bottorff <address@hidden> 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