From 56dd9c01dfd1ffe71d2c0709f3d26af0d8c98f6e Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 28 Dec 2017 23:45:25 +0000
Subject: bidi (28dec17)

git-svn-id: svn://tug.org/texlive/trunk@46160 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/source/xelatex/bidi/bidi.dtx | 134 +++++++++++++++++++++----
 1 file changed, 115 insertions(+), 19 deletions(-)

(limited to 'Master/texmf-dist/source/xelatex/bidi/bidi.dtx')

diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
index f7ca3947ede..8fac7c9007e 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.7
+v31.8
 
 This package provides a convenient interface for typesetting
 bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -25,12 +25,11 @@ 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/05
+Current version release date: 2017/12/29
 
 ___________________
 Vafa Khalighi
 persian-tex@tug.org
-Phone: (+61) 412486635
 
 Copyright (c) 2007--2017
 It may be distributed and/or modified under the LaTeX Project Public License,
@@ -108,6 +107,7 @@ by Vafa Khalighi.
 \generate{\file{cvthemebidicasual.sty}{\from{\jobname.dtx}{table,cvthemebidicasual.sty}}}
 \generate{\file{cvthemebidiclassic.sty}{\from{\jobname.dtx}{table,cvthemebidiclassic.sty}}}
 \generate{\file{dblfnote-xetex-bidi.def}{\from{\jobname.dtx}{table,dblfnote-xetex-bidi.def}}}
+\generate{\file{diagbox-xetex-bidi.def}{\from{\jobname.dtx}{table,diagbox-xetex-bidi.def}}}
 \generate{\file{draftwatermark-xetex-bidi.def}{\from{\jobname.dtx}{table,draftwatermark-xetex-bidi.def}}}
 \generate{\file{eso-pic-xetex-bidi.def}{\from{\jobname.dtx}{table,eso-pic-xetex-bidi.def}}}
 \generate{\file{empheq-xetex-bidi.def}{\from{\jobname.dtx}{table,empheq-xetex-bidi.def}}}
@@ -324,10 +324,9 @@ 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.7}}
+%\large Documentation for \textcolor{blue!65!black}{version 31.8}}
 % \author{Vafa Khalighi\\
-%  \url{persian-tex@tug.org}\qquad
-% Phone: (+61) 412486635}
+%  \url{persian-tex@tug.org}}
 %\setcounter{page}{0}
 %\thispagestyle{empty}
 %\includegraphics[width=.3\textwidth]{bidi-logo}\qquad
@@ -336,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.7}}
+%Documentation for \textcolor{blue!65!black}{version 31.8}}
 %
 %\vskip 0pt plus 3fill
 %\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -387,7 +386,7 @@ by Vafa Khalighi.
 %* 
 %* Copyright (c) 2009--2017 Vafa Khalighi
 %* 
-%* 2017/12/05, v31.7
+%* 2017/12/29, v31.8
 %* 
 %* License: LaTeX Project Public License, version
 %* 1.3c or higher (your choice)
@@ -398,8 +397,6 @@ by Vafa Khalighi.
 %* 
 %* Support: persian-tex@tug.org
 %*
-%* Phone: (+61) 412486635
-%*
 %****************************************************
 %\end{verbatim}
 %\part{\LaTeX\ Manual}
@@ -1144,7 +1141,7 @@ by Vafa Khalighi.
 %\iffalse
 %<*table>
 %\fi
-%% \CheckSum{49112}
+%% \CheckSum{49455}
 %% \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
@@ -2767,8 +2764,8 @@ by Vafa Khalighi.
 % \subsection{\textsf{bidi.sty}}
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
-\def\bididate{2017/12/05}
-\def\bidiversion{v31.7}
+\def\bididate{2017/12/29}
+\def\bidiversion{v31.8}
 \ProvidesPackage{bidi}[\bididate\space \bidiversion\space
 Bidirectional typesetting in plain TeX and LaTeX]
 \edef\@bidi@info{****************************************************^^J%
@@ -2794,8 +2791,6 @@ Bidirectional typesetting in plain TeX and LaTeX]
 * ^^J%
 * Support: persian-tex@tug.org^^J%
 * ^^J%
-* Phone: (+61) 412486635^^J%
-* ^^J%
 ****************************************************}
 \typeout{\@bidi@info}
 \edef\bidi@everyjob{\the\everyjob}
