From elie.roux@telecom-bretagne.eu Sat Feb 7 18:32:03 2009 From: Elie Roux To: dev-luatex@ntg.nl Subject: [Dev-luatex] missing signature in the manual Date: Sat, 07 Feb 2009 18:31:14 +0100 Message-ID: <498DC562.3040100@telecom-bretagne.eu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7777987147402308088==" --===============7777987147402308088== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Hello, In the manual one can read: This callback allows you to replace the way LuaTeX fetches lexical tokens. function() return token end I think that the argument(s) of function are missing. Also about buildpage_filter: function( extrainfo) end the function doesn't need to return anything? Finally the char_exists callback is not documented but is in callback.list() Thank you! -- Elie --===============7777987147402308088==-- From taco@elvenkind.com Sat Feb 7 19:01:14 2009 From: Taco Hoekwater To: dev-luatex@ntg.nl Subject: Re: [Dev-luatex] missing signature in the manual Date: Sat, 07 Feb 2009 19:00:30 +0100 Message-ID: <498DCC3E.4030407@elvenkind.com> In-Reply-To: <498DC562.3040100@telecom-bretagne.eu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7975506375866594137==" --===============7975506375866594137== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Elie Roux wrote: > Hello, > > In the manual one can read: > > This callback allows you to replace the way LuaTeX fetches lexical tokens. > function() > return
token > end 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 > buildpage_filter: > > function( extrainfo) > end > > 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 > callback.list() 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. Best wishes, Taco Best wishes, Taco --===============7975506375866594137==-- From pragma@wxs.nl Sun Feb 8 00:35:25 2009 From: Hans Hagen To: dev-luatex@ntg.nl Subject: Re: [Dev-luatex] missing signature in the manual Date: Sun, 08 Feb 2009 00:35:08 +0100 Message-ID: <498E1AAC.8070605@wxs.nl> In-Reply-To: <498DCC3E.4030407@elvenkind.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6060955760482395115==" --===============6060955760482395115== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Taco Hoekwater wrote: > 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. if i remember right we dropped the idea char_exists in favour of the ability to add (virtual) characters to a font (only once per char) but we put than wish on the long term wishlist Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- --===============6060955760482395115==--