diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2010-05-24 14:05:02 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2010-05-24 14:05:02 +0000 |
commit | 57ea7dad48fbf2541c04e434c31bde655ada3ac4 (patch) | |
tree | 1f8b43bc7cb92939271e1f5bec610710be69097f /Master/texmf-dist/tex/context/base/mlib-pdf.lua | |
parent | 6ee41e1f1822657f7f23231ec56c0272de3855e3 (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/mlib-pdf.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mlib-pdf.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/context/base/mlib-pdf.lua b/Master/texmf-dist/tex/context/base/mlib-pdf.lua index 38b61b0ba97..352070408c1 100644 --- a/Master/texmf-dist/tex/context/base/mlib-pdf.lua +++ b/Master/texmf-dist/tex/context/base/mlib-pdf.lua @@ -1,12 +1,12 @@ if not modules then modules = { } end modules ['mlib-pdf'] = { version = 1.001, - comment = "companion to mlib-ctx.tex", + comment = "companion to mlib-ctx.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files", } -local format, concat = string.format, table.concat +local format, concat, gsub = string.format, table.concat, string.gsub local texsprint = tex.sprint local abs, sqrt, round = math.abs, math.sqrt, math.round @@ -119,7 +119,7 @@ function metapost.flushers.pdf.flushfigure(pdfliterals) -- table end function metapost.flushers.pdf.textfigure(font,size,text,width,height,depth) -- we could save the factor - text = text:gsub(".","\\hbox{%1}") -- kerning happens in metapost (i have to check if this is true for mplib) + text = gsub(text,".","\\hbox{%1}") -- kerning happens in metapost (i have to check if this is true for mplib) texsprint(ctxcatcodes,format("\\MPLIBtextext{%s}{%s}{%s}{%s}{%s}",font,size,text,0,-number.dimenfactors.bp*depth)) end @@ -155,6 +155,7 @@ local function curved(ith,pth) end local function flushnormalpath(path, t, open) + t = t or { } local pth, ith for i=1,#path do pth = path[i] @@ -183,6 +184,7 @@ local function flushnormalpath(path, t, open) end local function flushconcatpath(path, t, open) + t = t or { } t[#t+1] = format("%f %f %f %f %f %f cm", sx, rx, ry, sy, tx ,ty) local pth, ith for i=1,#path do |