diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-04-08 15:15:05 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-04-08 15:15:05 +0200 |
commit | 32948ef106b3d0bbe9c0d7622c292a42080f7dbe (patch) | |
tree | 30df675c0fdcb654b636359aabfb9bb9f1b0a9cc /tex/context/base/luat-run.lua | |
parent | f1cde6067499874bf126dfc6f5bedb598f117073 (diff) | |
download | context-32948ef106b3d0bbe9c0d7622c292a42080f7dbe.tar.gz |
2015-04-08 14:22:00
Diffstat (limited to 'tex/context/base/luat-run.lua')
-rw-r--r-- | tex/context/base/luat-run.lua | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/tex/context/base/luat-run.lua b/tex/context/base/luat-run.lua index e71215f13..65cf0f338 100644 --- a/tex/context/base/luat-run.lua +++ b/tex/context/base/luat-run.lua @@ -130,31 +130,21 @@ luatex.registerstopactions(luatex.cleanuptempfiles) -- for the moment here -local synctex = false - local report_system = logs.reporter("system") +local synctex = 0 directives.register("system.synctex", function(v) - synctex = v - if v then - report_system("synctex functionality is enabled!") + synctex = tonumber(v) or (toboolean(v,true) and 1) or (v == "zipped" and 1) or (v == "unzipped" and -1) or 0 + if synctex ~= 0 then + report_system("synctex functionality is enabled (%s)!",tostring(synctex)) else report_system("synctex functionality is disabled!") end - synctex = tonumber(synctex) or (toboolean(synctex,true) and 1) or (synctex == "zipped" and 1) or (synctex == "unzipped" and -1) or false - -- currently this is bugged: - tex.synctex = synctex - -- so for the moment we need: - context.normalsynctex() - if synctex then - context.plusone() - else - context.zerocount() - end + tex.normalsynctex = synctex end) statistics.register("synctex tracing",function() - if synctex or tex.synctex ~= 0 then + if synctex ~= 0 then return "synctex has been enabled (extra log file generated)" end end) |