summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/context/lua/mtx-convert.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/context/lua/mtx-convert.lua')
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-convert.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-convert.lua b/Master/texmf-dist/scripts/context/lua/mtx-convert.lua
index c0c383b176f..62198a62188 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-convert.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-convert.lua
@@ -11,7 +11,7 @@ if not modules then modules = { } end modules ['mtx-convert'] = {
graphics = graphics or { }
graphics.converters = graphics.converters or { }
-local gsprogram = (os.platform == "windows" and "gswin32c") or "gs"
+local gsprogram = (os.type == "windows" and "gswin32c") or "gs"
local gstemplate = "%s -q -sDEVICE=pdfwrite -dEPSCrop -dNOPAUSE -dNOCACHE -dBATCH -dAutoRotatePages=/None -dProcessColorModel=/DeviceCMYK -sOutputFile=%s %s -c quit"
function graphics.converters.eps(oldname,newname)
@@ -31,6 +31,7 @@ function graphics.converters.jpg(oldname,newname)
return imtemplate[quality]:format(improgram,oldname,newname)
end
+graphics.converters.gif = graphics.converters.jpg
graphics.converters.tif = graphics.converters.jpg
graphics.converters.tiff = graphics.converters.jpg
graphics.converters.png = graphics.converters.jpg
@@ -111,13 +112,14 @@ function scripts.convert.convertall()
end
function scripts.convert.convertgiven()
- for _, name in ipairs(environment.files) do
- graphics.converters.convertfile(name)
+ local files = environment.files
+ for i=1,#files do
+ graphics.converters.convertfile(files[i])
end
end
-logs.extendbanner("Graphic Conversion Tools 0.10",true)
+logs.extendbanner("ConTeXT Graphic Conversion Helpers 0.10",true)
messages.help = [[
--convertall convert all graphics on path