# Setting variables in LuaTeX texconfig?

The LuaTeX documentation mentions that several variables are accessible by setting a table called texconfig. In particular I want to reduce the output a bit by setting trace_file_names to false. Others have asked for a similar solution but it seems not so easy with other TeX engines. Now LuaTeX offers that choice but I am not sure where and how to set that parameter. The documentation only mentions the table but gives no further hints.

So how can I set or modify the values in the texconfig table in LuaTeX (running under MiKTeX 2.9)?

I tried with the following example but this does not help, maybe this has to be set earlier in the process.

\documentclass{article}

\usepackage{filecontents}

\begin{filecontents*}{word.tex}
hello
\end{filecontents*}

\begin{document}
\directlua{print(texconfig)}
% prints: "table: 02900A90"

\directlua{print(texconfig["trace_file_names"])}
% prints "nil", so value does not exist in table

\directlua{texconfig["trace_file_names"] = false}

\input{word.tex}
% LuaTeX outputs: "(C:/Users/alexander/test/word.tex)"
\end{document}


The boolean variable texconfig.trace_file_names is only in effect when you disable the kpathsea library with texconfig.kpse_init = false.

You can disable the kpathsea library in the ini file called with luatex --lua <inifile> .... See below.

A non working example (it is hard to replace kpathsea in a few lines of code) is like this. Call with lualatex --ini --lua foo.lua test.tex:

test.tex:

Hello
\end


foo.lua:

texconfig.kpse_init = false
texconfig.trace_file_names = false

function kpse.find_file(filename,what)
return filename
end

local tab = { }
local f = t.file
end
tab.close = function (t)
t.file:close()
end
return tab
end

end
end
local f = io.open(name)
f:close()
return true,buf,buf:len()
end
return file
end
end
return nil,nil,0
end

callback.register('find_write_file',find_write_file)


• Thank you for this insight. I hoped that one could just disable the output without further side-effects. Do you know what the purpose of the flag trace_file_names is if using it means replacing a whole library? – Alexander Jul 11 '13 at 13:10