ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Bug in recent math parsing (?)
@ 2025-01-03  0:56 Jim
  2025-01-03  8:13 ` [NTG-context] " Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Jim @ 2025-01-03  0:56 UTC (permalink / raw)
  To: ntg-context

Hi,

I was perusing an update to
https://wiki.contextgarden.net/index.php?title=Framed&diff=next&oldid=35583
and noticed that the grey math was not properly aligned on the wiki page.

But then I tried it on my system, and, worse yet, I found out that

\setuppapersize[A5]
\setupcolors[state=start]
\def\graymath{\mframed[frame=off,
    background=color,
    backgroundcolor=gray,
    backgroundoffset=3pt]}

\starttext
\startformula
  {x^3\over3} - 2
\stopformula
\stoptext

creates a fraction that I would expect from

        {x^3\over3 - 2}

Is this just my (newly updated) context, or has the year 2025 started off
with a \over problem?

Thanks.

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Bug in recent math parsing (?)
  2025-01-03  0:56 [NTG-context] Bug in recent math parsing (?) Jim
@ 2025-01-03  8:13 ` Hans Hagen
  2025-01-03 17:07   ` Jim
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2025-01-03  8:13 UTC (permalink / raw)
  To: ntg-context

On 1/3/2025 1:56 AM, Jim wrote:
> Hi,
> 
> I was perusing an update to
> https://wiki.contextgarden.net/index.php?title=Framed&diff=next&oldid=35583
> and noticed that the grey math was not properly aligned on the wiki page.
> 
> But then I tried it on my system, and, worse yet, I found out that
> 
> \setuppapersize[A5]
> \setupcolors[state=start]
> \def\graymath{\mframed[frame=off,
>      background=color,
>      backgroundcolor=gray,
>      backgroundoffset=3pt]}
> 
> \starttext
> \startformula
>    {x^3\over3} - 2
> \stopformula
> \stoptext
> 
> creates a fraction that I would expect from
> 
>          {x^3\over3 - 2}
> 
> Is this just my (newly updated) context, or has the year 2025 started off
> with a \over problem?

It's been so for a while. In fact, using \over was never advocated

For various reasons you should use:

  \frac{x^3}{3} - 2

Here are some:

- in lmtx we configure {} to as anywhere else in tex: grouping or 
argument delimiters; if not it will always create atoms

- \over is a special but confusing case of parsing where, when it is 
seen, tex will take the previous atom and pair that with an upcoming 
only case of such parsing

- just try to predict what

    {x} \over {y}
    {x+1} \over {y}
    x + {1} \over {y}
    x + 1\over y
    {x + {1} \over {y}}
    {x + 1\over y}

etc etc are supposed to do especially when you also mix in
\scriptstyle, \red, \bf or alike in different places in or ourside these { }

- this means that when one wants to control rendering rather dirty 
tricks have to be used to might not always work

- for that reason \frac is there (afaik not only in context): we can 
control how the numerator and denominator are handled in more detail

- in lmtx (see the extended math manual) we've spend a lot (!) of time 
on improving math rendering and spacing especially, so in our case 
fractions are native classes

I'm sure Mikael can add some more arguments ... like different kind of 
fractions, skrewed fraction etc, but maybe best read the quite extensive 
mathincontext manual first.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Bug in recent math parsing (?)
  2025-01-03  8:13 ` [NTG-context] " Hans Hagen
