[Dev-luatex] Bug in \latelua?

Oliver Heins olli at sopos.org
Tue Oct 14 13:07:24 CEST 2008


Hi,

while playing around with luatex and ledmac I produced somewhat strange
PDF's.

This is a minimal example:

\pdfcompresslevel=0
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{ledmac}
\usepackage{MinionPro}

\makeatletter
\renewcommand*{\do at line}{%
 {\vbadness=10000 \splittopskip=0pt
  \do at linehook
  \l at demptyd@ta
 \global\setbox\one at line=\vsplit\raw at text to\baselineskip}%
 \unvbox\one at line \global\setbox\one at line=\lastbox
 \getline at num
  \affixline at num
  \hb at xt@ \linewidth{%
    \l at dld@ta\add at inserts\affixside at note
    \l at dlsn@te% left side note
    {\ledllfill
      \hb at xt@ \wd\one at line{\new at line\unhbox\one at line}%
      \ledrlfill\l at drd@ta%
      \l at drsn@te}% right side note
  \latelua0{}% <-- This is the new line
  }%
 \add at penalties}
\makeatother

\begin{document}

\beginnumbering
\pstart
\input tufte
\pend
\endnumbering

\end{document}

I'm using the commercial Minion Pro font here, because it visualizes the
faults of the pdf: The last charakter of each line is overprinted by a
crossed rectangle.  In case you don't have Minion Pro on your computer,
I put the pdf on the web: http://sopos.org/olli/examples/lualedmac.pdf
(and http://sopos.org/olli/examples/lualedmac2.pdf for a version done
without the \latelua statement).

Using lmodern the PDF turns out to be still faulty, though one can't see
on screen.

I investigated a little bit and took a look into the pdf.  The pdf
contains extra newlines, which appear *within* the last string of a line
(so, if a line ends with »ca-«, the pdf file looks like this:

...-241(c)-3(a-
)]TJ...)

Here's the beginning of such a pdf file:

