summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/math-ini.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/math-ini.mkiv')
-rw-r--r--tex/context/base/mkiv/math-ini.mkiv30
1 files changed, 29 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/math-ini.mkiv b/tex/context/base/mkiv/math-ini.mkiv
index 90478771e..3b57c56da 100644
--- a/tex/context/base/mkiv/math-ini.mkiv
+++ b/tex/context/base/mkiv/math-ini.mkiv
@@ -118,6 +118,7 @@
\definesystemattribute[mathcategory] [public]
\definesystemattribute[mathmode] [public]
\definesystemattribute[mathitalics] [public]
+\definesystemattribute[mathkernpairs] [public]
\definesystemattribute[mathbidi] [public]
\definesystemattribute[mathdomain] [public]
@@ -237,7 +238,9 @@
\def\math_m_yes_text[#1]%
{\begingroup
- \edef\currentmathematics{#1}% check for valid
+ \doifassignmentelse{#1}%
+ {\setupcurrentmathematics[#1]}%
+ {\edef\currentmathematics{#1}}% check for valid
\edef\p_openup{\mathematicsparameter\c!openup}%
\ifx\p_openup\v!yes
\expandafter\math_m_yes_text_openedup
@@ -1357,6 +1360,31 @@
% \csname\??mathitalics\mathematicsparameter\s!italics\endcsname
% \to \everyswitchmathematics % only in mathematics
+%D Math kerns (experiment)
+
+\installcorenamespace{mathkernpairs}
+
+\setnewconstant\c_math_kernpairs_attribute\attributeunsetvalue % no real need for an extra constant
+
+\def\math_kernpairs_initialize
+ {\ifnum\c_math_kernpairs_attribute=\attributeunsetvalue \else
+ \clf_initializemathkernpairs % one time
+ \global\let\math_kernpairs_initialize\relax
+ \fi}
+
+\appendtoks
+ \edef\p_kernpairs{\mathematicsparameter\s!kernpairs}%
+ \c_math_kernpairs_attribute\ifx\p_kernpairs\v!yes\plusone\else\attributeunsetvalue\fi\relax
+\to \everyswitchmathematics % only in mathematics
+
+\appendtoks
+ \math_kernpairs_initialize
+ \attribute\mathkernpairsattribute\c_math_kernpairs_attribute
+\to \everymathematics
+
+\setupmathematics
+ [\s!kernpairs=\v!no]
+
%D \macros
%D {enablemathpunctuation,disablemathpunctuation}
%D