Skip to content

Also attempt to attain the value of TEXMF using kpse library #77

Description

@RadioNoiseE

Hi!

I am installing digestif for my self-built TeX distribution which does not install kpsewhich, and encountered an issue of not being able to run kpsewhich.

After inspecting I found that it's because of this logic in config.lua which tries to find texmf root using kpsewhich:

if util.is_command("kpsewhich") then
local pipe = io.popen("kpsewhich -var-brace-value=TEXMF")
local output = pipe:read("l")
local ok, exitt, exitc = pipe:close()
if ok and exitt == "exit" and exitc == 0 then
config.texmf_dirs = util.imap(
function (s) return s:gsub("^!!", "") end,
util.path_list_split(output)
)
elseif config.verbose then
util.log("Error running kpsewhich (%s %d)", exitt, exitc)
end
else -- TODO: What should be the default?
config.texmf_dirs = {
"/usr/local/share/texmf",
"/usr/share/texmf",
"/usr/share/texlive/texmf-local",
"/usr/share/texlive/texmf-dist",
}
end

I am aware that this should be compatible with non-texlua Lua interpreters, however I think it would be a good idea to try kpse.var_value after execution failed.

<string> r = kpse.var_value(<string> s) -- similar to kpsewhich’s -var-value

Thanks for this awesome project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions