In current LMTX, \unit produces unwanted spacing after decimal commas in math
mode.
Minimal example:
\mainlanguage[de]
\setupunit[method=3]
\starttext
\m{\unit{5.6 kiloohm}}
\stoptext
Expected: 5,6 kΩ
Actual: 5, 6 kΩ
This works correctly without a workaround in LMTX versions 2024.02.27 and
2025.11.24.
The following workaround fixes the issue in current LMTX:
\appendtoks
\enablemathpunctuation
\to \everyunits
Suggested fix: In phys-dim.mkxl, change \disablemathpunctuation to
\enablemathpunctuation in the existing \everyunits hook.
I tested the workaround against several unit expressions, formulas and MetaPost
labels. It corrected all affected decimal expressions without introducing other
visible text differences.
Could this be an unintended consequence of the changed meaning of
\enablemathpunctuation and \disablemathpunctuation?
___________________________________________________________________________________
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
___________________________________________________________________________________