summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-06-04 21:26:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-06-04 21:26:00 +0200
commit90bc1315bea87925450a730fa794e4bcefc680ab (patch)
treefd4adef64a41be0d014be2d329e306417d0bd27b
parent234346c192ce664937886d44ccca629a7093acf0 (diff)
downloadcontext-90bc1315bea87925450a730fa794e4bcefc680ab.tar.gz
beta 2013.06.04 21:26
-rw-r--r--tex/context/base/math-frc.mkiv47
-rw-r--r--tex/context/base/status-files.pdfbin24662 -> 24657 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin212084 -> 212101 bytes
3 files changed, 45 insertions, 2 deletions
diff --git a/tex/context/base/math-frc.mkiv b/tex/context/base/math-frc.mkiv
index e11e79e82..65fa30942 100644
--- a/tex/context/base/math-frc.mkiv
+++ b/tex/context/base/math-frc.mkiv
@@ -102,6 +102,7 @@
\setupmathfractions
[\c!mathstyle=,
\c!alternative=\v!inner,
+ \c!margin=\zeropoint,
\c!rulethickness=.25\exheight,
\c!left=0x2E,
\c!right=0x2E,
@@ -111,9 +112,12 @@
\setuevalue{\currentmathfraction}{\math_frac{\currentmathfraction}}%
\to \everydefinemathfraction
+\newdimen\d_math_fraction_margin
+
\unexpanded\def\math_frac#1%
{\begingroup
\edef\currentmathfraction{#1}%
+ \d_math_fraction_margin\mathfractionparameter\c!margin
\edef\p_math_fractions_color{\mathfractionparameter\c!color}%
\ifx\p_math_fractions_color\empty
\expandafter\math_frac_normal
@@ -139,19 +143,58 @@
\number\dimexpr\mathfractionparameter\c!rulethickness%
)}}
-\setvalue{\??mathfractionalternative\v!inner}#1#2%
+% Having a \withmarginornot{#1}{#2} makes not much sense nor do
+% 4 tests or 4 redundant kerns (longer node lists plus possible
+% interference). A split in normal and margin also makes testing
+% easier. When left and right margins are needed we might merge
+% the variants again. After all, these are not real installers.
+
+\setvalue{\??mathfractionalternative\v!inner}%
+ {\ifcase\d_math_fraction_margin
+ \expandafter\math_fraction_inner_normal
+ \else
+ \expandafter\math_fraction_inner_margin
+ \fi}
+
+\def\math_fraction_inner_normal#1#2%
{\Ustack{%
{\usemathstyleparameter\mathfractionparameter{#1}}% we should store this one
\math_frac_command
{\usemathstyleparameter\mathfractionparameter{#2}}% and reuse it here
}\endgroup}
-\setvalue{\??mathfractionalternative\v!outer}#1#2%
+\def\math_fraction_inner_margin#1#2%
+ {\Ustack{%
+ {\kern\d_math_fraction_margin
+ \usemathstyleparameter\mathfractionparameter{#1}% we should store this one
+ \kern\d_math_fraction_margin}%
+ \math_frac_command
+ {\kern\d_math_fraction_margin
+ \usemathstyleparameter\mathfractionparameter{#2}% and reuse it here
+ \kern\d_math_fraction_margin}%
+ }\endgroup}
+
+\setvalue{\??mathfractionalternative\v!outer}%
+ {\ifcase\d_math_fraction_margin
+ \expandafter\math_fraction_outer_normal
+ \else
+ \expandafter\math_fraction_outer_margin
+ \fi}
+
+\def\math_fraction_outer_normal#1#2%
{\Ustack{%
\usemathstyleparameter\mathfractionparameter
{{#1}\math_frac_command{#2}}%
}\endgroup}
+\def\math_fraction_outer_margin#1#2%
+ {\Ustack{%
+ \usemathstyleparameter\mathfractionparameter
+ {{\kern\d_math_fraction_margin#1\kern\d_math_fraction_margin}%
+ \math_frac_command
+ {\kern\d_math_fraction_margin#2\kern\d_math_fraction_margin}}%
+ }\endgroup}
+
\definemathfraction[frac][\c!mathstyle=]
\unexpanded\def\xfrac {\begingroup\let\xfrac\xxfrac\math_frac_alternative\scriptstyle}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 6f130e506..7d9361d3e 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index f45bf9b08..b1227609f 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