Dear Gavin!
Many thanks for your Mail.

Uschi
________________________________
Von: ntg-context <ntg-context-boun...@ntg.nl> im Auftrag von Gavin via 
ntg-context <ntg-context@ntg.nl>
Gesendet: Montag, 12. Dezember 2022 16:48:52
An: mailing list for ConTeXt users
Cc: Gavin
Betreff: Re: [NTG-context] Is this possible to do the same

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 ;
\stopuniqueMPgraphic

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

\define[1]\cancel{%
  \ifmmode
    \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
  \else%
    \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
  \fi%
}

\starttext

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

\stoptext

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.

Gavin


> On Dec 12, 2022, at 8:21 AM, Ursula Hermann via ntg-context 
> <ntg-context@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@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
> ___________________________________________________________________________________


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@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
___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@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
___________________________________________________________________________________

Reply via email to