diff options
author | Marius <mariausol@gmail.com> | 2013-12-22 17:00:27 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-12-22 17:00:27 +0200 |
commit | c7912abc92bf2980fa84424a2fafb4b57092c7c5 (patch) | |
tree | afe91a91b54050beff8c85e4a61b20584f25163b /tex | |
parent | c0eaa0ea807ee515a35c0375b7814b83f6b68533 (diff) | |
download | context-c7912abc92bf2980fa84424a2fafb4b57092c7c5.tar.gz |
beta 2013.12.22 15:54
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4110 -> 4130 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/meta-tex.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mlib-pdf.lua | 51 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24612 -> 24632 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 228104 -> 228251 bytes | |||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
8 files changed, 42 insertions, 17 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index e2d48d4a5..fd4d7d417 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.12.20 23:45} +\newcontextversion{2013.12.22 15:54} %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 a690bcfec..93b162f8d 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 823b4c351..193177d14 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -28,7 +28,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2013.12.20 23:45} +\edef\contextversion{2013.12.22 15:54} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/meta-tex.lua b/tex/context/base/meta-tex.lua index e1398e7ed..7a4123abb 100644 --- a/tex/context/base/meta-tex.lua +++ b/tex/context/base/meta-tex.lua @@ -132,6 +132,8 @@ function metapost.format_number(fmt,num) end end +-- This is experimental and will change! + function metapost.svformat(fmt,str) metapost.format_string(fmt,metapost.untagvariable(str,false)) end diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua index 1f37223a7..f10d28bf8 100644 --- a/tex/context/base/mlib-pdf.lua +++ b/tex/context/base/mlib-pdf.lua @@ -275,28 +275,35 @@ local equal = P("=") local key = C((1-equal)^1) * equal local newline = S("\n\r")^1 local number = (((1-space-newline)^1) / tonumber) * (space^0) + +local p_number = number +local p_string = C((1-newline)^0) +local p_boolean = P("false") * Cc(false) + P("true") * Cc(true) +local p_set = Ct(number^1) +local p_path = Ct(Ct(number * number^-5)^1) + local variable = - P("1:") * key * number - + P("2:") * key * C((1-newline)^0) - + P("3:") * key * (P("false") * Cc(false) + P("true") * Cc(true)) - + S("4568") * P(":") * key * Ct(number^1) - + P("7:") * key * Ct(Ct(number * number^-5)^1) + P("1:") * key * p_number + + P("2:") * key * p_string + + P("3:") * key * p_boolean + + S("4568") * P(":") * key * p_set + + P("7:") * key * p_path local pattern_key = Cf ( Carg(1) * (Cg(variable * newline^0)^0), rawset) local variable = - P("1:") * number - + P("2:") * C((1-newline)^0) - + P("3:") * (P("false") * Cc(false) + P("true") * Cc(true)) - + S("4568") * P(":") * Ct(number^1) - + P("7:") * Ct(Ct(number * number^-5)^1) + P("1:") * p_number + + P("2:") * p_string + + P("3:") * p_boolean + + S("4568") * P(":") * p_set + + P("7:") * p_path local pattern_tab = Cf ( Carg(1) * (Cg(variable * newline^0)^0), rawset) local variable = - P("1:") * number - + P("2:") * C((1-newline)^0) - + P("3:") * (P("false") * Cc(false) + P("true") * Cc(true)) + P("1:") * p_number + + P("2:") * p_string + + P("3:") * p_boolean + S("4568") * P(":") * number^1 + P("7:") * (number * number^-5)^1 @@ -337,6 +344,19 @@ function metapost.untagvariable(str,variables) end end +-- function metapost.processspecial(str) +-- lpegmatch(pattern_key,object.prescript,1,variables) +-- end + +function metapost.processspecial(str) + local code = loadstring(str) + if code then + code() + else + report_metapost("invalid special: %s",str) + end +end + function metapost.flush(result,flusher,askedfig) if result then local figures = result.fig @@ -350,6 +370,7 @@ function metapost.flush(result,flusher,askedfig) local stopfigure = flusher.stopfigure local flushfigure = flusher.flushfigure local textfigure = flusher.textfigure + local processspecial = flusher.processspecial or metapost.processspecial for f=1,#figures do local figure = figures[f] local objects = getobjects(result,figure,f) @@ -392,7 +413,9 @@ function metapost.flush(result,flusher,askedfig) if objecttype == "start_bounds" or objecttype == "stop_bounds" then -- skip elseif objecttype == "special" then - lpegmatch(pattern_key,object.prescript,1,variables) + if processspecial then + processspecial(object.prescript) + end elseif objecttype == "start_clip" then t[#t+1] = "q" flushnormalpath(object.path,t,false) diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex cb9c68b5d..d89b1518c 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 270d2ec65..3f518e547 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 228b9727c..268282011 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 : 12/20/13 23:45:10 +-- merge date : 12/22/13 15:54:26 do -- begin closure to overcome local limits and interference |