@ 2025-01-03 17:07   ` Jim
  2025-01-03 17:29     ` Aditya Mahajan
  2025-01-03 18:06     ` Henning Hraban Ramm
  0 siblings, 2 replies; 10+ messages in thread
From: Jim @ 2025-01-03 17:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hans,

On Fri, Jan  3, 2025 at 09:13 (+0100), Hans Hagen wrote:

> On 1/3/2025 1:56 AM, Jim wrote:
>> Hi,

>> I was perusing an update to
>> https://wiki.contextgarden.net/index.php?title=Framed&diff=next&oldid=35583
>> and noticed that the grey math was not properly aligned on the wiki page.

>> But then I tried it on my system, and, worse yet, I found out that

>> \setuppapersize[A5]
>> \setupcolors[state=start]
>> \def\graymath{\mframed[frame=off,
>> background=color,
>> backgroundcolor=gray,
>> backgroundoffset=3pt]}

>> \starttext
>> \startformula
>>    {x^3\over3} - 2
>> \stopformula
>> \stoptext

>> creates a fraction that I would expect from

>>          {x^3\over3 - 2}

>> Is this just my (newly updated) context, or has the year 2025 started off
>> with a \over problem?

> It's been so for a while. In fact, using \over was never advocated

OK, I'm not entirely surprised by that.

But... as mentioned, I see it used in the wiki.  And I know that the wiki
isn't the same sort of official documentation as the manual, but
(a) there it is, and
(b) in the wiki it works.

I know little about the wiki, is it using some other/older version of
ConTeXt (e.g., Mk II or Mk IV) to generate the examples?  If the answer is
"yes", is that something that should be reconsidered?

> For various reasons you should use:

>  \frac{x^3}{3} - 2

> Here are some:

> - in lmtx we configure {} to as anywhere else in tex: grouping or argument
> delimiters; if not it will always create atoms

> - \over is a special but confusing case of parsing where, when it is seen,
> tex will take the previous atom and pair that with an upcoming only case of
> such parsing

> - just try to predict what

>    {x} \over {y}
>    {x+1} \over {y}
> x + {1} \over {y}
> x + 1\over y
>    {x + {1} \over {y}}
>    {x + 1\over y}

> etc etc are supposed to do especially when you also mix in
> \scriptstyle, \red, \bf or alike in different places in or ourside these { }

I will admit in my plain TeX documents I always used
        {<numer> \over <denom>}
to let TeX know the extent of the numerator and denominator, and it always
(?!) did The Right Thing (i.e., typeset a fraction with "numer" over
"denom"), but I don't tend to use hugely complicated fractions, so maybe I
could have run into problems if I tried trickier things.

> - this means that when one wants to control rendering rather dirty tricks
> have to be used to might not always work

> - for that reason \frac is there (afaik not only in context): we can control
> how the numerator and denominator are handled in more detail

> - in lmtx (see the extended math manual) we've spend a lot (!) of time on
> improving math rendering and spacing especially, so in our case fractions
> are native classes

> I'm sure Mikael can add some more arguments ... like different kind of
> fractions, skrewed fraction etc, but maybe best read the quite extensive
> mathincontext manual first.

Thanks for your comments and the pointer to the manual.


Back to the wiki:
I have made some edits to the wiki here and there when I got (more or less)
definitive statements from someone who I assumed is a ConTeXt "guru" (or
higher), or when I was correcting some typo or grammar error, or when I
added an example I thought was enlightening.  In this case, the edit is
major, and I would not want anyone to feel I was stepping on anyone's toes
by rewriting the examples in the framed page.

Has anyone who has read this far care to comment on the wiki questions:
(1) Why does \over work correctly in the \framed wiki example, and
(2) Should the example there be re-written to use preferred ConTeXt syntax?

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Bug in recent math parsing (?)
  2025-01-03 17:07   ` Jim
