diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
commit | d7ccb42582f85acf30568913610ccf4d602023fb (patch) | |
tree | 7292e3545a420676878e7451b68892d360c62cb6 /Master/texmf-dist/tex/context/base/supp-mat.mkiv | |
parent | 2d62a6fe9b80def59c392268022f1f9a2d6e358f (diff) |
commit context 2011.05.18
git-svn-id: svn://tug.org/texlive/trunk@22719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/supp-mat.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/supp-mat.mkiv | 150 |
1 files changed, 85 insertions, 65 deletions
diff --git a/Master/texmf-dist/tex/context/base/supp-mat.mkiv b/Master/texmf-dist/tex/context/base/supp-mat.mkiv index 4aebddda91d..e441cbc2824 100644 --- a/Master/texmf-dist/tex/context/base/supp-mat.mkiv +++ b/Master/texmf-dist/tex/context/base/supp-mat.mkiv @@ -46,9 +46,26 @@ %D %D Which is implemented as: -\long\def\mathematics#1{\relax \ifmmode#1\else\Ustartmath #1\Ustopmath \fi} -\long\def\displaymath#1{\noindent \ifmmode#1\else\Ustartdisplaymath#1\Ustopdisplaymath\fi} -\long\def\inlinemath #1{\dontleavehmode\ifmmode#1\else\Ustartmath #1\Ustopmath \fi} +\let\normalsuperscript \Usuperscript +\let\normalsubscript \Usubscript +\let\normalstartimath \Ustartmath +\let\normalstopimath \Ustopmath +\let\normalstartdmath \Ustartdisplaymath +\let\normalstopdmath \Ustopmath +\def\normalmathaligntab{&} % \let\normalmathaligntab\aligntab does to work well in a let to & (a def works ok) + +\let\normalsuper \Usuperscript % obsolete +\let\normalsuber \Usubscript % obsolete +\let\startimath \Ustartmath % obsolete, less safe +\let\stopimath \Ustopmath % obsolete, less safe +\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} + +\let\m\mathematics % unexpanded? \let\stopmathmode\relax @@ -56,14 +73,14 @@ {\relax\ifmmode \let\stopmathmode\relax \else - \Ustartmath\let\stopmathmode\Ustopmath + \normalstartimath\let\stopmathmode\normalstopimath \fi} \unexpanded\def\startmathmode % nested variant {\relax\ifmmode \begingroup\let\stopmathmode\endgroup \else - \Ustartmath\let\stopmathmode\Ustopmath + \normalstartimath\let\stopmathmode\normalstopimath \fi} \def\nomathematics#1% @@ -127,67 +144,58 @@ \unexpanded\def\nodimension#1% {\unskip#1\global\let\dodimensionsignal\relax} -%D \macros -%D {super, suber} -%D -%D \TEX\ uses \type{^} and \type{_} for entering super- and -%D subscript mode. We want however a bit more control than -%D normally provided, and therefore provide \type {\super} -%D and \type{\suber} (\type {\sub} is already taken). - -\global\let\normalsuper=^ -\global\let\normalsuber=_ - -\newcount\supersubmode - -\newevery\everysupersub \EverySuperSub - -\appendtoks \advance\supersubmode 1\relax \to \everysupersub - -% \def\dodosuper#1{\normalsuper{\the\everysupersub#1}} -% \def\dodosuber#1{\normalsuber{\the\everysupersub#1}} +% %D \macros +% %D {super, suber} +% %D +% %D \TEX\ uses \type{^} and \type{_} for entering super- and +% %D subscript mode. We want however a bit more control than +% %D normally provided, and therefore provide \type {\super} +% %D and \type{\suber} (\type {\sub} is already taken). % -% \def\dosuper{\ifx\next\bgroup\expandafter\dodosuper\else\normalsuper\fi} -% \def\dosuber{\ifx\next\bgroup\expandafter\dodosuber\else\normalsuber\fi} +% \global\let\normalsuper=\normalsuperscript % will become obsolete +% \global\let\normalsuber=\normalsubscript % will become obsolete % -% \def\super{\futurelet\next\dosuper} -% \def\suber{\futurelet\next\dosuber} - -\def\super#1{\normalsuper{\the\everysupersub#1}} -\def\suber#1{\normalsuber{\the\everysupersub#1}} - -%D \macros -%D {enablesupsub} -%D -%D We can let \type {^} and \type {_} act like \type {\super} -%D and \type {\suber} by saying \type {\enablesupsub}. - -\bgroup -\catcode`\^=\@@active -\catcode`\_=\@@active -\gdef\enablesupsub - {\catcode`\^=\@@active - \def^{\ifmmode\expandafter\super\else\expandafter\normalsuper\fi}% - \catcode`\_=\@@active - \def_{\ifmmode\expandafter\suber\else\expandafter\normalsuber\fi}} -\egroup - -%D \macros -%D {restoremathstyle} -%D -%D We can pick up the current math style by calling \type -%D {\restoremathstyle}. - -\def\restoremathstyle - {\ifmmode - \ifcase\supsubmode - \textstyle - \or - \scriptstyle - \else - \scriptscriptstyle - \fi - \fi} +% \newcount\supersubmode +% +% \newevery\everysupersub \EverySuperSub +% +% \appendtoks \advance\supersubmode\plusone \to \everysupersub +% +% \def\super#1{\normalsuperscript{\the\everysupersub#1}} +% \def\suber#1{\normalsubscript {\the\everysupersub#1}} +% +% %D \macros +% %D {enablesupsub} +% %D +% %D We can let \type {^} and \type {_} act like \type {\super} +% %D and \type {\suber} by saying \type {\enablesupsub}. +% +% \bgroup +% \catcode\circumflexasciicode\activecatcode +% \catcode\underscoreasciicode\activecatcode +% \gdef\enablesupsub +% {\catcode\circumflexasciicode\activecatcode +% \catcode\underscoreasciicode\activecatcode +% \def^{\ifmmode\expandafter\super\else\expandafter\normalsuper\fi}% +% \def_{\ifmmode\expandafter\suber\else\expandafter\normalsuber\fi}} +% \egroup +% +% %D \macros +% %D {restoremathstyle} +% %D +% %D We can pick up the current math style by calling \type +% %D {\restoremathstyle}. +% +% \def\restoremathstyle +% {\ifmmode +% \ifcase\supsubmode +% \textstyle +% \or +% \scriptstyle +% \else +% \scriptscriptstyle +% \fi +% \fi} %D \macros %D {cramped} @@ -236,7 +244,7 @@ {\begingroup % added HH, made even more cramped \setbox\scratchbox\hbox {\nulldelimiterspace\zeropoint - \Ustartmath\mathsurround\zeropoint#1\radical\zerocount{#2}\Ustopmath}% + \normalstartimath\mathsurround\zeropoint#1\radical\zerocount{#2}\normalstopimath}% \ht\scratchbox-\dimexpr \ifx#1\displaystyle \fontdimen8\textfont3 @@ -290,4 +298,16 @@ \def\crampedrlap{\mathpalette\docrampedrlap} \def\crampedclap{\mathpalette\docrampedclap} +% experiment, not yet to be used + +% \def\displaybreak +% {\ifhmode +% \removeunwantedspaces +% \ifcase\raggedstatus\hfill\fi +% \strut\penalty-9999 % \break fails on case (3) +% \fi} +% +% \def\startdisplay{\displaybreak\ignorespaces\startpacked} +% \def\stopdisplay {\stoppacked\displaybreak\ignorespaces} + \protect \endinput |