diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-08-26 12:08:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-08-26 12:08:00 +0200 |
commit | 349b56d840bb883bdf876ed3f9adc10df98bff15 (patch) | |
tree | c6ea9d0d3d2c94f274272caebcee6bc12eb01949 | |
parent | 11c608bd2e15710eeb544e6012855d5c02c513f9 (diff) | |
download | context-349b56d840bb883bdf876ed3f9adc10df98bff15.tar.gz |
beta 2013.08.26 12:08
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4110 -> 4107 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/math-fen.mkiv | 48 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24772 -> 24767 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.log | 2 | ||||
-rw-r--r-- | tex/context/base/syst-aux.lua | 23 | ||||
-rw-r--r-- | tex/context/base/syst-aux.mkiv | 91 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
9 files changed, 134 insertions, 36 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 6c39a564d..be47d5d52 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.24 13:59} +\newcontextversion{2013.08.26 12:08} %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 53c81e050..c45b138af 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 39b48487d..08493a92c 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.24 13:59} +\edef\contextversion{2013.08.26 12:08} \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 2a05ac5a1..8d8ad7ae7 100644 --- a/tex/context/base/math-fen.mkiv +++ b/tex/context/base/math-fen.mkiv @@ -78,8 +78,11 @@ \let\fence \relax \let\fenced\relax +\newcount\c_math_fenced_nesting + \unexpanded\def\math_fenced_fenced_start#1% - {\begingroup + {\advance\c_math_fenced_nesting\plusone + \begingroup \edef\currentmathfence{#1}% \startusemathstyleparameter\mathfenceparameter \let\fence\math_fenced_middle @@ -97,7 +100,8 @@ {\edef\currentmathfence{#1}% \math_fenced_right \stopusemathstyleparameter - \endgroup} + \endgroup + \advance\c_math_fenced_nesting\minusone} \unexpanded\def\math_fenced_fenced[#1]#2% {\math_fenced_fenced_start{#1}% @@ -319,6 +323,46 @@ % \definemathoverextensible [top] [hoed] ["FE302] % \definemathoverextensible [top] [slang] ["FE303] +%D This is needed for mathml (used in mrow, so it gets reset): + +\let\math_fences_saved_left \left +\let\math_fences_saved_middle\middle +\let\math_fences_saved_right \right + +\unexpanded\def\math_fences_checked_left + {\math_fences_saved_left} + +\unexpanded\def\math_fences_checked_middle + {\ifcase\c_math_fenced_nesting + \expandafter\math_fences_saved_middle + \else + \expandafter\firstofoneargument + \fi} + +\unexpanded\def\math_fences_checked_right + {\ifcase\c_math_fenced_nesting + \expandafter\firstofoneargument + \else + \expandafter\math_fences_saved_right + \fi} + +\unexpanded\def\math_fences_finish + {\ifcase\c_math_fenced_nesting\else + \right.\relax % error, todo: nil spacing + \expandafter\math_fences_finish + \fi} + +\unexpanded\def\startcheckedfences + {\begingroup + %\let\left \math_fences_checked_left + \let\middle\math_fences_checked_middle + \let\right \math_fences_checked_right + \c_math_fenced_nesting\zerocount} + +\unexpanded\def\stopcheckedfences + {\math_fences_finish + \endgroup} + %D The next characters were used for constructing nicer extensibles but %D nowadays we have real characters. diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 1ce9862cb..bb7e9df66 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.log b/tex/context/base/status-lua.log index f4469c869..3e9340ec2 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.24 13:59 MKIV beta fmt: 2013.8.24 int: english/english +ConTeXt ver: 2013.08.26 12:08 MKIV beta fmt: 2013.8.26 int: english/english system > 'cont-new.mkiv' loaded (cont-new.mkiv) diff --git a/tex/context/base/syst-aux.lua b/tex/context/base/syst-aux.lua index b0fb8483b..f9c0dfc1c 100644 --- a/tex/context/base/syst-aux.lua +++ b/tex/context/base/syst-aux.lua @@ -16,7 +16,8 @@ local commands, context = commands, context local settings_to_array = utilities.parsers.settings_to_array local format = string.format local utfsub = utf.sub -local P, C, Carg, lpegmatch, utf8char = lpeg.P, lpeg.C, lpeg.Carg, lpeg.match, lpeg.patterns.utf8char +local P, S, C, Cc, Cs, Carg, lpegmatch, utf8char = lpeg.P, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.Carg, lpeg.match, lpeg.patterns.utf8char + local setvalue = context.setvalue @@ -78,3 +79,23 @@ end -- \gdef\setpercentdimen#1#2% -- {#1=\ctxcommand{percentageof("#2",\number#1)}\relax} + +local spaces = P(" ")^0/"" + +local pattern = Cs( + ( P("global") / "\\global" )^0 + * spaces + * ( P("unexpanded") / "\\unexpanded" )^0 + * spaces + * Cc("\\expandafter\\") + * spaces + * ( P("expanded") / "e" )^0 + * spaces + * ( P((1-S(" #"))^1) / "def\\csname %0\\endcsname" ) + * spaces + * Cs( (P("##")/"#" + P(1))^0 ) +) + +function commands.thetexdefinition(str) + context(lpegmatch(pattern,str)) +end diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv index 542b132ae..79560892b 100644 --- a/tex/context/base/syst-aux.mkiv +++ b/tex/context/base/syst-aux.mkiv @@ -3122,6 +3122,63 @@ \def\s!unexpanded{unexpanded} +% \bgroup \obeylines +% +% \global\let\stoptexdefinition\relax +% +% \unexpanded\gdef\starttexdefinition% +% {\bgroup% +% \obeylines% +% \syst_helpers_start_tex_definition} +% +% \gdef\syst_helpers_start_tex_definition #1 +% {\catcode\endoflineasciicode\ignorecatcode% +% \doifinstringelse\letterhash{\detokenize{#1}}\syst_helpers_start_tex_definition_yes\syst_helpers_start_tex_definition_nop#1 +% } +% +% \gdef\syst_helpers_start_tex_definition_yes#1 #2 +% {\edef\texdefinitionname{#1}% +% \ifx\texdefinitionname\s!unexpanded% +% \expandafter\syst_helpers_start_tex_definition_yes_unexpanded% +% \else% +% \expandafter\syst_helpers_start_tex_definition_yes_normal% +% \fi% +% {#1}#2 +% } +% +% \gdef\syst_helpers_start_tex_definition_yes_unexpanded#1#2 #3 +% #4\stoptexdefinition% +% {\egroup% #1=unexpanded +% \unexpanded\expandafter\def\csname#2\endcsname#3{#4}} +% +% \gdef\syst_helpers_start_tex_definition_yes_normal#1#2 +% #3\stoptexdefinition% +% {\egroup% +% \expandafter\def\csname#1\endcsname#2{#3}} +% +% \gdef\syst_helpers_start_tex_definition_nop#1 +% {\syst_helpers_start_tex_definition_nop_indeed{#1}{}} +% +% \gdef\syst_helpers_start_tex_definition_nop_indeed#1#2#3\stoptexdefinition% +% {\egroup% +% \expandafter\def\csname#1\endcsname{#3}} +% +% \egroup + +% \starttexdefinition unexpanded test #1 +% [here #1] +% \stoptexdefinition +% +% \starttexdefinition global unexpanded test +% [here test] +% \stoptexdefinition +% +% \scratchcounter=123 +% +% \starttexdefinition global unexpanded expanded test #oeps +% [here #oeps: \the\scratchcounter] +% \stoptexdefinition + \bgroup \obeylines \global\let\stoptexdefinition\relax @@ -3129,39 +3186,15 @@ \unexpanded\gdef\starttexdefinition% {\bgroup% \obeylines% - \syst_helpers_start_tex_definition} + \syst_helpers_start_tex_definition_one} -\gdef\syst_helpers_start_tex_definition #1 +\gdef\syst_helpers_start_tex_definition_one#1 {\catcode\endoflineasciicode\ignorecatcode% - \doifinstringelse\letterhash{\detokenize{#1}}\syst_helpers_start_tex_definition_yes\syst_helpers_start_tex_definition_nop#1 - } - -\gdef\syst_helpers_start_tex_definition_yes#1 #2 - {\edef\texdefinitionname{#1}% - \ifx\texdefinitionname\s!unexpanded% - \expandafter\syst_helpers_start_tex_definition_yes_unexpanded% - \else% - \expandafter\syst_helpers_start_tex_definition_yes_normal% - \fi% - {#1}#2 - } - -\gdef\syst_helpers_start_tex_definition_yes_unexpanded#1#2 #3 - #4\stoptexdefinition% - {\egroup% #1=unexpanded - \unexpanded\expandafter\def\csname#2\endcsname#3{#4}} - -\gdef\syst_helpers_start_tex_definition_yes_normal#1#2 - #3\stoptexdefinition% - {\egroup% - \expandafter\def\csname#1\endcsname#2{#3}} - -\gdef\syst_helpers_start_tex_definition_nop#1 - {\syst_helpers_start_tex_definition_nop_indeed{#1}{}} + \syst_helpers_start_tex_definition_two{#1}} -\gdef\syst_helpers_start_tex_definition_nop_indeed#1#2#3\stoptexdefinition% +\gdef\syst_helpers_start_tex_definition_two#1#2\stoptexdefinition% {\egroup% - \expandafter\def\csname#1\endcsname{#3}} + \ctxcommand{thetexdefinition("#1")}{#2}} \egroup diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index b39d4a8f3..5e00629ef 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/24/13 13:59:18 +-- merge date : 08/26/13 12:08:27 do -- begin closure to overcome local limits and interference |