diff options
-rw-r--r-- | tex/context/base/bibl-tra.mkiv | 7 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4132 -> 4133 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 40100 -> 40466 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/math-fen.mkiv | 18 | ||||
-rw-r--r-- | tex/context/base/math-frc.lua | 51 | ||||
-rw-r--r-- | tex/context/base/math-frc.mkiv | 41 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24762 -> 24759 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 211787 -> 211777 bytes | |||
-rw-r--r-- | tex/context/base/status-mkiv.lua | 6 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts.lua | 10 |
13 files changed, 103 insertions, 36 deletions
diff --git a/tex/context/base/bibl-tra.mkiv b/tex/context/base/bibl-tra.mkiv index 511212a98..b142e8938 100644 --- a/tex/context/base/bibl-tra.mkiv +++ b/tex/context/base/bibl-tra.mkiv @@ -1267,13 +1267,6 @@ \expandafter\secondoftwoarguments \fi} -% \unexpanded\def\bibmaybeinteractive#1#2% -% {\ifbibcitecompress -% #2% -% \else -% \doifbibinteractionelse{\gotobiblink{#2}[#1]}{#2}% -% \fi} - \unexpanded\def\bibmaybeinteractive#1#2% {\doifbibinteractionelse{\gotobiblink{#2}[#1]}{#2}} diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index a3cd07c34..5961d8c5f 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.04.10 10:04} +\newcontextversion{2013.04.10 19: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 Binary files differindex 42c8480ec..a52b11af9 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex ef690fec8..9d3b051c2 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 6cbbc3223..12dc743c2 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.04.10 10:05} +\edef\contextversion{2013.04.10 19:58} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/math-fen.mkiv b/tex/context/base/math-fen.mkiv index 9080ffedf..f7edc582e 100644 --- a/tex/context/base/math-fen.mkiv +++ b/tex/context/base/math-fen.mkiv @@ -41,9 +41,9 @@ \let\setupmathfences\setupmathfence \setupmathfences - [\c!left="002E, - \c!right="002E, - \c!middle="002E, + [\c!left=0x2E, + \c!right=0x2E, + \c!middle=0x2E, \c!mathstyle=, \c!color=, \c!command=] @@ -96,12 +96,12 @@ \let\fenced\math_fenced_fenced \to \everymathematics -\definemathfence [parenthesis] [\c!left="0028,\c!right="0029] -\definemathfence [bracket] [\c!left="005B,\c!right="005D] -\definemathfence [braces] [\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 [parenthesis] [\c!left=0x28,\c!right=0x29] +\definemathfence [bracket] [\c!left=0x5B,\c!right=0x5D] +\definemathfence [braces] [\c!left=0x7B,\c!right=0x7D] +\definemathfence [bar] [\c!left=0x7C,\c!right=0x7C] +\definemathfence [doublebar] [\c!left=0x2016,\c!right=0x2016] +\definemathfence [angle] [\c!left=0x3C,\c!right=0x3E] %definemathfence [fancybracket] [bracket] [command=yes,color=red] diff --git a/tex/context/base/math-frc.lua b/tex/context/base/math-frc.lua new file mode 100644 index 000000000..4f531a530 --- /dev/null +++ b/tex/context/base/math-frc.lua @@ -0,0 +1,51 @@ +if not modules then modules = { } end modules ['math-frc'] = { + version = 1.001, + comment = "companion to math-frc.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local utfchar = utf.char + +local context = context +local variables = interfaces.variables + +local v_no = variables.no +local v_yes = variables.yes + +local resolved = { + [0x007B] = "\\{", + [0x007D] = "\\}", +} + +table.setmetatableindex(resolved, function(t,k) + local v = utfchar(k) + t[k] = v + return v +end) + +local normalatop = context.normalatop +local normalover = context.normalover + +function commands.math_frac(how,left,right,width) + if how == v_no then + if left == 0x002E and right == 0x002E then + normalatop() + else + context("\\atopwithdelims%s%s",resolved[left],resolved[right]) + end + elseif how == v_yes then + if left == 0x002E and right == 0x002E then + context("\\normalabove%ssp",width) + else + context("\\abovewithdelims%s%s%ssp",resolved[left],resolved[right],width) + end + else -- v_auto + if left == 0x002E and right == 0x002E then + normalover() + else + context("\\overwithdelims%s%s",resolved[left],resolved[right]) + end + end +end diff --git a/tex/context/base/math-frc.mkiv b/tex/context/base/math-frc.mkiv index 9770d4ae1..e11e79e82 100644 --- a/tex/context/base/math-frc.mkiv +++ b/tex/context/base/math-frc.mkiv @@ -19,6 +19,8 @@ %D This module is reimplemented in \MKIV\ style. +\registerctxluafile{math-frc}{1.001} + %D \macros %D {frac, xfrac, xxfrac} %D @@ -100,7 +102,10 @@ \setupmathfractions [\c!mathstyle=, \c!alternative=\v!inner, - \c!command=\normalover] % beware a <arg 1><command><arg 2> variant + \c!rulethickness=.25\exheight, + \c!left=0x2E, + \c!right=0x2E, + \c!rule=\v!auto] \appendtoks \setuevalue{\currentmathfraction}{\math_frac{\currentmathfraction}}% @@ -124,17 +129,27 @@ \unexpanded\def\math_frac_normal {\expandnamespaceparameter\??mathfractionalternative\mathfractionparameter\c!alternative\v!inner} +% we use utfchar anyway so we can as well do all at the lua end + +\def\math_frac_command + {\ctxcommand{math_frac(% + "\mathfractionparameter\c!rule",% + \number\mathfractionparameter\c!left,% + \number\mathfractionparameter\c!right,% + \number\dimexpr\mathfractionparameter\c!rulethickness% + )}} + \setvalue{\??mathfractionalternative\v!inner}#1#2% {\Ustack{% {\usemathstyleparameter\mathfractionparameter{#1}}% we should store this one - \mathfractionparameter\c!command + \math_frac_command {\usemathstyleparameter\mathfractionparameter{#2}}% and reuse it here }\endgroup} \setvalue{\??mathfractionalternative\v!outer}#1#2% {\Ustack{% \usemathstyleparameter\mathfractionparameter - {{#1}\mathfractionparameter\c!command{#2}}% + {{#1}\math_frac_command{#2}}% }\endgroup} \definemathfraction[frac][\c!mathstyle=] @@ -159,6 +174,18 @@ %D \typebuffer %D \getbuffer +% $$ +% {{a}\over{b}} + +% {{a}\overwithdelims(){b}} + +% {{a}\atopwithdelims(){b}} + +% {{a}\abovewithdelims()\zeropoint{b}} + +% \left({{a}\over{b}}\right) +% $$ + +% \dorecurse {10} { % weird +% $$ {{a}\abovewithdelims()#1pt{b}} $$ +% } + % \unexpanded\def\dfrac #1#2{{\displaystyle {{#1}\normalover {#2}}}} % \unexpanded\def\tfrac #1#2{{\textstyle {{#1}\normalover {#2}}}} @@ -166,8 +193,6 @@ \definemathfraction[tfrac][\c!alternative=\v!outer,\c!mathstyle=\s!text] \definemathfraction[sfrac][\c!alternative=\v!outer,\c!mathstyle=\s!script] -\def\normaloverbinum{\normalabovewithdelims()\zeropoint} - % \definemathfraction[ddfrac][\c!mathstyle=\s!display] % \definemathfraction[ttfrac][\c!mathstyle=\s!text] % \definemathfraction[ssfrac][\c!mathstyle=\s!script] @@ -176,9 +201,9 @@ % \unexpanded\def\dbinom#1#2{{\displaystyle{{#1}\normalabovewithdelims()\zeropoint{#2}}}} % \unexpanded\def\tbinom#1#2{{\textstyle {{#1}\normalabovewithdelims()\zeropoint{#2}}}} -\definemathfraction[binom] [\c!alternative=\v!outer,\c!command=\normaloverbinum,\c!mathstyle=\s!auto] -\definemathfraction[dbinom][\c!alternative=\v!outer,\c!command=\normaloverbinum,\c!mathstyle=\s!display] -\definemathfraction[tbinom][\c!alternative=\v!outer,\c!command=\normaloverbinum,\c!mathstyle=\s!text] +\definemathfraction[binom] [\c!alternative=\v!outer,\c!rule=\v!no,\c!left=0x28,\c!right=0x29,\c!mathstyle=\s!auto] +\definemathfraction[dbinom][\c!alternative=\v!outer,\c!rule=\v!no,\c!left=0x28,\c!right=0x29,\c!mathstyle=\s!display] +\definemathfraction[tbinom][\c!alternative=\v!outer,\c!rule=\v!no,\c!left=0x28,\c!right=0x29,\c!mathstyle=\s!text] %D \macros %D {cfrac} diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex c96c0f204..93dd37b9e 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 06e9f83df..e161da377 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/status-mkiv.lua b/tex/context/base/status-mkiv.lua index f08b2ec63..be26a2030 100644 --- a/tex/context/base/status-mkiv.lua +++ b/tex/context/base/status-mkiv.lua @@ -3738,6 +3738,12 @@ return { }, { category = "lua", + filename = "math-frc", + loading = "math-frc", + status = "okay", + }, + { + category = "lua", comment = "could be made look nicer, but who cares", filename = "math-dim", loading = "math-ini", diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index a184861b3..c6dac339d 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 : 04/10/13 00:33:57 +-- merge date : 04/10/13 19:58:43 do -- begin closure to overcome local limits and interference diff --git a/tex/generic/context/luatex/luatex-fonts.lua b/tex/generic/context/luatex/luatex-fonts.lua index 75bd07997..0a6dc68e8 100644 --- a/tex/generic/context/luatex/luatex-fonts.lua +++ b/tex/generic/context/luatex/luatex-fonts.lua @@ -156,19 +156,11 @@ if non_generic_context.luatex_fonts.skip_loading ~= true then loadmodule("l-string.lua") loadmodule("l-table.lua") loadmodule("l-io.lua") - ----------("l-number.lua") - ----------("l-set.lua") - ----------("l-os.lua") loadmodule("l-file.lua") - ----------("l-md5.lua") - ----------("l-url.lua") - ----------("l-dir.lua") loadmodule("l-boolean.lua") - ----------("l-unicode.lua") loadmodule("l-math.lua") loadmodule("util-str.lua") - -- The following modules contain code that is either not used at all outside context or will fail -- when enabled due to lack of other modules. @@ -190,7 +182,7 @@ if non_generic_context.luatex_fonts.skip_loading ~= true then -- with context. The mtx-fonts script can be used to genate this file (using the --names option). -- in 2013/14 we will merge/move some generic files into luatex-fonts-* files (copies) so that - -- intermediate updates of context not interfere + -- intermediate updates of context not interfere; we can then also use the general merger loadmodule('font-ini.lua') loadmodule('font-con.lua') |