summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def')
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def56
1 files changed, 28 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def
index 2d5892cf768..f9b7aec5148 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def
@@ -17,7 +17,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{47549}
+%% \CheckSum{47593}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -51,6 +51,7 @@
\aftergroup\egroup
\everyhbox{}%
\beginR
+ \@hboxRconstructtrue
\bgroup
\aftergroup\endR
\aftergroup\egroup
@@ -60,6 +61,7 @@
\aftergroup\egroup
\everyhbox{}%
\beginL
+ \@hboxRconstructfalse
\bgroup
\aftergroup\endL
\aftergroup\egroup
@@ -69,6 +71,7 @@
\aftergroup\egroup
\everyvbox{}%
\@RTLtrue
+ \@RTLtabtrue
\bgroup
\aftergroup\egroup
}\vbox}
@@ -77,17 +80,18 @@
\aftergroup\egroup
\everyvbox{}%
\@RTLfalse
+ \@RTLtabfalse
\bgroup
\aftergroup\egroup
}\vbox}
\newcommand*{\bidi@leftskip}{\if@RTL\rightskip\else\leftskip\fi}
\newcommand*{\bidi@rightskip}{\if@RTL\leftskip\else\rightskip\fi}
-\def\LTR{\par\@RTLfalse\@RTL@footnotefalse\hsize\linewidth\parshape\z@}
+\def\LTR{\par\@RTLfalse\@RTL@footnotefalse\@RTLtabfalse\hsize\linewidth\parshape\z@}
\def\endLTR{\par}
-\def\RTL{\par\@RTLtrue\@RTL@footnotetrue\hsize\linewidth\parshape\z@}
+\def\RTL{\par\@RTLtrue\@RTL@footnotetrue\@RTLtabtrue\hsize\linewidth\parshape\z@}
\def\endRTL{\par}
-\def\setRTL{\@RTLtrue\@RTL@footnotetrue}
-\def\setLTR{\@RTLfalse\@RTL@footnotefalse}
+\def\setRTL{\@RTLtrue\@RTL@footnotetrue\@RTLtabtrue}
+\def\setLTR{\@RTLfalse\@RTL@footnotefalse\@RTLtabfalse}
\let\unsetRTL=\setLTR
\let\unsetLTR=\setRTL
\let\LR=\LRE
@@ -128,7 +132,7 @@
\hbox \bgroup $\left.\col@sep\tabcolsep \let\d@llarbegin\begingroup
\let\d@llarend\endgroup
\@tabarray}
-\def\endbidi@tabular@RTLcases{\endarray \right\rbrace$\egroup\@RTLtabfalse}
+\def\endbidi@tabular@RTLcases{\endarray \right\rbrace$\egroup}
}{%
\def\@bidi@tabular@RTLcases{\@RTLtabtrue%
\leavevmode \hbox \bgroup
@@ -137,9 +141,7 @@
\let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}
\def\endbidi@tabular@RTLcases{\crcr\egroup\if@RTLtab\egroup\endR\egroup\fi
- \egroup\right\rbrace $\egroup
- \@RTLtabfalse}
-}
+ \egroup\right\rbrace $\egroup}}
\def\RTLcases#1{\left.\vcenter{\normalbaselines\m@th
\ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\,\right\}}
\renewenvironment{RTLcases}{%
@@ -184,7 +186,7 @@
\advance\@totalleftmargin \rightmargin
\fi
\else
- \if@RTLtab
+ \if@hboxRconstruct
\if@bidi@list@minipage@parbox@not@nob
\if@RTL
\advance\@totalleftmargin \rightmargin
@@ -208,7 +210,7 @@
\long\def\@iiiparbox#1#2[#3]#4#5{%
\leavevmode
\@pboxswfalse
- \if@RTLtab\@bidi@list@minipage@parbox@not@nobtrue\fi
+ \if@hboxRconstruct\@bidi@list@minipage@parbox@not@nobtrue\fi
\if@RTL\if#1t\@bidi@list@minipage@parboxtrue\else\if#1b\@bidi@list@minipage@parboxtrue\fi\fi\fi
\setlength\@tempdima{#4}%
\@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
@@ -238,37 +240,37 @@
\ignorespaces}
\def\endbidi@lrbox{\unskip\color@endgroup}
\newenvironment{LTRitems}
- {\par\@RTLfalse
+ {\par\@RTLfalse\@RTLtabfalse
\if@bidi@list@minipage@parbox
\parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth
- \else \if@RTLtab\if@bidi@list@minipage@parbox@not@nob
+ \else \if@hboxRconstruct\if@bidi@list@minipage@parbox@not@nob
\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\else
\parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\fi
\else \parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\fi\fi
\ignorespaces}{\vskip\z@}
\newenvironment{RTLitems}
- {\par\@RTLtrue
+ {\par\@RTLtrue\@RTLtabtrue
\if@bidi@list@minipage@parbox
\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth
- \else \if@RTLtab\if@bidi@list@minipage@parbox@not@nob
+ \else \if@hboxRconstruct\if@bidi@list@minipage@parbox@not@nob
\parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\else
\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\fi
\else \parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\fi\fi
\ignorespaces}{\vskip\z@}
\newenvironment{LTRbibitems}
- {\par\@RTLfalse
+ {\par\@RTLfalse\@RTLtabfalse
\if@bidi@list@minipage@parbox
\parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth
- \else \if@RTLtab\if@bidi@list@minipage@parbox@not@nob
+ \else \if@hboxRconstruct\if@bidi@list@minipage@parbox@not@nob
\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\else
\parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\fi
\else \parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\fi\fi
\ignorespaces}{\vskip\z@}
\newenvironment{RTLbibitems}
- {\par\@RTLtrue
+ {\par\@RTLtrue\@RTLtabtrue
\if@bidi@list@minipage@parbox
\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth
- \else \if@RTLtab\if@bidi@list@minipage@parbox@not@nob
+ \else \if@hboxRconstruct\if@bidi@list@minipage@parbox@not@nob
\parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\else
\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth\fi
\else \parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth\fi\fi
@@ -279,8 +281,8 @@
\parindent\z@\parfillskip\z@skip}
\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}
+\renewcommand\raggedleft{\if@bidi@list@minipage@parbox\bidi@orig@raggedright\else\if@hboxRconstruct\bidi@orig@raggedright\else\bidi@orig@raggedleft\fi\fi}
+\renewcommand\raggedright{\if@bidi@list@minipage@parbox\bidi@orig@raggedleft\else\if@hboxRconstruct\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{%
@@ -294,8 +296,8 @@
\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\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@hboxRconstruct\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@hboxRconstruct\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}}%
@@ -313,15 +315,13 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\if@compatibility
\let\undertext=\underline
\fi
-\global\@RTLtabfalse
-\def\@tabular{\if@RTL\@RTLtabtrue\fi
+\def\@tabular{%
\leavevmode \hbox \bgroup \if@RTLtab\beginR \fi
$\let\@acol\@tabacol
\let\@classz\@tabclassz
\let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}
\def\endtabular{\crcr\egroup\if@RTLtab\egroup\endR\egroup\fi
- \egroup $\if@RTLtab\endR\fi\egroup
- \@RTLtabfalse}
+ \egroup $\if@RTLtab\endR\fi\egroup}
\expandafter \let \csname endtabular*\endcsname = \endtabular
\def\@array[#1]#2{%
\if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi
@@ -341,7 +341,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\set@typeset@protect
\lineskip\z@skip\baselineskip\z@skip
\ifhmode \@preamerr\z@ \@@par\fi
- \if@RTLtab\hbox\bgroup\beginR\if #1t\vtop \else \vbox \fi\bgroup\fi
+ \if@RTLtab\hbox\bgroup\beginR\@hboxRconstructtrue\if #1t\vtop \else \vbox \fi\bgroup\fi
\@preamble}
\def\array{\let\@acol\@arrayacol \let\@classz\@arrayclassz
\let\@classiv\@arrayclassiv