diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-31 20:15:47 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-31 20:15:47 +0200 |
commit | ad6c001890494bd0432aaf76940b38a997042c03 (patch) | |
tree | 0e95d32d8e3fcafda7ed1f0c33e5739303560036 /scripts | |
parent | ecea0b75f52a98aae0e6bcfb649927fb84ffb9c0 (diff) | |
download | context-ad6c001890494bd0432aaf76940b38a997042c03.tar.gz |
2016-03-31 19:50:00
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtx-context.lua | 31 | ||||
-rw-r--r-- | scripts/context/lua/mtx-context.xml | 6 |
2 files changed, 26 insertions, 11 deletions
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 @@ <flag name="synctex"> <short>run with synctex enabled (optional value: zipped, unzipped, 1, -1)</short> </flag> + <flag name="nodates"> + <short>omit runtime dates in pdf file</short> + </flag> + <flag name="trailerid"> + <short>alternative trailer id (or constant one)</short> + </flag> </subcategory> <subcategory> <flag name="generate"> |