ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Re: Equivalent of the \cancel command with conTeXt
  2023-08-22 12:22 [NTG-context] Equivalent of the \cancel command with conTeXt Fabrice Couvreur
@ 2023-08-22 10:24 ` Alexandre Christe
  2023-08-22 12:44   ` Fabrice Couvreur
  2023-08-22 10:52 ` Mikael Sundqvist
  1 sibling, 1 reply; 5+ messages in thread
From: Alexandre Christe @ 2023-08-22 10:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1455 bytes --]

Hi Fabrice,

I have this from former exchanges

% 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%
}

Maybe something else is available nowadays.

A. Christe
Le 22 août 2023 à 12:22 +0200, Fabrice Couvreur <fabrice1.couvreur@gmail.com>, a écrit :
> Hi,
> In an algebraic expression, it is sometimes interesting to cross out terms. With LaTeX, there is the \cancel command from the package cancel. Is there an equivalent with conTeXt ?
> Thanks
> Fabrice
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 2515 bytes --]

[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Equivalent of the \cancel command with conTeXt
  2023-08-22 12:22 [NTG-context] Equivalent of the \cancel command with conTeXt Fabrice Couvreur
  2023-08-22 10:24 ` [NTG-context] " Alexandre Christe
@ 2023-08-22 10:52 ` Mikael Sundqvist
  2023-08-22 14:56   ` Fabrice Couvreur
  1 sibling, 1 reply; 5+ messages in thread
From: Mikael Sundqvist @ 2023-08-22 10:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

On Tue, Aug 22, 2023 at 12:25 PM Fabrice Couvreur
<fabrice1.couvreur@gmail.com> wrote:
>
> Hi,
> In an algebraic expression, it is sometimes interesting to cross out terms. With LaTeX, there is the \cancel command from the package cancel. Is there an equivalent with conTeXt ?
> Thanks
> Fabrice

I don't know what the cancel package gives, but since December 22 or
so, one can do

\starttext

\setupframed
[mathstrikeout]
[color=darkgreen,
backgroundcolor=darkred,
frame=off]

\startTEXpage[offset=4dk,align=flushleft]
\dm{1+\mathstrikeout[strike:text={what is this?}]{(2x-x)}+2=3+x}
\blank
\dm{1+\mathstrikeout[strike:math={=x}]{(2x-x)}+2=3+x}
\blank
\dm{1+\mathstrikeout[strike:math=u,arrow=no]{(2x-x)}+2=3+x}
\blank
\dm{1+\mathcrossout[strike:math={=x}]{(2x-x)}+2=3+x}
\stopTEXpage

\stoptext

/Mikael
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Equivalent of the \cancel command with conTeXt
@ 2023-08-22 12:22 Fabrice Couvreur
  2023-08-22 10:24 ` [NTG-context] " Alexandre Christe
  2023-08-22 10:52 ` Mikael Sundqvist
  0 siblings, 2 replies; 5+ messages in thread
From: Fabrice Couvreur @ 2023-08-22 12:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 199 bytes --]

Hi,
In an algebraic expression, it is sometimes interesting to cross out terms.
With LaTeX, there is the \cancel command from the package cancel. Is there
an equivalent with conTeXt ?
Thanks
Fabrice

[-- Attachment #1.2: Type: text/html, Size: 506 bytes --]

[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Equivalent of the \cancel command with conTeXt
  2023-08-22 10:24 ` [NTG-context] " Alexandre Christe
@ 2023-08-22 12:44   ` Fabrice Couvreur
  0 siblings, 0 replies; 5+ messages in thread
From: Fabrice Couvreur @ 2023-08-22 12:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2225 bytes --]

Hi Alexander,
Thank you for this suggestion which will do the trick.
Fabrice

Le mar. 22 août 2023 à 10:26, Alexandre Christe <aleks.christe@gmail.com> a
écrit :

> Hi Fabrice,
>
> I have this from former exchanges
>
> % 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%
> }
>
> Maybe something else is available nowadays.
>
> A. Christe
> Le 22 août 2023 à 12:22 +0200, Fabrice Couvreur <
> fabrice1.couvreur@gmail.com>, a écrit :
>
> Hi,
> In an algebraic expression, it is sometimes interesting to cross out
> terms. With LaTeX, there is the \cancel command from the package cancel. Is
> there an equivalent with conTeXt ?
> Thanks
> Fabrice
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 4236 bytes --]

[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Equivalent of the \cancel command with conTeXt
  2023-08-22 10:52 ` Mikael Sundqvist
@ 2023-08-22 14:56   ` Fabrice Couvreur
  0 siblings, 0 replies; 5+ messages in thread
From: Fabrice Couvreur @ 2023-08-22 14:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1640 bytes --]

Hi Mikael,
Thank you for this command ; there must be many others that I don't know
how they work.
Fabrice

Le mar. 22 août 2023 à 10:54, Mikael Sundqvist <mickep@gmail.com> a écrit :

> Hi,
>
> On Tue, Aug 22, 2023 at 12:25 PM Fabrice Couvreur
> <fabrice1.couvreur@gmail.com> wrote:
> >
> > Hi,
> > In an algebraic expression, it is sometimes interesting to cross out
> terms. With LaTeX, there is the \cancel command from the package cancel. Is
> there an equivalent with conTeXt ?
> > Thanks
> > Fabrice
>
> I don't know what the cancel package gives, but since December 22 or
> so, one can do
>
> \starttext
>
> \setupframed
> [mathstrikeout]
> [color=darkgreen,
> backgroundcolor=darkred,
> frame=off]
>
> \startTEXpage[offset=4dk,align=flushleft]
> \dm{1+\mathstrikeout[strike:text={what is this?}]{(2x-x)}+2=3+x}
> \blank
> \dm{1+\mathstrikeout[strike:math={=x}]{(2x-x)}+2=3+x}
> \blank
> \dm{1+\mathstrikeout[strike:math=u,arrow=no]{(2x-x)}+2=3+x}
> \blank
> \dm{1+\mathcrossout[strike:math={=x}]{(2x-x)}+2=3+x}
> \stopTEXpage
>
> \stoptext
>
> /Mikael
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 2764 bytes --]

[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-22 12:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 12:22 [NTG-context] Equivalent of the \cancel command with conTeXt Fabrice Couvreur
2023-08-22 10:24 ` [NTG-context] " Alexandre Christe
2023-08-22 12:44   ` Fabrice Couvreur
2023-08-22 10:52 ` Mikael Sundqvist
2023-08-22 14:56   ` Fabrice Couvreur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).