summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/luat-fio.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/luat-fio.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/luat-fio.lua91
1 files changed, 47 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/context/base/luat-fio.lua b/Master/texmf-dist/tex/context/base/luat-fio.lua
index 0d1bd18087b..5deb704f607 100644
--- a/Master/texmf-dist/tex/context/base/luat-fio.lua
+++ b/Master/texmf-dist/tex/context/base/luat-fio.lua
@@ -11,68 +11,71 @@ local texiowrite = (texio and texio.write) or print
local format = string.format
-texconfig.kpse_init = false
-texconfig.trace_file_names = true -- also influences pdf fonts reporting .. todo
-texconfig.max_print_line = 100000
-
-kpse = { } setmetatable(kpse, { __index = function(k,v) return input[v] end } )
-
--- if still present, we overload kpse (put it off-line so to say)
+texconfig.kpse_init = false
+texconfig.shell_escape = 't'
+texconfig.max_in_open = 127
+texconfig.max_print_line = 100000
if not resolvers.instance then
resolvers.reset()
- resolvers.instance.progname = 'context'
- resolvers.instance.engine = 'luatex'
resolvers.instance.validfile = resolvers.validctxfile
+ -- we now load the file database as we might need files other than
+ -- tex and lua file on the given path
+
+ -- trackers.enable("resolvers.*")
resolvers.load()
+ -- trackers.disable("resolvers.*")
+
+ local findbinfile, loadbinfile = resolvers.findbinfile, resolvers.loadbinfile
+ local findtexfile, opentexfile = resolvers.findtexfile, resolvers.opentexfile
if callback then
- callback.register('find_read_file' , function(id,name) return resolvers.findtexfile(name) end)
- callback.register('open_read_file' , function( name) return resolvers.opentexfile(name) end)
-
- callback.register('find_data_file' , function(name) return resolvers.findbinfile(name,"tex") end)
- callback.register('find_enc_file' , function(name) return resolvers.findbinfile(name,"enc") end)
- callback.register('find_font_file' , function(name) return resolvers.findbinfile(name,"tfm") end)
- callback.register('find_format_file' , function(name) return resolvers.findbinfile(name,"fmt") end)
- callback.register('find_image_file' , function(name) return resolvers.findbinfile(name,"tex") end)
- callback.register('find_map_file' , function(name) return resolvers.findbinfile(name,"map") end)
- callback.register('find_ocp_file' , function(name) return resolvers.findbinfile(name,"ocp") end)
- callback.register('find_opentype_file' , function(name) return resolvers.findbinfile(name,"otf") end)
- callback.register('find_output_file' , function(name) return name end)
- callback.register('find_pk_file' , function(name) return resolvers.findbinfile(name,"pk") end)
- callback.register('find_sfd_file' , function(name) return resolvers.findbinfile(name,"sfd") end)
- callback.register('find_truetype_file' , function(name) return resolvers.findbinfile(name,"ttf") end)
- callback.register('find_type1_file' , function(name) return resolvers.findbinfile(name,"pfb") end)
- callback.register('find_vf_file' , function(name) return resolvers.findbinfile(name,"vf") end)
-
- callback.register('read_data_file' , function(file) return resolvers.loadbinfile(file,"tex") end)
- callback.register('read_enc_file' , function(file) return resolvers.loadbinfile(file,"enc") end)
- callback.register('read_font_file' , function(file) return resolvers.loadbinfile(file,"tfm") end)
+ local register = callbacks.register
+
+ register('find_read_file' , function(id,name) return findtexfile(name) end, true)
+ register('open_read_file' , function( name) return opentexfile(name) end, true)
+
+ register('find_data_file' , function(name) return findbinfile(name,"tex") end, true)
+ register('find_enc_file' , function(name) return findbinfile(name,"enc") end, true)
+ register('find_font_file' , function(name) return findbinfile(name,"tfm") end, true)
+ register('find_format_file' , function(name) return findbinfile(name,"fmt") end, true)
+ register('find_image_file' , function(name) return findbinfile(name,"tex") end, true)
+ register('find_map_file' , function(name) return findbinfile(name,"map") end, true)
+ register('find_opentype_file' , function(name) return findbinfile(name,"otf") end, true)
+ register('find_output_file' , function(name) return name end, true)
+ register('find_pk_file' , function(name) return findbinfile(name,"pk") end, true)
+ register('find_sfd_file' , function(name) return findbinfile(name,"sfd") end, true)
+ register('find_truetype_file' , function(name) return findbinfile(name,"ttf") end, true)
+ register('find_type1_file' , function(name) return findbinfile(name,"pfb") end, true)
+ register('find_vf_file' , function(name) return findbinfile(name,"vf") end, true)
+
+ register('read_data_file' , function(file) return loadbinfile(file,"tex") end, true)
+ register('read_enc_file' , function(file) return loadbinfile(file,"enc") end, true)
+ register('read_font_file' , function(file) return loadbinfile(file,"tfm") end, true)
-- format
-- image
- callback.register('read_map_file' , function(file) return resolvers.loadbinfile(file,"map") end)
- callback.register('read_ocp_file' , function(file) return resolvers.loadbinfile(file,"ocp") end)
+ register('read_map_file' , function(file) return loadbinfile(file,"map") end, true)
-- output
- callback.register('read_pk_file' , function(file) return resolvers.loadbinfile(file,"pk") end) -- 600dpi/manfnt.720pk
- callback.register('read_sfd_file' , function(file) return resolvers.loadbinfile(file,"sfd") end)
- callback.register('read_vf_file' , function(file) return resolvers.loadbinfile(file,"vf" ) end)
+ register('read_pk_file' , function(file) return loadbinfile(file,"pk") end, true) -- 600dpi/manfnt.720pk
+ register('read_sfd_file' , function(file) return loadbinfile(file,"sfd") end, true)
+ register('read_vf_file' , function(file) return loadbinfile(file,"vf" ) end, true)
- callback.register('find_font_file' , function(name) return resolvers.findbinfile(name,"ofm") end)
- callback.register('find_vf_file' , function(name) return resolvers.findbinfile(name,"ovf") end)
+ register('find_font_file' , function(name) return findbinfile(name,"ofm") end, true)
+ register('find_vf_file' , function(name) return findbinfile(name,"ovf") end, true)
- callback.register('read_font_file' , function(file) return resolvers.loadbinfile(file,"ofm") end)
- callback.register('read_vf_file' , function(file) return resolvers.loadbinfile(file,"ovf") end)
+ register('read_font_file' , function(file) return loadbinfile(file,"ofm") end, true)
+ register('read_vf_file' , function(file) return loadbinfile(file,"ovf") end, true)
- -- callback.register('read_opentype_file' , function(file) return resolvers.loadbinfile(file,"otf") end)
- -- callback.register('read_truetype_file' , function(file) return resolvers.loadbinfile(file,"ttf") end)
- -- callback.register('read_type1_file' , function(file) return resolvers.loadbinfile(file,"pfb") end)
+ -- register('read_opentype_file' , function(file) return loadbinfile(file,"otf") end, true)
+ -- register('read_truetype_file' , function(file) return loadbinfile(file,"ttf") end, true)
+ -- register('read_type1_file' , function(file) return loadbinfile(file,"pfb") end, true)
- callback.register('find_write_file' , function(id,name) return name end)
- callback.register('find_format_file' , function(name) return name end)
+ register('find_write_file' , function(id,name) return name end, true)
+ register('find_format_file' , function(name) return name end, true)
end