@ 2025-01-03 17:29     ` Aditya Mahajan
  2025-01-05 19:58       ` Jim
  2025-01-03 18:06     ` Henning Hraban Ramm
  1 sibling, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2025-01-03 17:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 3 Jan 2025, Jim wrote:

> Has anyone who has read this far care to comment on the wiki questions:
> (2) Should the example there be re-written to use preferred ConTeXt syntax?

Definitely, yes to (2)!

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Bug in recent math parsing (?)
  2025-01-03 17:07   ` Jim
  2025-01-03 17:29     ` Aditya Mahajan
@ 2025-01-03 18:06     ` Henning Hraban Ramm
  2025-01-05 19:51       ` Jim
  1 sibling, 1 reply; 10+ messages in thread
From: Henning Hraban Ramm @ 2025-01-03 18:06 UTC (permalink / raw)
  To: ntg-context

Am 03.01.25 um 18:07 schrieb Jim:
> I have made some edits to the wiki here and there when I got (more or less)
> definitive statements from someone who I assumed is a ConTeXt "guru" (or
> higher), or when I was correcting some typo or grammar error, or when I
> added an example I thought was enlightening.  In this case, the edit is
> major, and I would not want anyone to feel I was stepping on anyone's toes
> by rewriting the examples in the framed page.
> 
> Has anyone who has read this far care to comment on the wiki questions:
> (1) Why does \over work correctly in the \framed wiki example, and
> (2) Should the example there be re-written to use preferred ConTeXt syntax?

As you can see on its start page, the ConTeXt installation of the wiki 
is 2024.01.08, i.e. one year old. Since then, most of the math rewrite 
happened. (If Taco finds the time, it would make sense to update.)

There’s a lot of outdated code in the wiki, since it started in MkII 
times, and it’s not always obvious that something is outdated. Besides, 
users have different styles of coding…

But yes, please, if you see something outdated/oldfashioned/overly 
convoluted, change it if you know how! And if not, please ask to make 
those who know aware.

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Bug in recent math parsing (?)
  2025-01-03 18:06     ` Henning Hraban Ramm
@ 2025-01-05 19:51       ` Jim
  0 siblings, 0 replies; 10+ messages in thread
From: Jim @ 2025-01-05 19:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jan  3, 2025 at 19:06 (+0100), Henning Hraban Ramm wrote:

> Am 03.01.25 um 18:07 schrieb Jim:
>> I have made some edits to the wiki here and there when I got (more or less)
>> definitive statements from someone who I assumed is a ConTeXt "guru" (or
>> higher), or when I was correcting some typo or grammar error, or when I
>> added an example I thought was enlightening.  In this case, the edit is
>> major, and I would not want anyone to feel I was stepping on anyone's toes
>> by rewriting the examples in the framed page.

>> Has anyone who has read this far care to comment on the wiki questions:
>> (1) Why does \over work correctly in the \framed wiki example, and
>> (2) Should the example there be re-written to use preferred ConTeXt syntax?

> As you can see on its start page,

Had I only known or thought to look!  Thanks for the pointer.

> the ConTeXt installation of the wiki is 2024.01.08, i.e. one year
> old.  Since then, most of the math rewrite happened.  (If Taco finds the
> time, it would make sense to update.)

> There’s a lot of outdated code in the wiki, since it started in MkII times,
> and it’s not always obvious that something is outdated.

Quite true.

> Besides, users have different styles of coding…

There is that.  But style is one thing, and wondering why something in the
wiki won't work at all is yet another.

> But yes, please, if you see something outdated/oldfashioned/overly
> convoluted, change it if you know how!  And if not, please ask to make those
> who know aware.

See my next message...

Cheers.

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Bug in recent math parsing (?)
  2025-01-03 17:29     ` Aditya Mahajan
@ 2025-01-05 19:58       ` Jim
  2025-01-06  4:48         ` Aditya Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Jim @ 2025-01-05 19:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jan  3, 2025 at 12:29 (-0500), Aditya Mahajan wrote:

> On Fri, 3 Jan 2025, Jim wrote:

>> Has anyone who has read this far care to comment on the wiki questions:
>> (2) Should the example there be re-written to use preferred ConTeXt syntax?

> Definitely, yes to (2)!

