From 2184023a22fd72fd264fe3ff8e7f547853d07f9f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 20 Oct 2011 22:30:51 +0000 Subject: bidi (20oct11) git-svn-id: svn://tug.org/texlive/trunk@24342 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/bidi/README | 2 +- Master/texmf-dist/doc/latex/bidi/bidi.pdf | Bin 152465 -> 148531 bytes Master/texmf-dist/source/latex/bidi/bidi.dtx | 87 +++++++++------------ Master/texmf-dist/tex/latex/bidi/bidi.sty | 2 +- .../tex/latex/bidi/natbib-xetex-bidi.def | 22 ------ Master/texmf-dist/tex/latex/bidi/xetex-bidi.def | 48 +++++++----- 6 files changed, 65 insertions(+), 96 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/bidi/README b/Master/texmf-dist/doc/latex/bidi/README index a252722cb92..7545c82b756 100644 --- a/Master/texmf-dist/doc/latex/bidi/README +++ b/Master/texmf-dist/doc/latex/bidi/README @@ -1,6 +1,6 @@ ___________________ The bidi package -v1.4.1 +v1.4.2 This package provides a convenient interface for typesetting bidirectional texts in Plain TeX and LaTeX. diff --git a/Master/texmf-dist/doc/latex/bidi/bidi.pdf b/Master/texmf-dist/doc/latex/bidi/bidi.pdf index c3a19f8a571..10f33a23807 100644 Binary files a/Master/texmf-dist/doc/latex/bidi/bidi.pdf and b/Master/texmf-dist/doc/latex/bidi/bidi.pdf differ 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 diff --git a/Master/texmf-dist/tex/latex/bidi/bidi.sty b/Master/texmf-dist/tex/latex/bidi/bidi.sty index 3204baa9ada..324998277fd 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{v1.4.1} +\def\bidiversion{v1.4.2} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\bidiinfo{% diff --git a/Master/texmf-dist/tex/latex/bidi/natbib-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/natbib-xetex-bidi.def index 2b700158765..ed28ea86951 100644 --- a/Master/texmf-dist/tex/latex/bidi/natbib-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/natbib-xetex-bidi.def @@ -13,28 +13,6 @@ %% %% \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@ 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 -- cgit v1.2.3