[XeTeX] Multi-paragraph footnotes in xepersian

Mohsen Vakilian mohsen.tex at gmail.com
Fri Oct 9 15:10:04 CEST 2009


Amazing! Your patch fixed the multi-paragraph footnote bug in bidi.

Thanks,
Mohsen Vakilian

On Fri, Oct 9, 2009 at 7:54 AM, Vafa Khalighi <vafa at users.berlios.de> wrote:

> I believe the following code fixes the issue. Put this before
> \begin{document}:
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> \makeatletter
>
> \long\def\parse at rsent#1#2\EInRTL#3#4#5\parse at end{\@sentdirfalse
>
> \def\@tempa{\InRTL}\def\@tempb{\EInRTL}\def\@tempc{#1}\def\@tempd{#4}%
>
> \ifx\@tempa\@tempc\ifx\@tempb\@tempd\@sentdirtrue\fi\fi}
>
> \long\def\ifrsentence#1{\parse at rsent#1\EInRTL123\parse at end\if at sentdir}
>
> \long\def\bidi at footnotetext@dir#1{%
>
> \@tempswatrue
>
> \ifrsentence{#1}\rtl\@tempswafalse\fi
>
> \iflsentence{#1}\ltr\@tempswafalse\fi
>
> \if at tempswa\if at RTL\rtl\else\ltr\fi\fi
>
> \xdef\bidi at this@footnote{\if at RTL\noexpand\right at footnote
> \else\noexpand\left at footnote\fi}%
>
> }
>
> \long\def\iflsentence#1{\parse at lsent#1\EInLTR123\parse at end\if at sentdir}
>
> \long\def\parse at lsent#1#2\EInLTR#3#4#5\parse at end{\@sentdirfalse
>
> \def\@tempa{\InLTR}\def\@tempb{\EInLTR}\def\@tempc{#1}\def\@tempd{#4}%
>
> \ifx\@tempa\@tempc\ifx\@tempb\@tempd\@sentdirtrue\fi\fi}
>
> \makeatother
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
>
> and you should have no problem. Thanks again for your bug report.
>
>
> --
> Vafa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20091009/20b874df/attachment.html>


More information about the XeTeX mailing list