summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/bidi/xetex-bidi.def')
-rw-r--r--Master/texmf-dist/tex/latex/bidi/xetex-bidi.def48
1 files changed, 28 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
index 14086bf0498..e4ab6afe454 100644
--- a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
@@ -242,33 +242,41 @@
\csname bm@#3\endcsname}%
\if@pboxsw \m@th$\fi
\@end@tempboxa}
-\newenvironment{LTRitems}[1][\labelsep]
+\newenvironment{LTRitems}
{\par\@RTLfalse
- \if@RTLtab\parshape \@ne \@totalleftmargin \dimexpr(\linewidth-\leftmargin)\fi
- \if@bidi@list@minipage@parbox\rightskip\else\leftskip\fi\labelwidth
- \if@RTLtab\else\advance\if@bidi@list@minipage@parbox\rightskip\else\leftskip\fi #1\fi
- \advance\if@bidi@list@minipage@parbox\leftskip\else\if@RTLtab\leftskip\else\rightskip\fi\fi -\leftmargin
+ \if@bidi@list@minipage@parbox
+ \parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth
+ \else \if@RTLtab\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}{\endtrivlist}
-\newenvironment{RTLitems}[1][\labelsep]
+\newenvironment{RTLitems}
{\par\@RTLtrue
- \if@RTLtab\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \dimexpr(\linewidth-\leftmargin)\fi
- \if@bidi@list@minipage@parbox\leftskip\else\rightskip\fi\labelwidth
- \if@RTLtab\else\advance\if@bidi@list@minipage@parbox\leftskip\else\rightskip\fi #1\fi
- \advance\if@bidi@list@minipage@parbox\rightskip\else\if@RTLtab\rightskip\else\leftskip\fi\fi -\leftmargin
+ \if@bidi@list@minipage@parbox
+ \parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth
+ \else \if@RTLtab\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}{\endtrivlist}
-\newenvironment{LTRbibitems}[1][\labelsep]
+\newenvironment{LTRbibitems}
{\par\@RTLfalse
- \if@RTLtab\parshape \@ne \@totalleftmargin \dimexpr(\linewidth-\leftmargin)\fi
- \if@bidi@list@minipage@parbox\rightskip\else\leftskip\fi\labelwidth
- \if@RTLtab\else\advance\if@bidi@list@minipage@parbox\rightskip\else\leftskip\fi #1\fi
- \advance\if@bidi@list@minipage@parbox\leftskip\else\if@RTLtab\leftskip\else\rightskip\fi\fi -\leftmargin
+ \if@bidi@list@minipage@parbox
+ \parshape \@ne \dimexpr(\@totalleftmargin-\leftmargin) \linewidth
+ \else \if@RTLtab\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}{\endtrivlist}
-\newenvironment{RTLbibitems}[1][\labelsep]
+\newenvironment{RTLbibitems}
{\par\@RTLtrue
- \if@RTLtab\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \dimexpr(\linewidth-\leftmargin)\fi
- \if@bidi@list@minipage@parbox\leftskip\else\rightskip\fi\labelwidth
- \if@RTLtab\else\advance\if@bidi@list@minipage@parbox\leftskip\else\rightskip\fi #1\fi
- \advance\if@bidi@list@minipage@parbox\rightskip\else\if@RTLtab\rightskip\else\leftskip\fi\fi -\leftmargin
+ \if@bidi@list@minipage@parbox
+ \parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \linewidth
+ \else \if@RTLtab\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}{\endtrivlist}
\def\raggedright{%
\let\\\@centercr