[Dev-luatex] Bug in \latelua?

Taco Hoekwater taco at elvenkind.com
Tue Oct 14 13:14:58 CEST 2008


Hi Oliver,

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:


Author: taco
Date: 2008-10-14 11:07:57 +0200 (Tue, 14 Oct 2008)
New Revision: 1557

Modified:
    trunk/src/texk/web2c/luatexdir/luatex.web
Log:
fix the handling of \latelua : make sure to close a possible open text 
string in the pdf backend

Modified: trunk/src/texk/web2c/luatexdir/luatex.web
===================================================================
--- trunk/src/texk/web2c/luatexdir/luatex.web	2008-10-09 12:31:13 UTC 
(rev 1556)
+++ trunk/src/texk/web2c/luatexdir/luatex.web	2008-10-14 09:07:57 UTC 
(rev 1557)
@@ -16986,11 +16986,14 @@
  begin
      b := pool_ptr;
      luacall(lua_id,s,r);
-    while b<pool_ptr do begin
-       pdf_out(str_pool[b]);
-       incr(b);
+    if b<pool_ptr then begin
+      pdf_end_text;
+      while b<pool_ptr do begin
+         pdf_out(str_pool[b]);
+         incr(b);
+      end;
+      pdf_print_nl;
      end;
-    pdf_print_nl;
  end;

  @* \[32d] The cross-reference table.




Best wishes,
Taco


More information about the dev-luatex mailing list