summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/math-frc.mkiv
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-01 15:15:08 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-01 15:15:08 +0100
commit2a958dcf22dd71ba1e4408648676d44c16d7e3bf (patch)
tree8a118b195ac47f9e926bb5083f3d0f91c352d281 /tex/context/base/mkiv/math-frc.mkiv
parent48c3ce21b30a886099e9afc2edf683e8a47ba29e (diff)
downloadcontext-2a958dcf22dd71ba1e4408648676d44c16d7e3bf.tar.gz
2016-03-01 14:06:00
Diffstat (limited to 'tex/context/base/mkiv/math-frc.mkiv')
-rw-r--r--tex/context/base/mkiv/math-frc.mkiv22
1 files changed, 19 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/math-frc.mkiv b/tex/context/base/mkiv/math-frc.mkiv
index 785e8ea8e..16ea6e9e1 100644
--- a/tex/context/base/mkiv/math-frc.mkiv
+++ b/tex/context/base/mkiv/math-frc.mkiv
@@ -393,9 +393,6 @@
% $$ {{a}\abovewithdelims()#1pt{b}} $$
% }
-% \unexpanded\def\dfrac #1#2{{\displaystyle {{#1}\normalover {#2}}}}
-% \unexpanded\def\tfrac #1#2{{\textstyle {{#1}\normalover {#2}}}}
-
\definemathfraction[i:frac] [\c!alternative=\v!inner,\c!mathstyle=] % was script and then small but nothing needed
\definemathfraction[i:tfrac][\c!alternative=\v!inner,\c!mathstyle=\s!text] % was script (before luatex fix)
\definemathfraction[i:sfrac][\c!alternative=\v!inner,\c!mathstyle=\s!scriptscript]
@@ -427,6 +424,25 @@
\unexpanded\def\sfrac{\csname\inlineordisplaymath id:sfrac\endcsname}
\unexpanded\def\dfrac{\csname\inlineordisplaymath id:dfrac\endcsname}
+\definemathfraction[ams] [\c!strut=\v!no,\c!alternative=\v!outer]
+\definemathfraction[i:ams:frac][ams][\c!mathstyle={\s!cramped,\s!text}]
+\definemathfraction[d:ams:frac][ams][\c!mathstyle={\s!cramped,\s!display}]
+
+\unexpanded\def\ctxfrac{\csname\inlineordisplaymath id:frac\endcsname}
+\unexpanded\def\amsfrac{\csname\inlineordisplaymath id:ams:frac\endcsname}
+
+% \appendtoks
+% \doifelse{\mathfractionparameter\c!option}{ams}%
+% {\let\frac\amsfrac}%
+% {\let\frac\ctxfrac}%
+% \to \everysetupmathfraction
+
+\appendtoks
+ \doifelse{\mathematicsparameter\c!fractions}{ams}%
+ {\let\frac\amsfrac}%
+ {\let\frac\ctxfrac}%
+\to \everysetupmathematics
+
% \definemathfraction[ddfrac][\c!mathstyle=\s!display]
% \definemathfraction[ttfrac][\c!mathstyle=\s!text]
% \definemathfraction[ssfrac][\c!mathstyle=\s!script]