diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
commit | d7ccb42582f85acf30568913610ccf4d602023fb (patch) | |
tree | 7292e3545a420676878e7451b68892d360c62cb6 /Master/texmf-dist/tex/context/base/m-pstricks.lua | |
parent | 2d62a6fe9b80def59c392268022f1f9a2d6e358f (diff) |
commit context 2011.05.18
git-svn-id: svn://tug.org/texlive/trunk@22719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/m-pstricks.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/m-pstricks.lua | 15 |
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 |