Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
info = callback.list()<br />
The keys in the table are the known callback names, the value is a boolean where true means that the<br />
callback is currently set (active).<br />
f = callback.find (callback_name)<br />
If the callback is not set, callback.find returns nil.<br />
4.1.1 File discovery callbacks<br />
The behavior documented in this subsection is considered stable in the sense that there will not be<br />
backward-incompatible changes any more.<br />
4.1.1.1 find_read_file and find_write_file<br />
Your callback function should have the following conventions:<br />
actual_name = function ( id_number, asked_name)<br />
Arguments:<br />
id_number<br />
This number is zero for the log or \input files. For TEX's \read or \write the number is incremented<br />
by one, so \read0 becomes 1.<br />
asked_name<br />
This is the user-supplied filename, as found by \input, \openin or \openout.<br />
Return value:<br />
actual_name<br />
This is the filename used. For the very first file that is read in by TEX, you have to make sure you<br />
return an actual_name that has an extension and that is suitable for use as jobname. If you don't,<br />
you will have to manually fix the name of the log file and output file after LuaTEX is finished, and<br />
an eventual format filename will become mangled. That is because these file names depend on the<br />
jobname.<br />
You have to return nil if the file cannot be found.<br />
4.1.1.2 find_font_file<br />
Your callback function should have the following conventions:<br />
actual_name = function ( asked_name)<br />
32<br />
LuaTEX Lua Libraries