[XeTeX] Multi-paragraph footnotes in xepersian

Vafa Khalighi vafa at users.berlios.de
Fri Oct 9 14:54:47 CEST 2009


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/81ed0f05/attachment-0001.html>


More information about the XeTeX mailing list