diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def | 822 |
1 files changed, 227 insertions, 595 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def index 2ef105719e2..b5f9c883bd4 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def @@ -17,7 +17,7 @@ %% by Vafa Khalighi. %% %% -%% \CheckSum{50675} +%% \CheckSum{49977} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -34,7 +34,9 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% -\ProvidesFile{extrafootnotefeatures-xetex-bidi.def}[2018/09/27 v1.4 bidi extra footnote features for XeTeX engine] +\ProvidesFile{extrafootnotefeatures-xetex-bidi.def}[2018/10/08 v1.6 bidi extra footnote features for XeTeX engine] +\newif\if@bidi@void@footins +\newif\if@bidi@void@@mpfootins \newcommand*{\@bidi@before@Hy@hyperfootnotes}{% \if@bidi@csundef{ifHy@hyperfootnotes}{}{% \if@bidi@csundef{HLTR@@LTRfootnotetext}{}{% @@ -76,8 +78,28 @@ \let\LRfootnoterule\relax \def\footnoterule{\kern-3\p@ \hrule \@width \columnwidth \kern 2.6\p@} -\bidi@ensure@newcommand{\setRTLparagraphfootnotes}{\@parafootRTLtrue} -\bidi@ensure@newcommand{\setLTRparagraphfootnotes}{\@parafootRTLfalse} +\newcommand{\@preamnormalfmt}{% + \parindent 1em% + \noindent +} +\newcommand{\@normalfootfmt}[1]{% + \@preamnormalfmt + \footfootmark + \rule\z@\footnotesep\ignorespaces{\foottextfont #1}% + \@finalstrut\strutbox +} +\newcommand{\@normalRTLfootfmt}[1]{% + \@preamnormalfmt + \RTLfootfootmark + \rule\z@\footnotesep\ignorespaces{\RTLfoottextfont #1}% + \@finalstrut\strutbox +} +\newcommand{\@normalLTRfootfmt}[1]{% + \@preamnormalfmt + \LTRfootfootmark + \rule\z@\footnotesep\ignorespaces{\LTRfoottextfont #1}% + \@finalstrut\strutbox +} \renewcommand{\@footnotetext}[1]{% \insert\footins{% \if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi% @@ -89,9 +111,7 @@ \protected@edef\@currentlabel{% \csname p@footnote\endcsname\@thefnmark}% \color@begingroup - \@makefntext{% - \rule\z@\footnotesep\ignorespaces{\foottextfont #1}% - \@finalstrut\strutbox}% + \@normalfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} \renewcommand{\@RTLfootnotetext}[1]{% @@ -105,9 +125,7 @@ \protected@edef\@currentlabel{% \csname p@footnote\endcsname\@thefnmark}% \color@begingroup - \@makefntext{% - \rule\z@\footnotesep\ignorespaces{\RTLfoottextfont #1}% - \@finalstrut\strutbox}% + \@normalRTLfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} \renewcommand{\@LTRfootnotetext}[1]{% @@ -121,49 +139,41 @@ \protected@edef\@currentlabel{% \csname p@footnote\endcsname\@thefnmark}% \color@begingroup - \@makefntext{% - \rule\z@\footnotesep\ignorespaces{\LTRfoottextfont #1}% - \@finalstrut\strutbox}% + \@normalLTRfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} \renewcommand{\@mpfootnotetext}[1]{% \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi% \unvbox\@mpfootins \def\baselinestretch{\m@m@footnote@spacing}% + \reset@font% \foottextfont \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel{% \csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup - \reset@font% - \@makefntext{% - \rule\z@\footnotesep\ignorespaces{\foottextfont #1}% - \@finalstrut\strutbox}% + \@normalfootfmt{#1}% \color@endgroup}} \renewcommand{\@mpLTRfootnotetext}[1]{% \global\setbox\@mpfootins\vbox{\@RTLfalse% \unvbox\@mpfootins \def\baselinestretch{\m@m@footnote@spacing}% + \reset@font% \LTRfoottextfont \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel{% \csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup - \reset@font% - \@makefntext{% - \rule\z@\footnotesep\ignorespaces{\LTRfoottextfont #1}% - \@finalstrut\strutbox}% + \@normalLTRfootfmt{#1}% \color@endgroup}} \renewcommand{\@mpRTLfootnotetext}[1]{% \global\setbox\@mpfootins\vbox{\@RTLtrue% \unvbox\@mpfootins \def\baselinestretch{\m@m@footnote@spacing}% + \reset@font% \RTLfoottextfont \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel{% \csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup - \reset@font% - \@makefntext{% - \rule\z@\footnotesep\ignorespaces{\RTLfoottextfont #1}% - \@finalstrut\strutbox}% + \@normalRTLfootfmt{#1}% \color@endgroup}} \let\m@mold@footnotetext\@footnotetext \let\m@mold@LTRfootnotetext\@LTRfootnotetext @@ -179,7 +189,9 @@ \let\@mpfootnotetext\m@mold@mpfootnotetext \let\@mpLTRfootnotetext\m@mold@mpLTRfootnotetext \let\@mpRTLfootnotetext\m@mold@mpRTLfootnotetext - \@bidi@after@Hy@hyperfootnotes} + \@bidi@after@Hy@hyperfootnotes + \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth +} \@ifclassloaded{memoir}{\let\plainfootnotes\normalfootnotes}{} \bidi@ensure@newcommand*{\RTLcolumnfootnotes}{\@RTLcolumnfootnotestrue} \bidi@ensure@newcommand*{\LTRcolumnfootnotes}{\@RTLcolumnfootnotesfalse} @@ -242,12 +254,27 @@ \newcommand*{\bidi@star@footmarkwidth}{% \setlength{\footmarkwidth}{0em plus.4em minus.4em}% } +\bidi@normal@footmarkwidth \bidi@ensure@newcommand{\m@mdoextrafeet}{\extrafeetins} \bidi@ensure@newcommand*{\extrafeetins}{% \setbox\@outputbox \vbox{% \boxmaxdepth \@maxdepth \unvbox\@outputbox - \ifvoid\footinsv@r\else\@footstartv@r\@footgroupv@r\fi + \ifvoid\footinsv@r + \ifvoid\footinsv@l + \else + \@footstartv@l + \@LTRfootgroupv@l + \fi + \else + \@footstartv@r + \@footgroupv@r + \ifvoid\footinsv@l + \else + \@@footstart@@v@l + \@LTRfootgroupv@l + \fi + \fi \ifvoid\@bidi@copyins@ \else \vskip \skip\@bidi@copyins@ @@ -272,9 +299,28 @@ \bidi@ensure@newcommand{\m@mdoextrafeetmini}{% \extrafeetminihook} \bidi@ensure@newcommand{\extrafeetendmini}{% - \ifvoid\@mpfootinsv@r\else + \ifvoid\@mpfootinsv@r + \ifvoid\@mpfootinsv@l + \else + \vskip\skip\@mpfootins + \normalcolor + \if@bidi@void@@mpfootins + \footnoterule + \fi + \mp@LTRfootgroupv@l + \fi + \else \vskip\skip\@mpfootins - \normalcolor\footnoterule\mp@footgroupv@r + \normalcolor + \if@bidi@void@@mpfootins + \footnoterule + \fi + \mp@footgroupv@r + \ifvoid\@mpfootinsv@l + \else + \vskip\skip\@mpfootins + \normalcolor\mp@LTRfootgroupv@l + \fi \fi \extrafeetendminihook} \bidi@ensure@newcommand{\extrafeetendminihook}{} @@ -282,7 +328,10 @@ \def\endminipage{% \par \unskip - \ifvoid\@mpfootins\else + \ifvoid\@mpfootins + \global\@bidi@void@@mpfootinstrue + \else + \global\@bidi@void@@mpfootinsfalse \vskip\skip\@mpfootins \normalcolor \footnoterule @@ -306,8 +355,11 @@ \count\footinsv@r=1000 % no magnifcation \dimen\footinsv@r=\footinsdim \m@make@footstart{v@r} +\newinsert\footinsv@l +\skip\footinsv@l\bigskipamount \bidi@ensure@newcommand{\@footgroupv@r}{} \newinsert\@mpfootinsv@r +\newinsert\@mpfootinsv@l \bidi@ensure@newcommand{\mp@footgroupv@r}{} \newcount\m@m@k \newdimen\m@m@h \@ifpackageloaded{multicol}{% @@ -424,52 +476,6 @@ \@twocolRTLfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} -\bidi@ensure@newcommand{\twocolumnfootstyle}[1]{% - \m@make@twocolfootnotetext{#1}% - \m@make@mptwocolfootnotetext{#1}% - \m@make@twocolfootfmt{#1}% - \m@make@twocol@footgroup{#1}% - \m@make@mptwocol@footgroup{#1}% - \m@make@footstart{#1}% - \bidi@namelongdef{@footnotetext#1}##1{% - \@nameuse{@twocolfootnotetext#1}{##1}}% - \bidi@namelongdef{@mpfootnotetext#1}##1{% - \@nameuse{@mptwocolfootnotetext#1}{##1}}% - \@namedef{@footgroup#1}{\@nameuse{@twocol@footgroup#1}}% - \@namedef{mp@footgroup#1}{\@nameuse{@mptwocol@footgroup#1}}% - \expandafter\dimen\csname footins#1\endcsname=2\footinsdim - \expandafter\count\csname footins#1\endcsname=500\relax - \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth -} -\bidi@ensure@newcommand{\m@make@twocolfootnotetext}[1]{% - \bidi@namelongdef{@twocolfootnotetext#1}##1{% - \insert\@nameuse{footins#1}{% - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \@preamfntext - \protected@edef\@currentlabel{% - \csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@twocolfootfmt#1}{##1}% - \color@endgroup}% - \m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@mptwocolfootnotetext}[1]{% -\bidi@namelongdef{@mptwocolfootnotetext#1}##1{% - \global\setbox\@nameuse{@mpfootins#1}\vbox{% - \unvbox\@nameuse{@mpfootins#1} - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \hsize\columnwidth \@parboxrestore - \protected@edef\@currentlabel{% - \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@twocolfootfmt#1}{##1}% - \color@endgroup}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@twocolfootfmt}[1]{% - \@namedef{@twocolfootfmt#1}##1{% - \@preamtwofmt - {\@nameuse{footfootmark#1}\strut - {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}} \bidi@ensure@newcommand{\m@make@twocol@footgroup}[1]{% \@namedef{@twocol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% @@ -573,51 +579,6 @@ \color@begingroup \@threecolRTLfootfmt{#1}% \color@endgroup}\m@mmf@prepare} -\bidi@ensure@newcommand{\threecolumnfootstyle}[1]{% - \m@make@threecolfootnotetext{#1}% - \m@make@mpthreecolfootnotetext{#1}% - \m@make@threecolfootfmt{#1}% - \m@make@threecol@footgroup{#1}% - \m@make@mpthreecol@footgroup{#1}% - \m@make@footstart{#1}% - \bidi@namelongdef{@footnotetext#1}##1{% - \@nameuse{@threecolfootnotetext#1}{##1}}% - \bidi@namelongdef{@mpfootnotetext#1}##1{% - \@nameuse{@mpthreecolfootnotetext#1}{##1}}% - \@namedef{@footgroup#1}{\@nameuse{@threecol@footgroup#1}}% - \@namedef{mp@footgroup#1}{\@nameuse{@mpthreecol@footgroup#1}}% - \expandafter\dimen\csname footins#1\endcsname=3\footinsdim - \expandafter\count\csname footins#1\endcsname=333\relax - \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth -} -\bidi@ensure@newcommand{\m@make@threecolfootnotetext}[1]{% -\bidi@namelongdef{@threecolfootnotetext#1}##1{% - \insert\@nameuse{footins#1}{% - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \@preamfntext - \protected@edef\@currentlabel{% - \csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@threecolfootfmt#1}{##1}% - \color@endgroup}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@mpthreecolfootnotetext}[1]{% -\bidi@namelongdef{@mpthreecolfootnotetext#1}##1{% - \global\setbox\@nameuse{@mpfootins#1}\vbox{% - \unvbox\@nameuse{@mpfootins#1} - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \hsize\columnwidth \@parboxrestore - \protected@edef\@currentlabel{% - \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@threecolfootfmt#1}{##1}% - \color@endgroup}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@threecolfootfmt}[1]{% -\bidi@namelongdef{@threecolfootfmt#1}##1{% - \@preamthreefmt - {\@nameuse{footfootmark#1}\strut - {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}} \bidi@ensure@newcommand{\m@make@threecol@footgroup}[1]{% \@namedef{@threecol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% @@ -727,52 +688,6 @@ \@fourcolRTLfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} -\bidi@ensure@newcommand{\fourcolumnfootstyle}[1]{% - \m@make@fourcolfootnotetext{#1}% - \m@make@mpfourcolfootnotetext{#1}% - \m@make@fourcolfootfmt{#1}% - \m@make@fourcol@footgroup{#1}% - \m@make@mpfourcol@footgroup{#1}% - \m@make@footstart{#1}% - \bidi@namelongdef{@footnotetext#1}##1{% - \@nameuse{@fourcolfootnotetext#1}{##1}}% - \bidi@namelongdef{@mpfootnotetext#1}##1{% - \@nameuse{@mpfourcolfootnotetext#1}{##1}}% - \@namedef{@footgroup#1}{\@nameuse{@fourcol@footgroup#1}}% - \@namedef{mp@footgroup#1}{\@nameuse{@mpfourcol@footgroup#1}}% - \expandafter\dimen\csname footins#1\endcsname=2\footinsdim - \expandafter\count\csname footins#1\endcsname=500\relax - \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth -} -\bidi@ensure@newcommand{\m@make@fourcolfootnotetext}[1]{% - \bidi@namelongdef{@fourcolfootnotetext#1}##1{% - \insert\@nameuse{footins#1}{% - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \@preamfntext - \protected@edef\@currentlabel{% - \csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@fourcolfootfmt#1}{##1}% - \color@endgroup}% - \m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@mpfourcolfootnotetext}[1]{% -\bidi@namelongdef{@mpfourcolfootnotetext#1}##1{% - \global\setbox\@nameuse{@mpfootins#1}\vbox{% - \unvbox\@nameuse{@mpfootins#1} - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \hsize\columnwidth \@parboxrestore - \protected@edef\@currentlabel{% - \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@fourcolfootfmt#1}{##1}% - \color@endgroup}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@fourcolfootfmt}[1]{% - \@namedef{@fourcolfootfmt#1}##1{% - \@preamfourfmt - {\@nameuse{footfootmark#1}\strut - {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}} \bidi@ensure@newcommand{\m@make@fourcol@footgroup}[1]{% \@namedef{@fourcol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% @@ -882,52 +797,6 @@ \@fivecolRTLfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} -\bidi@ensure@newcommand{\fivecolumnfootstyle}[1]{% - \m@make@fivecolfootnotetext{#1}% - \m@make@mpfivecolfootnotetext{#1}% - \m@make@fivecolfootfmt{#1}% - \m@make@fivecol@footgroup{#1}% - \m@make@mpfivecol@footgroup{#1}% - \m@make@footstart{#1}% - \bidi@namelongdef{@footnotetext#1}##1{% - \@nameuse{@fivecolfootnotetext#1}{##1}}% - \bidi@namelongdef{@mpfootnotetext#1}##1{% - \@nameuse{@mpfivecolfootnotetext#1}{##1}}% - \@namedef{@footgroup#1}{\@nameuse{@fivecol@footgroup#1}}% - \@namedef{mp@footgroup#1}{\@nameuse{@mpfivecol@footgroup#1}}% - \expandafter\dimen\csname footins#1\endcsname=2\footinsdim - \expandafter\count\csname footins#1\endcsname=500\relax - \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth -} -\bidi@ensure@newcommand{\m@make@fivecolfootnotetext}[1]{% - \bidi@namelongdef{@fivecolfootnotetext#1}##1{% - \insert\@nameuse{footins#1}{% - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \@preamfntext - \protected@edef\@currentlabel{% - \csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@fivecolfootfmt#1}{##1}% - \color@endgroup}% - \m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@mpfivecolfootnotetext}[1]{% -\bidi@namelongdef{@mpfivecolfootnotetext#1}##1{% - \global\setbox\@nameuse{@mpfootins#1}\vbox{% - \unvbox\@nameuse{@mpfootins#1} - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \hsize\columnwidth \@parboxrestore - \protected@edef\@currentlabel{% - \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@fivecolfootfmt#1}{##1}% - \color@endgroup}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@fivecolfootfmt}[1]{% - \@namedef{@fivecolfootfmt#1}##1{% - \@preamfivefmt - {\@nameuse{footfootmark#1}\strut - {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}} \bidi@ensure@newcommand{\m@make@fivecol@footgroup}[1]{% \@namedef{@fivecol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% @@ -1037,52 +906,6 @@ \@sixcolRTLfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} -\bidi@ensure@newcommand{\sixcolumnfootstyle}[1]{% - \m@make@sixcolfootnotetext{#1}% - \m@make@mpsixcolfootnotetext{#1}% - \m@make@sixcolfootfmt{#1}% - \m@make@sixcol@footgroup{#1}% - \m@make@mpsixcol@footgroup{#1}% - \m@make@footstart{#1}% - \bidi@namelongdef{@footnotetext#1}##1{% - \@nameuse{@sixcolfootnotetext#1}{##1}}% - \bidi@namelongdef{@mpfootnotetext#1}##1{% - \@nameuse{@mpsixcolfootnotetext#1}{##1}}% - \@namedef{@footgroup#1}{\@nameuse{@sixcol@footgroup#1}}% - \@namedef{mp@footgroup#1}{\@nameuse{@mpsixcol@footgroup#1}}% - \expandafter\dimen\csname footins#1\endcsname=2\footinsdim - \expandafter\count\csname footins#1\endcsname=500\relax - \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth -} -\bidi@ensure@newcommand{\m@make@sixcolfootnotetext}[1]{% - \bidi@namelongdef{@sixcolfootnotetext#1}##1{% - \insert\@nameuse{footins#1}{% - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \@preamfntext - \protected@edef\@currentlabel{% - \csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@sixcolfootfmt#1}{##1}% - \color@endgroup}% - \m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@mpsixcolfootnotetext}[1]{% -\bidi@namelongdef{@mpsixcolfootnotetext#1}##1{% - \global\setbox\@nameuse{@mpfootins#1}\vbox{% - \unvbox\@nameuse{@mpfootins#1} - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \hsize\columnwidth \@parboxrestore - \protected@edef\@currentlabel{% - \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@sixcolfootfmt#1}{##1}% - \color@endgroup}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@sixcolfootfmt}[1]{% - \@namedef{@sixcolfootfmt#1}##1{% - \@preamsixfmt - {\@nameuse{footfootmark#1}\strut - {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}} \bidi@ensure@newcommand{\m@make@sixcol@footgroup}[1]{% \@namedef{@sixcol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% @@ -1192,52 +1015,6 @@ \@sevencolRTLfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} -\bidi@ensure@newcommand{\sevencolumnfootstyle}[1]{% - \m@make@sevencolfootnotetext{#1}% - \m@make@mpsevencolfootnotetext{#1}% - \m@make@sevencolfootfmt{#1}% - \m@make@sevencol@footgroup{#1}% - \m@make@mpsevencol@footgroup{#1}% - \m@make@footstart{#1}% - \bidi@namelongdef{@footnotetext#1}##1{% - \@nameuse{@sevencolfootnotetext#1}{##1}}% - \bidi@namelongdef{@mpfootnotetext#1}##1{% - \@nameuse{@mpsevencolfootnotetext#1}{##1}}% - \@namedef{@footgroup#1}{\@nameuse{@sevencol@footgroup#1}}% - \@namedef{mp@footgroup#1}{\@nameuse{@mpsevencol@footgroup#1}}% - \expandafter\dimen\csname footins#1\endcsname=2\footinsdim - \expandafter\count\csname footins#1\endcsname=500\relax - \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth -} -\bidi@ensure@newcommand{\m@make@sevencolfootnotetext}[1]{% - \bidi@namelongdef{@sevencolfootnotetext#1}##1{% - \insert\@nameuse{footins#1}{% - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \@preamfntext - \protected@edef\@currentlabel{% - \csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@sevencolfootfmt#1}{##1}% - \color@endgroup}% - \m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@mpsevencolfootnotetext}[1]{% -\bidi@namelongdef{@mpsevencolfootnotetext#1}##1{% - \global\setbox\@nameuse{@mpfootins#1}\vbox{% - \unvbox\@nameuse{@mpfootins#1} - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \hsize\columnwidth \@parboxrestore - \protected@edef\@currentlabel{% - \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@sevencolfootfmt#1}{##1}% - \color@endgroup}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@sevencolfootfmt}[1]{% - \@namedef{@sevencolfootfmt#1}##1{% - \@preamsevenfmt - {\@nameuse{footfootmark#1}\strut - {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}} \bidi@ensure@newcommand{\m@make@sevencol@footgroup}[1]{% \@namedef{@sevencol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% @@ -1347,52 +1124,6 @@ \@eightcolRTLfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} -\bidi@ensure@newcommand{\eightcolumnfootstyle}[1]{% - \m@make@eightcolfootnotetext{#1}% - \m@make@mpeightcolfootnotetext{#1}% - \m@make@eightcolfootfmt{#1}% - \m@make@eightcol@footgroup{#1}% - \m@make@mpeightcol@footgroup{#1}% - \m@make@footstart{#1}% - \bidi@namelongdef{@footnotetext#1}##1{% - \@nameuse{@eightcolfootnotetext#1}{##1}}% - \bidi@namelongdef{@mpfootnotetext#1}##1{% - \@nameuse{@mpeightcolfootnotetext#1}{##1}}% - \@namedef{@footgroup#1}{\@nameuse{@eightcol@footgroup#1}}% - \@namedef{mp@footgroup#1}{\@nameuse{@mpeightcol@footgroup#1}}% - \expandafter\dimen\csname footins#1\endcsname=2\footinsdim - \expandafter\count\csname footins#1\endcsname=500\relax - \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth -} -\bidi@ensure@newcommand{\m@make@eightcolfootnotetext}[1]{% - \bidi@namelongdef{@eightcolfootnotetext#1}##1{% - \insert\@nameuse{footins#1}{% - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \@preamfntext - \protected@edef\@currentlabel{% - \csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@eightcolfootfmt#1}{##1}% - \color@endgroup}% - \m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@mpeightcolfootnotetext}[1]{% -\bidi@namelongdef{@mpeightcolfootnotetext#1}##1{% - \global\setbox\@nameuse{@mpfootins#1}\vbox{% - \unvbox\@nameuse{@mpfootins#1} - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \hsize\columnwidth \@parboxrestore - \protected@edef\@currentlabel{% - \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@eightcolfootfmt#1}{##1}% - \color@endgroup}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@eightcolfootfmt}[1]{% - \@namedef{@eightcolfootfmt#1}##1{% - \@preameightfmt - {\@nameuse{footfootmark#1}\strut - {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}} \bidi@ensure@newcommand{\m@make@eightcol@footgroup}[1]{% \@namedef{@eightcol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% @@ -1502,52 +1233,6 @@ \@ninecolRTLfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} -\bidi@ensure@newcommand{\ninecolumnfootstyle}[1]{% - \m@make@ninecolfootnotetext{#1}% - \m@make@mpninecolfootnotetext{#1}% - \m@make@ninecolfootfmt{#1}% - \m@make@ninecol@footgroup{#1}% - \m@make@mpninecol@footgroup{#1}% - \m@make@footstart{#1}% - \bidi@namelongdef{@footnotetext#1}##1{% - \@nameuse{@ninecolfootnotetext#1}{##1}}% - \bidi@namelongdef{@mpfootnotetext#1}##1{% - \@nameuse{@mpninecolfootnotetext#1}{##1}}% - \@namedef{@footgroup#1}{\@nameuse{@ninecol@footgroup#1}}% - \@namedef{mp@footgroup#1}{\@nameuse{@mpninecol@footgroup#1}}% - \expandafter\dimen\csname footins#1\endcsname=2\footinsdim - \expandafter\count\csname footins#1\endcsname=500\relax - \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth -} -\bidi@ensure@newcommand{\m@make@ninecolfootnotetext}[1]{% - \bidi@namelongdef{@ninecolfootnotetext#1}##1{% - \insert\@nameuse{footins#1}{% - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \@preamfntext - \protected@edef\@currentlabel{% - \csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@ninecolfootfmt#1}{##1}% - \color@endgroup}% - \m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@mpninecolfootnotetext}[1]{% -\bidi@namelongdef{@mpninecolfootnotetext#1}##1{% - \global\setbox\@nameuse{@mpfootins#1}\vbox{% - \unvbox\@nameuse{@mpfootins#1} - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \hsize\columnwidth \@parboxrestore - \protected@edef\@currentlabel{% - \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@ninecolfootfmt#1}{##1}% - \color@endgroup}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@ninecolfootfmt}[1]{% - \@namedef{@ninecolfootfmt#1}##1{% - \@preamninefmt - {\@nameuse{footfootmark#1}\strut - {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}} \bidi@ensure@newcommand{\m@make@ninecol@footgroup}[1]{% \@namedef{@ninecol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% @@ -1657,52 +1342,6 @@ \@tencolRTLfootfmt{#1}% \color@endgroup}% \m@mmf@prepare} -\bidi@ensure@newcommand{\tencolumnfootstyle}[1]{% - \m@make@tencolfootnotetext{#1}% - \m@make@mptencolfootnotetext{#1}% - \m@make@tencolfootfmt{#1}% - \m@make@tencol@footgroup{#1}% - \m@make@mptencol@footgroup{#1}% - \m@make@footstart{#1}% - \bidi@namelongdef{@footnotetext#1}##1{% - \@nameuse{@tencolfootnotetext#1}{##1}}% - \bidi@namelongdef{@mpfootnotetext#1}##1{% - \@nameuse{@mptencolfootnotetext#1}{##1}}% - \@namedef{@footgroup#1}{\@nameuse{@tencol@footgroup#1}}% - \@namedef{mp@footgroup#1}{\@nameuse{@mptencol@footgroup#1}}% - \expandafter\dimen\csname footins#1\endcsname=2\footinsdim - \expandafter\count\csname footins#1\endcsname=500\relax - \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth -} -\bidi@ensure@newcommand{\m@make@tencolfootnotetext}[1]{% - \bidi@namelongdef{@tencolfootnotetext#1}##1{% - \insert\@nameuse{footins#1}{% - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \@preamfntext - \protected@edef\@currentlabel{% - \csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@tencolfootfmt#1}{##1}% - \color@endgroup}% - \m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@mptencolfootnotetext}[1]{% -\bidi@namelongdef{@mptencolfootnotetext#1}##1{% - \global\setbox\@nameuse{@mpfootins#1}\vbox{% - \unvbox\@nameuse{@mpfootins#1} - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \hsize\columnwidth \@parboxrestore - \protected@edef\@currentlabel{% - \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}% - \color@begingroup - \@nameuse{@tencolfootfmt#1}{##1}% - \color@endgroup}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@tencolfootfmt}[1]{% - \@namedef{@tencolfootfmt#1}##1{% - \@preamtenfmt - {\@nameuse{footfootmark#1}\strut - {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}} \bidi@ensure@newcommand{\m@make@tencol@footgroup}[1]{% \@namedef{@tencol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% @@ -1733,7 +1372,6 @@ \m@minterparanoteglue{1em plus.4em minus.4em} \@ifpackageloaded{multicol}{% \bidi@ensure@newcommand*{\m@mmakehboxofhboxes}{% - \if@parafootRTL\@RTLtrue\else\@RTLfalse\fi% \hsize\textwidth% \setbox0=\hbox{}% \loop @@ -1744,7 +1382,6 @@ \repeat} }{% \bidi@ensure@newcommand*{\m@mmakehboxofhboxes}{% - \if@parafootRTL\@RTLtrue\else\@RTLfalse\fi% \setbox0=\hbox{}% \loop \unpenalty @@ -1777,12 +1414,84 @@ \m@make@para@footstart{v@r}% \let\@footgroupv@r\@para@footgroupv@r \let\@footstartv@r\@para@footstartv@r + \dimen\footinsv@l=\footinsdim + \count\footinsv@l=1000\relax + \bidi@make@para@LTRfootgroup{v@l}% + \m@make@para@footstart{v@l}% + \bidi@make@para@footstart@@{v@l}% + \let\@LTRfootgroupv@l\@para@LTRfootgroupv@l + \let\@footstartv@l\@para@footstartv@l + \let\@@footstart@@v@l\@@para@footstart@@v@l \let\@mpfootnotetext\@mpparafootnotetext \let\@mpLTRfootnotetext\@mpparaLTRfootnotetext \let\@mpRTLfootnotetext\@mpparaRTLfootnotetext \@bidi@after@Hy@hyperfootnotes \m@make@mppara@footgroup{v@r}% + \bidi@make@mppara@LTRfootgroup{v@l}% + \let\mp@footgroupv@r\@mppara@footgroupv@r + \let\mp@LTRfootgroupv@l\@mppara@LTRfootgroupv@l + \begingroup + \def\baselinestretch{\m@m@footnote@spacing}% + \foottextfont + \@tempdima\footnotesep + \advance\@tempdima -\ht\strutbox + \ifdim\@tempdima<\z@ \@tempdima\z@ \fi + \advance\@tempdima.5\normalbaselineskip + \bidi@xparaskip + \xdef\bidi@paraskip{\the\@tempdima\relax}% + \ifdim\skip\footinsv@r>\bigskipamount + \else + \global\advance\skip\footinsv@r\bidi@paraskip + \fi + \ifdim\skip\footinsv@l>\bigskipamount + \else + \global\advance\skip\footinsv@l\bidi@paraskip + \fi + \@tempdima\normalbaselineskip + \multiply \@tempdima \@cclvi + \@tempdimb \columnwidth + \divide \@tempdimb \@cclvi + \divide \@tempdima \@tempdimb + \xdef\footfudgefactor{\strip@pt\@tempdima}% + \endgroup + \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth +} +\newcommand{\normalRTLparaLTRfootnotes}{% + \@namedef{foottextfontv@r}{\foottextfont}% + \@bidi@before@Hy@hyperfootnotes + \if@RTL@footnote + \let\@footnotetext\m@mold@footnotetext + \else + \let\@footnotetext\@parafootnotetext + \fi + \let\@LTRfootnotetext\@paraLTRfootnotetext + \let\@RTLfootnotetext\m@mold@RTLfootnotetext + \dimen\footinsv@r=\footinsdim + \count\footinsv@r=1000\relax + \m@make@para@footgroup{v@r}% + \m@make@para@footstart{v@r}% + \let\@footgroupv@r\@para@footgroupv@r + \let\@footstartv@r\@para@footstartv@r + \dimen\footinsv@l=\footinsdim + \count\footinsv@l=1000\relax + \bidi@make@para@LTRfootgroup{v@l}% + \m@make@para@footstart{v@l}% + \bidi@make@para@footstart@@{v@l}% + \let\@LTRfootgroupv@l\@para@LTRfootgroupv@l + \let\@footstartv@l\@para@footstartv@l + \let\@@footstart@@v@l\@@para@footstart@@v@l + \if@RTL@footnote + \let\@mpfootnotetext\m@mold@mpfootnotetext + \else + \let\@mpfootnotetext\@mpparafootnotetext + \fi + \let\@mpLTRfootnotetext\@mpparaLTRfootnotetext + \let\@mpRTLfootnotetext\m@mold@mpRTLfootnotetext + \@bidi@after@Hy@hyperfootnotes + \m@make@mppara@footgroup{v@r}% + \bidi@make@mppara@LTRfootgroup{v@l}% \let\mp@footgroupv@r\@mppara@footgroupv@r + \let\mp@LTRfootgroupv@l\@mppara@LTRfootgroupv@l \begingroup \def\baselinestretch{\m@m@footnote@spacing}% \foottextfont @@ -1796,6 +1505,10 @@ \else \global\advance\skip\footinsv@r\bidi@paraskip \fi + \ifdim\skip\footinsv@l>\bigskipamount + \else + \global\advance\skip\footinsv@l\bidi@paraskip + \fi \@tempdima\normalbaselineskip \multiply \@tempdima \@cclvi \@tempdimb \columnwidth @@ -1807,7 +1520,13 @@ } \let\bidi@xparaskip\relax \@onlypreamble\AddExtraParaSkip -\bidi@ensure@newcommand{\@parafootnotetext}[1]{\insert\footinsv@r{% +\bidi@ensure@newcommand{\@parafootnotetext}[1]{\insert + \if@RTL@footnote + \footinsv@r + \else + \footinsv@l + \fi + {% \let\bidi@RTL@everypar\@empty% \def\baselinestretch{\m@m@footnote@spacing}% \reset@font\foottextfont @@ -1816,10 +1535,10 @@ \csname p@footnote\endcsname\@thefnmark}% \setbox0=\vbox{\hsize=\maxdimen \color@begingroup - \noindent \@parafootfmt{\if@RTL@footnote\beginR\else\beginL\fi#1\if@RTL@footnote\endR\else\endL\fi}% + \noindent \@parafootfmt{#1}% \color@endgroup}% \m@mungebox}\m@mmf@prepare} -\bidi@ensure@newcommand{\@paraLTRfootnotetext}[1]{\insert\footinsv@r{% +\bidi@ensure@newcommand{\@paraLTRfootnotetext}[1]{\insert\footinsv@l{% \let\bidi@RTL@everypar\@empty% \def\baselinestretch{\m@m@footnote@spacing}% \reset@font\LTRfoottextfont @@ -1828,7 +1547,7 @@ \csname p@footnote\endcsname\@thefnmark}% \setbox0=\vbox{\hsize=\maxdimen \color@begingroup - \noindent \@paraLTRfootfmt{\beginL#1\endL}% + \noindent \@paraLTRfootfmt{#1}% \color@endgroup}% \m@mungebox}\m@mmf@prepare} \bidi@ensure@newcommand{\@paraRTLfootnotetext}[1]{\insert\footinsv@r{% @@ -1840,7 +1559,7 @@ \csname p@footnote\endcsname\@thefnmark}% \setbox0=\vbox{\hsize=\maxdimen \color@begingroup - \noindent \@paraRTLfootfmt{\beginR#1\endR}% + \noindent \@paraRTLfootfmt{#1}% \color@endgroup}% \m@mungebox}\m@mmf@prepare} \bidi@ensure@newcommand{\@parafootfmt}[1]{% @@ -1856,31 +1575,42 @@ \parfillskip=0pt \@plus 1fil {\RTLfootfootmark\strut {\RTLfoottextfont #1}\penalty-10}} \bidi@ensure@newcommand{\@mpparafootnotetext}[1]{% - \global\setbox\@mpfootinsv@r\vbox{% + \global\setbox + \if@RTL@footnote + \@mpfootinsv@r + \else + \@mpfootinsv@l + \fi + \vbox{% \let\bidi@RTL@everypar\@empty% \def\baselinestretch{\m@m@footnote@spacing}% - \unvbox\@mpfootinsv@r + \unvbox + \if@RTL@footnote + \@mpfootinsv@r + \else + \@mpfootinsv@l + \fi \reset@font\foottextfont \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel{% \csname p@mpfootnote\endcsname\@thefnmark}% \setbox0=\vbox{\hsize=\maxdimen \color@begingroup - \noindent \@parafootfmt{\if@RTL@footnote\beginR\else\beginL\fi#1\if@RTL@footnote\endR\else\endL\fi}% + \noindent \@parafootfmt{#1}% \color@endgroup}% \m@mungebox}\m@mmf@prepare} \bidi@ensure@newcommand{\@mpparaLTRfootnotetext}[1]{% - \global\setbox\@mpfootinsv@r\vbox{% + \global\setbox\@mpfootinsv@l\vbox{% \let\bidi@RTL@everypar\@empty% \def\baselinestretch{\m@m@footnote@spacing}% - \unvbox\@mpfootinsv@r + \unvbox\@mpfootinsv@l \reset@font\LTRfoottextfont \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel{% \csname p@mpfootnote\endcsname\@thefnmark}% \setbox0=\vbox{\hsize=\maxdimen \color@begingroup - \noindent \@paraLTRfootfmt{\beginL#1\endL}% + \noindent \@paraLTRfootfmt{#1}% \color@endgroup}% \m@mungebox}\m@mmf@prepare} \bidi@ensure@newcommand{\@mpparaRTLfootnotetext}[1]{% @@ -1894,83 +1624,23 @@ \csname p@mpfootnote\endcsname\@thefnmark}% \setbox0=\vbox{\hsize=\maxdimen \color@begingroup - \noindent \@paraRTLfootfmt{\beginR#1\endR}% + \noindent \@paraRTLfootfmt{#1}% \color@endgroup}% \m@mungebox}\m@mmf@prepare} -\bidi@ensure@newcommand{\paragraphfootstyle}[1]{% - \m@make@parafootnotetext{#1}% - \m@make@mpparafootnotetext{#1}% - \m@make@parafootfmt{#1}% - \m@make@para@footgroup{#1}% - \m@make@mppara@footgroup{#1}% - \m@make@para@footstart{#1}% - \bidi@namelongdef{@footnotetext#1}##1{% - \@nameuse{@parafootnotetext#1}{##1}}% - \bidi@namelongdef{@mpfootnotetext#1}##1{% - \@nameuse{@mpparafootnotetext#1}{##1}}% - \@namedef{@footgroup#1}{\@nameuse{@para@footgroup#1}}% - \@namedef{mp@footgroup#1}{\@nameuse{@mppara@footgroup#1}}% - \@namedef{@footstart#1}{\@nameuse{@para@footstart#1}}% - \expandafter\dimen\csname footins#1\endcsname=\footinsdim - \expandafter\count\csname footins#1\endcsname=1000\relax - \begingroup - \def\baselinestretch{\m@m@footnote@spacing}% - \@nameuse{foottextfont#1}% - \@tempdima\footnotesep - \advance\@tempdima -\ht\strutbox - \ifdim\@tempdima<\z@ \@tempdima\z@ \fi - \advance\@tempdima.5\normalbaselineskip - \bidi@xparaskip - \xdef\bidi@paraskip{\the\@tempdima\relax}% - \ifdim\skip\@nameuse{footins#1}>\bigskipamount - \else - \global\advance\skip\@nameuse{footins#1}\bidi@paraskip - \fi - \@tempdima\normalbaselineskip - \multiply \@tempdima \@cclvi - \@tempdimb \columnwidth - \divide \@tempdimb \@cclvi - \divide \@tempdima \@tempdimb - \xdef\footfudgefactor{\strip@pt\@tempdima}% - \endgroup - \@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth -} -\bidi@ensure@newcommand{\m@make@parafootnotetext}[1]{% -\bidi@namelongdef{@parafootnotetext#1}##1{% - \insert\@nameuse{footins#1}{ - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \@preamfntext - \protected@edef\@currentlabel{% - \csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}% - \setbox0=\vbox{\hsize=\maxdimen - \color@begingroup - \noindent \@nameuse{@parafootfmt#1}{##1}% - \color@endgroup}% - \m@mungebox}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@mpparafootnotetext}[1]{% -\bidi@namelongdef{@mpparafootnotetext#1}##1{% - \global\setbox\@nameuse{@mpfootins#1}\vbox{% - \unvbox\@nameuse{@mpfootins#1} - \def\baselinestretch{\m@m@footnote@spacing}% - \reset@font\@nameuse{foottextfont#1}% - \hsize\columnwidth \@parboxrestore - \protected@edef\@currentlabel{% - \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}% - \setbox0=\vbox{\hsize=\maxdimen - \color@begingroup - \noindent \@nameuse{@parafootfmt#1}{##1}% - \color@endgroup}% - \m@mungebox}\m@mmf@prepare}} -\bidi@ensure@newcommand{\m@make@parafootfmt}[1]{% -\bidi@namelongdef{@parafootfmt#1}##1{% - \parindent=\z@ - \parfillskip=0pt \@plus 1fil - {\@nameuse{footfootmark#1}\strut - {\@nameuse{foottextfont#1}##1}\penalty-10}}} \bidi@ensure@newcommand{\m@make@para@footgroup}[1]{% \@namedef{@para@footgroup#1}{% \unvbox\@nameuse{footins#1} + \@RTLtrue + \m@mmakehboxofhboxes + \setbox0=\hbox{\unhbox0 \m@mremovehboxes}% + \@parboxrestore% + \def\baselinestretch{\m@m@footnote@spacing}% + \@nameuse{foottextfont#1}% + \noindent\unhbox0\par}} +\bidi@ensure@newcommand{\bidi@make@para@LTRfootgroup}[1]{% +\@namedef{@para@LTRfootgroup#1}{% + \unvbox\@nameuse{footins#1} + \@RTLfalse \m@mmakehboxofhboxes \setbox0=\hbox{\unhbox0 \m@mremovehboxes}% \@parboxrestore% @@ -1980,6 +1650,16 @@ \bidi@ensure@newcommand{\m@make@mppara@footgroup}[1]{% \@namedef{@mppara@footgroup#1}{% \unvbox\@nameuse{@mpfootins#1} + \@RTLtrue + \m@mmakehboxofhboxes + \setbox0=\hbox{\unhbox0 \m@mremovehboxes}% + \def\baselinestretch{\m@m@footnote@spacing}% + \@nameuse{foottextfont#1}% + \noindent\unhbox0\par}} +\bidi@ensure@newcommand{\bidi@make@mppara@LTRfootgroup}[1]{% +\@namedef{@mppara@LTRfootgroup#1}{% + \unvbox\@nameuse{@mpfootins#1} + \@RTLfalse \m@mmakehboxofhboxes \setbox0=\hbox{\unhbox0 \m@mremovehboxes}% \def\baselinestretch{\m@m@footnote@spacing}% @@ -1992,7 +1672,16 @@ \rightskip=\z@ \parindent=\z@ \vskip\skip\footins - \footnoterule}} + \if@bidi@void@footins + \footnoterule + \fi}} +\bidi@ensure@newcommand{\bidi@make@para@footstart@@}[1]{% +\@namedef{@@para@footstart@@#1}{% + \bidi@mopfn@bottom + \leftskip=\z@ + \rightskip=\z@ + \parindent=\z@ + \vskip\skip\footins}} \bidi@ensure@newcommand*{\m@m@makecolfloats}{% \xdef\@freelist{\@freelist\@midlist}% \global\let\@midlist\@empty @@ -2021,32 +1710,8 @@ \footnoterule \unvbox \footins \color@endgroup - \ifvoid\footinsv@r - \ifvoid\@bidi@copyins@ - \else - \vskip \skip\@bidi@copyins@ - \color@begingroup - \normalcolor - \unvbox \@bidi@copyins@ - \color@endgroup - \fi - \fi - }} -\newcommand*{\bidi@mopcopyins}{\setbox\@outputbox \vbox{% - \boxmaxdepth\@maxdepth - \@tempdima\dp\@cclv - \unvbox\@cclv - \vskip-\@tempdima - \bidi@mopfn@bottom - \ifvoid\@bidi@copyins@ - \else - \vskip \skip\@bidi@copyins@ - \color@begingroup - \normalcolor - \unvbox \@bidi@copyins@ - \color@endgroup - \fi - }} + }% +} \newcommand*{\bidi@mopfootnotebf}{% \setbox\@outputbox \vbox{% \boxmaxdepth\@maxdepth @@ -2058,44 +1723,15 @@ \footnoterule \unvbox \footins \color@endgroup - \ifvoid\footinsv@r - \ifvoid\@bidi@copyins@ - \else - \vskip \skip\@bidi@copyins@ - \color@begingroup - \normalcolor - \unvbox \@bidi@copyins@ - \color@endgroup - \fi - \fi - }} -\newcommand*{\bidi@mopcopyinsbf}{% - \setbox\@outputbox \vbox{% - \boxmaxdepth\@maxdepth - \unvbox\@outputbox - \bidi@mopfn@bottom - \ifvoid\@bidi@copyins@ - \else - \vskip \skip\@bidi@copyins@ - \color@begingroup - \normalcolor - \unvbox \@bidi@copyins@ - \color@endgroup - \fi - }} + }% +} \gdef\mem@makecol{% \m@m@makecolintro \ifvoid\footins - \ifvoid\footinsv@r - \ifvoid\@bidi@copyins@ - \setbox\@outputbox \box\@cclv - \else - \bidi@mopcopyins - \fi - \else - \setbox\@outputbox \box\@cclv - \fi + \global\@bidi@void@footinstrue + \setbox\@outputbox \box\@cclv \else + \global\@bidi@void@footinsfalse \m@mopfootnote \fi \m@mdoextrafeet @@ -2107,13 +1743,9 @@ \setbox\@outputbox \box\@cclv \m@m@makecolfloats \ifvoid\footins - \ifvoid\footinsv@r - \ifvoid\@bidi@copyins@ - \else - \bidi@mopcopyinsbf - \fi - \fi + \global\@bidi@void@footinstrue \else + \global\@bidi@void@footinsfalse \bidi@mopfootnotebf \fi \m@mdoextrafeet |