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.dtx309
1 files changed, 83 insertions, 226 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
index 3f6f342a4ef..f8c3eed81c7 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
-v19.7
+v19.8
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -19,13 +19,13 @@ If you want to report any bugs or typos and corrections in the documentation,
or ask for any new features, or suggest any improvements, or ask any questions
about the package, then please do not send any direct email to me; I will not
answer any direct email. Instead please use the issue tracker:
- <https://sourceforge.net/p/persian-tex/tickets>
+ <https://github.com/vafa/bidi/issues>
In doing so, please always explain your issue well enough, always include
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/09
+Current version release date: 2016/09/11
___________________
Vafa Khalighi
@@ -177,6 +177,7 @@ by Vafa Khalighi.
\generate{\file{titletoc-xetex-bidi.def}{\from{\jobname.dtx}{table,titletoc-xetex-bidi.def}}}
\generate{\file{tocbibind-xetex-bidi.def}{\from{\jobname.dtx}{table,tocbibind-xetex-bidi.def}}}
\generate{\file{tocloft-xetex-bidi.def}{\from{\jobname.dtx}{table,tocloft-xetex-bidi.def}}}
+\generate{\file{tocbasic-xetex-bidi.def}{\from{\jobname.dtx}{table,tocbasic-xetex-bidi.def}}}
\generate{\file{tocstyle-xetex-bidi.def}{\from{\jobname.dtx}{table,tocstyle-xetex-bidi.def}}}
\generate{\file{todonotes-xetex-bidi.def}{\from{\jobname.dtx}{table,todonotes-xetex-bidi.def}}}
\generate{\file{wrapfig-xetex-bidi.def}{\from{\jobname.dtx}{table,wrapfig-xetex-bidi.def}}}
@@ -322,7 +323,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 19.7}}
+%\large Documentation for \textcolor{blue!65!black}{version 19.8}}
% \author{Vafa Khalighi\\
% \url{persian-tex@tug.org}}
%\setcounter{page}{0}
@@ -333,7 +334,7 @@ by Vafa Khalighi.
%\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}
%
%\Large
-%Documentation for \textcolor{blue!65!black}{version 19.7}}
+%Documentation for \textcolor{blue!65!black}{version 19.8}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -346,7 +347,7 @@ by Vafa Khalighi.
%answer any direct email. Instead please use the issue tracker:
%
%\medskip
-% \centerline{\url{https://sourceforge.net/p/persian-tex/tickets}}
+% \centerline{\url{https://github.com/vafa/bidi/issues}}
%
%\medskip
%In doing so, please always explain your issue well enough, always include
@@ -384,14 +385,14 @@ by Vafa Khalighi.
%*
%* Copyright (c) 2009--2016 Vafa Khalighi
%*
-%* 2016/09/09, v19.7
+%* 2016/09/11, v19.8
%*
%* License: LaTeX Project Public License, version
%* 1.3c or higher (your choice)
%*
%* Location on CTAN: /macros/xetex/latex/bidi
%*
-%* Issue tracker: https://sourceforge.net/p/persian-tex/tickets
+%* Issue tracker: https://github.com/vafa/bidi/issues
%*
%* Support: persian-tex@tug.org
%****************************************************
@@ -1141,7 +1142,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{47003}
+%% \CheckSum{46577}
%% \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 +2985,8 @@ by Vafa Khalighi.
% \subsection{\textsf{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2016/09/09}
-\def\bidiversion{v19.7}
+\def\bididate{2016/09/11}
+\def\bidiversion{v19.8}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\@bidi@info{****************************************************^^J%
@@ -3007,7 +3008,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
* ^^J%
* Location on CTAN: /macros/xetex/latex/bidi^^J%
* ^^J%
-* Issue tracker: https://sourceforge.net/p/persian-tex/tickets^^J%
+* Issue tracker: https://github.com/vafa/bidi/issues^^J%
* ^^J%
* Support: persian-tex@tug.org^^J%
****************************************************}
@@ -3141,7 +3142,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
* ^^J%
* Location on CTAN: /macros/xetex/latex/bidi^^J%
* ^^J%
-* Issue tracker: https://sourceforge.net/p/persian-tex/tickets^^J%
+* Issue tracker: https://github.com/vafa/bidi/issues^^J%
* ^^J%
* Support: persian-tex@tug.org^^J%
****************************************************}
@@ -13955,6 +13956,7 @@ bidi implementation of tufte title]
\bidi@isloaded{rotating}
\bidi@isloaded{tabls}
\bidi@isloaded{tabulary}
+\bidi@isloaded{tocbasic}
\bidi@isloaded{tocstyle}
\bidi@isloaded{tocbibind}
\bidi@isloaded{fontspec}
@@ -14152,6 +14154,9 @@ bidi implementation of tufte title]
\if@bidi@tabularyloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tabulary after bidi package. Please load package tabulary before bidi package, and then try to run xelatex on your document again}{}]{tabulary}
\fi%
+ \if@bidi@tocbasicloaded@\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tocbasic after bidi package. Please load package tocbasic before bidi package, and then try to run xelatex on your document again}{}]{tocbasic}
+ \fi%
\if@bidi@tocstyleloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tocstyle after bidi package. Please load package tocstyle before bidi package, and then try to run xelatex on your document again}{}]{tocstyle}
\fi%
@@ -17388,7 +17393,7 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \subsection{\textsf{scrartcl-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{scrartcl-xetex-bidi.def}[2015/11/14 v0.8 bidi adaptations for scrartcl class for XeTeX engine]
+\ProvidesFile{scrartcl-xetex-bidi.def}[2016/09/11 v0.9 bidi adaptations for scrartcl class for XeTeX engine]
\newcommand{\scr@saved@LTRfootnotetext}{}
\newcommand{\scr@saved@RTLfootnotetext}{}
\let\scr@saved@footnotetext\@footnotetext
@@ -17613,68 +17618,6 @@ to\rtside{\box\bslice\hfil}}
\par
\vskip 2em
}%
-\renewcommand*\l@part[2]{%
- \ifnum \c@tocdepth >\m@ne\relax
- \addpenalty{\@secpenalty}%
- \addvspace{2.25em \@plus\p@}%
- \setlength{\@tempdima}{2em}%
- \if@tocleft
- \ifx\toc@l@number\@empty\else
- \setlength\@tempdima{0\toc@l@number}%
- \fi
- \fi
- \begingroup
- \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
- \parfillskip -\@pnumwidth
- \leavevmode
- \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
- \hskip -\if@RTL\rightskip\else\leftskip\fi
- {\usekomafont{partentry}{#1\nobreak
- \usekomafont{partentrypagenumber}{\hfil\nobreak
- \hb@xt@\@pnumwidth{\hss#2}}}}\par
- \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
- \endgroup
- \penalty20010
- \else
- \if@compatibility
- \global\@nobreaktrue
- \everypar{\global\@nobreakfalse\everypar{}}%
- \else
- \penalty\@highpenalty
- \fi
- \endgroup
- \fi
- \fi
-}
-\renewcommand*\l@section[2]{%
- \ifnum \c@tocdepth >\z@
- \ifnum \lastpenalty<20009
- \addpenalty{\@secpenalty}%
- \fi
- \addvspace{1.0em \@plus\p@}%
- \setlength\@tempdima{1.5em}%
- \if@tocleft
- \ifx\toc@l@number\@empty\else
- \setlength\@tempdima{0\toc@l@number}%
- \fi
- \fi
- \begingroup
- \raggedsectionentry
- \parindent \z@ \advance\if@RTL\leftskip\else\rightskip\fi \@pnumwidth
- \parfillskip -\@pnumwidth
- \interlinepenalty\@M
- \leavevmode
- \advance\if@RTL\rightskip\else\leftskip\fi \@tempdima \null\nobreak\hskip -\if@RTL\rightskip\else\leftskip\fi
- {\usekomafont{sectionentry}{#1\nobreak
- \usekomafont{sectionentrypagenumber}{%
- \hfill\nobreak
- \hb@xt@\@pnumwidth{\hss#2}}}}\par
- \endgroup
- \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
- \penalty20008
- \fi
- \fi
-}
\def\raggedsection{\if@RTL\raggedleft\else\raggedright\fi}
\def\raggedpart{\if@RTL\raggedleft\else\raggedright\fi}
\renewcommand*\autodot{\if@altsecnumformat\@SepMark\fi}
@@ -17906,7 +17849,7 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \subsection{\textsf{scrbook-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{scrbook-xetex-bidi.def}[2015/11/14 v0.8 bidi adaptations for scrbook class for XeTeX engine]
+\ProvidesFile{scrbook-xetex-bidi.def}[2016/09/11 v0.9 bidi adaptations for scrbook class for XeTeX engine]
\newcommand{\scr@saved@LTRfootnotetext}{}
\newcommand{\scr@saved@RTLfootnotetext}{}
\let\scr@saved@footnotetext\@footnotetext
@@ -18131,93 +18074,6 @@ to\rtside{\box\bslice\hfil}}
\par
\vskip 2em
}%
-\renewcommand*\l@part[2]{%
- \ifnum \c@tocdepth >-2\relax
- \addpenalty{-\@highpenalty}%
- \addvspace{2.25em \@plus\p@}%
- \setlength{\@tempdima}{2em}%
- \if@tocleft
- \ifx\toc@l@number\@empty\else
- \setlength\@tempdima{0\toc@l@number}%
- \fi
- \fi
- \begingroup
- \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
- \parfillskip -\@pnumwidth
- \leavevmode
- \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
- \hskip -\if@RTL\rightskip\else\leftskip\fi
- {\usekomafont{partentry}{#1\nobreak
- \usekomafont{partentrypagenumber}{\hfil\nobreak
- \hb@xt@\@pnumwidth{\hss#2}}}}\par
- \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
- \endgroup
- \penalty20010
- \else
- \penalty\@highpenalty
- \endgroup
- \fi
- \fi
-}\renewcommand*\l@part[2]{%
- \ifnum \c@tocdepth >-2\relax
- \addpenalty{-\@highpenalty}%
- \addvspace{2.25em \@plus\p@}%
- \setlength{\@tempdima}{2em}%
- \if@tocleft
- \ifx\toc@l@number\@empty\else
- \setlength\@tempdima{0\toc@l@number}%
- \fi
- \fi
- \begingroup
- \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
- \parfillskip -\@pnumwidth
- \leavevmode
- \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
- \hskip -\if@RTL\rightskip\else\leftskip\fi
- {\usekomafont{partentry}{#1\nobreak
- \usekomafont{partentrypagenumber}{\hfil\nobreak
- \hb@xt@\@pnumwidth{\hss#2}}}}\par
- \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
- \endgroup
- \penalty20010
- \else
- \penalty\@highpenalty
- \endgroup
- \fi
- \fi
-}
-\renewcommand*\l@chapter[2]{%
- \ifnum \c@tocdepth >\m@ne
- \ifnum \lastpenalty<20010
- \addpenalty{-\@highpenalty}%
- \fi
- \vskip 1.0em \@plus\p@
- \setlength\@tempdima{1.5em}%
- \if@tocleft
- \ifx\toc@l@number\@empty\else
- \setlength\@tempdima{0\toc@l@number}%
- \fi
- \fi
- \begingroup
- \raggedchapterentry
- \parindent \z@ \advance\if@RTL\leftskip\else\rightskip\fi \@pnumwidth
- \parfillskip -\@pnumwidth
- \interlinepenalty\@M
- \leavevmode
- \advance\if@RTL\rightskip\else\leftskip\fi \@tempdima \null\nobreak\hskip -\if@RTL\rightskip\else\leftskip\fi
- {\usekomafont{chapterentry}{#1\nobreak
- \usekomafont{chapterentrypagenumber}{%
- \hfill\nobreak
- \hb@xt@\@pnumwidth{\hss#2}}}}\par
- \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
- \endgroup
- \penalty20009
- \else
- \penalty\@highpenalty
- \endgroup
- \fi
- \fi
-}
\def\raggedsection{\if@RTL\raggedleft\else\raggedright\fi}
\renewcommand*\autodot{\if@altsecnumformat\@SepMark\fi}
\renewcommand*\thesection{%
@@ -18595,7 +18451,7 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \subsection{\textsf{scrreprt-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{scrreprt-xetex-bidi.def}[2015/11/14 v0.8 bidi adaptations for scrreprt class for XeTeX engine]
+\ProvidesFile{scrreprt-xetex-bidi.def}[2016/09/11 v0.9 bidi adaptations for scrreprt class for XeTeX engine]
\newcommand{\scr@saved@LTRfootnotetext}{}
\newcommand{\scr@saved@RTLfootnotetext}{}
\let\scr@saved@footnotetext\@footnotetext
@@ -18820,66 +18676,6 @@ to\rtside{\box\bslice\hfil}}
\par
\vskip 2em
}%
-\renewcommand*\l@part[2]{%
- \ifnum \c@tocdepth >-2\relax
- \addpenalty{-\@highpenalty}%
- \addvspace{2.25em \@plus\p@}%
- \setlength{\@tempdima}{2em}%
- \if@tocleft
- \ifx\toc@l@number\@empty\else
- \setlength\@tempdima{0\toc@l@number}%
- \fi
- \fi
- \begingroup
- \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
- \parfillskip -\@pnumwidth
- \leavevmode
- \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
- \hskip -\if@RTL\rightskip\else\leftskip\fi
- {\usekomafont{partentry}{#1\nobreak
- \usekomafont{partentrypagenumber}{\hfil\nobreak
- \hb@xt@\@pnumwidth{\hss#2}}}}\par
- \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
- \endgroup
- \penalty20010
- \else
- \penalty\@highpenalty
- \endgroup
- \fi
- \fi
-}
-\renewcommand*\l@chapter[2]{%
- \ifnum \c@tocdepth >\m@ne
- \ifnum \lastpenalty<20010
- \addpenalty{-\@highpenalty}%
- \fi
- \vskip 1.0em \@plus\p@
- \setlength\@tempdima{1.5em}%
- \if@tocleft
- \ifx\toc@l@number\@empty\else
- \setlength\@tempdima{0\toc@l@number}%
- \fi
- \fi
- \begingroup
- \raggedchapterentry
- \parindent \z@ \advance\if@RTL\leftskip\else\rightskip\fi \@pnumwidth
- \parfillskip -\@pnumwidth
- \interlinepenalty\@M
- \leavevmode
- \advance\if@RTL\rightskip\else\leftskip\fi \@tempdima \null\nobreak\hskip -\if@RTL\rightskip\else\leftskip\fi
- {\usekomafont{chapterentry}{#1\nobreak
- \usekomafont{chapterentrypagenumber}{%
- \hfill\nobreak
- \hb@xt@\@pnumwidth{\hss#2}}}}\par
- \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
- \endgroup
- \penalty20009
- \else
- \penalty\@highpenalty
- \endgroup
- \fi
- \fi
-}
\def\raggedsection{\if@RTL\raggedleft\else\raggedright\fi}
\renewcommand*\autodot{\if@altsecnumformat\@SepMark\fi}
\renewcommand*\thesection{%
@@ -19930,6 +19726,64 @@ to\rtside{\box\bslice\hfil}}
% \end{macrocode}
% \iffalse
%</tocloft-xetex-bidi.def>
+%<*tocbasic-xetex-bidi.def>
+%\fi
+% \subsection{\textsf{tocbasic-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{tocbasic-xetex-bidi.def}[2016/09/11 v0.1 bidi adaptations for tocbasic package for XeTeX engine]
+\bidi@patchcmd{\scr@dte@def@l@undottedtocline}
+{\leftskip}{\bidi@leftskip}
+{}{}
+\bidi@patchcmd{\scr@dte@def@l@undottedtocline}
+{\leftskip}{\bidi@leftskip}
+{}{}
+\bidi@patchcmd{\scr@dte@def@l@undottedtocline}
+{\leftskip}{\bidi@leftskip}
+{}{}
+
+\bidi@patchcmd{\scr@dte@def@l@undottedtocline}
+{\rightskip}{\bidi@rightskip}
+{}{}
+
+\bidi@patchcmd{\scr@dte@def@l@largetocline}
+{\leftskip}{\bidi@leftskip}
+{}{}
+
+\bidi@patchcmd{\scr@dte@def@l@largetocline}
+{\rightskip}{\bidi@rightskip}
+{}{}
+
+\bidi@patchcmd{\scr@dte@tocline}
+{\leftskip}{\bidi@leftskip}
+{}{}
+\bidi@patchcmd{\scr@dte@tocline}
+{\leftskip}{\bidi@leftskip}
+{}{}
+\bidi@patchcmd{\scr@dte@tocline}
+{\leftskip}{\bidi@leftskip}
+{}{}
+\bidi@patchcmd{\scr@dte@tocline}
+{\leftskip}{\bidi@leftskip}
+{}{}
+
+\bidi@patchcmd{\scr@dte@tocline}
+{\rightskip}{\bidi@rightskip}
+{}{}
+\bidi@patchcmd{\scr@dte@tocline}
+{\rightskip}{\bidi@rightskip}
+{}{}
+\bidi@patchcmd{\scr@dte@tocline}
+{\rightskip}{\bidi@rightskip}
+{}{}
+\bidi@patchcmd{\scr@dte@tocline}
+{\rightskip}{\bidi@rightskip}
+{}{}
+\bidi@patchcmd{\scr@dte@tocline}
+{\rightskip}{\bidi@rightskip}
+{}{}
+% \end{macrocode}
+% \iffalse
+%</tocbasic-xetex-bidi.def>
%<*tocstyle-xetex-bidi.def>
%\fi
% \subsection{\textsf{tocstyle-xetex-bidi.def}}
@@ -20517,7 +20371,7 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \subsection{\textsf{latex-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{latex-xetex-bidi.def}[2016/09/09 v1.2.7 bidi adaptations for `latex.ltx' for XeTeX engine]
+\ProvidesFile{latex-xetex-bidi.def}[2016/09/11 v1.2.8 bidi adaptations for `latex.ltx' for XeTeX engine]
\newcommand{\TeXXeTOn}{\TeXXeTstate=1 }
\newcommand{\TeXXeTOff}{\TeXXeTstate=0 }
\TeXXeTOn
@@ -20563,6 +20417,8 @@ to\rtside{\box\bslice\hfil}}
\bgroup
\aftergroup\egroup
}\vbox}
+\newcommand*{\bidi@leftskip}{\if@RTL\rightskip\else\leftskip\fi}
+\newcommand*{\bidi@rightskip}{\if@RTL\leftskip\else\rightskip\fi}
\def\LTR{\par\@RTLfalse\@RTL@footnotefalse\hsize\linewidth\parshape\z@}
\def\endLTR{\par}
\def\RTL{\par\@RTLtrue\@RTL@footnotetrue\hsize\linewidth\parshape\z@}
@@ -21303,6 +21159,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@ifpackageloaded{rotating}{\input{rotating-xetex-bidi.def}}{}
\@ifpackageloaded{tabls}{\input{tabls-xetex-bidi.def}}{}
\@ifpackageloaded{tabulary}{\input{tabulary-xetex-bidi.def}}{}
+\@ifpackageloaded{tocbasic}{\input{tocbasic-xetex-bidi.def}}{}
\@ifpackageloaded{tocstyle}{\input{tocstyle-xetex-bidi.def}}{}
\@ifpackageloaded{tocbibind}{\@ifclassloaded{memoir}{}{\input{tocbibind-xetex-bidi.def}}}{}
\@ifpackageloaded{tocloft}{\@ifclassloaded{memoir}{}{\input{tocloft-xetex-bidi.def}}}{}