summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/xelatex/bidi/bidi.dtx')
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi.dtx39
1 files changed, 24 insertions, 15 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
index 388e9432c5f..bd092c4f943 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.0
+v20.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: 2016/09/14
+Current version release date: 2016/10/09
___________________
Vafa Khalighi
@@ -310,7 +310,7 @@ by Vafa Khalighi.
%\OnlyDescription
\begin{document}
\DocInput{\jobname.dtx}
- \PrintIndex
+% \PrintIndex
\PrintChanges
\end{document}
%</driver>
@@ -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.0}}
+%\large Documentation for \textcolor{blue!65!black}{version 20.1}}
% \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.0}}
+%Documentation for \textcolor{blue!65!black}{version 20.1}}
%
%\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/09/14, v20.0
+%* 2016/10/09, v20.1
%*
%* License: LaTeX Project Public License, version
%* 1.3c or higher (your choice)
@@ -927,9 +927,9 @@ by Vafa Khalighi.
%If the main direction of the document is RTL, \Lcs{if@RTLmain} is true and if the main direction of the document is LTR, \Lcs{if@RTLmain} is false.
%\subsection{Latin Conditional}
%\begin{BDef}
-%\Lcs{if@Latin}
+%\Lcs{if@nonlatin}
%\end{BDef}
-%\Lcs{if@Latin} inside any environment that uses Latin font is true and inside any environment that uses RTL font is false.
+%The packages should set the value of \Lcs{if@nonlatin} inside any environment that uses LTR script to false (\Lcs{@nonlatinfalse}) and inside any environment that uses RTL script to true (\Lcs{@nonlatintrue}).
%\subsection{Tags Internal Macro}
%\begin{BDef}
%\Lcs{@iftagsloaded}\Largb{\Larga{tags name}}\Largb{\Larga{do thing(s) if the tag is loaded}}\\
@@ -1141,7 +1141,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{47498}
+%% \CheckSum{47521}
%% \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/09/14}
-\def\bidiversion{v20.0}
+\def\bididate{2016/10/09}
+\def\bidiversion{v20.1}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\@bidi@info{****************************************************^^J%
@@ -3110,12 +3110,16 @@ Bidirectional typesetting in plain TeX and LaTeX]
\XeTeXinterchartokenstate=\@ne
\newXeTeXintercharclass\bidi@digits@charclass
\newXeTeXintercharclass\bidi@dot@charclass
+\newXeTeXintercharclass\bidi@dash@charclass
\XeTeXcharclass `\. \bidi@dot@charclass
+\XeTeXcharclass `\- \bidi@dash@charclass
\bidi@digits=`\0 \loop \XeTeXcharclass \bidi@digits \bidi@digits@charclass \ifnum\bidi@digits<`\9 \advance\bidi@digits \@ne \repeat
\bidi@digits=`\۰ \loop \XeTeXcharclass \bidi@digits \bidi@digits@charclass \ifnum\bidi@digits<`\۹ \advance\bidi@digits \@ne \repeat
-\XeTeXinterchartoks \bidi@digits@charclass \bidi@dot@charclass = {\DigitsDotInterCharToks}
-\XeTeXinterchartoks \bidi@dot@charclass \bidi@digits@charclass = {\DigitsDotInterCharToks}
-\newcommand*{\DigitsDotInterCharToks}{\if@nonlatin\char"200F \fi}
+\XeTeXinterchartoks \bidi@digits@charclass \bidi@dot@charclass = {\DigitsDotDashInterCharToks}
+\XeTeXinterchartoks \bidi@dot@charclass \bidi@digits@charclass = {\DigitsDotDashInterCharToks}
+\XeTeXinterchartoks \bidi@digits@charclass \bidi@dash@charclass = {\DigitsDotDashInterCharToks}
+\XeTeXinterchartoks \bidi@dash@charclass \bidi@digits@charclass = {\DigitsDotDashInterCharToks}
+\newcommand*{\DigitsDotDashInterCharToks}{\if@nonlatin\char"200F \fi}
% \end{macrocode}
% \iffalse
%</bidi.sty>
@@ -13819,7 +13823,7 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{listings-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{listings-xetex-bidi.def}[2016/09/12 v1.0 bidi adaptations for listings package for XeTeX engine]
+\ProvidesFile{listings-xetex-bidi.def}[2016/10/09 v1.1 bidi adaptations for listings package for XeTeX engine]
\lst@Key{captiondirection}{textdirection}{%
\lstKV@SwitchCases{#1}%
{textdirection&\\%
@@ -13891,11 +13895,16 @@ bidi implementation of tufte title]
{\protect\numberline{\thelstlisting}\lst@@caption}%
\endgroup%
}{}{}
+\@ifpackageloaded{caption}{%
+ \def\lst@makecaption{\caption@starfalse\@bidi@lst@makecaption}%
+ \def\lst@maketitle{\caption@startrue\@bidi@lst@makecaption\@empty}%
+}{%
\AtBeginDocument{%
\@ifundefined{captionlabelfalse}{}{%
\def\lst@maketitle{\captionlabelfalse\@bidi@lst@makecaption\@empty}}%
\@ifundefined{caption@startrue}{}{%
\def\lst@maketitle{\caption@startrue\@bidi@lst@makecaption\@empty}}%
+}%
}
\AtBeginDocument{
\@ifundefined{thechapter}{\let\lst@ifnumberbychapter\iffalse}{}