summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-05-18 22:26:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-05-18 22:26:00 +0200
commit819217701ac4baf8b6099c8f8475ae22597454d4 (patch)
tree126d2efce6812cb8d8bd2f564e2699b9b2a77b5f /tex
parent1a4587e7d792561d779de21e88eb424539085090 (diff)
downloadcontext-819217701ac4baf8b6099c8f8475ae22597454d4.tar.gz
beta 2011.05.18 22:26
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/back-pdf.lua6
-rw-r--r--tex/context/base/colo-ini.lua39
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/l-table.lua16
-rw-r--r--tex/context/base/spac-ver.mkiv2
-rw-r--r--tex/context/base/status-files.pdfbin23577 -> 23581 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin154401 -> 154400 bytes
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua17
11 files changed, 68 insertions, 20 deletions
diff --git a/tex/context/base/back-pdf.lua b/tex/context/base/back-pdf.lua
index 33cb8c975..32f5d3504 100644
--- a/tex/context/base/back-pdf.lua
+++ b/tex/context/base/back-pdf.lua
@@ -207,6 +207,11 @@ end
-- beware: xpdf/okular/evince cannot handle the spot->process shade
+-- This should become delayed i.e. only flush when used; in that case we need
+-- need to store the specification and then flush them when accesssomespotcolor
+-- is called. At this moment we assume that splotcolors that get defined are
+-- also used which keeps the overhad small anyway.
+
local processcolors
local function registersomespotcolor(name,noffractions,names,p,colorspace,range,funct)
@@ -365,7 +370,6 @@ local function indexcolorref(name) -- actually, names (parent) is the hash
end
function registrations.rgbspotcolor(name,noffractions,names,p,r,g,b)
---~ print(name,noffractions,names,p,r,g,b)
if noffractions == 1 then
registersomespotcolor(name,noffractions,names,p,pdf_device_rgb,pdf_rbg_range,format(rgb_function,r,g,b))
else
diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua
index c4e802ff5..7e0a4ac76 100644
--- a/tex/context/base/colo-ini.lua
+++ b/tex/context/base/colo-ini.lua
@@ -445,7 +445,7 @@ function colors.mpcolor(model,ca,ta,default) -- will move to mlib-col
elseif model == 4 then
return format("transparent(%s,%s,cmyk(%s,%s,%s,%s))",tv[1],tv[2],cv[6],cv[7],cv[8],cv[9])
else
- return format("transparent(%s,%s,multitonecolor(\"%s\",%s,\"%s\",\"%s\"))",tv[1],tv[2],cv[10],cv[11],cv[12],cv[13])
+ return format('transparent(%s,%s,multitonecolor("%s",%s,"%s","%s"))',tv[1],tv[2],cv[10],cv[11],cv[12],cv[13])
end
else
if model == 2 then
@@ -455,7 +455,7 @@ function colors.mpcolor(model,ca,ta,default) -- will move to mlib-col
elseif model == 4 then
return format("cmyk(%s,%s,%s,%s)",cv[6],cv[7],cv[8],cv[9])
else
- return format("multitonecolor(\"%s\",%s,\"%s\",\"%s\")",cv[10],cv[11],cv[12],cv[13])
+ return format('multitonecolor("%s",%s,"%s","%s")',cv[10],cv[11],cv[12],cv[13])
end
end
else
@@ -464,6 +464,41 @@ function colors.mpcolor(model,ca,ta,default) -- will move to mlib-col
end
end
+--~ function colors.mpcolor(model,ca,ta,default) -- will move to mlib-col
+--~ local cv = colors.supported and colors.value(ca) -- faster when direct colors.values[ca]
+--~ if cv then
+--~ local tv = transparencies.supported and transparencies.value(ta)
+--~ if model == 1 then
+--~ model = cv[1]
+--~ end
+--~ model = forcedmodel(model)
+--~ if tv then
+--~ if model == 2 then
+--~ return format("(%s,%s,%s) withtransparency (%s,%s)",tv[1],tv[2],cv[3],cv[4],cv[5])
+--~ elseif model == 3 then
+--~ return format("(%s,%s,%s) withtransparency (%s,%s)",tv[1],tv[2],cv[3],cv[4],cv[5])
+--~ elseif model == 4 then
+--~ return format("(%s,%s,%s,%s) withtransparency(%s,%s)",tv[1],tv[2],cv[6],cv[7],cv[8],cv[9])
+--~ else
+--~ return format('multitonecolor("%s",%s,"%s","%s") withtransparency (%s,%s)',tv[1],tv[2],cv[10],cv[11],cv[12],cv[13])
+--~ end
+--~ else
+--~ if model == 2 then
+--~ return format("(%s,%s,%s)",cv[3],cv[4],cv[5])
+--~ elseif model == 3 then
+--~ return format("(%s,%s,%s)",cv[3],cv[4],cv[5])
+--~ elseif model == 4 then
+--~ return format("cmyk(%s,%s,%s,%s)",cv[6],cv[7],cv[8],cv[9])
+--~ else
+--~ return format('multitonecolor("%s",%s,"%s","%s")',cv[10],cv[11],cv[12],cv[13])
+--~ end
+--~ end
+--~ else
+--~ default = default or 0 -- rgb !
+--~ return format("(%s,%s,%s)",default,default,default)
+--~ end
+--~ end
+
function colors.formatcolor(ca,separator)
local cv = colors.value(ca)
if cv then
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 1a81454d6..a147f13e5 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2011.05.18 18:04}
+\newcontextversion{2011.05.18 22:26}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 3bda269ef..3de057567 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{2011.05.18 18:04}
+\newcontextversion{2011.05.18 22:26}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 7312bdcf5..1613819a6 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.05.18 18:04}
+\edef\contextversion{2011.05.18 22:26}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 8f3586dea..74ea5ff80 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.05.18 18:04}
+\edef\contextversion{2011.05.18 22:26}
%D For those who want to use this:
diff --git a/tex/context/base/l-table.lua b/tex/context/base/l-table.lua
index 8fdb36a7f..9f5bf6eda 100644
--- a/tex/context/base/l-table.lua
+++ b/tex/context/base/l-table.lua
@@ -10,6 +10,7 @@ local type, next, tostring, tonumber, ipairs, table, string = type, next, tostri
local concat, sort, insert, remove = table.concat, table.sort, table.insert, table.remove
local format, find, gsub, lower, dump, match = string.format, string.find, string.gsub, string.lower, string.dump, string.match
local getmetatable, setmetatable = getmetatable, setmetatable
+local getinfo = debug.getinfo
-- Starting with version 5.2 Lua no longer provide ipairs, which makes
-- sense. As we already used the for loop and # in most places the
@@ -357,6 +358,8 @@ end
-- problem: there no good number_to_string converter with the best resolution
+local function dummy() end
+
local function do_serialize(root,name,depth,level,indexed)
if level > 0 then
depth = depth .. " "
@@ -551,19 +554,20 @@ local function do_serialize(root,name,depth,level,indexed)
end
elseif t == "function" then
if functions then
+ local f = getinfo(v).what == "C" and dump(dummy) or dump(v)
+ -- local f = getinfo(v).what == "C" and dump(function(...) return v(...) end) or dump(v)
if tk == "number" then -- or find(k,"^%d+$") then
if hexify then
- handle(format("%s [0x%04X]=loadstring(%q),",depth,k,dump(v)))
+ handle(format("%s [0x%04X]=loadstring(%q),",depth,k,f))
else
- handle(format("%s [%s]=loadstring(%q),",depth,k,dump(v)))
+ handle(format("%s [%s]=loadstring(%q),",depth,k,f))
end
elseif tk == "boolean" then
- handle(format("%s [%s]=loadstring(%q),",depth,tostring(k),dump(v)))
+ handle(format("%s [%s]=loadstring(%q),",depth,tostring(k),f))
elseif noquotes and not reserved[k] and find(k,"^%a[%w%_]*$") then
- handle(format("%s %s=loadstring(%q),",depth,k,dump(v)))
+ handle(format("%s %s=loadstring(%q),",depth,k,f))
else
- -- handle(format("%s [%q]=loadstring(%q),",depth,k,dump(v)))
- handle(format("%s [%q]=loadstring(%q),",depth,k,debug.getinfo(v).what == "C" and "C code" or dump(v)))
+ handle(format("%s [%q]=loadstring(%q),",depth,k,f))
end
end
else
diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv
index d04ed6724..897e9c9d7 100644
--- a/tex/context/base/spac-ver.mkiv
+++ b/tex/context/base/spac-ver.mkiv
@@ -1374,7 +1374,7 @@
\resetsystemmode\v!grid
\resetsnapvalue}
-\def\docheckgridsnappinyes
+\def\docheckgridsnappingyes
{\gridsnappingtrue
\setsystemmode\v!grid
\autosetsnapvalue\askedgridmode}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index fb377d90e..dbec9b2f0 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 ac8fc6ac3..f867291bf 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-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 7e954182a..3036e2f81 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 05/18/11 18:04:18
+-- merge date : 05/18/11 22:26:32
do -- begin closure to overcome local limits and interference
@@ -783,6 +783,7 @@ local type, next, tostring, tonumber, ipairs, table, string = type, next, tostri
local concat, sort, insert, remove = table.concat, table.sort, table.insert, table.remove
local format, find, gsub, lower, dump, match = string.format, string.find, string.gsub, string.lower, string.dump, string.match
local getmetatable, setmetatable = getmetatable, setmetatable
+local getinfo = debug.getinfo
-- Starting with version 5.2 Lua no longer provide ipairs, which makes
-- sense. As we already used the for loop and # in most places the
@@ -1130,6 +1131,8 @@ end
-- problem: there no good number_to_string converter with the best resolution
+local function dummy() end
+
local function do_serialize(root,name,depth,level,indexed)
if level > 0 then
depth = depth .. " "
@@ -1324,18 +1327,20 @@ local function do_serialize(root,name,depth,level,indexed)
end
elseif t == "function" then
if functions then
+ local f = getinfo(v).what == "C" and dump(dummy) or dump(v)
+ -- local f = getinfo(v).what == "C" and dump(function(...) return v(...) end) or dump(v)
if tk == "number" then -- or find(k,"^%d+$") then
if hexify then
- handle(format("%s [0x%04X]=loadstring(%q),",depth,k,dump(v)))
+ handle(format("%s [0x%04X]=loadstring(%q),",depth,k,f))
else
- handle(format("%s [%s]=loadstring(%q),",depth,k,dump(v)))
+ handle(format("%s [%s]=loadstring(%q),",depth,k,f))
end
elseif tk == "boolean" then
- handle(format("%s [%s]=loadstring(%q),",depth,tostring(k),dump(v)))
+ handle(format("%s [%s]=loadstring(%q),",depth,tostring(k),f))
elseif noquotes and not reserved[k] and find(k,"^%a[%w%_]*$") then
- handle(format("%s %s=loadstring(%q),",depth,k,dump(v)))
+ handle(format("%s %s=loadstring(%q),",depth,k,f))
else
- handle(format("%s [%q]=loadstring(%q),",depth,k,dump(v)))
+ handle(format("%s [%q]=loadstring(%q),",depth,k,f))
end
end
else