[XeTeX] again russian, german, english...

Jonathan Kew jonathan_kew at sil.org
Mon Feb 13 17:09:40 CET 2006

On 13 Feb 2006, at 1:59 pm, Martin Henning wrote:

> Yes, i get everything in Charis SIL and table of contents etc. in  
> russian, but: Hyphenation doesn't seem to work properly. I looked  
> at all kinds of russian texts, there is seems to be ok, though i  
> sometimes get overlong lines, where it simply doesn't break the  
> word earlier or put it on the next line - don't know why...

In your example last week, I saw some instances of long words  
separated by slashes, e.g, современные/передовые.  
Note that the slash here will (by default) inhibit hyphenation. You  
might want to use LaTeX's \slash instead (which permits a line-break  
after the slash); or if you want to allow hyphenation of the words  
each side of the slash, then you need to introduce some (zero-width)  

> English hyphenation doesn't seem to function at all, because i  
> found (among right things...) stuff like "art-icle", which for my  
> understanding is wrong.

Yes, that seems odd. Can you provide a sample file that demonstrates  
such errors?

> German hyphenation seems to work, need to paste more german texts  
> to confirm my assumption, though. we still have the
> %workaround for russian unicode AFTER xunicode is loaded.
> \input{cyrunicode}
> in the preamble - wasn't that supposed to load Cyrillic hyphenation  
> file back when we tried to get Russian working?

This doesn't load Russian hyphenation (NB: hyphenation relates to a  
*language*, not a *script*); what this file does is define the \cyra,  
\cyrb, etc names that Babel uses to generate Russian labels  
(Contents, Figure, ...) to produce the proper Unicode characters.

> i tried to compile without, but it hangs with error, because he  
> doesn't recognise Russian anymore :) i wonder why all this, i  
> thought it is unicode and that's it?

It would be, except that Babel doesn't use Unicode to generate the  
Russian text it produces.

> it seems to me that i don't understand the overall system here... :)

Nor do I -- Babel is something of a mystery!

> finally, the \setlength{\lineskiplimit}{-4pt} is really weird. no  
> matter which documentclass{} i use, i get very strange behaviour:
> between -1 and -4 i get some visible effect, but ONLY in the table  
> of contents. then suddenly with -5, get it the effect everywhere,  
> in annotation and normal text. -6 and below don't change anything  
> anymore, can't get closer (don't want, but it is strange). i have  
> absolutely no clue why...

The rules for \baselineskip, \lineskip, and \lineskiplimit are a  
little tricky. With a sufficiently negative \lineskiplimit, you'll  
get lines spaced according to \baselineskip all the time (which your  
LaTeX class will set up according to its wishes). With OpenType/ 
TrueType fonts in XeTeX, and without a negative \lineskiplimit,  
you'll often find you're actually setting the lines  
"solid" (according to the font metrics, which are usually larger than  
the actual glyph sizes), and the \baselineskip that LaTeX wanted to  
set is effectively being ignored.

It's tempting to try and create an xbabel that works purely with  
Unicode, but I don't really have the time to spend on that at the  
moment. But I'm sure the existing stuff can be made to work; it's  
just a bit of a complex mess because of the various interactions, and  
the non-Unicode encoding stuff that tends to get in the way.


More information about the XeTeX mailing list