I changed \over usage to \frac on the wiki page known, as of very recently,
as "Text blocks/Environments/Frames" (i.e.,
https://wiki.contextgarden.net/Text_blocks/Environments/Frames )

However, the greyed math (see "Shaded background for part of a displayed
equation" about 1/4 the way down the page) is too high.  I changed \mframed
to \inmframed which made it less bad, but I am at a loss as to The Right Way
to get good horizontal alignment here.

Does anyone here who knows The Right Way have the time to either
(a) fix the wiki, or
(b) tell me The Right Way (and then I'll cheerfully fix the wiki)?

I am confident that I could kludge it to the correct height with a little
box lowering trickery, but surely there is a better way.

Thanks.

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Bug in recent math parsing (?)
  2025-01-05 19:58       ` Jim
@ 2025-01-06  4:48         ` Aditya Mahajan
  2025-01-06  9:18           ` Hans Hagen
  2025-01-06 15:33           ` Jim
  0 siblings, 2 replies; 10+ messages in thread
From: Aditya Mahajan @ 2025-01-06  4:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 5 Jan 2025, Jim wrote:

> On Fri, Jan  3, 2025 at 12:29 (-0500), Aditya Mahajan wrote:
> 
> > On Fri, 3 Jan 2025, Jim wrote:
> 
> >> Has anyone who has read this far care to comment on the wiki questions:
> >> (2) Should the example there be re-written to use preferred ConTeXt syntax?
> 
> > Definitely, yes to (2)!
> 
> I changed \over usage to \frac on the wiki page known, as of very recently,
> as "Text blocks/Environments/Frames" (i.e.,
> https://wiki.contextgarden.net/Text_blocks/Environments/Frames )
> 
> However, the greyed math (see "Shaded background for part of a displayed
> equation" about 1/4 the way down the page) is too high.  I changed \mframed
> to \inmframed which made it less bad, but I am at a loss as to The Right Way
> to get good horizontal alignment here.
> 
> Does anyone here who knows The Right Way have the time to either
> (a) fix the wiki, or
> (b) tell me The Right Way (and then I'll cheerfully fix the wiki)?
> 
> I am confident that I could kludge it to the correct height with a little
> box lowering trickery, but surely there is a better way.

This is how I'd do it:

\definemathframed
  [graymath]
  [frame=off,
   location=mathematics,
   background=color,
   backgroundcolor=gray,
   backgroundoffset=3pt]

\starttext
\startformula
  \ln (1+x) =\, \graymath{x - \frac{x^2}{2}} \,+ \frac{x^3}{3}-\cdots.
\stopformula
\stoptext

The key part is location=mathematics (or \mcframed .. short for math-centered).

However, there appears to be a bug as the \frac is shown in text style instead of display style. Here is a minimal example illustrating the bug:

\startformula
   \mcframed[mathstyle=display]{\frac{1}{x}}
   +
   \frac {1}{x}
   + 
   \mcframed{\displaystyle \frac{1}{x}}
\stopformula

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Bug in recent math parsing (?)
  2025-01-06  4:48         ` Aditya Mahajan
@ 2025-01-06  9:18           ` Hans Hagen
  2025-01-06 15:33           ` Jim
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2025-01-06  9:18 UTC (permalink / raw)
  To: ntg-context

On 1/6/2025 5:48 AM, Aditya Mahajan wrote:
> On Sun, 5 Jan 2025, Jim wrote:
> 
>> On Fri, Jan  3, 2025 at 12:29 (-0500), Aditya Mahajan wrote:
>>
>>> On Fri, 3 Jan 2025, Jim wrote:
>>
>>>> Has anyone who has read this far care to comment on the wiki questions:
>>>> (2) Should the example there be re-written to use preferred ConTeXt syntax?
>>
>>> Definitely, yes to (2)!
>>
>> I changed \over usage to \frac on the wiki page known, as of very recently,
>> as "Text blocks/Environments/Frames" (i.e.,
>> https://wiki.contextgarden.net/Text_blocks/Environments/Frames )
>>
>> However, the greyed math (see "Shaded background for part of a displayed
>> equation" about 1/4 the way down the page) is too high.  I changed \mframed
>> to \inmframed which made it less bad, but I am at a loss as to The Right Way
>> to get good horizontal alignment here.
>>
>> Does anyone here who knows The Right Way have the time to either
>> (a) fix the wiki, or
>> (b) tell me The Right Way (and then I'll cheerfully fix the wiki)?
>>
>> I am confident that I could kludge it to the correct height with a little
>> box lowering trickery, but surely there is a better way.
> 
> This is how I'd do it:
> 
> \definemathframed
>    [graymath]
>    [frame=off,
>     location=mathematics,
>     background=color,
>     backgroundcolor=gray,
>     backgroundoffset=3pt]
> 
> \starttext
> \startformula
>    \ln (1+x) =\, \graymath{x - \frac{x^2}{2}} \,+ \frac{x^3}{3}-\cdots.
> \stopformula
> \stoptext
> 
> The key part is location=mathematics (or \mcframed .. short for math-centered).
> 
> However, there appears to be a bug as the \frac is shown in text style instead of display style. Here is a minimal example illustrating the bug:
> 
> \startformula
>     \mcframed[mathstyle=display]{\frac{1}{x}}
>     +
>     \frac {1}{x}
>     +
>     \mcframed{\displaystyle \frac{1}{x}}
> \stopformula

keep in mind that we want to eradicate all these \, thingies (and don't 
even mention them), so after we recovered from seeing those we cooked up 
a more configurable variant for mframed (I'll sent you the file to test)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Bug in recent math parsing (?)
  2025-01-06  4:48         ` Aditya Mahajan
  2025-01-06  9:18           ` Hans Hagen
@ 2025-01-06 15:33           ` Jim
  1 sibling, 0 replies; 10+ messages in thread
From: Jim @ 2025-01-06 15:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Jan  5, 2025 at 23:48 (-0500), Aditya Mahajan wrote:

> On Sun, 5 Jan 2025, Jim wrote:

>> On Fri, Jan  3, 2025 at 12:29 (-0500), Aditya Mahajan wrote:

>>> On Fri, 3 Jan 2025, Jim wrote:

>>>> Has anyone who has read this far care to comment on the wiki questions:
>>>> (2) Should the example there be re-written to use preferred ConTeXt syntax?

>>> Definitely, yes to (2)!

>> I changed \over usage to \frac on the wiki page known, as of very recently,
>> as "Text blocks/Environments/Frames" (i.e.,
>> https://wiki.contextgarden.net/Text_blocks/Environments/Frames )

>> However, the greyed math (see "Shaded background for part of a displayed
>> equation" about 1/4 the way down the page) is too high.  I changed \mframed
>> to \inmframed which made it less bad, but I am at a loss as to The Right Way
>> to get good horizontal alignment here.

>> Does anyone here who knows The Right Way have the time to either
>> (a) fix the wiki, or
>> (b) tell me The Right Way (and then I'll cheerfully fix the wiki)?

>> I am confident that I could kludge it to the correct height with a little
>> box lowering trickery, but surely there is a better way.

> This is how I'd do it:

> \definemathframed
>   [graymath]
>   [frame=off,
> location=mathematics,
> background=color,
> backgroundcolor=gray,
> backgroundoffset=3pt]

> \starttext
> \startformula
>   \ln (1+x) =\, \graymath{x - \frac{x^2}{2}} \,+ \frac{x^3}{3}-\cdots.
> \stopformula
> \stoptext

> The key part is location=mathematics (or \mcframed .. short for math-centered).

Thanks for that, Aditya.  As per my promise (notwithstanding the bug that
you note below) I did update the wiki page.  I like to make minimal updates
to avoid insulting original authors, so I just added location=mathematics
to the original author's definition.

> However, there appears to be a bug as the \frac is shown in text style
> instead of display style.

Damn.  I was so happy to get \frac working and the formula almost aligned
the smaller fraction didn't completely register.

> Here is a minimal example illustrating the bug:

> \startformula
>    \mcframed[mathstyle=display]{\frac{1}{x}}
>    +
>    \frac {1}{x}
>    + 
>    \mcframed{\displaystyle \frac{1}{x}}
> \stopformula

Given Hans' follow-up, I'll keep an eye on this and further update the wiki
page if/when the solution comes into my inbox.

                                Jim

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2025-01-06 15:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-03  0:56 [NTG-context] Bug in recent math parsing (?) Jim
2025-01-03  8:13 ` [NTG-context] " Hans Hagen
2025-01-03 17:07   ` Jim
2025-01-03 17:29     ` Aditya Mahajan
2025-01-05 19:58       ` Jim
2025-01-06  4:48         ` Aditya Mahajan
2025-01-06  9:18           ` Hans Hagen
2025-01-06 15:33           ` Jim
2025-01-03 18:06     ` Henning Hraban Ramm
2025-01-05 19:51       ` Jim

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