summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bidi/bidiftnxtra.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/bidi/bidiftnxtra.sty')
-rw-r--r--Master/texmf-dist/tex/latex/bidi/bidiftnxtra.sty58
1 files changed, 50 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/bidi/bidiftnxtra.sty b/Master/texmf-dist/tex/latex/bidi/bidiftnxtra.sty
index 7cf8d39f322..21f35f15bb0 100644
--- a/Master/texmf-dist/tex/latex/bidi/bidiftnxtra.sty
+++ b/Master/texmf-dist/tex/latex/bidi/bidiftnxtra.sty
@@ -64,24 +64,61 @@
\let\@footnotetext\bidi@p@ftntext
\let\@LTRfootnotetext\bidi@p@LTRftntext
\let\@RTLfootnotetext\bidi@p@RTLftntext
+ \let\@xfootnotenext\bidi@p@xftntext
+ \let\@xfootnote\bidi@p@xfootnote
+ \let\@xLTRfootnotenext\bidi@p@xLTRftntext
+ \let\@xLTRfootnote\bidi@p@xLTRfootnote
+ \let\@xRTLfootnotenext\bidi@p@xRTLftntext
+ \let\@xRTLfootnote\bidi@p@xRTLfootnote
\if@RTLtab\beginR \fi
$\let\@acol\@tabacol
\let\@classz\@tabclassz
\let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}
\def\endtabular{\crcr\egroup\if@RTLtab\egroup\endR\egroup\fi
\egroup $\if@RTLtab\endR\fi\egroup
- \the\bidi@p@ftn
- \global\bidi@p@ftn{}%
+ \ifx\@captype\@undefined
+ \global\bidi@p@ftn\expandafter{\expandafter}\the\bidi@p@ftn\fi%
\global\@RTLtabfalse}
\long\def\bidi@p@ftntext#1{%
- \edef\@tempy{\the\bidi@p@ftn\noexpand\footnotetext[\the\c@footnote]}%
+ \edef\@tempy{\the\bidi@p@ftn\noexpand\footnotetext[\the\csname c@\@mpfn\endcsname]}%
\global\bidi@p@ftn\expandafter{\@tempy{#1}}}%
\long\def\bidi@p@LTRftntext#1{%
- \edef\@tempyi{\the\bidi@p@ftn\noexpand\LTRfootnotetext[\the\c@footnote]}%
+ \edef\@tempyi{\the\bidi@p@ftn\noexpand\LTRfootnotetext[\the\csname c@\@mpfn\endcsname]}%
\global\bidi@p@ftn\expandafter{\@tempyi{#1}}}%
\long\def\bidi@p@RTLftntext#1{%
- \edef\@tempyii{\the\bidi@p@ftn\noexpand\RTLfootnotetext[\the\c@footnote]}%
+ \edef\@tempyii{\the\bidi@p@ftn\noexpand\RTLfootnotetext[\the\csname c@\@mpfn\endcsname]}%
\global\bidi@p@ftn\expandafter{\@tempyii{#1}}}%
+
+\long\def\bidi@p@xftntext[#1]#2{%
+ \global\bidi@p@ftn\expandafter{\the\bidi@p@ftn\footnotetext[#1]{#2}}}
+
+\long\def\bidi@p@xLTRftntext[#1]#2{%
+ \global\bidi@p@ftn\expandafter{\the\bidi@p@ftn\LTRfootnotetext[#1]{#2}}}
+
+\long\def\bidi@p@xRTLftntext[#1]#2{%
+ \global\bidi@p@ftn\expandafter{\the\bidi@p@ftn\RTLfootnotetext[#1]{#2}}}
+
+\def\bidi@p@xfootnote[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\bidi@p@xftntext[#1]}
+
+\def\bidi@p@xLTRfootnote[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\bidi@p@xLTRftntext[#1]}
+
+\def\bidi@p@xRTLfootnote[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\bidi@p@xRTLftntext[#1]}
+
\def\@xfloat #1[#2]{%
\@nodocument
\def \@captype {#1}%
@@ -146,6 +183,12 @@
\let\@footnotetext\bidi@p@ftntext
\let\@LTRfootnotetext\bidi@p@LTRftntext
\let\@RTLfootnotetext\bidi@p@RTLftntext
+ \let\@xfootnotenext\bidi@p@xftntext
+ \let\@xfootnote\bidi@p@xfootnote
+ \let\@xLTRfootnotenext\bidi@p@xLTRftntext
+ \let\@xLTRfootnote\bidi@p@xLTRfootnote
+ \let\@xRTLfootnotenext\bidi@p@xRTLftntext
+ \let\@xRTLfootnote\bidi@p@xRTLfootnote
\hsize\columnwidth
\@parboxrestore
\@floatboxreset
@@ -155,12 +198,11 @@
\@minipagefalse
\outer@nobreak
\egroup %% end of vbox
- \the\bidi@p@ftn
- \global\bidi@p@ftn{}%
+ \global\bidi@p@ftn\expandafter{\expandafter}\the\bidi@p@ftn
\color@endbox
}
%%
-%% Copyright © 2009–2012 Vafa Khalighi <vafakhlg@gmail.com>
+%% Copyright © 2009–2012 Vafa Khalighi <vafak12@gmail.com>
%%
%% It may be distributed and/or modified under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of