[Dev-luatex] Bug in \latelua?

Hartmut Henkel hartmut_henkel at gmx.de
Tue Oct 14 21:42:10 CEST 2008


On Tue, 14 Oct 2008, Taco Hoekwater wrote:

> Oliver Heins wrote:
> >
> > Looking in luatex.web, I found that the definition of \latelua
> > contains a line »pdf_print_nl«.  Removing this line seems to give
> > the intended behaviour, though it might break something else.
>
> It is funny how sometimes a bug is dormant for months and is then
> suddenly and independantly discovered by multiple people. Hans ran
> into exactly the same bug yesterday evening, and the svn commit that
> fixes it (made two hours ago) looks like this:

that is interesting. In the very 1st version it even used modifiers like
\latelua direct {} (still without the Lua number) and there were proper
pdf_end_text and so on, like this from 10/2005:

procedure latelua(s: str_number; lua_mode: integer; warn: boolean);
var b, j: pool_pointer; {current character code position}
begin
    j:=str_start[s];
    case lua_mode of
    set_origin: begin
        pdf_end_text;
        pdf_set_origin(cur_h, cur_v);
        end;
    direct_page:
        pdf_end_text;
    direct_always:
        pdf_end_string_nl;
    othercases confusion("latelua1")
    endcases;
    b := pool_ptr;
    luacall(s);
    while b<pool_ptr do begin
       pdf_out(str_pool[b]);
       incr(b);
    end;
    pdf_print_nl;
end;

From some time on somehow all these modifiers vanished and the Lua
number went in (i can't even tell now if i threw them out). Currently it
seems to behave as in "page" mode, as there is no pdf_set_origin(),
which would be the default for \pdfliteral. It's not yet clear to me if
\latelua does all the wanted, e. g. whether the timing is right if one
wants to record positions within text on the page...

Regards, Hartmut


More information about the dev-luatex mailing list