summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/back-pdf.lua
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2010-05-24 14:05:02 +0000
committerTaco Hoekwater <taco@elvenkind.com>2010-05-24 14:05:02 +0000
commit57ea7dad48fbf2541c04e434c31bde655ada3ac4 (patch)
tree1f8b43bc7cb92939271e1f5bec610710be69097f /Master/texmf-dist/tex/context/base/back-pdf.lua
parent6ee41e1f1822657f7f23231ec56c0272de3855e3 (diff)
here is context 2010.05.24 13:05
git-svn-id: svn://tug.org/texlive/trunk@18445 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/back-pdf.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/back-pdf.lua36
1 files changed, 20 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/context/base/back-pdf.lua b/Master/texmf-dist/tex/context/base/back-pdf.lua
index 908801d8a95..54e22f1a2bd 100644
--- a/Master/texmf-dist/tex/context/base/back-pdf.lua
+++ b/Master/texmf-dist/tex/context/base/back-pdf.lua
@@ -1,6 +1,6 @@
if not modules then modules = { } end modules ['back-pdf'] = {
version = 1.001,
- comment = "companion to back-pdf.tex",
+ comment = "companion to back-pdf.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
@@ -21,8 +21,7 @@ local concat = table.concat
local round = math.round
local utfcharacters, utfvalues = string.utfcharacters, string.utfvalues
local texsprint, texwrite = tex.sprint, tex.write
-
-ctxcatcodes = tex.ctxcatcodes
+local ctxcatcodes = tex.ctxcatcodes
local copy_node = node.copy
@@ -32,14 +31,18 @@ local registrations = backends.pdf.registrations
local pdfliteral, register = nodes.pdfliteral, nodes.register
-local pdfconstant = lpdf.constant
-local pdfdictionary = lpdf.dictionary
-local pdfarray = lpdf.array
-local pdfreference = lpdf.reference
-local pdfverbose = lpdf.verbose
+local pdfconstant = lpdf.constant
+local pdfstring = lpdf.string
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfreference = lpdf.reference
+local pdfverbose = lpdf.verbose
+local pdfflushobject = lpdf.flushobject
+local pdfreserveobject = lpdf.reserveobject
+local pdfannotation = nodes.pdfannotation
-local pdfreserveobj = pdf.reserveobj
-local pdfimmediateobj = pdf.immediateobj
+local pdfreserveobj = pdf.reserveobj
+local pdfimmediateobj = pdf.immediateobj
function nodeinjections.rgbcolor(r,g,b)
return register(pdfliteral(format("%s %s %s rg %s %s %s RG",r,g,b,r,g,b)))
@@ -55,7 +58,7 @@ end
function nodeinjections.spotcolor(n,f,d,p)
if type(p) == "string" then
- p = p:gsub(","," ") -- brr misuse of spot
+ p = gsub(p,","," ") -- brr misuse of spot
end
return register(pdfliteral(format("/%s cs /%s CS %s SCN %s scn",n,n,p,p)))
end
@@ -72,9 +75,9 @@ local effects = {
hidden = 3,
}
-function nodeinjections.effect(stretch,rulethickness,effect)
+function nodeinjections.effect(effect,stretch,rulethickness)
-- always, no zero test (removed)
- rulethickness = number.dimenfactors["bp"]*rulethickness
+ rulethickness = number.dimenfactors["bp"] * rulethickness
effect = effects[effect] or effects['normal']
return register(pdfliteral(format("%s Tc %s w %s Tr",stretch,rulethickness,effect))) -- watch order
end
@@ -131,7 +134,7 @@ function codeinjections.insertmovie(specification)
Movie = moviedict,
A = controldict,
}
- node.write(nodes.pdfannot(width,height,0,action()))
+ node.write(pdfannotation(width,height,0,action()))
end
function codeinjections.insertsound(specification)
@@ -151,7 +154,7 @@ function codeinjections.insertsound(specification)
Movie = sounddict,
A = controldict,
}
- node.write(nodes.pdfannot(0,0,0,action()))
+ node.write(pdfannotation(0,0,0,action()))
end
end
@@ -162,7 +165,7 @@ local pdf_indexed = pdfconstant("Indexed")
local pdf_device_n = pdfconstant("DeviceN")
local pdf_device_rgb = pdfconstant("DeviceRGB")
local pdf_device_cmyk = pdfconstant("DeviceCMYK")
-local pdf_device_gray = pdfconstant("Devicegray")
+local pdf_device_gray = pdfconstant("DeviceGray")
local pdf_extgstate = pdfconstant("ExtGState")
local pdf_rbg_range = pdfarray { 0, 1, 0, 1, 0, 1 }
@@ -303,6 +306,7 @@ 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