[XeTeX] Uneven line spacing

Jonathan Kew jonathan_kew at sil.org
Tue Apr 8 17:21:39 CEST 2008

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.



More information about the XeTeX mailing list