[luatex] letterspacing in LuaTeX
Ulrike Fischer
luatex at nililand.de
Wed Jul 28 09:34:07 CEST 2010
Am Wed, 28 Jul 2010 07:17:00 +0200 schrieb Pablo Rodríguez:
>>> If the above document is supposed to work, I'm afraid it doesn't.
>> Well _this_ document is meant to work in the sense the \so doesn't
>> give an error. But it will not run unattended as it will stop at the
>> \showbox\z@ and wait that you hit "enter". And I also don't know
>> what removing the \tolerance setting means to soul. Probably it will
>> find less break points.
> Thanks for the reply, Ulrike.
> It doesn't work with Greek text and other non-ASCII characters.
I can't test greek here, but other non-ascii chars seems to work
fine if I set \SOUL at tt to a suitable mono font:
\documentclass[10pt]{book}
\usepackage{soul}
\usepackage{luaotfload}
\usepackage{fontspec}
\makeatletter
\font\SOUL at tt="DejaVu Sans
Mono"\setbox\z@\hbox{\SOUL at tt-}\SOUL at ttwidth\wd\z@
\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@ %<------showbox
\let\SOUL at errmsg\SOUL at error
\let\-\relax
\count@\m at ne
\SOUL at analyze
\SOUL at word={}%
\fi
}
\makeatother
\begin{document}
\so{a䀀€öü}
\end{document}
--
Ulrike Fischer
More information about the luatex
mailing list