diff options
author | Marius <mariausol@gmail.com> | 2013-07-20 01:00:27 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-07-20 01:00:27 +0300 |
commit | f84436e136d80a0879ac27938f60f766666dff54 (patch) | |
tree | 8c88bd59387801dfd2cc8bce60b37f68b78e1795 /tex/context/base/math-stc.mkvi | |
parent | d4bda894a14d18540c25954ba6ab69bab062ab63 (diff) | |
download | context-f84436e136d80a0879ac27938f60f766666dff54.tar.gz |
beta 2013.07.19 23:54
Diffstat (limited to 'tex/context/base/math-stc.mkvi')
-rw-r--r-- | tex/context/base/math-stc.mkvi | 62 |
1 files changed, 46 insertions, 16 deletions
diff --git a/tex/context/base/math-stc.mkvi b/tex/context/base/math-stc.mkvi index f0f585c15..a8a215a07 100644 --- a/tex/context/base/math-stc.mkvi +++ b/tex/context/base/math-stc.mkvi @@ -60,11 +60,16 @@ {\hbox to \scratchwidth{\csname\??mathextensiblefallbacks\ifcsname\??mathextensiblefallbacks\number\scratchunicode\endcsname\number\scratchunicode\fi\endcsname}} %{\csname\??mathextensiblefallbacks\ifcsname\??mathextensiblefallbacks\number\scratchunicode\endcsname\number\scratchunicode\fi\endcsname } +% \def\math_stackers_regular +% {\mathstylehbox{\Umathaccent\fam\zerocount\scratchunicode{\hskip\scratchwidth}}} + \def\math_stackers_regular - {\mathstylehbox{\Umathaccent\fam\zerocount\scratchunicode{\hskip\scratchwidth}}} + {\mathstylehbox{\usemathstackerscolorparameter\c!color + \Umathaccent\fam\zerocount\scratchunicode{\hskip\scratchwidth}}} \def\math_stackers_stretch % we don't have that one yet - {\mathstylehbox{\Umathaccent\fam\zerocount\scratchunicode{\hskip\hsize}}} + {\mathstylehbox{\usemathstackerscolorparameter\c!color + \Umathaccent\fam\zerocount\scratchunicode{\hskip\hsize}}} \setvalue{\??mathextensiblefallbacks}{\hbox{\vrule\!!width\scratchwidth\!!height.1\exheight\!!depth\zeropoint}} @@ -114,6 +119,8 @@ [%c!alternative=\v!text, % text | mathematics \c!left=, \c!right=, + \c!alternative=\v!normal, + \c!mp=math:stacker:\number\scratchunicode, \c!voffset=.25\exheight, \c!hoffset=.5\emwidth, \c!minheight=\exheight, @@ -121,7 +128,7 @@ \c!minwidth=\emwidth, \c!order=\v!normal, \c!strut=, - %\c!color=, % todo: when I need it + \c!color=, % todo: when I need it \c!topcommand=, \c!middlecommand=, \c!bottomcommand=, @@ -132,6 +139,7 @@ %D top of the baseline by default. \installcorenamespace {mathstackerslocation} +\installcorenamespace {mathstackersalternative} \letvalue{\??mathstackerslocation\v!top }\plusone % on top of baseline \letvalue{\??mathstackerslocation\v!high }\plustwo % 25 % down @@ -172,6 +180,24 @@ \math_stackers_fallback \fi} +% no checking, we assume sane use + +\letvalue{\??mathstackersalternative\v!normal }\math_stackers_content +\letvalue{\??mathstackersalternative\v!default}\math_stackers_content + +\setvalue{\??mathstackersalternative\v!mp}% + {\hbox\bgroup % todo: add code key + tag + \scratchoffset\mathstackersparameter\c!offset + \edef\overlaywidth {\the\scratchwidth}% + \edef\overlayheight {\the\dimexpr\mathstackersparameter\c!height}% + \edef\overlaydepth {\the\dimexpr\mathstackersparameter\c!depth}% + \edef\overlayoffset {\the\scratchoffset}% + \edef\overlaylinewidth{\the\linewidth}% + \edef\overlaylinecolor{\mathstackersparameter\c!color}% + \edef\p_mp{\mathstackersparameter\c!mp}% + \uniqueMPgraphic{\p_mp}% + \egroup} + \def\math_stackers_check_unicode#codepoint% {\scratchunicode#codepoint\relax \scratchhoffset\mathstackersparameter\c!hoffset\relax @@ -224,10 +250,11 @@ \edef\currentmathstackers{#category}% \mathstackersparameter\c!left\relax \ifmmode\mathrel\else\dontleavehmode\fi - {\edef\p_offset {\mathstackersparameter\c!offset}% - \edef\p_location{\mathstackersparameter\c!location}% - \edef\p_order {\mathstackersparameter\c!order}% - \edef\p_strut {\mathstackersparameter\c!strut}% + {\edef\p_offset {\mathstackersparameter\c!offset}% + \edef\p_location {\mathstackersparameter\c!location}% + \edef\p_order {\mathstackersparameter\c!order}% + \edef\p_strut {\mathstackersparameter\c!strut}% + \edef\p_alternative{\mathstackersparameter\c!alternative}% \ifx\p_order\v!reverse \edef\m_math_stackers_text_top {#bottomtext}% \edef\m_math_stackers_text_bottom{#toptext}% @@ -285,7 +312,7 @@ \advance\scratchwidth2\scratchhoffset % \ifcase#method\relax - \setbox\scratchboxthree\math_stackers_content + \setbox\scratchboxthree\csname\??mathstackersalternative\p_alternative\endcsname \fi % \ifdim\wd\scratchboxone<\scratchwidth @@ -415,9 +442,10 @@ {\edef\currentmathstackers{#category}% \edef\m_math_stackers_text_middle {#text}% % - \edef\p_offset {\mathstackersparameter\c!offset}% - \edef\p_location{\mathstackersparameter\c!location}% - \edef\p_strut {\mathstackersparameter\c!strut}% + \edef\p_offset {\mathstackersparameter\c!offset}% + \edef\p_location {\mathstackersparameter\c!location}% + \edef\p_strut {\mathstackersparameter\c!strut}% + \edef\p_alternative{\mathstackersparameter\c!alternative}% % \scratchleftoffset \zeropoint \scratchrightoffset\zeropoint @@ -437,7 +465,7 @@ \fi \advance\scratchwidth2\scratchhoffset % - \setbox\scratchboxtwo \math_stackers_content + \setbox\scratchboxtwo \csname\??mathstackersalternative\p_alternative\endcsname \setbox\scratchboxthree\hbox to \scratchwidth{\hss\box\scratchboxthree\hss}% % \math_stackers_normalize_three @@ -457,7 +485,7 @@ \scratchunicode#codeextra\relax \ifcase\scratchunicode\else \kern-\scratchwidth - \setbox\scratchboxtwo\math_stackers_content + \setbox\scratchboxtwo\csname\??mathstackersalternative\p_alternative\endcsname \fi \ifcase#bottom\else \math_stackers_bottom\bgroup @@ -723,9 +751,11 @@ % stuff in the backend (okay, we still need to deal with some cut and paste % issues but at least we now know what we deal with. -\definemathunderextensible [vfenced] [underbar] ["203E] -\definemathoverextensible [vfenced] [overbar] ["203E] -\definemathdoubleextensible [vfenced] [doublebar] ["203E] ["203E] +% alternatively we can move the original to FE* + +\definemathunderextensible [vfenced] [underbar] ["FE33E] % ["203E] +\definemathoverextensible [vfenced] [overbar] ["FE33E] % ["203E] +\definemathdoubleextensible [vfenced] [doublebar] ["FE33E] ["FE33E] \definemathoverextensible [vfenced] [overbrace] ["FE3DE] % ["023DE] \definemathunderextensible [vfenced] [underbrace] ["FE3DF] % ["023DF] |