summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-28 23:44:47 +0000
committerKarl Berry <karl@freefriends.org>2011-11-28 23:44:47 +0000
commiteab43500db8fdd78f70d0eaff72729a7cdaeea92 (patch)
tree20cab65274bfe78b9c235541bfbb7e43037e9d10
parent943060c95de767f07c7b00d0637d3fc96a08486f (diff)
bidi (28nov11)
git-svn-id: svn://tug.org/texlive/trunk@24680 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/bidi/README2
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidi-logo.pdf (renamed from Master/texmf-dist/tex/latex/bidi/bidi-logo.pdf)bin12525 -> 12525 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidi.pdfbin169080 -> 168827 bytes
-rw-r--r--Master/texmf-dist/source/latex/bidi/bidi.dtx189
-rw-r--r--Master/texmf-dist/tex/latex/bidi/bidi.sty4
-rw-r--r--Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def18
-rw-r--r--Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def128
-rw-r--r--Master/texmf-dist/tex/latex/bidi/xetex-bidi.def22
9 files changed, 150 insertions, 215 deletions
diff --git a/Master/texmf-dist/doc/latex/bidi/README b/Master/texmf-dist/doc/latex/bidi/README
index 7c65e9db375..d103265efe9 100644
--- a/Master/texmf-dist/doc/latex/bidi/README
+++ b/Master/texmf-dist/doc/latex/bidi/README
@@ -1,6 +1,6 @@
___________________
The bidi package
-v11.147
+v11.150
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX.
diff --git a/Master/texmf-dist/tex/latex/bidi/bidi-logo.pdf b/Master/texmf-dist/doc/latex/bidi/bidi-logo.pdf
index 700321cee9a..700321cee9a 100644
--- a/Master/texmf-dist/tex/latex/bidi/bidi-logo.pdf
+++ b/Master/texmf-dist/doc/latex/bidi/bidi-logo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/bidi.pdf b/Master/texmf-dist/doc/latex/bidi/bidi.pdf
index 99f92fc3cbd..cddb2e1b1b1 100644
--- a/Master/texmf-dist/doc/latex/bidi/bidi.pdf
+++ b/Master/texmf-dist/doc/latex/bidi/bidi.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/bidi/bidi.dtx b/Master/texmf-dist/source/latex/bidi/bidi.dtx
index 8f0c5db2e2d..c8821ef0a1b 100644
--- a/Master/texmf-dist/source/latex/bidi/bidi.dtx
+++ b/Master/texmf-dist/source/latex/bidi/bidi.dtx
@@ -5,7 +5,7 @@
%<*readme>
___________________
The bidi package
-v11.147
+v11.150
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX.
@@ -192,7 +192,6 @@ by Vafa Khalighi.
\usepackage{bbding}
\usepackage{bidicode}
\usepackage{graphicx}
-\newcommand{\bidilogo}[1][]{\includegraphics[#1]{bidi-logo}}
\usepackage[numbered]{hypdoc}
\hypersetup{pdftitle={The \textsf{bidi} Package (Support for bidirectional typesetting in plain \TeX{} and \LaTeXe)},pdfauthor={Vafa Khalighi <vafaklg@gmail.com>}}
\setlength\columnseprule{.4pt}
@@ -234,11 +233,11 @@ by Vafa Khalighi.
% \CheckSum{0}
% \makeatletter
% \title{The \textsf{bidi} Package\\[10pt]
-% \bidilogo[width=0.5\textwidth]\\[10pt]
+% \includegraphics[width=0.5\textwidth]{bidi-logo}\\[10pt]
% Support for bidirectional typesetting in plain \TeX{} and \LaTeXe}
% \author{Vafa Khalighi\\
% \url{vafaklg@gmail.com}}
-% \date{\today\qquad Version 11.147}
+% \date{\today\qquad Version 11.150}
%\maketitle
% \tableofcontents
%\section*{Introduction}
@@ -253,7 +252,7 @@ by Vafa Khalighi.
%in plain TeX and LaTeX. The package includes adaptations for use
%with many other commonly-used packages.
%Copyright (c) 2009-2012 Vafa Khalighi
-%v11.147, 2012/01/01
+%v11.150, 2012/01/01
%License: LaTeX Project Public License, version 1.3c or higher (your choice)
%Location on CTAN: /macros/latex/contrib/bidi
%\end{lstlisting}
@@ -297,11 +296,7 @@ by Vafa Khalighi.
%\end{lstlisting}
%\end{enumerate}
%\subsection{\textsf{bidi}'s Symbol}
-% As you may know lion symbolizes \TeX{} but lion does not symbolizes \textsf{bidi}. \textbf{Simorgh}\footnote{\textbf{Simorgh} is an Iranian benevolent, mythical flying creature which has been shown on the titlepage of this documentation. For more details see \url{http://en.wikipedia.org/wiki/Simurgh}} symbolizes \textsf{bidi}.
-%\begin{BDef}
-%\Lcs{bidilogo}\OptArgs
-%\end{BDef}
-% \Lcs{bidilogo} will typeset \textsf{bidi}'s symbol (\textbf{Simorgh}) where \OptArgs{} are the \OptArgs{} of \Lcs{includegraphics} command.
+% As you may know lion symbolizes \TeX{} but lion does not symbolizes \textsf{bidi}. \textbf{Simorgh}\footnote{\textbf{Simorgh} is an Iranian benevolent, mythical flying creature which has been shown on the titlepage of this documentation. For more details see \url{http://en.wikipedia.org/wiki/Simurgh}} (shown on the first page of this documentation) symbolizes \textsf{bidi}.
%\subsection{Version of \textsf{bidi} package}
% Version of \textsf{bidi} package tends to \textbf{12} and finally, the version number of \textsf{bidi} package becomes \textbf{12}\footnote{This is because number \textbf{12} has been a sacred number between Iranians since ancient times. For instance, in the battles of Rostam against Keykavous, Esfandyar against Arjasp, Goudarz for the revenge of Siavash, and Bahram Mehran (Chobineh) against Turks, the number of Iranian army were 12000 and in all these battles, Iranians defeated enemy.}.
%\subsection{Commands for Version number, and Date of The Package}
@@ -2532,7 +2527,7 @@ by Vafa Khalighi.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\def\bididate{2012/01/01}
-\def\bidiversion{v11.147}
+\def\bidiversion{v11.150}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\bidiinfo{%
@@ -2547,7 +2542,6 @@ Location on CTAN: /macros/latex/contrib/bidi}
\typeout{\bidiinfo}
\edef\bidi@everyjob{\the\everyjob}
\everyjob{\bidi@everyjob\typeout{\bidiinfo}}
-\RequirePackage{graphicx}
\RequirePackage{iftex}
\RequirePackage{biditools}
\eqnewif{\if@RTLmain}{\if@rlmain}
@@ -2591,7 +2585,6 @@ Location on CTAN: /macros/latex/contrib/bidi}
\fi
\input{loadingorder-bidi.def}
\ProcessOptions
-\newcommand{\bidilogo}[1][]{\includegraphics[#1]{bidi-logo}}
% \end{macrocode}
% \iffalse
%</bidi.sty>
@@ -7942,9 +7935,15 @@ bidi implementation of tufte title]
\newinsert\@mpfootinsv@r
\bidi@ensure@newcommand{\mp@footgroupv@r}{}
\newcount\m@m@k \newdimen\m@m@h
+\@ifpackageloaded{multicol}{%
\bidi@ensure@newcommand*{\m@mrigidbalance}[3]{\setbox0=\box#1 \m@m@k=#2 \m@m@h=#3
+ \hsize\textwidth
\@@line{\if@RTLcolumnfootnotes\beginR\fi\splittopskip=\m@m@h \vbadness=\@M \hfilneg
\valign{##\vfill\cr\m@mdosplits}\if@RTLcolumnfootnotes\endR\fi}}
+}{%
+\bidi@ensure@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}}}
\bidi@ensure@newcommand*{\m@mdosplits}{\ifnum\m@m@k>0 \noalign{\hfil}\m@msplitoff
\global\advance\m@m@k-1\cr\m@mdosplits\fi}
\bidi@ensure@newcommand*{\m@msplitoff}{\dimen0=\ht0
@@ -9285,8 +9284,10 @@ bidi implementation of tufte title]
\bidi@ensure@newcommand*{\m@minterparanoteglue}[1]{%
{\foottextfont\global\m@mipn@skip=#1\relax}}
\m@minterparanoteglue{1em plus.4em minus.4em}
+\@ifpackageloaded{multicol}{%
\bidi@ensure@newcommand*{\m@mmakehboxofhboxes}{%
\if@parafootRTL\@RTLtrue\else\@RTLfalse\fi%
+ \hsize\textwidth%
\setbox0=\hbox{}%
\loop
\unpenalty
@@ -9294,6 +9295,16 @@ bidi implementation of tufte title]
\ifhbox2
\setbox0=\hbox{\box2\unhbox0}
\repeat}
+}{%
+\bidi@ensure@newcommand*{\m@mmakehboxofhboxes}{%
+ \if@parafootRTL\@RTLtrue\else\@RTLfalse\fi%
+ \setbox0=\hbox{}%
+ \loop
+ \unpenalty
+ \setbox2=\lastbox
+ \ifhbox2
+ \setbox0=\hbox{\box2\unhbox0}
+ \repeat}}
\bidi@ensure@newcommand*{\m@mremovehboxes}{\setbox0=\lastbox
\ifhbox0{\m@mremovehboxes}\unhbox0 \fi}
\bidi@ensure@newcommand*{\footfudgefiddle}{64}
@@ -9965,7 +9976,7 @@ bidi implementation of tufte title]
\def\left@footnote{%
\hrule width .4\columnwidth\kern 2.6\p@}
\def\textwidth@footnote{\kern-3\p@
- \hrule \@width \textwidth \kern 2.6\p@}
+ \hrule \@width \columnwidth \kern 2.6\p@}
\def\right@footnoterule{\bidi@footnote@output\right@footnote\global\let\bidi@footnoterule\relax}
\def\left@footnoterule{\bidi@footnote@output\left@footnote\global\let\bidi@footnoterule\relax}
\def\textwidth@footnoterule{\bidi@footnote@output\textwidth@footnote\global\let\bidi@footnoterule\relax}
@@ -11712,7 +11723,7 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{multicol-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{multicol-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for multicol package for XeTeX engine]
+\ProvidesFile{multicol-xetex-bidi.def}[2011/11/18 v0.2 bidi adaptations for multicol package for XeTeX engine]
\def\revprocess@cols#1#2{\count@\doublecol@number\relax
\advance\count@ by -2
\loop #2%
@@ -11770,94 +11781,52 @@ bidi implementation of tufte title]
Grid alignment might be broken}%
\fi
}
+\def\multicols#1{\col@number#1\relax
+ \ifnum\col@number<\tw@
+ \PackageWarning{multicol}%
+ {Using `\number\col@number'
+ columns doesn't seem a good idea.^^J
+ I therefore use two columns instead}%
+ \col@number\tw@ \fi
+ \ifnum\col@number>10
+ \PackageError{multicol}%
+ {Too many columns}%
+ {Current implementation doesn't
+ support more than 10 columns.%
+ \MessageBreak
+ I therefore use 10 columns instead}%
+ \col@number10 \fi
+ \ifx\@footnotetext\mult@footnotetext\else
+ \let\orig@footnotetext\@footnotetext
+ \let\@footnotetext\mult@footnotetext
+ \fi
+ \ifx\@LTRfootnotetext\mult@LTRfootnotetext\else
+ \let\orig@LTRfootnotetext\@LTRfootnotetext
+ \let\@LTRfootnotetext\mult@LTRfootnotetext
+ \fi
+ \ifx\@RTLfootnotetext\mult@RTLfootnotetext\else
+ \let\orig@RTLfootnotetext\@RTLfootnotetext
+ \let\@RTLfootnotetext\mult@RTLfootnotetext
+ \fi
+ \@ifnextchar[\mult@cols{\mult@cols[]}}
+\long\def\mult@footnotetext#1{\begingroup
+ \hsize\textwidth
+ \columnwidth\textwidth
+ \orig@footnotetext{#1}\endgroup}
+\long\def\mult@LTRfootnotetext#1{\begingroup
+ \hsize\textwidth
+ \columnwidth\textwidth
+ \orig@LTRfootnotetext{#1}\endgroup}
+\long\def\mult@RTLfootnotetext#1{\begingroup
+ \hsize\textwidth
+ \columnwidth\textwidth
+ \orig@RTLfootnotetext{#1}\endgroup}
\def\right@footnote{%
\hbox to \textwidth
{\beginR \vbox{\kern -3\p@
\hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}
-\long\def\@footnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi\reset@font\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\textwidth \@parboxrestore
- \bidi@footnotetext@dir{#1}%
- \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
- {\rule{\z@}{\footnotesep}\ignorespaces\if@RTL@footnote#1\else\rmfamily#1\fi\strut}}%
- \bidi@footnotetext@after
- \insert\footins{\unvbox\footins}%
- \endgroup}
-\long\def\@RTLfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLtrue\reset@font\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\textwidth \@parboxrestore
- \bidi@footnotetext@dir{#1}%
- \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
- {\rule{\z@}{\footnotesep}\ignorespaces #1\strut}}%
- \bidi@footnotetext@after
- \insert\footins{\unvbox\footins}%
- \endgroup}
-\long\def\@LTRfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLfalse\reset@font\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\textwidth \@parboxrestore
- \bidi@footnotetext@dir{#1}%
- \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
- {\rule{\z@}{\footnotesep}\ignorespaces\rmfamily #1\strut}}%
- \bidi@footnotetext@after
- \insert\footins{\unvbox\footins}%
- \endgroup}
-\long\def\@mpRTLfootnotetext#1{%
- \global\setbox\@mpfootins\vbox{\@RTLtrue%
- \unvbox\@mpfootins
- \reset@font\footnotesize
- \hsize\textwidth
- \@parboxrestore
- \protected@edef\@currentlabel
- {\csname p@mpfootnote\endcsname\@thefnmark}%
- \color@begingroup
- \bidi@footnotetext@dir{#1}
- \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
- \color@endgroup}}
-\long\def\@mpLTRfootnotetext#1{%
- \global\setbox\@mpfootins\vbox{\@RTLfalse%
- \unvbox\@mpfootins
- \reset@font\footnotesize
- \hsize\textwidth
- \@parboxrestore
- \protected@edef\@currentlabel
- {\csname p@mpfootnote\endcsname\@thefnmark}%
- \color@begingroup
- \bidi@footnotetext@dir{#1}
- \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\rmfamily#1\@finalstrut\strutbox}%
- \color@endgroup}}
-\long\def\@mpfootnotetext#1{%
- \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
- \unvbox\@mpfootins
- \reset@font\footnotesize
- \hsize\textwidth
- \@parboxrestore
- \protected@edef\@currentlabel
- {\csname p@mpfootnote\endcsname\@thefnmark}%
- \color@begingroup
- \bidi@footnotetext@dir{#1}
- \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\rmfamily#1\fi\@finalstrut\strutbox}%
- \color@endgroup}}
+\def\textwidth@footnote{\kern-3\p@
+ \hrule \@width \textwidth \kern 2.6\p@}
% \end{macrocode}
% \iffalse
%</multicol-xetex-bidi.def>
@@ -16151,20 +16120,12 @@ bidi implementation of tufte title]
\ignorespaces}{\endtrivlist}
\def\raggedright{%
\let\\\@centercr
- \leftskip\z@skip\rightskip\@flushglue
- \parindent\z@\parfillskip\z@skip}
-\let\@@raggedleft=\raggedleft
-\let\@@raggedright=\raggedright
-\renewcommand\raggedleft{\if@RTL\@@raggedright%
- \else\@@raggedleft\fi}
-\renewcommand\raggedright{\if@RTL\@@raggedleft%
- \else\@@raggedright\fi}
-\def\raggedright{%
- \let\\\@centercr
\rightskip\z@skip\rightskip\@flushglue
\parindent\z@\parfillskip\z@skip}
-\renewcommand\raggedleft{\@@raggedleft}
-\renewcommand\raggedright{\@@raggedright}
+\let\bidi@orig@raggedleft\raggedleft
+\let\bidi@orig@raggedright\raggedright
+\renewcommand\raggedleft{\if@bidi@list@minipage@parbox\bidi@orig@raggedright\else\if@RTLtab\bidi@orig@raggedright\else\bidi@orig@raggedleft\fi\fi}
+\renewcommand\raggedright{\if@bidi@list@minipage@parbox\bidi@orig@raggedleft\else\if@RTLtab\bidi@orig@raggedleft\else\bidi@orig@raggedright\fi\fi}
\newcommand{\bidi@raggedright}{\if@RTL\raggedleft\else\raggedright\fi}
\newcommand{\bidi@raggedleft}{\if@RTL\raggedright\else\raggedleft\fi}
\def\centerline#1{%
@@ -16176,6 +16137,10 @@ bidi implementation of tufte title]
\def\rightline#1{%
\if@RTL\@@line{\hss\beginR#1\endR}
\else\@@line{\hss#1}\fi}
+\let\bidi@orig@leftline\leftline
+\let\bidi@orig@rightline\rightline
+\def\leftline#1{\ifhmode\if@RTL\bidi@orig@rightline{#1}\else\bidi@orig@leftline{#1}\fi\else\if@bidi@list@minipage@parbox\bidi@orig@rightline{#1}\else\if@RTLtab\bidi@orig@rightline{#1}\else\bidi@orig@leftline{#1}\fi\fi\fi}
+\def\rightline#1{\ifhmode\if@RTL\bidi@orig@leftline{#1}\else\bidi@orig@rightline{#1}\fi\else\if@bidi@list@minipage@parbox\bidi@orig@leftline{#1}\else\if@RTLtab\bidi@orig@leftline{#1}\else\bidi@orig@rightline{#1}\fi\fi\fi}
\def\bidirlap#1{\hb@xt@\z@{\if@RTL\hss\fi#1\if@RTL\else\hss\fi}}
\def\bidillap#1{\hb@xt@\z@{\if@RTL\else\hss\fi#1\if@RTL\hss\fi}}
\def\@hangfrom#1{\setbox\@tempboxa\hbox{{#1}}%
@@ -16524,7 +16489,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\expandafter{\the\everydisplay\predisplaydirection=0 }
+\everydisplay\expandafter{\the\everydisplay\if@bidi@list@minipage@parbox\predisplaydirection=1\else\if@RTLtab\predisplaydirection=1\else\predisplaydirection=0\fi\fi }
\def\@eqnnum{{\normalfont \normalcolor \if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}
\input{footnote-xetex-bidi.def}
\@ifclassloaded{article}{\@ifclassloaded{svmult}{}{\input{article-xetex-bidi.def}}}{}
diff --git a/Master/texmf-dist/tex/latex/bidi/bidi.sty b/Master/texmf-dist/tex/latex/bidi/bidi.sty
index 51421af11b6..e442be44b8d 100644
--- a/Master/texmf-dist/tex/latex/bidi/bidi.sty
+++ b/Master/texmf-dist/tex/latex/bidi/bidi.sty
@@ -14,7 +14,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\def\bididate{2012/01/01}
-\def\bidiversion{v11.147}
+\def\bidiversion{v11.150}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\bidiinfo{%
@@ -29,7 +29,6 @@ Location on CTAN: /macros/latex/contrib/bidi}
\typeout{\bidiinfo}
\edef\bidi@everyjob{\the\everyjob}
\everyjob{\bidi@everyjob\typeout{\bidiinfo}}
-\RequirePackage{graphicx}
\RequirePackage{iftex}
\RequirePackage{biditools}
\eqnewif{\if@RTLmain}{\if@rlmain}
@@ -73,7 +72,6 @@ Location on CTAN: /macros/latex/contrib/bidi}
\fi
\input{loadingorder-bidi.def}
\ProcessOptions
-\newcommand{\bidilogo}[1][]{\includegraphics[#1]{bidi-logo}}
%%
%% Copyright © 2009–2012 Vafa Khalighi <vafaklg@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def b/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def
index d8b03a322b5..ada72ce743e 100644
--- a/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def
+++ b/Master/texmf-dist/tex/latex/bidi/extrafootnotefeatures.def
@@ -219,9 +219,15 @@
\newinsert\@mpfootinsv@r
\bidi@ensure@newcommand{\mp@footgroupv@r}{}
\newcount\m@m@k \newdimen\m@m@h
+\@ifpackageloaded{multicol}{%
\bidi@ensure@newcommand*{\m@mrigidbalance}[3]{\setbox0=\box#1 \m@m@k=#2 \m@m@h=#3
+ \hsize\textwidth
\@@line{\if@RTLcolumnfootnotes\beginR\fi\splittopskip=\m@m@h \vbadness=\@M \hfilneg
\valign{##\vfill\cr\m@mdosplits}\if@RTLcolumnfootnotes\endR\fi}}
+}{%
+\bidi@ensure@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}}}
\bidi@ensure@newcommand*{\m@mdosplits}{\ifnum\m@m@k>0 \noalign{\hfil}\m@msplitoff
\global\advance\m@m@k-1\cr\m@mdosplits\fi}
\bidi@ensure@newcommand*{\m@msplitoff}{\dimen0=\ht0
@@ -1562,8 +1568,10 @@
\bidi@ensure@newcommand*{\m@minterparanoteglue}[1]{%
{\foottextfont\global\m@mipn@skip=#1\relax}}
\m@minterparanoteglue{1em plus.4em minus.4em}
+\@ifpackageloaded{multicol}{%
\bidi@ensure@newcommand*{\m@mmakehboxofhboxes}{%
\if@parafootRTL\@RTLtrue\else\@RTLfalse\fi%
+ \hsize\textwidth%
\setbox0=\hbox{}%
\loop
\unpenalty
@@ -1571,6 +1579,16 @@
\ifhbox2
\setbox0=\hbox{\box2\unhbox0}
\repeat}
+}{%
+\bidi@ensure@newcommand*{\m@mmakehboxofhboxes}{%
+ \if@parafootRTL\@RTLtrue\else\@RTLfalse\fi%
+ \setbox0=\hbox{}%
+ \loop
+ \unpenalty
+ \setbox2=\lastbox
+ \ifhbox2
+ \setbox0=\hbox{\box2\unhbox0}
+ \repeat}}
\bidi@ensure@newcommand*{\m@mremovehboxes}{\setbox0=\lastbox
\ifhbox0{\m@mremovehboxes}\unhbox0 \fi}
\bidi@ensure@newcommand*{\footfudgefiddle}{64}
diff --git a/Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def
index 08722ce35ac..5aa0a681878 100644
--- a/Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def
@@ -46,7 +46,7 @@
\def\left@footnote{%
\hrule width .4\columnwidth\kern 2.6\p@}
\def\textwidth@footnote{\kern-3\p@
- \hrule \@width \textwidth \kern 2.6\p@}
+ \hrule \@width \columnwidth \kern 2.6\p@}
\def\right@footnoterule{\bidi@footnote@output\right@footnote\global\let\bidi@footnoterule\relax}
\def\left@footnoterule{\bidi@footnote@output\left@footnote\global\let\bidi@footnoterule\relax}
\def\textwidth@footnoterule{\bidi@footnote@output\textwidth@footnote\global\let\bidi@footnoterule\relax}
diff --git a/Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def
index ab9b5daf6a2..c55abc9b373 100644
--- a/Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/multicol-xetex-bidi.def
@@ -12,7 +12,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{multicol-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for multicol package for XeTeX engine]
+\ProvidesFile{multicol-xetex-bidi.def}[2011/11/18 v0.2 bidi adaptations for multicol package for XeTeX engine]
\def\revprocess@cols#1#2{\count@\doublecol@number\relax
\advance\count@ by -2
\loop #2%
@@ -70,94 +70,52 @@
Grid alignment might be broken}%
\fi
}
+\def\multicols#1{\col@number#1\relax
+ \ifnum\col@number<\tw@
+ \PackageWarning{multicol}%
+ {Using `\number\col@number'
+ columns doesn't seem a good idea.^^J
+ I therefore use two columns instead}%
+ \col@number\tw@ \fi
+ \ifnum\col@number>10
+ \PackageError{multicol}%
+ {Too many columns}%
+ {Current implementation doesn't
+ support more than 10 columns.%
+ \MessageBreak
+ I therefore use 10 columns instead}%
+ \col@number10 \fi
+ \ifx\@footnotetext\mult@footnotetext\else
+ \let\orig@footnotetext\@footnotetext
+ \let\@footnotetext\mult@footnotetext
+ \fi
+ \ifx\@LTRfootnotetext\mult@LTRfootnotetext\else
+ \let\orig@LTRfootnotetext\@LTRfootnotetext
+ \let\@LTRfootnotetext\mult@LTRfootnotetext
+ \fi
+ \ifx\@RTLfootnotetext\mult@RTLfootnotetext\else
+ \let\orig@RTLfootnotetext\@RTLfootnotetext
+ \let\@RTLfootnotetext\mult@RTLfootnotetext
+ \fi
+ \@ifnextchar[\mult@cols{\mult@cols[]}}
+\long\def\mult@footnotetext#1{\begingroup
+ \hsize\textwidth
+ \columnwidth\textwidth
+ \orig@footnotetext{#1}\endgroup}
+\long\def\mult@LTRfootnotetext#1{\begingroup
+ \hsize\textwidth
+ \columnwidth\textwidth
+ \orig@LTRfootnotetext{#1}\endgroup}
+\long\def\mult@RTLfootnotetext#1{\begingroup
+ \hsize\textwidth
+ \columnwidth\textwidth
+ \orig@RTLfootnotetext{#1}\endgroup}
\def\right@footnote{%
\hbox to \textwidth
{\beginR \vbox{\kern -3\p@
\hrule width .4\columnwidth \kern2.6\p@}\hfil\endR}}
-\long\def\@footnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi\reset@font\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\textwidth \@parboxrestore
- \bidi@footnotetext@dir{#1}%
- \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
- {\rule{\z@}{\footnotesep}\ignorespaces\if@RTL@footnote#1\else\rmfamily#1\fi\strut}}%
- \bidi@footnotetext@after
- \insert\footins{\unvbox\footins}%
- \endgroup}
-\long\def\@RTLfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLtrue\reset@font\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\textwidth \@parboxrestore
- \bidi@footnotetext@dir{#1}%
- \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
- {\rule{\z@}{\footnotesep}\ignorespaces #1\strut}}%
- \bidi@footnotetext@after
- \insert\footins{\unvbox\footins}%
- \endgroup}
-\long\def\@LTRfootnotetext#1{%
- \begingroup
- \setbox\footins
- \vbox{\@RTLfalse\reset@font\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\textwidth \@parboxrestore
- \bidi@footnotetext@dir{#1}%
- \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
- {\rule{\z@}{\footnotesep}\ignorespaces\rmfamily #1\strut}}%
- \bidi@footnotetext@after
- \insert\footins{\unvbox\footins}%
- \endgroup}
-\long\def\@mpRTLfootnotetext#1{%
- \global\setbox\@mpfootins\vbox{\@RTLtrue%
- \unvbox\@mpfootins
- \reset@font\footnotesize
- \hsize\textwidth
- \@parboxrestore
- \protected@edef\@currentlabel
- {\csname p@mpfootnote\endcsname\@thefnmark}%
- \color@begingroup
- \bidi@footnotetext@dir{#1}
- \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
- \color@endgroup}}
-\long\def\@mpLTRfootnotetext#1{%
- \global\setbox\@mpfootins\vbox{\@RTLfalse%
- \unvbox\@mpfootins
- \reset@font\footnotesize
- \hsize\textwidth
- \@parboxrestore
- \protected@edef\@currentlabel
- {\csname p@mpfootnote\endcsname\@thefnmark}%
- \color@begingroup
- \bidi@footnotetext@dir{#1}
- \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\rmfamily#1\@finalstrut\strutbox}%
- \color@endgroup}}
-\long\def\@mpfootnotetext#1{%
- \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
- \unvbox\@mpfootins
- \reset@font\footnotesize
- \hsize\textwidth
- \@parboxrestore
- \protected@edef\@currentlabel
- {\csname p@mpfootnote\endcsname\@thefnmark}%
- \color@begingroup
- \bidi@footnotetext@dir{#1}
- \ifnum\c@mpfootnote=1\if@RTL\global\let\bidi@footnoterule\right@footnote\else\global\let\bidi@footnoterule\left@footnote\fi\fi
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\rmfamily#1\fi\@finalstrut\strutbox}%
- \color@endgroup}}
+\def\textwidth@footnote{\kern-3\p@
+ \hrule \@width \textwidth \kern 2.6\p@}
%%
%% Copyright © 2009–2012 Vafa Khalighi <vafaklg@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
index 01c45a539d6..4294c2eec89 100644
--- a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
@@ -279,20 +279,12 @@
\ignorespaces}{\endtrivlist}
\def\raggedright{%
\let\\\@centercr
- \leftskip\z@skip\rightskip\@flushglue
- \parindent\z@\parfillskip\z@skip}
-\let\@@raggedleft=\raggedleft
-\let\@@raggedright=\raggedright
-\renewcommand\raggedleft{\if@RTL\@@raggedright%
- \else\@@raggedleft\fi}
-\renewcommand\raggedright{\if@RTL\@@raggedleft%
- \else\@@raggedright\fi}
-\def\raggedright{%
- \let\\\@centercr
\rightskip\z@skip\rightskip\@flushglue
\parindent\z@\parfillskip\z@skip}
-\renewcommand\raggedleft{\@@raggedleft}
-\renewcommand\raggedright{\@@raggedright}
+\let\bidi@orig@raggedleft\raggedleft
+\let\bidi@orig@raggedright\raggedright
+\renewcommand\raggedleft{\if@bidi@list@minipage@parbox\bidi@orig@raggedright\else\if@RTLtab\bidi@orig@raggedright\else\bidi@orig@raggedleft\fi\fi}
+\renewcommand\raggedright{\if@bidi@list@minipage@parbox\bidi@orig@raggedleft\else\if@RTLtab\bidi@orig@raggedleft\else\bidi@orig@raggedright\fi\fi}
\newcommand{\bidi@raggedright}{\if@RTL\raggedleft\else\raggedright\fi}
\newcommand{\bidi@raggedleft}{\if@RTL\raggedright\else\raggedleft\fi}
\def\centerline#1{%
@@ -304,6 +296,10 @@
\def\rightline#1{%
\if@RTL\@@line{\hss\beginR#1\endR}
\else\@@line{\hss#1}\fi}
+\let\bidi@orig@leftline\leftline
+\let\bidi@orig@rightline\rightline
+\def\leftline#1{\ifhmode\if@RTL\bidi@orig@rightline{#1}\else\bidi@orig@leftline{#1}\fi\else\if@bidi@list@minipage@parbox\bidi@orig@rightline{#1}\else\if@RTLtab\bidi@orig@rightline{#1}\else\bidi@orig@leftline{#1}\fi\fi\fi}
+\def\rightline#1{\ifhmode\if@RTL\bidi@orig@leftline{#1}\else\bidi@orig@rightline{#1}\fi\else\if@bidi@list@minipage@parbox\bidi@orig@leftline{#1}\else\if@RTLtab\bidi@orig@leftline{#1}\else\bidi@orig@rightline{#1}\fi\fi\fi}
\def\bidirlap#1{\hb@xt@\z@{\if@RTL\hss\fi#1\if@RTL\else\hss\fi}}
\def\bidillap#1{\hb@xt@\z@{\if@RTL\else\hss\fi#1\if@RTL\hss\fi}}
\def\@hangfrom#1{\setbox\@tempboxa\hbox{{#1}}%
@@ -652,7 +648,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\expandafter{\the\everydisplay\predisplaydirection=0 }
+\everydisplay\expandafter{\the\everydisplay\if@bidi@list@minipage@parbox\predisplaydirection=1\else\if@RTLtab\predisplaydirection=1\else\predisplaydirection=0\fi\fi }
\def\@eqnnum{{\normalfont \normalcolor \if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}
\input{footnote-xetex-bidi.def}
\@ifclassloaded{article}{\@ifclassloaded{svmult}{}{\input{article-xetex-bidi.def}}}{}