summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-27 23:21:38 +0000
committerKarl Berry <karl@freefriends.org>2016-11-27 23:21:38 +0000
commitc626519eff6a3b04317076664aff8e82a0e705cf (patch)
tree7922ac902e102fd595516d5aa223a6976037a55b /Master/texmf-dist/source/xelatex
parentbfed047a77040d20a5deaecf0eac0cbd2ba93319 (diff)
bidi (27nov16)
git-svn-id: svn://tug.org/texlive/trunk@42593 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi.dtx90
1 files changed, 48 insertions, 42 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
index a3418f2de3b..9d523b79fb3 100644
--- a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
+++ b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
@@ -5,7 +5,7 @@
%<*readme>
___________________
The bidi package
-v20.4
+v20.5
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -25,7 +25,7 @@ a minimal working example showing the issue, and always choose the appropriate
label for your query (i.e. if you are reporting any bugs, choose `Bug' label).
-Current version release date: 2016/11/25
+Current version release date: 2016/11/27
___________________
Vafa Khalighi
@@ -322,7 +322,7 @@ by Vafa Khalighi.
%\changes{v13.9}{2013/09/23}{Added implementaion of the package.}
% \title{\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}\\
%\LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt]
-%\large Documentation for \textcolor{blue!65!black}{version 20.4}}
+%\large Documentation for \textcolor{blue!65!black}{version 20.5}}
% \author{Vafa Khalighi\\
% \url{persian-tex@tug.org}}
%\setcounter{page}{0}
@@ -333,7 +333,7 @@ by Vafa Khalighi.
%\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}
%
%\Large
-%Documentation for \textcolor{blue!65!black}{version 20.4}}
+%Documentation for \textcolor{blue!65!black}{version 20.5}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -384,7 +384,7 @@ by Vafa Khalighi.
%*
%* Copyright (c) 2009--2016 Vafa Khalighi
%*
-%* 2016/11/25, v20.4
+%* 2016/11/27, v20.5
%*
%* License: LaTeX Project Public License, version
%* 1.3c or higher (your choice)
@@ -1141,7 +1141,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{47575}
+%% \CheckSum{47549}
%% \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
@@ -2984,8 +2984,8 @@ by Vafa Khalighi.
% \subsection{\textsf{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2016/11/25}
-\def\bidiversion{v20.4}
+\def\bididate{2016/11/27}
+\def\bidiversion{v20.5}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\@bidi@info{****************************************************^^J%
@@ -3025,6 +3025,8 @@ Bidirectional typesetting in plain TeX and LaTeX]
\eqnewif{\if@RTL}{\if@rl}
\newif\if@nonlatin
\eqnewif{\if@RTLtab}{\if@tab@rl}
+\newcommand*{\setRTLtable}{\@RTLtabtrue}
+\newcommand*{\setLTRtable}{\@RTLtabfalse}
\newif\if@RTLmarginpar
\newif\if@LTRmarginpar
\newif\if@LTRbibitems
@@ -3923,7 +3925,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
% \subsection{\textsf{biditools.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{biditools}[2016/11/25 v0.9 Programming tools for bidi package]
+\ProvidesPackage{biditools}[2016/11/27 v0.9 Programming tools for bidi package]
\providecommand{\@bidi@saveprimitive}[2]{\begingroup\escapechar`\\\relax
\edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
\ifx\@tempa\@tempb \global\let#2#1%
@@ -4052,6 +4054,18 @@ ill-advised in the old versions of bidi package.%
\else
\expandafter\@firstoftwo
\fi}
+\newcommand*{\ifRtoLtable}{%
+ \if@RTLtab
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\newcommand*{\ifLtoRtable}{%
+ \if@RTLtab
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
\newcommand*{\iflatin}{%
\if@nonlatin
\expandafter\@secondoftwo
@@ -7854,40 +7868,28 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{cals-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{cals-xetex-bidi.def}[2013/05/28 v0.3 bidi adaptations for cals package for XeTeX engine]
-\renewenvironment{calstable}[1][c]{%
-\if@RTL\@RTLtabtrue\cals@activate@rtl\fi
- \if l#1%
- \if@RTLtab\leftskip\fill \rightskip\z@\else\leftskip\z@ \rightskip\fill\fi
- \else\if r#1%
- \if@RTLtab\leftskip\z@ \rightskip\fill\else\leftskip\fill \rightskip\z@\fi
- \else\if c#1%
- \leftskip\fill \rightskip\fill
- \fi\fi\fi
-\let\cals@thead@tokens=\relax
-\let\cals@tfoot@tokens=\relax
-\let\cals@tbreak@tokens=\relax
-\cals@tfoot@height=0pt \relax
-\let\cals@last@context=n%
-\let\cals@current@context=b%
-\parindent=0pt %
-\cals@setpadding{Ag}\cals@setcellprevdepth{Al}\cals@set@tohsize%
-%% Alignment inside is independent on center/flushright outside
-\parfillskip=0pt plus1fil\relax
-\let\cals@borderL=\relax
-\let\cals@borderR=\relax
-\let\cals@borderT=\relax
-\let\cals@borderB=\relax
-}{% End of the table
-\cals@tfoot@tokens\lastrule\@RTLtabfalse}
-
+\ProvidesFile{cals-xetex-bidi.def}[2016/11/27 v0.4 bidi adaptations for cals package for XeTeX engine]
+\renewcommand\cals@setup@alignment[1]{%
+\if c#1\relax \cals@vfillAdd \leftskip \cals@vfillAdd \rightskip \fi
+\if l#1\relax \cals@vfillDrop\leftskip \cals@vfillDrop\rightskip \fi
+\if r#1\relax \cals@vfillAdd \leftskip \cals@vfillDrop\rightskip \fi
+}
+\renewcommand\cals@table@alignment{\if@RTLtab r\else l\fi}
+\renewcommand\cals@AtEndTable{\@RTLtabfalse}
\renewcommand\alignL{%
-\dimen0=\cals@paddingL \if@RTLtab\cals@paddingL=\dimen0 plus 1fill\else\cals@paddingL=\dimen0\fi \relax
-\dimen0=\cals@paddingR \cals@paddingR=\dimen0 \relax}
-
+\if@RTLtab
+ \cals@vfillAdd\cals@paddingL
+\else
+ \cals@vfillDrop\cals@paddingL
+\fi
+\cals@vfillDrop\cals@paddingR}
\renewcommand\alignR{%
-\dimen0=\cals@paddingL \if@RTLtab\cals@paddingL=\dimen0\else\cals@paddingL=\dimen0 plus 1fill\fi\relax
-\dimen0=\cals@paddingR \cals@paddingR=\dimen0 \relax}
+\if@RTLtab
+ \cals@vfillDrop\cals@paddingL
+\else
+ \cals@vfillAdd\cals@paddingL
+\fi
+\cals@vfillDrop\cals@paddingR}
% \end{macrocode}
% \iffalse
%</cals-xetex-bidi.def>
@@ -15482,7 +15484,7 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{multicol-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{multicol-xetex-bidi.def}[2015/11/14 v0.7 bidi adaptations for multicol package for XeTeX engine]
+\ProvidesFile{multicol-xetex-bidi.def}[2016/11/27 v0.8 bidi adaptations for multicol package for XeTeX engine]
% \end{macrocode}
%\changes{v14.2}{2013/11/11}{Fixed the wrong order of toc, lot, lof, etc with \textsf{multicol} package.}
% \begin{macrocode}
@@ -15534,6 +15536,9 @@ bidi implementation of tufte title]
}
\def\RTL@column@boxes{%
+ \ifnum\col@number<\tw@
+ \LTR@column@boxes
+ \else
\process@cols\mult@gfirstbox{%
\hskip\hsize
\hss{\columnseprulecolor\vrule
@@ -15556,6 +15561,7 @@ bidi implementation of tufte title]
\box\mult@rightbox
\hskip-\hsize
\hskip\full@width
+ \fi
}
\newcommand\RTLmulticolcolumns
{\let\bidi@multicol@align@columns