ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alexandre Christe <aleks.christe@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Equivalent of the \cancel command with conTeXt
Date: Tue, 22 Aug 2023 12:24:11 +0200	[thread overview]
Message-ID: <4e93db0d-be36-4ff0-9125-f65fcf92dbd5@Spark> (raw)
In-Reply-To: <CACyK-eqOrD8-svL35AJPe_2i8OBeH+pHi2TQ9nwzvxcAjO4rMw@mail.gmail.com>


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

  reply	other threads:[~2023-08-22 10:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 12:22 [NTG-context] " Fabrice Couvreur
2023-08-22 10:24 ` Alexandre Christe [this message]
2023-08-22 12:44   ` [NTG-context] " Fabrice Couvreur
2023-08-22 10:52 ` Mikael Sundqvist
2023-08-22 14:56   ` Fabrice Couvreur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e93db0d-be36-4ff0-9125-f65fcf92dbd5@Spark \
    --to=aleks.christe@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).