%PDF-1.4
%ÐÔÅØ
3 0 obj <<
/Length 2672      
>>
stream
BT
/F19 9.9626 Tf 148.712 707.125 Td [(W)96(e)-241(t)-6(hr)-6(i)6(v)8(e)-242(in)-242(inf)8(o)12(r)-5(m)2(a)19(t)-4(io)11(n||t)-5(hic)5(k)-242(w)7(o)12(r)4(ld)3(s)-241(b)-9(e)-5(c)-3(a)18(u)3(s)-7(e)-242(o)11(f)-242(o)10(ur)-241(m)2(a)9(r)-28(v)7(e)4(lo)11(u)3(s)-241(a)8(n)4(d)-242(e)-8(v)7(er)-28(y)7(d)-2(a)17(y)-241(c)-3(a-
)]TJ -14.944 -11.955 Td [(p)-5(aci)11(t)-2(y)-337(t)5(o)-336(s)-8(e)3(le)-4(c)-7(t,)-365(e)-5(di)11(t,)-363(sin)7(g)-6(le)-337(o)10(u)12(t,)-364(s)4(t)-4(r)-10(uc)-7(t)9(ur)13(e)6(,)-363(hig)-7(h)-5(lig)-7(h)18(t,)-364(g)-5(r)12(o)11(u)12(p)29(,)-363(p)-5(a)8(ir)63(,)-364(m)3(er)8(g)8(e)6(,)-363(h)2(a)9(r)-5(m)3(o)12(nize)6(,
)]TJ 0 -11.955 Td [(sy)-3(n)18(t)-5(h)3(esize)6(,)-328(f)8(o)-8(c)-7(u)2(s,)-327(o)11(r)8(ga)9(nize)6(,)-328(co)11(n)4(den)8(s)-7(e)5(,)-327(r)12(e)-4(d)11(uce)6(,)-327(b)-10(o)11(i)-4(l)-308(do)15(w)-2(n,)-328(c)5(h)4(o)-8(os)-8(e)5(,)-328(c)-3(a)18(t)6(eg)8(o)12(r)-5(ize)5(,)-327(c)-3(a)18(t)-5(a)-5(log)-32(,
)]TJ 0 -11.955 Td [(c)5(l)-2(a)2(s)5(sif)-16(y)72(,)-238(li)2(s)5(t,)-238(a)7(bs)5(t)-4(rac)-7(t,)-238(s)-8(c)-3(a)8(n,)-238(lo)-9(o)6(k)-235(in)18(t)6(o)29(,)-238(ide)-6(a)-5(lize)5(,)-238(i)2(s)-7(o)6(l)-2(a)18(t)6(e)6(,)-238(di)2(s)-7(cr)-6(imin)2(a)19(t)6(e)6(,)-237(di)2(s)5(t)-4(in)7(gui)3(s)4(h,)-238(s)-8(cr)12(e)-4(en,
)]TJ/F19 6.9738 Tf -14.905 -11.956 Td [(\242)]TJ/F19 9.9626 Tf 14.905 0 Td [(p)11(ig)8(e)-4(o)11(n)-4(h)3(o)7(le)6(,)-270(p)11(ic)6(k)-261(o)15(v)8(er)63(,)-270(s)-8(o)11(r)-9(t,)-271(in)18(t)6(eg)-4(ra)18(t)6(e)6(,)-269(b)6(len)4(d)6(,)-270(in)7(s)5(p)-8(e)-5(c)-7(t,)-271(\235)-5(l)11(t)6(er)63(,)-270(l)11(um)19(p)29(,)-270(s)3(k)-3(i)11(p)29(,)-269(sm)3(o)-8(o)10(t)-5(h,)-271(c)5(h)19(un)-4(k,
)]TJ 0 -11.955 Td [(a)17(v)8(era)5(g)8(e)6(,)-279(a)18(p)11(p)12(r)13(o)16(xim)3(a)19(t)6(e)6(,)-279(c)5(l)12(u)3(s)5(t)6(er)63(,)-279(a)4(g)-5(g)-5(r)12(ega)19(t)6(e)6(,)-278(o)10(u)12(t)-5(lin)3(e)6(,)-279(s)4(umm)3(a)9(r)-5(ize)5(,)-279(i)11(t)6(emize)6(,)-279(r)12(e)-7(v)-3(ie)-8(w)72(,)-279(di)11(p)-268(in)18(t)6(o)29(,
)]TJ 0 -11.955 Td [(\236i)11(p)-277(t)-6(hr)12(o)11(ug)-6(h,)-291(b)11(r)13(o)16(ws)-7(e)4(,)-290(g)-7(l)-3(a)8(n)4(ce)-277(in)18(t)6(o)29(,)-290(le)-6(a)8(f)-277(t)-6(hr)12(o)11(ug)-6(h,)-292(s)3(k)-3(im,)-291(r)12(e\235n)4(e)6(,)-290(en)18(um)4(era)19(t)6(e)6(,)-290(g)-7(le)-6(a)8(n,)-290(sy)-3(n)3(o)11(p-
)]TJ 0 -11.955 Td [(size)5(,)-226(w)-3(inn)3(o)16(w)-226(t)-6(h)3(e)-226(w)-7(h)3(e)-5(a)18(t)-226(f)-10(r)12(o)12(m)-226(t)-6(h)3(e)-226(c)5(h)3(a)9(\232)-226(a)8(n)4(d)-226(s)-8(ep)-5(a)8(ra)19(t)6(e)-226(t)-6(h)3(e)-226(s)3(h)4(e)-4(ep)-227(f)-10(r)12(o)12(m)-226(t)-6(h)3(e)-226(g)7(o)-4(a)18(ts.
)]TJ 170.162 -484.184 Td [(\325)]TJ
ET
endstream
endobj

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.

Best regards,
 olli


--- luatex-beta-0.30.1/src/texk/web2c/luatexdir/luatex.web	2008-10-09 10:48:06.000000000 +0200
+++ luatex-beta-0.30.1-oh/src/texk/web2c/luatexdir/luatex.web	2008-10-10 15:34:17.000000000 +0200
@@ -16990,7 +16990,6 @@
        pdf_out(str_pool[b]);
        incr(b);
     end;
-    pdf_print_nl;
 end;
 
 @* \[32d] The cross-reference table.




-- 
http://www.sopos.org/olli/ GnuPG-Key: gpg --recv-keys 0x9A00D827
GnuPG-Fingerprint: F27A BA8C 1CFB B905 65A8  2544 0F07 B675 9A00 D827
NP: Sham 69 - Give a Dog a Bone
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


More information about the dev-luatex mailing list