[XeTeX] problems with fontspec and german sharp s ligature

Will Robertson wspr81 at gmail.com
Tue Apr 8 09:11:41 CEST 2008


Hi Niels,

In XeTeX you're expected to use unicode -- don't use the inputenc  
package at all. Furthermore, as you've found, the babel package isn't  
properly supported. This typesets correctly for me:

\documentclass{scrbook}
\usepackage{xunicode,fontspec,xltxtra}
\setmainfont[Mapping=tex-text]{Adobe Garamond Pro}
\begin{document}
\Huge
Außerdem {\itshape Außerdem}
\end{document}

However, this might be missing a subtle point of German typsetting --  
how is the sharp s supposed to be hyphenated? I don't have time to  
look into the babel code to see what it does, but this will cause any  
german words to be potentially hyphenated at a ß character, replacing  
it with s-s where the hyphenation occurs:

\documentclass{scrbook}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Adobe Garamond Pro}
\begin{document}
\Huge
\catcode`\ß=13
\defß{\discretionary{s-}{s}{\char`\ß}}
\fbox{\parbox{6cm}{Außerdem Außerdem}}
\end{document}

Peter (or whomever), is this the right thing to do? How have you set  
up XeTeX to typeset in German?

Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2415 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20080408/fa665c13/attachment.bin 


More information about the XeTeX mailing list