summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/phys-dim.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/phys-dim.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/phys-dim.mkiv27
1 files changed, 17 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/context/base/phys-dim.mkiv b/Master/texmf-dist/tex/context/base/phys-dim.mkiv
index 232edc2fc5e..b1bcb40c947 100644
--- a/Master/texmf-dist/tex/context/base/phys-dim.mkiv
+++ b/Master/texmf-dist/tex/context/base/phys-dim.mkiv
@@ -156,7 +156,7 @@
{\ifmmode
\expandafter\normalsuperscript
\else
- \expandafter\high
+ \expandafter\unitshigh
\fi}
% we could use a symbolset but how many symbols are there ?
@@ -170,17 +170,21 @@
% \definesymbol[units][times][\cdots]
% \definesymbol[units][times][\ifmmode\cdot\else\kern.2\emwidth\cdot\kern.2\emwidth\fi]
-\def\digitstimessymbol{\times}
-% \def\digitstimessymbol{\cdot}
-% \def\digitstimessymbol{\ifmmode\cdot\else\kern.2\emwidth\cdot\kern.2\emwidth\fi}
+\unexpanded\def\digitstextbinop#1% assumes preceding
+ {\fourperemspace\nobreak\times\fourperemspace}
+
+%def\digitstimessymbol{\ifmmode\cdot\else\digitstextbinop\cdot\fi}
+\def\digitstimessymbol{\ifmmode\times\else\digitstextbinop\times\fi}
\unexpanded\def\digitszeropadding {\hphantom{0}}
\unexpanded\def\digitsnegative {\phys_digits_normalized{0}{\phys_digits_raised{\textminus}}}
\unexpanded\def\digitspositive {\phys_digits_normalized{0}{\phys_digits_raised{\textplus}}}
\unexpanded\def\digitsnegative {\phys_digits_normalized{0}{\mathematics{\negative}}}
\unexpanded\def\digitspositive {\phys_digits_normalized{0}{\mathematics{\positive}}}
-\unexpanded\def\digitsminus {\phys_digits_normalized{0}{\mathematics{-}}}
-\unexpanded\def\digitsplus {\phys_digits_normalized{0}{\mathematics{+}}}
+%unexpanded\def\digitsminus {\phys_digits_normalized{0}{\mathematics{-}}}
+%unexpanded\def\digitsplus {\phys_digits_normalized{0}{\mathematics{+}}}
+\unexpanded\def\digitsminus {\phys_digits_normalized{0}{\mathminus}}
+\unexpanded\def\digitsplus {\phys_digits_normalized{0}{\mathplus }}
\unexpanded\def\digitsspace {\hphantom{0}}
\unexpanded\def\digitsseparatorspace{\hphantom{.}}
\unexpanded\def\digitssignspace {\hphantom{\digitsminus}}
@@ -370,6 +374,9 @@
%\c!space=..., % (maybe) small medium big
]
+\definehigh[unitshigh][\c!style=\txx]
+\definelow [unitslow] [\c!style=\txx]
+
\let\setupunits\setupunit
\newconstant \c_phys_units_mode % 0=text 1=math 2=textinmath 3=mathintext
@@ -615,22 +622,22 @@
\def\unitsraise
{\ifcase\c_phys_units_mode
- \expandafter\high
+ \expandafter\unitshigh
\or
\expandafter\normalsuperscript
\or
- \expandafter\high
+ \expandafter\unitshigh
\or
\expandafter\normalsuperscript
\fi}
\def\unitslower
{\ifcase\c_phys_units_mode
- \expandafter\low
+ \expandafter\unitslow
\or
\expandafter\normalsubscript
\or
- \expandafter\low
+ \expandafter\unitslow
\or
\expandafter\normalsubscript
\fi}