[XeTeX] Strange behavior with right-to-left footnotes

Jonathan Kew jonathan_kew at sil.org
Mon Apr 16 00:30:30 CEST 2007

On 14 Apr 2007, at 6:44 pm, François Charette wrote:

> Dear all,
> While doing some testing with my bidi package before uploading it to
> CTAN, I noticed a strange behavior with the placement of footnotes in
> right-to-left context.
> ........

You have encountered a bug in xetex. In certain circumstances, it  
handles glue incorrectly in right-to-left paragraphs. I've been aware  
of this one for a while, but have not yet had time to track down the  
underlying cause. I hope to fix it for the next release, though, as  
it's a pretty annoying one if you run into it.

A simple demonstration can be done with something like this:


\noindent\vrule\hbox to \parindent{*\hfil}\vrule Hello

\noindent\vrule\hbox to \parindent{\beginR*\hfil\endR}\vrule Hello

\noindent\beginR\vrule\hbox to \parindent{\beginR*\hfil\endR}\vrule  


The first two lines appear correctly, but in the third line, the  
asterisk (in the parindent box) appears displaced to the right.

One way to work around the problem is to avoid the use of stretchable  
glue in places like this, and instead write macros that actually box  
and measure the text, and then generate the necessary kerns or  
whatever. But that can be a pain compared to simply using \hfil or  
\hss in appropriate places.

You're seeing the problem with footnotes because the footnote macros  
probably use something like \textindent or \llap or whatever,  
involving stretchable glue, to place the mark within the indent  
beside the paragraph.

Sorry for the hassle; I'll try to work on it soon!


More information about the XeTeX mailing list