The following solution to the question where soome maths text is to be cancelled out makes use of the cancel
package. There the macro \cancelto
produces an arrow from bottom left to top right. It also gives a macro called \bcancel
which gives a strike out from top left to bottom right.
Is it possible to have a macro that combines these two together, something of the form \bcancelto
: an arrow from top-left to bottom-right.
Here is a MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage[makeroom]{cancel}
\begin{document}
\noindent
\verb|\cancel{5y}|:
\[ x+\cancel{5y}=0\]
\verb|\bcancel{5y}|:
\[ x+\bcancel{5y}=0\]
\verb|\xcancel{5y}|:
\[ x+\xcancel{5y}=0\]
\verb|\cancelto{\infty}{5y}|:
\[ x+\cancelto{\infty}{5y}=0\]
\end{document}
Best Answer
I introduce
\bcancelto{label}{term}
by modifying one of the packages routines. EDITED to support labels on\bcancelto
.The modification to
\canto@vector
to produce\cantox@vector
amounted to three things:1) adding a
-
before#4
in the\vector
call;2) Changing the
^
superscript to a_
subscript before the\raise
; and3) adding a
-
sign before#2
following the\raise
.Then I had to define
\bcancelto
to make this macro substitution and call on\cancelto
with the substitution in place.