diff options
Diffstat (limited to 'Master/texmf-dist/source/xelatex/bidi/bidi.dtx')
-rw-r--r-- | Master/texmf-dist/source/xelatex/bidi/bidi.dtx | 184 |
1 files changed, 106 insertions, 78 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx index 8fac7c9007e..b579ec0d58b 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 -v31.8 +v31.9 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: 2017/12/29 +Current version release date: 2017/12/30 ___________________ Vafa Khalighi @@ -324,7 +324,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 31.8}} +%\large Documentation for \textcolor{blue!65!black}{version 31.9}} % \author{Vafa Khalighi\\ % \url{persian-tex@tug.org}} %\setcounter{page}{0} @@ -335,7 +335,7 @@ by Vafa Khalighi. %\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}} % %\Large -%Documentation for \textcolor{blue!65!black}{version 31.8}} +%Documentation for \textcolor{blue!65!black}{version 31.9}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -386,7 +386,7 @@ by Vafa Khalighi. %* %* Copyright (c) 2009--2017 Vafa Khalighi %* -%* 2017/12/29, v31.8 +%* 2017/12/30, v31.9 %* %* License: LaTeX Project Public License, version %* 1.3c or higher (your choice) @@ -1141,7 +1141,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{49455} +%% \CheckSum{49360} %% \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 @@ -2764,8 +2764,8 @@ by Vafa Khalighi. % \subsection{\textsf{bidi.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\bididate{2017/12/29} -\def\bidiversion{v31.8} +\def\bididate{2017/12/30} +\def\bidiversion{v31.9} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\@bidi@info{****************************************************^^J% @@ -9278,96 +9278,124 @@ bidi implementation of tufte title] %\fi % \subsection{\textsf{diagbox-xetex-bidi.def}} % \begin{macrocode} -\ProvidesFile{diagbox-xetex-bidi.def}[2017/12/29 v0.1 bidi adaptations for diagbox package for XeTeX engine] -\bidi@patchcmd{\diagbox@double@pict@SE}{% - \put(0,0) {\makebox(0,0)[bl]{\box\diagbox@boxa}} - \put(\strip@pt\diagbox@wd,\strip@pt\diagbox@ht) {\makebox(0,0)[tr]{\box\diagbox@boxb}} -}{% +\ProvidesFile{diagbox-xetex-bidi.def}[2017/12/30 v0.2 bidi adaptations for diagbox package for XeTeX engine] +\bidi@patchcmd{\diagbox@double}{% + \begin{tabular}{@{\hspace{\diagbox@insepl}}>{\diagbox@font}l@{}} +}{\bidi@@diagbox@double@ii}{}{} +\bidi@patchcmd{\diagbox@double}{% + \begin{tabular}{@{}>{\diagbox@font}r@{\hspace{\diagbox@insepr}}} +}{\bidi@@diagbox@double@iii}{}{} +\newcommand*{\bidi@@diagbox@double@ii}{% + \if@RTL + \begin{tabular}{@{}>{\diagbox@font}r@{\hspace{\diagbox@insepl}}} + \else + \begin{tabular}{@{\hspace{\diagbox@insepl}}>{\diagbox@font}l@{}} + \fi +} +\newcommand*{\bidi@@diagbox@double@iii}{% \if@RTL - \put(\strip@pt\diagbox@insepl,0) {\makebox(0,0)[bl]{\box\diagbox@boxa}} - \put(\strip@pt\dimexpr\diagbox@wd-\diagbox@insepr\relax,\strip@pt\diagbox@ht) {\makebox(0,0)[tr]{\box\diagbox@boxb}} + \begin{tabular}{@{\hspace{\diagbox@insepr}}>{\diagbox@font}l@{}} \else - \put(0,0) {\makebox(0,0)[bl]{\box\diagbox@boxa}} - \put(\strip@pt\diagbox@wd,\strip@pt\diagbox@ht) {\makebox(0,0)[tr]{\box\diagbox@boxb}} + \begin{tabular}{@{}>{\diagbox@font}r@{\hspace{\diagbox@insepr}}} \fi +} +\bidi@patchcmd{\diagbox@triple@setbox@NW}{% + \begin{tabular}{@{\hspace{\diagbox@insepl}}>{\diagbox@font}l@{}} +}{\bidi@@diagbox@triple@setbox@NW@tabular@i@ii}{}{} +\bidi@patchcmd{\diagbox@triple@setbox@NW}{% + \begin{tabular}{@{\hspace{\diagbox@insepl}}>{\diagbox@font}l@{}} +}{\bidi@@diagbox@triple@setbox@NW@tabular@i@ii}{}{} +\bidi@patchcmd{\diagbox@triple@setbox@NW}{% + \begin{tabular}{@{}>{\diagbox@font}r@{\hspace{\diagbox@insepr}}} +}{\bidi@@diagbox@triple@setbox@NW@tabular@iii}{}{} +\newcommand*{\bidi@@diagbox@triple@setbox@NW@tabular@i@ii}{% + \if@RTL + \begin{tabular}{@{}>{\diagbox@font}r@{\hspace{\diagbox@insepl}}} + \else + \begin{tabular}{@{\hspace{\diagbox@insepl}}>{\diagbox@font}l@{}} + \fi} +\newcommand*{\bidi@@diagbox@triple@setbox@NW@tabular@iii}{% + \if@RTL + \begin{tabular}{@{\hspace{\diagbox@insepr}}>{\diagbox@font}l@{}} + \else + \begin{tabular}{@{}>{\diagbox@font}r@{\hspace{\diagbox@insepr}}} + \fi} +\let\diagbox@triple@setbox@SW\diagbox@triple@setbox@NW +\bidi@patchcmd{\diagbox@triple@setbox@SE}{% + \begin{tabular}{@{\hspace{\diagbox@insepl}}l@{}}% +}{\bidi@@diagbox@triple@setbox@SE@tabular@i}{}{} +\bidi@patchcmd{\diagbox@triple@setbox@SE}{% + \begin{tabular}{@{}r@{\hspace{\diagbox@insepr}}}% +}{\bidi@@diagbox@triple@setbox@SE@tabular@ii@iii}{}{} +\bidi@patchcmd{\diagbox@triple@setbox@SE}{% + \begin{tabular}{@{}r@{\hspace{\diagbox@insepr}}}% +}{\bidi@@diagbox@triple@setbox@SE@tabular@ii@iii}{}{} +\newcommand*{\bidi@@diagbox@triple@setbox@SE@tabular@i}{% + \if@RTL + \begin{tabular}{@{}r@{\hspace{\diagbox@insepl}}} + \else + \begin{tabular}{@{\hspace{\diagbox@insepl}}l@{}} + \fi +} +\newcommand*{\bidi@@diagbox@triple@setbox@SE@tabular@ii@iii}{% + \if@RTL + \begin{tabular}{@{\hspace{\diagbox@insepr}}l@{}} + \else + \begin{tabular}{@{}r@{\hspace{\diagbox@insepr}}} + \fi +} +\let\diagbox@triple@setbox@NE\diagbox@triple@setbox@SE +\bidi@patchcmd{\diagbox@double@pict@SE}{% + \diagbox@setlinecolor + \Line(0,\strip@pt\diagbox@ht)(\strip@pt\diagbox@wd,0)% +}{% + {\diagbox@setlinecolor + \Line(0,\strip@pt\diagbox@ht)(\strip@pt\diagbox@wd,0)}% }{}{} \let\diagbox@double@pict@NW\diagbox@double@pict@SE \bidi@patchcmd{\diagbox@double@pict@NE}{% - \put(0,\strip@pt\diagbox@ht) {\makebox(0,0)[tl]{\box\diagbox@boxa}} - \put(\strip@pt\diagbox@wd,0) {\makebox(0,0)[br]{\box\diagbox@boxb}} + \diagbox@setlinecolor + \Line(0,0)(\strip@pt\diagbox@wd,\strip@pt\diagbox@ht)% }{% - \if@RTL - \put(\strip@pt\diagbox@insepl,\strip@pt\diagbox@ht) {\makebox(0,0)[tl]{\box\diagbox@boxa}} - \put(\strip@pt\dimexpr\diagbox@wd-\diagbox@insepr\relax,0) {\makebox(0,0)[br]{\box\diagbox@boxb}} - \else - \put(0,\strip@pt\diagbox@ht) {\makebox(0,0)[tl]{\box\diagbox@boxa}} - \put(\strip@pt\diagbox@wd,0) {\makebox(0,0)[br]{\box\diagbox@boxb}} - \fi + {\diagbox@setlinecolor + \Line(0,0)(\strip@pt\diagbox@wd,\strip@pt\diagbox@ht)}% }{}{} \let\diagbox@double@pict@SW\diagbox@double@pict@NE - \bidi@patchcmd{\diagbox@triple@pict@NW}{% - \put(0,0) {\makebox(0,0)[bl]{\box\diagbox@boxa}} - \put(0,\y) {\makebox(0,0)[tl]{\box\diagbox@boxm}} - \put(\x,\y) {\makebox(0,0)[tr]{\box\diagbox@boxb}} + \diagbox@setlinecolor + \Line(0,\yym)(\x,0) + \Line(\xm,\y)(\x,0)% }{% - \if@RTL - \put(\strip@pt\diagbox@insepl,0) {\makebox(0,0)[bl]{\box\diagbox@boxa}} - \put(\strip@pt\diagbox@insepl,\y) {\makebox(0,0)[tl]{\box\diagbox@boxm}} - \put(\strip@pt\dimexpr\x pt-\diagbox@insepr\relax,\y) {\makebox(0,0)[tr]{\box\diagbox@boxb}} - \else - \put(0,0) {\makebox(0,0)[bl]{\box\diagbox@boxa}} - \put(0,\y) {\makebox(0,0)[tl]{\box\diagbox@boxm}} - \put(\x,\y) {\makebox(0,0)[tr]{\box\diagbox@boxb}} - \fi + {\diagbox@setlinecolor + \Line(0,\yym)(\x,0) + \Line(\xm,\y)(\x,0)}% }{}{} - \bidi@patchcmd{\diagbox@triple@pict@NE}{% - \put(0,\y) {\makebox(0,0)[tl]{\box\diagbox@boxa}} - \put(\x,\y) {\makebox(0,0)[tr]{\box\diagbox@boxm}} - \put(\x,0) {\makebox(0,0)[br]{\box\diagbox@boxb}} + \diagbox@setlinecolor + \Line(0,0)(\xxm,\y) + \Line(0,0)(\x,\yym)% }{% - \if@RTL - \put(\strip@pt\diagbox@insepl,\y) {\makebox(0,0)[tl]{\box\diagbox@boxa}} - \put(\strip@pt\dimexpr\x pt-\diagbox@insepr\relax,\y) {\makebox(0,0)[tr]{\box\diagbox@boxm}} - \put(\strip@pt\dimexpr\x pt-\diagbox@insepr\relax,0) {\makebox(0,0)[br]{\box\diagbox@boxb}} - \else - \put(0,\y) {\makebox(0,0)[tl]{\box\diagbox@boxa}} - \put(\x,\y) {\makebox(0,0)[tr]{\box\diagbox@boxm}} - \put(\x,0) {\makebox(0,0)[br]{\box\diagbox@boxb}} - \fi + {\diagbox@setlinecolor + \Line(0,0)(\xxm,\y) + \Line(0,0)(\x,\yym)}% }{}{} - \bidi@patchcmd{\diagbox@triple@pict@SW}{% - \put(0,\y) {\makebox(0,0)[tl]{\box\diagbox@boxa}} - \put(0,0) {\makebox(0,0)[bl]{\box\diagbox@boxm}} - \put(\x,0) {\makebox(0,0)[br]{\box\diagbox@boxb}} + \diagbox@setlinecolor + \Line(0,\ym)(\x,\y) + \Line(\xm,0)(\x,\y)% }{% - \if@RTL - \put(\strip@pt\diagbox@insepl,\y) {\makebox(0,0)[tl]{\box\diagbox@boxa}} - \put(\strip@pt\diagbox@insepl,0) {\makebox(0,0)[bl]{\box\diagbox@boxm}} - \put(\strip@pt\dimexpr\x pt-\diagbox@insepr\relax,0) {\makebox(0,0)[br]{\box\diagbox@boxb}} - \else - \put(0,\y) {\makebox(0,0)[tl]{\box\diagbox@boxa}} - \put(0,0) {\makebox(0,0)[bl]{\box\diagbox@boxm}} - \put(\x,0) {\makebox(0,0)[br]{\box\diagbox@boxb}} - \fi + {\diagbox@setlinecolor + \Line(0,\ym)(\x,\y) + \Line(\xm,0)(\x,\y)}% }{}{} - \bidi@patchcmd{\diagbox@triple@pict@SE}{% - \put(0,0) {\makebox(0,0)[bl]{\box\diagbox@boxa}} - \put(\x,0) {\makebox(0,0)[br]{\box\diagbox@boxm}} - \put(\x,\y) {\makebox(0,0)[tr]{\box\diagbox@boxb}} + \diagbox@setlinecolor + \Line(0,\y)(\xxm,0) + \Line(0,\y)(\x,\ym)% }{% - \if@RTL - \put(\strip@pt\diagbox@insepl,0) {\makebox(0,0)[bl]{\box\diagbox@boxa}} - \put(\strip@pt\dimexpr\x pt-\diagbox@insepr\relax,0) {\makebox(0,0)[br]{\box\diagbox@boxm}} - \put(\strip@pt\dimexpr\x pt-\diagbox@insepr\relax,\y) {\makebox(0,0)[tr]{\box\diagbox@boxb}} - \else - \put(0,0) {\makebox(0,0)[bl]{\box\diagbox@boxa}} - \put(\x,0) {\makebox(0,0)[br]{\box\diagbox@boxm}} - \put(\x,\y) {\makebox(0,0)[tr]{\box\diagbox@boxb}} - \fi + {\diagbox@setlinecolor + \Line(0,\y)(\xxm,0) + \Line(0,\y)(\x,\ym)}% }{}{} % \end{macrocode} % \iffalse |