diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/supp-mat.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/supp-mat.tex | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/supp-mat.tex b/Master/texmf-dist/tex/context/base/supp-mat.tex index 15ae7fdd8d0..5b2305f8b5f 100644 --- a/Master/texmf-dist/tex/context/base/supp-mat.tex +++ b/Master/texmf-dist/tex/context/base/supp-mat.tex @@ -45,21 +45,41 @@ %D %D Which is implemented as: -\def\mathematics#1{\relax\ifmmode#1\else$#1$\fi} % lookahead bug reported by brooks +\long\def\mathematics#1{\relax\ifmmode#1\else $#1$\fi} % lookahead bug reported by brooks +\long\def\displaymath#1{\relax\ifmmode#1\else$$#1$$\fi} +\long\def\inlinemath #1{\relax\ifmmode#1\else $#1$\fi} -\def\startmathmode - {\ifmmode +\let\stopmathmode\relax + +\def\startmathmode % cannot be used nested + {\relax\ifmmode \let\stopmathmode\relax \else $\def\stopmathmode{$}% \let\stopmathmode=$ \fi} +\def\startmathmode % nested variant + {\relax\ifmmode + \begingroup\let\stopmathmode\endgroup + \else + $\let\stopmathmode$% + \fi} + \def\nomathematics#1% - {\ifmmode\hbox{#1}\else#1\fi} + {\relax\ifmmode\hbox{#1}\else#1\fi} \let\math\mathematics %D \macros +%D {displaymathematics,inlinemathematics,automathematics} +%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} + \let\inlinemathematics \mathematics + \def\automathematics {\relax\ifhmode\@EA\inlinemathematics\else\@EA\displaymathematics\fi} + +%D \macros %D {dimension, nodimension} %D %D The next few macros are used for typesetting dimensions in |