From ad6c001890494bd0432aaf76940b38a997042c03 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Thu, 31 Mar 2016 20:15:47 +0200 Subject: 2016-03-31 19:50:00 --- scripts/context/lua/mtx-context.lua | 31 ++++++++++++++++++++----------- scripts/context/lua/mtx-context.xml | 6 ++++++ 2 files changed, 26 insertions(+), 11 deletions(-) (limited to 'scripts') diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua index c43e5a98c..7c64687b9 100644 --- a/scripts/context/lua/mtx-context.lua +++ b/scripts/context/lua/mtx-context.lua @@ -76,6 +76,8 @@ local application = logs.application { -- ["shell-escape"] = true, -- enable \write18{SHELL COMMAND} -- ["no-shell-escape"] = true, -- disable \write18{SHELL COMMAND} -- ["shell-restricted"] = true, -- restrict \write18 to a list of commands given in texmf.cnf +-- ["nodates"] = true, -- no production dates in pdf file +-- ["trailerid"] = true, -- alternative trailer id -- ["synctex"] = true, -- enable synctex -- ["version"] = true, -- display version and exit -- ["luaonly"] = true, -- run a lua file, then exit @@ -591,6 +593,8 @@ function scripts.context.run(ctxdata,filename) local a_keeptuc = getargument("keeptuc") local a_keeplog = getargument("keeplog") local a_export = getargument("export") + local a_nodates = getargument("nodates") + local a_trailerid = getargument("trailerid") -- the following flag is not officially supported because i cannot forsee -- side effects (so no bug reports please) .. we provide --sandbox that @@ -750,21 +754,26 @@ function scripts.context.run(ctxdata,filename) c_flags.usemodule = "timing" end -- - if not a_profile then - -- okay - elseif c_flags.directives then - c_flags.directives = format("system.profile,%s",c_flags.directives) - else - c_flags.directives = "system.profile" + local directives = { } + -- + if a_nodates then + directives[#directives+1] = "backend.nodates" + end + -- + if a_trailerid then + directives[#directives+1] = format("backend.trailerid=%s",a_trailerid) + end + -- + if a_profile then + directives[#directives+1] = "system.profile" end -- if a_synctex then report("warning: synctex is enabled") -- can add upto 5% runtime - if c_flags.directives then - c_flags.directives = format("system.synctex=%s,%s",a_synctex,c_flags.directives) - else - c_flags.directives = format("system.synctex=%s",a_synctex) - end + directives[#directives+1] = format("system.synctex=%s",a_synctex) + end + if #directives > 0 then + c_flags.directives = concat(directives,",") end -- -- kindofrun: 1:first run, 2:successive run, 3:once, 4:last of maxruns diff --git a/scripts/context/lua/mtx-context.xml b/scripts/context/lua/mtx-context.xml index 46e586153..f5a674241 100644 --- a/scripts/context/lua/mtx-context.xml +++ b/scripts/context/lua/mtx-context.xml @@ -128,6 +128,12 @@ run with synctex enabled (optional value: zipped, unzipped, 1, -1) + + omit runtime dates in pdf file + + + alternative trailer id (or constant one) + -- cgit v1.2.3