Dear All, Here is another relic from my LaTeX days that behaves unexpectedly in ConTeXt: \starttext \startformula {f'}^2\ne {f^2}' \stopformula \stoptext 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? Thanks, Matthias
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 -----------------------------------------------------------------
Hi,
Den ons 24 dec. 2025 12:06Matthias Weber
Dear All,
Here is another relic from my LaTeX days that behaves unexpectedly in ConTeXt:
\starttext
\startformula {f'}^2\ne {f^2}' \stopformula
\stoptext
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?
In addition to what Hans wrote: I'm not sure what output you actually want. Do you have an image or so? (I'm off computer for a few days still, so not really able to test anything.) /Mikael
Thanks,
Matthias
___________________________________________________________________________________ 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
___________________________________________________________________________________
Thanks Hans! This will do in the few cases where I really want/need this. @Mikael: This is what I typeset in 2019. I admit, it’s a typographical abomination, but I find computations like these easier to follow when there is less clutter.  Matthias
On Dec 24, 2025, at 8:59 AM, Mikael Sundqvist
wrote: Hi,
Den ons 24 dec. 2025 12:06Matthias Weber
mailto:matthiasweber64@gmail.com> skrev: Dear All,
Here is another relic from my LaTeX days that behaves unexpectedly in ConTeXt:
\starttext
\startformula {f'}^2\ne {f^2}' \stopformula
\stoptext
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?
In addition to what Hans wrote: I'm not sure what output you actually want. Do you have an image or so? (I'm off computer for a few days still, so not really able to test anything.)
/Mikael
Thanks,
Matthias
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl https://www.pragma-ade.nl/ / https://context.aanhet.net https://context.aanhet.net/ (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net https://wiki.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://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 ___________________________________________________________________________________
participants (3)
-
Hans Hagen -
Matthias Weber -
Mikael Sundqvist