diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx b/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx index 2201ed88635..5c0db0d1890 100644 --- a/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx +++ b/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx @@ -90,7 +90,8 @@ \c!alignsymbol=\v!yes, %\c!stretch=\v!no, %\c!shrink=\v!no, - \c!define=\v!yes] % not used + \c!define=\v!yes, % not used + \c!snap=\mathematicsparameter\c!snap] \definemathaccent [\v!both] @@ -117,23 +118,23 @@ \permanent\tolerant\protected\def\definemathtopaccent[#1]#*[#2]#*[#3]% class name top {\ifparameter#3\or - \frozen\protected\instance\edefcsname#2\endcsname{\math_accent_make_double {#1}\plusone{\number#3}\zerocount}% + \frozen\protected\instance\edefcsname#2\endcsname{\math_accent_make_double {#1}{#2}\plusone{\number#3}\zerocount}% \else - \frozen\protected\instance\edefcsname#1\endcsname{\math_accent_make_double\noexpand\currentmathaccent\plusone{\number#2}\zerocount}% + \frozen\protected\instance\edefcsname#1\endcsname{\math_accent_make_double\noexpand\currentmathaccent{#1}\plusone{\number#2}\zerocount}% \fi} \permanent\tolerant\protected\def\definemathbottomaccent[#1]#*[#2]#*[#3]% class name bottom {\ifparameter#3\or - \frozen\protected\instance\edefcsname#2\endcsname{\math_accent_make_double {#1}\plustwo\zerocount{\number#3}}% + \frozen\protected\instance\edefcsname#2\endcsname{\math_accent_make_double {#1}{#2}\plustwo\zerocount{\number#3}}% \else - \frozen\protected\instance\edefcsname#1\endcsname{\math_accent_make_double\noexpand\currentmathaccent\plustwo\zerocount{\number#2}}% + \frozen\protected\instance\edefcsname#1\endcsname{\math_accent_make_double\noexpand\currentmathaccent{#1}\plustwo\zerocount{\number#2}}% \fi} \permanent\tolerant\protected\def\definemathdoubleaccent[#1]#*[#2]#*[#3]#*[#4]% class name top bottom {\ifparameter#4\or - \frozen\protected\instance\edefcsname#2\endcsname{\math_accent_make_double {#1}\plusthree{\number#3}{\number#4}}% + \frozen\protected\instance\edefcsname#2\endcsname{\math_accent_make_double {#1}{#2}\plusthree{\number#3}{\number#4}}% \else - \frozen\protected\instance\edefcsname#1\endcsname{\math_accent_make_double\noexpand\currentmathaccent\plusthree{\number#2}{\number#3}}% + \frozen\protected\instance\edefcsname#1\endcsname{\math_accent_make_double\noexpand\currentmathaccent{#1}\plusthree{\number#2}{\number#3}}% \fi} \installlocalcurrenthandler \??mathaccents {mathaccent} @@ -147,7 +148,7 @@ %D } %D \stoptyping -\tolerant\protected\def\math_accent_make_double#class#kind#top#bottom#*[#settings]#:#content% +\tolerant\protected\def\math_accent_make_double#class#name#kind#top#bottom#*[#settings]#:#content% {\beginmathgroup \setlocalmathaccentcurrent{#class}% \edef\currentmathaccent{#class}% \startusemathstyleparameter\mathaccentparameter\c!mathstyle @@ -160,18 +161,23 @@ \else \let\m_fixed\s!fixed \fi + \math_tags_mfunctionlab\plustwo{#name}{\ifcase#kind\or\v!top\or\v!bottom\else\v!both\fi}% \Umathaccent \usedcolorparameterattributes{\mathaccentparameter\c!color}% % nooverflow % there is never na overflow anyway but we do accept the key \ifcstok{\mathaccentparameter\c!align }\v!middle\s!center \space\fi \ifcstok{\mathaccentparameter\c!stretch}\v!yes \s!stretch\space\fi \ifcstok{\mathaccentparameter\c!shrink }\v!yes \s!shrink \space\fi + \ifcstok{\mathaccentparameter\c!snap }\v!yes \s!single \space\fi \ifx\p_scale\v!keep \s!keepbase\space \fi \ifcstok{\mathaccentparameter\c!alignsymbol}\v!yes \s!nooverflow\space \fi + \ifcstok{\mathaccentparameter\c!offset}\v!auto + \s!base\space + \fi \ifcase#kind\or \s!top\space \m_fixed @@ -192,7 +198,7 @@ %D Relative new: -% \newconditional\c_math_accent_auto_dotless \settrue\c_math_accent_auto_dotless % cf opentype math +% \newconditional\c_math_accent_auto_dotless \c_math_accent_auto_dotless\conditionaltrue % cf opentype math % \aliased\let\normalgrave\grave % \aliased\let\normalddot \ddot @@ -275,6 +281,11 @@ [\v!both] [\c!scale=\v!keep,\c!stretch=\v!yes,\c!shrink=\v!yes] +\definemathaccent + [\v!top:\v!dot] + [\v!top:\v!stretch] + [i=] + %D We have a problem. We can use stackers but then we need to adapt the dimensions %D which is font dependent. So, for now we keep them as accents. @@ -306,8 +317,35 @@ \definemathbottomaccent[\v!bottom:\v!stretch][wideunderleftarrow] ["20EE] \definemathbottomaccent[\v!bottom:\v!stretch][wideunderrightarrow] ["20EF] +% For complex conjugate: i below keeps the dot +% +% \im { \widebar {\cos\theta + \ii \sin\theta} = \cos\theta - \ii\sin\theta }\par +% \im { \conjugate{\cos\theta + \ii \sin\theta} = \cos\theta - \ii\sin\theta } + +\definemathtopaccent[\v!top:\v!dot][conjugate]["0305] +\definemathtopaccent[\v!top:\v!dot][closure] ["0305] +\definemathtopaccent[\v!top:\v!dot][conjugate]["0305] + \aliased\let\mathring\ring % for a while +% \permanent\protected\def\not#1{\Umathaccent class \mathordinarycode exact overlay 0 0 "338 {#1}} +% \permanent\protected\def\not#1{\Umathaccent class \mathrelationcode exact overlay 0 0 "338 {#1}} +% \permanent\protected\def\not#1{\Umathaccent class \mathbinarycode exact overlay 0 0 "338 {#1}} +% +% \definemathcommand[slashD][ordinary]{\Umathaccent class \mathordinarycode exact overlay 0 0 "338 {D}} +% \definemathcommand[slashD][ordinary]{\Umathaccent class \mathordinarycode center overlay 0 0 "338 {D}} + +\permanent\tolerant\protected\def\slashed[#1]#:#2% + {\Umathaccent + \s!class \mathcodechecked{#1}% + \s!center \space + \s!overlay\space + \zerocount \zerocount \forwardslashasciicode + {#2}} % exact when = + +% \definemathcommand[slashD]{\slashed[ordinary]{D}} +% \definemathcommand[slashD]{\slashed{D}} + \popoverloadmode \protect \endinput |