* [NTG-context] Aligning sub- and superscripts
@ 2025-04-24 9:27 Florent Michel
2025-04-24 9:33 ` [NTG-context] " Mikael Sundqvist
2025-04-24 9:46 ` Hans Hagen
0 siblings, 2 replies; 5+ messages in thread
From: Florent Michel @ 2025-04-24 9:27 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1142 bytes --]
Hi,
I was going through the ‘Mathematics/Mathematical glyphs’ section of the
wiki. Unless I am missing something, the first method proposed in the
section ‘Subscript and superscript’ (
https://wiki.contextgarden.net/Mathematics/Mathematical_glyphs#Subscript_and_superscript)
to align sub- and superscripts does not seem to align them with ConTeXt
2025.04.01. The following example:
\starttext
$T^a_b^c$
$T^a{}_b{}^c{}$
\stoptext
produces (unless my eyes are deceiving me) twice the same output, with the
subscript b below a.
One possible workaround is to add 0-width spaces after indices (I just
added this workaround to the wiki so that it shows one working option).
This seems a bit of a hack, though (and not the easiest to type with most
keyboards), and the results are not perfect (the space between the a and c
looks a bit too wide to me; although that is probably subjective, and can
be resolved by manually adding \kern s).
Would anyone know if there is a better (easier to type and/or producing a
better result without having to manually add negative \kern s) solution?
Cheers,
Florent
[-- Attachment #1.2: Type: text/html, Size: 1387 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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] 5+ messages in thread
* [NTG-context] Re: Aligning sub- and superscripts
2025-04-24 9:27 [NTG-context] Aligning sub- and superscripts Florent Michel
@ 2025-04-24 9:33 ` Mikael Sundqvist
2025-04-24 9:44 ` Florent Michel
2025-04-24 9:46 ` Hans Hagen
1 sibling, 1 reply; 5+ messages in thread
From: Mikael Sundqvist @ 2025-04-24 9:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi!
Assuming you are using context lmtx, does section 2.7 in
https://www.pragma-ade.com/general/manuals/mathincontext-screen.pdf
help you?
/Mikael
On Thu, Apr 24, 2025 at 11:29 AM Florent Michel <florent.m42@gmail.com> wrote:
>
> Hi,
>
> I was going through the ‘Mathematics/Mathematical glyphs’ section of the wiki. Unless I am missing something, the first method proposed in the section ‘Subscript and superscript’ (https://wiki.contextgarden.net/Mathematics/Mathematical_glyphs#Subscript_and_superscript) to align sub- and superscripts does not seem to align them with ConTeXt 2025.04.01. The following example:
>
> \starttext
> $T^a_b^c$
> $T^a{}_b{}^c{}$
> \stoptext
>
> produces (unless my eyes are deceiving me) twice the same output, with the subscript b below a.
>
> One possible workaround is to add 0-width spaces after indices (I just added this workaround to the wiki so that it shows one working option). This seems a bit of a hack, though (and not the easiest to type with most keyboards), and the results are not perfect (the space between the a and c looks a bit too wide to me; although that is probably subjective, and can be resolved by manually adding \kern s).
>
> Would anyone know if there is a better (easier to type and/or producing a better result without having to manually add negative \kern s) solution?
>
> Cheers,
> Florent
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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] 5+ messages in thread
* [NTG-context] Re: Aligning sub- and superscripts
2025-04-24 9:33 ` [NTG-context] " Mikael Sundqvist
@ 2025-04-24 9:44 ` Florent Michel
0 siblings, 0 replies; 5+ messages in thread
From: Florent Michel @ 2025-04-24 9:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2855 bytes --]
Hi Mikael,
Thanks a lot! It's indeed exactly what I was looking for!
I'll replace my hack-y solution with a link to that section in the wiki.
Cheers,
Florent
Le jeu. 24 avr. 2025 à 10:36, Mikael Sundqvist <mickep@gmail.com> a écrit :
> Hi!
>
> Assuming you are using context lmtx, does section 2.7 in
> https://www.pragma-ade.com/general/manuals/mathincontext-screen.pdf
> help you?
>
> /Mikael
>
> On Thu, Apr 24, 2025 at 11:29 AM Florent Michel <florent.m42@gmail.com>
> wrote:
> >
> > Hi,
> >
> > I was going through the ‘Mathematics/Mathematical glyphs’ section of the
> wiki. Unless I am missing something, the first method proposed in the
> section ‘Subscript and superscript’ (
> https://wiki.contextgarden.net/Mathematics/Mathematical_glyphs#Subscript_and_superscript)
> to align sub- and superscripts does not seem to align them with ConTeXt
> 2025.04.01. The following example:
> >
> > \starttext
> > $T^a_b^c$
> > $T^a{}_b{}^c{}$
> > \stoptext
> >
> > produces (unless my eyes are deceiving me) twice the same output, with
> the subscript b below a.
> >
> > One possible workaround is to add 0-width spaces after indices (I just
> added this workaround to the wiki so that it shows one working option).
> This seems a bit of a hack, though (and not the easiest to type with most
> keyboards), and the results are not perfect (the space between the a and c
> looks a bit too wide to me; although that is probably subjective, and can
> be resolved by manually adding \kern s).
> >
> > Would anyone know if there is a better (easier to type and/or producing
> a better result without having to manually add negative \kern s) solution?
> >
> > Cheers,
> > Florent
> >
> ___________________________________________________________________________________
> > 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
> >
> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 4549 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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] 5+ messages in thread
* [NTG-context] Re: Aligning sub- and superscripts
2025-04-24 9:27 [NTG-context] Aligning sub- and superscripts Florent Michel
2025-04-24 9:33 ` [NTG-context] " Mikael Sundqvist
@ 2025-04-24 9:46 ` Hans Hagen
2025-04-24 10:01 ` Florent Michel
1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2025-04-24 9:46 UTC (permalink / raw)
To: ntg-context
On 4/24/2025 11:27 AM, Florent Michel wrote:
> \starttext
> $T^a_b^c$
> $T^a{}_b{}^c{}$
> \stoptext
>
> produces (unless my eyes are deceiving me) twice the same output, with
> the subscript b below a.
fwiw: {} in context in math does not create an atom, it is just grouping
so here it does nothing; we have a different mechanism for handling
multiple successive scripts (plus control over spacing)
see mikaels answer
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] 5+ messages in thread
* [NTG-context] Re: Aligning sub- and superscripts
2025-04-24 9:46 ` Hans Hagen
@ 2025-04-24 10:01 ` Florent Michel
0 siblings, 0 replies; 5+ messages in thread
From: Florent Michel @ 2025-04-24 10:01 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1518 bytes --]
Thanks a lot Hans for the explanation!
Cheers,
Florent
Le jeu. 24 avr. 2025 à 10:53, Hans Hagen <j.hagen@xs4all.nl> a écrit :
> On 4/24/2025 11:27 AM, Florent Michel wrote:
>
> > \starttext
> > $T^a_b^c$
> > $T^a{}_b{}^c{}$
> > \stoptext
> >
> > produces (unless my eyes are deceiving me) twice the same output, with
> > the subscript b below a.
>
> fwiw: {} in context in math does not create an atom, it is just grouping
> so here it does nothing; we have a different mechanism for handling
> multiple successive scripts (plus control over spacing)
>
> see mikaels answer
>
> 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
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 2564 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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] 5+ messages in thread
end of thread, other threads:[~2025-04-24 10:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-24 9:27 [NTG-context] Aligning sub- and superscripts Florent Michel
2025-04-24 9:33 ` [NTG-context] " Mikael Sundqvist
2025-04-24 9:44 ` Florent Michel
2025-04-24 9:46 ` Hans Hagen
2025-04-24 10:01 ` Florent Michel
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).