[NTG-context] Is this possible to do the same

Gavin gavinpublic at comcast.net
Mon Dec 12 16:48:52 CET 2022

Hi Uschi,

I use the MetaFun features of ConTeXt to cross out stuff.

% Cancel command for use in equations.
\startuniqueMPgraphic{cross out}
  picture cross;
  cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0););
  draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle scaled .8pt ;

\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]

    \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
    \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%


\dots E.g.~$\cancel{x+ {-x}}$. Works in \cancel{text}, too.


I do not have all of the features of the “cancel” package, but it works for a simple cross out. Change the MetaPost code to a single slash, if that is what you want, by removing either one of the draw commands.

Hope that helps. If you need more features, I’d might be able to help you implement them.


> On Dec 12, 2022, at 8:21 AM, Ursula Hermann via ntg-context <ntg-context at ntg.nl> wrote:
> Dear List!
>  Sorry, but my pdf was too big.
> So I send a little picture.<image001.jpg> I would like to know, if there is a modus in ConTeXt like the same in LaTeX. I found this on page 108,  Chapter 3 Math symbos LaTeX Compherensive list.
> Many thanks
> Uschi  ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> maillist : ntg-context at ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
> ___________________________________________________________________________________

More information about the ntg-context mailing list