[luatex] letterspacing in LuaTeX

Ulrike Fischer luatex at nililand.de
Mon Jul 26 17:09:19 CEST 2010


Am Mon, 26 Jul 2010 16:27:39 +0200 schrieb Taco Hoekwater:

> On 07/26/2010 11:04 AM, Ulrike Fischer wrote:
>>
>> The problem has nothing to do with fonts or utf8. I get the same
>> error with lualatex (Version beta-0.61.0-2010061910 (rev 3724))
>> (xelatex + pdflatex works fine) with this example:
> 
> This sounds like an engine error, but I am missing what is actually
> wrong. Is there a problem with \lastbox ?

I don't know. But I now also looked at box \z@ 

And there you get with luatex as first box:

> \box0=
\vbox(12.0+0.0)x0.00002, direction TLT
.\hbox(0.0+0.0)x0.00002, direction TLT
..\whatsit
...\localinterlinepenalty=0
...\localbrokenpenalty=0
...\localleftbox=null
...\localrightbox=null
..\glue(\rightskip) 0.0
.\penalty 300
.\glue(\baselineskip) 7.6955
.\hbox(4.3045+0.0)x0.00002, direction TLT
..\SOUL at tt a
..\penalty 10000
..\glue(\parfillskip) 0.0 plus 1.0fil
..\glue(\leftskip) 0.0



While pdflatex shows

> \box0=
\vbox(4.3045+0.0)x0.00002
.\hbox(4.3045+0.0)x0.00002
..\glue 0.0
..\SOUL at tt a
..\penalty 10000
..\glue(\parfillskip) 0.0 plus 1.0fil
..\glue(\rightskip) 0.0

So box0 contains in luatex at the start 2 hboxes and so needs one
step more to get void than in pdflatex.

The additional box disappears (and also the errors) if I remove the
\tolerance\@M from SOUL at doword:

\documentclass[10pt]{book}
\usepackage{soul}
\makeatletter
\showboxdepth=100
\def\SOUL at doword{%
    \edef\x{\the\SOUL at word}%
    \ifx\x\empty
    \else
        \SOUL at buffer={}%
        \setbox\z@\vbox{%
            \SOUL at tt
            \hyphenchar\font`\-
            \hfuzz\maxdimen
            \hbadness\@M
            \pretolerance\m at ne
       %     \tolerance\@M %<--------------
            \leftskip\z@
            \rightskip\z@
            \hsize1sp
            \everypar{}%
            \parfillskip\z@\@plus1fil
            \hyphenpenalty-\@M
            \noindent
            \hskip\z@
            \relax
            \the\SOUL at word}%
        \showbox\z@    %<------show
        \let\SOUL at errmsg\SOUL at error
        \let\-\relax
        \count@\m at ne
        \SOUL at analyze
        \SOUL at word={}%
    \fi
}


\begin{document}
\so{a}
\end{document}


-- 
Ulrike Fischer 



More information about the luatex mailing list