diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/supp-mat.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/supp-mat.mkiv | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/context/base/supp-mat.mkiv b/Master/texmf-dist/tex/context/base/supp-mat.mkiv index e441cbc2824..bc26611ae05 100644 --- a/Master/texmf-dist/tex/context/base/supp-mat.mkiv +++ b/Master/texmf-dist/tex/context/base/supp-mat.mkiv @@ -5,7 +5,7 @@ %D subtitle=Math, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for @@ -61,29 +61,32 @@ \let\startdmath \Ustartdisplaymath % obsolete, less safe \let\stopdmath \Ustopmath % obsolete, less safe -\long\def\mathematics#1{\relax \ifmmode#1\else\normalstartimath#1\normalstopimath\fi} -\long\def\displaymath#1{\noindent \ifmmode#1\else\normalstartdmath#1\normalstopdmath\fi} -\long\def\inlinemath #1{\dontleavehmode\ifmmode#1\else\normalstartimath#1\normalstopimath\fi} +\unexpanded\def\mathematics#1{\relax \ifmmode#1\else\normalstartimath#1\normalstopimath\fi} +\unexpanded\def\displaymath#1{\noindent \ifmmode#1\else\normalstartdmath#1\normalstopdmath\fi} +\unexpanded\def\inlinemath #1{\dontleavehmode\ifmmode#1\else\normalstartimath#1\normalstopimath\fi} +\unexpanded\def\textmath #1{\dontleavehmode\ifmmode#1\else\begingroup\everymath\emptytoks\normalstartimath#1\normalstopimath\endgroup\fi} % \mathsurround\zeropoint \let\m\mathematics % unexpanded? \let\stopmathmode\relax -\unexpanded\def\startmathmode % cannot be used nested - {\relax\ifmmode - \let\stopmathmode\relax - \else - \normalstartimath\let\stopmathmode\normalstopimath - \fi} +% \unexpanded\def\startmathmode % cannot be used nested +% {\relax\ifmmode +% \let\stopmathmode\relax +% \else +% \normalstartimath\let\stopmathmode\normalstopimath +% \fi} \unexpanded\def\startmathmode % nested variant {\relax\ifmmode - \begingroup\let\stopmathmode\endgroup + \begingroup + \let\stopmathmode\endgroup \else - \normalstartimath\let\stopmathmode\normalstopimath + \normalstartimath + \let\stopmathmode\normalstopimath \fi} -\def\nomathematics#1% +\unexpanded\def\nomathematics#1% {\relax\ifmmode\hbox{#1}\else#1\fi} \let\math\mathematics @@ -93,20 +96,20 @@ %D %D An example of usage of the following can be found in the MathML module: -\long\def\displaymathematics#1{\relax\ifmmode#1\else\dostartformula{}#1\dostopformula\fi} - \def\inlinemathematics {\dontleavehmode\mathematics} - \def\automathematics {\relax\ifhmode\@EA\inlinemathematics\else\@EA\displaymathematics\fi} +\unexpanded\def\displaymathematics#1{\relax\ifmmode#1\else\dostartformula{}#1\dostopformula\fi} +\unexpanded\def\inlinemathematics {\dontleavehmode\mathematics} +\unexpanded\def\automathematics {\relax\ifhmode\expandafter\inlinemathematics\else\expandafter\displaymathematics\fi} % better, esp when used in bTABLE ... eTABLE -\def\automathematics +\unexpanded\def\automathematics {\relax \ifhmode \expandafter\inlinemathematics \else\ifintable - \expandafter\expandafter\expandafter\inlinemathematics + \doubleexpandafter\inlinemathematics \else - \expandafter\expandafter\expandafter\displaymathematics + \doubleexpandafter\displaymathematics \fi\fi} %D \macros @@ -116,6 +119,8 @@ %D such a way that spacing is acceptable. I won't spend much %D words on these macros, because they will be overloaded in %D the units module. +%D +%D REPLACED (keep commented): \newsignal\dimensionsignal @@ -211,8 +216,8 @@ %D %D \typebuffer \getbuffer -\def\cramped - {\mathpalette\docramped} +\unexpanded\def\cramped + {\mathpalette\math_cramped} %D We force a cramped style by issuing a non||existing radical (box). %D After that we make sure the height is correct. (Comment taken from @@ -240,7 +245,7 @@ % \ht\scratchbox-\scratchdimen % \box\scratchbox} -\def\docramped#1#2% +\def\math_cramped#1#2% {\begingroup % added HH, made even more cramped \setbox\scratchbox\hbox {\nulldelimiterspace\zeropoint @@ -290,13 +295,13 @@ %D Notice that \type {\clap{\cramped ... }} would also work, %D but it requires \TEX\ to typeset it arguments 16 times. -\def\docrampedllap#1#2{{}\dollap{\docramped #1{#2}}} -\def\docrampedrlap#1#2{{}\dorlap{\docramped #1{#2}}} -\def\docrampedclap#1#2{{}\doclap{\docramped #1{#2}}} +\unexpanded\def\crampedllap{\mathpalette\math_cramped_llap} +\unexpanded\def\crampedrlap{\mathpalette\math_cramped_rlap} +\unexpanded\def\crampedclap{\mathpalette\math_cramped_clap} -\def\crampedllap{\mathpalette\docrampedllap} -\def\crampedrlap{\mathpalette\docrampedrlap} -\def\crampedclap{\mathpalette\docrampedclap} +\def\math_cramped_llap#1#2{{}\dollap{\math_cramped #1{#2}}} +\def\math_cramped_rlap#1#2{{}\dorlap{\math_cramped #1{#2}}} +\def\math_cramped_clap#1#2{{}\doclap{\math_cramped #1{#2}}} % experiment, not yet to be used |