summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/m-pstricks.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/m-pstricks.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/m-pstricks.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/m-pstricks.lua b/Master/texmf-dist/tex/context/base/m-pstricks.lua
index 35cae93f65f..ab271908496 100644
--- a/Master/texmf-dist/tex/context/base/m-pstricks.lua
+++ b/Master/texmf-dist/tex/context/base/m-pstricks.lua
@@ -17,8 +17,9 @@ if not modules then modules = { } end modules ['m-pstricks'] = {
local format, lower, concat, gmatch = string.format, string.lower, table.concat, string.gmatch
local variables = interfaces.variables
-plugins = plugins or { }
-plugins.pstricks = plugins.pstricks or { }
+moduledata.pstricks = moduledata.pstricks or { }
+
+local report_pstricks = logs.reporter("pstricks")
local template = [[
\starttext
@@ -41,16 +42,16 @@ local template = [[
local modules = { }
local graphics = 0
-function plugins.pstricks.usemodule(names)
+function moduledata.pstricks.usemodule(names)
for name in gmatch(names,"([^%s,]+)") do
modules[#modules+1] = format([[\readfile{%s}{}{}]],name)
end
end
-function plugins.pstricks.process(n)
+function moduledata.pstricks.process(n)
graphics = graphics + 1
local name = string.format("%s-pstricks-%04i",tex.jobname,graphics)
- local data = buffers.collect("def-"..n)
+ local data = buffers.collectcontent("def-"..n)
local tmpfile = name .. ".tmp"
local epsfile = name .. ".ps"
local pdffile = name .. ".pdf"
@@ -65,9 +66,9 @@ function plugins.pstricks.process(n)
if lfs.isfile(pdffile) then
context.externalfigure( { pdffile }, { object = variables.no } )
else
- logs.report("plugins","pstricks run failed, no pdf file")
+ report_pstricks("run failed, no pdf file")
end
else
- logs.report("plugins","pstricks run failed, no ps file")
+ report_pstricks("run failed, no ps file")
end
end