[XeTeX] Xetex and Komascript Compatibility
Thomas Gyger
teginch at bluewin.ch
Sat Jun 13 07:51:55 CEST 2009
Jonathan Kew a écrit :
>>> 2. Does anybody have some suggestions for a fix or workaround ?
>>
>> You mean the over-full box? Change the text, change the font, change
>> the width of text (no textarea, but geometry), apply more kerning,
>> remove the unbreakable space characters.
>
> Loading textarea is changing the margins/line-length of your text, so
> it's not surprising this can affect line-breaking, and in this
> particular case it leads to a situation where TeX can't find "good
> enough" line breaks. The quickest fix is probably to use the LaTeX
> "\sloppy" command to relax the spacing constraints, but there may be
> better ways to fine-tune the behavior.
>
> If you want to get sophisticated, fontspec has options to allow you to
> control the stretchability of interword spaces when you load a font,
> so you can use this to give TeX more or less flexibility.
The example I have provided is only one of many cases in the same text.
Although I did no systematic testing yet, it seems to happen especially
with french texts. In a roughly 150 pages book of very common french
novel text, almost without foreign word, it would be ok if i had to
tweak 1-5 such occurences by hand. But when this happens every 2-3 pages
then I suspect a bug somewhere (or a setting error on my side).
The specialty i see in the sentence provided are the many kommas.
Earlier I remember having seen posts about issues with Babel/Xetex'
handling of apostrophes in french. This why I actually switched to
Polyglossia.
> I did notice one problem when I tried adding \sloppy to your example:
> this got rid of the overfull box, but I got a hyphen in "dési-rs",
> which surely can't be right. Looking in polyglossia's
> gloss-french.ldf, I see that it sets \righthyphenmin to 2, using
> \setlocalhyphenmins{french}{2}{2}. Changing this to {2}{3} prevents
> the bad hyphenation (and gives "dé-sirs" instead, which looks more
> reasonable to my non-French eyes).
>
> François, could you check on this? Should gloss-french.ldf be changed,
> if the patterns are not safe for \righthyphenmin=2, or is something
> else wrong in my setup?
>
>>
>> BTW, you're writing in a simple Latin-based left-to-right script and
>> language. There is no real necessity to use experimental XeLaTeX,
>> ripe pdfTeX based LaTeX will work as well ...
>
> Perhaps he wants to use fonts that are painful to set up in
> pdftex-based LaTeX, but easy to use in xelatex... I think many people
> use it for that reason.
Correct, that's exactly the reason why I use XeLaTex.
Many thanks for your feedback so far
Tom
More information about the XeTeX
mailing list