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.mkiv33
1 files changed, 25 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/context/base/phys-dim.mkiv b/Master/texmf-dist/tex/context/base/phys-dim.mkiv
index 84c3c7a2a05..4efaa65a8a9 100644
--- a/Master/texmf-dist/tex/context/base/phys-dim.mkiv
+++ b/Master/texmf-dist/tex/context/base/phys-dim.mkiv
@@ -216,10 +216,15 @@
\unexpanded\def\digitsperiodsymbol {\csname\??digitsperiod\number\c_phys_digits_method\endcsname}
\unexpanded\def\digitsseparatorspace {\csname\??digitsspace \number\c_phys_digits_method\endcsname}
-\unexpanded\def\digitsfinalcomma {\digitscommasymbol } % more for tracing
+% \unexpanded\def\digitsfinalcomma {\digitscommasymbol } % more for tracing
+% \unexpanded\def\digitsfinalperiod {\digitsperiodsymbol} % more for tracing
+% \unexpanded\def\digitsintermediatecomma {\digitscommasymbol } % more for tracing
+% \unexpanded\def\digitsintermediateperiod {\digitsperiodsymbol} % more for tracing
+
+\unexpanded\def\digitsfinalcomma {\digitsperiodsymbol} % more for tracing
\unexpanded\def\digitsfinalperiod {\digitsperiodsymbol} % more for tracing
\unexpanded\def\digitsintermediatecomma {\digitscommasymbol } % more for tracing
-\unexpanded\def\digitsintermediateperiod {\digitsperiodsymbol} % more for tracing
+\unexpanded\def\digitsintermediateperiod {\digitscommasymbol } % more for tracing
%D The user macro:
@@ -403,6 +408,10 @@
\newtoks \everyunits % we keep the old \units command so we need a longer one
\appendtoks
+ \disablemathpunctuation
+\to \everyunits
+
+\appendtoks
\setuevalue\currentunit{\phys_units_direct{\currentunit}}
\to \everydefineunit
@@ -539,6 +548,16 @@
\fi
\c_phys_units_state\plusfive}
+% This is a hack: for some reason \unit{micro meter} like patterns give
+% \unitsNstart\unitsNstop so there is a buglet in the parser
+
+\let\unitsNstartindeed\unitsNstart
+
+\unexpanded\def\unitsNstart
+ {\doifnextcharelse\unitsNstop\gobbleoneargument\unitsNstartindeed}
+
+% End of hack.
+
\unexpanded\def\unitsNspace
{\space}
@@ -639,12 +658,10 @@
\definelabelclass [prefix] [2]
\definelabelclass [suffix] [2] % This is only a label because we want to show them in a table.
-\ctxlua{
- languages.labels.define("setupprefixtext","prefixes")%
- languages.labels.define("setupunittext","units")%
- languages.labels.define("setupoperatortext","operators")%
- languages.labels.define("setupsuffixtext","suffixes")%
-}
+\ctxcommand{definelabels("prefix", "prefixes" )}
+\ctxcommand{definelabels("unit", "units" )}
+\ctxcommand{definelabels("operator","operators")}
+\ctxcommand{definelabels("suffix", "suffixes" )}
%D You can define additional units:
%D