[XeTeX] Hyphenation around „ß“

David Carlisle d.p.carlisle at gmail.com
Wed Jan 15 17:34:52 CET 2014


Phil wrote

> Not as good as Knuth's, as it typesets the output rather than


If you wanted something that worked like \showhyphens you could do this

It produces the following with xetex



Underfull \hbox (badness 10000) in paragraph at lines 1--1
[] \tenrm good-bye hy-phen-ation

Underfull \hbox (badness 10000) in paragraph at lines 8--8
[] \tenrm goodbye hyphenation

Underfull \hbox (badness 10000) in paragraph at lines 55--55
[] \tenrm good-bye hy-phen-ation
 )


where the first is with its default cm font, second is just changing it to
use Times Roman, then third is redefinition of \showhyphens


\showhyphens{goodbye hyphenation}

\font\tenrm = "Times New Roman" at 10pt
\hyphenchar\tenrm=`\-
\tenrm


\showhyphens{goodbye hyphenation}

\catcode`\@=11
\def\showhyphenspace#1 {%
\ifx\valign#1\valign\else
#1\vadjust{\penalty\@ne} \expandafter\showhyphenspace
\fi}

\def\showhyphens#1{{%
\showboxbreadth\maxdimen
\showboxdepth\maxdimen
\pretolerance\m at ne\tolerance\m at ne
\setbox2\hbox{}%
\setbox0\vbox{%
\pretolerance\m at ne
\tolerance\m at ne\hbadness\z@
\parfillskip\z at skip
\hsize1sp
\noindent
\hskip\z@
\hfuzz\maxdimen
\hbadness\maxdimen
\showhyphenspace#1 {} \par
\loop
\count@\@ne
\ifnum1=\lastnodetype
 \setbox4\lastbox
 \setbox2\hbox{\unhbox4 \unhbox2}\count@\z@
\fi
\ifnum11=\lastnodetype\unskip\count@\z@\fi
\ifnum13=\lastnodetype
 \count2\lastpenalty
 \unpenalty\count@\z@
 \ifnum\count2=\@ne
 \setbox2\hbox{ \unhbox2}\count@\z@
 \fi
\fi
\ifnum\z@=\count@
\repeat
\hsize\maxdimen
\hfuzz\z@
\hbadness\z@
\par
\unhbox2
\par
}}}

\showhyphens{goodbye hyphenation}

\bye
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20140115/4d82ae5d/attachment.html>


More information about the XeTeX mailing list