[Dev-luatex] missing signature in the manual
taco at elvenkind.com
Sat Feb 7 19:00:30 CET 2009
Elie Roux wrote:
> In the manual one can read:
> This callback allows you to replace the way LuaTeX fetches lexical tokens.
> return <table> token
The manual is not wrong, but this callback should be renamed
into 'get_token' or so. There is no argument because the intent
is for the lua function to run token.get_next() c.s. to find
the next suitable token. And a bit of extra explanation in the
manual would be good too.
> I think that the argument(s) of function are missing. Also about
> function(<string> extrainfo)
> the function doesn't need to return anything?
and it doesn't get any useful arguments either. The manual is correct;
all input and output comes from and goes to various the tex.lists
entries like tex.lists.page_head and tex.lists.contrib_head.
The engine itself needs more work in this area. What is currently
provided is more to 'test the waters' and by no means final yet.
(this type of procedure where all arguments are global variables
is regrettably typical of how the pascal web side of things work)
> Finally the char_exists callback is not documented but is in
That one doesn't actually work (it is never called). There are
interesting issues when it comes to the timing of this, and that made
me stop when I first looked at it (seems like a long time ago).
The original goal of this callback was to provide a method to create
missing glyphs on the fly, but it was surprisingly hard to find the
right time to do that check.
Just after hyphenation and before the kerning/ligaturing step would
be a good moment, but since those are all callbacks now themselves,
maybe I should just forget about char_exists completely.
More information about the dev-luatex