Read config values from kpathsea

This commit is contained in:
Marcel Krüger 2019-07-20 16:39:34 +02:00
parent 047997b46d
commit 136261f1e9
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,34 @@
local var_value = kpse.var_value
local texconfig = texconfig
-- These are special in two ways: They are strings and I think they are ignored
-- We set them anyway because they should be emulated at some point
for _, name in ipairs{
"shell_escape",
"shell_escape_commands",
} do
local value = var_value(name)
texconfig[name] = value
end
for _, name in ipairs{
"string_vacancies",
"pool_free",
"max_strings",
"strings_free",
"nest_size",
"max_in_open",
"param_size",
"save_size",
"stack_size",
"dvi_buf_size",
"error_line",
"half_error_line",
"max_print_line",
"hash_extra",
"pk_dpi",
"trace_file_names",
"file_line_error",
"halt_on_error",
} do
local value = var_value(name)
texconfig[name] = tonumber(value) or value or nil
end

View File

@ -336,6 +336,7 @@ kpse.set_maketex("kpse_fmt_format", true)
bit32 = require'luametalatex-bit32' bit32 = require'luametalatex-bit32'
kpse.init_prog("LUATEX", 400, "nexthi", nil) kpse.init_prog("LUATEX", 400, "nexthi", nil)
status.init_kpse = 1 status.init_kpse = 1
require'luametalatex-init-config'
status.safer_option = 0 status.safer_option = 0
local read_tfm = require'luametalatex-font-tfm' local read_tfm = require'luametalatex-font-tfm'
read_vf = require'luametalatex-font-vf' read_vf = require'luametalatex-font-vf'