* [NTG-context] Spacing issue in \digits with mode=3
@ 2024-10-26 9:32 Kirill Davidov
2024-10-26 11:49 ` [NTG-context] " vm via ntg-context
2024-10-26 12:56 ` Wolfgang Schuster
0 siblings, 2 replies; 3+ messages in thread
From: Kirill Davidov @ 2024-10-26 9:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
Greetings,
I have been making a table with \digits aligned cells and noticed that
in mode 3 (thin mu skips as group separator, comma as decimal separator)
a specification like {_X.=} causes the single digit number to be
misaligned, it's like there's about 2mu worth of space just before the
number. I don't have much of an idea as to what causes it. It doesn't
seem to be an issue in mode 1, although it may be simply not as
noticeable. This also affects \unit.
MWE:
\setdigitmode{3}
\startdocument
\showglyphs
\enabletrackers[visualizers.glue]
\startxtable[align=center]
\startxtablehead
\startxrow
\startxcell
Data
\stopxcell
\stopxrow
\stopxtablehead
\startxtablebody
\startxrow
\startxcell
\digits{10.001==}
\stopxcell
\stopxrow
\startxrow
\startxcell
\digits{_1.=====} % weird spacing issue here
\stopxcell
\stopxrow
\startxrow
\startxcell
\digits{20.34909}
\stopxcell
\stopxrow
\stopxtablebody
\stopxtable
\halign{%
\hss\alignmark\hss\cr
\digits{10.001==}\cr
\digits{_1.=====}\cr % weird spacing issue here
\digits{20.34909}\cr
}
\stopdocument
Kirill
___________________________________________________________________________________
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] 3+ messages in thread
* [NTG-context] Re: Spacing issue in \digits with mode=3
2024-10-26 9:32 [NTG-context] Spacing issue in \digits with mode=3 Kirill Davidov
@ 2024-10-26 11:49 ` vm via ntg-context
2024-10-26 12:56 ` Wolfgang Schuster
1 sibling, 0 replies; 3+ messages in thread
From: vm via ntg-context @ 2024-10-26 11:49 UTC (permalink / raw)
To: ntg-context; +Cc: vm
On 26/10/2024 11:32, Kirill Davidov wrote:
> I don't have much of an idea as to what causes it. It doesn't
> seem to be an issue in mode 1, although it may be simply not as
> noticeable. This also affects \unit.
if you replace
\digits{_1.=====}
with
\digits{_2.=====}
things seem to look not that shabby
___________________________________________________________________________________
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] 3+ messages in thread
* [NTG-context] Re: Spacing issue in \digits with mode=3
2024-10-26 9:32 [NTG-context] Spacing issue in \digits with mode=3 Kirill Davidov
2024-10-26 11:49 ` [NTG-context] " vm via ntg-context
@ 2024-10-26 12:56 ` Wolfgang Schuster
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2024-10-26 12:56 UTC (permalink / raw)
To: mailing list for ConTeXt users, Kirill Davidov
Kirill Davidov schrieb am 26.10.2024 um 11:32:
> Greetings,
>
> I have been making a table with \digits aligned cells and noticed that
> in mode 3 (thin mu skips as group separator, comma as decimal separator)
> a specification like {_X.=} causes the single digit number to be
> misaligned, it's like there's about 2mu worth of space just before the
> number. I don't have much of an idea as to what causes it. It doesn't
> seem to be an issue in mode 1, although it may be simply not as
> noticeable. This also affects \unit.
There are no mu skips in your example because the values are math.
When you use modes 0--2 ConTeXt inserts a space based on the width of an
period but the other
modes use either \thinspace (mode 3 and 4) or \thickspace (mode 5 and 6)
as separator.
%%%% begin example
\setdigitmode{3}
\startdocument
\type{1,000} = \the\dimexpr\widthofstring{1,000}\relax
\type{1.000} = \the\dimexpr\widthofstring{\digits{1.000}}\relax
\type{1\thinspace 000} = \the\dimexpr\widthofstring{1\thinspace 000}\relax
\type{1.000} = \the\dimexpr\widthofstring{\digits{1.===}}\relax
\stopdocument
%%%% end example
Wolfgang
___________________________________________________________________________________
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] 3+ messages in thread
end of thread, other threads:[~2024-10-26 12:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-26 9:32 [NTG-context] Spacing issue in \digits with mode=3 Kirill Davidov
2024-10-26 11:49 ` [NTG-context] " vm via ntg-context
2024-10-26 12:56 ` Wolfgang Schuster
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).