summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/bidi
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-13 23:34:56 +0000
committerKarl Berry <karl@freefriends.org>2011-02-13 23:34:56 +0000
commit0853d35f07a831485e3e4233dd3d24fd04b8faab (patch)
tree7d45a0b298defb9530fb1d54ea322930147ef219 /Master/texmf-dist/source/latex/bidi
parentcbd629a491c12d069d35c0ebeb51f9c8e3a61dab (diff)
bidi (12feb11)
git-svn-id: svn://tug.org/texlive/trunk@21395 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/bidi')
-rw-r--r--Master/texmf-dist/source/latex/bidi/bidi.dtx2261
-rw-r--r--Master/texmf-dist/source/latex/bidi/bidi.ins130
2 files changed, 2098 insertions, 293 deletions
diff --git a/Master/texmf-dist/source/latex/bidi/bidi.dtx b/Master/texmf-dist/source/latex/bidi/bidi.dtx
index 98f70687764..789db2792ba 100644
--- a/Master/texmf-dist/source/latex/bidi/bidi.dtx
+++ b/Master/texmf-dist/source/latex/bidi/bidi.dtx
@@ -5,12 +5,12 @@
%<*readme>
___________________
The bidi package
-v1.1.5a
+v1.1.6
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX.
-This version fixes all the bugs that were present in v1.1.4c.
+This version fixes all the bugs that were present in v1.1.5.
Note: The image ctg.jpg is in public domain (a public domain
artwork from iranpoliticsclub.net) and taken from
@@ -20,74 +20,13 @@ ___________________
Vafa Khalighi
vafakhlgh@gmail.com
-Copyright © 2007–2010
+Copyright © 2007–2011
It may be distributed and/or modified under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
this license is at: http://www.latex-project.org/lppl.txt
This work is “author-maintained” (as per LPPL maintenance status)
by Vafa Khalighi.
-
-In addition to the terms of LPPL any distributed version
-(unchanged or modified) of bidi has to keep the statement
-about the moral obligation for using bidi. In case of major
-changes where this would not be appropriate the author of the
-changed version should contact the copyright holder.
-
-
-
-Moral obligation for using bidi:
-____________________________________
-
-Users of bidi who wish to include or use bidi or a modified
-version in a proprietary and commercially market product are asked
-under certain conditions (see below) for the payment of a license
-fee. The size of this fee is to be determined, in each instance,
-by the commercial user, depending on his/her judgment of the value of
-bidi for his/her product.
-
-
-The conditions for this are as follows:
-
-The producer of a proprietary and commercially market product
-that involves typesetting using bidi is asked to determine
-the value of a license fee for using bidi if
-
- - the product is a document and the producer has decided to
- include bidi to typeset (parts of) the document or has
- directed the author of the document to include bidi (for
- example, by providing a class file to be used by the author)
-
- - the product is a LaTeX class or package that includes bidi
-
-
-There is no moral obligation in case
-
- - the product is a document but producer has not directed
- the author to include bidi (in that case the moral obligation
- lies with the author of the document)
-
- - the product does not involve typesetting, e.g., consists, for
- example, of distributing bidi and its documentation.
-
- - the product is not proprietary, i.e., is made available as free
- software itself (which doesn't prohibit its commercial marketing)
-
- - bidi is used for non-commercial purposes
-
-
-Determinating a license fee might result in a license fee of zero
-(i.e., no payment) in case a producer has determined that the use
-of bidi has no enhancing effect on the product. This is a
-plausible scenario, i.e., in the above two cases the producer is
-only asked to evaluate the value of bidi for the product
-not for the payment of a license fee per se (which might or might
-not follow from this evaluation).
-
- The license fee, if any, can be payed to the author of
- the program who can be contacted at
-
- vafakhlgh@gmail.com
%</readme>
%<*internal>
\fi
@@ -99,7 +38,7 @@ not follow from this evaluation).
\preamble
______________________________________
- Copyright © 2009–2010 Vafa Khalighi
+ Copyright © 2009–2011 Vafa Khalighi
License information appended.
@@ -107,7 +46,7 @@ not follow from this evaluation).
\endpreamble
\postamble
-Copyright © 2009–2010 Vafa Khalighi <vafakhlgh@gmail.com>
+Copyright © 2009–2011 Vafa Khalighi <vafakhlgh@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
@@ -116,67 +55,6 @@ this license is at: http://www.latex-project.org/lppl.txt
This work is “author-maintained” (as per LPPL maintenance status)
by Vafa Khalighi.
-In addition to the terms of LPPL any distributed version
-(unchanged or modified) of bidi has to keep the statement
-about the moral obligation for using bidi. In case of major
-changes where this would not be appropriate the author of the
-changed version should contact the copyright holder.
-
-
-
-Moral obligation for using bidi:
-____________________________________
-
-Users of bidi who wish to include or use bidi or a modified
-version in a proprietary and commercially market product are asked
-under certain conditions (see below) for the payment of a license
-fee. The size of this fee is to be determined, in each instance,
-by the commercial user, depending on his/her judgment of the value of
-bidi for his/her product.
-
-
-The conditions for this are as follows:
-
-The producer of a proprietary and commercially market product
-that involves typesetting using bidi is asked to determine
-the value of a license fee for using bidi if
-
- - the product is a document and the producer has decided to
- include bidi to typeset (parts of) the document or has
- directed the author of the document to include bidi (for
- example, by providing a class file to be used by the author)
-
- - the product is a LaTeX class or package that includes bidi
-
-
-There is no moral obligation in case
-
- - the product is a document but producer has not directed
- the author to include bidi (in that case the moral obligation
- lies with the author of the document)
-
- - the product does not involve typesetting, e.g., consists, for
- example, of distributing bidi and its documentation.
-
- - the product is not proprietary, i.e., is made available as free
- software itself (which doesn't prohibit its commercial marketing)
-
- - bidi is used for non-commercial purposes
-
-
-Determinating a license fee might result in a license fee of zero
-(i.e., no payment) in case a producer has determined that the use
-of bidi has no enhancing effect on the product. This is a
-plausible scenario, i.e., in the above two cases the producer is
-only asked to evaluate the value of bidi for the product
-not for the payment of a license fee per se (which might or might
-not follow from this evaluation).
-
- The license fee, if any, can be payed to the author of
- the program who can be contacted at
-
- vafakhlgh@gmail.com
-
\endpostamble
@@ -209,16 +87,21 @@ not follow from this evaluation).
\generate{\file{color-xetex-bidi.def}{\from{\jobname.dtx}{color-xetex-bidi.def}}}
\generate{\file{cvthemebidicasual.sty}{\from{\jobname.dtx}{cvthemebidicasual.sty}}}
\generate{\file{cvthemebidiclassic.sty}{\from{\jobname.dtx}{cvthemebidiclassic.sty}}}
+\generate{\file{dblfnote-xetex-bidi.def}{\from{\jobname.dtx}{dblfnote-xetex-bidi.def}}}
\generate{\file{draftwatermark-xetex-bidi.def}{\from{\jobname.dtx}{draftwatermark-xetex-bidi.def}}}
+\generate{\file{empheq-xetex-bidi.def}{\from{\jobname.dtx}{empheq-xetex-bidi.def}}}
\generate{\file{extarticle-xetex-bidi.def}{\from{\jobname.dtx}{extarticle-xetex-bidi.def}}}
\generate{\file{extbook-xetex-bidi.def}{\from{\jobname.dtx}{extbook-xetex-bidi.def}}}
\generate{\file{extletter-xetex-bidi.def}{\from{\jobname.dtx}{extletter-xetex-bidi.def}}}
+\generate{\file{extrafootnotefeatures.def}{\from{\jobname.dtx}{extrafootnotefeatures.def}}}
\generate{\file{extreport-xetex-bidi.def}{\from{\jobname.dtx}{extreport-xetex-bidi.def}}}
\generate{\file{fancyhdr-xetex-bidi.def}{\from{\jobname.dtx}{fancyhdr-xetex-bidi.def}}}
\generate{\file{fleqn-xetex-bidi.def}{\from{\jobname.dtx}{fleqn-xetex-bidi.def}}}
+\generate{\file{float-xetex-bidi.def}{\from{\jobname.dtx}{float-xetex-bidi.def}}}
\generate{\file{flowfram-xetex-bidi.def}{\from{\jobname.dtx}{flowfram-xetex-bidi.def}}}
\generate{\file{footnote-luatex-bidi.def}{\from{\jobname.dtx}{footnote-luatex-bidi.def}}}
\generate{\file{footnote-xetex-bidi.def}{\from{\jobname.dtx}{footnote-xetex-bidi.def}}}
+\generate{\file{framed-xetex-bidi.def}{\from{\jobname.dtx}{framed-xetex-bidi.def}}}
\generate{\file{graphicx-xetex-bidi.def}{\from{\jobname.dtx}{graphicx-xetex-bidi.def}}}
\generate{\file{hyperref-xetex-bidi.def}{\from{\jobname.dtx}{hyperref-xetex-bidi.def}}}
\generate{\file{leqno-xetex-bidi.def}{\from{\jobname.dtx}{leqno-xetex-bidi.def}}}
@@ -291,7 +174,7 @@ not follow from this evaluation).
%
%<*driver>
\documentclass{ltxdoc}
-\usepackage{graphicx,wrapfig}
+\usepackage{graphicx,wrapfig,fontspec}
\usepackage{calc}
\usepackage{pifont}
\usepackage{bbding}
@@ -300,6 +183,7 @@ not follow from this evaluation).
\definecolor{bidiblue}{rgb}{0.1,0.2,0.8}
\hypersetup{linkcolor=bidiblue,urlcolor=bidiblue,citecolor=bidiblue}
\setlength\columnseprule{.4pt}
+\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Junicode}
\newcommand\XeTeX{Xe\TeX}
\newcommand\XeLaTeX{Xe\LaTeX}
\makeatletter
@@ -337,10 +221,10 @@ not follow from this evaluation).
% \GetFileInfo{\jobname.sty}
% \CheckSum{0}
% \makeatletter
-% \changes{v1.1.5a}{2010/09/13}{Update the documentation.}
+% \changes{v1.1.6}{2011/03/21}{Update the documentation.}
% \title{The \textsf{bidi} package\\ \href{http://bitbucket.org/vafa/bidi}{\texttt{http://bitbucket.org/vafa/bidi}}}
% \author{\textsc{Vafa Khalighi}\\ \href{mailto:vafakhlgh@gmail.com}{\texttt{vafakhlgh@gmail.com}}}
-% \date{\today \qquad v1.1.5a}
+% \date{\today \qquad v1.1.6}
%
% \maketitle
%\section{Dedication}
@@ -370,8 +254,8 @@ not follow from this evaluation).
%Description: A convenient interface for typesetting bidirectional texts
%in plain TeX and LaTeX. The package includes adaptations for use
%with many other commonly-used packages.
-%Copyright (c) 2009-2010 Vafa Khalighi
-%v1.1.5a, <commit 98>, 2010/09/28
+%Copyright (c) 2009-2011 Vafa Khalighi
+%v1.1.6, <commit 145>, 2011/03/21
%License: LaTeX Project Public License, version 1.3c or higher (your choice)
%Home: http://bitbucket.org/vafa/bidi
%Location on CTAN: /macros/latex/contrib/bidi
@@ -433,9 +317,26 @@ not follow from this evaluation).
%\end{document}
%\end{lstlisting}
%\subsection{Options of The Package\label{options}}
-%There are two options, namely \texttt{RTLdocument} and \texttt{rldocument}, which are essentialy equivalent. If you pass any of these options to the package, you will be typesetting a document containing mainly RTL texts with some LTR texts. These options activate \Lcs{setRTL} (explained in \autoref{PSC}), \Lcs{RTLdblcol} (explained in \autoref{twocolumn}) and \Lcs{autofootnoterule} (explained in \autoref{footnoterule}).
+%There are three options, namely \texttt{RTLdocument} and \texttt{rldocument}, which are essentialy equivalent. If you pass any of these options to the package, you will be typesetting a document containing mainly RTL texts with some LTR texts. These options activate \Lcs{setRTL} (explained in \autoref{PSC}), \Lcs{RTLdblcol} (explained in \autoref{twocolumn}) and \Lcs{autofootnoterule} (explained in \autoref{footnoterule}).
%
%It is clear that if you do not pass any of these options to the package, you will be typesetting a document containing mainly LTR texts with some RTL texts.
+%
+%\marginpar{\bfseries\textcolor{red}{New Option}$\longrightarrow$}There is also \texttt{extrafootnotefeatures} option that allows footnotes to be typeset in different formats:
+%\begin{BDef}
+%\Lcs{normalfootnotes}\\
+%\Lcs{twocolumnfootnotes}\quad\Lcs{threecolumnfootnotes}\quad\Lcs{fourcolumnfootnotes}\\
+%\Lcs{fivecolumnfootnotes}\quad\Lcs{sixcolumnfootnotes}\quad\Lcs{sevencolumnfootnotes}\\
+%\Lcs{eightcolumnfootnotes}\quad\Lcs{ninecolumnfootnotes}\quad\Lcs{tencolumnfootnotes}\\
+%\Lcs{RTLcolumnfootnotes}\quad\Lcs{LTRcolumnfootnotes}\\
+%\Lcs{paragraphfootnotes}
+%\end{BDef}
+%\begin{itemize}
+%\item \Lcs{normalfootnotes} typesets footnotes in Standard \LaTeX{} format.
+%\item \Lcs{twocolumnfootnotes} to \Lcs{tencolumnfootnotes}, typeset footnotes in two-columns to ten-columns, respectively.
+%\item \Lcs{RTLcolumnfootnotes} typesets footnotes columns RTL (first column on the RHS and each next column to the left of the previous column) and \Lcs{LTRcolumnfootnotes} typesets footnotes columns LTR (first column on the LHS and each next column to the right of the previous column). \Lcs{LTRcolumnfootnotes} is active by default.
+%\item \Lcs{paragraphfootnotes} typesets footnotes in paragraph format.
+%\item When using \texttt{extrafootnotefeatures}, \Lcs{textwidthfootnoterule} is active.
+%\end{itemize}
%\subsection{Paragraph Switching Commands\label{PSC}}
%\begin{BDef}
%\Lcs{setLTR}\quad\Lcs{setLR}\quad\Lcs{unsetRL}\quad\Lcs{unsetRTL}\\
@@ -735,7 +636,7 @@ not follow from this evaluation).
%\subsection{Equation Numbers}
%For \texttt{reqno}, equation numbers are on the right hand side and for \texttt{leqno}, equation numbers are on the left hand side, independent on the current mode.
%\section{Support For Various Packages and Classes}
-%The \textsf{bidi} package supports \textsf{amsmath}, \textsf{amsthm}, \textsf{array}, \textsf{arydshln}, \textsf{breqn}, \textsf{caption}, \textsf{color}, \textsf{colortbl}, \textsf{draftwatermark}, \textsf{fancyhdr}, \textsf{flowfram}, \textsf{graphicx}, \textsf{hyperref}, \textsf{listings}, \textsf{minitoc}, \textsf{multicol}, \textsf{pdfpages}, \textsf{pstricks}, \textsf{quotchap}, \textsf{ragged2e}, \textsf{stabular}, \textsf{subfig}, \textsf{subfigure}, \textsf{supertabular}, \textsf{xtab}, \textsf{tabls}, \textsf{tabulary}, \textsf{PGF \&\ TIKZ}, \textsf{tocbibind}, \textsf{tocloft}, \textsf{tocstyle}, \textsf{wrapfig}, \textsf{xcolor}, \textsf{xltxtra} packages, \textsf{amsart}, \textsf{amsbook}, \textsf{artikel1}, \textsf{artikel2}, \textsf{artikel3}, \textsf{extarticle}, \textsf{standrad article}, \textsf{boek}, \textsf{boek3}, \textsf{standard book}, \textsf{bookest}, \textsf{extbook}, \textsf{extletter}, \textsf{scrlettr},\textsf{standard letter}, \textsf{memoir}, \textsf{extreport}, \textsf{rapport1}, \textsf{rapport3}, \textsf{refrep}, \textsf{standard report}, \textsf{scartcl}, \textsf{scrbook}, \textsf{scrreprt} classes and any other packages and classes that relies on these packages and classes. This means, you can use all these packages and classes in addition to other packages and classes that rely on these packages and classes and use their functionality fully for your bidirectional documents.
+%The \textsf{bidi} package supports \textsf{amsmath}, \textsf{amsthm}, \textsf{array}, \textsf{arydshln}, \textsf{breqn}, \textsf{caption}, \textsf{color}, \textsf{colortbl}, \textsf{dblfnote} \textsf{draftwatermark}, \textsf{empheq}, \textsf{fancyhdr}, \textsf{float}, \textsf{flowfram}, \textsf{framed}, \textsf{graphicx}, \textsf{hyperref}, \textsf{listings}, \textsf{minitoc}, \textsf{multicol}, \textsf{pdfpages}, \textsf{pstricks}, \textsf{quotchap}, \textsf{ragged2e}, \textsf{stabular}, \textsf{subfig}, \textsf{subfigure}, \textsf{supertabular}, \textsf{xtab}, \textsf{tabls}, \textsf{tabulary}, \textsf{PGF \&\ TIKZ}, \textsf{tocbibind}, \textsf{tocloft}, \textsf{tocstyle}, \textsf{wrapfig}, \textsf{xcolor}, \textsf{xltxtra} packages, \textsf{amsart}, \textsf{amsbook}, \textsf{artikel1}, \textsf{artikel2}, \textsf{artikel3}, \textsf{extarticle}, \textsf{standrad article}, \textsf{boek}, \textsf{boek3}, \textsf{standard book}, \textsf{bookest}, \textsf{extbook}, \textsf{extletter}, \textsf{scrlettr},\textsf{standard letter}, \textsf{memoir}, \textsf{extreport}, \textsf{rapport1}, \textsf{rapport3}, \textsf{refrep}, \textsf{standard report}, \textsf{scartcl}, \textsf{scrbook}, \textsf{scrreprt} classes and any other packages and classes that relies on these packages and classes. This means, you can use all these packages and classes in addition to other packages and classes that rely on these packages and classes and use their functionality fully for your bidirectional documents.
%
%We now give some details that you should know about the supported packages or classes.
%\subsection{Color}
@@ -1149,7 +1050,6 @@ not follow from this evaluation).
% \subsection{\textsf{amsmath-xetex-bidi.def}}
% \begin{macrocode}
\ProvidesFile{amsmath-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for amsmath package for XeTeX engine]
-\everydisplay\@xp{\the\everydisplay \@displaytrue}
\renewcommand{\numberwithin}[3][\arabic]{%
\@ifundefined{c@#2}{\@nocounterr{#2}}{%
\@ifundefined{c@#3}{\@nocnterr{#3}}{%
@@ -2316,9 +2216,9 @@ not follow from this evaluation).
% \subsection{\textsf{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2010/09/28}
-\def\bidiversion{v1.1.5a}
-\def\bidicommit{commit 98}
+\def\bididate{2011/03/21}
+\def\bidiversion{v1.1.6}
+\def\bidicommit{commit 145}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space <\bidicommit>
Bidirectional typesetting in plain TeX and LaTeX]
\edef\bidiinfo{%
@@ -2326,7 +2226,7 @@ bidi package (Support for bidirectional typesetting in plain TeX and LaTeX)^^J
Description: A convenient interface for typesetting bidirectional^^J
texts in plain TeX and LaTeX. The package includes adaptations for use^^J
with many other commonly-used packages.^^J
-Copyright © 2009-2010 Vafa Khalighi^^J
+Copyright © 2009–2011 Vafa Khalighi^^J
\bidiversion, <\bidicommit>, \bididate^^J
License: LaTeX Project Public License, version 1.3c or higher (your choice)^^J
Home: http://bitbucket.org/vafa/bidi^^J
@@ -2385,7 +2285,7 @@ Location on CTAN: /macros/latex/contrib/bidi}
\ifLuaTeX
\input{luatex-bidi.def}
\else
- \PackageError{bidi}{TeX engines other than XeTeX and LuaTeX are not yet supported}
+ \PackageError{bidi}{TeX engines other than XeTeX and LuaTeX are not yet supported}{}
\fi
\fi
%\@developmentversiontrue
@@ -2400,16 +2300,16 @@ Location on CTAN: /macros/latex/contrib/bidi}
%\fi
% \subsection{\textsf{bidi.tex}}
% \begin{macrocode}
-\def\bididate{2010/09/28}
+\def\bididate{2011/03/21}
\def\bidiversion{v0.1}
-\def\bidicommit{commit 98}
+\def\bidicommit{commit 145}
\catcode`@=11
\edef\bidiinfo{%
bidi package (Support for bidirectional typesetting in plain TeX and LaTeX)^^J
Description: A convenient interface for typesetting bidirectional^^J
texts in plain TeX and LaTeX. The package includes adaptations for use^^J
with many other commonly-used packages.^^J
-Copyright © 2009-2010 Vafa Khalighi^^J
+Copyright © 2009–2011 Vafa Khalighi^^J
\bidiversion, <\bidicommit>, \bididate^^J
License: LaTeX Project Public License, version 1.3c or higher (your choice)^^J
Home: http://bitbucket.org/vafa/bidi^^J
@@ -4054,12 +3954,13 @@ Location on CTAN: /macros/latex/contrib/bidi}
% \begin{macrocode}
\ProvidesFile{color-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for color package for XeTeX engine]
\long\def\color@b@x#1#2#3{%
- \leavevmode\if@RTL\beginL\fi
+ \leavevmode\ifmmode\else\if@RTL\beginL\fi\fi
\setbox\z@\hbox{\kern\fboxsep{\set@color\if@RTL\beginR\fi#3\if@RTL\endR\fi}\kern\fboxsep}%
\dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@
\dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@
{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}%
- \box\z@}}\if@RTL\endL\fi}
+ \box\z@}}\ifmmode\else\if@RTL\endL\fi\fi}
+\def\normalcolor{\let\current@color\default@color\ifhmode\if@RTL\beginL\aftergroup\endR\fi\fi\set@color\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi}
\DeclareRobustCommand\color{%
\ifhmode\if@RTL\beginL\aftergroup\endR\fi\fi\@ifnextchar[\@undeclaredcolor\@declaredcolor}
\def\@declaredcolor#1{%
@@ -4093,6 +3994,7 @@ Location on CTAN: /macros/latex/contrib/bidi}
\def\color@box#1#2{\color@b@x\relax{\bidicolor#1{#2}}}
\def\color@fbox#1#2#3{%
\color@b@x{\fboxsep\z@\bidicolor#1{#2}\fbox}{\bidicolor#1{#3}}}
+\def\color@setgroup{\begingroup\ifhmode\if@RTL\beginL\aftergroup\endR\fi\fi\set@color\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi}
% \end{macrocode}
% \iffalse
%</color-xetex-bidi.def>
@@ -4313,6 +4215,196 @@ Location on CTAN: /macros/latex/contrib/bidi}
% \end{macrocode}
% \iffalse
%</cvthemebidiclassic.sty>
+%<*dblfnote-xetex-bidi.def>
+%\fi
+% \subsection{\textsf{dblfnote-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{dblfnote-xetex-bidi.def}[2011/03/01 v0.1 bidi adaptations for dblfnote package for XeTeX engine]
+\def\right@footnote{%
+ \hbox to \DFNcolumnwidth
+ {\beginR \vbox{\kern -3\p@
+ \hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}
+\def\@iiiminipage#1#2[#3]#4{%
+ \leavevmode
+ \@pboxswfalse
+ \setlength\@tempdima{#4}%
+ \def\@mpargs{{#1}{#2}[#3]{#4}}%
+ \setbox\@tempboxa\vbox\bgroup\hbox\bgroup\if@RTL\beginL\fi\if #1t\vtop\else\vbox\fi\bgroup
+ \color@begingroup
+ \hsize\@tempdima
+ \textwidth\hsize \columnwidth\hsize
+ \@parboxrestore
+ \def\right@footnote{%
+ \hbox to \columnwidth
+ {\beginR \vbox{\kern -3\p@
+ \hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}
+ \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
+ \let\@footnotetext\@mpfootnotetext
+ \let\@LTRfootnotetext\@mpLTRfootnotetext
+ \let\@RTLfootnotetext\@mpRTLfootnotetext
+ \let\@listdepth\@mplistdepth \@mplistdepth\z@
+ \@minipagerestore
+ \@setminipage}
+\AtBeginDocument{\let\dfn@latex@footnotetext\@footnotetext
+\let\@footnotetext\dfn@footnotetext}
+\long\def\dfn@LTRfootnotetext#1{{\setbox\dfn@boxa\vbox{
+ \let\insert\dfn@gobble
+ \columnwidth\DFNcolumnwidth \hbadness\c@DFNsloppiness
+ \def\@makefnmark{\smash{\dfn@makefnmark}}
+ \dfn@latex@LTRfootnotetext{#1}\par \boxmaxdepth\dfn@fnmaxdp}%
+ \dfn@dima\ht\dfn@boxa \advance\dfn@dima\dp\dfn@boxa
+ \ifdim\dfn@dima>\z@\else
+ \dfn@dima1sp\relax
+ \setbox\dfn@boxa\vbox{\vbox to1sp{\unvbox\dfn@boxa\vfil}}\fi
+ \global\setbox\dfn@ins\vbox{\boxmaxdepth\dfn@fnmaxdp
+ \ifvoid\dfn@ins\else
+ \unvbox\dfn@ins \allowbreak \nointerlineskip \fi
+ \ifdfn@allowcbreak \unvbox \else \box \fi \dfn@boxa}%
+ \setbox\dfn@boxa\copy\dfn@ins
+ \dfn@split{.5\ht\dfn@boxa}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep
+ \advance\@tempdima\@tempdimb \@tempdimb\@tempdima
+ \advance\@tempdima-\dfn@fnht \global\dfn@fnht\@tempdimb
+ \insert\footins{\floatingpenalty\@MM \vbox to\@tempdima{}}%
+ \xdef\dfn@list{\dfn@list\@elt{\number\dfn@dima}{\number\@tempdima}}}}
+\AtBeginDocument{\let\dfn@latex@LTRfootnotetext\@LTRfootnotetext
+\let\@LTRfootnotetext\dfn@LTRfootnotetext}
+\long\def\dfn@RTLfootnotetext#1{{\setbox\dfn@boxa\vbox{
+ \let\insert\dfn@gobble
+ \columnwidth\DFNcolumnwidth \hbadness\c@DFNsloppiness
+ \def\@makefnmark{\smash{\dfn@makefnmark}}
+ \dfn@latex@RTLfootnotetext{#1}\par \boxmaxdepth\dfn@fnmaxdp}%
+ \dfn@dima\ht\dfn@boxa \advance\dfn@dima\dp\dfn@boxa
+ \ifdim\dfn@dima>\z@\else
+ \dfn@dima1sp\relax
+ \setbox\dfn@boxa\vbox{\vbox to1sp{\unvbox\dfn@boxa\vfil}}\fi
+ \global\setbox\dfn@ins\vbox{\boxmaxdepth\dfn@fnmaxdp
+ \ifvoid\dfn@ins\else
+ \unvbox\dfn@ins \allowbreak \nointerlineskip \fi
+ \ifdfn@allowcbreak \unvbox \else \box \fi \dfn@boxa}%
+ \setbox\dfn@boxa\copy\dfn@ins
+ \dfn@split{.5\ht\dfn@boxa}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep
+ \advance\@tempdima\@tempdimb \@tempdimb\@tempdima
+ \advance\@tempdima-\dfn@fnht \global\dfn@fnht\@tempdimb
+ \insert\footins{\floatingpenalty\@MM \vbox to\@tempdima{}}%
+ \xdef\dfn@list{\dfn@list\@elt{\number\dfn@dima}{\number\@tempdima}}}}
+\AtBeginDocument{\let\dfn@latex@RTLfootnotetext\@RTLfootnotetext
+\let\@RTLfootnotetext\dfn@RTLfootnotetext}
+\def\dfn@RTLmakecol{{\ifvoid\footins\else
+ \dfn@dima\ht\footins
+ \@tempcnta\z@ \dfn@countins
+ \@tempdima\z@ \let\@elt\dfn@elt@getht
+ \dfn@list\@nil
+ \ifdim\@tempdima=\z@\else
+ \dfn@split\@tempdima\dfn@ins\dfn@boxa\z@\z@
+ \global\setbox\dfn@ins\box\dfn@ins
+ \@tempswatrue
+ \ifdfn@trysingle
+ \setbox\dfn@boxb\vbox{\unvcopy\@cclv}\@tempdima\@colroom
+ \advance\@tempdima-\ht\dfn@boxb \advance\@tempdima-\dp\dfn@boxb
+ \advance\@tempdima-\skip\footins
+ \advance\@tempdima-\ht\dfn@boxa
+ \ifdim\@tempdima<\z@\else \@tempswafalse
+ \global\setbox\footins\vbox{\boxmaxdepth\dfn@fnmaxdp
+ \footnoterule \unvbox\dfn@boxa}\fi\fi
+ \if@tempswa
+ \dfn@split{\dfn@dima}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep
+ \global\setbox\footins\vbox{\hbox{%
+ \hskip \DFNcolumnwidth
+ \hskip\DFNcolumnsep
+ \hbox to\DFNcolumnwidth{\vbox to\@tempdima{\footnoterule
+ \unvbox\dfn@boxb\vss}\hss}
+ \hskip -\textwidth
+ \hbox to\DFNcolumnwidth{\ifvoid\dfn@boxa\else
+ \vbox to\@tempdima{
+ \setbox\@tempboxa\vbox{\footnoterule}
+ \ifdfn@ruleboth \unvbox\@tempboxa
+ \else \@tempdima\ht\@tempboxa
+ \advance\@tempdima\dp\@tempboxa
+ \vskip\@tempdima
+ \prevdepth\dp\@tempboxa \fi
+ \unvbox\dfn@boxa\vss}\fi\hss}
+ \hskip \DFNcolumnsep
+ \hskip \DFNcolumnwidth}}\fi\fi
+ \global\dfn@fnht\z@
+ \ifx\dfn@list\@empty\else
+ \let\@elt\dfn@elt@adjust \dfn@dima\z@ \dfn@dimb\z@
+ \dfn@list \global\advance\dfn@fnht\dfn@dimb
+ \let\@elt\relax
+ \ifdim\dfn@dimb>\z@
+ \xdef\dfn@list{\@elt{0}{\number\dfn@dimb}\dfn@list}%
+ \insert\footins{\floatingpenalty\@MM
+ \vbox to\dfn@dimb{}}\fi
+ \ifdim\dfn@fnht>\@tempdima
+ \@tempdimb\@tempdima \advance\@tempdimb-\dfn@fnht
+ \global\dfn@fnht\@tempdima
+ \xdef\dfn@list{\dfn@list\@elt{0}{\number\@tempdimb}}%
+ \xdef\dfn@afteroutput{\insert\footins{
+ \floatingpenalty\@MM
+ \vbox to\number\@tempdimb sp{}}%
+ \global\let\noexpand\dfn@afteroutput\relax}%
+ \fi\fi
+ \fi}%
+ \let\footnoterule\relax \dfn@latex@makecol
+ \let\footnoterule\dfn@footnoterule}
+\def\dfn@LTRmakecol{{\ifvoid\footins\else
+ \dfn@dima\ht\footins
+ \@tempcnta\z@ \dfn@countins
+ \@tempdima\z@ \let\@elt\dfn@elt@getht
+ \dfn@list\@nil
+ \ifdim\@tempdima=\z@\else
+ \dfn@split\@tempdima\dfn@ins\dfn@boxa\z@\z@
+ \global\setbox\dfn@ins\box\dfn@ins
+ \@tempswatrue
+ \ifdfn@trysingle
+ \setbox\dfn@boxb\vbox{\unvcopy\@cclv}\@tempdima\@colroom
+ \advance\@tempdima-\ht\dfn@boxb \advance\@tempdima-\dp\dfn@boxb
+ \advance\@tempdima-\skip\footins
+ \advance\@tempdima-\ht\dfn@boxa
+ \ifdim\@tempdima<\z@\else \@tempswafalse
+ \global\setbox\footins\vbox{\boxmaxdepth\dfn@fnmaxdp
+ \footnoterule \unvbox\dfn@boxa}\fi\fi
+ \if@tempswa
+ \dfn@split{\dfn@dima}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep
+ \global\setbox\footins\vbox{\hbox{%
+ \hbox to\DFNcolumnwidth{\vbox to\@tempdima{\footnoterule
+ \unvbox\dfn@boxb\vss}\hss}\hskip\DFNcolumnsep
+ \hbox to\DFNcolumnwidth{\ifvoid\dfn@boxa\else
+ \vbox to\@tempdima{
+ \setbox\@tempboxa\vbox{\footnoterule}
+ \ifdfn@ruleboth \unvbox\@tempboxa
+ \else \@tempdima\ht\@tempboxa
+ \advance\@tempdima\dp\@tempboxa
+ \vskip\@tempdima
+ \prevdepth\dp\@tempboxa \fi
+ \unvbox\dfn@boxa\vss}\fi\hss}}}\fi\fi
+ \global\dfn@fnht\z@
+ \ifx\dfn@list\@empty\else
+ \let\@elt\dfn@elt@adjust \dfn@dima\z@ \dfn@dimb\z@
+ \dfn@list \global\advance\dfn@fnht\dfn@dimb
+ \let\@elt\relax
+ \ifdim\dfn@dimb>\z@
+ \xdef\dfn@list{\@elt{0}{\number\dfn@dimb}\dfn@list}%
+ \insert\footins{\floatingpenalty\@MM
+ \vbox to\dfn@dimb{}}\fi
+ \ifdim\dfn@fnht>\@tempdima
+ \@tempdimb\@tempdima \advance\@tempdimb-\dfn@fnht
+ \global\dfn@fnht\@tempdima
+ \xdef\dfn@list{\dfn@list\@elt{0}{\number\@tempdimb}}%
+ \xdef\dfn@afteroutput{\insert\footins{
+ \floatingpenalty\@MM
+ \vbox to\number\@tempdimb sp{}}%
+ \global\let\noexpand\dfn@afteroutput\relax}%
+ \fi\fi
+ \fi}%
+ \let\footnoterule\relax \dfn@latex@makecol
+ \let\footnoterule\dfn@footnoterule}
+\renewcommand{\dfn@makecol}{\if@RTLmain\dfn@RTLmakecol\else\dfn@LTRmakecol\fi}
+\newcommand{\RTLdfnmakecol}{\renewcommand{\dfn@makecol}{\dfn@RTLmakecol}}
+\newcommand{\LTRdfnmakecol}{\renewcommand{\dfn@makecol}{\dfn@LTRmakecol}}
+\DFNalwaysdouble
+% \end{macrocode}
+% \iffalse
+%</dblfnote-xetex-bidi.def>
%<*draftwatermark-xetex-bidi.def>
%\fi
% \subsection{\textsf{draftwatermark-xetex-bidi.def}}
@@ -4323,6 +4415,52 @@ Location on CTAN: /macros/latex/contrib/bidi}
% \end{macrocode}
% \iffalse
%</draftwatermark-xetex-bidi.def>
+%<*empheq-xetex-bidi.def>
+%\fi
+% \subsection{\textsf{empheq-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{empheq-xetex-bidi.def}[2011/03/01 v0.1 bidi adaptations for empheq package for XeTeX engine]
+\MHInternalSyntaxOn
+\AtBeginDocument{%
+ \@ifpackageloaded{fancybox}{%
+ \@ifpackageloaded{color}{\definecolor{shadowcolor}{rgb}{0,0,0}}%
+ {\renewcommand*\textcolor[2]{\normalcolor{#2}}}%
+ \renewcommand*\shadowbox{%
+ \@ifstar{\MH_set_boolean_T:n {shadowbox_star}
+ \VerbBox\EQ_shadowbox:n}
+ {\MH_set_boolean_F:n {shadowbox_star}
+ \VerbBox\EQ_shadowbox:n}}
+ \def\EQ_shadowbox:n #1{%
+ \sbox{\z@}{\fbox{#1}}%
+ \MH_if_boolean:nTF {shadowbox_star}{
+ \MH_setlength:dn \@tempdima{\z@}%
+ }{
+ \MH_setlength:dn \@tempdima{\dp\z@+\shadowsize}%
+ }
+ \raisebox{\@tempdima}{%
+ \if@RTL\makebox[\z@][r]{%
+ \kern\shadowsize \textcolor{shadowcolor}{%
+ \rule[-\dp\z@-\shadowsize]{\wd\z@}{\shadowsize}}%
+ }\else%
+ \makebox[\z@][l]{%
+ \kern\shadowsize \textcolor{shadowcolor}{%
+ \rule[-\dp\z@-\shadowsize]{\wd\z@}{\shadowsize}}%
+ }\fi%
+ \usebox\z@\textcolor{shadowcolor}{%
+ \rule[-\dp\z@-\shadowsize]{\shadowsize}{\ht\z@+\dp\z@}}}}%
+ }{}%
+}
+\renewenvironment{EmphEqMainEnv}{\@RTLfalse\collect@body\EQ_getbody:n}{%
+ \if_num:w \l_EQ_equationtype_int=\z@ %ZeroCheckpoint
+ \EQ_upgrade_error:
+ \else:
+ \EQ_post_process:
+ \ignorespacesafterend
+ \fi:}
+\MHInternalSyntaxOff
+% \end{macrocode}
+% \iffalse
+%</empheq-xetex-bidi.def>
%<*extarticle-xetex-bidi.def>
%\fi
% \subsection{\textsf{extarticle-xetex-bidi.def}}
@@ -4726,6 +4864,1594 @@ Location on CTAN: /macros/latex/contrib/bidi}
% \end{macrocode}
% \iffalse
%</extletter-xetex-bidi.def>
+%<*extrafootnotefeatures.def>
+%\fi
+% \subsection{\textsf{extrafootnotefeatures.def}}
+% \begin{macrocode}
+\ProvidesFile{extrafootnotefeatures}[2011/03/01 v0.1 bidi extra footnote features for XeTeX engine]
+\let\m@mold@footnotetext\@footnotetext
+\let\m@mold@LTRfootnotetext\@LTRfootnotetext
+\let\m@mold@RTLfootnotetext\@RTLfootnotetext
+\let\m@mold@mpfootnotetext\@mpfootnotetext
+\let\m@mold@mpLTRfootnotetext\@mpLTRfootnotetext
+\let\m@mold@mpRTLfootnotetext\@mpRTLfootnotetext
+\newcommand{\normalfootnotes}{%
+ \let\@footnotetext\m@mold@footnotetext
+ \let\@LTRfootnotetext\m@mold@LTRfootnotetext
+ \let\@RTLfootnotetext\m@mold@RTLfootnotetext
+ \let\@mpfootnotetext\m@mold@mpfootnotetext
+ \let\@mpLTRfootnotetext\m@mold@mpLTRfootnotetext
+ \let\@mpRTLfootnotetext\m@mold@mpRTLfootnotetext}
+\newif\if@RTLcolumnfootnotes
+\newcommand*{\RTLcolumnfootnotes}{\@RTLcolumnfootnotestrue}
+\newcommand*{\LTRcolumnfootnotes}{\@RTLcolumnfootnotesfalse}
+\g@addto@macro\document{\textwidthfootnoterule}
+\newcommand*{\setSingleSpace}[1]{%
+ \def\m@m@singlespace{#1}%
+ \def\m@m@footnote@spacing{#1}%
+ \def\m@m@float@spacing{#1} %
+}
+\setSingleSpace{1}
+\newinsert\sideins
+\newcommand*{\multiplefootnotemarker}{3sp}
+\newcommand*{\m@mmf@prepare}{%
+ \kern-\multiplefootnotemarker
+ \kern\multiplefootnotemarker\relax}
+\newlength{\footmarkwidth}
+\newlength{\footmarksep}
+\newlength{\footparindent}
+\newcommand*{\footmarkstyle}[1]{\def\footscript##1{#1}}
+\newcommand{\footfootmark}{%
+ \ifdim\footmarkwidth < \z@
+ \llap{\hb@xt@ -\footmarkwidth{%
+ \hss\normalfont\footscript{\@thefnmark}}%
+ \hspace*{-\footmarkwidth}}%
+ \else
+ \ifdim\footmarkwidth = \z@
+ {\normalfont\footscript{\@thefnmark}}%
+ \else
+ \hb@xt@\footmarkwidth{\hss\normalfont\footscript{\@thefnmark}}%
+ \fi
+ \fi}
+\footmarkstyle{\textsuperscript{#1}}
+\setlength{\footmarkwidth}{1.8em}
+\setlength{\footparindent}{1em}
+\newcommand{\m@mdoextrafeet}{\extrafeetins}
+\newcommand*{\extrafeetins}{%
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth \@maxdepth
+ \unvbox\@outputbox
+ \ifvoid\footinsv@r\else\@footstartv@r\@footgroupv@r\fi
+ \extrafeetinshook}}
+\newcommand{\extrafeetinshook}{}
+\newcommand{\foottextfont}{\footnotesize}
+\newlength{\footinsdim}
+ \setlength{\footinsdim}{8in} % standard for \dimen\footins
+\newcommand{\@preamfntext}{%
+ \interlinepenalty\interfootnotelinepenalty
+ \floatingpenalty \@MM
+ \splittopskip=\footnotesep
+ \splitmaxdepth=\dp\strutbox
+ \@parboxrestore}
+\newcommand{\m@mdoextrafeetmini}{%
+ \extrafeetminihook}
+\newcommand{\extrafeetendmini}{%
+ \ifvoid\@mpfootinsv@r\else
+ \vskip\skip\@mpfootins
+ \normalcolor\footnoterule\mp@footgroupv@r
+ \fi
+ \extrafeetendminihook}
+\newcommand{\extrafeetendminihook}{}
+\newcommand{\m@mdoextrafeetendmini}{\extrafeetendmini}
+\def\endminipage{%
+ \par
+ \unskip
+ \ifvoid\@mpfootins\else
+ \vskip\skip\@mpfootins
+ \normalcolor
+ \footnoterule
+ \unvbox\@mpfootins
+ \fi
+ \m@mdoextrafeetendmini
+ \@minipagefalse
+ \color@endgroup
+ \egroup
+ \if@RTL\endL\fi
+ \egroup
+ \egroup
+ \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa\leavevmode}}
+\newcommand{\m@make@footstart}[1]{%
+ \@namedef{@footstart#1}{%
+ \vskip\bigskipamount
+ \leftskip=\z@
+ \rightskip=\z@
+ \footnoterule}}
+\newinsert\footinsv@r
+ \skip\footinsv@r\bigskipamount
+ \count\footinsv@r=1000 % no magnifcation
+ \dimen\footinsv@r=\footinsdim
+\m@make@footstart{v@r}
+\newcommand{\@footgroupv@r}{}
+\newinsert\@mpfootinsv@r
+\newcommand{\mp@footgroupv@r}{}
+\newcount\m@m@k \newdimen\m@m@h
+\newcommand*{\m@mrigidbalance}[3]{\setbox0=\box#1 \m@m@k=#2 \m@m@h=#3
+ \@@line{\if@RTLcolumnfootnotes\beginR\fi\splittopskip=\m@m@h \vbadness=\@M \hfilneg
+ \valign{##\vfill\cr\m@mdosplits}\if@RTLcolumnfootnotes\endR\fi}}
+\newcommand*{\m@mdosplits}{\ifnum\m@m@k>0 \noalign{\hfil}\m@msplitoff
+ \global\advance\m@m@k-1\cr\m@mdosplits\fi}
+\newcommand*{\m@msplitoff}{\dimen0=\ht0
+ \divide\dimen0 by\m@m@k \advance\dimen0 by\m@m@h
+ \setbox2 \vsplit0 to \dimen0
+ \unvbox2 }
+\newcommand{\twocolumnfootnotes}{%
+ \@namedef{foottextfontv@r}{\foottextfont}% % [RS]
+ \let\@footnotetext\@twocolfootnotetext
+ \let\@LTRfootnotetext\@twocolLTRfootnotetext
+ \let\@RTLfootnotetext\@twocolRTLfootnotetext
+ \dimen\footinsv@r=2\footinsdim
+ \count\footinsv@r=500\relax
+ \m@make@twocol@footgroup{v@r}%
+ \let\@footgroupv@r\@twocol@footgroupv@r
+ \let\@mpfootnotetext\@mptwocolfootnotetext
+ \let\@mpLTRfootnotetext\@mptwocolLTRfootnotetext
+ \let\@mpRTLfootnotetext\@mptwocolRTLfootnotetext
+ \m@make@mptwocol@footgroup{v@r}%
+ \let\mp@footgroupv@r\@mptwocol@footgroupv@r}
+\newcommand{\@twocolfootnotetext}[1]{\insert\footinsv@r{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@twocolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@twocolLTRfootnotetext}[1]{\insert\footinsv@r{\if@RTLcolumnfootnotes\beginL\fi\@RTLfalse%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@twocolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@twocolRTLfootnotetext}[1]{\insert\footinsv@r{\@RTLtrue%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@twocolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@preamtwofmt}{%
+ \hsize .45\hsize
+ \parindent=\z@
+ \tolerance=5000\relax
+% \raggedright
+ \leavevmode}
+\newcommand{\@twocolfootfmt}[1]{%
+ \@preamtwofmt
+ {\footfootmark\strut {\foottextfont #1}\strut\par}\allowbreak}
+\newcommand{\@mptwocolfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@twocolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mptwocolLTRfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLfalse%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \if@RTLcolumnfootnotes\beginL\fi
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@twocolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mptwocolRTLfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLtrue%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@twocolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\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}%
+ \@namelongdef{@footnotetext#1}##1{%
+ \@nameuse{@twocolfootnotetext#1}{##1}}%
+ \@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}
+\newcommand{\m@make@twocolfootnotetext}[1]{%
+ \@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}}
+\newcommand{\m@make@mptwocolfootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@twocolfootfmt}[1]{%
+ \@namedef{@twocolfootfmt#1}##1{%
+ \@preamtwofmt
+ {\@nameuse{footfootmark#1}\strut
+ {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}}
+\newcommand{\m@make@twocol@footgroup}[1]{%
+ \@namedef{@twocol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{footins#1}}{\tw@}{\splittopskip}}}}
+\newcommand{\m@make@mptwocol@footgroup}[1]{%
+\@namedef{@mptwocol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{@mpfootins#1}}{\tw@}{\splittopskip}}}}
+\newcommand{\threecolumnfootnotes}{%
+ \@namedef{foottextfontv@r}{\foottextfont}% % [RS]
+ \let\@footnotetext\@threecolfootnotetext
+ \let\@LTRfootnotetext\@threecolLTRfootnotetext
+ \let\@RTLfootnotetext\@threecolRTLfootnotetext
+ \dimen\footinsv@r=3\footinsdim
+ \count\footinsv@r=333\relax
+ \m@make@threecol@footgroup{v@r}%
+ \let\@footgroupv@r\@threecol@footgroupv@r
+ \let\@mpfootnotetext\@mpthreecolfootnotetext
+ \let\@mpLTRfootnotetext\@mpthreecolLTRfootnotetext
+ \let\@mpRTLfootnotetext\@mpthreecolRTLfootnotetext
+ \m@make@mpthreecol@footgroup{v@r}%
+ \let\mp@footgroupv@r\@mpthreecol@footgroupv@r}
+\newcommand{\@threecolfootnotetext}[1]{\insert\footinsv@r{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@threecolfootfmt{#1}%
+ \color@endgroup}\m@mmf@prepare}
+\newcommand{\@threecolLTRfootnotetext}[1]{\insert\footinsv@r{\if@RTLcolumnfootnotes\beginL\fi\@RTLfalse%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@threecolfootfmt{#1}%
+ \color@endgroup}\m@mmf@prepare}
+\newcommand{\@threecolRTLfootnotetext}[1]{\insert\footinsv@r{\@RTLtrue%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@threecolfootfmt{#1}%
+ \color@endgroup}\m@mmf@prepare}
+\newcommand{\@preamthreefmt}{%
+ \hsize .3\hsize
+ \parindent=\z@
+ \tolerance=5000\relax
+% \raggedright
+ \leavevmode}
+\newcommand{\@threecolfootfmt}[1]{%
+ \@preamthreefmt
+ {\footfootmark\strut {\foottextfont #1}\strut\par}\allowbreak}
+\newcommand{\@mpthreecolfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@threecolfootfmt{#1}%
+ \color@endgroup}\m@mmf@prepare}
+\newcommand{\@mpthreecolLTRfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLfalse%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \if@RTLcolumnfootnotes\beginL\fi
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@threecolfootfmt{#1}%
+ \color@endgroup}\m@mmf@prepare}
+\newcommand{\@mpthreecolRTLfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLtrue%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@threecolfootfmt{#1}%
+ \color@endgroup}\m@mmf@prepare}
+\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}%
+ \@namelongdef{@footnotetext#1}##1{%
+ \@nameuse{@threecolfootnotetext#1}{##1}}%
+ \@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}
+\newcommand{\m@make@threecolfootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@mpthreecolfootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@threecolfootfmt}[1]{%
+\@namelongdef{@threecolfootfmt#1}##1{%
+ \@preamthreefmt
+ {\@nameuse{footfootmark#1}\strut
+ {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}}
+\newcommand{\m@make@threecol@footgroup}[1]{%
+\@namedef{@threecol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{footins#1}}{\thr@@}{\splittopskip}}}}
+\newcommand{\m@make@mpthreecol@footgroup}[1]{%
+\@namedef{@mpthreecol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{@mpfootins#1}}{\thr@@}{\splittopskip}}}}
+\newcommand{\fourcolumnfootnotes}{%
+ \@namedef{foottextfontv@r}{\foottextfont}% % [RS]
+ \let\@footnotetext\@fourcolfootnotetext
+ \let\@LTRfootnotetext\@fourcolLTRfootnotetext
+ \let\@RTLfootnotetext\@fourcolRTLfootnotetext
+ \dimen\footinsv@r=4\footinsdim
+ \count\footinsv@r=250\relax
+ \m@make@fourcol@footgroup{v@r}%
+ \let\@footgroupv@r\@fourcol@footgroupv@r
+ \let\@mpfootnotetext\@mpfourcolfootnotetext
+ \let\@mpLTRfootnotetext\@mpfourcolLTRfootnotetext
+ \let\@mpRTLfootnotetext\@mpfourcolRTLfootnotetext
+ \m@make@mpfourcol@footgroup{v@r}%
+ \let\mp@footgroupv@r\@mpfourcol@footgroupv@r}
+\newcommand{\@fourcolfootnotetext}[1]{\insert\footinsv@r{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fourcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@fourcolLTRfootnotetext}[1]{\insert\footinsv@r{\if@RTLcolumnfootnotes\beginL\fi\@RTLfalse%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fourcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@fourcolRTLfootnotetext}[1]{\insert\footinsv@r{\@RTLtrue%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fourcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@preamfourfmt}{%
+ \hsize .25\hsize
+ \parindent=\z@
+ \tolerance=5000\relax
+% \raggedright
+ \leavevmode}
+\newcommand{\@fourcolfootfmt}[1]{%
+ \@preamfourfmt
+ {\footfootmark\strut {\foottextfont #1}\strut\par}\allowbreak}
+\newcommand{\@mpfourcolfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fourcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpfourcolLTRfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLfalse%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \if@RTLcolumnfootnotes\beginL\fi
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fourcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpfourcolRTLfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLtrue%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fourcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\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}%
+ \@namelongdef{@footnotetext#1}##1{%
+ \@nameuse{@fourcolfootnotetext#1}{##1}}%
+ \@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}
+\newcommand{\m@make@fourcolfootnotetext}[1]{%
+ \@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}}
+\newcommand{\m@make@mpfourcolfootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@fourcolfootfmt}[1]{%
+ \@namedef{@fourcolfootfmt#1}##1{%
+ \@preamfourfmt
+ {\@nameuse{footfootmark#1}\strut
+ {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}}
+\newcommand{\m@make@fourcol@footgroup}[1]{%
+ \@namedef{@fourcol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{footins#1}}{4}{\splittopskip}}}}
+\newcommand{\m@make@mpfourcol@footgroup}[1]{%
+\@namedef{@mpfourcol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{@mpfootins#1}}{4}{\splittopskip}}}}
+\newcommand{\fivecolumnfootnotes}{%
+ \@namedef{foottextfontv@r}{\foottextfont}% % [RS]
+ \let\@footnotetext\@fivecolfootnotetext
+ \let\@LTRfootnotetext\@fivecolLTRfootnotetext
+ \let\@RTLfootnotetext\@fivecolRTLfootnotetext
+ \dimen\footinsv@r=5\footinsdim
+ \count\footinsv@r=200\relax
+ \m@make@fivecol@footgroup{v@r}%
+ \let\@footgroupv@r\@fivecol@footgroupv@r
+ \let\@mpfootnotetext\@mpfivecolfootnotetext
+ \let\@mpLTRfootnotetext\@mpfivecolLTRfootnotetext
+ \let\@mpRTLfootnotetext\@mpfivecolRTLfootnotetext
+ \m@make@mpfivecol@footgroup{v@r}%
+ \let\mp@footgroupv@r\@mpfivecol@footgroupv@r}
+\newcommand{\@fivecolfootnotetext}[1]{\insert\footinsv@r{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fivecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@fivecolLTRfootnotetext}[1]{\insert\footinsv@r{\if@RTLcolumnfootnotes\beginL\fi\@RTLfalse%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fivecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@fivecolRTLfootnotetext}[1]{\insert\footinsv@r{\@RTLtrue%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fivecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@preamfivefmt}{%
+ \hsize .2\hsize
+ \parindent=\z@
+ \tolerance=5000\relax
+% \raggedright
+ \leavevmode}
+\newcommand{\@fivecolfootfmt}[1]{%
+ \@preamfivefmt
+ {\footfootmark\strut {\foottextfont #1}\strut\par}\allowbreak}
+\newcommand{\@mpfivecolfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fivecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpfivecolLTRfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLfalse%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \if@RTLcolumnfootnotes\beginL\fi
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fivecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpfivecolRTLfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLtrue%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@fivecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\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}%
+ \@namelongdef{@footnotetext#1}##1{%
+ \@nameuse{@fivecolfootnotetext#1}{##1}}%
+ \@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}
+\newcommand{\m@make@fivecolfootnotetext}[1]{%
+ \@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}}
+\newcommand{\m@make@mpfivecolfootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@fivecolfootfmt}[1]{%
+ \@namedef{@fivecolfootfmt#1}##1{%
+ \@preamfivefmt
+ {\@nameuse{footfootmark#1}\strut
+ {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}}
+\newcommand{\m@make@fivecol@footgroup}[1]{%
+ \@namedef{@fivecol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{footins#1}}{5}{\splittopskip}}}}
+\newcommand{\m@make@mpfivecol@footgroup}[1]{%
+\@namedef{@mpfivecol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{@mpfootins#1}}{5}{\splittopskip}}}}
+\newcommand{\sixcolumnfootnotes}{%
+ \@namedef{foottextfontv@r}{\foottextfont}% % [RS]
+ \let\@footnotetext\@sixcolfootnotetext
+ \let\@LTRfootnotetext\@sixcolLTRfootnotetext
+ \let\@RTLfootnotetext\@sixcolRTLfootnotetext
+ \dimen\footinsv@r=6\footinsdim
+ \count\footinsv@r=166\relax
+ \m@make@sixcol@footgroup{v@r}%
+ \let\@footgroupv@r\@sixcol@footgroupv@r
+ \let\@mpfootnotetext\@mpsixcolfootnotetext
+ \let\@mpLTRfootnotetext\@mpsixcolLTRfootnotetext
+ \let\@mpRTLfootnotetext\@mpsixcolRTLfootnotetext
+ \m@make@mpsixcol@footgroup{v@r}%
+ \let\mp@footgroupv@r\@mpsixcol@footgroupv@r}
+\newcommand{\@sixcolfootnotetext}[1]{\insert\footinsv@r{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sixcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@sixcolLTRfootnotetext}[1]{\insert\footinsv@r{\if@RTLcolumnfootnotes\beginL\fi\@RTLfalse%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sixcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@sixcolRTLfootnotetext}[1]{\insert\footinsv@r{\@RTLtrue%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sixcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@preamsixfmt}{%
+ \hsize .16\hsize
+ \parindent=\z@
+ \tolerance=5000\relax
+% \raggedright
+ \leavevmode}
+\newcommand{\@sixcolfootfmt}[1]{%
+ \@preamsixfmt
+ {\footfootmark\strut {\foottextfont #1}\strut\par}\allowbreak}
+\newcommand{\@mpsixcolfootnotetext}[1]{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \global\setbox\@mpfootinsv@r\vbox{%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sixcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpsixcolLTRfootnotetext}[1]{\@RTLfalse%
+ \global\setbox\@mpfootinsv@r\vbox{%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \if@RTLcolumnfootnotes\beginL\fi
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sixcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpsixcolRTLfootnotetext}[1]{\@RTLtrue%
+ \global\setbox\@mpfootinsv@r\vbox{%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sixcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\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}%
+ \@namelongdef{@footnotetext#1}##1{%
+ \@nameuse{@sixcolfootnotetext#1}{##1}}%
+ \@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}
+\newcommand{\m@make@sixcolfootnotetext}[1]{%
+ \@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}}
+\newcommand{\m@make@mpsixcolfootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@sixcolfootfmt}[1]{%
+ \@namedef{@sixcolfootfmt#1}##1{%
+ \@preamsixfmt
+ {\@nameuse{footfootmark#1}\strut
+ {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}}
+\newcommand{\m@make@sixcol@footgroup}[1]{%
+ \@namedef{@sixcol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{footins#1}}{6}{\splittopskip}}}}
+\newcommand{\m@make@mpsixcol@footgroup}[1]{%
+\@namedef{@mpsixcol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{@mpfootins#1}}{6}{\splittopskip}}}}
+\newcommand{\sevencolumnfootnotes}{%
+ \@namedef{foottextfontv@r}{\foottextfont}% % [RS]
+ \let\@footnotetext\@sevencolfootnotetext
+ \let\@LTRfootnotetext\@sevencolLTRfootnotetext
+ \let\@RTLfootnotetext\@sevencolRTLfootnotetext
+ \dimen\footinsv@r=7\footinsdim
+ \count\footinsv@r=142\relax
+ \m@make@sevencol@footgroup{v@r}%
+ \let\@footgroupv@r\@sevencol@footgroupv@r
+ \let\@mpfootnotetext\@mpsevencolfootnotetext
+ \let\@mpLTRfootnotetext\@mpsevencolLTRfootnotetext
+ \let\@mpRTLfootnotetext\@mpsevencolRTLfootnotetext
+ \m@make@mpsevencol@footgroup{v@r}%
+ \let\mp@footgroupv@r\@mpsevencol@footgroupv@r}
+\newcommand{\@sevencolfootnotetext}[1]{\insert\footinsv@r{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sevencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@sevencolLTRfootnotetext}[1]{\insert\footinsv@r{\if@RTLcolumnfootnotes\beginL\fi\@RTLfalse%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sevencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@sevencolRTLfootnotetext}[1]{\insert\footinsv@r{\@RTLtrue%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sevencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@preamsevenfmt}{%
+ \hsize .142\hsize
+ \parindent=\z@
+ \tolerance=5000\relax
+% \raggedright
+ \leavevmode}
+\newcommand{\@sevencolfootfmt}[1]{%
+ \@preamsevenfmt
+ {\footfootmark\strut {\foottextfont #1}\strut\par}\allowbreak}
+\newcommand{\@mpsevencolfootnotetext}[1]{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \global\setbox\@mpfootinsv@r\vbox{%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sevencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpsevencolLTRfootnotetext}[1]{\@RTLfalse%
+ \global\setbox\@mpfootinsv@r\vbox{%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \if@RTLcolumnfootnotes\beginL\fi
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sevencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpsevencolRTLfootnotetext}[1]{\@RTLtrue%
+ \global\setbox\@mpfootinsv@r\vbox{%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@sevencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\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}%
+ \@namelongdef{@footnotetext#1}##1{%
+ \@nameuse{@sevencolfootnotetext#1}{##1}}%
+ \@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}
+\newcommand{\m@make@sevencolfootnotetext}[1]{%
+ \@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}}
+\newcommand{\m@make@mpsevencolfootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@sevencolfootfmt}[1]{%
+ \@namedef{@sevencolfootfmt#1}##1{%
+ \@preamsevenfmt
+ {\@nameuse{footfootmark#1}\strut
+ {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}}
+\newcommand{\m@make@sevencol@footgroup}[1]{%
+ \@namedef{@sevencol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{footins#1}}{7}{\splittopskip}}}}
+\newcommand{\m@make@mpsevencol@footgroup}[1]{%
+\@namedef{@mpsevencol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{@mpfootins#1}}{7}{\splittopskip}}}}
+\newcommand{\eightcolumnfootnotes}{%
+ \@namedef{foottextfontv@r}{\foottextfont}% % [RS]
+ \let\@footnotetext\@eightcolfootnotetext
+ \let\@LTRfootnotetext\@eightcolLTRfootnotetext
+ \let\@RTLfootnotetext\@eightcolRTLfootnotetext
+ \dimen\footinsv@r=8\footinsdim
+ \count\footinsv@r=125\relax
+ \m@make@eightcol@footgroup{v@r}%
+ \let\@footgroupv@r\@eightcol@footgroupv@r
+ \let\@mpfootnotetext\@mpeightcolfootnotetext
+ \let\@mpLTRfootnotetext\@mpeightcolLTRfootnotetext
+ \let\@mpRTLfootnotetext\@mpeightcolRTLfootnotetext
+ \m@make@mpeightcol@footgroup{v@r}%
+ \let\mp@footgroupv@r\@mpeightcol@footgroupv@r}
+\newcommand{\@eightcolfootnotetext}[1]{\insert\footinsv@r{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@eightcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@eightcolLTRfootnotetext}[1]{\insert\footinsv@r{\if@RTLcolumnfootnotes\beginL\fi\@RTLfalse%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@eightcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@eightcolRTLfootnotetext}[1]{\insert\footinsv@r{\@RTLtrue%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@eightcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@preameightfmt}{%
+ \hsize .125\hsize
+ \parindent=\z@
+ \tolerance=5000\relax
+% \raggedright
+ \leavevmode}
+\newcommand{\@eightcolfootfmt}[1]{%
+ \@preameightfmt
+ {\footfootmark\strut {\foottextfont #1}\strut\par}\allowbreak}
+\newcommand{\@mpeightcolfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@eightcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpeightcolLTRfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLfalse%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \if@RTLcolumnfootnotes\beginL\fi
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@eightcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpeightcolRTLfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLtrue%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@eightcolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\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}%
+ \@namelongdef{@footnotetext#1}##1{%
+ \@nameuse{@eightcolfootnotetext#1}{##1}}%
+ \@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}
+\newcommand{\m@make@eightcolfootnotetext}[1]{%
+ \@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}}
+\newcommand{\m@make@mpeightcolfootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@eightcolfootfmt}[1]{%
+ \@namedef{@eightcolfootfmt#1}##1{%
+ \@preameightfmt
+ {\@nameuse{footfootmark#1}\strut
+ {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}}
+\newcommand{\m@make@eightcol@footgroup}[1]{%
+ \@namedef{@eightcol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{footins#1}}{8}{\splittopskip}}}}
+\newcommand{\m@make@mpeightcol@footgroup}[1]{%
+\@namedef{@mpeightcol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{@mpfootins#1}}{8}{\splittopskip}}}}
+\newcommand{\ninecolumnfootnotes}{%
+ \@namedef{foottextfontv@r}{\foottextfont}% % [RS]
+ \let\@footnotetext\@ninecolfootnotetext
+ \let\@LTRfootnotetext\@ninecolLTRfootnotetext
+ \let\@RTLfootnotetext\@ninecolRTLfootnotetext
+ \dimen\footinsv@r=9\footinsdim
+ \count\footinsv@r=111\relax
+ \m@make@ninecol@footgroup{v@r}%
+ \let\@footgroupv@r\@ninecol@footgroupv@r
+ \let\@mpfootnotetext\@mpninecolfootnotetext
+ \let\@mpLTRfootnotetext\@mpninecolLTRfootnotetext
+ \let\@mpRTLfootnotetext\@mpninecolRTLfootnotetext
+ \m@make@mpninecol@footgroup{v@r}%
+ \let\mp@footgroupv@r\@mpninecol@footgroupv@r}
+\newcommand{\@ninecolfootnotetext}[1]{\insert\footinsv@r{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@ninecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@ninecolLTRfootnotetext}[1]{\insert\footinsv@r{\if@RTLcolumnfootnotes\beginL\fi\@RTLfalse%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@ninecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@ninecolRTLfootnotetext}[1]{\insert\footinsv@r{\@RTLtrue%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@ninecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@preamninefmt}{%
+ \hsize .1\hsize
+ \parindent=\z@
+ \tolerance=5000\relax
+% \raggedright
+ \leavevmode}
+\newcommand{\@ninecolfootfmt}[1]{%
+ \@preamninefmt
+ {\footfootmark\strut {\foottextfont #1}\strut\par}\allowbreak}
+\newcommand{\@mpninecolfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@ninecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpninecolLTRfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLfalse%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \if@RTLcolumnfootnotes\beginL\fi
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@ninecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mpninecolRTLfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLtrue%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@ninecolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\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}%
+ \@namelongdef{@footnotetext#1}##1{%
+ \@nameuse{@ninecolfootnotetext#1}{##1}}%
+ \@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}
+\newcommand{\m@make@ninecolfootnotetext}[1]{%
+ \@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}}
+\newcommand{\m@make@mpninecolfootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@ninecolfootfmt}[1]{%
+ \@namedef{@ninecolfootfmt#1}##1{%
+ \@preamninefmt
+ {\@nameuse{footfootmark#1}\strut
+ {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}}
+\newcommand{\m@make@ninecol@footgroup}[1]{%
+ \@namedef{@ninecol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{footins#1}}{9}{\splittopskip}}}}
+\newcommand{\m@make@mpninecol@footgroup}[1]{%
+\@namedef{@mpninecol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{@mpfootins#1}}{9}{\splittopskip}}}}
+\newcommand{\tencolumnfootnotes}{%
+ \@namedef{foottextfontv@r}{\foottextfont}% % [RS]
+ \let\@footnotetext\@tencolfootnotetext
+ \let\@LTRfootnotetext\@tencolLTRfootnotetext
+ \let\@RTLfootnotetext\@tencolRTLfootnotetext
+ \dimen\footinsv@r=10\footinsdim
+ \count\footinsv@r=100\relax
+ \m@make@tencol@footgroup{v@r}%
+ \let\@footgroupv@r\@tencol@footgroupv@r
+ \let\@mpfootnotetext\@mptencolfootnotetext
+ \let\@mpLTRfootnotetext\@mptencolLTRfootnotetext
+ \let\@mpRTLfootnotetext\@mptencolRTLfootnotetext
+ \m@make@mptencol@footgroup{v@r}%
+ \let\mp@footgroupv@r\@mptencol@footgroupv@r}
+\newcommand{\@tencolfootnotetext}[1]{\insert\footinsv@r{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@tencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@tencolLTRfootnotetext}[1]{\insert\footinsv@r{\if@RTLcolumnfootnotes\beginL\fi\@RTLfalse%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@tencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@tencolRTLfootnotetext}[1]{\insert\footinsv@r{\@RTLtrue%
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@tencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@preamtenfmt}{%
+ \hsize .1\hsize
+ \parindent=\z@
+ \tolerance=5000\relax
+% \raggedright
+ \leavevmode}
+\newcommand{\@tencolfootfmt}[1]{%
+ \@preamtenfmt
+ {\footfootmark\strut {\foottextfont #1}\strut\par}\allowbreak}
+\newcommand{\@mptencolfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@tencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mptencolLTRfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLfalse%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \if@RTLcolumnfootnotes\beginL\fi
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@tencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\newcommand{\@mptencolRTLfootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{\@RTLtrue%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@tencolfootfmt{#1}%
+ \color@endgroup}%
+ \m@mmf@prepare}
+\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}%
+ \@namelongdef{@footnotetext#1}##1{%
+ \@nameuse{@tencolfootnotetext#1}{##1}}%
+ \@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}
+\newcommand{\m@make@tencolfootnotetext}[1]{%
+ \@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}}
+\newcommand{\m@make@mptencolfootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@tencolfootfmt}[1]{%
+ \@namedef{@tencolfootfmt#1}##1{%
+ \@preamtenfmt
+ {\@nameuse{footfootmark#1}\strut
+ {\@nameuse{foottextfont#1}##1}\strut\par}\allowbreak}}
+\newcommand{\m@make@tencol@footgroup}[1]{%
+ \@namedef{@tencol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{footins#1}}{10}{\splittopskip}}}}
+\newcommand{\m@make@mptencol@footgroup}[1]{%
+\@namedef{@mptencol@footgroup#1}{{%
+ \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox
+ \m@mrigidbalance{\@nameuse{@mpfootins#1}}{10}{\splittopskip}}}}
+\newcommand{\m@munvxh}[1]{%
+ \setbox0=\vbox{\unvbox#1%
+ \global\setbox1=\lastbox}%
+ \unhbox1
+ \unskip
+ \unskip
+ \unpenalty
+ \hskip\m@mipn@skip}
+\newcommand{\m@mungebox}{%
+ \setbox0=\hbox{\m@munvxh0}%
+ \dp0=\z@
+ \ht0=\footfudgefactor\wd0
+ \box0
+ \penalty0}
+\newskip\m@mipn@skip
+\newcommand*{\m@minterparanoteglue}[1]{%
+ {\foottextfont\global\m@mipn@skip=#1\relax}}
+\m@minterparanoteglue{1em plus.4em minus.4em}
+\newcommand*{\m@mmakehboxofhboxes}{\setbox0=\hbox{}%
+ \loop
+ \unpenalty
+ \setbox2=\lastbox
+ \ifhbox2
+ \setbox0=\hbox{\box2\unhbox0}
+ \repeat}
+\newcommand*{\m@mremovehboxes}{\setbox0=\lastbox
+ \ifhbox0{\m@mremovehboxes}\unhbox0 \fi}
+\newcommand*{\footfudgefiddle}{64}
+\newcommand{\paragraphfootnotes}{%
+ \@namedef{foottextfontv@r}{\foottextfont}% % [RS]
+ \let\@footnotetext\@parafootnotetext
+ \dimen\footinsv@r=\footinsdim
+ \count\footinsv@r=1000\relax
+ \m@make@para@footgroup{v@r}%
+ \let\@footgroupv@r\@para@footgroupv@r
+ \let\@mpfootnotetext\@mpparafootnotetext
+ \m@make@mppara@footgroup{v@r}%
+ \let\mp@footgroupv@r\@mppara@footgroupv@r
+ {\foottextfont
+ \dimen0=\baselineskip
+ \multiply\dimen0 by 1024
+ \divide\dimen0 by \hsize \multiply\dimen0 by \footfudgefiddle
+ \xdef\footfudgefactor{\expandafter\strip@pt\dimen0 }}}
+\newcommand{\@parafootnotetext}[1]{\insert\footinsv@r{
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \@preamfntext
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \setbox0=\vbox{\hsize=\maxdimen
+ \color@begingroup
+ \noindent \@parafootfmt{#1}%
+ \color@endgroup}%
+ \m@mungebox}\m@mmf@prepare}
+\newcommand{\@parafootfmt}[1]{%
+ \parindent=\z@
+ \parfillskip=0pt \@plus 1fil
+ {\footfootmark\strut {\foottextfont #1}\penalty-10}}
+\newcommand{\@mpparafootnotetext}[1]{%
+ \global\setbox\@mpfootinsv@r\vbox{%
+ \unvbox\@mpfootinsv@r
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@mpfootnote\endcsname\@thefnmark}%
+ \setbox0=\vbox{\hsize=\maxdimen
+ \color@begingroup
+ \noindent \@parafootfmt{#1}%
+ \color@endgroup}%
+ \m@mungebox}\m@mmf@prepare}
+\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}%
+ \@namelongdef{@footnotetext#1}##1{%
+ \@nameuse{@parafootnotetext#1}{##1}}%
+ \@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
+ {\@nameuse{foottextfont#1}%
+ \dimen0=\baselineskip
+ \multiply\dimen0 by 1024
+ \divide\dimen0 by \hsize \multiply\dimen0 by 64
+ \xdef\footfudgefactor{\expandafter\strip@pt\dimen0 }}}
+\newcommand{\m@make@parafootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@mpparafootnotetext}[1]{%
+\@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}}
+\newcommand{\m@make@parafootfmt}[1]{%
+\@namelongdef{@parafootfmt#1}##1{%
+ \parindent=\z@
+ \parfillskip=0pt \@plus 1fil
+ {\@nameuse{footfootmark#1}\strut
+ {\@nameuse{foottextfont#1}##1}\penalty-10}}}
+\newcommand{\m@make@para@footgroup}[1]{%
+\@namedef{@para@footgroup#1}{%
+ \unvbox\@nameuse{footins#1}
+ \m@mmakehboxofhboxes
+ \setbox0=\hbox{\unhbox0 \m@mremovehboxes}%
+ \@nameuse{foottextfont#1}%
+ \noindent\unhbox0\par}}
+\newcommand{\m@make@mppara@footgroup}[1]{%
+\@namedef{@mppara@footgroup#1}{%
+ \unvbox\@nameuse{@mpfootins#1}
+ \m@mmakehboxofhboxes
+ \setbox0=\hbox{\unhbox0 \m@mremovehboxes}%
+ \@nameuse{foottextfont#1}%
+ \noindent\unhbox0\par}}
+\newcommand{\m@make@para@footstart}[1]{%
+\@namedef{@para@footstart#1}{%
+ \vskip\bigskipamount
+ \leftskip=\z@
+ \rightskip=\z@
+ \parindent=\z@
+ \vskip\skip\@nameuse{footins#1}%
+ \footnoterule}}
+\newcommand*{\m@m@makecolfloats}{%
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats}
+\newcommand*{\m@m@makecoltext}{%
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop
+ \dimen@ \dp\@outputbox
+ \unvbox \@outputbox
+ \vskip -\dimen@
+ \@textbottom}%
+ \fi}
+\newcommand*{\m@m@makecolintro}{}
+\newcommand*{\m@mopfootnote}{\setbox\@outputbox \vbox{%
+ \boxmaxdepth\@maxdepth
+ \@tempdima\dp\@cclv
+ \unvbox\@cclv
+ \vskip-\@tempdima
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox \footins
+ \color@endgroup}}
+\newcommand*{\m@mopsidebar}{%
+ \ifvoid\sideins\else
+ \setbox\@outputbox \vbox{%
+ \sidecontents
+ \unvbox\@outputbox}
+ \fi}
+\gdef\mem@makecol{%
+ \m@m@makecolintro
+ \ifvoid\footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \m@mopfootnote
+ \fi
+ \m@mdoextrafeet
+ \m@m@makecolfloats
+ \m@mopsidebar
+ \m@m@makecoltext
+ \global \maxdepth \@maxdepth}
+\newcommand{\feetabovefloat}{\gdef\@makecol{\mem@makecol}}
+\feetabovefloat%
+% \end{macrocode}
+% \iffalse
+%</extrafootnotefeatures.def>
%<*extreport-xetex-bidi.def>
%\fi
% \subsection{\textsf{extreport-xetex-bidi.def}}
@@ -4966,6 +6692,17 @@ Location on CTAN: /macros/latex/contrib/bidi}
% \end{macrocode}
% \iffalse
%</fleqn-xetex-bidi.def>
+%<*float-xetex-bidi.def>
+%\fi
+% \subsection{\textsf{float-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{float-xetex-bidi.def}[2011/02/06 v0.1 bidi adaptations for float package for XeTeX engine]
+\renewcommand\floatc@plain[2]{\setbox\@tempboxa\hbox{{\@fs@cfont #1:} #2}%
+ \ifdim\wd\@tempboxa>\hsize {\@fs@cfont #1:} #2\par
+ \else\hbox to\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil\if@RTL\endR\fi}\fi}
+% \end{macrocode}
+% \iffalse
+%</float-xetex-bidi.def>
%<*flowfram-xetex-bidi.def>
%\fi
% \subsection{\textsf{flowfram-xetex-bidi.def}}
@@ -5205,9 +6942,9 @@ Location on CTAN: /macros/latex/contrib/bidi}
\long\def\ifrsentence#1{\parse@rsent#1\EInRTL123\parse@end\if@sentdir}
\long\def\bidi@footnotetext@dir#1{%
\@tempswatrue
- \ifrsentence{#1}\rtl\@tempswafalse\fi
- \iflsentence{#1}\ltr\@tempswafalse\fi
- \if@tempswa\if@RTL\rtl\else\ltr\fi\fi
+ \ifrsentence{#1}\@rtl\@tempswafalse\fi
+ \iflsentence{#1}\@ltr\@tempswafalse\fi
+ \if@tempswa\if@RTL\@rtl\else\@ltr\fi\fi
\xdef\bidi@this@footnote{\if@RTL\noexpand\right@footnote\else\noexpand\left@footnote\fi}%
}
\def\bidi@footnotetext@after{%
@@ -5310,7 +7047,7 @@ Location on CTAN: /macros/latex/contrib/bidi}
\@pboxswfalse
\setlength\@tempdima{#4}%
\def\@mpargs{{#1}{#2}[#3]{#4}}%
- \setbox\@tempboxa\vbox\bgroup\hbox\bgroup\if@RTL\beginL\fi\vbox\bgroup
+ \setbox\@tempboxa\vbox\bgroup\hbox\bgroup\if@RTL\beginL\fi\if #1t\vtop\else\vbox\fi\bgroup
\color@begingroup
\hsize\@tempdima
\textwidth\hsize \columnwidth\hsize
@@ -5355,6 +7092,159 @@ Location on CTAN: /macros/latex/contrib/bidi}
% \end{macrocode}
% \iffalse
%</footnote-xetex-bidi.def>
+%<*framed-xetex-bidi.def>
+%\fi
+% \subsection{\textsf{framed-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{framed-xetex-bidi.def}[2011/03/01 v0.1 bidi adaptations for framed package for XeTeX engine]
+\chardef\FrameRestore=\catcode`\| % for debug
+\catcode`\|=\catcode`\% % (debug: insert space after backslash)
+\def\fb@put@frame#1#2{\relax
+ \ifdim\pagegoal=\maxdimen \pagegoal\vsize \fi
+| \message{=============== Entering putframe ====================^^J
+| \pagegoal=\the\pagegoal, \pagetotal=\the\pagetotal. }%
+ \ifinner
+ \fb@putboxa#1%
+ \fb@afterframe
+ \else
+ \dimen@\pagegoal \advance\dimen@-\pagetotal % natural space left on page
+ \ifdim\dimen@<2\baselineskip % Too little room on page
+| \message{Page has only \the\dimen@\space room left; eject. }%
+ \eject \fb@adjheight \fb@put@frame#1#2%
+ \else % there's appreciable room left on the page
+ \fb@sizeofframe#1%
+| \message{\string\pagetotal=\the\pagetotal,
+| \string\pagegoal=\the\pagegoal,
+| \string\pagestretch=\the\pagestretch,
+| \string\pageshrink=\the\pageshrink,
+| \string\fb@frh=\fb@frh. \space}
+| \message{Box of size \the\ht\@tempboxa\space + \fb@frh}%
+ \begingroup % temporarily set \dimen@ to be...
+ \advance\dimen@.8\pageshrink % maximum space available on page
+ \advance\dimen@-\fb@frh\relax % space available for frame's contents
+ \expandafter\endgroup
+ % expand \ifdim, then restore \dimen@ to real room left on page
+ \ifdim\dimen@>\ht\@tempboxa % whole box does fit
+| \message{fits in \the\dimen@. }%
+ % Use vsplit anyway to capture the marks
+ % !!!???!!! MERGE THIS WITH THE else CLAUSE!!!
+ \fb@putboxa#1%
+ \fb@afterframe
+ \else % box must be split
+| \message{must be split to fit in \the\dimen@. }%
+ % update frame measurement to use \FirstFrameCommand or \MidFrameCommand
+ \fb@sizeofframe#2%
+ \setbox\@tempboxa\vbox{% simulate frame and flexiblity of the page:
+ \vskip \fb@frh \@plus\pagestretch \@minus.8\pageshrink
+ \kern137sp\kern-137sp\penalty-30
+ \unvbox\@tempboxa}%
+ \edef\fb@resto@set{\boxmaxdepth\the\boxmaxdepth
+ \splittopskip\the\splittopskip}%
+ \boxmaxdepth\z@ \splittopskip\z@
+| \message{Padded box of size \the\ht\@tempboxa\space split to \the\dimen@}%
+ % Split box here
+ \setbox\tw@\vsplit\@tempboxa to\dimen@
+| \toks99\expandafter{\splitfirstmark}%
+| \toks98\expandafter{\splitbotmark}%
+| \message{Marks are: \the\toks99, \the\toks98. }%
+ \setbox\tw@\vbox{\unvbox\tw@}% natural-sized
+| \message{Natural height of split box is \the\ht\tw@, leaving
+| \the\ht\@tempboxa\space remainder. }%
+ % If the split-to size > (\vsize-\topskip), then set box to full size
+ \begingroup
+ \advance\dimen@\topskip
+ \expandafter\endgroup
+ \ifdim\dimen@>\pagegoal
+| \message{Frame is big -- Use up the full column. }%
+ \dimen@ii\pagegoal
+ \advance\dimen@ii -\topskip
+ \advance\dimen@ii \FrameHeightAdjust\relax
+ \else % suspect this is wrong:
+ % If the split-to size > feasible room_on_page, rebox it smaller.
+ \advance\dimen@.8\pageshrink
+ \ifdim\ht\tw@>\dimen@
+| \message{Box too tall; rebox it to \the\dimen@. }%
+ \dimen@ii\dimen@
+ \else % use natural size
+ \dimen@ii\ht\tw@
+ \fi
+ \fi
+ % Re-box contents to desired size \dimen@ii
+ \advance\dimen@ii -\fb@frh
+ \setbox\tw@\vbox to\dimen@ii \bgroup
+ % remove simulated frame and page flexibility:
+ \vskip -\fb@frh \@plus-\pagestretch \@minus-.8\pageshrink
+ \unvbox\tw@ \unpenalty\unpenalty
+ \ifdim\lastkern=-137sp % whole box went to next page
+| \message{box split at beginning! }%
+ % need work here???
+ \egroup \fb@resto@set \eject % (\vskip for frame size was discarded)
+ \fb@adjheight
+ \fb@put@frame#1#2% INSERTED ???
+ \else % Got material split off at the head
+ \egroup \fb@resto@set
+ \ifvoid\@tempboxa % it all fit after all
+| \message{box split at end! }%
+ \setbox\@tempboxa\box\tw@
+ \fb@putboxa#1%
+ \fb@afterframe
+ \else % it really did split
+| \message{box split as expected. Its reboxed height is \the\ht\tw@. }%
+ \ifdim\wd\tw@>\z@
+ \wd\tw@\wd\@tempboxa
+ \centerline{#2{\hboxL{\box\tw@}}}% ??? \centerline bad idea
+ \else
+| \message{Zero width means likely blank. Don't frame it (guess)}%
+ \box\tw@
+ \fi
+ \hrule \@height\z@ \@width\hsize
+ \eject
+ \fb@adjheight
+ \fb@put@frame\LastFrameCommand\MidFrameCommand
+ \fi\fi\fi\fi\fi
+}
+\def\fb@putboxa#1{%
+ \ifvoid\@tempboxa
+ PackageWarning{framed}{Boxa is void -- discard it. }%
+ \else
+| \message{Frame and place boxa. }%
+| %{\showoutput\showbox\@tempboxa}%
+ \centerline{#1{\hboxL{\box\@tempboxa}}}%
+ \fi
+}
+\catcode`\|=\FrameRestore
+\def\FrameRestore{%
+ \let\if@nobreak\iffalse
+ \let\if@noskipsec\iffalse
+ \let\-\@dischyph
+ \let\'\@acci\let\`\@accii\let\=\@acciii
+ % \message{FrameRestore:
+ % \@totalleftmargin=\the \@totalleftmargin,
+ % \rightmargin=\the\rightmargin,
+ % \@listdepth=\the\@listdepth. }%
+ % Test if we are in a list (or list-like paragraph)
+ \ifnum \ifdim\@totalleftmargin>\z@ 1\fi
+ \ifdim\rightmargin>\z@ 1\fi
+ \ifnum\@listdepth>0 1\fi 0>\z@
+ % \message{In a list: \linewidth=\the\linewidth, \@totalleftmargin=\the\@totalleftmargin,
+ % \parshape=\the\parshape, \columnwidth=\the\columnwidth, \hsize=\the\hsize,
+ % \labelwidth=\the\labelwidth. }%
+ \@setminipage % snug fit around the item
+ % Now try to propageate changes of width from \hsize to list parameters.
+ % This is deficient, but a more advanced way to indicate modification to text
+ % dimensions is not (yet) provided; in particular, no separate left/right
+ % adjustment.
+ \advance\linewidth-\columnwidth \advance\linewidth\hsize
+ \parshape\@ne \@totalleftmargin \linewidth
+ \else % Not in list
+ \linewidth=\hsize
+ %\message{No list, set \string\linewidth=\the\hsize. }%
+ \fi
+ \sloppy
+}
+% \end{macrocode}
+% \iffalse
+%</framed-xetex-bidi.def>
%<*graphicx-xetex-bidi.def>
%\fi
% \subsection{\textsf{graphicx-xetex-bidi.def}}
@@ -5707,8 +7597,8 @@ Location on CTAN: /macros/latex/contrib/bidi}
% \begin{macrocode}
\ProvidesFile{leqno-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for leqno tag for XeTeX engine]
\renewcommand\@eqnnum{\hb@xt@.01\p@{}%
- \rlap{\normalfont\normalcolor
- \hskip -\displaywidth\if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}
+ \rlap{
+ \hskip -\displaywidth{\normalfont\normalcolor\if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}}
% \end{macrocode}
% \iffalse
%</leqno-xetex-bidi.def>
@@ -5776,9 +7666,12 @@ Location on CTAN: /macros/latex/contrib/bidi}
\bidi@isloaded{breqn}
\bidi@isloaded{caption}
\bidi@isloaded{color}
+\bidi@isloaded{dblfnote}
\bidi@isloaded{xcolor}
\bidi@isloaded{colortbl}
+\bidi@isloaded{float}
\bidi@isloaded{flowfram}
+\bidi@isloaded{framed}
\bidi@isloaded{xltxtra}
\bidi@isloaded{xunicode}
\bidi@isloaded{wrapfig}
@@ -5786,6 +7679,7 @@ Location on CTAN: /macros/latex/contrib/bidi}
\bidi@isloaded{hyperref}
\bidi@isloaded{fancyhdr}
\bidi@isloaded{draftwatermark}
+\bidi@isloaded{empheq}
\bidi@isloaded{pdfpages}
\bidi@isloaded{listings}
\bidi@isloaded{pstricks}
@@ -5829,15 +7723,24 @@ Location on CTAN: /macros/latex/contrib/bidi}
\@ifpackageloaded{hyperref}{}{%
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package color after bidi package. Please load package color before bidi package, and then try to run xelatex on your document again}{}]{color}}
\fi%
+ \if@bidi@dblfnoteloaded@\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package dblfnote after bidi package. Please load package dblfnote before bidi package, and then try to run xelatex on your document again}{}]{dblfnote}
+ \fi%
\if@bidi@xcolorloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xcolor after bidi package. Please load package xcolor before bidi package, and then try to run xelatex on your document again}{}]{xcolor}
\fi%
\if@bidi@colortblloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package colortbl after bidi package. Please load package colortbl before bidi package, and then try to run xelatex on your document again}{}]{colortbl}
\fi%
+ \if@bidi@floatloaded@\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package float after bidi package. Please load package float before bidi package, and then try to run xelatex on your document again}{}]{float}
+ \fi%
\if@bidi@flowframloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package flowfram after bidi package. Please load package flowfram before bidi package, and then try to run xelatex on your document again}{}]{flowfram}
\fi%
+ \if@bidi@framedloaded@\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package framed after bidi package. Please load package framed before bidi package, and then try to run xelatex on your document again}{}]{framed}
+ \fi%
\if@bidi@xltxtraloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xltxtra after bidi package. Please load package xltxtra before bidi package, and then try to run xelatex on your document again}{}]{xltxtra}
\fi%
@@ -5859,6 +7762,9 @@ Location on CTAN: /macros/latex/contrib/bidi}
\if@bidi@draftwatermarkloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package draftwatermark after bidi package. Please load package draftwatermark before bidi package, and then try to run xelatex on your document again}{}]{draftwatermark}
\fi%
+ \if@bidi@empheqloaded@\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package empheq after bidi package. Please load package empheq before bidi package, and then try to run xelatex on your document again}{}]{empheq}
+ \fi%
\if@bidi@pdfpagesloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pdfpages after bidi package. Please load package pdfpages before bidi package, and then try to run xelatex on your document again}{}]{pdfpages}
\fi%
@@ -6171,7 +8077,7 @@ Location on CTAN: /macros/latex/contrib/bidi}
\@tempdima #3\relax
\advance\if@RTL\rightskip\else\leftskip\fi \@tempdima \null\nobreak\hskip -\if@RTL\rightskip\else\leftskip\fi
{#4}\nobreak \hfill \nobreak\null
- \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
+ \hb@xt@\@pnumwidth{{\hfil\normalfont \normalcolor #5}}%
\par}%
\fi}
% \end{macrocode}
@@ -6389,11 +8295,15 @@ Location on CTAN: /macros/latex/contrib/bidi}
%\fi
% \subsection{\textsf{pgf-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{pgf-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for pgf package for XeTeX engine]
+\ProvidesFile{pgf-xetex-bidi.def}[2010/07/25 v0.3 bidi adaptations for pgf package for XeTeX engine]
+\AtBeginDocument{%
+\@ifdefinitionfileloaded{tikz-xetex-bidi}{}{%
\let\origin@pgfpicture=\pgfpicture
\let\origin@endpgfpicture=\endpgfpicture
-\def\pgfpicture{\ifmmode\else\beginL\fi\origin@pgfpicture}
-\def\endpgfpicture{\origin@endpgfpicture\ifmmode\else\endL\fi}
+\def\pgfpicture{\ifmmode\else\LTR\beginL\fi\origin@pgfpicture}
+\def\endpgfpicture{\origin@endpgfpicture\ifmmode\else\endL\endLTR\fi}%
+}%
+}
% \end{macrocode}
% \iffalse
%</pgf-xetex-bidi.def>
@@ -6460,8 +8370,8 @@ Location on CTAN: /macros/latex/contrib/bidi}
\def\endLTR{\par}
\def\RTL{\par\@RTLtrue\@RTL@footnotetrue\hsize\linewidth\parshape\z@}
\def\endRTL{\par}
-\def\ltr{\if@RTL\par\@RTLfalse\@RTL@footnotefalse\fi}
-\def\rtl{\if@RTL\relax\else\par\@RTLtrue\@RTL@footnotetrue\fi}
+\def\@ltr{\if@RTL\par\@RTLfalse\@RTL@footnotefalse\fi}
+\def\@rtl{\if@RTL\relax\else\par\@RTLtrue\@RTL@footnotetrue\fi}
\def\setRTL{\@RTLtrue\@RTL@footnotetrue}
\def\setLTR{\@RTLfalse\@RTL@footnotefalse}
\let\unsetRTL=\setLTR
@@ -6501,8 +8411,8 @@ Location on CTAN: /macros/latex/contrib/bidi}
\ProvidesFile{pstricks-xetex-bidi.def}[2010/07/25 v0.3 bidi adaptations for pstricks package for XeTeX engine]
\let\origin@pspicture=\pspicture
\let\origin@endpspicture=\endpspicture
-\def\pspicture{\ifmmode\else\beginL\fi\origin@pspicture}
-\def\endpspicture{\origin@endpspicture\ifmmode\else\endL\fi}
+\def\pspicture{\ifmmode\else\LTR\beginL\fi\origin@pspicture}
+\def\endpspicture{\origin@endpspicture\ifmmode\else\endL\endLTR\fi}
% \end{macrocode}
% \iffalse
%</pstricks-xetex-bidi.def>
@@ -8807,8 +10717,8 @@ Location on CTAN: /macros/latex/contrib/bidi}
\let\origin@endtikzpicture=\endtikzpicture
\let\pgfutil@minipage=\minipage
\let\pgfutil@endminipage=\endminipage
-\def\tikzpicture{\ifmmode\else\beginL\fi\origin@tikzpicture}
-\def\endtikzpicture{\origin@endtikzpicture\ifmmode\else\endL\fi}
+\def\tikzpicture{\ifmmode\else\LTR\beginL\fi\origin@tikzpicture}
+\def\endtikzpicture{\origin@endtikzpicture\ifmmode\else\endL\endLTR\fi}
% \end{macrocode}
% \iffalse
%</tikz-xetex-bidi.def>
@@ -9446,7 +11356,7 @@ Location on CTAN: /macros/latex/contrib/bidi}
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
mu$}\hfill
\nobreak
- \hb@xt@\@pnumwidth{\hfil \normalfont \normalcolor #5}%
+ \hb@xt@\@pnumwidth{{\hfil \normalfont \normalcolor #5}}%
\par}%
\fi}%
\ifx\@dottedtocline\@tempa\else
@@ -9572,11 +11482,12 @@ Location on CTAN: /macros/latex/contrib/bidi}
% \begin{macrocode}
\ProvidesFile{xcolor-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for xcolor package for XeTeX engine]
\long\def\color@b@x#1#2#3%
- {\leavevmode\if@RTL\beginL\fi
+ {\leavevmode\ifmmode\else\if@RTL\beginL\fi\fi
\setbox\z@\hbox{\kern\fboxsep{\set@color\if@RTL\beginR\fi#3\if@RTL\endR\fi}\kern\fboxsep}%
\dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@
\dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@
- {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}\if@RTL\endL\fi}
+ {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}\ifmmode\else\if@RTL\endL\fi\fi}
+\def\normalcolor{\let\current@color\default@color\ifhmode\if@RTL\beginL\aftergroup\endR\fi\fi\set@color\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi}
\DeclareRobustCommand\color
{\ifhmode\if@RTL\beginL\aftergroup\endR\fi\fi\@ifnextchar[\@undeclaredcolor\@declaredcolor}
\def\@undeclaredcolor[#1]#2%
@@ -9672,6 +11583,7 @@ Location on CTAN: /macros/latex/contrib/bidi}
\def\color@fb@x#1#2#3#4%
{\color@b@x{\fboxsep\z@\bidicolor#1{#2}\XC@fbox}%
{\@ifxempty{#3}{\bidicolor#1}{\bidicolor#3}{#4}}}
+\def\color@setgroup{\begingroup\ifhmode\if@RTL\beginL\aftergroup\endR\fi\fi\set@color\ifhmode\if@RTL\beginR\aftergroup\endL\fi\fi}
% \end{macrocode}
% \iffalse
%</xcolor-xetex-bidi.def>
@@ -9731,8 +11643,8 @@ Location on CTAN: /macros/latex/contrib/bidi}
\def\endLTR{\par}
\def\RTL{\par\@RTLtrue\@RTL@footnotetrue\hsize\linewidth\parshape\z@}
\def\endRTL{\par}
-\def\ltr{\if@RTL\par\@RTLfalse\@RTL@footnotefalse\fi}
-\def\rtl{\if@RTL\relax\else\par\@RTLtrue\@RTL@footnotetrue\fi}
+\def\@ltr{\if@RTL\par\@RTLfalse\@RTL@footnotefalse\fi}
+\def\@rtl{\if@RTL\relax\else\par\@RTLtrue\@RTL@footnotetrue\fi}
\def\setRTL{\@RTLtrue\@RTL@footnotetrue}
\def\setLTR{\@RTLfalse\@RTL@footnotefalse}
\let\unsetRTL=\setLTR
@@ -9768,7 +11680,7 @@ Location on CTAN: /macros/latex/contrib/bidi}
\DeclareOption{rldocument}{\@RTLtrue\@RTL@footnotetrue\g@addto@macro\document{\autofootnoterule}}
\def\rcases#1{\left.\vcenter{\normalbaselines\m@th
\ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\,\right\}}
-\def\SepMark#1{\gdef\@SepMark{\hskip0pt#1\hskip0pt}}
+\def\SepMark#1{\gdef\@SepMark{\if@RTL‏\fi#1\if@RTL‏\fi}}
\SepMark{.}
\def\@thmcountersep{\@SepMark}
\def\setRTLbibitems{\@RTLbibitemstrue\@LTRbibitemsfalse}
@@ -9908,7 +11820,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
mu$}\hfill
\nobreak
- \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
+ \hb@xt@\@pnumwidth{{\hfil\normalfont \normalcolor #5}}%
\par}%
\fi}
\def\RTL@outputdblcol{%
@@ -9982,12 +11894,12 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\if@RTL\endL\fi
\egroup
\egroup
- \expandafter\@iiiparbox\@mpargs{\leavevmode\unvbox\@tempboxa}}
+ \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa\leavevmode}}
\long\def\@iiiparbox#1#2[#3]#4#5{%
\leavevmode
\@pboxswfalse
\setlength\@tempdima{#4}%
- \@begin@tempboxa\vbox{\hbox{\if@RTL\beginL\fi\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}\if@RTL\endL\fi}}%
+ \@begin@tempboxa\vbox{\hbox{\if@RTL\beginL\fi\if #1t\vtop\else\vbox\fi{\hsize\@tempdima\@parboxrestore#5\@@par}\if@RTL\endL\fi}}%
\ifx\relax#2\else
\setlength\@tempdimb{#2}%
\edef\@parboxto{to\the\@tempdimb}%
@@ -10126,7 +12038,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\hb@xt@\hsize{\if@RTL\beginR\fi\hfil\box\@tempboxa\hfil\if@RTL\endR\fi}%
\fi
\vskip\belowcaptionskip}
-\everydisplay{\predisplaydirection=0 }
+\everydisplay\expandafter{\the\everydisplay\predisplaydirection=0 }
\def\@eqnnum{{\normalfont \normalcolor \if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}
\input{footnote-xetex-bidi.def}
\@ifclassloaded{article}{\input{article-xetex-bidi.def}}{}
@@ -10162,6 +12074,8 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@ifpackageloaded{color}{\input{color-xetex-bidi.def}}{}
\@ifpackageloaded{xcolor}{\input{xcolor-xetex-bidi.def}}{}
\@ifpackageloaded{colortbl}{\input{colortbl-xetex-bidi.def}}{}
+\@ifpackageloaded{empheq}{\input{empheq-xetex-bidi.def}}{}
+\@ifpackageloaded{float}{\input{float-xetex-bidi.def}}{}
\@ifpackageloaded{flowfram}{\input{flowfram-xetex-bidi.def}}{}
\@ifpackageloaded{xltxtra}{\input{xltxtra-xetex-bidi.def}}{}
\@ifpackageloaded{wrapfig}{\input{wrapfig-xetex-bidi.def}}{}
@@ -10169,6 +12083,8 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@ifpackageloaded{hyperref}{\input{hyperref-xetex-bidi.def}}{}
\@ifpackageloaded{fancyhdr}{\input{fancyhdr-xetex-bidi.def}}{}
\@ifpackageloaded{draftwatermark}{\input{draftwatermark-xetex-bidi.def}}{}
+\@ifpackageloaded{dblfnote}{\input{dblfnote-xetex-bidi.def}}{}
+\@ifpackageloaded{framed}{\input{framed-xetex-bidi.def}}{}
\@ifpackageloaded{pdfpages}{\input{pdfpages-xetex-bidi.def}}{}
\@ifpackageloaded{listings}{\input{listings-xetex-bidi.def}}{}
\@ifpackageloaded{pstricks}{\input{pstricks-xetex-bidi.def}}{}
@@ -10190,6 +12106,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@ifpackageloaded{tocstyle}{\input{tocstyle-xetex-bidi.def}}{}
\@ifpackageloaded{tocbibind}{\@ifclassloaded{memoir}{}{\input{tocbibind-xetex-bidi.def}}}{}
\@ifpackageloaded{tocloft}{\@ifclassloaded{memoir}{}{\input{tocloft-xetex-bidi.def}}}{}
+\DeclareOption{extrafootnotefeatures}{\input{extrafootnotefeatures.def}}
% \end{macrocode}
% \iffalse
%</xetex-bidi.def>
@@ -11616,7 +13533,7 @@ Lion & Yellow & Elephants & Tartare \\\cline{4-4}
% \typeout{*}
% \typeout{* \space\space\space all *.cls, *.sty and *.def files}
% \typeout{*}
-% \typeout{* \space\space\space bibitem.pdf file}
+% \typeout{* \space\space\space and bibitem.pdf file}
% \typeout{*************************************************************}
%
\endinput
diff --git a/Master/texmf-dist/source/latex/bidi/bidi.ins b/Master/texmf-dist/source/latex/bidi/bidi.ins
index 6dc9b131387..41a4db6d3ff 100644
--- a/Master/texmf-dist/source/latex/bidi/bidi.ins
+++ b/Master/texmf-dist/source/latex/bidi/bidi.ins
@@ -7,7 +7,7 @@
%% bidi.dtx (with options: `batchfile')
%%
%% ______________________________________
-%% Copyright © 2009–2010 Vafa Khalighi
+%% Copyright © 2009–2011 Vafa Khalighi
%%
%% License information appended.
%%
@@ -17,14 +17,14 @@
\preamble
______________________________________
- Copyright © 2009–2010 Vafa Khalighi
+ Copyright © 2009–2011 Vafa Khalighi
License information appended.
\endpreamble
\postamble
-Copyright © 2009–2010 Vafa Khalighi <vafakhlgh@gmail.com>
+Copyright © 2009–2011 Vafa Khalighi <vafakhlgh@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
@@ -33,62 +33,6 @@ this license is at: http://www.latex-project.org/lppl.txt
This work is “author-maintained” (as per LPPL maintenance status)
by Vafa Khalighi.
-In addition to the terms of LPPL any distributed version
-(unchanged or modified) of bidi has to keep the statement
-about the moral obligation for using bidi. In case of major
-changes where this would not be appropriate the author of the
-changed version should contact the copyright holder.
-
-Moral obligation for using bidi:
-____________________________________
-
-Users of bidi who wish to include or use bidi or a modified
-version in a proprietary and commercially market product are asked
-under certain conditions (see below) for the payment of a license
-fee. The size of this fee is to be determined, in each instance,
-by the commercial user, depending on his/her judgment of the value of
-bidi for his/her product.
-
-The conditions for this are as follows:
-
-The producer of a proprietary and commercially market product
-that involves typesetting using bidi is asked to determine
-the value of a license fee for using bidi if
-
- - the product is a document and the producer has decided to
- include bidi to typeset (parts of) the document or has
- directed the author of the document to include bidi (for
- example, by providing a class file to be used by the author)
-
- - the product is a LaTeX class or package that includes bidi
-
-There is no moral obligation in case
-
- - the product is a document but producer has not directed
- the author to include bidi (in that case the moral obligation
- lies with the author of the document)
-
- - the product does not involve typesetting, e.g., consists, for
- example, of distributing bidi and its documentation.
-
- - the product is not proprietary, i.e., is made available as free
- software itself (which doesn't prohibit its commercial marketing)
-
- - bidi is used for non-commercial purposes
-
-Determinating a license fee might result in a license fee of zero
-(i.e., no payment) in case a producer has determined that the use
-of bidi has no enhancing effect on the product. This is a
-plausible scenario, i.e., in the above two cases the producer is
-only asked to evaluate the value of bidi for the product
-not for the payment of a license fee per se (which might or might
-not follow from this evaluation).
-
- The license fee, if any, can be payed to the author of
- the program who can be contacted at
-
- vafakhlgh@gmail.com
-
\endpostamble
\askforoverwritefalse
\generate{\file{amsart-xetex-bidi.def}{\from{\jobname.dtx}{amsart-xetex-bidi.def}}}
@@ -119,16 +63,21 @@ not follow from this evaluation).
\generate{\file{color-xetex-bidi.def}{\from{\jobname.dtx}{color-xetex-bidi.def}}}
\generate{\file{cvthemebidicasual.sty}{\from{\jobname.dtx}{cvthemebidicasual.sty}}}
\generate{\file{cvthemebidiclassic.sty}{\from{\jobname.dtx}{cvthemebidiclassic.sty}}}
+\generate{\file{dblfnote-xetex-bidi.def}{\from{\jobname.dtx}{dblfnote-xetex-bidi.def}}}
\generate{\file{draftwatermark-xetex-bidi.def}{\from{\jobname.dtx}{draftwatermark-xetex-bidi.def}}}
+\generate{\file{empheq-xetex-bidi.def}{\from{\jobname.dtx}{empheq-xetex-bidi.def}}}
\generate{\file{extarticle-xetex-bidi.def}{\from{\jobname.dtx}{extarticle-xetex-bidi.def}}}
\generate{\file{extbook-xetex-bidi.def}{\from{\jobname.dtx}{extbook-xetex-bidi.def}}}
\generate{\file{extletter-xetex-bidi.def}{\from{\jobname.dtx}{extletter-xetex-bidi.def}}}
+\generate{\file{extrafootnotefeatures.def}{\from{\jobname.dtx}{extrafootnotefeatures.def}}}
\generate{\file{extreport-xetex-bidi.def}{\from{\jobname.dtx}{extreport-xetex-bidi.def}}}
\generate{\file{fancyhdr-xetex-bidi.def}{\from{\jobname.dtx}{fancyhdr-xetex-bidi.def}}}
\generate{\file{fleqn-xetex-bidi.def}{\from{\jobname.dtx}{fleqn-xetex-bidi.def}}}
+\generate{\file{float-xetex-bidi.def}{\from{\jobname.dtx}{float-xetex-bidi.def}}}
\generate{\file{flowfram-xetex-bidi.def}{\from{\jobname.dtx}{flowfram-xetex-bidi.def}}}
\generate{\file{footnote-luatex-bidi.def}{\from{\jobname.dtx}{footnote-luatex-bidi.def}}}
\generate{\file{footnote-xetex-bidi.def}{\from{\jobname.dtx}{footnote-xetex-bidi.def}}}
+\generate{\file{framed-xetex-bidi.def}{\from{\jobname.dtx}{framed-xetex-bidi.def}}}
\generate{\file{graphicx-xetex-bidi.def}{\from{\jobname.dtx}{graphicx-xetex-bidi.def}}}
\generate{\file{hyperref-xetex-bidi.def}{\from{\jobname.dtx}{hyperref-xetex-bidi.def}}}
\generate{\file{leqno-xetex-bidi.def}{\from{\jobname.dtx}{leqno-xetex-bidi.def}}}
@@ -171,7 +120,7 @@ not follow from this evaluation).
\generate{\file{xltxtra-xetex-bidi.def}{\from{\jobname.dtx}{xltxtra-xetex-bidi.def}}}
\endbatchfile
%%
-%% Copyright © 2009–2010 Vafa Khalighi <vafakhlgh@gmail.com>
+%% Copyright © 2009–2011 Vafa Khalighi <vafakhlgh@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
@@ -180,67 +129,6 @@ not follow from this evaluation).
%% This work is “author-maintained” (as per LPPL maintenance status)
%% by Vafa Khalighi.
%%
-%% In addition to the terms of LPPL any distributed version
-%% (unchanged or modified) of bidi has to keep the statement
-%% about the moral obligation for using bidi. In case of major
-%% changes where this would not be appropriate the author of the
-%% changed version should contact the copyright holder.
-%%
-%%
-%%
-%% Moral obligation for using bidi:
-%% ____________________________________
-%%
-%% Users of bidi who wish to include or use bidi or a modified
-%% version in a proprietary and commercially market product are asked
-%% under certain conditions (see below) for the payment of a license
-%% fee. The size of this fee is to be determined, in each instance,
-%% by the commercial user, depending on his/her judgment of the value of
-%% bidi for his/her product.
-%%
-%%
-%% The conditions for this are as follows:
-%%
-%% The producer of a proprietary and commercially market product
-%% that involves typesetting using bidi is asked to determine
-%% the value of a license fee for using bidi if
-%%
-%% - the product is a document and the producer has decided to
-%% include bidi to typeset (parts of) the document or has
-%% directed the author of the document to include bidi (for
-%% example, by providing a class file to be used by the author)
-%%
-%% - the product is a LaTeX class or package that includes bidi
-%%
-%%
-%% There is no moral obligation in case
-%%
-%% - the product is a document but producer has not directed
-%% the author to include bidi (in that case the moral obligation
-%% lies with the author of the document)
-%%
-%% - the product does not involve typesetting, e.g., consists, for
-%% example, of distributing bidi and its documentation.
-%%
-%% - the product is not proprietary, i.e., is made available as free
-%% software itself (which doesn't prohibit its commercial marketing)
-%%
-%% - bidi is used for non-commercial purposes
-%%
-%%
-%% Determinating a license fee might result in a license fee of zero
-%% (i.e., no payment) in case a producer has determined that the use
-%% of bidi has no enhancing effect on the product. This is a
-%% plausible scenario, i.e., in the above two cases the producer is
-%% only asked to evaluate the value of bidi for the product
-%% not for the payment of a license fee per se (which might or might
-%% not follow from this evaluation).
-%%
-%% The license fee, if any, can be payed to the author of
-%% the program who can be contacted at
-%%
-%% vafakhlgh@gmail.com
-%%
%%
%%
%%