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.dtx227
1 files changed, 139 insertions, 88 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
index f0192ef0d7c..e5a41ef92cd 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
-v36.3
+v36.4
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -21,10 +21,13 @@ In doing so, please always explain your issue well enough,
and always include a minimal working example showing the
issue.
-Current version release date: 2020/05/17
+Current version release date: 2022/02/01
___________________________________________
-Copyright (c) Vafa Khalighi 2007--2020
+Vafa Khalighi
+tex-persian@vafa.ac
+
+Copyright (c) Vafa Khalighi 2007--2022
Copyright (c) bidi-tex GitHub Organization 2018--2020
It may be distributed and/or modified under the LaTeX Project Public License,
@@ -44,7 +47,10 @@ by Vafa Khalighi.
\preamble
__________________________________________________
- Copyright (c) 2007--2020 Vafa Khalighi
+ Vafa Khalighi
+ tex-persian@vafa.ac
+
+ Copyright (c) 2007--2022 Vafa Khalighi
Copyright (c) 2018--2020 bidi-tex GitHub Organization
It may be distributed and/or modified under the LaTeX Project Public License,
@@ -219,7 +225,7 @@ by Vafa Khalighi.
\documentclass{ltxdoc}
\input{bidi-doc-preamble.ltx}
\hypersetup{%
- pdftitle={Source documentation for version 36.3 of the bidi
+ pdftitle={Source documentation for version 36.4 of the bidi
package}%
}
\EnableCrossrefs
@@ -238,8 +244,9 @@ by Vafa Khalighi.
% \GetFileInfo{\jobname.dtx}
% \title{\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}\\
%\LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt]
-%\large Source documentation for \textcolor{blue!65!black}{version 36.3}}
-% \author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the {\LaTeX} team to maintain the package in the period 2018--2020.}}
+%\large Source documentation for \textcolor{blue!65!black}{version 36.4}}
+% \author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the {\LaTeX} team to maintain the package in the period 2018--2020.}\\
+% \url{tex-persian@vafa.ac}}
%\setcounter{page}{0}
%\thispagestyle{empty}
%\includegraphics[width=.3\textwidth]{bidi-logo}\qquad
@@ -248,7 +255,7 @@ by Vafa Khalighi.
%\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}
%
%\Large
-%Source documentation for \textcolor{blue!65!black}{version 36.3}}
+%Source documentation for \textcolor{blue!65!black}{version 36.4}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -259,7 +266,7 @@ by Vafa Khalighi.
%or ask for any new features, or suggest any improvements, or ask any questions about the package, then please use the issue tracker:
%
%\medskip
-% \centerline{\url{https://github.com/persiantex/bidi/issues}}
+% \centerline{\url{https://github.com/tex-persian/bidi/issues}}
%
%\medskip
%In doing so, please always explain your issue well enough, and always include
@@ -269,7 +276,7 @@ by Vafa Khalighi.
%
%\vskip 0pt plus 3fill
%
-%Copyright (c) 2007--2020 Vafa Khalighi
+%Copyright (c) 2007--2022 Vafa Khalighi
%
%Copyright (c) 2018--2020 bidi-tex GitHub Organization
%
@@ -285,7 +292,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{50426}
+%% \CheckSum{50477}
%% \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
@@ -1905,8 +1912,8 @@ by Vafa Khalighi.
% \section{File \texttt{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2020/05/17}
-\def\bidi@version{36.3}
+\def\bididate{2022/02/01}
+\def\bidi@version{36.4}
\ProvidesPackage{bidi}[\bididate\space v\bidi@version\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\@bidi@info{****************************************************^^J%
@@ -1919,7 +1926,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
* and LaTeX. The package includes adaptations^^J%
* for use with many other commonly-used packages.^^J%
* ^^J%
-* Copyright (c) 2007--2020 Vafa Khalighi^^J%
+* Copyright (c) 2007--2022 Vafa Khalighi^^J%
* Copyright (c) 2018--2020 bidi-tex GitHub organization^^J%
* ^^J%
* v\bidi@version, \bididate^^J%
@@ -1929,7 +1936,9 @@ Bidirectional typesetting in plain TeX and LaTeX]
* ^^J%
* Location on CTAN: /macros/xetex/latex/bidi^^J%
* ^^J%
-* Issue tracker: https://github.com/persiantex/bidi/issues^^J%
+* Issue tracker: https://github.com/tex-persian/bidi/issues^^J%
+* ^^J%
+* Support Email: tex-persian@vafa.ac^^J%
* ^^J%
* Primary author of bidi package: Vafa Khalighi.^^J%
* ^^J%
@@ -1992,7 +2001,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
}
\newcommand*{\@bidi@pdfcustomproperties}{%
This is the bidi package, Version \bidi@version,
- Released May 17, 2020.
+ Released February 1, 2022.
}
\@RTLmainfalse
\AtBeginDocument{%
@@ -2235,9 +2244,9 @@ Bidirectional typesetting in plain TeX and LaTeX]
%\fi
% \section{File \texttt{bidi.tex}}
% \begin{macrocode}
-\def\bididate{2020/05/17}
+\def\bididate{2022/02/01}
\catcode`@=11
-\def\bidi@version{36.3}
+\def\bidi@version{36.4}
\let \protect \relax
\newlinechar`\^^J
\edef\@bidi@info{****************************************************^^J%
@@ -2250,7 +2259,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
* and LaTeX. The package includes adaptations^^J%
* for use with many other commonly-used packages.^^J%
* ^^J%
-* Copyright (c) 2007--2020 Vafa Khalighi^^J%
+* Copyright (c) 2007--2022 Vafa Khalighi^^J%
* Copyright (c) 2018--2020 bidi-tex GitHub organization^^J%
* ^^J%
* v\bidi@version, \bididate^^J%
@@ -2260,7 +2269,9 @@ Bidirectional typesetting in plain TeX and LaTeX]
* ^^J%
* Location on CTAN: /macros/xetex/latex/bidi^^J%
* ^^J%
-* Issue tracker: https://github.com/persiantex/bidi/issues^^J%
+* Issue tracker: https://github.com/tex-persian/bidi/issues^^J%
+* ^^J%
+* Support Email: tex-persian@vafa.ac^^J%
* ^^J%
* Primary author of bidi package: Vafa Khalighi.^^J%
* ^^J%
@@ -2337,7 +2348,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
}
\def\@bidi@pdfcustomproperties{%
This is the bidi package, Version \bidi@version,
- Released May 17, 2020.
+ Released February 1, 2022.
}
\def\bidi@pdfm@mark{%
\special{pdf:%
@@ -3098,7 +3109,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
% \section{File \texttt{biditools.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{biditools}[2020/05/13 v2 Programming tools for bidi package]
+\ProvidesPackage{biditools}[2022/02/01 v2.1 Programming tools for bidi package]
\providecommand{\@bidi@saveprimitive}[2]{\begingroup\escapechar`\\\relax
\edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
\ifx\@tempa\@tempb \global\let#2#1%
@@ -3940,8 +3951,10 @@ ill-advised in the old versions of bidi package.%
\long\def\bidi@append#1#2{#1#2}
\long\def\bidi@prepend#1#2{#2#1}
-\bidi@newrobustcmd*{\bidi@AtEndPreamble}{\bidi@gappto\bidi@endpreamblehook}
-\newcommand*{\bidi@endpreamblehook}{}
+%\bidi@newrobustcmd*{\bidi@AtEndPreamble}{\bidi@gappto\bidi@endpreamblehook}
+%\newcommand*{\bidi@endpreamblehook}{}
+
+\bidi@newrobustcmd*{\bidi@AtEndPreamble}{\AddToHook{begindocument/before}}%
\bidi@newrobustcmd*{\bidi@BeforeOutputPageShipOut}{\bidi@gappto\bidi@beforeoutputpageshipouthook}
\newcommand*{\bidi@beforeoutputpageshipouthook}{}
@@ -3968,35 +3981,37 @@ ill-advised in the old versions of bidi package.%
\bidi@newrobustcmd*{\bidi@AtEndOutputPage}{\bidi@gappto\bidi@atendoutputpagehook}
\newcommand*{\bidi@atendoutputpagehook}{}
-\bidi@preto\document{%
- \endgroup
- \let\bidi@AtEndPreamble\@firstofone
- \bidi@endpreamblehook
- \protected\def\bidi@AtEndPreamble{\@notprerr\@gobble}%
- \bidi@undef\bidi@endpreamblehook
- \begingroup}
+%\bidi@preto\document{%
+% \endgroup
+% \let\bidi@AtEndPreamble\@firstofone
+% \bidi@endpreamblehook
+% \protected\def\bidi@AtEndPreamble{\@notprerr\@gobble}%
+% \bidi@undef\bidi@endpreamblehook
+% \begingroup}
\bidi@newrobustcmd*{\bidi@AfterPreamble}{\AtBeginDocument}
\bidi@AtEndPreamble{\let\bidi@AfterPreamble\@firstofone}
-\bidi@newrobustcmd*{\bidi@AfterEndPreamble}{\bidi@gappto\bidi@afterendpreamblehook}
-\newcommand*{\bidi@afterendpreamblehook}{}
+%\bidi@newrobustcmd*{\bidi@AfterEndPreamble}{\bidi@gappto\bidi@afterendpreamblehook}
+%\newcommand*{\bidi@afterendpreamblehook}{}
-\bidi@appto\document{%
- \let\bidi@AfterEndPreamble\@firstofone
- \bidi@afterendpreamblehook
- \protected\def\bidi@AfterEndPreamble{\@notprerr\@gobble}%
- \bidi@undef\bidi@afterendpreamblehook
- \ignorespaces}
+\bidi@newrobustcmd*{\bidi@AfterEndPreamble}{\AddToHook{begindocument/end}}%
+
+%\bidi@appto\document{%
+% \let\bidi@AfterEndPreamble\@firstofone
+% \bidi@afterendpreamblehook
+% \protected\def\bidi@AfterEndPreamble{\@notprerr\@gobble}%
+% \bidi@undef\bidi@afterendpreamblehook
+% \ignorespaces}
\bidi@newrobustcmd*{\bidi@AfterEndDocumentCheckLabelsRerun}{\bidi@gappto\bidi@afterenddocumentchecklabelsrerunhook}
\newcommand*{\bidi@afterenddocumentchecklabelsrerunhook}{}
\bidi@patchcmd\enddocument
- {\fi\endgroup}
+ {\fi}
{\let\bidi@AfterEndDocumentCheckLabelsRerun\@firstofone
\bidi@afterenddocumentchecklabelsrerunhook
- \fi\endgroup}
+ \fi}
{}
{\PackageWarning{biditools}{Patching `\string\enddocument' failed}}
@@ -4017,20 +4032,22 @@ ill-advised in the old versions of bidi package.%
\let\bidi@AfterLastShipout\@firstofone
\bidi@afterlastshipouthook}}
-\bidi@newrobustcmd*{\bidi@AfterEndDocument}{\bidi@gappto\bidi@afterenddocumenthook}
-\newcommand*{\bidi@afterenddocumenthook}{}
+%\bidi@newrobustcmd*{\bidi@AfterEndDocument}{\bidi@gappto\bidi@afterenddocumenthook}
+%\newcommand*{\bidi@afterenddocumenthook}{}
-\bidi@patchcmd\enddocument
- {\deadcycles}
- {\let\bidi@AfterEndDocument\@firstofone
- \bidi@afterenddocumenthook
- \deadcycles}
- {}
- {\let\bidi@@end\@@end
- \def\@@end{%
- \let\bidi@AfterEndDocument\@firstofone
- \bidi@afterenddocumenthook
- \bidi@@end}}
+\bidi@newrobustcmd*{\bidi@AfterEndDocument}{\AddToHook{enddocument/end}}%
+
+%\bidi@patchcmd\enddocument
+% {\deadcycles}
+% {\let\bidi@AfterEndDocument\@firstofone
+% \bidi@afterenddocumenthook
+% \deadcycles}
+% {}
+% {\let\bidi@@end\@@end
+% \def\@@end{%
+% \let\bidi@AfterEndDocument\@firstofone
+% \bidi@afterenddocumenthook
+% \bidi@@end}}
\bidi@newrobustcmd{\bidi@AtBeginEnvironment}[1]{%
\bidi@csgappto{@bidi@begin@#1@hook}}
@@ -9115,41 +9132,53 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{eso-pic-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{eso-pic-xetex-bidi.def}[2013/04/10 v0.2 bidi adaptations for eso-pic package for XeTeX engine]
+\ProvidesFile{eso-pic-xetex-bidi.def}[2022/02/01 v0.3 bidi adaptations for eso-pic package for XeTeX engine]
\renewcommand\AtPageLowerLeft[1]{\AtPageUpperLeft{%
- \put(\LenToUnit{\if@RTLmain\paperwidth\else0pt\fi},\LenToUnit{-\paperheight}){#1}}}
+ \put(\if@RTLmain\paperwidth\else 0\fi,-\paperheight){#1}}}
\ESO@isMEMOIR{%
\renewcommand\AtTextUpperLeft[1]{%
\begingroup
\ifodd\c@page
- \@tempdima=\spinemargin
+ \ESO@tempdima=\spinemargin
\else
- \@tempdima=\paperwidth
- \advance\@tempdima-\textwidth
- \advance\@tempdima-\spinemargin
+ \ESO@tempdima=\paperwidth
+ \advance\ESO@tempdima-\textwidth
+ \advance\ESO@tempdima-\spinemargin
\fi
- \@tempdimb=-\uppermargin
+ \ESO@tempdimb=-\uppermargin
\AtPageUpperLeft{%
- \put(\LenToUnit{\if@RTLmain-\fi\@tempdima},\LenToUnit{\@tempdimb}){#1}%
+ \put(\if@RTLmain-\fi\ESO@tempdima,\ESO@tempdimb){#1}%
}%
\endgroup
}
}{%
\renewcommand\AtTextUpperLeft[1]{%
\begingroup
- \@tempdima=1in\relax
- \ifodd\c@page
- \advance\@tempdima\oddsidemargin
+ \ESO@tempdima=1in\relax
+ \if@twoside
+ \ifodd\c@page
+ \if@RTLmain
+ \advance\ESO@tempdima\evensidemargin
+ \else
+ \advance\ESO@tempdima\oddsidemargin
+ \fi
+ \else
+ \if@RTLmain
+ \advance\ESO@tempdima\oddsidemargin
+ \else
+ \advance\ESO@tempdima\evensidemargin
+ \fi
+ \fi
\else
- \advance\@tempdima\evensidemargin
+ \advance\ESO@tempdima\oddsidemargin
\fi
- \@tempdimb=-1in\relax
- \advance\@tempdimb-\topmargin
- \advance\@tempdimb-\headheight
- \advance\@tempdimb-\headsep
+ \ESO@tempdimb=-1in\relax
+ \advance\ESO@tempdimb-\topmargin
+ \advance\ESO@tempdimb-\headheight
+ \advance\ESO@tempdimb-\headsep
\AtPageUpperLeft{%
- \put(\LenToUnit{\if@RTLmain-\fi\@tempdima},\LenToUnit{\@tempdimb}){#1}%
+ \put(\if@RTLmain-\fi\ESO@tempdima,\ESO@tempdimb){#1}%
}%
\endgroup
}
@@ -15945,7 +15974,7 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{multicol-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{multicol-xetex-bidi.def}[2019/06/14 v1.2 bidi adaptations for multicol package for XeTeX engine]
+\ProvidesFile{multicol-xetex-bidi.def}[2022/02/01 v1.3 bidi adaptations for multicol package for XeTeX engine]
\def\page@sofar{%
\process@cols\mult@rightbox
{\ifvoid\count@
@@ -15980,7 +16009,7 @@ bidi implementation of tufte title]
\fi
}
\def\LTR@column@boxes{%
- \process@cols\mult@gfirstbox{%
+ \process@cols\mult@firstbox{%
\ifdim\dp\count@>\dimen\tw@
\global\dimen\tw@\dp\count@ \fi
\mc@col@status@write
@@ -15994,16 +16023,13 @@ bidi implementation of tufte title]
}
\def\RTL@column@boxes{%
- \ifnum\col@number<\tw@
- \LTR@column@boxes
- \else
- \process@cols\mult@gfirstbox{%
+ \process@cols\mult@firstbox{%
\hskip\hsize
\hss{\columnseprulecolor\vrule
\@width\columnseprule}\hss
}%
\hskip\hsize
- \process@cols\mult@gfirstbox{%
+ \process@cols\mult@firstbox{%
\ifdim\dp\count@>\dimen\tw@
\global\dimen\tw@\dp\count@ \fi
\hskip-\hsize
@@ -16019,8 +16045,8 @@ bidi implementation of tufte title]
\box\mult@rightbox
\hskip-\hsize
\hskip\full@width
- \fi
}
+
\newcommand\RTLmulticolcolumns
{\let\bidi@multicol@align@columns
\RTL@column@boxes}
@@ -16042,23 +16068,26 @@ bidi implementation of tufte title]
columns doesn't seem a good idea.^^J
I therefore use two columns instead}%
\col@number\tw@ \fi
- \ifnum\col@number>10
+ \ifnum\col@number>20
\PackageError{multicol}%
{Too many columns}%
{Current implementation doesn't
- support more than 10 columns.%
+ support more than 20 columns.%
\MessageBreak
- I therefore use 10 columns instead}%
- \col@number10 \fi
- \ifx\@footnotetext\mult@footnotetext\else
+ I therefore use 20 columns instead}%
+ \col@number20 \fi
+ \ifx\@footnotetext\mult@footnotetext
+ \else
\let\orig@footnotetext\@footnotetext
\let\@footnotetext\mult@footnotetext
\fi
- \ifx\@LTRfootnotetext\mult@LTRfootnotetext\else
+ \ifx\@LTRfootnotetext\mult@LTRfootnotetext
+ \else
\let\orig@LTRfootnotetext\@LTRfootnotetext
\let\@LTRfootnotetext\mult@LTRfootnotetext
\fi
- \ifx\@RTLfootnotetext\mult@RTLfootnotetext\else
+ \ifx\@RTLfootnotetext\mult@RTLfootnotetext
+ \else
\let\orig@RTLfootnotetext\@RTLfootnotetext
\let\@RTLfootnotetext\mult@RTLfootnotetext
\fi
@@ -22025,7 +22054,7 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \section{File \texttt{latex-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{latex-xetex-bidi.def}[2019/03/03 v1.3.7 bidi adaptations for `latex.ltx' for XeTeX engine]
+\ProvidesFile{latex-xetex-bidi.def}[2022/02/01 v1.3.8 bidi adaptations for `latex.ltx' for XeTeX engine]
\newcommand{\TeXXeTOn}{\TeXXeTstate\@ne}
\newcommand{\TeXXeTOff}{\TeXXeTstate\z@}
\TeXXeTOn
@@ -22718,6 +22747,28 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\hskip\dimen\@curtabmar\box\@curline\hfil\if@RTL\endR\fi}%
\fi}
+\ExplSyntaxOn
+\cs_undefine:N \__shipout_picture_overlay:n
+\cs_new:Npn \__shipout_picture_overlay:n #1 {
+ \__shipout_init_page_origins:
+ \if@RTL
+ \kern \__dim_eval:w \textwidth-\c__shipout_horigin_tl \scan_stop:
+ \else
+ \kern -\c__shipout_horigin_tl \scan_stop:
+ \fi
+ \vbox_to_zero:n {
+ \kern -\c__shipout_vorigin_tl \scan_stop:
+ \unitlength 1pt \scan_stop:
+ \hbox_set_to_wd:Nnn \l__shipout_tmp_box \c_zero_dim
+ { \ignorespaces #1 \hss }
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_use:N \l__shipout_tmp_box
+ \tex_vss:D
+ }
+}
+\ExplSyntaxOff
+
\newcommand*{\bidi@font@@outputpage}{}
\def\@outputpage{%
@@ -25395,7 +25446,7 @@ dynamic frame when using one of the \cmdname{Ncolumntop} type of commands.
\mobile{۰۹۱۸۹۶۹۴۹۶}
\phone{۹۸۹۰۸۳۴۱}
\fax{۹۸۹۰۸۳۴۲}
-\email{me@somedomain.com}
+\email{tex-persian@vafa.ac}
\extrainfo{اطلاعات اضافی}
\photo[64pt]{picture}
\quote{نقل قول}