# [texhax] Oblique cancellation with plain TeX

Barbara Beeton bnb at ams.org
Fri Jan 4 21:51:33 CET 2019

James Diamond has added to this interchange:

> 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 ...

> > The following is a simple example: to be processed with simply latex file'.  I
> > want the same but with plain TeX...  Thanks,

> > Rodolfo

> > \documentclass[preview,border=12pt,varwidth]{standalone}
> > \usepackage{cancel}
> > \begin{document}
> > \abovedisplayskip=0pt
> > $> > \frac{a\cancel{b}}{\cancel{b}}=a > >$
> > \end{document}

> What is wrong with

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

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

maybe it would be better to have the slash lapped over the target?

> 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.

I was thinking that \oalign (as used to construct an over- or
under-dot or position a cedilla might be more appropriate.
also, an italic (*text* italic) slash has a less steep slope so it
would cover a wider letter more fully, and not be confused
with \neq.  just some random thoughts (that I don't have
time to test at the moment).

cheers.						-- bb

`