summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-08-18 19:40:12 +0300
committerMarius <mariausol@gmail.com>2013-08-18 19:40:12 +0300
commitab908bb69c78b2eced91fb1153e2ca81d3e3cb2d (patch)
tree64138c0ade3dbd4d3ed62a17d6ac86a6706ae33b
parent58d0e80f6d6bca23135f7d475a68b6a75853015b (diff)
downloadcontext-ab908bb69c78b2eced91fb1153e2ca81d3e3cb2d.tar.gz
beta 2013.08.18 18:32
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4100 -> 4106 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/math-def.mkiv122
-rw-r--r--tex/context/base/math-fen.mkiv161
-rw-r--r--tex/context/base/status-files.pdfbin24748 -> 24781 bytes
-rw-r--r--tex/context/base/status-lua.log2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
8 files changed, 192 insertions, 99 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 462293d37..d5f2014e6 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2013.08.17 00:58}
+\newcontextversion{2013.08.18 18:32}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 3c4ee6179..2f1e7f2fb 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 184a9f356..abb5bc13e 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.08.17 00:58}
+\edef\contextversion{2013.08.18 18:32}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/math-def.mkiv b/tex/context/base/math-def.mkiv
index 1c7e9816c..4b881d705 100644
--- a/tex/context/base/math-def.mkiv
+++ b/tex/context/base/math-def.mkiv
@@ -88,80 +88,76 @@
\let\normalmatharg\arg % todo: maybe automatically
+% moved to fences
+%
% methods:
%
% 1: none
% 2: lua
% 3: tex
-
+%
% variants:
%
% 1: step 1
% 2: step 2
% 3: htdp * 1.33^n
% 4: size * 1.33^n
-
-\setnewconstant\bigmathdelimitermethod \plusone
-\setnewconstant\bigmathdelimitervariant\plusthree
-
-\unexpanded\def\plainbigdelimiters % traditional method
- {\bigmathdelimitermethod\plustwo}
-
-\plainbigdelimiters % is default for the moment but not so nice
-
-\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}
-
-\installcorenamespace{mathbig}
-
-\unexpanded\def\choosemathbig#1#2% so we accept \big{||} as well
- {{\hbox{$%
- \ifcase\bigmathdelimitermethod
- \doleftbigmath#2\relax
- \dorightbigmath#2\relax
- \or
- \attribute\mathsizeattribute\numexpr\bigmathdelimitervariant*\plushundred+#1\relax
- \doleftbigmath#2\relax
- \dorightbigmath#2\relax
- \else
- \doleftbigmath#2\relax
- \vbox to\getvalue{\??mathbig\number#1}\bodyfontsize{}%
- \dorightbigmath#2\relax
- \fi
- \nulldelimiterspace\zeropoint\relax
- \mathsurround\zeropoint
- $}}}
-
-\unexpanded\def\mathdelimiterstep#1#2%
- {\begingroup
- \attribute\mathsizeattribute\numexpr\plushundred+#1\relax
- \doleftbigmath#2\relax
- \dorightbigmath#2\relax
- \endgroup}
-
-\definemathcommand [big] {\choosemathbig\plusone } \setvalue{\??mathbig1}{0.85}
-\definemathcommand [Big] {\choosemathbig\plustwo } \setvalue{\??mathbig2}{1.15}
-\definemathcommand [bigg] {\choosemathbig\plusthree} \setvalue{\??mathbig3}{1.45}
-\definemathcommand [Bigg] {\choosemathbig\plusfour } \setvalue{\??mathbig4}{1.75}
-
-\definemathcommand [bigl] [open] [one] {\big}
-\definemathcommand [bigm] [rel] [one] {\big}
-\definemathcommand [bigr] [close] [one] {\big}
-\definemathcommand [Bigl] [open] [one] {\Big}
-\definemathcommand [Bigm] [rel] [one] {\Big}
-\definemathcommand [Bigr] [close] [one] {\Big}
-\definemathcommand [biggl] [open] [one] {\bigg}
-\definemathcommand [biggm] [rel] [one] {\bigg}
-\definemathcommand [biggr] [close] [one] {\bigg}
-\definemathcommand [Biggl] [open] [one] {\Bigg}
-\definemathcommand [Biggm] [rel] [one] {\Bigg}
-\definemathcommand [Biggr] [close] [one] {\Bigg}
+%
+% \setnewconstant\bigmathdelimitermethod \plusone
+% \setnewconstant\bigmathdelimitervariant\plusthree
+%
+% \unexpanded\def\plainbigdelimiters % traditional method
+% {\bigmathdelimitermethod\plustwo}
+%
+% \plainbigdelimiters % is default for the moment but not so nice
+%
+% \def\doleftbigmath #1{\ifx#1\relax\else\left#1\fi}
+% \def\dorightbigmath#1{\ifx#1\relax\else\right.\fi}
+%
+% \installcorenamespace{mathbig}
+%
+% \unexpanded\def\choosemathbig#1#2% so we accept \big{||} as well
+% {{\hbox{$%
+% \ifcase\bigmathdelimitermethod
+% \doleftbigmath#2\relax
+% \dorightbigmath#2\relax
+% \or
+% \attribute\mathsizeattribute\numexpr\bigmathdelimitervariant*\plushundred+#1\relax
+% \doleftbigmath#2\relax
+% \dorightbigmath#2\relax
+% \else
+% \doleftbigmath#2\relax
+% \vbox to\getvalue{\??mathbig\number#1}\bodyfontsize{}%
+% \dorightbigmath#2\relax
+% \fi
+% \nulldelimiterspace\zeropoint\relax
+% \mathsurround\zeropoint
+% $}}}
+%
+% \unexpanded\def\mathdelimiterstep#1#2%
+% {\begingroup
+% \attribute\mathsizeattribute\numexpr\plushundred+#1\relax
+% \doleftbigmath#2\relax
+% \dorightbigmath#2\relax
+% \endgroup}
+%
+% \definemathcommand [big] {\choosemathbig\plusone }
+% \definemathcommand [Big] {\choosemathbig\plustwo }
+% \definemathcommand [bigg] {\choosemathbig\plusthree}
+% \definemathcommand [Bigg] {\choosemathbig\plusfour }
+%
+% \definemathcommand [bigl] [open] [one] {\big}
+% \definemathcommand [bigm] [rel] [one] {\big}
+% \definemathcommand [bigr] [close] [one] {\big}
+% \definemathcommand [Bigl] [open] [one] {\Big}
+% \definemathcommand [Bigm] [rel] [one] {\Big}
+% \definemathcommand [Bigr] [close] [one] {\Big}
+% \definemathcommand [biggl] [open] [one] {\bigg}
+% \definemathcommand [biggm] [rel] [one] {\bigg}
+% \definemathcommand [biggr] [close] [one] {\bigg}
+% \definemathcommand [Biggl] [open] [one] {\Bigg}
+% \definemathcommand [Biggm] [rel] [one] {\Bigg}
+% \definemathcommand [Biggr] [close] [one] {\Bigg}
%D This needs checking:
diff --git a/tex/context/base/math-fen.mkiv b/tex/context/base/math-fen.mkiv
index 45f628862..9ad1a1ec1 100644
--- a/tex/context/base/math-fen.mkiv
+++ b/tex/context/base/math-fen.mkiv
@@ -72,6 +72,9 @@
\def\math_fenced_color_do_push{\pushcolor[\p_math_fenced_color]}
\let\math_fenced_color_do_pop \popcolor
+\let\math_fenced_color_push\donothing
+\let\math_fenced_color_pop \donothing
+
\let\fence \relax
\let\fenced\relax
@@ -147,51 +150,145 @@
\installcorenamespace{mathleft}
\installcorenamespace{mathright}
+\installcorenamespace{mathmiddle}
+
+\unexpanded\def\left {\afterassignment\math_left \let\nexttoken}
+\unexpanded\def\right {\afterassignment\math_right \let\nexttoken}
+\unexpanded\def\middle{\afterassignment\math_middle\let\nexttoken}
-\unexpanded\def\left {\afterassignment\math_left \let\next=}
-\unexpanded\def\right{\afterassignment\math_right\let\next=}
-
-% \def\math_left
-% {\csname\??mathleft
-% \ifcsname\??mathleft\meaning\next\endcsname
-% \meaning\next
-% \else
-% \s!unknown
-% \fi
-% \endcsname}
-
-% \def\math_right
-% {\csname\??mathright
-% \ifcsname\??mathright\meaning\next\endcsname
-% \meaning\next
-% \else
-% \s!unknown
-% \fi
-% \endcsname}
+\newconditional\c_math_fenced_done
+\newconditional\c_math_fenced_unknown \settrue\c_math_fenced_unknown
\def\math_left
- {\edef\m_math_left{\meaning\next}%
- \csname\??mathleft \ifcsname\??mathleft \m_math_left \endcsname\m_math_left \else\s!unknown\fi\endcsname}
+ {\settrue\c_math_fenced_done
+ \edef\m_math_left{\meaning\nexttoken}%
+ \csname\??mathleft\ifcsname\??mathleft\m_math_left\endcsname\m_math_left\else\s!unknown\fi\endcsname}
\def\math_right
- {\edef\m_math_right{\meaning\next}%
+ {\settrue\c_math_fenced_done
+ \edef\m_math_right{\meaning\nexttoken}%
\csname\??mathright\ifcsname\??mathright\m_math_right\endcsname\m_math_right\else\s!unknown\fi\endcsname}
-\setvalue{\??mathleft \s!unknown}{\normalleft \next}
-\setvalue{\??mathright\s!unknown}{\normalright\next}
+\def\math_middle
+ {\settrue\c_math_fenced_done
+ \edef\m_math_middle{\meaning\nexttoken}%
+ \csname\??mathmiddle\ifcsname\??mathmiddle\m_math_middle\endcsname\m_math_middle\else\s!unknown\fi\endcsname}
+
+\setvalue{\??mathleft \s!unknown}{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalleft \nexttoken\fi}
+\setvalue{\??mathright \s!unknown}{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalright \nexttoken\fi}
+\setvalue{\??mathmiddle\s!unknown}{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalmiddle\nexttoken\fi}
\bgroup
-\let\next[ \global\expandafter\let\csname\??mathleft\meaning\next\endcsname\Lbracket \let\next] \global\expandafter\let\csname\??mathright\meaning\next\endcsname\Rbracket
-\let\next( \global\expandafter\let\csname\??mathleft\meaning\next\endcsname\Lparent \let\next) \global\expandafter\let\csname\??mathright\meaning\next\endcsname\Rparent
-\let\next< \global\expandafter\let\csname\??mathleft\meaning\next\endcsname\Langle \let\next> \global\expandafter\let\csname\??mathright\meaning\next\endcsname\Rangle
-\let\next{ \global\expandafter\let\csname\??mathleft\meaning\next\endcsname\Lbrace \let\next} \global\expandafter\let\csname\??mathright\meaning\next\endcsname\Rbrace
-\let\next| \global\expandafter\let\csname\??mathleft\meaning\next\endcsname\Lbar \let\next| \global\expandafter\let\csname\??mathright\meaning\next\endcsname\Rbar
-\let\next‖ \global\expandafter\let\csname\??mathleft\meaning\next\endcsname\Ldoublebar \let\next‖ \global\expandafter\let\csname\??mathright\meaning\next\endcsname\Rdoublebar
-\let\next. \global\expandafter\let\csname\??mathleft\meaning\next\endcsname\Lnothing \let\next. \global\expandafter\let\csname\??mathright\meaning\next\endcsname\Rnothing
+ \let\temp [ \global\expandafter\let\csname\??mathleft\meaning\temp\endcsname\Lbracket
+ \let\temp ( \global\expandafter\let\csname\??mathleft\meaning\temp\endcsname\Lparent
+ \let\temp < \global\expandafter\let\csname\??mathleft\meaning\temp\endcsname\Langle
+ \let\temp { \global\expandafter\let\csname\??mathleft\meaning\temp\endcsname\Lbrace
+ \let\temp | \global\expandafter\let\csname\??mathleft\meaning\temp\endcsname\Lbar
+ \let\temp ‖ \global\expandafter\let\csname\??mathleft\meaning\temp\endcsname\Ldoublebar
+ \let\temp . \global\expandafter\let\csname\??mathleft\meaning\temp\endcsname\Lnothing
+
+ \let\temp ] \global\expandafter\let\csname\??mathright\meaning\temp\endcsname\Rbracket
+ \let\temp ) \global\expandafter\let\csname\??mathright\meaning\temp\endcsname\Rparent
+ \let\temp > \global\expandafter\let\csname\??mathright\meaning\temp\endcsname\Rangle
+ \let\temp } \global\expandafter\let\csname\??mathright\meaning\temp\endcsname\Rbrace
+ \let\temp | \global\expandafter\let\csname\??mathright\meaning\temp\endcsname\Rbar
+ \let\temp ‖ \global\expandafter\let\csname\??mathright\meaning\temp\endcsname\Rdoublebar
+ \let\temp . \global\expandafter\let\csname\??mathright\meaning\temp\endcsname\Rnothing
\egroup
+%D As we have overloaded \type {\left} and \type {\right} we also need a more
+%D clever version of the following:
+
+% methods:
+%
+% 1: none
+% 2: lua
+% 3: tex
+
+% variants:
+%
+% 1: step 1
+% 2: step 2
+% 3: htdp * 1.33^n
+% 4: size * 1.33^n
+
+\setnewconstant\bigmathdelimitermethod \plusone
+\setnewconstant\bigmathdelimitervariant\plusthree
+
+\unexpanded\def\plainbigdelimiters % traditional method
+ {\bigmathdelimitermethod\plustwo}
+
+\plainbigdelimiters % is default for the moment but not so nice
+
+% \setconstant\bigmathdelimitermethod\plusone
+
+\installcorenamespace{mathbig}
+
+\unexpanded\def\choosemathbig#1#2% so we accept \big{||} as well
+ {{\hbox\bgroup
+ \startimath
+ \ifcase\bigmathdelimitermethod
+ \math_fenced_step#2\relax
+ \or
+ \attribute\mathsizeattribute\numexpr\bigmathdelimitervariant*\plushundred+#1\relax
+ \math_fenced_step#2\relax
+ \else
+ \math_fenced_step#2{\vbox to\getvalue{\??mathbig\number#1}\bodyfontsize{}}%
+ \fi
+ \nulldelimiterspace\zeropoint\relax
+ \mathsurround\zeropoint
+ \stopimath
+ \egroup}}
+
+\def\math_fenced_step#1#2%
+ {\setfalse\c_math_fenced_unknown
+ \setfalse\c_math_fenced_done
+ \left#1\relax
+ \ifconditional\c_math_fenced_done
+ #2%
+ \right.\relax
+ \else
+ \left.\relax
+ #2%
+ \setfalse\c_math_fenced_done
+ \right#1\relax
+ \ifconditional\c_math_fenced_done
+ \else
+ \right.\relax
+ \fi
+ \fi}
+
+\unexpanded\def\mathdelimiterstep#1#2%
+ {\begingroup
+ \attribute\mathsizeattribute\numexpr\plushundred+#1\relax
+ \math_fenced_step#2\relax
+ \endgroup}
+
+\setvalue{\??mathbig1}{0.85}
+\setvalue{\??mathbig2}{1.15}
+\setvalue{\??mathbig3}{1.45}
+\setvalue{\??mathbig4}{1.75}
+
+\definemathcommand [big] {\choosemathbig\plusone }
+\definemathcommand [Big] {\choosemathbig\plustwo }
+\definemathcommand [bigg] {\choosemathbig\plusthree}
+\definemathcommand [Bigg] {\choosemathbig\plusfour }
+
+\definemathcommand [bigl] [open] [one] {\big}
+\definemathcommand [bigm] [rel] [one] {\big}
+\definemathcommand [bigr] [close] [one] {\big}
+\definemathcommand [Bigl] [open] [one] {\Big}
+\definemathcommand [Bigm] [rel] [one] {\Big}
+\definemathcommand [Bigr] [close] [one] {\Big}
+\definemathcommand [biggl] [open] [one] {\bigg}
+\definemathcommand [biggm] [rel] [one] {\bigg}
+\definemathcommand [biggr] [close] [one] {\bigg}
+\definemathcommand [Biggl] [open] [one] {\Bigg}
+\definemathcommand [Biggm] [rel] [one] {\Bigg}
+\definemathcommand [Biggr] [close] [one] {\Bigg}
+
%definemathfence [fancybracket] [bracket] [command=yes,color=red]
% experimental accents:
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index b145d04ac..8f9abcd1a 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.log b/tex/context/base/status-lua.log
index 838cc2383..d76ec6f60 100644
--- a/tex/context/base/status-lua.log
+++ b/tex/context/base/status-lua.log
@@ -1,6 +1,6 @@
(cont-yes.mkiv
-ConTeXt ver: 2013.08.17 00:58 MKIV beta fmt: 2013.8.17 int: english/english
+ConTeXt ver: 2013.08.18 18:32 MKIV beta fmt: 2013.8.18 int: english/english
system > 'cont-new.mkiv' loaded
(cont-new.mkiv)
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index d2d3b3d83..7ab836bd1 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 08/17/13 00:58:38
+-- merge date : 08/18/13 18:32:06
do -- begin closure to overcome local limits and interference