ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Ursula Hermann via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Ursula Hermann <ursula.hermann@univie.ac.at>
Subject: Re: Is this possible to do the same
Date: Mon, 12 Dec 2022 17:15:20 +0000	[thread overview]
Message-ID: <76dd932197964a1293d11dd1a835c0ef@univie.ac.at> (raw)
In-Reply-To: <0D4F5164-5686-421B-9E3C-12851390D84A@comcast.net>


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

Dear Gavin!
Many thanks for your Mail.

Uschi
________________________________
Von: ntg-context <ntg-context-bounces@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
___________________________________________________________________________________

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

[-- Attachment #2: Type: text/plain, Size: 496 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:[~2022-12-12 17:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 15:21 Ursula Hermann via ntg-context
2022-12-12 15:48 ` Gavin via ntg-context
2022-12-12 17:15   ` Ursula Hermann via ntg-context [this message]

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=76dd932197964a1293d11dd1a835c0ef@univie.ac.at \
    --to=ntg-context@ntg.nl \
    --cc=ursula.hermann@univie.ac.at \
    /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).