[texhax] Oblique cancellation with plain TeX

Jim Diamond JimDiamond at ns.sympatico.ca
Sat Jan 5 00:41:15 CET 2019


On Fri, Jan  4, 2019 at 20:53 (+0000), Rodolfo Medina wrote:

> James Diamond <jim.diamond at acadiau.ca> writes:

>> On Fri, Jan  4, 2019 at 19:14 (+0000), Rodolfo Medina wrote:

>>> Philip Taylor <P.Taylor at Rhul.Ac.Uk> writes:

>>>> Maybe if you were to post a GIF/PNG/JPG/PDF of the effect you are trying to
>>>> create, we non-mathematicians might be better placed to help you ...

<snip>

>> What is wrong with

>> $$ {a\rlap{$b$}/ \over \rlap{$b$}/} = a$$

>> (Aside from the fact that if $b = 0$ then Bad Things are happening?)

>> You could also write

>> \def\cancel#1{\rlap{$#1$}/}

>> somewhere near the beginning of your document and then, when you want
>> to cancel things out, write something like

>> $$ {a\cancel{b} \over \cancel{b}} = a$$

>> or

>> This is $ {a\cancel{b} \over \cancel{b}} = a$ a simple idea.


> Well, thanks, Jim, but...  sorry, it's my fault...  I'd better
> better explain myself...  It's needed that the argument of \cancel
> may be variable, and so the diagonal line should also vary its
> length and angle:

OK, thanks.  I was wondering whether I was missing anything.

Glad that you now have a solution.  And since I use plain TeX, maybe
I'll get some use out of it some time.

Cheers.
                                Jim


More information about the texhax mailing list