From 343fdd99ef79884fca1f86b49c950e03939aeedf Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 4 Nov 2020 10:09:33 +0100 Subject: 2020-11-04 09:31:00 --- tex/context/base/mkiv/math-ini.mkxl | 40 ++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to 'tex/context/base/mkiv/math-ini.mkxl') diff --git a/tex/context/base/mkiv/math-ini.mkxl b/tex/context/base/mkiv/math-ini.mkxl index 6e6018896..d6d9ff4f0 100644 --- a/tex/context/base/mkiv/math-ini.mkxl +++ b/tex/context/base/mkiv/math-ini.mkxl @@ -244,8 +244,14 @@ % Now we redefine \type {\mathematics} and \type {\m}: -\permanent\protected\def\mathematics - {\doifelsenextoptionalcs\math_m_yes\math_m_nop} +\pushoverloadmode + + \permanent\protected\def\mathematics{\doifelsenextoptionalcs\math_m_yes\math_m_nop} + + \aliased\let\m \mathematics % we keep the simple versions + \aliased\let\math\mathematics % we keep the simple versions + +\popoverloadmode \def\math_m_yes {\relax @@ -307,9 +313,6 @@ \normalstopimath \fi} -\let\m \mathematics -\let\math\mathematics - % e.g.: \definemathematics[i:mp][setups=i:tight,openup=yes] \newmuskip\defaultthickmuskip \defaultthickmuskip 5mu plus 5mu @@ -1971,6 +1974,33 @@ {#1\scriptstyle {#2}}% {#1\scriptscriptstyle{#2}}} +%D \macros +%D {cramedllap, crampedrlap, crampedclap} +%D +%D In many cases, one wants to use the \tex {clap} macro in math mode while using +%D subscripts. Normally, subscripts are in cramped mode, and these macros allow you +%D to go to cramped mode. For example: +%D +%D \startbuffer +%D \startformula +%D \sum_{a^2 < b^2 < c^2} \quad +%D \sum_{\clap{a^2 < b^2 < c^2}} \quad +%D \sum_{\crampedclap{a^2 < b^2 < c^2}} +%D \stopformula +%D \stopbuffer +%D +%D \start +%D \typebuffer +%D \switchtobodyfont[24pt] +%D \getbuffer +%D \stop +%D +%D This used to be in \type {supp-math.mkxl}: + +\permanent\protected\def\crampedllap#1{\llap{\cramped#1}} +\permanent\protected\def\crampedrlap#1{\rlap{\cramped#1}} +\permanent\protected\def\crampedclap#1{\clap{\cramped#1}} + %D Often we can use: %D %D \startbuffer -- cgit v1.2.3