summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/phys-dim.mkxl
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-08-25 17:57:42 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-08-25 17:57:42 +0200
commita389a16197fed7803672a8e16fd31d634725d49a (patch)
treeff79e88e68f213d0a226f57caa23809e720d3c5c /tex/context/base/mkxl/phys-dim.mkxl
parent178de9556e3cb519672f9b54db7b5b29eec43c69 (diff)
downloadcontext-a389a16197fed7803672a8e16fd31d634725d49a.tar.gz
2022-08-25 17:40:00
Diffstat (limited to 'tex/context/base/mkxl/phys-dim.mkxl')
-rw-r--r--tex/context/base/mkxl/phys-dim.mkxl17
1 files changed, 14 insertions, 3 deletions
diff --git a/tex/context/base/mkxl/phys-dim.mkxl b/tex/context/base/mkxl/phys-dim.mkxl
index 44aff6411..90475f5b8 100644
--- a/tex/context/base/mkxl/phys-dim.mkxl
+++ b/tex/context/base/mkxl/phys-dim.mkxl
@@ -401,9 +401,20 @@
\permanent\protected\def\installunitsspace#1#2%
{\defcsname\??unitspace#1\endcsname{#2}}
+% \protected\def\phys_units_space
+% {\unskip % weird, why is unskip needed
+% \ifcsname\??unitspace\unitparameter\c!space\endcsname\lastnamedcs\else\unitsmediumspace\fi}
+
+% \im{1 \unit{hour} 20 \unit{minute} 56 \unit{second}}
+% \im{\unit{1 hour} \unit{20 minute} 56 \unit{second}}
+
\protected\def\phys_units_space
- {\unskip % weird, why is unskip needed
- \ifcsname\??unitspace\unitparameter\c!space\endcsname\lastnamedcs\else\unitsmediumspace\fi}
+ {\ifmmode
+ % let the atoms do the work
+ \else
+ \unskip % weird, why is unskip needed
+ \ifcsname\??unitspace\unitparameter\c!space\endcsname\lastnamedcs\else\unitsmediumspace\fi
+ \fi}
\installunitsspace\v!normal{\unitsmediumspace}
\installunitsspace\v!big {\unitsbigspace}
@@ -608,7 +619,7 @@
\dostarttagged\t!maction\t!unit
\mathatom
\s!leftclass \mathdimensioncode
- \s!rightclass \mathordinarycode
+ \s!rightclass \mathdimensioncode
\bgroup
\else
\dostarttagged\t!unit\empty