[luatex] Help with kpse_init=false needed
Patrick Gundlach
patrick at gundla.ch
Mon Jun 22 20:46:49 CEST 2009
Hi all,
I am playing with luatex and I don't get texconfig.kpse_init=false to
work. The idea is to write my own file searching mechanism.
What I have tried (with plain tex format as the base):
$ luatex sample.tex
works ok
$ luatex --lua=ini.lua sample.tex
gives me:
------
~/tmp/example$ luatex --lua ini.lua sample.tex
This is LuaTeX, Version beta-0.41.0-2009062220 (Web2C 2009)
hello from find_format_file
/Users/patrick/tmp/example/luatex.fmt
hello from find_read_file, id_number is 0
../../../source/texk/kpathsea/variable.c:35: failed assertion `kpse->program_name'
/Users/patrick/tmp/example/sample.texAbort trap
------
when commenting out the texconfig.kpse_init=false,
$ luatex --lua=ini.lua sample.tex
works ok.
Can anybody tell me what I am doing wrong?
Patrick
-------------------------------------------------------
sample.tex:
------
hello world
\bye
------
ini.lua:
------
texconfig.kpse_init=false
texconfig.formatname="luatex"
texconfig.jobname="sample"
basedir="/Users/patrick/tmp/example/"
callback.register('find_read_file',
function(id_number,asked_name)
texio.write_nl("hello from find_read_file, id_number is " .. tostring(id_number) )
local file = basedir .. asked_name
texio.write_nl(file)
return file
end
)
callback.register('find_write_file',
function(id_number,asked_name)
texio.write_nl("hello from find_write_file, id_number is " .. tostring(id_number) )
local file = basedir .. asked_name
texio.write_nl(file)
return file
end
)
callback.register('find_output_file',
function(asked_name)
texio.write_nl("hello from find_output_file")
local file = basedir .. asked_name
texio.write_nl(file)
return file
end
)
callback.register('find_format_file',
function(asked_name)
texio.write_nl("hello from find_format_file")
local file = basedir .. "luatex.fmt"
texio.write_nl(file)
return file
end
)
-- all other find_..._file callbacks are omitted here in the mail
------
More information about the luatex
mailing list