From 58d0e80f6d6bca23135f7d475a68b6a75853015b Mon Sep 17 00:00:00 2001 From: Marius Date: Sat, 17 Aug 2013 02:00:14 +0300 Subject: beta 2013.08.17 00:58 --- tex/context/base/buff-ini.mkiv | 11 ++ tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4109 -> 4100 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/math-act.lua | 2 + tex/context/base/math-fen.mkiv | 132 ++++++++++++++++++--- tex/context/base/math-stc.mkvi | 5 + tex/context/base/status-files.pdf | Bin 24764 -> 24748 bytes tex/context/base/status-lua.log | 2 +- tex/context/base/type-imp-dejavu.mkiv | 7 ++ tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 11 files changed, 142 insertions(+), 23 deletions(-) (limited to 'tex') diff --git a/tex/context/base/buff-ini.mkiv b/tex/context/base/buff-ini.mkiv index 7616a1dee..3b754b532 100644 --- a/tex/context/base/buff-ini.mkiv +++ b/tex/context/base/buff-ini.mkiv @@ -140,6 +140,17 @@ \unexpanded\def\buff_get_stored_indeed#1% {\ctxcommand{getbuffer("#1")}} +\unexpanded\def\inlinebuffer + {\dosingleempty\buff_get_inline} + +\unexpanded\def\buff_get_inline[#1]% [name] + {\doifelsenothing{#1} + {\buff_get_stored_inline_indeed\empty} + {\processcommalist[#1]\buff_get_stored_inline_indeed}} + +\unexpanded\def\buff_get_stored_inline_indeed#1% + {\ignorespaces\ctxcommand{getbuffer("#1")}\removeunwantedspaces} + \definebuffer [\v!hiding] diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index b8b3bc37d..462293d37 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.15 23:58} +\newcontextversion{2013.08.17 00:58} %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 a5627df43..3c4ee6179 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 077b8f318..184a9f356 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.15 23:58} +\edef\contextversion{2013.08.17 00:58} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/math-act.lua b/tex/context/base/math-act.lua index abb96bb52..d7b39b4c5 100644 --- a/tex/context/base/math-act.lua +++ b/tex/context/base/math-act.lua @@ -602,6 +602,8 @@ blocks["digitsextendedarabicindic"] = { first = 0x006F0, last = 0x006F -- symbolsb : 0x02901 -- supplemental : 0x02A00 +-- todo: tounicode + function mathematics.injectfallbacks(target,original) local specification = target.specification if specification then diff --git a/tex/context/base/math-fen.mkiv b/tex/context/base/math-fen.mkiv index 640821bad..45f628862 100644 --- a/tex/context/base/math-fen.mkiv +++ b/tex/context/base/math-fen.mkiv @@ -11,8 +11,6 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -% 0x -> " - \writestatus{loading}{ConTeXt Math Macros / Fences} \unprotect @@ -40,9 +38,9 @@ \let\setupmathfences\setupmathfence \setupmathfences - [\c!left=0x2E, - \c!right=0x2E, - \c!middle=0x2E, + [\c!left=, + \c!right=, + \c!middle=, \c!mathstyle=, \c!color=, \c!command=] @@ -54,13 +52,22 @@ \fi \to \everydefinemathfence -% no Uchar here: - -\def\math_fenced_left {\math_fenced_color_push\normalleft \utfchar{\mathfenceparameter\c!left }\math_fenced_color_pop} -\def\math_fenced_middle{\mskip\thinmuskip - \math_fenced_color_push\normalmiddle\utfchar{\mathfenceparameter\c!middle}\math_fenced_color_pop +% we need the direct use of \Udelimiter because of { etc + +\def\math_fenced_left {\edef\p_left{\mathfenceparameter\c!left}% + \math_fenced_color_push + \normalleft\ifx\p_left\empty.\else\Udelimiter\plusfour\fam\p_left\fi + \math_fenced_color_pop} +\def\math_fenced_middle{\edef\p_middle{\mathfenceparameter\c!middle}% + \mskip\thinmuskip + \math_fenced_color_push + \normalmiddle\ifx\p_middle\empty.\else\Udelimiter\plusfour\fam\p_middle\fi + \math_fenced_color_pop \mskip\thinmuskip} -\def\math_fenced_right {\math_fenced_color_push\normalright \utfchar{\mathfenceparameter\c!right }\math_fenced_color_pop} +\def\math_fenced_right {\edef\p_right{\mathfenceparameter\c!right}% + \math_fenced_color_push + \normalright\ifx\p_right\empty.\else\Udelimiter\plusfive\fam\p_right\fi + \math_fenced_color_pop} \def\math_fenced_color_do_push{\pushcolor[\p_math_fenced_color]} \let\math_fenced_color_do_pop \popcolor @@ -68,7 +75,7 @@ \let\fence \relax \let\fenced\relax -\unexpanded\def\math_fenced_fenced[#1]#2% +\unexpanded\def\math_fenced_fenced_start#1% {\begingroup \edef\currentmathfence{#1}% \startusemathstyleparameter\mathfenceparameter @@ -81,7 +88,16 @@ \let\math_fenced_color_push\math_fenced_color_do_push \let\math_fenced_color_pop \math_fenced_color_do_pop \fi - \math_fenced_left + \math_fenced_left} + +\unexpanded\def\math_fenced_fenced_stop#1% + {\edef\currentmathfence{#1}% + \math_fenced_right + \stopusemathstyleparameter + \endgroup} + +\unexpanded\def\math_fenced_fenced[#1]#2% + {\math_fenced_fenced_start{#1}% #2% \math_fenced_right \stopusemathstyleparameter @@ -91,12 +107,90 @@ \let\fenced\math_fenced_fenced \to \everymathematics -\definemathfence [parenthesis] [\c!left=0x0028,\c!right=0x0029] -\definemathfence [bracket] [\c!left=0x005B,\c!right=0x005D] -\definemathfence [braces] [\c!left=0x007B,\c!right=0x007D] -\definemathfence [bar] [\c!left=0x007C,\c!right=0x007C] -\definemathfence [doublebar] [\c!left=0x2016,\c!right=0x2016] -\definemathfence [angle] [\c!left=0x003C,\c!right=0x003E] +% todo: | in mathmode letter +% +% \appendtoks +% \let\bar\letterbar +% \to \everymathematics +% +% but then we don't have it in embedded text too so ... + +\definemathfence [parenthesis] [\c!left="0028,\c!right="0029] +\definemathfence [bracket] [\c!left="005B,\c!right="005D] +\definemathfence [brace] [\c!left="007B,\c!right="007D] +\definemathfence [bar] [\c!left="007C,\c!right="007C] +\definemathfence [doublebar] [\c!left="2016,\c!right="2016] +\definemathfence [angle] [\c!left="003C,\c!right="003E] +\definemathfence [nothing] + +%D A bonus: + +\unexpanded\def\Lparent {\math_fenced_fenced_start{parenthesis}} \unexpanded\def\Rparent {\math_fenced_fenced_stop{parenthesis}} +\unexpanded\def\Lbracket {\math_fenced_fenced_start{bracket}} \unexpanded\def\Rbracket {\math_fenced_fenced_stop{bracket}} +\unexpanded\def\Lbrace {\math_fenced_fenced_start{brace}} \unexpanded\def\Rbrace {\math_fenced_fenced_stop{brace}} +\unexpanded\def\Langle {\math_fenced_fenced_start{angle}} \unexpanded\def\Rangle {\math_fenced_fenced_stop{angle}} +\unexpanded\def\Lbar {\math_fenced_fenced_start{bar}} \unexpanded\def\Rbar {\math_fenced_fenced_stop{bar}} +\unexpanded\def\Ldoublebar {\math_fenced_fenced_start{doublebar}} \unexpanded\def\Rdoublebar{\math_fenced_fenced_stop{doublebar}} +\unexpanded\def\Lnothing {\math_fenced_fenced_start{nothing}} \unexpanded\def\Rnothing {\math_fenced_fenced_stop{nothing}} + +%D And another one: + +% \setupmathfences[color=darkgreen] +% +% \startformula +% \left{ \frac{1}{a} \right} +% \left[ \frac{1}{b} \right] +% \left( \frac{1}{c} \right) +% \left< \frac{1}{d} \right> +% \left| \frac{1}{e} \right| +% \stopformula + +\installcorenamespace{mathleft} +\installcorenamespace{mathright} + +\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} + +\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} + +\def\math_right + {\edef\m_math_right{\meaning\next}% + \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} + +\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 + +\egroup %definemathfence [fancybracket] [bracket] [command=yes,color=red] diff --git a/tex/context/base/math-stc.mkvi b/tex/context/base/math-stc.mkvi index 87db7aacb..4652ee564 100644 --- a/tex/context/base/math-stc.mkvi +++ b/tex/context/base/math-stc.mkvi @@ -78,6 +78,11 @@ {\mathstylehbox{\usemathstackerscolorparameter\c!color \Umathaccent\fam\zerocount\scratchunicode{\hskip\hsize}}} +% these delimiters are a unuseable as theu don't center for small arguments: +% +% $\Umathaccent 0 0 "2190{x}$ \par $\Umathaccent 0 0 "27F8{x}$\par +% $\Udelimiterunder 0 "2190{x}$ \par $\Udelimiterunder 0 "27F8{x}$\par + \setvalue{\??mathextensiblefallbacks}{\hbox{\vrule\!!width\scratchwidth\!!height.1\exheight\!!depth\zeropoint}} % \def\math_stackers_with_fallback#codepoint% diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 5c7d35361..b145d04ac 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.log b/tex/context/base/status-lua.log index 5fe45ee09..838cc2383 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.15 23:58 MKIV beta fmt: 2013.8.15 int: english/english +ConTeXt ver: 2013.08.17 00:58 MKIV beta fmt: 2013.8.17 int: english/english system > 'cont-new.mkiv' loaded (cont-new.mkiv) diff --git a/tex/context/base/type-imp-dejavu.mkiv b/tex/context/base/type-imp-dejavu.mkiv index 0e628c4ba..de1f7752c 100644 --- a/tex/context/base/type-imp-dejavu.mkiv +++ b/tex/context/base/type-imp-dejavu.mkiv @@ -73,6 +73,13 @@ \definetypeface [dejavu] [\s!mm] [\s!math] [xits] [\s!default] [\s!rscale=1.2] \stoptypescript + \starttypescript[dejavubidi] + \definetypeface [dejavu] [\s!rm] [\s!serif] [dejavu] [\s!default] + \definetypeface [dejavu] [\s!ss] [\s!sans] [dejavu] [\s!default] + \definetypeface [dejavu] [\s!tt] [\s!mono] [dejavu] [\s!default] + \definetypeface [dejavu] [\s!mm] [\s!math] [xitsbidi] [\s!default] [\s!rscale=1.2] + \stoptypescript + \starttypescript [\s!serif] [dejavu-condensed] [\s!name] \setups[\s!font:\s!fallback:\s!serif] \definefontsynonym [\s!Serif] [\s!name:dejavuserifcondensed] [\s!features=\s!default] diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index a742805a3..d2d3b3d83 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/15/13 23:58:05 +-- merge date : 08/17/13 00:58:38 do -- begin closure to overcome local limits and interference -- cgit v1.2.3