summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-07 23:48:04 +0000
committerKarl Berry <karl@freefriends.org>2018-01-07 23:48:04 +0000
commit18f0b9b0009fca38c5ac4dc557f05e749b113ed1 (patch)
tree72f0527faf72f291389b9a68af583e78462b0043 /Master/texmf-dist/source/xelatex/bidi/bidi.dtx
parenta6a9903dd099b03d74e1a8b8dfd4d39fe00fa67b (diff)
bidi (7jan18)
git-svn-id: svn://tug.org/texlive/trunk@46242 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex/bidi/bidi.dtx')
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi.dtx125
1 files changed, 72 insertions, 53 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
index 1332f0380a1..90693316408 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
-v32.0
+v32.1
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: 2018/01/01
+Current version release date: 2018/01/08
___________________
Vafa Khalighi
@@ -137,6 +137,7 @@ by Vafa Khalighi.
\generate{\file{listings-xetex-bidi.def}{\from{\jobname.dtx}{table,listings-xetex-bidi.def}}}
\generate{\file{loadingorder-xetex-bidi.def}{\from{\jobname.dtx}{table,loadingorder-xetex-bidi.def}}}
\generate{\file{longtable-xetex-bidi.def}{\from{\jobname.dtx}{table,longtable-xetex-bidi.def}}}
+\generate{\file{mathtools-xetex-bidi.def}{\from{\jobname.dtx}{table,mathtools-xetex-bidi.def}}}
\generate{\file{mdframed-xetex-bidi.def}{\from{\jobname.dtx}{table,mdframed-xetex-bidi.def}}}
\generate{\file{bidi-media9.sty}{\from{\jobname.dtx}{table,bidi-media9.sty}}}
\generate{\file{memoir-xetex-bidi.def}{\from{\jobname.dtx}{table,memoir-xetex-bidi.def}}}
@@ -324,7 +325,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 32.0}}
+%\large Documentation for \textcolor{blue!65!black}{version 32.1}}
% \author{Vafa Khalighi\\
% \url{persian-tex@tug.org}}
%\setcounter{page}{0}
@@ -335,7 +336,7 @@ by Vafa Khalighi.
%\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}
%
%\Large
-%Documentation for \textcolor{blue!65!black}{version 32.0}}
+%Documentation for \textcolor{blue!65!black}{version 32.1}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -386,7 +387,7 @@ by Vafa Khalighi.
%*
%* Copyright (c) 2009--2018 Vafa Khalighi
%*
-%* 2018/01/01, v32.0
+%* 2018/01/08, v32.1
%*
%* License: LaTeX Project Public License, version
%* 1.3c or higher (your choice)
@@ -1141,7 +1142,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{49350}
+%% \CheckSum{49372}
%% \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
@@ -1532,7 +1533,7 @@ by Vafa Khalighi.
%\fi
% \subsection{\textsf{amsmath-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{amsmath-xetex-bidi.def}[2016/09/12 v1.0 bidi adaptations for amsmath package for XeTeX engine]
+\ProvidesFile{amsmath-xetex-bidi.def}[2018/01/08 v1.1 bidi adaptations for amsmath package for XeTeX engine]
\let\veqno=\eqno
\iftagsleft@ \let\veqno=\leqno \fi
\renewcommand{\numberwithin}[3][\arabic]{%
@@ -1542,7 +1543,7 @@ by Vafa Khalighi.
\@xp\xdef\csname the#2\endcsname{%
\@xp\@nx\csname the#3\endcsname \@nx\@SepMark\@nx#1{#2}}}}%
}
-\def\tagform@#1{\maketag@@@{\if@nonlatin\beginR\fi(\ignorespaces#1\unskip\@@italiccorr)\if@nonlatin\endR\fi}}
+\def\tagform@#1{\maketag@@@{\if@nonlatin\beginR\fi(\kern\z@\ignorespaces#1\unskip\@@italiccorr)\if@nonlatin\endR\fi}}
% \end{macrocode}
% \iffalse
%</amsmath-xetex-bidi.def>
@@ -2764,8 +2765,8 @@ by Vafa Khalighi.
% \subsection{\textsf{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2018/01/01}
-\def\bidiversion{v32.0}
+\def\bididate{2018/01/08}
+\def\bidiversion{v32.1}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\@bidi@info{****************************************************^^J%
@@ -2959,7 +2960,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
%\fi
% \subsection{\textsf{bidi.tex}}
% \begin{macrocode}
-\def\bididate{2018/01/01}
+\def\bididate{2018/01/08}
\def\bidiversion{v0.3}
\catcode`@=11
\let \protect \relax
@@ -9457,7 +9458,7 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{empheq-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{empheq-xetex-bidi.def}[2011/09/07 v0.1 bidi adaptations for empheq package for XeTeX engine]
+\ProvidesFile{empheq-xetex-bidi.def}[2018/01/08 v0.2 bidi adaptations for empheq package for XeTeX engine]
\MHInternalSyntaxOn
\def\EQ_tag_plus_endmark:{%
\iftagsleft@
@@ -9473,7 +9474,7 @@ bidi implementation of tufte title]
\raisebox{-\dp\EQ_mathdisplay_box
-\depthof{\EQ_outerbox:{}}}
{\PotEndMark{\hss}}}}\fi}%
- \else:
+ \MH_else:
\gdef\maketag@@@##1{%
\hbox{\m@th\normalfont##1\llap{\hss\PotEndMark{%
\settoheight{\@tempdima}{\@nameuse{\InTheoType Symbol}}%
@@ -9482,17 +9483,17 @@ bidi implementation of tufte title]
\setlength{\@tempdimb}
{\g_EQ_bottomrow_depth_dim+\depthof{\EQ_outerbox:{}}
+\depthof{\EQ_innerbox:{}}}
- \if_dim:w \@tempdima>\@tempdimb
+ \MH_if_dim:w \@tempdima>\@tempdimb
\MH_setlength:dn \@tempdima{-\dp\EQ_mathdisplay_box
-\@tempdima+\g_EQ_bottomrow_depth_dim}
\addtolength{\@tempdima}{\depthof{\EQ_innerbox:{}}}%
\def\EQ_next:{\raisebox{\@tempdima}}%
- \else:
+ \MH_else:
\def\EQ_next:{
\raisebox{-\dp\EQ_mathdisplay_box
-\depthof{\EQ_outerbox:{}}}}%
- \fi:\EQ_next:}}}}%
- \fi:}
+ \MH_fi:\EQ_next:}}}}%
+ \MH_fi:}
\def\EQ_post_process:{%
\EQ_initialize:
\EQ_begin_equation:
@@ -9504,9 +9505,9 @@ bidi implementation of tufte title]
}
\ifodd \l_EQ_alignmentmode_int
\setkeys{\MT_options_name:}{multlined-pos=b}
- \else:
+ \MH_else:
\setkeys{\MT_options_name:}{multlined-pos=t}
- \fi:
+ \MH_fi:
\g@addto@macro\EQ_complete_mathdisplay:{
\begin{MTmultlined}\relax}
}
@@ -9529,63 +9530,63 @@ bidi implementation of tufte title]
\@nameuse{EQ_modify_linewidth_
\romannumeral\l_EQ_equationtype_int\EQ_next: :}%
\EQ_typeset_display:
- \@nameuse{find_displaywidth_
+ \@nameuse{EQ_find_displaywidth_
\romannumeral\l_EQ_equationtype_int\EQ_next: :}
\MH_addtolength:dn
\l_EQ_totalwidth_dim{\l_EQ_displaywidth_dim}
\savebox\EQ_mathdisplay_box[\l_EQ_totalwidth_dim][c]{%
$\EQ_left_side:
\EQ_innerbox:{%
- \if_case:w \l_EQ_alignmentmode_int\or:
+ \MH_if_case:w \l_EQ_alignmentmode_int\MH_or:
\makebox[\l_EQ_displaywidth_dim][c]
{\usebox{\EQ_mathdisplay_box}}%
- \or:
+ \MH_or:
\makebox[\l_EQ_displaywidth_dim][c]
{\usebox{\EQ_mathdisplay_box}}%
- \or:
+ \MH_or:
\if@RTL\makebox[\l_EQ_displaywidth_dim][r]{%
- \if_num:w \l_EQ_equationtype_int=5 \else:
- \if_num:w \l_EQ_equationtype_int=6 \else:
+ \MH_if_num:w \l_EQ_equationtype_int=5 \MH_else:
+ \MH_if_num:w \l_EQ_equationtype_int=6 \MH_else:
\kern-\@mathmargin
- \fi:
- \fi:
+ \MH_fi:
+ \MH_fi:
\usebox{\EQ_mathdisplay_box}}%
\else\makebox[\l_EQ_displaywidth_dim][l]{%
- \if_num:w \l_EQ_equationtype_int=5 \else:
- \if_num:w \l_EQ_equationtype_int=6 \else:
+ \MH_if_num:w \l_EQ_equationtype_int=5 \MH_else:
+ \MH_if_num:w \l_EQ_equationtype_int=6 \MH_else:
\kern-\@mathmargin
- \fi:
- \fi:
+ \MH_fi:
+ \MH_fi:
\usebox{\EQ_mathdisplay_box}}\fi%
- \or:
+ \MH_or:
\if@RTL\makebox[\l_EQ_displaywidth_dim][r]{%
- \if_num:w \l_EQ_equationtype_int=5 \else:
- \if_num:w \l_EQ_equationtype_int=6 \else:
+ \MH_if_num:w \l_EQ_equationtype_int=5 \MH_else:
+ \MH_if_num:w \l_EQ_equationtype_int=6 \MH_else:
\kern-\@mathmargin
- \fi:
- \fi:
+ \MH_fi:
+ \MH_fi:
\usebox{\EQ_mathdisplay_box}}
\else\makebox[\l_EQ_displaywidth_dim][l]{%
- \if_num:w \l_EQ_equationtype_int=5 \else:
- \if_num:w \l_EQ_equationtype_int=6 \else:
+ \MH_if_num:w \l_EQ_equationtype_int=5 \MH_else:
+ \MH_if_num:w \l_EQ_equationtype_int=6 \MH_else:
\kern-\@mathmargin
- \fi:
- \fi:
+ \MH_fi:
+ \MH_fi:
\usebox{\EQ_mathdisplay_box}}\fi%
- \fi:}%
+ \MH_fi:}%
\EQ_right_side:$}%
\begin{AmSequation*}
\@nameuse{EQ_place_display_
\romannumeral\l_EQ_equationtype_int\EQ_next: :}
- \if_dim:w \g_EQ_widesttag_dim>\z@
+ \MH_if_dim:w \g_EQ_widesttag_dim>\z@
\MH_set_boolean_T:n {show_manual_tags}
- \if_case:w \l_EQ_alignmentmode_int
- \or: \if@RTL\EQ_place_tag:N l\else\EQ_place_tag:N r\fi %#1
- \or: \if@RTL\EQ_place_tag:N r\else\EQ_place_tag:N l\fi %#2
- \or: \if@RTL\EQ_place_tag:N l\else\EQ_place_tag:N r\fi %#3
- \or: \if@RTL\EQ_place_tag:N r\else\EQ_place_tag:N l\fi %#4
- \fi:
- \fi:
+ \MH_if_case:w \l_EQ_alignmentmode_int
+ \MH_or: \if@RTL\EQ_place_tag:N l\else\EQ_place_tag:N r\fi %#1
+ \MH_or: \if@RTL\EQ_place_tag:N r\else\EQ_place_tag:N l\fi %#2
+ \MH_or: \if@RTL\EQ_place_tag:N l\else\EQ_place_tag:N r\fi %#3
+ \MH_or: \if@RTL\EQ_place_tag:N r\else\EQ_place_tag:N l\fi %#4
+ \MH_fi:
+ \MH_fi:
\end{AmSequation*}
\global\c@equation=\l_EQ_equation_fint\relax
}
@@ -14327,10 +14328,10 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{leqno-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{leqno-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for leqno tag for XeTeX engine]
+\ProvidesFile{leqno-xetex-bidi.def}[2018/01/07 v0.2 bidi adaptations for leqno tag for XeTeX engine]
\renewcommand\@eqnnum{\hb@xt@.01\p@{}%
- \rlap{
- \hskip -\displaywidth{\normalfont\normalcolor\if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}}
+ \rlap{\hskip -\displaywidth
+ {\normalfont\normalcolor\if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}}
% \end{macrocode}
% \iffalse
%</leqno-xetex-bidi.def>
@@ -15025,6 +15026,21 @@ bidi implementation of tufte title]
% \end{macrocode}
% \iffalse
%</longtable-xetex-bidi.def>
+%<*mathtools-xetex-bidi.def>
+%\fi
+% \subsection{\textsf{mathtools-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{mathtools-xetex-bidi.def}[2018/01/07 v0.1 bidi adaptations for mathtools package for XeTeX engine]
+\MHInternalSyntaxOn
+\def\MT_define_tagform:nwnn #1[#2]#3#4{
+ \@namedef{MT_tagform_#1:n}##1
+ {\maketag@@@{\if@nonlatin\beginR\fi#3\kern\z@\ignorespaces#2{##1}\unskip\@@italiccorr#4\if@nonlatin\endR\fi}}
+}
+\renewtagform{default}{(}{)}
+\MHInternalSyntaxOff
+% \end{macrocode}
+% \iffalse
+%</mathtools-xetex-bidi.def>
%<*mdframed-xetex-bidi.def>
%\fi
% \subsection{\textsf{mdframed-xetex-bidi.def}}
@@ -22868,7 +22884,10 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@iftagsloaded{leqno}{\input{leqno-xetex-bidi.def}}{}
\@iftagsloaded{fleqn}{\input{fleqn-xetex-bidi.def}}{}
}
-\@ifpackageloaded{mathtools}{\RequirePackage{graphicx}}{}
+\@ifpackageloaded{mathtools}{%
+ \RequirePackage{graphicx}%
+ \input{mathtools-xetex-bidi.def}%
+ }{}
\@ifpackageloaded{crop}{\RequirePackage{graphicx}}{}
\@ifpackageloaded{sidecap}{\RequirePackage{ragged2e}}{}
\@ifpackageloaded{floatrow}{\RequirePackage{color}}{}