[XeTeX] Interaction between utf8accents.sty and babel's german.ldf

Bruno Voisin bvoisin at mac.com
Tue Sep 21 16:28:27 CEST 2004


Hello,

I've just noticed a bad interaction of utf8accents.sty with the input 
method for the German language in the babel package. This is possibly 
normal, I'm just reporting it in case Ross thinks that utf8accents.sty 
should deal with this case as well.

Having invoked the babel package as:

	\usepackage[german,french,british]{babel}

and then used the command \foreignlanguage in the form (here \bibitem 
has a slightly modified syntax according to a journal class jfm.cls, 
but that should be immaterial to the matter):

	\bibitem[Mellin (1910)]{Mel10}
	  \textsc{Mellin, R.~Hj.} 1910
	  \foreignlanguage{german}{Abri"s einer einheitlichen Theorie der 
Gamma- und der
	  hypergeometrischen Funktionen}.
	  \textit{Math. Ann.} \textbf{68}, 305–337.

The output is:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 1.pdf
Type: application/pdf
Size: 14538 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20040921/5b94db1f/Image1-0001.pdf
-------------- next part --------------


The space between "Abriß" and "einer" has been suppressed.

Looking at the redefinition of TeX's input method in babel's German 
language definition file german.ldf:

	\declare at shorthand{german}{"s}{\textormath{\ss}{\@SS{}}}

it seems a cure is to use \ss{} or ß in XeLaTeX's input instead of "s, 
to get:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 2.pdf
Type: application/pdf
Size: 14874 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20040921/5b94db1f/Image2-0001.pdf
-------------- next part --------------


However, I suspect that, with this input, the German hyphenation rules 
aren't applied, which is why I had used "s.

Another possibility is to redefine babel's internals with:

	\makeatletter
	  \declare at shorthand{german}{"s}{\textormath{\ss{}}{\@SS{}}}
	\makeatother

Is this a better fix, still allowing hyphenation, or would it be better 
to alter utf8accents.sty instead, and how?

Bruno Voisin





More information about the XeTeX mailing list