ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* maths simplifying fractions
       [not found] <b0abd8db479372956483c067b268283067bb3b52.camel.ref@yahoo.com>
@ 2019-11-13 11:28 ` Martin Althoff
  2019-11-13 21:32   ` Henri Menke
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Althoff @ 2019-11-13 11:28 UTC (permalink / raw)
  To: ConTeXt users

Hi all, I am writing some maths exercises that include simplifying fractions. For that
reason I would like to cross out some numbers. Unfortunately overstrike doesn't do the
trick, eg with a 4 the overstrike is practically invisible.

Is there any way to get a diagonal stroke like the latex module "cancel" can do?

Thanks for any suggestions,
Martin

\starttext
\startformula
\frac{\overstrike{2}}{\overstrike{4}} = \frac{1}{2}
\stopformula
\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: maths simplifying fractions
  2019-11-13 11:28 ` maths simplifying fractions Martin Althoff
@ 2019-11-13 21:32   ` Henri Menke
  2019-11-15 13:45     ` Martin Althoff
  0 siblings, 1 reply; 4+ messages in thread
From: Henri Menke @ 2019-11-13 21:32 UTC (permalink / raw)
  To: ntg-context

On 11/14/19 12:28 AM, Martin Althoff wrote:
> Hi all, I am writing some maths exercises that include simplifying fractions. For that
> reason I would like to cross out some numbers. Unfortunately overstrike doesn't do the
> trick, eg with a 4 the overstrike is practically invisible.
> 
> Is there any way to get a diagonal stroke like the latex module "cancel" can do?

This might help.
https://tex.stackexchange.com/questions/501056/equivalent-of-cancelto-in-context

> Thanks for any suggestions,
> Martin
> 
> \starttext
> \startformula
> \frac{\overstrike{2}}{\overstrike{4}} = \frac{1}{2}
> \stopformula
> \stoptext
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: maths simplifying fractions
  2019-11-13 21:32   ` Henri Menke
@ 2019-11-15 13:45     ` Martin Althoff
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Althoff @ 2019-11-15 13:45 UTC (permalink / raw)
  To: ntg-context

sorry for the slow reply, a cold knocked me out.

Thanks Henri for pointing to a solution you already offered on stackexchange! I will save
it as a good universal solution.

Thanks to Kitz, for the very specific solution. This is what I am using at the moment.

This might help.
> https://tex.stackexchange.com/questions/501056/equivalent-of-cancelto-in-context
> 
> > 

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* maths simplifying fractions
@ 2019-11-14  1:10 jkitz
  0 siblings, 0 replies; 4+ messages in thread
From: jkitz @ 2019-11-14  1:10 UTC (permalink / raw)
  To: ntg-context@ntg.nl ConTeXt users

Hi Altoff.

Maybe this markup will help?

\startuniqueMPgraphic{cancel}
  pickup pencircle scaled 0.7pt ; 
  path p ; p := OverlayBox topenlarged -ExHeight bottomenlarged -ExHeight ;
  draw llcorner p -- urcorner p withcolor OverlayColor ;
\stopuniqueMPgraphic

\defineoverlay[cancel][\uniqueMPgraphic{cancel}]
\defineframed[cancel]
  [background=cancel,frame=off,offset=0pt,location=low]

\starttext

\startformula
  6 \frac{3}{8} \div 4 \frac{1}{2} = \frac{27}{4} \div \frac{9}{2} = \frac{\cancel{27}^3}{\cancel{4}^2} \times \frac{\cancel{2}^1}{\cancel{9}^1} = \frac{3}{2} = 1 \frac{1}{2}
\stopformula

\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2019-11-15 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <b0abd8db479372956483c067b268283067bb3b52.camel.ref@yahoo.com>
2019-11-13 11:28 ` maths simplifying fractions Martin Althoff
2019-11-13 21:32   ` Henri Menke
2019-11-15 13:45     ` Martin Althoff
2019-11-14  1:10 jkitz

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).