summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/m-zint.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/m-zint.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/m-zint.mkiv12
1 files changed, 8 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/m-zint.mkiv b/Master/texmf-dist/tex/context/base/m-zint.mkiv
index 3e6f7ab4366..95b265c5724 100644
--- a/Master/texmf-dist/tex/context/base/m-zint.mkiv
+++ b/Master/texmf-dist/tex/context/base/m-zint.mkiv
@@ -5,7 +5,7 @@
%D subtitle=Zint Barcode Generator,
%D author=Hans Hagen,
%D date=\currentdate,
-%D copyright=PRAGMA]
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
@@ -47,6 +47,9 @@ local function numberofcode(code)
if not reverse then
local types = os.resultof(format("%s --types",zint)) or ""
local formats = lpeg.match(pattern,types)
+ if not formats or not next(formats) then
+ return code
+ end
reverse = table.swapped(formats) or { }
end
code = cleancode(code)
@@ -65,14 +68,15 @@ function moduledata.zint.generate(code,data,suffix,options)
local code = numberofcode(code)
logs.simple("using 'zint' to generate '%s'",base)
io.savedata(temp,data)
- os.execute(format('%s --barcode=%s --output="%s" --input="%s"',zint,code,name,temp,options or ""))
+ os.execute(format('%s --barcode=%s --output="%s" --input="%s" %s',zint,code,name,temp,options or ""))
+ os.remove(temp)
end
- return name
+ return name
end
\stopluacode
-\doifnotmode{demo}{\endinput}
+\continueifinputfile{m-zint.mkiv}
\starttext