summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-12-22 19:05:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-12-22 19:05:00 +0100
commit7782983431dad86a7ee371ea6638b948a599e8c6 (patch)
tree5962f07868a1cae0c2a935d62bba988aac411f0b
parent53c0f22d640cf2554525d0d3866d7ee38d131df8 (diff)
downloadcontext-7782983431dad86a7ee371ea6638b948a599e8c6.tar.gz
beta 2013.12.22 19:05
-rw-r--r--context/data/scite/lexers/data/scite-context-data-metafun.lua2
-rw-r--r--context/data/scite/scite-context-data-metafun.properties3
-rw-r--r--metapost/context/base/mp-mlib.mpiv23
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4130 -> 4127 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/mlib-pdf.lua27
-rw-r--r--tex/context/base/mult-fun.lua3
-rw-r--r--tex/context/base/status-files.pdfbin24632 -> 24635 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin228251 -> 228090 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
11 files changed, 45 insertions, 19 deletions
diff --git a/context/data/scite/lexers/data/scite-context-data-metafun.lua b/context/data/scite/lexers/data/scite-context-data-metafun.lua
index f96b41637..1ca02de97 100644
--- a/context/data/scite/lexers/data/scite-context-data-metafun.lua
+++ b/context/data/scite/lexers/data/scite-context-data-metafun.lua
@@ -1,4 +1,4 @@
return {
- ["commands"]={ "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "acosh", "asinh", "sinh", "cosh", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", "withshading", "shadedinto", "withcircularshade", "withlinearshade", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "withmask", "figure", "register", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", "infont", "set_linear_vector", "linear_shade", "define_linear_shade", "define_circular_linear_shade", "define_sampled_linear_shade", "set_circular_vector", "circular_shade", "define_circular_shade", "define_circular_linear_shade", "define_sampled_circular_shade", "space", "CRLF", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedpath", "constructedpairs", "punkedfunction", "curvedfunction", "tightfunction", "punkedpath", "curvedpath", "tightpath", "punkedpairs", "curvedpairs", "tightpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "normalfill", "normaldraw", "visualizepaths", "naturalizepaths", "drawboundary", "drawwholepath", "visualizeddraw", "visualizedfill", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "decorated", "redecorated", "undecorated", "passvariable", "tostring", "format", "formatted" },
+ ["commands"]={ "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "acosh", "asinh", "sinh", "cosh", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", "withshading", "shadedinto", "withcircularshade", "withlinearshade", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "withmask", "figure", "register", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", "infont", "set_linear_vector", "linear_shade", "define_linear_shade", "define_circular_linear_shade", "define_sampled_linear_shade", "set_circular_vector", "circular_shade", "define_circular_shade", "define_circular_linear_shade", "define_sampled_circular_shade", "space", "CRLF", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedpath", "constructedpairs", "punkedfunction", "curvedfunction", "tightfunction", "punkedpath", "curvedpath", "tightpath", "punkedpairs", "curvedpairs", "tightpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "normalfill", "normaldraw", "visualizepaths", "naturalizepaths", "drawboundary", "drawwholepath", "visualizeddraw", "visualizedfill", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "format", "formatted", "startpassingvariable", "stoppassingvariable" },
["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "textextoffset", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "metapostversion", "maxdimensions" },
} \ No newline at end of file
diff --git a/context/data/scite/scite-context-data-metafun.properties b/context/data/scite/scite-context-data-metafun.properties
index 03bc6c040..c0b080982 100644
--- a/context/data/scite/scite-context-data-metafun.properties
+++ b/context/data/scite/scite-context-data-metafun.properties
@@ -44,7 +44,8 @@ visualizedfill draworigin drawboundingbox drawpath drawpoint \
drawpoints drawcontrolpoints drawcontrollines drawpointlabels drawlineoptions \
drawpointoptions drawcontroloptions drawlabeloptions draworiginoptions drawboundoptions \
drawpathoptions resetdrawoptions undashed decorated redecorated \
-undecorated passvariable tostring format formatted
+undecorated passvariable passarrayvariable tostring format \
+formatted startpassingvariable stoppassingvariable
keywordclass.metafun.internals=\
nocolormodel greycolormodel graycolormodel rgbcolormodel \
diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv
index 9395cac8c..12840b28e 100644
--- a/metapost/context/base/mp-mlib.mpiv
+++ b/metapost/context/base/mp-mlib.mpiv
@@ -940,7 +940,7 @@ def mfun_array_to_lua(expr key)(suffix value)(expr first, last, stp)(text t) =
special
"metapost.variables['" & key & "']={"
for i=first step stp until last :
- & t(value[i]) & ","
+ & "[" & decimal i & "]=" & t(value[i]) & ","
endfor
& "}" ;
enddef ;
@@ -971,14 +971,17 @@ enddef ;
def startpassingvariable(expr k) =
begingroup ;
- save stoppassingvariable, startarray, stoparray, starthash, stophash, key, value ;
+ save stoppassingvariable, startarray, stoparray, starthash, stophash, index, key, value, slot, entry ;
let stoppassingvariable = mfun_stop_lua_variable ;
let startarray = mfun_start_lua_array ;
let stoparray = mfun_stop_lua_array ;
let starthash = mfun_start_lua_hash ;
let stophash = mfun_stop_lua_hash ;
+ let index = mfun_lua_index ;
let key = mfun_lua_key ;
let value = mfun_lua_value ;
+ let slot = mfun_lua_slot ;
+ let entry = mfun_lua_entry ;
save s ; string s ;
s := "metapost.variables['" & k & "']="
enddef ;
@@ -989,6 +992,8 @@ def mfun_stop_lua_variable =
endgroup ;
enddef ;
+% currently there is no difference between array and hash
+
def mfun_start_lua_array =
& "{"
enddef ;
@@ -1009,6 +1014,10 @@ def mfun_lua_key(expr k) =
& "['" & k & "']="
enddef ;
+def mfun_lua_index(expr k) =
+ & "[" & decimal k & "]="
+enddef ;
+
def mfun_lua_value(expr v) =
if numeric v : & mfun_numeric_to_lua(v) & ","
elseif pair v : & mfun_pair_to_lua(v) & ","
@@ -1021,6 +1030,16 @@ def mfun_lua_value(expr v) =
fi
enddef ;
+def mfun_lua_entry(expr k, v) =
+ mfun_lua_key(k)
+ mfun_lua_value(v)
+enddef ;
+
+def mfun_lua_slot(expr k, v) =
+ mfun_lua_index(k)
+ mfun_lua_value(v)
+enddef ;
+
% moved here from mp-grap.mpiv
vardef escaped_format(expr s) =
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index fd4d7d417..433685999 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.22 15:54}
+\newcontextversion{2013.12.22 19:05}
%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 93b162f8d..6fddaff80 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 193177d14..8e82668fb 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.22 15:54}
+\edef\contextversion{2013.12.22 19:05}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua
index f10d28bf8..6bb08bd1d 100644
--- a/tex/context/base/mlib-pdf.lua
+++ b/tex/context/base/mlib-pdf.lua
@@ -17,7 +17,9 @@ local formatters = string.formatters
local report_metapost = logs.reporter("metapost")
-local mplib, context = mplib, context
+local trace_variables = false trackers.register("metapost.variables",function(v) trace_variables = v end)
+
+local mplib, context = mplib, context
local allocate = utilities.storage.allocate
@@ -282,14 +284,14 @@ 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 * 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:") * 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:") * p_number
@@ -336,7 +338,7 @@ function commands.mprunvar(key,n) -- should be defined in another lib
end
end
-function metapost.untagvariable(str,variables)
+function metapost.untagvariable(str,variables) -- will be redone
if variables == false then
return lpegmatch(pattern_lst,str)
else
@@ -351,9 +353,12 @@ end
function metapost.processspecial(str)
local code = loadstring(str)
if code then
+ if trace_variables then
+ report_metapost("executing special code: %s",str)
+ end
code()
else
- report_metapost("invalid special: %s",str)
+ report_metapost("invalid special code: %s",str)
end
end
diff --git a/tex/context/base/mult-fun.lua b/tex/context/base/mult-fun.lua
index fea1b0cc0..2101b95e9 100644
--- a/tex/context/base/mult-fun.lua
+++ b/tex/context/base/mult-fun.lua
@@ -100,6 +100,7 @@ return {
--
"decorated", "redecorated", "undecorated",
--
- "passvariable", "tostring", "format", "formatted",
+ "passvariable", "passarrayvariable", "tostring", "format", "formatted",
+ "startpassingvariable", "stoppassingvariable",
},
}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index d89b1518c..ffa1b6e2c 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.pdf b/tex/context/base/status-lua.pdf
index 3f518e547..11aabfd82 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 268282011..bf787ba6d 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/22/13 15:54:26
+-- merge date : 12/22/13 19:05:41
do -- begin closure to overcome local limits and interference