@@ -2995,8 +2990,6 @@ Bidirectional typesetting in plain TeX and LaTeX]
 * ^^J%
 * Support: persian-tex@tug.org^^J%
 * ^^J%
-* Phone: (+61) 412486635^^J%
-* ^^J%
 ****************************************************}
 \message{\@bidi@info}
 \edef\bidi@everyjob{\the\everyjob}
@@ -9281,6 +9274,104 @@ bidi implementation of tufte title]
 %    \end{macrocode}
 % \iffalse
 %</dblfnote-xetex-bidi.def>
+%<*diagbox-xetex-bidi.def>
+%\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}}
+}{%
+  \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}}
+  \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}}
+  \fi
+}{}{}
+\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}}
+}{%
+  \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
+}{}{}
+\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}}
+}{%
+  \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
+}{}{}
+
+\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}}
+}{%
+  \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
+}{}{}
+
+\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}}
+}{%
+  \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
+}{}{}
+
+\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}}
+}{%
+  \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
+}{}{}
+%    \end{macrocode}
+% \iffalse
+%</diagbox-xetex-bidi.def>
 %<*draftwatermark-xetex-bidi.def>
 %\fi
 % \subsection{\textsf{draftwatermark-xetex-bidi.def}}
@@ -14480,7 +14571,7 @@ bidi implementation of tufte title]
 %\fi
 % \subsection{\textsf{loadingorder-xetex-bidi.def}}
 %    \begin{macrocode}
-\ProvidesFile{loadingorder-xetex-bidi.def}[2015/10/16 v0.96 making sure that bidi is the last package loaded]
+\ProvidesFile{loadingorder-xetex-bidi.def}[2017/12/29 v0.97 making sure that bidi is the last package loaded]
 \bidi@isloaded{amsmath}
 \bidi@isloaded{amstext}
 \bidi@isloaded{amsthm}
@@ -14493,6 +14584,7 @@ bidi implementation of tufte title]
 \bidi@isloaded{cutwin}
 \bidi@isloaded{color}
 \bidi@isloaded{dblfnote}
+\bidi@isloaded{diagbox}
 \bidi@isloaded{xcolor}
 \bidi@isloaded{colortbl}
 \bidi@isloaded{float}
@@ -14591,6 +14683,9 @@ bidi implementation of tufte title]
   \if@bidi@dblfnoteloaded@\else
     \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package dblfnote after bidi package. Please load package dblfnote before bidi package, and then try to run xelatex on your document again}{}]{dblfnote}
   \fi%
+  \if@bidi@diagboxloaded@\else
+    \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package diagbox after bidi package. Please load package diagbox before bidi package, and then try to run xelatex on your document again}{}]{diagbox}
+  \fi%
   \if@bidi@xcolorloaded@\else
     \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xcolor after bidi package. Please load package xcolor before bidi package, and then try to run xelatex on your document again}{}]{xcolor}
   \fi%
@@ -21992,7 +22087,7 @@ to\rtside{\box\bslice\hfil}}
 %\fi
 % \subsection{\textsf{latex-xetex-bidi.def}}
 %    \begin{macrocode}
-\ProvidesFile{latex-xetex-bidi.def}[2017/12/05 v1.3.1 bidi adaptations  for `latex.ltx' for XeTeX engine]
+\ProvidesFile{latex-xetex-bidi.def}[2017/12/29 v1.3.2 bidi adaptations  for `latex.ltx' for XeTeX engine]
 \newcommand{\TeXXeTOn}{\TeXXeTstate=1 }
 \newcommand{\TeXXeTOff}{\TeXXeTstate=0 }
 \TeXXeTOn
@@ -22792,6 +22887,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
 \@ifpackageloaded{midfloat}{\input{midfloat-xetex-bidi.def}}{}
 \@ifpackageloaded{draftwatermark}{\input{draftwatermark-xetex-bidi.def}}{}
 \@ifpackageloaded{dblfnote}{\input{dblfnote-xetex-bidi.def}}{}
+\@ifpackageloaded{diagbox}{\input{diagbox-xetex-bidi.def}}{}
 \@ifpackageloaded{eso-pic}{\input{eso-pic-xetex-bidi.def}}{}
 \@ifpackageloaded{empheq}{\input{empheq-xetex-bidi.def}}{}
 \@ifpackageloaded{framed}{\input{framed-xetex-bidi.def}}{}
-- 
cgit v1.2.3

