summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mlib-pdf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mlib-pdf.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mlib-pdf.lua8
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