summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-15 23:19:04 +0000
committerKarl Berry <karl@freefriends.org>2010-04-15 23:19:04 +0000
commit8369ad5a44fba9e4154c1a9d2e12b68bd53d35e5 (patch)
treefa10280aa5ff26827700bff52d2f5f219d49575b
parentd76b75890bbe6fcc8e7417b910a6e548a7a5fe42 (diff)
bidi update (14apr10)
git-svn-id: svn://tug.org/texlive/trunk@17886 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/bidi/README5
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidi-doc.pdfbin179210 -> 177486 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidi-doc.tex30
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidi.tex72
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidisample2e.pdfbin39027 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidismall2e.pdfbin16532 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/presentation-sample.pdfbin39748 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-arydshln.pdfbin11023 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-bidi.pdfbin16009 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-brochure.pdfbin52113 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-casualcv.pdfbin59545 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-classiccv.pdfbin57591 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-color.pdfbin23982 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-supertabular.pdfbin24818 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-tabular.pdfbin24715 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-tabularx.pdfbin18883 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-tabulary.pdfbin11034 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test1-colortbl.pdfbin18966 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test1-wrapfig.pdfbin10310 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test2-colortbl.pdfbin27868 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test2-wrapfig.pdfbin7437 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test3-wrapfig.pdfbin773628 -> 0 bytes
-rw-r--r--Master/texmf-dist/tex/latex/bidi/amsbook-xetex-bidi.def14
-rw-r--r--Master/texmf-dist/tex/latex/bidi/article-xetex-bidi.def26
-rw-r--r--Master/texmf-dist/tex/latex/bidi/bidi.sty4
-rw-r--r--Master/texmf-dist/tex/latex/bidi/bidicode.sty10
-rw-r--r--Master/texmf-dist/tex/latex/bidi/book-xetex-bidi.def27
-rw-r--r--Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/latex/bidi/hyperref-xetex-bidi.def3
-rw-r--r--Master/texmf-dist/tex/latex/bidi/letter-xetex-bidi.def12
-rw-r--r--Master/texmf-dist/tex/latex/bidi/plain-luatex-bidi.def26
-rw-r--r--Master/texmf-dist/tex/latex/bidi/plain-xetex-bidi.def107
-rw-r--r--Master/texmf-dist/tex/latex/bidi/refrep-xetex-bidi.def30
-rw-r--r--Master/texmf-dist/tex/latex/bidi/report-xetex-bidi.def27
-rw-r--r--Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def14
-rw-r--r--Master/texmf-dist/tex/latex/bidi/scrbook-xetex-bidi.def14
-rw-r--r--Master/texmf-dist/tex/latex/bidi/scrreprt-xetex-bidi.def14
-rw-r--r--Master/texmf-dist/tex/latex/bidi/xetex-bidi.def81
38 files changed, 439 insertions, 79 deletions
diff --git a/Master/texmf-dist/doc/latex/bidi/README b/Master/texmf-dist/doc/latex/bidi/README
index 495d53ba8c5..b141a8d2f67 100644
--- a/Master/texmf-dist/doc/latex/bidi/README
+++ b/Master/texmf-dist/doc/latex/bidi/README
@@ -1,11 +1,12 @@
_________________
The bidi package
-v1.0.7
+v1.0.8
This package provides a convenient interface for typesetting
bidirectional texts with XeLaTeX and LuaLaTeX.
-This version fixes all the bugs that were present in v1.0.6.
+This version adds partial support for Plain TeX too and
+in addition fixes all the bugs that were present in v1.0.7.
______________
Vafa Khalighi
diff --git a/Master/texmf-dist/doc/latex/bidi/bidi-doc.pdf b/Master/texmf-dist/doc/latex/bidi/bidi-doc.pdf
index 7bd6a801915..039d0cb11e5 100644
--- a/Master/texmf-dist/doc/latex/bidi/bidi-doc.pdf
+++ b/Master/texmf-dist/doc/latex/bidi/bidi-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/bidi-doc.tex b/Master/texmf-dist/doc/latex/bidi/bidi-doc.tex
index b3eefba7cf8..06cf929404d 100644
--- a/Master/texmf-dist/doc/latex/bidi/bidi-doc.tex
+++ b/Master/texmf-dist/doc/latex/bidi/bidi-doc.tex
@@ -21,7 +21,7 @@
\newcommand\LuaLaTeX{Lua\LaTeX}
\title{The \textsf{bidi} Package\\ \href{http://bitbucket.org/vafa/bidi}{\texttt{http://bitbucket.org/vafa/bidi}}}
\author{Vafa Khalighi\\ \href{mailto:vafakh84@gmail.com}{\texttt{vafakh84@gmail.com}}}
-\date{Version 1.0.7}
+\date{Version 1.0.8}
\begin{document}
\maketitle
\tableofcontents
@@ -37,7 +37,7 @@ Description: A convenient interface for typesetting bidirectional
texts with XeLaTeX and LuaLaTeX. The package includes adaptations for use
with many other commonly-used packages.
Copyright (c) 2009-2010 Vafa Khalighi
-v1.0.7, <commit 24>, 2010/07/25
+v1.0.8, <commit 25>, 2010/07/25
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
@@ -276,29 +276,13 @@ x^2+y^2=z^2
\Lcs{raggedright} command and \texttt{flushleft} environment put the text on the left hand side and \Lcs{raggedleft} command and \texttt{flushright} environment put the text on the right hand side, independent on the current mode.
\subsection{Primitive-like commands}
\begin{BDef}
-\Lcs{hboxR}\quad\Lcs{hboxL}\quad\Lcs{halignR}\quad\Lcs{halignL}
+\Lcs{hboxR}\quad\Lcs{hboxL}\quad\Lcs{vboxR}\quad\Lcs{vboxL}
\end{BDef}
\begin{itemize}
-\item The syntax of \Lcs{hboxR} is similar to the syntax of \Lcs{hbox} with two differences:
-\begin{enumerate}
-\item The content of \Lcs{hboxR} is always typeset RTL, independent of the current mode (LTR or RTL).
-\item \Lcs{hboxR} does not accept \Lcs{bgroup} and \Lcs{egroup}.
-\end{enumerate}
-\item The syntax of \Lcs{hboxL} is similar to the syntax of \Lcs{hbox} with two differences:
-\begin{enumerate}
-\item The content of \Lcs{hboxL} is always typeset LTR, independent of the current mode (LTR or RTL).
-\item \Lcs{hboxL} does not accept \Lcs{bgroup} and \Lcs{egroup}.
-\end{enumerate}
-\item The syntax of \Lcs{halignR} is similar to the syntax of \Lcs{halign} with two differences:
-\begin{enumerate}
-\item The content of \Lcs{halignR} is always typeset RTL, independent of the current mode (LTR or RTL).
-\item \Lcs{halignR} does not accept \Lcs{bgroup} and \Lcs{egroup}.
-\end{enumerate}
-\item The syntax of \Lcs{halignL} is similar to the syntax of \Lcs{halign} with two differences:
-\begin{enumerate}
-\item The content of \Lcs{halignL} is always typeset LTR, independent of the current mode (LTR or RTL).
-\item \Lcs{halignL} does not accept \Lcs{bgroup} and \Lcs{egroup}.
-\end{enumerate}
+\item The syntax of \Lcs{hboxR} is exatly the same as the syntax of \Lcs{hbox}, but its contents is always typeset RTL.
+\item The syntax of \Lcs{hboxL} is exatly the same as the syntax of \Lcs{hbox}, but its contents is always typeset LTR.
+\item The syntax of \Lcs{vboxR} is exatly the same as the syntax of \Lcs{vbox}, but its contents is always typeset RTL.
+\item The syntax of \Lcs{vboxL} is exatly the same as the syntax of \Lcs{vbox}, but its contents is always typeset LTR.
\end{itemize}
\subsection{\textsf{LTRitems} and \textsf{RTLitems} Environments}
If you typeset an \textsf{itemize}, or an \textsf{enumerate}, or a \textsf{description} environment where all \Lcs{item}s are one directional, you have no problem at all as shown below:
diff --git a/Master/texmf-dist/doc/latex/bidi/bidi.tex b/Master/texmf-dist/doc/latex/bidi/bidi.tex
new file mode 100644
index 00000000000..a2b7ca07f2b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/bidi.tex
@@ -0,0 +1,72 @@
+%%
+%% This is file `bidi.tex',
+
+%%
+%% __________________________________
+%% Copyright © 2009-2010 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\def\bididate{2010/07/25}
+\def\bidiversion{v0.1}
+\def\bidicommit{commit 31}
+\catcode`@=11
+\edef\bidiinfo{%
+bidi package (Support for bidirectional typesetting with XeLaTeX and LuaLaTeX)^^J
+Description: A convenient interface for typesetting bidirectional^^J
+texts with XeLaTeX and LuaLaTeX. The package includes adaptations for use^^J
+with many other commonly-used packages.^^J
+Copyright © 2009-2010 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
+Location on CTAN: /macros/latex/contrib/bidi}
+\message{\bidiinfo}
+\edef\bidi@everyjob{\the\everyjob}
+\everyjob{\bidi@everyjob\message{\bidiinfo}}
+\input iftex.sty
+\newif\if@RTLmain
+\newif\if@RTL
+\newif\if@sentdir
+\newif\if@RTL@footnote
+\@RTLmainfalse
+\def\setRTLmain{%
+ \if@RTLmain\else
+ \if@RTL\@RTLmaintrue%
+ \else\@RTLmainfalse%
+ \fi%
+ \fi%
+}
+\let\n@xt=\
+\def\LRE{\protect\pLRE}%
+\def\pLRE{\protect\afterassignment\moreLRE \let\n@xt= }
+\def\RLE{\protect\pRLE}
+\def\pRLE{\protect\afterassignment\moreRLE \let\n@xt= }
+\def\bracetext{\ifcat\n@xt{\else\ifcat\n@xt}\fi
+ \errmessage{Missing left brace has been substituted}\fi \bgroup}
+\ifXeTeX
+ \input plain-xetex-bidi.def
+\else
+ \ifLuaTeX
+ \input plain-luatex-bidi.def
+ \else
+ \errmessage{TeX engines other than XeTeX and LuaTeX are not yet supported}
+ \fi
+\fi
+\catcode`@=12
+%%
+%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
+%%
+%% Distributable 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 "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `bidi.tex'.
diff --git a/Master/texmf-dist/doc/latex/bidi/bidisample2e.pdf b/Master/texmf-dist/doc/latex/bidi/bidisample2e.pdf
deleted file mode 100644
index a4bb1e0d994..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/bidisample2e.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/bidismall2e.pdf b/Master/texmf-dist/doc/latex/bidi/bidismall2e.pdf
deleted file mode 100644
index 4961db4e01a..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/bidismall2e.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/presentation-sample.pdf b/Master/texmf-dist/doc/latex/bidi/presentation-sample.pdf
deleted file mode 100644
index a8dd715930a..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/presentation-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-arydshln.pdf b/Master/texmf-dist/doc/latex/bidi/test-arydshln.pdf
deleted file mode 100644
index 5a250e1d019..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test-arydshln.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-bidi.pdf b/Master/texmf-dist/doc/latex/bidi/test-bidi.pdf
deleted file mode 100644
index 7f2a8336f4f..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test-bidi.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-brochure.pdf b/Master/texmf-dist/doc/latex/bidi/test-brochure.pdf
deleted file mode 100644
index 42956be42c8..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test-brochure.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-casualcv.pdf b/Master/texmf-dist/doc/latex/bidi/test-casualcv.pdf
deleted file mode 100644
index 6578ceb310d..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test-casualcv.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-classiccv.pdf b/Master/texmf-dist/doc/latex/bidi/test-classiccv.pdf
deleted file mode 100644
index 1764e6a5a11..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test-classiccv.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-color.pdf b/Master/texmf-dist/doc/latex/bidi/test-color.pdf
deleted file mode 100644
index 22232053af4..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test-color.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-supertabular.pdf b/Master/texmf-dist/doc/latex/bidi/test-supertabular.pdf
deleted file mode 100644
index d6c4539b883..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test-supertabular.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-tabular.pdf b/Master/texmf-dist/doc/latex/bidi/test-tabular.pdf
deleted file mode 100644
index 6da31ff5b8d..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test-tabular.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-tabularx.pdf b/Master/texmf-dist/doc/latex/bidi/test-tabularx.pdf
deleted file mode 100644
index 0e95eaa1d03..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test-tabularx.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-tabulary.pdf b/Master/texmf-dist/doc/latex/bidi/test-tabulary.pdf
deleted file mode 100644
index 425eb03bfc7..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test-tabulary.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test1-colortbl.pdf b/Master/texmf-dist/doc/latex/bidi/test1-colortbl.pdf
deleted file mode 100644
index ddb4b770f07..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test1-colortbl.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test1-wrapfig.pdf b/Master/texmf-dist/doc/latex/bidi/test1-wrapfig.pdf
deleted file mode 100644
index 2e2047a40aa..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test1-wrapfig.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test2-colortbl.pdf b/Master/texmf-dist/doc/latex/bidi/test2-colortbl.pdf
deleted file mode 100644
index d682c51ce15..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test2-colortbl.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test2-wrapfig.pdf b/Master/texmf-dist/doc/latex/bidi/test2-wrapfig.pdf
deleted file mode 100644
index e915bd611be..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test2-wrapfig.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test3-wrapfig.pdf b/Master/texmf-dist/doc/latex/bidi/test3-wrapfig.pdf
deleted file mode 100644
index cf73f50ea25..00000000000
--- a/Master/texmf-dist/doc/latex/bidi/test3-wrapfig.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/bidi/amsbook-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/amsbook-xetex-bidi.def
index fab17c90716..13d802d0b03 100644
--- a/Master/texmf-dist/tex/latex/bidi/amsbook-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/amsbook-xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{amsbook-xetex-bidi.def}[2010/07/25 v0.6 bidi adaptations for amsbook class for XeTeX engine]
+\ProvidesFile{amsbook-xetex-bidi.def}[2010/07/25 v0.7 bidi adaptations for amsbook class for XeTeX engine]
\def\@tocline#1#2#3#4#5#6#7{\relax
\ifnum #1>\c@tocdepth % then omit
\else
@@ -101,6 +101,18 @@
\def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
\endlist
}
+\def\@makechapterhead#1{\global\topskip 7.5pc\relax
+ \begingroup
+ \fontsize{\@xivpt}{18}\bfseries\centering
+ \ifnum\c@secnumdepth>\m@ne
+ \leavevmode \hskip-\if@RTL\rightskip\else\leftskip\fi
+ \rlap{\vbox to\z@{\vss
+ \centerline{\normalsize\mdseries
+ \uppercase\@xp{\chaptername}\enspace\thechapter}
+ \vskip 3pc}}\hskip\if@RTL\rightskip\else\leftskip\fi\fi
+ #1\par \endgroup
+ \skip@34\p@ \advance\skip@-\normalbaselineskip
+ \vskip\skip@ }
%%
%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/latex/bidi/article-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/article-xetex-bidi.def
index f4834dd871d..81d1b0881b5 100644
--- a/Master/texmf-dist/tex/latex/bidi/article-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/article-xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{article-xetex-bidi.def}[2010/07/25 v0.3 bidi adaptations for standard article class for XeTeX engine]
+\ProvidesFile{article-xetex-bidi.def}[2010/07/25 v0.4 bidi adaptations for standard article class for XeTeX engine]
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
@@ -122,6 +122,30 @@
\fi
\endgroup
\fi}
+\renewcommand*\l@section[2]{%
+ \ifnum \c@tocdepth >\z@
+ \addpenalty\@secpenalty
+ \addvspace{1.0em \@plus\p@}%
+ \setlength\@tempdima{1.5em}%
+ \begingroup
+ \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \leavevmode \bfseries
+ \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
+ \hskip -\if@RTL\rightskip\else\leftskip\fi
+ #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
+ \endgroup
+ \fi}
+\renewcommand\left@footnote{%
+ \kern-3\p@
+ \hrule\@width.4\columnwidth
+ \kern2.6\p@}
+\renewcommand\right@footnote{%
+ \hbox to \columnwidth
+ {\beginR \vbox{%
+ \kern-3\p@
+ \hrule\@width.4\columnwidth
+ \kern2.6\p@}\hfil\endR}}
\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection\@SepMark\@arabic\c@subsubsection}
\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
diff --git a/Master/texmf-dist/tex/latex/bidi/bidi.sty b/Master/texmf-dist/tex/latex/bidi/bidi.sty
index 76ba4ca6df9..3fbad45a7c3 100644
--- a/Master/texmf-dist/tex/latex/bidi/bidi.sty
+++ b/Master/texmf-dist/tex/latex/bidi/bidi.sty
@@ -10,8 +10,8 @@
%%
\NeedsTeXFormat{LaTeX2e}
\def\bididate{2010/07/25}
-\def\bidiversion{v1.0.7}
-\def\bidicommit{commit 26}
+\def\bidiversion{v1.0.8}
+\def\bidicommit{commit 31}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space <\bidicommit>
Bidirectional typesetting in XeLaTeX and LuaLaTeX]
\edef\bidiinfo{%
diff --git a/Master/texmf-dist/tex/latex/bidi/bidicode.sty b/Master/texmf-dist/tex/latex/bidi/bidicode.sty
index 44f98eddbff..2a81ecec73d 100644
--- a/Master/texmf-dist/tex/latex/bidi/bidicode.sty
+++ b/Master/texmf-dist/tex/latex/bidi/bidicode.sty
@@ -48,6 +48,7 @@
backgroundcolor=\color{mybackground},
breakautoindent=true,
rframe={},
+ escapeinside=??,
explpreset={numbers=left,numberstyle=\tiny,numbersep=12pt,
xleftmargin=1em,columns=flexible,language=[LaTeX]TEX},
morekeywords={setLTR,setLR,setRTL,setRL,LRE,LR,RLE,RL,lr}
@@ -58,6 +59,15 @@
frame=single}
\lst@UserCommand\lstlistlistingname{List of Examples} % \lstlistoflistings
\lst@UserCommand\lstlistingname{Example}
+\newcommand\HLON{%
+ \gdef\lst@alloverstyle##1{%
+ \fboxrule=0pt
+ \fboxsep=0pt
+ \fcolorbox{orange}{orange}{\bfseries\strut##1}%
+}}
+\newcommand\HLOFF{%
+ \xdef\lst@alloverstyle##1{##1}%
+}
\newcommand\Larg [1]{{\normalfont\itshape#1\/}}
\newcommand\Larga[1]{$\langle$\Larg{#1}$\rangle$}
\newcommand\Largb[1]{\lcb\Larg{#1}\rcb}
diff --git a/Master/texmf-dist/tex/latex/bidi/book-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/book-xetex-bidi.def
index 15ed60e158f..93491873392 100644
--- a/Master/texmf-dist/tex/latex/bidi/book-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/book-xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{book-xetex-bidi.def}[2010/07/25 v0.6 bidi adaptations for standard book class for XeTeX engine]
+\ProvidesFile{book-xetex-bidi.def}[2010/07/25 v0.7 bidi adaptations for standard book class for XeTeX engine]
\@ifclassloaded{bookest}{}{%
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
@@ -121,6 +121,31 @@
\everypar{\global\@nobreakfalse\everypar{}}%
\endgroup
\fi}
+\renewcommand*\l@chapter[2]{%
+ \ifnum \c@tocdepth >\m@ne
+ \addpenalty{-\@highpenalty}%
+ \vskip 1.0em \@plus\p@
+ \setlength\@tempdima{1.5em}%
+ \begingroup
+ \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \leavevmode \bfseries
+ \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
+ \hskip -\if@RTL\rightskip\else\leftskip\fi
+ #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
+ \penalty\@highpenalty
+ \endgroup
+ \fi}
+\renewcommand\left@footnote{%
+ \kern-3\p@
+ \hrule\@width.4\columnwidth
+ \kern2.6\p@}
+\renewcommand\right@footnote{%
+ \hbox to \columnwidth
+ {\beginR \vbox{%
+ \kern-3\p@
+ \hrule\@width.4\columnwidth
+ \kern2.6\p@}\hfil\endR}}
\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
\renewcommand \thefigure
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 af54dfcdb63..c612599becb 100644
--- a/Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/footnote-xetex-bidi.def
@@ -198,7 +198,7 @@
\@pboxswfalse
\setlength\@tempdima{#4}%
\def\@mpargs{{#1}{#2}[#3]{#4}}%
- \setbox\@tempboxa\vbox\bgroup
+ \setbox\@tempboxa\vbox\bgroup\hbox\bgroup\if@RTL\beginL\fi\vbox\bgroup
\color@begingroup
\hsize\@tempdima
\textwidth\hsize \columnwidth\hsize
diff --git a/Master/texmf-dist/tex/latex/bidi/hyperref-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/hyperref-xetex-bidi.def
index 3304b0b7335..df60a1a0c9c 100644
--- a/Master/texmf-dist/tex/latex/bidi/hyperref-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/hyperref-xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{hyperref-xetex-bidi.def}[2010/07/25 v0.5 bidi adaptations for hyperref package for XeTeX engine]
+\ProvidesFile{hyperref-xetex-bidi.def}[2010/07/25 v0.4 bidi adaptations for hyperref package for XeTeX engine]
\AtBeginDocument{%
\def\contentsline#1#2#3#4{%
\ifx\\#4\\%
@@ -175,6 +175,7 @@
\ifhmode\spacefactor\@x@sf\fi
\relax
}%
+ \let\HyOrg@maketitle\maketitle
\def\maketitle{%
\let\Hy@saved@footnotemark\@footnotemark
\let\Hy@saved@footnotetext\@footnotetext
diff --git a/Master/texmf-dist/tex/latex/bidi/letter-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/letter-xetex-bidi.def
index 97c06228ce1..25d74845ee2 100644
--- a/Master/texmf-dist/tex/latex/bidi/letter-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/letter-xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{letter-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for standard letter class for XeTeX engine]
+\ProvidesFile{letter-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for standard letter class for XeTeX engine]
\renewcommand*{\opening}[1]{\ifx\@empty\fromaddress
\thispagestyle{firstpage}%
{\if@RTL\raggedright\else\raggedleft\fi\@date\par}%
@@ -22,6 +22,16 @@
{\if@RTL\raggedleft\else\raggedright\fi \toname \\ \toaddress \par}%
\vspace{2\parskip}%
#1\par\nobreak}
+\renewcommand\left@footnote{%
+ \kern-\p@
+ \hrule \@width .4\columnwidth
+ \kern .6\p@}
+\renewcommand\right@footnote{%
+ \hbox to \columnwidth
+ {\beginR \vbox{%
+ \kern-\p@
+ \hrule \@width .4\columnwidth
+ \kern .6\p@}\hfil\endR}}
%%
%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/latex/bidi/plain-luatex-bidi.def b/Master/texmf-dist/tex/latex/bidi/plain-luatex-bidi.def
new file mode 100644
index 00000000000..25f8ed4b16f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bidi/plain-luatex-bidi.def
@@ -0,0 +1,26 @@
+%%
+%% This is file `plain-luatex-bidi.def',
+
+%%
+%% __________________________________
+%% Copyright © 2009-2010 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\directlua { tex.enableprimitives('',tex.extraprimitives()) }
+%%
+%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
+%%
+%% Distributable 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 "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `plain-luatex-bidi.def'.
diff --git a/Master/texmf-dist/tex/latex/bidi/plain-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/plain-xetex-bidi.def
new file mode 100644
index 00000000000..d20d4cc5840
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bidi/plain-xetex-bidi.def
@@ -0,0 +1,107 @@
+%%
+%% This is file `plain-xetex-bidi.def',
+
+%%
+%% __________________________________
+%% Copyright © 2009-2010 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\ifx\TeXXeTstate\undefined\else%
+ \TeXXeTstate=1
+\fi
+\def\Bidi@RTL@everypar{\if@RTL{\setbox\z@\lastbox\beginR\box\z@}\fi}
+ \let\o@everypar=\everypar
+ \newtoks\n@everypar
+ \n@everypar\expandafter{\the\o@everypar}
+ \o@everypar{\Bidi@RTL@everypar\the\n@everypar}
+ \let\everypar=\n@everypar
+\def\moreLRE{\bracetext \aftergroup\endL \beginL\@RTLfalse}
+\def\moreRLE{\bracetext \aftergroup\endR \beginR\@RTLtrue}
+\protected\def\hboxR{\hbox\bgroup
+ \everyhbox{%
+ \aftergroup\egroup
+ \everyhbox{}%
+ \beginR
+ \bgroup
+ \aftergroup\endR
+ \aftergroup\egroup
+ }\hbox}
+\protected\def\hboxL{\hbox\bgroup
+ \everyhbox{%
+ \aftergroup\egroup
+ \everyhbox{}%
+ \beginL
+ \bgroup
+ \aftergroup\endL
+ \aftergroup\egroup
+ }\hbox}
+\protected\def\vboxR{\vbox\bgroup
+ \everyvbox{%
+ \aftergroup\egroup
+ \everyvbox{}%
+ \beginR
+ \bgroup
+ \aftergroup\endR
+ \aftergroup\egroup
+ }\vbox}
+\protected\def\vboxL{\vbox\bgroup
+ \everyvbox{%
+ \aftergroup\egroup
+ \everyvbox{}%
+ \beginL
+ \bgroup
+ \aftergroup\endL
+ \aftergroup\egroup
+ }\vbox}
+\def\LTR{\par\@RTLfalse\@RTL@footnotefalse\hsize\linewidth\parshape\z@}
+\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\setRTL{\@RTLtrue\@RTL@footnotetrue}
+\def\setLTR{\@RTLfalse\@RTL@footnotefalse}
+\let\unsetRTL=\setLTR
+\let\unsetLTR=\setRTL
+\let\LR=\LRE
+\let\RL=\RLE
+\def\@ensure@RTL#1{\if@RTL#1\else\RLE{#1}\fi}
+\def\@ensure@LTR#1{\if@RTL\LRE{#1}\else#1\fi}
+\let\@ensure@RL=\@ensure@RTL
+\let\@ensure@LR=\@ensure@LTR
+\def\@ensure@dir#1{\if@RTL\RLE{#1}\else{#1}\fi}
+\let\@ensure@maindir=\@ensure@dir
+\def\@@RTL{RTL}
+\def\@@LTR{LTR}
+\def\save@dir{\if@RTL\gdef\saved@@dir{RTL}\else\gdef\saved@@dir{LTR}\fi}
+\def\reset@dir{\ifx\saved@@dir\@@RTL\setRTL\else\ifx\saved@@dir\@@LTR\setLTR\else\relax\fi\fi}
+\let\@@TeX\TeX
+\def\TeX{\@ensure@LTR{\@@TeX}}
+\def\reflect#1{{\setbox0=\hbox{#1}\rlap{\kern0.5\wd0
+ \special{x:gsave}\special{x:scale -1 1}}\box0 \special{x:grestore}}}
+\def\XeTeX{\LR{\leavevmode$\smash{\hbox{X\lower.5ex
+ \hbox{\kern-.125em\reflect{E}}\kern-.1667em \TeX}}$}}
+\let\setRL=\setRTL
+\let\setLR=\setLTR
+\let\unsetRL=\setLTR
+\everydisplay{\predisplaydirection=0 }
+\def\centerline#1{\line{\hss\if@RTL\beginR\fi#1\if@RTL\endR\fi\hss}}
+\def\leftline#1{\line{\if@RTL\beginR\fi#1\if@RTL\endR\fi\hss}}
+\def\rightline#1{\line{\hss\if@RTL\beginR\fi#1\if@RTL\endR\fi}}
+%%
+%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
+%%
+%% Distributable 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 "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `plain-xetex-bidi.def'.
diff --git a/Master/texmf-dist/tex/latex/bidi/refrep-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/refrep-xetex-bidi.def
index fc467dc29da..6bc9539492b 100644
--- a/Master/texmf-dist/tex/latex/bidi/refrep-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/refrep-xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{refrep-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for refrep class for XeTeX engine]
+\ProvidesFile{refrep-xetex-bidi.def}[2010/07/25 v0.3 bidi adaptations for refrep class for XeTeX engine]
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
@@ -132,6 +132,34 @@
\everypar{\global\@nobreakfalse\everypar{}}%
\endgroup
\fi}
+\renewcommand*\l@chapter[2]{%
+ \ifnum \c@tocdepth >\m@ne
+ \addpenalty{-\@highpenalty}%
+ \vskip 1.0em \@plus\p@
+ \setlength\@tempdima{1.5em}%
+ \begingroup
+ \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \leavevmode \bfseries
+ \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
+ \hskip -\if@RTL\rightskip\else\leftskip\fi
+ #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
+ \penalty\@highpenalty
+ \endgroup
+ \fi}
+\renewcommand\secshape{\if@RTL\rightskip\else\leftskip\fi=-\leftmarginwidth%
+ \if@RTL\leftskip\else\rightskip\fi=\@flushglue%
+ \hyphenpenalty=2000}
+\renewcommand\left@footnote{%
+ \kern-3\p@
+ \hrule\@width.4\columnwidth
+ \kern 2.6\p@}
+\renewcommand\right@footnote{%
+ \hbox to \columnwidth
+ {\beginR \vbox{%
+ \kern-3\p@
+ \hrule\@width.4\columnwidth
+ \kern 2.6\p@}\hfil\endR}}
\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
\renewcommand\thefigure
diff --git a/Master/texmf-dist/tex/latex/bidi/report-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/report-xetex-bidi.def
index c1d0a3e00d1..c14ca3634e1 100644
--- a/Master/texmf-dist/tex/latex/bidi/report-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/report-xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{report-xetex-bidi.def}[2010/07/25 v0.4 bidi adaptations for standard report class for XeTeX engine]
+\ProvidesFile{report-xetex-bidi.def}[2010/07/25 v0.5 bidi adaptations for standard report class for XeTeX engine]
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
@@ -120,6 +120,31 @@
\everypar{\global\@nobreakfalse\everypar{}}%
\endgroup
\fi}
+\renewcommand*\l@chapter[2]{%
+ \ifnum \c@tocdepth >\m@ne
+ \addpenalty{-\@highpenalty}%
+ \vskip 1.0em \@plus\p@
+ \setlength\@tempdima{1.5em}%
+ \begingroup
+ \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \leavevmode \bfseries
+ \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
+ \hskip -\if@RTL\rightskip\else\leftskip\fi
+ #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
+ \penalty\@highpenalty
+ \endgroup
+ \fi}
+\renewcommand\left@footnote{%
+ \kern-3\p@
+ \hrule\@width.4\columnwidth
+ \kern2.6\p@}
+\renewcommand\right@footnote{%
+ \hbox to \columnwidth
+ {\beginR \vbox{%
+ \kern-3\p@
+ \hrule\@width.4\columnwidth
+ \kern2.6\p@}\hfil\endR}}
\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
\renewcommand \thefigure
diff --git a/Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def
index 9b8b5f48873..311c3a39fa3 100644
--- a/Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/scrartcl-xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{scrartcl-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for scrartcl class for XeTeX engine]
+\ProvidesFile{scrartcl-xetex-bidi.def}[2010/07/25 v0.3 bidi adaptations for scrartcl class for XeTeX engine]
\renewcommand*\maketitle[1][1]{%
\if@titlepage
\begin{titlepage}
@@ -313,6 +313,18 @@
\fi
\bib@endhook
}
+\renewcommand*\left@footnote{%
+ \kern-3\p@
+ \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
+ \hrule\@width.4\columnwidth
+ \kern 2.6\p@}
+\renewcommand*\right@footnote{%
+ \hbox to \columnwidth
+ {\beginR \vbox{%
+ \kern-3\p@
+ \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
+ \hrule\@width.4\columnwidth
+ \kern 2.6\p@}\hfil\endR}}
%%
%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/latex/bidi/scrbook-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/scrbook-xetex-bidi.def
index 64d72de1018..fc1994de306 100644
--- a/Master/texmf-dist/tex/latex/bidi/scrbook-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/scrbook-xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{scrbook-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for scrbook class for XeTeX engine]
+\ProvidesFile{scrbook-xetex-bidi.def}[2010/07/25 v0.3 bidi adaptations for scrbook class for XeTeX engine]
\renewcommand*\maketitle[1][1]{%
\if@titlepage
\begin{titlepage}
@@ -369,6 +369,18 @@
\fi
\bib@endhook
}
+\renewcommand*\left@footnote{%
+ \kern-3\p@
+ \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
+ \hrule\@width.4\columnwidth
+ \kern 2.6\p@}
+\renewcommand*\right@footnote{%
+ \hbox to \columnwidth
+ {\beginR \vbox{%
+ \kern-3\p@
+ \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
+ \hrule\@width.4\columnwidth
+ \kern 2.6\p@}\hfil\endR}}
%%
%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/latex/bidi/scrreprt-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/scrreprt-xetex-bidi.def
index bccd3e01e62..2b04dfd8938 100644
--- a/Master/texmf-dist/tex/latex/bidi/scrreprt-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/scrreprt-xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{scrreprt-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for scrreprt class for XeTeX engine]
+\ProvidesFile{scrreprt-xetex-bidi.def}[2010/07/25 v0.3 bidi adaptations for scrreprt class for XeTeX engine]
\renewcommand*\maketitle[1][1]{%
\if@titlepage
\begin{titlepage}
@@ -326,6 +326,18 @@
\fi
\bib@endhook
}
+\renewcommand*\left@footnote{%
+ \kern-3\p@
+ \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
+ \hrule\@width.4\columnwidth
+ \kern 2.6\p@}
+\renewcommand*\right@footnote{%
+ \hbox to \columnwidth
+ {\beginR \vbox{%
+ \kern-3\p@
+ \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
+ \hrule\@width.4\columnwidth
+ \kern 2.6\p@}\hfil\endR}}
%%
%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@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 ef377a15db1..3080f735671 100644
--- a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
@@ -20,42 +20,42 @@
\let\everypar=\n@everypar
\def\moreLRE{\bracetext \aftergroup\endL \beginL\@RTLfalse}
\def\moreRLE{\bracetext \aftergroup\endR \beginR\@RTLtrue}
-\def\hboxR#1#{%
- \getarg@hboxR{#1}%
- }
-\def\getarg@hboxR#1#2{%
- \hbox#1{\beginR#2\endR}%
- }
-\def\hboxL#1#{%
- \getarg@hboxL{#1}%
- }
-\def\getarg@hboxL#1#2{%
- \hbox#1{\beginL#2\endL}%
- }
-\def\vboxR#1#{%
- \getarg@vboxR{#1}%
- }
-\def\getarg@vboxR#1#2{%
- \vbox#1{\beginR#2\endR}%
- }
-\def\vboxL#1#{%
- \getarg@vboxL{#1}%
- }
-\def\getarg@vboxL#1#2{%
- \vbox#1{\beginL#2\endL}%
- }
-\def\halignR#1#{%
- \getarg@halignR{#1}%
- }
-\def\getarg@halignR#1#2{%
- \hbox{\beginR\vbox{\halign#1{#2}}\endR}%
- }
-\def\halignL#1#{%
- \getarg@halignL{#1}%
- }
-\def\getarg@halignL#1#2{%
- \hbox{\beginL\vbox{\halign#1{#2}}\endL}%
- }
+\protected\def\hboxR{\hbox\bgroup
+ \everyhbox{%
+ \aftergroup\egroup
+ \everyhbox{}%
+ \beginR
+ \bgroup
+ \aftergroup\endR
+ \aftergroup\egroup
+ }\hbox}
+\protected\def\hboxL{\hbox\bgroup
+ \everyhbox{%
+ \aftergroup\egroup
+ \everyhbox{}%
+ \beginL
+ \bgroup
+ \aftergroup\endL
+ \aftergroup\egroup
+ }\hbox}
+\protected\def\vboxR{\vbox\bgroup
+ \everyvbox{%
+ \aftergroup\egroup
+ \everyvbox{}%
+ \beginR
+ \bgroup
+ \aftergroup\endR
+ \aftergroup\egroup
+ }\vbox}
+\protected\def\vboxL{\vbox\bgroup
+ \everyvbox{%
+ \aftergroup\egroup
+ \everyvbox{}%
+ \beginL
+ \bgroup
+ \aftergroup\endL
+ \aftergroup\egroup
+ }\vbox}
\def\LTR{\par\@RTLfalse\@RTL@footnotefalse\hsize\linewidth\parshape\z@}
\def\endLTR{\par}
\def\RTL{\par\@RTLtrue\@RTL@footnotetrue\hsize\linewidth\parshape\z@}
@@ -284,10 +284,6 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\renewcommand{\@outputdblcol}{\if@RTLmain\RTL@outputdblcol\else\LTR@outputdblcol\fi}
\newcommand{\RTLdblcol}{\renewcommand{\@outputdblcol}{\RTL@outputdblcol}}
\newcommand{\LTRdblcol}{\renewcommand{\@outputdblcol}{\LTR@outputdblcol}}
-\def \@setminipage{%
- \@minipagetrue
- \everypar{\@minipagefalse\everypar{}\if@RTL\beginR\else\beginL\fi}%
-}
\def\endminipage{%
\par
\unskip
@@ -299,6 +295,9 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\fi
\@minipagefalse %% added 24 May 89
\color@endgroup
+ \egroup
+ \if@RTL\endL\fi
+ \egroup
\egroup
\expandafter\@iiiparbox\@mpargs{\leavevmode\unvbox\@tempboxa}}
\def\@arrayparboxrestore{%
@@ -440,7 +439,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{\predisplaydirection=0 }
\def\@eqnnum{{\normalfont \normalcolor \if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}
\input{footnote-xetex-bidi.def}
\@iftagsloaded{leqno}{\input{leqno-xetex-bidi.def}}{}