diff options
author | Karl Berry <karl@freefriends.org> | 2015-11-07 23:19:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-11-07 23:19:33 +0000 |
commit | 7997142fbde257d4323fb42fbd6704735854bd8c (patch) | |
tree | d69f67d9eb80eddbec39f103da1bb21fa79dbbdf /Master/texmf-dist/source/xelatex | |
parent | 91449cc24796eb4d5d9c14a4c61ba8ca0d3ccc32 (diff) |
bidi (7nov15)
git-svn-id: svn://tug.org/texlive/trunk@38794 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r-- | Master/texmf-dist/source/xelatex/bidi/bidi.dtx | 86 |
1 files changed, 69 insertions, 17 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx index 4551863ef11..2257ad2123c 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 -v18.1 +v18.2 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: 2015/10/16 +Current version release date: 2015/11/07 ___________________ Vafa Khalighi @@ -320,7 +320,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 18.1}} +%\large Documentation for \textcolor{blue!65!black}{version 18.2}} % \author{Vafa Khalighi\\ % \url{persian-tex@tug.org}} %\setcounter{page}{0} @@ -331,7 +331,7 @@ by Vafa Khalighi. %\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}} % %\Large -%Documentation for \textcolor{blue!65!black}{version 18.1}} +%Documentation for \textcolor{blue!65!black}{version 18.2}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -382,7 +382,7 @@ by Vafa Khalighi. %* %* Copyright (c) 2009--2015 Vafa Khalighi %* -%* 2015/10/16, v18.1 +%* 2015/11/07, v18.2 %* %* License: LaTeX Project Public License, version %* 1.3c or higher (your choice) @@ -1139,7 +1139,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{44787} +%% \CheckSum{44926} %% \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 @@ -1561,7 +1561,7 @@ by Vafa Khalighi. %\fi % \subsection{\textsf{array-xetex-bidi.def}} % \begin{macrocode} -\ProvidesFile{array-xetex-bidi.def}[2010/08/01 v0.2b bidi adaptations for array package for XeTeX engine] +\ProvidesFile{array-xetex-bidi.def}[2015/11/07 v0.3 bidi adaptations for array package for XeTeX engine] \def\@testpach{\@chclass \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else \ifnum \@lastchclass=7 5 \else @@ -1614,7 +1614,7 @@ by Vafa Khalighi. \lineskip \z@ \baselineskip \z@ \m@th - \let\\\@arraycr \let\tabularnewline\\\let\par\@empty \if@RTLtab\hbox\bgroup\beginR\vbox\bgroup\fi\@preamble} + \let\\\@arraycr \let\tabularnewline\\\let\par\@empty \if@RTLtab\hbox\bgroup\beginR\if #1t\vtop \else \vbox \fi\bgroup\fi\@preamble} \def\@tabarray{\@ifnextchar[{\@array}{\@array[c]}} \def\endarray{\crcr \egroup\if@RTLtab\egroup\endR\egroup\fi \egroup \@arrayright \gdef\@preamble{}} \def\array{\col@sep\arraycolsep @@ -2761,8 +2761,8 @@ by Vafa Khalighi. % \subsection{\textsf{bidi.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\bididate{2015/10/16} -\def\bidiversion{v18.1} +\def\bididate{2015/11/07} +\def\bidiversion{v18.2} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\@bidi@info{****************************************************^^J% @@ -3680,7 +3680,7 @@ Bidirectional typesetting in plain TeX and LaTeX] % \subsection{\textsf{biditools.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{biditools}[2015/10/03 v0.6 Programming tools for bidi package] +\ProvidesPackage{biditools}[2015/10/31 v0.7 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% @@ -3743,6 +3743,29 @@ Bidirectional typesetting in plain TeX and LaTeX] \fi \bidi@process@envbody % A little tricky! Note the grouping } +\long\def\bidi@new@ifnextchar#1#2#3{% + \let\reserved@d= #1% + \def\reserved@a{#2}\def\reserved@b{#3}% + \futurelet\@let@token\bidi@new@ifnch +} +\def\bidi@new@ifnch{% + \ifx\@let@token\reserved@d \let\reserved@b\reserved@a \fi + \reserved@b +} +\def\bidi@matrix@check#1{% + \expandafter\ifx\csname\@currenvir\endcsname#1% + \else\bidi@matrix@error#1% + \expandafter\@gobble + \fi +} +\def\bidi@matrix@error#1{% + \PackageError{biditools}{% +Old form `\string#1' should be \string\begin{\expandafter\@gobble\string#1}% + }{% +`\string#1{...}' is old bidi package syntax whose use is +ill-advised in the old versions of bidi package.% + }% +} \def\@tagsextension{clo} \def\@definitionfileextension{def} \def\@iftagsloaded{\@ifl@aded\@tagsextension} @@ -17926,7 +17949,7 @@ to\rtside{\box\bslice\hfil}} %\fi % \subsection{\textsf{stabular-xetex-bidi.def}} % \begin{macrocode} -\ProvidesFile{stabular-xetex-bidi.def}[2010/08/01 v0.2 bidi adaptations for stabular package for XeTeX engine] +\ProvidesFile{stabular-xetex-bidi.def}[2015/11/07 v0.3 bidi adaptations for stabular package for XeTeX engine] \def\@stabular{\if@RTL\@RTLtabtrue\fi \leavevmode \bgroup \if@RTLtab\beginR \fi \let\@acol\@tabacol @@ -17951,7 +17974,7 @@ to\rtside{\box\bslice\hfil}} \let\@sharp##% \set@typeset@protect \lineskip\z@skip\baselineskip\z@skip - \if@RTLtab\hbox\bgroup\beginR\vbox\bgroup\fi + \if@RTLtab\hbox\bgroup\beginR\if #1t\vtop \else \vbox \fi\bgroup\fi \@preamble} % \end{macrocode} % \iffalse @@ -17972,7 +17995,7 @@ to\rtside{\box\bslice\hfil}} %\fi % \subsection{\textsf{tabls-xetex-bidi.def}} % \begin{macrocode} -\ProvidesFile{tabls-xetex-bidi.def}[2010/08/01 v0.2 bidi adaptations for tabls package for XeTeX engine] +\ProvidesFile{tabls-xetex-bidi.def}[2015/11/07 v0.3 bidi adaptations for tabls package for XeTeX engine] \def\endtabular{\endarray $\if@RTLtab\endR\fi\egroup \@RTLtabfalse} @@ -18005,7 +18028,7 @@ to\rtside{\box\bslice\hfil}} \global\@arstheight\ht\@arstrutbox \global\@arstdepth\dp\@arstrutbox \advance\extrarulesep.5\arrayrulewidth \let\@sharp##\let\protect\relax \lineskip\z@skip \baselineskip\z@skip - \if@RTLtab\hbox\bgroup\beginR\vbox\bgroup\fi + \if@RTLtab\hbox\bgroup\beginR\if#1t\vtop \else \vbox \fi\bgroup\fi \@preamble} % \end{macrocode} % \iffalse @@ -19276,7 +19299,7 @@ to\rtside{\box\bslice\hfil}} %\fi % \subsection{\textsf{latex-xetex-bidi.def}} % \begin{macrocode} -\ProvidesFile{latex-xetex-bidi.def}[2015/10/16 v1.2.1 bidi adaptations for `latex.ltx' for XeTeX engine] +\ProvidesFile{latex-xetex-bidi.def}[2015/11/07 v1.2.3 bidi adaptations for `latex.ltx' for XeTeX engine] \newcommand{\TeXXeTOn}{\TeXXeTstate=1 } \newcommand{\TeXXeTOff}{\TeXXeTstate=0 } \TeXXeTOn @@ -19361,8 +19384,37 @@ to\rtside{\box\bslice\hfil}} \let\setRL=\setRTL \let\setLR=\setLTR \let\unsetRL=\setLTR +\def\bidi@tabular@RTLcases{\let\@halignto\@empty\@bidi@tabular@RTLcases} +\@ifpackageloaded{array}{% +\def\@bidi@tabular@RTLcases{\@RTLtabtrue% + \leavevmode + \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\@bidi@tabular@RTLcases{\@RTLtabtrue% + \leavevmode \hbox \bgroup + $\left.\let\@acol\@tabacol + \let\@classz\@tabclassz + \let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray} + +\def\endbidi@tabular@RTLcases{\crcr\egroup\if@RTLtab\egroup\endR\egroup\fi + \egroup\right\rbrace $\egroup + \@RTLtabfalse} +} \def\RTLcases#1{\left.\vcenter{\normalbaselines\m@th \ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\,\right\}} +\renewenvironment{RTLcases}{% + \bidi@matrix@check\RTLcases\env@RTLcases +}{% + \endbidi@tabular@RTLcases% +} +\def\env@RTLcases{% + \let\@ifnextchar\bidi@new@ifnextchar + \def\arraystretch{1.2}% + \bidi@tabular@RTLcases{@{}r@{\quad}r@{}}% +} \def\SepMark#1{\gdef\@SepMark{\if@RTL\fi#1\if@RTL\fi}} \SepMark{.} \def\@thmcountersep{\@SepMark} @@ -19552,7 +19604,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\vbox\bgroup\fi + \if@RTLtab\hbox\bgroup\beginR\if #1t\vtop \else \vbox \fi\bgroup\fi \@preamble} \def\array{\let\@acol\@arrayacol \let\@classz\@arrayclassz \let\@classiv\@arrayclassiv |