summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/bidi/bidi.dtx87
1 files changed, 35 insertions, 52 deletions
diff --git a/Master/texmf-dist/source/latex/bidi/bidi.dtx b/Master/texmf-dist/source/latex/bidi/bidi.dtx
index 6087919685d..ba17884d5ec 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
-v1.4.1
+v1.4.2
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX.
@@ -231,7 +231,7 @@ by Vafa Khalighi.
% Support for bidirectional typesetting in plain \TeX{} and \LaTeXe}
% \author{Vafa Khalighi\\
% \url{vafaklg@gmail.com}}
-% \date{\today\qquad Version 1.4.1}
+% \date{\today\qquad Version 1.4.2}
% \maketitle
% \tableofcontents
%\section*{Introduction}
@@ -246,7 +246,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
-%v1.4.1, 2012/01/01
+%v1.4.2, 2012/01/01
%License: LaTeX Project Public License, version 1.3c or higher (your choice)
%Location on CTAN: /macros/latex/contrib/bidi
%\end{lstlisting}
@@ -570,12 +570,12 @@ by Vafa Khalighi.
%\end{lstlisting}
%Then some people may argue that this typographically does not look promising. For this purpose, \textsf{RTLitems} environment is provided which has the following syntax:
%\begin{BDef}
-%\LBEG{RTLitems}\OptArg{length}\\
+%\LBEG{RTLitems}\\
%\quad\Lcs{item} \Larga{text}\\
%\quad\ldots\\
%\LEND{RTLitems}
%\end{BDef}
-%Where \OptArg{length} is optional and if you do not give it, the value of \Lcs{rightskip} will be equal to the value of \Lcs{labelwidth}\(+\)\Lcs{labelsep} by default and if you give this optional length, then the value of \Lcs{rightskip} will be equal to the value of \Lcs{labelwidth}\(+\)\Larg{given length}. Thus by using the \textsf{RTLitems} environment, the previous example will look like the following:
+% By using the \textsf{RTLitems} environment, the previous example will look like the following:
%\begin{lstlisting}
%\documentclass{article}
%\usepackage{bidi}
@@ -591,19 +591,16 @@ by Vafa Khalighi.
%\end{lstlisting}
%Similarly, \textsf{LTRitems} environment is defined which has the following syntax:
%\begin{BDef}
-%\LBEG{LTRitems}\OptArg{length}\\
+%\LBEG{LTRitems}\\
%\quad\Lcs{item} \Larga{text}\\
%\quad\ldots\\
%\LEND{LTRitems}
%\end{BDef}
-%Where \OptArg{length} is optional and if you do not give it, the value of \Lcs{leftskip} will be equal to the value of \Lcs{labelwidth}\(+\)\Lcs{labelsep} by default and if you give this optional length, then the value of \Lcs{leftskip} will be equal to the value of \Lcs{labelwidth}\(+\)\Larg{given length}.
%\subsection{\textsf{LTRbibitems} and \textsf{RTLbibitems} Environments}
%The syntax of \textsf{LTRbibitems} and \textsf{RTLbibitems} environments is exactly like the syntax of \textsf{LTRitems} and \textsf{RTLitems} environments but there are few differences:
%\begin{itemize}
%\item \textsf{LTRitems} and \textsf{RTLitems} environments should only be used for \textsf{list}-like environments (such as \textsf{itemize}, \textsf{enumerate} and \textsf{description} environments) but \textsf{LTRbibitems} and \textsf{RTLbibitems} environments should only be used for \textsf{thebibliography} environment.
%\item Clearly instead of \Lcs{item}, you have \Lcs{bibitem} inside \textsf{LTRbibitems} and \textsf{RTLbibitems} environments.
-%\item For \textsf{LTRbibitems} environment, if \textsf{natbib} package with \texttt{authoryear}\footnote{\texttt{authoryear} option is the default when \textsf{natbib} package is loaded.} option is loaded and if you do not specify the optional \OptArg{length}, then the value of \Lcs{leftskip} will be equal to the value of 2\Lcs{labelsep} by default and if you give this optional length, then the value of \Lcs{leftskip} will be equal to the value of \Lcs{labelsep}\(+\)\Larg{given length}.
-%\item For \textsf{RTLbibitems} environment, if \textsf{natbib} package with \texttt{authoryear} option is loaded and if you do not specify the optional \OptArg{length}, then the value of \Lcs{rightskip} will be equal to the value of 2\Lcs{labelsep} by default and if you give this optional length, then the value of \Lcs{rightskip} will be equal to the value of \Lcs{labelsep}\(+\)\Larg{given length}.
%\end{itemize}
%\subsection{\Lcs{setLTRbibitems}, \Lcs{setRTLbibitems}, and \Lcs{setdefaultbibitems} commands}
%\begin{BDef}
@@ -2520,7 +2517,7 @@ by Vafa Khalighi.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\def\bididate{2012/01/01}
-\def\bidiversion{v1.4.1}
+\def\bidiversion{v1.4.2}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\bidiinfo{%
@@ -11715,28 +11712,6 @@ bidi implementation of tufte title]
% \subsection{\textsf{natbib-xetex-bidi.def}}
% \begin{macrocode}
\ProvidesFile{natbib-xetex-bidi.def}[2011/06/04 v0.1 bidi adaptations for natbib package for XeTeX engine]
-\renewenvironment{LTRbibitems}[1][\labelsep]
- {\par\@RTLfalse
- \if@RTLtab\parshape \@ne \@totalleftmargin \dimexpr(\linewidth-\leftmargin)\fi
- \ifNAT@numbers
- \if@bidi@list@minipage@parbox\rightskip\else\leftskip\fi\labelwidth
- \else
- \if@bidi@list@minipage@parbox\rightskip\else\leftskip\fi\labelsep
- \fi
- \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
- \ignorespaces}{\endtrivlist}
-\renewenvironment{RTLbibitems}[1][\labelsep]
- {\par\@RTLtrue
- \if@RTLtab\parshape \@ne \dimexpr(\@totalleftmargin+\leftmargin) \dimexpr(\linewidth-\leftmargin)\fi
- \ifNAT@numbers
- \if@bidi@list@minipage@parbox\leftskip\else\rightskip\fi\labelwidth
- \else
- \if@bidi@list@minipage@parbox\leftskip\else\rightskip\fi\labelsep
- \fi
- \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
- \ignorespaces}{\endtrivlist}
\renewenvironment{thebibliography}[1]{%
\bibsection
\parindent\z@
@@ -15896,33 +15871,41 @@ bidi implementation of tufte title]
\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