[XeTeX] Uneven line spacing

Meho R. meho_r at yahoo.com
Tue Apr 8 20:11:42 CEST 2008


Thanks a lot. I made it. In fact, I've changed only two things: 

1. I set \lineskiplimit=-1000pt. I leave other two (\baselineskip and \lineskip) at they default values

2. I use package \setspace, and have entered a main value (e.g. \setstretch{1.1}) for the main doc's text, and different \setstretch values in different environments (for arabic text).

Again, thank you for pointing me in the right direction, I wouldn't have made it without your help 


----- Original Message ----
From: Jonathan Kew <jonathan_kew at sil.org>
To: Unicode-based TeX for Mac OS X and other platforms <xetex at tug.org>
Sent: Tuesday, April 8, 2008 5:21:39 PM
Subject: Re: [XeTeX] Uneven line spacing

On 8 Apr 2008, at 3:47 pm, Meho R. wrote:

> Recently I've had this problem. I got uneven line spacing in arabic  
> text. It seems that the basis for the spacing isn't baseline (in  
> fact, I have no idea what is the basis in this case), which produce  
> pretty ugly result with different spacing between some lines  
> (especially prone to this is the last line; look at the attached  
> sample .jpg file).

Read about \baselineskip, \lineskiplimit, and \lineskip in The TeXbook.

Briefly: TeX uses the \baselineskip to keep a constant line spacing  
*unless* you have characters with sufficient height and/or depth that  
there's a risk of lines "bumping into" each other, with  
\lineskiplimit specifying how close they're allowed to come. At that  
point, it abandons \baselineskip as a constant baseline-to-baseline  
distance, and instead uses \lineskip as the space between the  
descenders of one line and the ascenders of the next.

So when you have characters with long ascenders and descenders (like  
some Arabic letters, especially if you also add vowel diacritics),  
you may get uneven spacing unless you ensure that \baselineskip is  
large enough to account for these. You'd probably have been OK except  
for the fact that you're loading Scheherazade with a scaling factor  
of 1.4, which greatly enlarges the glyphs, but doesn't provide any  
extra \baselineskip to account for this.

Solution: use LaTeX line spacing commands (sorry, I'm not a LaTeX  
user, don't know the exact details) to increase the line spacing  
appropriately. I think there's a parameter \baselinestretch or  
something like that. Or if you want to allow the lines to remain at a  
constant, closer spacing, risking the occasional clash of ascenders/ 
descenders, you'll have to set \lineskiplimit to a negative dimension.

HTH,

JK

_______________________________________________
XeTeX mailing list
postmaster at tug.org
http://tug.org/mailman/listinfo/xetex



      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20080408/b18f1047/attachment.html 


More information about the XeTeX mailing list