summaryrefslogtreecommitdiff
path: root/tex/context/base/math-def.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-04-09 11:49:00 +0200
committerHans Hagen <pragma@wxs.nl>2010-04-09 11:49:00 +0200
commita5d3707be9e544069a94b3c8d7b51c7b31e506e5 (patch)
tree61a4efc87be96d39acbefd9f24774a31739dbd74 /tex/context/base/math-def.mkiv
parentc63da592cc7ecde38ec1749525c072e79adebdcf (diff)
downloadcontext-a5d3707be9e544069a94b3c8d7b51c7b31e506e5.tar.gz
beta 2010.04.09 11:49
Diffstat (limited to 'tex/context/base/math-def.mkiv')
-rw-r--r--tex/context/base/math-def.mkiv45
1 files changed, 36 insertions, 9 deletions
diff --git a/tex/context/base/math-def.mkiv b/tex/context/base/math-def.mkiv
index 923ac5a71..604e2d8d2 100644
--- a/tex/context/base/math-def.mkiv
+++ b/tex/context/base/math-def.mkiv
@@ -106,15 +106,42 @@
% using attributes
-\def\choosemathbig#1#2%
- {\attribute\mathsizeattribute#1\relax
- \left#2\right.%
- \attribute\mathsizeattribute\attributeunsetvalue}
-
-\definemathcommand [big] {\choosemathbig\plusone }
-\definemathcommand [Big] {\choosemathbig\plustwo }
-\definemathcommand [bigg] {\choosemathbig\plusthree}
-\definemathcommand [Bigg] {\choosemathbig\plusfour }
+\chardef\bigmathdelimitermethod\plusone
+
+\def\plainbigdelimiters % traditional method
+ {\chardef\bigmathdelimitermethod\plustwo}
+
+\def\doplainbigmath#1#2%
+ {{\hbox{$%
+ \nulldelimiterspace\zeropoint\relax
+ \mathsurround\zeropoint
+ $}}}
+
+\def\doleftbigmath #1{\ifx#1\relax\else\left#1\expandafter\doleftbigmath \fi}
+\def\dorightbigmath#1{\ifx#1\relax\else\right.\expandafter\dorightbigmath\fi}
+
+\def\choosemathbig#1#2% so we accent \big{||} as well
+ {{\hbox{$%
+ \ifcase\bigmathdelimitermethod
+ \doleftbigmath#2\relax
+ \dorightbigmath#2\relax
+ \or
+ \attribute\mathsizeattribute#1\relax
+ \doleftbigmath#2\relax
+ \dorightbigmath#2\relax
+ \else
+ \doleftbigmath#2\relax
+ \vbox\!!to\getvalue{\??mm:b:\number#1}\bodyfontsize{}%
+ \dorightbigmath#2\relax
+ \fi
+ \nulldelimiterspace\zeropoint\relax
+ \mathsurround\zeropoint
+ $}}}
+
+\definemathcommand [big] {\choosemathbig\plusone } \setvalue{\??mm:b:1}{0.85}
+\definemathcommand [Big] {\choosemathbig\plustwo } \setvalue{\??mm:b:2}{1.15}
+\definemathcommand [bigg] {\choosemathbig\plusthree} \setvalue{\??mm:b:3}{1.45}
+\definemathcommand [Bigg] {\choosemathbig\plusfour } \setvalue{\??mm:b:4}{1.75}
\definemathcommand [bigl] [open] [one] {\big}
\definemathcommand [bigm] [rel] [one] {\big}