On 12/24/2025 12:00 PM, Matthias Weber wrote:
Here is another relic from my LaTeX days that behaves unexpectedly in ConTeXt:
Indeed we decided to divert from what LaTeX does (not that I know much
about that but Mikael does). In ConTeXt we configure the engine to let {
} not create an atom but act like grouping commands. The math subsystem
is very much class driven when it comes to spacing, penalties, etc as we
want consistency to be as good as possible without user interference (we
actually consider to ditch the funny single char commands that mess with
spacing but there is some early tex history that makes use sentimental
about it).
We also have primes more natively supported, and as such an atom (or
construct) has an optional prime, and one or more super- and subcripts
(or indices).
\starttext
\startformula
{f'}^2\ne {f^2}'
\stopformula
\stoptext
So that basically is
f'^2 \ne f^2'
We actually keep track of the order but at some point decided to no
longer take it into account when rendering (when we can come up with a
good reason we might have some options there).
One might argue that I should have written
\starttext
\startformula
{f’(x)}^2\ne {f^2(x)}'
\stopformula
\stoptext
But in complex formulas, there is not always enough room to add the argument.
Any suggestions?
I bet Mikael has a better suggestion but here's mine
\starttext
\definemathfence[offenced][left=0,right=0,define=yes]
\startformula
(f')^2 \ne (f^2)'
\stopformula
\startformula
\offenced{f'}^2 \ne \offenced{f^2}'
\stopformula
\stoptext
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 : [email protected] /
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
___________________________________________________________________________________