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

François Charette firmicus at ankabut.net
Mon Apr 16 11:07:29 CEST 2007

Thanks Johathan for your quick and competent reply (as always :-) !

Jonathan Kew a écrit :
> You have encountered a bug in xetex. In certain circumstances, it
>
That's what I thought, but I tend to refrain from using the word "bug"
too swiftly...
> 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.
>
...
> 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.
>
Well, I'll rather wait for your bugfix in the next release, since this
would involve patching the \@makefntext macro in all standard LaTeX
classes, as well as memoir, koma-script, etc...
> 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.
>
Yes, in standard LaTeX classes the footnote macro contains
\hbox to 1.8em{\hss\@makefnmark}.
The footnote macros in memoir.cls are more complex but the bug has
basically the same effect. With the koma-script classes, though, the
effect is as in Plain TeX.
> Sorry for the hassle; I'll try to work on it soon!
>
Thanks a lot
شكراً جزيلاً

FC