summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/xelatex/bidi/README4
-rw-r--r--Master/texmf-dist/doc/xelatex/bidi/bidi-doc.pdfbin176828 -> 176752 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/bidi/bidi.pdfbin3679571 -> 3600795 bytes
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx2
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx4
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx2
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi.dtx1669
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi.ins2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/adjmulticol-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/algorithm2e-xetex-bidi.def16
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/amsart-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/amsbook-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/amsmath-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/amstext-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/amsthm-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/array-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/article-xetex-bidi.def5
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/artikel1-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/artikel2-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/artikel3-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/arydshln-xetex-bidi.def8
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamer-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerbaseauxtemplates-xetex-bidi.def8
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerbaseboxes-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerbasecolor-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerbasecompatibility-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerbaseframecomponents-xetex-bidi.def4
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerbaseframesize-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerbaselocalstructure-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerbasemisc-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerbasenavigation-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerbaseoverlay-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemecircles-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemedefault-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemefocus-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemeinmargin-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerinnerthememetropolis-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemerectangles-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemerounded-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthemedefault-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthemefocus-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthemeinfolines-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthememetropolis-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthememiniframes-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthemeshadow-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesidebar-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesmoothbars-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesmoothtree-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesplit-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerouterthemetree-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerthemeHannover-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/beamerthemeSingapore-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidi-media9.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidi-perpage.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidi.sty11
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidi.tex10
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidicode.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/biditools.sty842
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/biditufte-book.cls2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/biditufte-handout.cls2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty6
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidituftegeneralstructure.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidituftesidenote.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidituftetitle.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bidituftetoc.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/boek-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/boek3-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/book-xetex-bidi.def6
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/bookest-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/breqn-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/cals-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/caption-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/caption3-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/color-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/colortbl-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/combine-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/crop-xetex-bidi.def6
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/cutwin-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/dblfnote-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/diagbox-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/draftwatermark-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/empheq-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/eso-pic-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/extarticle-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/extbook-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/extletter-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def6
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/extreport-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/fancybox-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/fancyhdr-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/fix2col-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/fleqn-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/float-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/floatrow-xetex-bidi.def5
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def12
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/footnote-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/footnotebackref-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/framed-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/ftnright-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/geometry-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/graphicx-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/hvfloat-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def20
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/imsproc-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def339
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/leqno-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/letter-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/lettrine-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/lineno-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def6
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/loadingorder-xetex-bidi.def336
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/longtable-xetex-bidi.def8
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/lscape-xetex-bidi.def5
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/mathtools-xetex-bidi.def5
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/mdframed-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/media9-xetex-bidi.def44
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/memoir-xetex-bidi.def8
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/midfloat-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/minitoc-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/multicol-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/multienum-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/natbib-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/newfloat-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/nicematrix-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/ntheorem-hyper-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/ntheorem-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/overpic-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/pdfbase-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/pdfpages-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/pgfcorescopes.code-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/pgfsys.code-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/picinpar-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/pstricks-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/quotchap-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/ragged2e-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/rapport1-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/rapport3-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/refrep-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/report-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/rotating-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/scrbook-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/scrreprt-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/sidecap-xetex-bidi.def30
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/soul-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/stabular-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/subfigure-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/tabls-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/tabularx-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/tabulary-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/tc-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/tcolorbox-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/titlesec-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/titletoc-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/tocbibind-xetex-bidi.def11
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/tocloft-xetex-bidi.def5
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/tocstyle-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/wrapfig-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/xcolor-xetex-bidi.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/xltxtra-xetex-bidi.def2
172 files changed, 1461 insertions, 2260 deletions
diff --git a/Master/texmf-dist/doc/xelatex/bidi/README b/Master/texmf-dist/doc/xelatex/bidi/README
index d278ac1f0b4..e17d8c01d0f 100644
--- a/Master/texmf-dist/doc/xelatex/bidi/README
+++ b/Master/texmf-dist/doc/xelatex/bidi/README
@@ -1,6 +1,6 @@
___________________
The bidi package
-v40.8
+v41.0
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -25,7 +25,7 @@ The announcements for the new releases of the package will
also appear in the Discussions space under the Announcements
category.
-Current version release date: 2024/12/28
+Current version release date: 2025/01/03
___________________________________________
Vafa Khalighi
diff --git a/Master/texmf-dist/doc/xelatex/bidi/bidi-doc.pdf b/Master/texmf-dist/doc/xelatex/bidi/bidi-doc.pdf
index 85dfb7bca67..df61e9c8da3 100644
--- a/Master/texmf-dist/doc/xelatex/bidi/bidi-doc.pdf
+++ b/Master/texmf-dist/doc/xelatex/bidi/bidi-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/bidi/bidi.pdf b/Master/texmf-dist/doc/xelatex/bidi/bidi.pdf
index 9694e6d759e..607a0bcd93a 100644
--- a/Master/texmf-dist/doc/xelatex/bidi/bidi.pdf
+++ b/Master/texmf-dist/doc/xelatex/bidi/bidi.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx b/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx
index 71950a49c1a..858d0970af0 100644
--- a/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx
+++ b/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx
@@ -20,7 +20,7 @@ If you use \textsf{bidi} package to write any input \TeX\ document, and then run
* Copyright (c) 2007--2025 Vafa Khalighi
* Copyright (c) 2018--2020 bidi-tex GitHub Organization
*
-* v40.8 (Release William Paul Thurston), 2024/12/28
+* v41.0 (Release Maryam Mirzakhani), 2025/01/03
*
* License: LaTeX Project Public License, version
* 1.3c or higher (your choice)
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx b/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx
index bcf2d3fe5b2..bd6063a7665 100644
--- a/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx
+++ b/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx
@@ -3,7 +3,7 @@
\begin{document}
\title{\textcolor{bidiblue}{\Huge The \textsf{bidi} \textit{Package}}\\
\LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt]
-\large User documentation for \textcolor{bidiblue}{version 40.8}}
+\large User documentation for \textcolor{bidiblue}{version 41.0}}
\author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the {\LaTeX} team for maintaining the package in the period 2018--2020.}}
\setcounter{page}{0}
\thispagestyle{empty}
@@ -13,7 +13,7 @@
\textcolor{bidiblue}{\Huge The \textsf{bidi} \textit{Package}}
\Large
-User documentation for \textcolor{bidiblue}{version 40.8}}
+User documentation for \textcolor{bidiblue}{version 41.0}}
\vskip 0pt plus 3fill
\textit{\large to my Master, \textbf{Ferdowsi The Great}}
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx b/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx
index 5529f006f2f..4fa855ce963 100644
--- a/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx
+++ b/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx
@@ -1,7 +1,7 @@
\documentclass{ltxdoc}
\input{bidi-doc-preamble.ltx}
\hypersetup{%
- pdftitle={User documentation for version 40.8 of the bidi
+ pdftitle={User documentation for version 41.0 of the bidi
package}%
}
\begin{document}
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
index 40087a54282..d4d90f219ee 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
-v40.8
+v41.0
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -30,7 +30,7 @@ The announcements for the new releases of the package will
also appear in the Discussions space under the Announcements
category.
-Current version release date: 2024/12/28
+Current version release date: 2025/01/03
___________________________________________
Vafa Khalighi
@@ -178,11 +178,11 @@ by Vafa Khalighi.
\generate{\file{lettrine-xetex-bidi.def}{\from{\jobname.dtx}{table,lettrine-xetex-bidi.def}}}
\generate{\file{lineno-xetex-bidi.def}{\from{\jobname.dtx}{table,lineno-xetex-bidi.def}}}
\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{lscape-xetex-bidi.def}{\from{\jobname.dtx}{table,lscape-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{media9-xetex-bidi.def}{\from{\jobname.dtx}{table,media9-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}}}
\generate{\file{midfloat-xetex-bidi.def}{\from{\jobname.dtx}{table,midfloat-xetex-bidi.def}}}
@@ -267,7 +267,7 @@ by Vafa Khalighi.
\documentclass{ltxdoc}
\input{bidi-doc-preamble.ltx}
\hypersetup{%
- pdftitle={Source documentation for version 40.8 of the bidi
+ pdftitle={Source documentation for version 41.0 of the bidi
package}%
}
\EnableCrossrefs
@@ -286,7 +286,7 @@ by Vafa Khalighi.
% \GetFileInfo{\jobname.dtx}
% \title{\textcolor{bidiblue}{\Huge The \textsf{bidi} \textit{Package}}\\
%\LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt]
-%\large Source documentation for \textcolor{bidiblue}{version 40.8}}
+%\large Source documentation for \textcolor{bidiblue}{version 41.0}}
% \author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the {\LaTeX} team for maintaining the package in the period 2018--2020.}}
%\setcounter{page}{0}
%\thispagestyle{empty}
@@ -296,7 +296,7 @@ by Vafa Khalighi.
%\textcolor{bidiblue}{\Huge The \textsf{bidi} \textit{Package}}
%
%\Large
-%Source documentation for \textcolor{bidiblue}{version 40.8}}
+%Source documentation for \textcolor{bidiblue}{version 41.0}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -345,7 +345,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -550,12 +550,12 @@ by Vafa Khalighi.
%\fi
% \section{File \texttt{algorithm2e-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{algorithm2e-xetex-bidi.def}[2018/09/23 v0.2 bidi adaptations for algorithm2e package for XeTeX engine]
+\ProvidesFile{algorithm2e-xetex-bidi.def}[2025/01/03 v0.3 bidi adaptations for algorithm2e package for XeTeX engine]
\expandafter\ifx\csname algocf@within\endcsname\relax% if \algocf@within doesn't exist
\else% else
\renewcommand\thealgocf{\csname the\algocf@within\endcsname\@SepMark\@arabic\c@algocf}%
\fi
-\@ifpackageloaded{color}{}{%
+\ApplyPatchIfPackageLoadedF{color}{%
\bidi@patchcmd{\@algocf@start}{\bgroup}{%
\bgroup
\if@RTL
@@ -581,6 +581,16 @@ by Vafa Khalighi.
\fi
}{}{}
}
+
+\@ifpackagewith{algorithm2e}{algonl}{%
+\renewcommand{\theAlgoLine}{\expandafter\csname the\algocf@float\endcsname\@SepMark\arabic{AlgoLine}}%
+}{}
+
+\@ifpackagewith{algorithm2e}{algopart}{\renewcommand{\algocf@within}{part}}{}
+
+\@ifpackagewith{algorithm2e}{algochapter}{\renewcommand{\algocf@within}{chapter}}{}
+
+\@ifpackagewith{algorithm2e}{algosection}{\renewcommand{\algocf@within}{section}}{}
% \end{macrocode}
%
%\iffalse
@@ -865,7 +875,8 @@ by Vafa Khalighi.
%\fi
% \section{File \texttt{article-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{article-xetex-bidi.def}[2024/12/07 v0.7 bidi adaptations for standard article class for XeTeX engine]
+\ProvidesFile{article-xetex-bidi.def}[2025/01/03 v0.8 bidi adaptations for standard article class for XeTeX engine]
+\IfClassLoadedT{svmult}{\endinput}
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
@@ -1852,7 +1863,7 @@ by Vafa Khalighi.
%\fi
% \section{File \texttt{arydshln-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{arydshln-xetex-bidi.def}[2010/08/01 v0.2 bidi adaptations for arydshln package for XeTeX engine]
+\ProvidesFile{arydshln-xetex-bidi.def}[2025/01/03 v0.3 bidi adaptations for arydshln package for XeTeX engine]
\def\endarray{\adl@endarray \egroup \adl@arrayrestore \if@RTLtab\egroup\endR\egroup\fi\egroup}
\def\endtabular{\endarray $\if@RTLtab\endR\fi\egroup}
\expandafter\let\csname endtabular*\endcsname\endtabular
@@ -1940,7 +1951,7 @@ by Vafa Khalighi.
\def\adl@class@start{6}
\def\adl@class@iiiorvii{3}
\fi
-\@ifpackageloaded{colortbl}{%
+\ApplyPatchCodeToPackage{colortbl}{%
\def\adl@inactivate{\adl@org@inactivate \let\CT@setup\adl@CT@setup}
\def\adl@activate{\adl@org@activate \let\CT@setup\adl@act@CT@setup
\let\@endpbox\adl@org@endpbox}
@@ -1986,7 +1997,7 @@ by Vafa Khalighi.
\prepnext@tok}
\let\adl@act@classz\@classz
\let\adl@org@classz\@classz
-}{}
+}
% \end{macrocode}
% \iffalse
%</arydshln-xetex-bidi.def>
@@ -2019,7 +2030,7 @@ by Vafa Khalighi.
%\fi
% \section{File \texttt{beamerbaseauxtemplates-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{beamerbaseauxtemplates-xetex-bidi.def}[2024/12/20 v0.4 bidi adaptations for beamerbaseauxtemplates package for XeTeX engine]
+\ProvidesFile{beamerbaseauxtemplates-xetex-bidi.def}[2025/01/03 v0.5 bidi adaptations for beamerbaseauxtemplates package for XeTeX engine]
\bidi@csundef{beamer@@tmpop@subsection in toc@sections numbered}
\bidi@csundef{beamer@@tmpop@subsubsection in toc@sections numbered}
@@ -2329,7 +2340,7 @@ by Vafa Khalighi.
\end{minipage}
}
-\@ifpackageloaded{caption}{%
+\ApplyPatchCodeToPackage{caption}{%
\DeclareCaptionFont{beamer@font}{%
\usebeamerfont*{caption}%
% \usebeamercolor[fg]{caption}%
@@ -2337,7 +2348,7 @@ by Vafa Khalighi.
\SetCaptionDefault{font}{beamer@font}
\DeclareCaptionJustification{bidi@beamer@ragged}{\bidi@beamer@ragged}
\SetCaptionDefault{justification}{bidi@beamer@ragged}
-}{}
+}
% \end{macrocode}
% \iffalse
@@ -2612,7 +2623,7 @@ by Vafa Khalighi.
\usebeamertemplate***{sidebar left}%
\vfil%
}}%
- \@ifpackageloaded{beamerinnerthemeinmargin}{}{%
+ \ApplyPatchIfPackageLoadedF{beamerinnerthemeinmargin}{%
\hskip-\textwidth
}%
\fi
@@ -4719,9 +4730,9 @@ by Vafa Khalighi.
% \section{File \texttt{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2024/12/28}
-\def\bidi@version{40.8}
-\def\bidi@releasename{William Paul Thurston}
+\def\bididate{2025/01/03}
+\def\bidi@version{41.0}
+\def\bidi@releasename{Maryam Mirzakhani}
\newcommand*{\bidireleasename}{\bidi@releasename}
\ProvidesPackage{bidi}[\bididate\space v\bidi@version\space (Release \bidi@releasename)\space
Bidirectional typesetting in plain TeX and LaTeX]
@@ -4938,7 +4949,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
}
\newcommand*{\@bidi@pdfcustomproperties}{%
This is the bidi package, Version \bidi@version\space (Release \bidi@releasename),
- Released December 28, 2024.
+ Released January 3, 2025.
}
\newcommand*{\bidi@beamer@ragged}{}
\@RTLmainfalse
@@ -5031,7 +5042,6 @@ Bidirectional typesetting in plain TeX and LaTeX]
\ExplSyntaxOff
\@onlypreamble\pdfencryptsetup
\input{latex-xetex-bidi.def}
-\input{loadingorder-xetex-bidi.def}
\pdfencryptsetup{%
userpassword,%
@@ -5122,10 +5132,10 @@ Bidirectional typesetting in plain TeX and LaTeX]
%\fi
% \section{File \texttt{bidi.tex}}
% \begin{macrocode}
-\def\bididate{2024/12/28}
+\def\bididate{2025/01/03}
\catcode`@=11
-\def\bidi@version{40.8}
-\def\bidi@releasename{William Paul Thurston}
+\def\bidi@version{41.0}
+\def\bidi@releasename{Maryam Mirzakhani}
\def\bidireleasename{\bidi@releasename}
\let \protect \relax
\newlinechar`\^^J
@@ -5239,7 +5249,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
}
\def\@bidi@pdfcustomproperties{%
This is the bidi package, Version \bidi@version\space (Release \bidi@releasename),
- Released December 28, 2024.
+ Released January 3, 2025.
}
\def\bidi@pdfm@mark{%
\special{pdf:%
@@ -6046,7 +6056,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
% \section{File \texttt{biditools.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{biditools}[2024/12/07 v2.4 Programming tools for bidi package]
+\ProvidesPackage{biditools}[2025/01/03 v2.6 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%
@@ -6132,12 +6142,6 @@ Old form `\string#1' should be \string\begin{\expandafter\@gobble\string#1}%
ill-advised in the old versions of bidi package.%
}%
}
-\def\@tagsextension{clo}
-\def\@definitionfileextension{def}
-\def\@texfileextension{tex}
-\def\@iftagsloaded{\@ifl@aded\@tagsextension}
-\def\@ifdefinitionfileloaded{\@ifl@aded\@definitionfileextension}
-\def\@iftexfileloaded{\@ifl@aded\@texfileextension}
\def\eqnewif#1#2{%
\count@\escapechar \escapechar\m@ne
\let#1\iffalse
@@ -6782,14 +6786,6 @@ ill-advised in the old versions of bidi package.%
\catcode\number`\@=\the\catcode`\@\relax}%
\bidi@resrvda}
-\newcommand\bidi@isloaded[2][]{
- \expandafter\ifx\csname if@bidi@#2loaded@\endcsname\relax
- \expandafter\newif\csname if@bidi@#2loaded@\endcsname
- \fi
- \@ifpackageloaded{#2}
- {\csname @bidi@#2loaded@true\endcsname #1}
- {\csname @bidi@#2loaded@false\endcsname}}
-
\protected\def\bidi@ifscanable#1{%
\begingroup
\edef\bidi@resrvda{%
@@ -7546,439 +7542,271 @@ ill-advised in the old versions of bidi package.%
% infinite loop
%\looprepeat \doloopbody {}
-
-\renewcommand{\InputIfFileExists}[2]{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #1-@bidi@alias\endcsname\relax
- \expandafter\@secondoftwo
- \else
- \bidi@replacefile@msg{\csname #1-@bidi@alias\endcsname}{#1}%
- \expandafter\@firstoftwo
- \fi
- {%
- \expandafter\InputIfFileExists\expandafter{\csname
- #1-@bidi@alias\endcsname}{#2}%
- }%
- {\IfFileExists{#1}{%
- \bidi@load@hook{before}{#1}%
- #2\@addtofilelist{#1}%
- \@@input \@filef@und
- \bidi@load@hook{after}{#1}%
- }}%
-}
-
-\newcommand*{\bidi@@loadwithoptions}{}
-\newcommand*{\bidi@loadwithoptions}{}
-\let\bidi@loadwithoptions\@loadwithoptions
-
-\renewcommand*{\@loadwithoptions}[3]{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #3.#1-@bidi@aliasname\endcsname\relax
- \def\bidi@@loadwithoptions{\bidi@loadwithoptions{#1}{#2}{#3}}%
- \else
- \bidi@replacefile@msg{\csname #3.#1-@bidi@aliasname\endcsname.#1}{#3.#1}%
- \def\bidi@@loadwithoptions{%
- \@loadwithoptions{#1}{#2}{\csname #3.#1-@bidi@aliasname\endcsname}%
- }%
- \fi
- \bidi@@loadwithoptions
-}
-\newcommand*{\bidi@onefilewithoptions}{}
-\let\bidi@onefilewithoptions\@onefilewithoptions
-\def\@onefilewithoptions#1[#2][#3]#4{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #1.#4-@bidi@aliasname\endcsname\relax
- \def\bidi@@onefilewithoptions{\bidi@onefilewithoptions{#1}}%
- \else
- \bidi@replacefile@msg{\csname #1.#4-@bidi@aliasname\endcsname.#4}{#1.#4}%
- \edef\bidi@@onefilewithoptions{%
- \noexpand\@onefilewithoptions{\csname #1.#4-@bidi@aliasname\endcsname}}%
- \fi
- \bidi@@onefilewithoptions[{#2}][{#3}]{#4}%
- \bidi@load@hook{lateafter}{#1.#4}%
-}
-
-\newcommand*{\bidi@ReplaceInput}[2]{%
- \expandafter\edef\csname #1-@bidi@alias\endcsname{#2}%
-}
-
-\newcommand*{\bidi@UnReplaceInput}[1]{%
- \ifcsname #1-@bidi@alias\endcsname
- \expandafter\let\csname #1-@bidi@alias\endcsname\relax
- \fi
-}
-
-\newcommand*{\@bidi@replacefilewithext}[3]{%
- \expandafter\edef\csname #1.#3-@bidi@aliasname\endcsname{#2}%
- }
-\newcommand*{\bidi@ReplacePackage}[2]{%
- \@bidi@replacefilewithext{#1}{#2}\@pkgextension
-}
-\newcommand*{\bidi@ReplaceClass}[2]{%
- \@bidi@replacefilewithext{#1}{#2}\@clsextension
-}
-\newcommand*{\@bidi@unreplacefilewithext}[2]{%
- \ifcsname #1.#2-@bidi@aliasname\endcsname
- \expandafter\let\csname #1.#2-@bidi@aliasname\endcsname\relax
- \fi
-}
-\newcommand*{\bidi@UnReplacePackage}[1]{%
- \@bidi@unreplacefilewithext{#1}\@pkgextension
-}
-\newcommand*{\bidi@UnReplaceClass}[1]{%
- \@bidi@unreplacefilewithext{#1}\@clsextension
-}
-\newcommand*{\bidi@replacefile@msg}[2]{%
- \PackageInfo{biditools}{inputing `#1' instead of `#2'}%
-}
+\ExplSyntaxOn
+\NewDocumentCommand \bidi@AfterClass { s m o +m }
+ {
+ \IfBooleanTF { #1 }
+ {
+ \@ifclassloaded{ #2 }
+ { #4 }
+ {
+ \hook_gput_code:nnn
+ { file / #2.\@clsextension / after }
+ { #3 }
+ { #4 }
+ }
+ }
+ {
+ \hook_gput_code:nnn { file / #2.\@clsextension / after } { #3 } { #4 }
+ }
+ }
+
+\seq_new:N \g__biditools_input_file_seq
-\newcommand*{\bidi@load@hook}[2]{%
- \@ifundefined{#2-@#1}{}{%
- \@nameuse{#2-@#1}%
- \expandafter\let\csname #2-@#1\endcsname=\relax}}
-\newcommand*{\bidi@set@load@hook}[2]{%
- \@ifundefined{#2-@#1}{\@namedef{#2-@#1}{}}{}%
- \expandafter\g@addto@macro\csname #2-@#1\endcsname}
-\newcommand*{\bidi@BeforeFile}{\bidi@set@load@hook{before}}
-\newcommand*{\bidi@AfterFile}{\bidi@set@load@hook{after}}
-\newcommand*{\bidi@BeforeClass}[1]{%
- \bidi@set@load@hook{before}{#1.\@clsextension}}
-\newcommand*{\bidi@AfterClass}{%
- \@ifstar {\@s@bidi@AfterClass}{%
- \@ifnextchar +\@@bidi@AfterClass{%
- \@ifnextchar !\@@@bidi@AfterClass\@bidi@AfterClass
- }%
- }%
-}
+\prg_new_protected_conditional:Npnn \__bidi_if_loading:n #1 { T, F, TF }
+ {
+ \str_set:Nx \l_tmpa_str { #1 }
+ \seq_if_in:NxTF \g__biditools_input_file_seq { \str_use:N \l_tmpa_str }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
-\newcommand*{\@@@bidi@AfterClass}[2]{%
- \begingroup\ifx\csname #2.\@clsextension-h@@k\endcsname\relax
- \aftergroup\@s@bidi@AfterClass
- \else
- \aftergroup\bidi@AfterAtEndOfClass
- \fi
- \endgroup{#2}%
-}
+\prg_new_protected_conditional:Npnn \bidi_if_class_loaded:n #1 { T, F, TF }
+ {
+ \@ifclassloaded { #1 }
+ {
+ \__bidi_if_loading:nTF { #1.\@clsextension }
+ { \prg_return_false: }
+ { \prg_return_true: }
+ }
+ {
+ \prg_return_false:
+ }
+ }
+
+\prg_new_protected_conditional:Npnn \bidi_if_package_loaded:n #1 { T, F, TF }
+ {
+ \@ifpackageloaded { #1 }
+ {
+ \__bidi_if_loading:nTF { #1.\@pkgextension }
+ { \prg_return_false: }
+ { \prg_return_true: }
+ }
+ {
+ \prg_return_false:
+ }
+ }
-\newcommand*{\bidi@AfterAtEndOfClass}[1]{%
- \bidi@set@load@hook{lateafter}{#1.\@clsextension}}
-\newcommand*{\@@bidi@AfterClass}[2]{%
- \begingroup
- \expandafter\ifx\csname #2.\@clsextension-h@@k\endcsname\relax
- \aftergroup\@s@bidi@AfterClass
- \else
- \aftergroup\@bidi@AfterClass
- \fi
- \endgroup{#2}%
-}
+\NewDocumentCommand \bidi@AfterAtEndOfClass { s m o +m }
+ {
+ \IfBooleanTF { #1 }
+ {
+ \bidi_if_class_loaded:nTF { #2 }
+ { #4 }
+ { \hook_gput_code:nnn { class / #2 / after } { #3 } { #4 } }
+ }
+ {
+ \bidi_if_class_loaded:nF
+ { #2 }
+ { \hook_gput_code:nnn { class / #2 / after } { #3 } { #4 } }
+ }
+ }
+
+\NewDocumentCommand \bidi@AfterPackage { s m o +m }
+ {
+ \IfBooleanTF { #1 }
+ {
+ \@ifpackageloaded{ #2 }
+ { #4 }
+ {
+ \hook_gput_code:nnn
+ { file / #2.\@pkgextension / after }
+ { #3 }
+ { #4 }
+ }
+ }
+ {
+ \hook_gput_code:nnn { file / #2.\@pkgextension / after } { #3 } { #4 }
+ }
+ }
+
+\NewDocumentCommand \bidi@AfterAtEndOfPackage { s m o +m }
+ {
+ \IfBooleanTF { #1 }
+ {
+ \bidi_if_package_loaded:nTF { #2 }
+ { #4 }
+ { \hook_gput_code:nnn { package / #2 / after } { #3 } { #4 } }
+ }
+ {
+ \bidi_if_package_loaded:nF
+ { #2 }
+ { \hook_gput_code:nnn { package / #2 / after } { #3 } { #4 } }
+ }
+ }
+
+\clist_new:N \l__biditools_package_clist
+\msg_new:nnn { biditools } { cannot-prevent-for-already-loaded-package }
+ {
+ Can~not~prevent~package~`#1'~from~being~loaded,~
+ since~it~has~been~loaded~already~before~line~\msg_line_number:
+ }
+\clist_new:N \g__biditools_prevent_clist
-\newcommand*{\@bidi@AfterClass}[1]{%
- \bidi@set@load@hook{after}{#1.\@clsextension}}
-\newcommand*{\@s@bidi@AfterClass}[1]{%
- \begingroup
- \@ifclassloaded{#1}{%
- \aftergroup\@secondoftwo
- }{%
- \aftergroup\@bidi@AfterClass
- }%
- \endgroup
- {#1}%
-}
+\NewDocumentCommand \bidi@PreventPackageFromLoading { s +o m }
+ {
+ \clist_set:Nx \l__biditools_package_clist { #3 }
+ \clist_map_inline:Nn \l__biditools_package_clist
+ {
+ \@ifpackageloaded { ##1 }
+ {
+ \IfBooleanTF { #1 } { \msg_info:nnn } { \msg_warning:nnn }
+ { biditools } { cannot-prevent-for-already-loaded-package } { ##1 }
+ }
+ {
+ \clist_if_in:NnF \g__biditools_prevent_clist { ##1 }
+ { \clist_gput_right:Nn \g__biditools_prevent_clist { ##1 } }
+ \tl_if_exist:cF { g__biditools_exclude_package_##1_tl }
+ {
+ \tl_new:c { g__biditools_exclude_package_##1_tl }
+ }
+ \IfValueT { #2 }
+ {
+ \tl_gput_right:cn { g__biditools_exclude_package_##1_tl } { #2 }
+ }
+ \disable@package@load { ##1 }
+ { \tl_use:c { g__biditools_exclude_package_##1_tl } }
+ }
+ }
+ \clist_clear:N \l__biditools_package_clist
+ }
+
+\NewDocumentCommand \bidi@ResetPreventPackageFromLoading {}
+ {
+ \clist_map_function:NN \g__biditools_prevent_clist \reenable@package@load
+ \clist_gclear:N \g__biditools_prevent_clist
+ }
+
+\NewDocumentCommand \bidi@StorePreventPackageFromLoading { m }
+ { \edef #1 { \clist_use:Nn \g__biditools_prevent_clist { , } } }
+\NewDocumentCommand \bidi@UnPreventPackageFromLoading { s m }
+ {
+ \clist_set:Nx \l__biditools_package_clist { #2 }
+ \clist_map_inline:Nn \l__biditools_package_clist
+ {
+ \clist_if_in:NnT \g__biditools_prevent_clist { ##1 }
+ {
+ \clist_gremove_all:Nn \g__biditools_prevent_clist { ##1 }
+ \reenable@package@load { ##1 }
+ \IfBooleanT { #1 }
+ { \cs_undefine:c { g__biditools_exclude_package_##1_tl } }
+ }
+ }
+ }
-\newcommand*{\bidi@BeforePackage}[1]{%
- \bidi@set@load@hook{before}{#1.\@pkgextension}}
-\newcommand*{\bidi@AfterPackage}{%
- \@ifstar {\@s@bidi@AfterPackage}{%
- \@ifnextchar +\@@bidi@AfterPackage{%
- \@ifnextchar !\@@@bidi@AfterPackage\@bidi@AfterPackage
- }%
- }%
-}
-\newcommand*{\@@@bidi@AfterPackage}[2]{%
- \begingroup\ifx\csname #2.\@pkgextension-h@@k\endcsname\relax
- \aftergroup\@s@bidi@AfterPackage
- \else
- \aftergroup\bidi@AfterAtEndOfPackage
- \fi
- \endgroup{#2}%
-}
-\newcommand*{\bidi@AfterAtEndOfPackage}[1]{%
- \bidi@set@load@hook{lateafter}{#1.\@pkgextension}}
-\newcommand*{\@@bidi@AfterPackage}[2]{%
- \begingroup
- \expandafter\ifx\csname #2.\@pkgextension-h@@k\endcsname\relax
- \aftergroup\@s@bidi@AfterPackage
- \else
- \aftergroup\@bidi@AfterPackage
- \fi
- \endgroup{#2}%
-}
-\newcommand*{\@bidi@AfterPackage}[1]{%
- \bidi@set@load@hook{after}{#1.\@pkgextension}}
-\newcommand*{\@s@bidi@AfterPackage}[1]{%
- \begingroup
- \@ifpackageloaded{#1}{%
- \aftergroup\@secondoftwo
- }{%
- \aftergroup\@bidi@AfterPackage
- }%
- \endgroup
- {#1}%
-}
+\NewDocumentCommand \bidi@BeforeClosingMainAux { o m }
+ {
+ \hook_gput_code:nnn { enddocument / afterlastpage } { #1 }
+ {
+ \debug_suspend:
+ \RenewDocumentCommand \bidi@BeforeClosingMainAux { m } { ##1 }
+ \cs_set_eq:NN \__biditools_protected@write:Nnn \protected@write
+ \cs_set_eq:NN \protected@write \bidi@protected@immediate@write
+ #2
+ \cs_set_eq:NN \protected@write \__biditools_protected@write:Nnn
+ \debug_resume:
+ }
+ }
-\newcommand*{\bidi@excludedpackages}{}
-\let\bidi@excludedpackages\@empty
-\newcommand*{\bidi@saved@RequirePackage}{}
-\newcommand*{\bidi@PreventPackageFromLoading}{%
- \@ifstar{\@bidi@PreventPackageFromLoading\PackageInfo}%
- {\@bidi@PreventPackageFromLoading\PackageWarning}%
-}
-\newcommand*{\@bidi@PreventPackageFromLoading}[1]{%
- \@ifnextchar [%]
- {\@@bidi@PreventPackageFromLoading#1}{\@@bidi@PreventPackageFromLoading#1[]}%
-}
-\newcommand*{\@@bidi@PreventPackageFromLoading}{}
+\NewDocumentCommand \bidi@AfterReadingMainAux { o m }
+ {
+ \hook_gput_code:nnn { enddocument / afteraux } { #1 }
+ {
+ \debug_suspend:
+ \RenewDocumentCommand \bidi@AfterReadingMainAux { m } { ##1 }
+ \cs_set_eq:NN \__biditools_protected@write:Nnn \protected@write
+ \cs_set_eq:NN \protected@write \bidi@protected@immediate@write
+ #2
+ \cs_set_eq:NN \protected@write \__biditools_protected@write:Nnn
+ \debug_resume:
+ }
+ }
+
+\clist_new:N \l__biditools_file_patch_clist
+
+\NewDocumentCommand \ApplyPatchToFiles { m O{def} O{bidi} }
+ {
+ \clist_set:Nx \l__biditools_file_patch_clist { #1 }
+ \clist_map_inline:Nn \l__biditools_file_patch_clist
+ {
+ \ApplyPatchToFile { ##1 } [ #2 ] [ #3 ]
+ }
+ \clist_clear:N \l__biditools_file_patch_clist
+ }
-\def\@@bidi@PreventPackageFromLoading#1[#2]#3{%
- \edef\reserved@b{\zap@space#3 \@empty}%
- \ifx \reserved@b\@empty
- #1{biditools}{%
- \string\bidi@PreventPackageFromLoading\space with empty packages\MessageBreak
- argument ignored%
- }%
- \else
- \ifx\bidi@excludedpackages\@empty
- \let\bidi@saved@RequirePackage\RequirePackage
- \let\RequirePackage\bidi@RequirePackage
- \def\reserved@a##1##{%
- \@latex@error
- {\noexpand \usepackage before \string\documentclass}%
- {\noexpand \usepackage may only appear in the document
- preamble, i.e.,\MessageBreak
- between \noexpand\documentclass and
- \string\begin{document}.}%
- \@gobble}%
- \ifx\reserved@a\usepackage\else
- \ifx\usepackage\bidi@saved@RequirePackage\else
- \PackageWarning{biditools}{%
- Maybe serious problem: unexpected definition of\MessageBreak
- \string\usepackage
- }%
- \fi
- \let\usepackage\RequirePackage
- \fi
- \fi
- \expandafter\@for \expandafter\reserved@a\expandafter:\expandafter=%
- \reserved@b\do {%
- \ifx\reserved@a\@empty
- #1{biditools}{%
- empty package argument for
- \string\bidi@PreventPackageFromLoading\MessageBreak
- ignored%
- }%
- \else
- \expandafter\@ifpackageloaded\expandafter{\reserved@a}{%
- #1{biditools}{%
- package `\reserved@a' already loaded.\MessageBreak
- Cannot prevent it from beeing loaded%
- }%
- }{%
- \edef\bidi@excludedpackages{\bidi@excludedpackages,%
- \reserved@a}%
- \if\relax\detokenize{#2}\relax\else
- \@ifundefined{bidi@exclude@package@\reserved@a @do}{%
- \@namedef{bidi@exclude@package@\reserved@a @do}{}%
- }{}%
- \expandafter\def
- \csname bidi@exclude@package@\reserved@a
- @do\expandafter\expandafter\expandafter\endcsname
- \expandafter\expandafter\expandafter{%
- \csname bidi@exclude@package@\reserved@a @do\endcsname
- #2%
- }%
- \fi
- }%
- \fi
- }%
- \ifx\bidi@excludedpackages\@empty
- \bidi@ResetPreventPackageFromLoading
- \fi
- \fi
-}
+\clist_new:N \l__biditools_package_patch_clist
+
+\NewDocumentCommand \ApplyPatchToPackages { m O{bidi} }
+ {
+ \clist_set:Nx \l__biditools_package_patch_clist { #1 }
+ \clist_map_inline:Nn \l__biditools_package_patch_clist
+ {
+ \ApplyPatchToPackage { ##1 } [ #2 ]
+ }
+ \clist_clear:N \l__biditools_package_patch_clist
+ }
+
+\clist_new:N \l__biditools_class_patch_clist
+
+\NewDocumentCommand \ApplyPatchToClasses { m O{bidi} }
+ {
+ \clist_set:Nx \l__biditools_class_patch_clist { #1 }
+ \clist_map_inline:Nn \l__biditools_class_patch_clist
+ {
+ \ApplyPatchToClass { ##1 } [ #2 ]
+ }
+ \clist_clear:N \l__biditools_class_patch_clist
+ }
+
+\NewDocumentCommand \ApplyPatchToClassesIfPackageLoadedF { m m O{bidi} }
+ {
+ \clist_set:Nx \l__biditools_class_patch_clist { #1 }
+ \clist_map_inline:Nn \l__biditools_class_patch_clist
+ {
+ \ApplyPatchToClassIfPackageLoadedF { ##1 } { #2 } [ #3 ]
+ }
+ \clist_clear:N \l__biditools_class_patch_clist
+ }
+\ExplSyntaxOff
-\@onlypreamble\bidi@PreventPackageFromLoading
-\newcommand*{\bidi@ResetPreventPackageFromLoading}{%
- \let\bidi@excludedpackages\@empty
- \ifx\RequirePackage\bidi@RequirePackage
- \ifx\usepackage\RequirePackage
- \let\usepackage\bidi@saved@RequirePackage
- \fi
- \let\RequirePackage\bidi@saved@RequirePackage
- \fi
+\newcommand*{\bidi@ReplaceInput}{\declare@file@substitution}
+\newcommand*{\bidi@UnReplaceInput}
+{\undeclare@file@substitution}
+\newcommand*{\bidi@ReplacePackage}[2]{%
+ \declare@file@substitution{#1.\@pkgextension}{#2.\@pkgextension}%
}
-\@onlypreamble\bidi@ResetPreventPackageFromLoading
-\newcommand*{\bidi@StorePreventPackageFromLoading}[1]{%
- \let#1\bidi@excludedpackages
+\newcommand*{\bidi@UnReplacePackage}[1]{%
+ \undeclare@file@substitution{#1.\@pkgextension}%
}
-\@onlypreamble\bidi@StorePreventPackageFromLoading
-\newcommand*{\bidi@UnPreventPackageFromLoading}{%
- \@ifstar {\@tempswatrue\@bidi@UnPreventPackageFromLoading}%
- {\@tempswafalse\@bidi@UnPreventPackageFromLoading}%
+\newcommand*{\bidi@ReplaceClass}[2]{%
+ \declare@file@substitution{#1.\@clsextension}{#2.\@clsextension}%
}
-
-\newcommand*{\@bidi@UnPreventPackageFromLoading}[1]{%
- \edef\reserved@b{\zap@space#1 \@empty}%
- \if@tempswa
- \@for\reserved@a:=\reserved@b\do {%
- \ifx\reserved@a\@empty \else
- \ifcsname bidi@exclude@package@\reserved@a @do\endcsname
- \expandafter\let
- \csname bidi@exclude@package@\reserved@a @do\endcsname
- \undefined
- \fi
- \fi
- }%
- \fi
- \ifcsname bidi@excludedpackages\endcsname
- \let\reserved@a\bidi@excludedpackages
- \let\bidi@excludedpackages\@empty
- \expandafter\@for\expandafter\reserved@c
- \expandafter:\expandafter=\reserved@a
- \do{%
- \ifx\reserved@c\@empty\else
- \@expandtwoargs\in@{,\reserved@c,}{,\reserved@b,}%
- \ifin@
- \else
- \edef\bidi@excludedpackages{%
- \bidi@excludedpackages,\reserved@c
- }%
- \fi
- \fi
- }%
- \ifx\bidi@excludedpackages\@empty\bidi@ResetPreventPackageFromLoading\fi
- \fi
+\newcommand*{\bidi@UnReplaceClass}[1]{%
+ \undeclare@file@substitution{#1.\@clsextension}%
}
-
-
-\newcommand*{\bidi@RequirePackage}[2][]{%
- \let\reserved@c\@empty
- \let\reserved@d\@empty
- \edef\reserved@b{\zap@space#2 \@empty}%
- \expandafter\@for\expandafter\reserved@b\expandafter:\expandafter=\reserved@b
- \do {%
- \begingroup
- \@tempswatrue
- \@for\reserved@a:=\bidi@excludedpackages\do {%
- \ifx\reserved@a\reserved@b
- \@tempswafalse
- \fi
- }%
- \if@tempswa
- \xdef\reserved@c{\reserved@c,\reserved@b}%
- \else
- \ifx\reserved@b\@empty\else
- \PackageInfo{biditools}{Excluding package `\reserved@b'\MessageBreak
- from loading}%
- \@ifundefined{bidi@exclude@package@\reserved@b @do}{%
- }{%
- \expandafter\g@addto@macro\expandafter\reserved@d
- \csname bidi@exclude@package@\reserved@b @do\endcsname
- }%
- \fi
- \fi
- \endgroup
- }%
- \ifx\reserved@c\@empty
- \let\reserved@a\bidi@gobbleopt
- \else
- \edef\reserved@a{\noexpand\bidi@saved@RequirePackage[#1]{%
- \expandafter\@gobble\reserved@c\@empty}}%
- \fi
- \expandafter\reserved@d
- \reserved@a
-}
-
-\newcommand{\bidi@gobbleopt}[1][]{}
-\AtEndDocument{%
- \let\bidi@saved@checkend=\@checkend
- \renewcommand*{\@checkend}[1]{%
- \def\reserved@a{#1}\def\reserved@b{document}%
- \bidi@saved@checkend{#1}%
- \ifx\reserved@a\reserved@b
- \let\bidi@saved@clearpage=\clearpage
- \renewcommand*{\clearpage}{\bidi@saved@clearpage
- \bidi@hook@bcma
- \bidi@restore@newpage
- \let\clearpage=\bidi@saved@clearpage}%
- \fi%
- \let\bidi@saved@dofilelist\@dofilelist
- \def\@dofilelist{%
- \bidi@hook@acma
- \let\@dofilelist\bidi@saved@dofilelist
- \bidi@saved@dofilelist
- }%
- }%
+\newcommand*{\bidi@BeforeFile}[1]{%
+ \AddToHook{file/#1/before}%
}
-
-
-\newcommand*{\bidi@saved@checkend}{}
-\newcommand*{\bidi@saved@dofilelist}{}
-\newcommand*{\bidi@redefine@newpage}{%
- \let\bidi@saved@newpage\newpage
- \def\bidi@restore@newpage{%
- \renewcommand*{\newpage}{%
- \PackageWarningNoLine{%
- biditools%
- }{%
- \string\newpage\space at main aux file!\MessageBreak
- You have output material at the main aux file.\MessageBreak
- Note, that the \string\bidi@BeforeClosingMainAux\space commands\MessageBreak
- are processed before the output from aux file%
- }%
- \let\newpage\bidi@saved@newpage
- \newpage
- }%
- }%
- \renewcommand*{\newpage}{%
- \PackageError{%
- biditools%
- }{%
- \string\newpage\space at \string\bidi@BeforeClosingMainAux
- }{%
- You should never use \string\newpage\space or
- \string\clear(double)page or other output material at the\MessageBreak
- argument of \string\bidi@BeforeClosingMainAux!\MessageBreak
- If you'll continue, the \string\newpage\space will be ignored to
- avoid corruption of\MessageBreak
- every prior use of \string\bidi@BeforeClosingMainAux.
- }%
- }%
+\newcommand*{\bidi@AfterFile}[1]{%
+ \AddToHook{file/#1/after}%
}
-
-\newcommand*{\bidi@restore@newpage}{}
-\newcommand*{\bidi@hook@bcma}{}
-\newcommand*{\bidi@hook@acma}{}
-\newcommand*{\bidi@BeforeClosingMainAux}{%
- \ifx\bidi@hook@bcma\@empty
- \gdef\bidi@hook@bcma{%
- \renewcommand*{\bidi@BeforeClosingMainAux}[1]{####1}%
- \let\protected@write\bidi@protected@immediate@write
- \bidi@redefine@newpage
- }%
- \fi
- \g@addto@macro\bidi@hook@bcma%
+\newcommand*{\bidi@BeforeClass}[1]{%
+ \bidi@BeforeFile{#1.\@clsextension}%
}
-
-\newcommand*{\bidi@AfterReadingMainAux}{%
- \ifx\bidi@hook@acma\@empty
- \gdef\bidi@hook@acma{%
- \renewcommand*{\bidi@AfterReadingMainAux}[1]{####1}%
- \let\protected@write\bidi@protected@immediate@write
- }%
- \fi
- \g@addto@macro\bidi@hook@acma%
+\newcommand*{\bidi@BeforePackage}[1]{%
+ \bidi@BeforeFile{#1.\@pkgextension}%
}
\long\def\bidi@protected@immediate@write#1#2#3{%
@@ -7991,79 +7819,126 @@ ill-advised in the old versions of bidi package.%
\if@nobreak\ifvmode\nobreak\fi\fi
}
-\def\bidi@patch@counter{0}%
-\if@bidi@csundef{numexpr}{%
- \def\bidi@patch@stepcounter{%
- \begingroup
- \count@\bidi@patch@counter\relax
- \advance\count@\@ne\relax
- \edef\x{\endgroup
- \noexpand\def\noexpand\bidi@patch@counter{\the\count@}%
- }%
- \x
- }%
-}{%
- \def\bidi@patch@stepcounter{%
- \edef\bidi@patch@counter{%
- \the\numexpr\bidi@patch@counter+\@ne\relax
- }%
- }%
-}
-\def\bidi@patch@list{}
-\def\bidi@patch@Add{%
- \bidi@appto\bidi@patch@list
-}
\def\bidi@patch@AfterPackage#1{%
\@ifpackageloaded{#1}{%
\@firstofone
}{%
- \@bidi@patch@AfterPackage{#1}%
+ \AddToHook{package/#1/after}%
}%
}
-\def\@bidi@patch@AfterPackage#1{%
- \edef\bidi@patch@temp{#1}%
- \bidi@patch@stepcounter
- \expandafter\bidi@patch@@AfterPackage
- \csname @bidi@patch@\bidi@patch@counter\expandafter\endcsname{%
- \bidi@patch@temp
- }%
-}
-\def\bidi@patch@@AfterPackage#1#2#3{%
- \begingroup
- \toks@{#3}%
- \xdef\bidi@patch@gtemp{%
- \noexpand\@ifpackageloaded{#2}{%
- \noexpand\let\noexpand#1\noexpand\relax
- \the\toks@
- }{}%
- }%
- \endgroup
- \let#1\bidi@patch@gtemp
- \bidi@patch@Add#1%
- \bidi@patch@try{bidi@AfterPackage}{#2}#1%
-}
-\def\bidi@patch@try#1#2#3{%
- \if@bidi@csundef{#1}{}{%
- \csname #1\endcsname{#2}{#3}%
+\def\bidi@patch@AfterFile#1{%
+ \IfFileLoadedTF{#1}{%
+ \@firstofone
+ }{%
+ \AddToHook{file/#1/after}%
}%
}
-\AtBeginDocument{\bidi@patch@list}
+\NewDocumentCommand \ApplyPatchToFile { m O{def} O{bidi} }
+ {
+ \bidi@patch@AfterFile{#1.#2}{%
+ \ifnum\catcode`\@=11
+ \input{#1-xetex-#3.def}%
+ \else
+ \bidi@storecatcode\@
+ \makeatletter
+ \input{#1-xetex-#3.def}%
+ \bidi@restorecatcode\@
+ \fi
+ }%
+ }
+
+\NewDocumentCommand \ApplyPatchCodeToFile { m +m O{def} }
+ {
+ \bidi@patch@AfterFile{#1.#3}{#2}%
+ }
+
+\NewDocumentCommand \ApplyPatchToFilesIfPackageLoadedF { m m O{def} O{bidi} }
+ {
+ \AddToHook{begindocument/before}{%
+ \IfPackageLoadedF{#1}{%
+ \ApplyPatchToFiles{#2}[#3][#4]%
+ }%
+ }
+ }
+
+\NewDocumentCommand \ApplyPatchToClassIfPackageLoadedF { m m O{bidi} }
+ {
+ \AddToHook{begindocument/before}{%
+ \IfPackageLoadedF{#2}{%
+ \ifnum\catcode`\@=11
+ \@ifclassloaded{#1}{%
+ \input{#1-xetex-#3.def}%
+ }{}%
+ \else
+ \bidi@storecatcode\@
+ \makeatletter
+ \@ifclassloaded{#1}{%
+ \input{#1-xetex-#3.def}%
+ }{}%
+ \bidi@restorecatcode\@
+ \fi
+ }%
+ }
+ }
+
+\NewDocumentCommand \ApplyPatchToPackageIfPackageLoadedF { m m O{bidi} }
+ {
+ \AddToHook{begindocument/before}{%
+ \IfPackageLoadedF{#2}{%
+ \IfPackageLoadedT{#1}{%
+ \ifnum\catcode`\@=11
+ \input{#1-xetex-#3.def}%
+ \else
+ \bidi@storecatcode\@
+ \makeatletter
+ \input{#1-xetex-#3.def}%
+ \bidi@restorecatcode\@
+ \fi
+ }%
+ }%
+ }
+ }
+
+\NewDocumentCommand \ApplyPatchIfPackageLoaded { m +m +m }
+ {
+ \AddToHook{begindocument/before}{%
+ \ifnum\catcode`\@=11
+ \@ifpackageloaded{#1}{#2}{#3}%
+ \else
+ \bidi@storecatcode\@
+ \makeatletter
+ \@ifpackageloaded{#1}{#2}{#3}%
+ \bidi@restorecatcode\@
+ \fi
+ }
+ }
+
+\NewDocumentCommand \ApplyPatchIfPackageLoadedT { m +m }
+ {
+ \ApplyPatchIfPackageLoaded{#1}{#2}{}%
+ }
+
+\NewDocumentCommand \ApplyPatchIfPackageLoadedF { m +m }
+ {
+ \ApplyPatchIfPackageLoaded{#1}{}{#2}%
+ }
-\bidi@AtEndPreamble{\bidi@patch@list}%
+\NewDocumentCommand \ApplyPatchToPackage { m O{bidi} }
+ {
+ \bidi@patch@AfterPackage{#1}{\input{#1-xetex-#2.def}}%
+ }
-\bidi@AfterEndPreamble{%
- \let\bidi@patch@OrgIfPackageLoaded\@ifpackageloaded
- \let\bidi@patch@OrgIfPackageLater\@ifpackagelater
- \let\bidi@patch@OrgIfClassLoaded\@ifclassloaded
- \let\bidi@patch@OrgIfClassLater\@ifclasslater
- \bidi@patch@list
- \let\@ifpackageloaded\bidi@patch@OrgIfPackageLoaded
- \let\@ifpackagelater\bidi@patch@OrgIfPackageLater
- \let\@ifclassloaded\bidi@patch@OrgIfClassLoaded
- \let\@ifclasslater\bidi@patch@OrgIfClassLater
-}%
+\NewDocumentCommand \ApplyPatchCodeToPackage { m +m }
+ {
+ \bidi@patch@AfterPackage{#1}{#2}%
+ }
+
+\NewDocumentCommand \ApplyPatchToClass { m O{bidi} }
+ {
+ \@ifclassloaded{#1}{\input{#1-xetex-#2.def}}{}%
+ }
% \end{macrocode}
% \iffalse
%</biditools.sty>
@@ -8072,7 +7947,7 @@ ill-advised in the old versions of bidi package.%
% \section{File \texttt{bidituftefloat.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bidituftefloat}[2017/05/19 v0.2
+\ProvidesPackage{bidituftefloat}[2025/01/03 v0.3
bidi implementation of tufte float]
\RequirePackage{xifthen}
\newcommand{\@bidituftefloat@pkgname}{bidituftefloat}
@@ -8098,7 +7973,7 @@ bidi implementation of tufte float]
\setboolean{@bidituftefloat@twoside}{false}%
\setboolean{@bidituftefloat@symmetric}{false}%
}
-\@ifclassloaded{book}{\ExecuteOptions{twoside}}{}
+\IfClassLoadedT{book}{\ExecuteOptions{twoside}}
\newboolean{@bidituftefloat@debug}
\newcommand*{\@bidituftefloat@caption@justification}{\@bidituftefloat@justification@autodetect}
\ProcessOptions
@@ -10530,7 +10405,7 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{book-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{book-xetex-bidi.def}[2017/06/09 v1.0 bidi adaptations for standard book class for XeTeX engine]
+\ProvidesFile{book-xetex-bidi.def}[2025/01/03 v1.1 bidi adaptations for standard book class for XeTeX engine]
\renewenvironment{theindex}
{\if@twocolumn
\@restonecolfalse
@@ -10546,7 +10421,7 @@ bidi implementation of tufte title]
\parskip\z@ \@plus .3\p@\relax
\let\item\@idxitem}
{\if@restonecol\onecolumn\else\clearpage\fi}
-\@ifclassloaded{bookest}{}{%
+\IfClassLoadedF{bookest}{%
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
@@ -10997,7 +10872,9 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{crop-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{crop-xetex-bidi.def}[2013/04/10 v0.2 bidi adaptations for crop package for XeTeX engine]
+\ProvidesFile{crop-xetex-bidi.def}[2025/01/03 v0.3 bidi adaptations for crop package for XeTeX engine]
+\IfClassLoadedT{memoir}{\endinput}
+\RequirePackage{graphicx}
\renewcommand*\CROP@@ulc{%
\if@RTLmain%
\begin{picture}(0,0)
@@ -12756,7 +12633,7 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{extrafootnotefeatures-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{extrafootnotefeatures-xetex-bidi.def}[2023/08/02 v2.6 bidi extra footnote features for XeTeX engine]
+\ProvidesFile{extrafootnotefeatures-xetex-bidi.def}[2025/01/03 v2.7 bidi extra footnote features for XeTeX engine]
\newdimen\bidi@columnwidth
\def\bidi@floathook{%
\bidi@columnwidth\columnwidth
@@ -12979,7 +12856,7 @@ bidi implementation of tufte title]
\@bidi@after@Hy@hyperfootnotes
\@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth
}
-\@ifclassloaded{memoir}{\let\plainfootnotes\normalfootnotes}{}
+\IfClassLoadedT{memoir}{\let\plainfootnotes\normalfootnotes}
\bidi@ensure@newcommand*{\setSingleSpace}[1]{%
\def\m@m@singlespace{#1}%
\def\m@m@footnote@spacing{#1}%
@@ -16931,7 +16808,8 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{floatrow-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{floatrow-xetex-bidi.def}[2013/04/08 v0.1 bidi adaptations for floatrow package for XeTeX engine]
+\ProvidesFile{floatrow-xetex-bidi.def}[2025/01/03 v0.2 bidi adaptations for floatrow package for XeTeX engine]
+\RequirePackage{color}
\renewcommand\flnew@within[1]{\@addtoreset{\FB@captype}{#1}%
\expandafter\edef\csname the\FB@captype\endcsname{%
\expandafter\noexpand\csname
@@ -16943,7 +16821,7 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{flowfram-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{flowfram-xetex-bidi.def}[2018/09/29 v0.5 bidi adaptations for flowfram package for XeTeX engine]
+\ProvidesFile{flowfram-xetex-bidi.def}[2025/01/03 v0.6 bidi adaptations for flowfram package for XeTeX engine]
\def\@outputdblcol{%
\@nxtcol=\c@thisframe
\c@curpg=\c@page
@@ -17062,7 +16940,7 @@ bidi implementation of tufte title]
{\csname colheight\romannumeral#1\endcsname}{%
\expandafter\box\csname column\romannumeral#1\endcsname}%
}}}
-\@ifclassloaded{book}{%
+\IfClassLoadedT{book}{%
\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
\renewcommand \thefigure
@@ -17074,8 +16952,8 @@ bidi implementation of tufte title]
\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection}
\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
-\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}{}
-\@ifclassloaded{report}{%
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}
+\IfClassLoadedT{report}{%
\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
\renewcommand \thefigure
@@ -17087,7 +16965,7 @@ bidi implementation of tufte title]
\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection}
\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
-\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}{}
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}
\renewcommand{\rotateframe}[2]{\if@ttb@rotate
\rotatebox{#1}{\if@RTL\beginL\fi#2\if@RTL\endL\fi}%
\else
@@ -18448,7 +18326,7 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{hyperref-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{hyperref-xetex-bidi.def}[2018/11/11 v1.1 bidi adaptations for hyperref package for XeTeX engine]
+\ProvidesFile{hyperref-xetex-bidi.def}[2025/01/03 v1.2 bidi adaptations for hyperref package for XeTeX engine]
\AtBeginDocument{%
\def\contentsline#1#2#3#4{%
\ifx\\#4\\%
@@ -18598,7 +18476,7 @@ bidi implementation of tufte title]
\fi
}%
}%
- \@ifpackageloaded{tabularx}{%
+ \ApplyPatchCodeToPackage{tabularx}{%
\let\HyOrg@TX@endtabularx\TX@endtabularx
\def\Hy@tabularx@hook{%
\let\@footnotetext\H@@footnotetext
@@ -18617,8 +18495,8 @@ bidi implementation of tufte title]
}%
\endgroup
\let\TX@endtabularx\Hy@gtemp
- }{}%
- \@ifpackageloaded{longtable}{%
+ }%
+ \ApplyPatchCodeToPackage{longtable}{%
\CheckCommand*{\LT@p@LTRftntext}[1]{%
\edef\@tempa{%
\the\LT@p@ftn
@@ -18695,8 +18573,8 @@ bidi implementation of tufte title]
\fi
}%
}%
- }{}%
- \@ifpackageloaded{bidipoem}{%
+ }%
+ \ApplyPatchCodeToPackage{bidipoem}{%
\long\def\bidipoem@p@ftntext#1{%
\edef\@tempx{%
\the\bidipoem@p@ftn
@@ -18790,7 +18668,7 @@ bidi implementation of tufte title]
\fi
}%
}%
- }{}%
+ }%
\let\HyOrg@maketitle\maketitle
\def\maketitle{%
\let\Hy@saved@footnotemark\@footnotemark
@@ -18995,7 +18873,7 @@ bidi implementation of tufte title]
\def\XeTeX{Xe\TeX}%
\def\XeLaTeX{Xe\LaTeX}%
}
-\@ifpackageloaded{longtable}{%
+\ApplyPatchCodeToPackage{longtable}{%
\begingroup
\def\y{\LT@array}%
\@ifundefined{scr@LT@array}{%
@@ -19025,7 +18903,7 @@ bidi implementation of tufte title]
}%
}%
\expandafter\x\LT@start\@nil
-}{}
+}
\bidi@patchcmd\@TextField{%
\@pdfm@mark
}{%
@@ -19312,7 +19190,7 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{listings-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{listings-xetex-bidi.def}[2018/09/15 v1.5 bidi adaptations for listings package for XeTeX engine]
+\ProvidesFile{listings-xetex-bidi.def}[2025/01/03 v1.6 bidi adaptations for listings package for XeTeX engine]
\lst@Key{captiondirection}{textdirection}{%
\lstKV@SwitchCases{#1}%
{textdirection:\\%
@@ -19392,7 +19270,7 @@ bidi implementation of tufte title]
\endgroup%
}{}{}%
}
-\@ifpackageloaded{caption}{%
+\ApplyPatchIfPackageLoaded{caption}{%
\AtBeginCaption{%
\bidi@lst@ensure@caption@script{\@nonlatintrue}{\@nonlatinfalse}%
\bidi@lst@ensure@caption@direction{\@RTLfalse}{\@RTLtrue}%
@@ -19419,312 +19297,11 @@ bidi implementation of tufte title]
% \end{macrocode}
% \iffalse
%</listings-xetex-bidi.def>
-%<*loadingorder-xetex-bidi.def>
-%\fi
-% \section{File \texttt{loadingorder-xetex-bidi.def}}
-% \begin{macrocode}
-\ProvidesFile{loadingorder-xetex-bidi.def}[2024/12/08 v0.99 making sure that bidi is the last package loaded]
-\bidi@isloaded{amsmath}
-\bidi@isloaded{amstext}
-\bidi@isloaded{amsthm}
-\bidi@isloaded{animate}
-\bidi@isloaded{breqn}
-\bidi@isloaded{cals}
-\bidi@isloaded{caption}
-\bidi@isloaded{crop}
-\bidi@isloaded{cuted}
-\bidi@isloaded{cutwin}
-\bidi@isloaded{color}
-\bidi@isloaded{dblfnote}
-\bidi@isloaded{diagbox}
-\bidi@isloaded{xcolor}
-\bidi@isloaded{colortbl}
-\bidi@isloaded{float}
-\bidi@isloaded{floatrow}
-\bidi@isloaded{flowfram}
-\bidi@isloaded{framed}
-\bidi@isloaded{ftnright}
-\bidi@isloaded{xltxtra}
-\bidi@isloaded{xunicode}
-\bidi@isloaded{wrapfig}
-\bidi@isloaded{graphicx}
-\bidi@isloaded{geometry}
-\bidi@isloaded{hvfloat}
-\bidi@isloaded{mdframed}
-\bidi@isloaded{midfloat}
-\bidi@isloaded{ntheorem}
-\bidi@isloaded{ntheorem-hyper}
-\bidi@isloaded{hyperref}
-\bidi@isloaded{fancybox}
-\bidi@isloaded{fancyhdr}
-\bidi@isloaded{fix2col}
-\bidi@isloaded{draftwatermark}
-\bidi@isloaded{empheq}
-\bidi@isloaded{overpic}
-\bidi@isloaded{pdfpages}
-\bidi@isloaded{listings}
-\bidi@isloaded{lettrine}
-\bidi@isloaded{lineno}
-\bidi@isloaded{media9}
-\bidi@isloaded{pstricks}
-\bidi@isloaded{pgf}
-\bidi@isloaded{picinpar}
-\bidi@isloaded{quotchap}
-\bidi@isloaded{tikz}
-\bidi@isloaded{titlesec}
-\bidi@isloaded{titletoc}
-\bidi@isloaded{array}
-\bidi@isloaded{soul}
-\bidi@isloaded{stabular}
-\bidi@isloaded{subfig}
-\bidi@isloaded{subfigure}
-\bidi@isloaded{supertabular}
-\bidi@isloaded{xtab}
-\bidi@isloaded{longtable}
-\bidi@isloaded{arydshln}
-\bidi@isloaded{multicol}
-\bidi@isloaded{multienum}
-\bidi@isloaded{minitoc}
-\bidi@isloaded{natbib}
-\bidi@isloaded{newfloat}
-\bidi@isloaded{ragged2e}
-\bidi@isloaded{rotating}
-\bidi@isloaded{tabls}
-\bidi@isloaded{tabulary}
-\bidi@isloaded{tocbasic}
-\bidi@isloaded{tocstyle}
-\bidi@isloaded{tocbibind}
-\bidi@isloaded{fontspec}
-\bidi@isloaded{arabxetex}
-\bidi@isloaded{polyglossia}
-\bidi@isloaded{fancyvrb}
-\AtBeginDocument{
- \if@bidi@amsmathloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package amsmath after bidi package. Please load package amsmath before bidi package, and then try to run xelatex on your document again}{}]{amsmath}
- \fi%
- \if@bidi@amstextloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package amstext after bidi package. Please load package amstext before bidi package, and then try to run xelatex on your document again}{}]{amstext}
- \fi%
- \if@bidi@amsthmloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package amsthm after bidi package. Please load package amsthm before bidi package, and then try to run xelatex on your document again}{}]{amsthm}
- \fi%
- \if@bidi@animateloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package animate after bidi package. Please load package animate before bidi package, and then try to run xelatex on your document again}{}]{animate}
- \fi%
- \if@bidi@breqnloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package breqn after bidi package. Please load package breqn before bidi package, and then try to run xelatex on your document again}{}]{breqn}
- \fi%
- \if@bidi@calsloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package cals after bidi package. Please load package cals before bidi package, and then try to run xelatex on your document again}{}]{cals}
- \fi%
- \if@bidi@captionloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package caption after bidi package. Please load package caption before bidi package, and then try to run xelatex on your document again}{}]{caption}
- \fi%
- \if@bidi@croploaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package crop after bidi package. Please load package crop before bidi package, and then try to run xelatex on your document again}{}]{crop}
- \fi%
- \if@bidi@colorloaded@\else
- \@ifpackageloaded{hyperref}{}{%
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package color after bidi package. Please load package color before bidi package, and then try to run xelatex on your document again}{}]{color}}
- \fi%
- \if@bidi@cutwinloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package cutwin after bidi package. Please load package cutwin before bidi package, and then try to run xelatex on your document again}{}]{cutwin}
- \fi%
- \if@bidi@cutedloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package cuted after bidi package. Please load package cuted before bidi package, and then try to run xelatex on your document again}{}]{cuted}
- \fi%
- \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%
- \if@bidi@colortblloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package colortbl after bidi package. Please load package colortbl before bidi package, and then try to run xelatex on your document again}{}]{colortbl}
- \fi%
- \if@bidi@floatloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package float after bidi package. Please load package float before bidi package, and then try to run xelatex on your document again}{}]{float}
- \fi%
- \if@bidi@floatrowloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package floatrow after bidi package. Please load package floatrow before bidi package, and then try to run xelatex on your document again}{}]{floatrow}
- \fi%
- \if@bidi@flowframloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package flowfram after bidi package. Please load package flowfram before bidi package, and then try to run xelatex on your document again}{}]{flowfram}
- \fi%
- \if@bidi@framedloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package framed after bidi package. Please load package framed before bidi package, and then try to run xelatex on your document again}{}]{framed}
- \fi%
- \if@bidi@ftnrightloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package ftnright after bidi package. Please load package ftnright before bidi package, and then try to run xelatex on your document again}{}]{ftnright}
- \fi%
- \if@bidi@xltxtraloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xltxtra after bidi package. Please load package xltxtra before bidi package, and then try to run xelatex on your document again}{}]{xltxtra}
- \fi%
- \if@bidi@xunicodeloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xunicode after bidi package. Please load package xunicode before bidi package, and then try to run xelatex on your document again}{}]{xunicode}
- \fi%
- \if@bidi@wrapfigloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package wrapfig after bidi package. Please load package wrapfig before bidi package, and then try to run xelatex on your document again}{}]{wrapfig}
- \fi%
- \if@bidi@graphicxloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package graphicx after bidi package. Please load package graphicx before bidi package, and then try to run xelatex on your document again}{}]{graphicx}
- \fi%
- \if@bidi@geometryloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package geometry after bidi package. Please load package geometry before bidi package, and then try to run xelatex on your document again}{}]{geometry}
- \fi%
- \if@bidi@hvfloatloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package hvfloat after bidi package. Please load package hvfloat before bidi package, and then try to run xelatex on your document again}{}]{hvfloat}
- \fi%
- \if@bidi@mdframedloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package mdframed after bidi package. Please load package mdframed before bidi package, and then try to run xelatex on your document again}{}]{mdframed}
- \fi%
- \if@bidi@midfloatloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package midfloat after bidi package. Please load package midfloat before bidi package, and then try to run xelatex on your document again}{}]{midfloat}
- \fi%
- \if@bidi@ntheoremloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package ntheorem after bidi package. Please load package ntheorem before bidi package, and then try to run xelatex on your document again}{}]{ntheorem}
- \fi%
- \if@bidi@hyperrefloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package hyperref after bidi package. Please load package hyperref before bidi package, and then try to run xelatex on your document again}{}]{hyperref}
- \fi%
- \if@bidi@fancyboxloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fancybox after bidi package. Please load package fancybox before bidi package, and then try to run xelatex on your document again}{}]{fancybox}
- \fi%
- \if@bidi@fancyhdrloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fancyhdr after bidi package. Please load package fancyhdr before bidi package, and then try to run xelatex on your document again}{}]{fancyhdr}
- \fi%
- \if@bidi@draftwatermarkloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package draftwatermark after bidi package. Please load package draftwatermark before bidi package, and then try to run xelatex on your document again}{}]{draftwatermark}
- \fi%
- \if@bidi@empheqloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package empheq after bidi package. Please load package empheq before bidi package, and then try to run xelatex on your document again}{}]{empheq}
- \fi%
- \if@bidi@overpicloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package overpic after bidi package. Please load package overpic before bidi package, and then try to run xelatex on your document again}{}]{overpic}
- \fi%
- \if@bidi@pdfpagesloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pdfpages after bidi package. Please load package pdfpages before bidi package, and then try to run xelatex on your document again}{}]{pdfpages}
- \fi%
- \if@bidi@lettrineloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package lettrine after bidi package. Please load package lettrine before bidi package, and then try to run xelatex on your document again}{}]{lettrine}
- \fi
- \if@bidi@linenoloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package lineno after bidi package. Please load package lineno before bidi package, and then try to run xelatex on your document again}{}]{lineno}
- \fi%
- \if@bidi@listingsloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package listings after bidi package. Please load package listings before bidi package, and then try to run xelatex on your document again}{}]{listings}
- \fi%
- \csname if@bidi@media9loaded@\endcsname\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package media9 after bidi package. Please load package media9 before bidi package, and then try to run xelatex on your document again}{}]{media9}
- \fi%
- \if@bidi@pstricksloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pstricks after bidi package. Please load package pstricks before bidi package, and then try to run xelatex on your document again}{}]{pstricks}
- \fi%
- \if@bidi@pgfloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pgf after bidi package. Please load package pgf before bidi package, and then try to run xelatex on your document again}{}]{pgf}
- \fi%
- \if@bidi@picinparloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package picinpar after bidi package. Please load package picinpar before bidi package, and then try to run xelatex on your document again}{}]{picinpar}
- \fi%
- \if@bidi@quotchaploaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package quotchap after bidi package. Please load package quotchap before bidi package, and then try to run xelatex on your document again}{}]{quotchap}
- \fi%
- \if@bidi@tikzloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tikz after bidi package. Please load package tikz before bidi package, and then try to run xelatex on your document again}{}]{tikz}
- \fi%
- \if@bidi@titlesecloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package titlesec after bidi package. Please load package titlesec before bidi package, and then try to run xelatex on your document again}{}]{titlesec}
- \fi%
- \if@bidi@titletocloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package titletoc after bidi package. Please load package titletoc before bidi package, and then try to run xelatex on your document again}{}]{titletoc}
- \fi%
- \if@bidi@arrayloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package array after bidi package. Please load package array before bidi package, and then try to run xelatex on your document again}{}]{array}
- \fi%
- \if@bidi@stabularloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package stabular after bidi package. Please load package stabular before bidi package, and then try to run xelatex on your document again}{}]{stabular}
- \fi%
- \if@bidi@soulloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package soul after bidi package. Please load package soul before bidi package, and then try to run xelatex on your document again}{}]{soul}
- \fi%
- \if@bidi@subfigloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package subfig after bidi package. Please load package subfig before bidi package, and then try to run xelatex on your document again}{}]{subfig}
- \fi%
- \if@bidi@subfigureloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package subfigure after bidi package. Please load package subfigure before bidi package, and then try to run xelatex on your document again}{}]{subfigure}
- \fi%
- \if@bidi@supertabularloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package supertabular after bidi package. Please load package supertabular before bidi package, and then try to run xelatex on your document again}{}]{supertabular}
- \fi%
- \if@bidi@xtabloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xtab after bidi package. Please load package xtab before bidi package, and then try to run xelatex on your document again}{}]{xtab}
- \fi%
- \if@bidi@longtableloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package longtable after bidi package. Please load package longtable before bidi package, and then try to run xelatex on your document again}{}]{longtable}
- \fi%
- \if@bidi@arydshlnloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package arydshln after bidi package. Please load package arydshln before bidi package, and then try to run xelatex on your document again}{}]{arydshln}
- \fi%
- \if@bidi@multicolloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package multicol after bidi package. Please load package multicol before bidi package, and then try to run xelatex on your document again}{}]{multicol}
- \fi%
- \if@bidi@multienumloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package multienum after bidi package. Please load package multienum before bidi package, and then try to run xelatex on your document again}{}]{multienum}
- \fi%
- \if@bidi@minitocloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package minitoc after bidi package. Please load package minitoc before bidi package, and then try to run xelatex on your document again}{}]{minitoc}
- \fi%
- \if@bidi@natbibloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package natbib after bidi package. Please load package natbib before bidi package, and then try to run xelatex on your document again}{}]{natbib}
- \fi%
- \if@bidi@newfloatloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package newfloat after bidi package. Please load package newfloat before bidi package, and then try to run xelatex on your document again}{}]{newfloat}
- \fi%
- \csname if@bidi@ragged2eloaded@\endcsname\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package ragged2e after bidi package. Please load package ragged2e before bidi package, and then try to run xelatex on your document again}{}]{ragged2e}
- \fi%
- \if@bidi@rotatingloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package rotating after bidi package. Please load package rotating before bidi package, and then try to run xelatex on your document again}{}]{rotating}
- \fi%
- \if@bidi@tablsloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tabls after bidi package. Please load package tabls before bidi package, and then try to run xelatex on your document again}{}]{tabls}
- \fi%
- \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%
- \if@bidi@tocbibindloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tocbibind after bidi package. Please load package tocbibind before bidi package, and then try to run xelatex on your document again}{}]{tocbibind}
- \fi%
- \if@bidi@fontspecloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fontspec after bidi package. Please load package fontspec before bidi package, and then try to run xelatex on your document again}{}]{fontspec}
- \fi%
- \if@bidi@arabxetexloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package arabxetex after bidi package. Please load package arabxetex before bidi package, and then try to run xelatex on your document again}{}]{arabxetex}
- \fi%
- \if@bidi@polyglossialoaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package polyglossia after bidi package. Please load package polyglossia before bidi package, and then try to run xelatex on your document again}{}]{polyglossia}
- \fi%
- \if@bidi@fancyvrbloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fancyvrb after bidi package. Please load package fancyvrb before bidi package, and then try to run xelatex on your document again}{}]{fancyvrb}
- \fi%
-}
-% \end{macrocode}
-% \iffalse
-%</loadingorder-xetex-bidi.def>
%<*longtable-xetex-bidi.def>
%\fi
% \section{File \texttt{longtable-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{longtable-xetex-bidi.def}[2022/05/20 v0.6 bidi adaptations for longtable package for XeTeX engine]
+\ProvidesFile{longtable-xetex-bidi.def}[2025/01/03 v0.7 bidi adaptations for longtable package for XeTeX engine]
\def\LT@array[#1]#2{%
\refstepcounter{table}\stepcounter{LT@tables}%
\if l#1%
@@ -19788,7 +19365,7 @@ bidi implementation of tufte title]
\fi
\endgraf\vskip\baselineskip}%
\hss}}}
-\@ifpackageloaded{caption}{%
+\ApplyPatchCodeToPackage{caption}{%
\renewcommand\LT@makecaption[3]{%
\caption@LT@make{%
\caption@LT@settype\LTcaptype
@@ -19805,7 +19382,7 @@ bidi implementation of tufte title]
\caption@@make{#2}{#3}\endgraf
\caption@make@below
\caption@end}}%
-}{}
+}
\def\LT@startpbox#1{%
\bgroup\color@begingroup
\let\@footnotetext\LT@p@ftntext
@@ -19857,7 +19434,8 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{lscape-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{lscape-xetex-bidi.def}[2022/07/14 v0.2 bidi adaptations for lscape package for XeTeX engine]
+\ProvidesFile{lscape-xetex-bidi.def}[2025/01/03 v0.3 bidi adaptations for lscape package for XeTeX engine]
+\RequirePackage{graphicx}
\bidi@patchcmd{\LS@rot}{\rotatebox{90}{\box\@outputbox}}{%
\if@RTL
\rotatebox[origin=br]{-90}{\box\@outputbox}%
@@ -19894,7 +19472,8 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{mathtools-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{mathtools-xetex-bidi.def}[2018/01/07 v0.1 bidi adaptations for mathtools package for XeTeX engine]
+\ProvidesFile{mathtools-xetex-bidi.def}[2025/01/03 v0.2 bidi adaptations for mathtools package for XeTeX engine]
+\RequirePackage{graphicx}
\MHInternalSyntaxOn
\def\MT_define_tagform:nwnn #1[#2]#3#4{
\@namedef{MT_tagform_#1:n}##1
@@ -19987,6 +19566,15 @@ bidi implementation of tufte title]
% \end{macrocode}
% \iffalse
%</mdframed-xetex-bidi.def>
+%<*media9-xetex-bidi.def>
+%\fi
+% \section{File \texttt{media9-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{media9-xetex-bidi.def}[2025/01/03 v0.1 bidi adaptations for media9 package for XeTeX engine]
+\RequirePackage{bidi-media9}
+% \end{macrocode}
+% \iffalse
+%</media9-xetex-bidi.def>
%<*bidi-media9.sty>
%\fi
% \section{File \texttt{bidi-media9.sty}}
@@ -20580,7 +20168,7 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{memoir-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{memoir-xetex-bidi.def}[2017/06/09 v0.6 bidi adaptations for memoir class for XeTeX engine]
+\ProvidesFile{memoir-xetex-bidi.def}[2025/01/03 v0.7 bidi adaptations for memoir class for XeTeX engine]
\renewcommand{\keepthetitle}{%
\@bsmtitlempty
\global\let\thanks\relax
@@ -20690,7 +20278,7 @@ bidi implementation of tufte title]
} % end of the \parbox
\fi
\vskip\belowcaptionskip}
-\@ifpackageloaded{caption}{%
+\ApplyPatchCodeToPackage{caption}{%
\AtBeginPackage{caption}{
\ClassWarningNoLine{memoir}{%
You are using the caption package with the memoir \MessageBreak
@@ -20731,7 +20319,7 @@ bidi implementation of tufte title]
\normalsize
\@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par
\endgroup}
-}}{}
+}}
\renewenvironment{thebibliography}[1]{%
\bibsection
\if@RTL\if@LTRbibitems\@RTLfalse\else\fi\else\if@RTLbibitems\@RTLtrue\else\fi\fi
@@ -25464,13 +25052,39 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \section{File \texttt{sidecap-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{sidecap-xetex-bidi.def}[2010/08/01 v0.1 bidi adaptations for sidecap package for XeTeX engine]
+\ProvidesFile{sidecap-xetex-bidi.def}[2025/01/03 v0.2 bidi adaptations for sidecap package for XeTeX engine]
+\RequirePackage{ragged2e}
\renewcommand*{\SC@FLOAT}[2]{\if@RTL%
\isSC@ODD{{#1}\hspace{\sidecaptionsep}{#2}} {{#2}\hspace{\sidecaptionsep}{#1}}\else%
\isSC@ODD{{#2}\hspace{\sidecaptionsep}{#1}} {{#1}\hspace{\sidecaptionsep}{#2}}\fi}
\renewcommand*\SC@justify@caption{\if@RTL%
\isSC@ODD{\RaggedLeft}{\RaggedRight}\else%
\isSC@ODD{\RaggedRight}{\RaggedLeft}\fi}
+
+\@ifpackagewith{sidecap}{innercaption}{%
+\if@RTL \renewcommand*{\SC@FLOAT}[2]{%
+ \isSC@ODD{{#2}\hspace{\sidecaptionsep}{#1}} {{#1}\hspace{\sidecaptionsep}{#2}}}
+ \renewcommand*\SC@justify@caption{%
+ \isSC@ODD{\RaggedRight}{\RaggedLeft}}\else
+ \renewcommand*{\SC@FLOAT}[2]{%
+ \isSC@ODD{{#1}\hspace{\sidecaptionsep}{#2}} {{#2}\hspace{\sidecaptionsep}{#1}}}
+ \renewcommand*\SC@justify@caption{%
+ \isSC@ODD{\RaggedLeft}{\RaggedRight}}\fi
+}{}
+
+\@ifpackagewith{sidecap}{rightcaption}{%
+ \if@RTL\renewcommand*{\SC@FLOAT}[2]{{#1}\hspace{\sidecaptionsep}{#2}}
+ \def\SC@justify@caption{\RaggedLeft}\else%
+ \renewcommand*{\SC@FLOAT}[2]{{#2}\hspace{\sidecaptionsep}{#1}}
+ \def\SC@justify@caption{\RaggedRight}\fi%
+}{}
+
+\@ifpackagewith{sidecap}{leftcaption}{%
+\if@RTL \renewcommand*{\SC@FLOAT}[2]{{#2}\hspace{\sidecaptionsep}{#1}}
+ \def\SC@justify@caption{\RaggedRight}\else%
+ \renewcommand*{\SC@FLOAT}[2]{{#1}\hspace{\sidecaptionsep}{#2}}
+ \def\SC@justify@caption{\RaggedLeft}\fi%
+}{}
% \end{macrocode}
% \iffalse
%</sidecap-xetex-bidi.def>
@@ -25895,9 +25509,10 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \section{File \texttt{tocbibind-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{tocbibind-xetex-bidi.def}[2017/06/09 v0.4 bidi adaptations for tocbibind package for XeTeX engine]
+\ProvidesFile{tocbibind-xetex-bidi.def}[2025/01/03 v0.5 bidi adaptations for tocbibind package for XeTeX engine]
+\IfClassLoadedT{memoir}{\endinput}
\if@dotocbib
- \@ifpackageloaded{natbib}{}{% natbib not loaded
+ \ApplyPatchIfPackageLoadedF{natbib}{% natbib not loaded
\renewcommand{\bibsection}{\t@cb@bchapsec}
\renewenvironment{thebibliography}[1]{%
\bibsection
@@ -25922,9 +25537,11 @@ to\rtside{\box\bslice\hfil}}
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
+\ApplyPatchCodeToPackage{chapterbib}{%
\@ifpackagewith{chapterbib}{sectionbib}%
{\renewcommand{\sectionbib}[2]{}}%
- {}
+ {}%
+ }
\fi
\if@inltxdoc\else
@@ -25983,7 +25600,8 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \section{File \texttt{tocloft-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{tocloft-xetex-bidi.def}[2023/08/02 v0.3 bidi adaptations for tocloft package for XeTeX engine]
+\ProvidesFile{tocloft-xetex-bidi.def}[2025/01/03 v0.4 bidi adaptations for tocloft package for XeTeX engine]
+\IfClassLoadedT{memoir}{\endinput}
\renewcommand{\cftpnumalign}{\if@RTL l\else r\fi}
\let\cftdot\@SepMark
\if@cfthaspart
@@ -27663,7 +27281,7 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \section{File \texttt{latex-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{latex-xetex-bidi.def}[2024/12/08 v1.5.1 bidi adaptations for `latex.ltx' for XeTeX engine]
+\ProvidesFile{latex-xetex-bidi.def}[2025/01/03 v1.5.2 bidi adaptations for `latex.ltx' for XeTeX engine]
\newcommand{\TeXXeTOn}{\TeXXeTstate\@ne}
\newcommand{\TeXXeTOff}{\TeXXeTstate\z@}
\TeXXeTOn
@@ -27781,7 +27399,7 @@ to\rtside{\box\bslice\hfil}}
\let\setLR=\setLTR
\let\unsetRL=\setLTR
\def\bidi@tabular@RTLcases{\let\@halignto\@empty\@bidi@tabular@RTLcases}
-\@ifpackageloaded{array}{%
+\ApplyPatchIfPackageLoaded{array}{%
\def\@bidi@tabular@RTLcases{\@RTLtabtrue%
\leavevmode
\hbox \bgroup $\left.\col@sep\tabcolsep \let\d@llarbegin\begingroup
@@ -28466,7 +28084,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\let\bidi@saved@leqno=\leqno
\def\eqno{\ifnum\predisplaydirection<\z@ \bidi@saved@leqno \else \bidi@saved@eqno \fi}
\def\leqno{\ifnum\predisplaydirection<\z@ \bidi@saved@eqno \else \bidi@saved@leqno \fi}
-\@ifpackageloaded{amsmath}{}{
+\ApplyPatchIfPackageLoadedF{amsmath}{
\def\@eqnnum{{\normalfont \normalcolor \if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}
}
\input{footnote-xetex-bidi.def}
@@ -28479,182 +28097,163 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\if@bidi@csundef{@idxitem}{}{%
\renewcommand\@idxitem{\par\hangindent \if@RTL-\fi40\p@}%
}
-\@ifpackageloaded{tocbasic}{\input{tocbasic-xetex-bidi.def}}{}
-\@ifclassloaded{article}{\@ifclassloaded{svmult}{}{\input{article-xetex-bidi.def}}}{}
-\@ifclassloaded{extarticle}{\input{extarticle-xetex-bidi.def}}{}
-\@ifclassloaded{artikel1}{\input{artikel1-xetex-bidi.def}}{}
-\@ifclassloaded{artikel2}{\input{artikel2-xetex-bidi.def}}{}
-\@ifclassloaded{artikel3}{\input{artikel3-xetex-bidi.def}}{}
-\@ifclassloaded{amsart}{\input{amsart-xetex-bidi.def}}{}
-\@ifclassloaded{beamer}{\input{beamer-xetex-bidi.def}}{}
-\@ifclassloaded{letter}{\input{letter-xetex-bidi.def}}{}
-\@ifclassloaded{extletter}{\input{extletter-xetex-bidi.def}}{}
-\@ifclassloaded{memoir}{\input{memoir-xetex-bidi.def}}{}
-\@ifclassloaded{refrep}{\input{refrep-xetex-bidi.def}}{}
-\@ifclassloaded{extreport}{\input{extreport-xetex-bidi.def}}{}
-\@ifclassloaded{report}{\@ifpackageloaded{flowfram}{}{\input{report-xetex-bidi.def}}}{}
-\@ifclassloaded{rapport1}{\input{rapport1-xetex-bidi.def}}{}
-\@ifclassloaded{rapport3}{\input{rapport3-xetex-bidi.def}}{}
-\@ifclassloaded{scrartcl}{\input{scrartcl-xetex-bidi.def}}{}
-\@ifclassloaded{scrbook}{\input{scrbook-xetex-bidi.def}}{}
-\@ifclassloaded{scrreprt}{\input{scrreprt-xetex-bidi.def}}{}
-\@ifclassloaded{amsbook}{\input{amsbook-xetex-bidi.def}}{}
-\@ifclassloaded{extbook}{\input{extbook-xetex-bidi.def}}{}
-\@ifclassloaded{boek}{\input{boek-xetex-bidi.def}}{}
-\@ifclassloaded{boek3}{\input{boek3-xetex-bidi.def}}{}
-\@ifclassloaded{book}{\@ifpackageloaded{flowfram}{}{\input{book-xetex-bidi.def}}}{}
-\@ifclassloaded{bookest}{\input{bookest-xetex-bidi.def}}{}
-\@ifclassloaded{combine}{\input{combine-xetex-bidi.def}}{}
-\@ifclassloaded{imsproc}{\input{imsproc-xetex-bidi.def}}{}
-\@ifpackageloaded{amsmath}{}{%
-\@iftagsloaded{leqno}{\input{leqno-xetex-bidi.def}}{}
-\@iftagsloaded{fleqn}{\input{fleqn-xetex-bidi.def}}{}
-}
-\@ifpackageloaded{mathtools}{%
- \RequirePackage{graphicx}%
- \input{mathtools-xetex-bidi.def}%
- }{}
-\@ifpackageloaded{crop}{\RequirePackage{graphicx}}{}
-\@ifpackageloaded{lscape}{\RequirePackage{graphicx}}{}
-\@ifpackageloaded{sidecap}{\RequirePackage{ragged2e}}{}
-\@ifpackageloaded{floatrow}{\RequirePackage{color}}{}
-\@ifpackageloaded{algorithm2e}{\input{algorithm2e-xetex-bidi.def}}{}
-\@ifpackagewith{algorithm2e}{algonl}{%
-\renewcommand{\theAlgoLine}{\expandafter\csname the\algocf@float\endcsname\@SepMark\arabic{AlgoLine}}%
-}{}
-\@ifpackagewith{algorithm2e}{algopart}{\renewcommand{\algocf@within}{part}}{}
-\@ifpackagewith{algorithm2e}{algochapter}{\renewcommand{\algocf@within}{chapter}}{}
-\@ifpackagewith{algorithm2e}{algosection}{\renewcommand{\algocf@within}{section}}{}
-\@ifpackageloaded{amsmath}{\input{amsmath-xetex-bidi.def}}{}
-\@ifpackageloaded{amstext}{\input{amstext-xetex-bidi.def}}{}
-\@ifpackageloaded{amsthm}{\input{amsthm-xetex-bidi.def}}{}
-\@ifpackageloaded{breqn}{\input{breqn-xetex-bidi.def}}{}
-\@ifpackageloaded{cals}{\input{cals-xetex-bidi.def}}{}
-\@ifpackageloaded{caption}{\input{caption-xetex-bidi.def}}{}
-\@ifpackageloaded{caption3}{\input{caption3-xetex-bidi.def}}{}
-\@ifpackageloaded{floatrow}{\input{floatrow-xetex-bidi.def}}{}
-\@ifpackageloaded{crop}{\@ifclassloaded{memoir}{}{\input{crop-xetex-bidi.def}}}{}
-\@ifpackageloaded{color}{\input{color-xetex-bidi.def}}{}
-\@ifpackageloaded{cutwin}{\input{cutwin-xetex-bidi.def}}{}
-\@ifpackageloaded{cuted}{\input{cuted-xetex-bidi.def}}{}
-\@ifpackageloaded{xcolor}{\input{xcolor-xetex-bidi.def}}{}
-\@ifpackageloaded{colortbl}{\input{colortbl-xetex-bidi.def}}{}
-\@ifpackageloaded{float}{\@ifpackageloaded{floatrow}{}{\input{float-xetex-bidi.def}}}{}
-\@ifpackageloaded{flowfram}{\input{flowfram-xetex-bidi.def}}{}
-\@ifpackageloaded{xltxtra}{\input{xltxtra-xetex-bidi.def}}{}
-\@ifpackageloaded{wrapfig}{\input{wrapfig-xetex-bidi.def}}{}
-\@ifpackageloaded{graphicx}{\input{graphicx-xetex-bidi.def}}{}
-\@ifpackageloaded{geometry}{\input{geometry-xetex-bidi.def}}{}
-\@ifpackageloaded{hvfloat}{\input{hvfloat-xetex-bidi.def}}{}
-\@ifpackageloaded{ntheorem}{\input{ntheorem-xetex-bidi.def}}{}
-\@ifpackageloaded{tabularx}{\input{tabularx-xetex-bidi.def}}{}
-\@ifpackageloaded{longtable}{\input{longtable-xetex-bidi.def}}{}
-\@ifpackageloaded{lscape}{\input{lscape-xetex-bidi.def}}{}
-\@ifpackageloaded{hyperref}{\input{hyperref-xetex-bidi.def}}{}
-\@ifpackageloaded{footnotebackref}{\input{footnotebackref-xetex-bidi.def}}{}
-\@ifpackageloaded{ntheorem-hyper}{\input{ntheorem-hyper-xetex-bidi.def}}{}
-\@ifpackageloaded{fancybox}{\input{fancybox-xetex-bidi.def}}{}
-\@ifpackageloaded{fancyhdr}{\input{fancyhdr-xetex-bidi.def}}{}
-\@ifpackageloaded{fix2col}{\input{fix2col-xetex-bidi.def}}{}
-\@ifpackageloaded{ftnright}{\input{ftnright-xetex-bidi.def}}{}
-\@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}}{}
-\@ifpackageloaded{overpic}{\input{overpic-xetex-bidi.def}}{}
-\@ifpackageloaded{pdfbase}{\input{pdfbase-xetex-bidi.def}}{}
-\@ifpackageloaded{pdflscape}{\input{pdflscape-xetex-bidi.def}}{}
-\@ifpackageloaded{pdfpages}{\input{pdfpages-xetex-bidi.def}}{}
-\@ifpackageloaded{lettrine}{\input{lettrine-xetex-bidi.def}}{}
-\@ifpackageloaded{lineno}{\input{lineno-xetex-bidi.def}}{}
-\@ifpackageloaded{listings}{\input{listings-xetex-bidi.def}}{}
-\@ifpackageloaded{media9}{\RequirePackage{bidi-media9}}{}
-\@iftexfileloaded{pstricks}{\input{pstricks-xetex-bidi.def}}{}
-\@iftexfileloaded{pgfcorescopes.code}{\input{pgfcorescopes.code-xetex-bidi.def}}{}
-\@ifpackageloaded{titlesec}{\input{titlesec-xetex-bidi.def}}{}
-\@ifpackageloaded{titletoc}{\input{titletoc-xetex-bidi.def}}{}
-\@ifpackageloaded{array}{\input{array-xetex-bidi.def}}{}
-\@ifpackageloaded{sidecap}{\input{sidecap-xetex-bidi.def}}{}
-\@ifpackagewith{sidecap}{innercaption}{%
-\if@RTL \renewcommand*{\SC@FLOAT}[2]{%
- \isSC@ODD{{#2}\hspace{\sidecaptionsep}{#1}} {{#1}\hspace{\sidecaptionsep}{#2}}}
- \renewcommand*\SC@justify@caption{%
- \isSC@ODD{\RaggedRight}{\RaggedLeft}}\else
- \renewcommand*{\SC@FLOAT}[2]{%
- \isSC@ODD{{#1}\hspace{\sidecaptionsep}{#2}} {{#2}\hspace{\sidecaptionsep}{#1}}}
- \renewcommand*\SC@justify@caption{%
- \isSC@ODD{\RaggedLeft}{\RaggedRight}}\fi
-}{}
-\@ifpackagewith{sidecap}{rightcaption}{%
- \if@RTL\renewcommand*{\SC@FLOAT}[2]{{#1}\hspace{\sidecaptionsep}{#2}}
- \def\SC@justify@caption{\RaggedLeft}\else%
- \renewcommand*{\SC@FLOAT}[2]{{#2}\hspace{\sidecaptionsep}{#1}}
- \def\SC@justify@caption{\RaggedRight}\fi%
-}{}
-\@ifpackagewith{sidecap}{leftcaption}{%
-\if@RTL \renewcommand*{\SC@FLOAT}[2]{{#2}\hspace{\sidecaptionsep}{#1}}
- \def\SC@justify@caption{\RaggedRight}\else%
- \renewcommand*{\SC@FLOAT}[2]{{#1}\hspace{\sidecaptionsep}{#2}}
- \def\SC@justify@caption{\RaggedLeft}\fi%
-}{}
-\@ifpackageloaded{soul}{\input{soul-xetex-bidi.def}}{}
-\@ifpackageloaded{stabular}{\input{stabular-xetex-bidi.def}}{}
-\@ifpackageloaded{subfigure}{\input{subfigure-xetex-bidi.def}}{}
-\@ifpackageloaded{arydshln}{\input{arydshln-xetex-bidi.def}}{}
-\@ifpackageloaded{mdframed}{\input{mdframed-xetex-bidi.def}}{}
-\@ifpackageloaded{multicol}{\input{multicol-xetex-bidi.def}}{}
-\@ifpackageloaded{adjmulticol}{\input{adjmulticol-xetex-bidi.def}}{}
-\@ifpackageloaded{multienum}{\input{multienum-xetex-bidi.def}}{}
-\@ifpackageloaded{natbib}{\input{natbib-xetex-bidi.def}}{}
-\@ifpackageloaded{newfloat}{\input{newfloat-xetex-bidi.def}}{}
-\@ifpackageloaded{nicematrix}{\input{nicematrix-xetex-bidi.def}}{}
-\@ifpackageloaded{minitoc}{\input{minitoc-xetex-bidi.def}}{}
-\@ifpackageloaded{pgfsys}{\input{pgfsys.code-xetex-bidi.def}}{}
-\@ifpackageloaded{picinpar}{\input{picinpar-xetex-bidi.def}}{}
-\@ifpackageloaded{quotchap}{\input{quotchap-xetex-bidi.def}}{}
-\@ifpackageloaded{ragged2e}{\input{ragged2e-xetex-bidi.def}}{}
-\@ifpackageloaded{rotating}{\input{rotating-xetex-bidi.def}}{}
-\@ifpackageloaded{tabls}{\input{tabls-xetex-bidi.def}}{}
-\@ifpackageloaded{tabulary}{\input{tabulary-xetex-bidi.def}}{}
-\@ifpackageloaded{tcolorbox}{\input{tcolorbox-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}}}{}
-\@ifdefinitionfileloaded{tc-xetex}{\input{tc-xetex-bidi.def}}{}
-\@ifpackageloaded{todonotes}{\input{todonotes-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaseauxtemplates}{\input{beamerbaseauxtemplates-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaseboxes}{\input{beamerbaseboxes-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbasecolor}{\input{beamerbasecolor-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbasecompatibility}{\input{beamerbasecompatibility-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaseframecomponents}{\input{beamerbaseframecomponents-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaseframesize}{\input{beamerbaseframesize-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaselocalstructure}{\input{beamerbaselocalstructure-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbasemisc}{\input{beamerbasemisc-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbasenavigation}{\input{beamerbasenavigation-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaseoverlay}{\input{beamerbaseoverlay-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemedefault}{\input{beamerinnerthemedefault-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemecircles}{\input{beamerinnerthemecircles-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemefocus}{\input{beamerinnerthemefocus-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemeinmargin}{\input{beamerinnerthemeinmargin-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthememetropolis}{\input{beamerinnerthememetropolis-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemerectangles}{\input{beamerinnerthemerectangles-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemerounded}{\input{beamerinnerthemerounded-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemedefault}{\input{beamerouterthemedefault-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemefocus}{\input{beamerouterthemefocus-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemeinfolines}{\input{beamerouterthemeinfolines-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthememetropolis}{\input{beamerouterthememetropolis-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthememiniframes}{\input{beamerouterthememiniframes-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemesidebar}{\input{beamerouterthemesidebar-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemesplit}{\input{beamerouterthemesplit-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemeshadow}{\input{beamerouterthemeshadow-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemesmoothbars}{\input{beamerouterthemesmoothbars-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemesmoothtree}{\input{beamerouterthemesmoothtree-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemetree}{\input{beamerouterthemetree-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerthemeHannover}{\input{beamerthemeHannover-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerthemeSingapore}{\input{beamerthemeSingapore-xetex-bidi.def}}{}
+
+\ApplyPatchToClassesIfPackageLoadedF{%
+ book, %
+ report %
+}{flowfram}
+
+\ApplyPatchToPackageIfPackageLoadedF{float}{floatrow}
+
+\ApplyPatchToFilesIfPackageLoadedF{amsmath}{%
+ fleqn, %
+ leqno%
+}[clo]
+
+\ApplyPatchToClasses{%
+ amsart, %
+ amsbook, %
+ article, %
+ artikel1, %
+ artikel2, %
+ artikel3, %
+ beamer, %
+ boek, %
+ boek3, %
+ bookest, %
+ combine, %
+ extbook, %
+ extletter, %
+ extarticle, %
+ extreport, %
+ imsproc, %
+ letter, %
+ memoir, %
+ rapport1, %
+ rapport3, %
+ refrep, %
+ scrartcl, %
+ scrbook, %
+ scrreprt %
+}
+
+\ApplyPatchToPackages{%
+ adjmulticol, %
+ algorithm2e, %
+ amsmath, %
+ amstext, %
+ amsthm, %
+ arydshln, %
+ array, %
+ beamerbaseauxtemplates, %
+ beamerbaseboxes, %
+ beamerbasecolor, %
+ beamerbasecompatibility, %
+ beamerbaseframecomponents, %
+ beamerbaseframesize, %
+ beamerbaselocalstructure, %
+ beamerbasemisc, %
+ beamerbasenavigation, %
+ beamerbaseoverlay, %
+ beamerinnerthemecircles, %
+ beamerinnerthemedefault, %
+ beamerinnerthemefocus, %
+ beamerinnerthemeinmargin, %
+ beamerinnerthememetropolis, %
+ beamerinnerthemerectangles, %
+ beamerinnerthemerounded, %
+ beamerouterthemedefault, %
+ beamerouterthemefocus, %
+ beamerouterthemeinfolines, %
+ beamerouterthememetropolis, %
+ beamerouterthememiniframes, %
+ beamerouterthemesidebar, %
+ beamerouterthemesplit, %
+ beamerouterthemeshadow, %
+ beamerouterthemesmoothbars, %
+ beamerouterthemesmoothtree, %
+ beamerouterthemetree, %
+ beamerthemeHannover, %
+ beamerthemeSingapore, %
+ breqn, %
+ cals, %
+ caption, %
+ caption3, %
+ color, %
+ colortbl, %
+ crop, %
+ cuted, %
+ cutwin, %
+ dblfnote, %
+ diagbox, %
+ draftwatermark, %
+ eso-pic, %
+ empheq, %
+ fancybox, %
+ fancyhdr, %
+ fix2col, %
+ float, %
+ floatrow, %
+ flowfram, %
+ footnotebackref, %
+ framed, %
+ ftnright, %
+ geometry, %
+ graphicx, %
+ hvfloat, %
+ hyperref, %
+ lettrine, %
+ lineno, %
+ listings, %
+ longtable, %
+ lscape, %
+ mathtools, %
+ mdframed, %
+ media9, %
+ midfloat, %
+ minitoc, %
+ multicol, %
+ multienum, %
+ natbib, %
+ newfloat, %
+ nicematrix, %
+ ntheorem, %
+ ntheorem-hyper, %
+ overpic, %
+ pdfbase, %
+ pdflscape, %
+ pdfpages, %
+ pgfsys, %
+ picinpar, %
+ quotchap, %
+ ragged2e, %
+ rotating, %
+ sidecap, %
+ soul, %
+ stabular, %
+ subfigure, %
+ tabls, %
+ tabularx, %
+ tabulary, %
+ tcolorbox, %
+ titlesec, %
+ titletoc, %
+ tocbasic, %
+ tocbibind, %
+ tocloft, %
+ tocstyle, %
+ todonotes, %
+ wrapfig, %
+ xcolor, %
+ xltxtra %
+}
+
+\ApplyPatchToFiles{%
+ pgfcorescopes.code, %
+ pstricks %
+}[tex]
+
+\ApplyPatchToFile{tc-xetex}
% \end{macrocode}
% \iffalse
%</latex-xetex-bidi.def>
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.ins b/Master/texmf-dist/source/xelatex/bidi/bidi.ins
index 2cffc147059..a9e4df4e7e9 100644
--- a/Master/texmf-dist/source/xelatex/bidi/bidi.ins
+++ b/Master/texmf-dist/source/xelatex/bidi/bidi.ins
@@ -147,11 +147,11 @@
\generate{\file{lettrine-xetex-bidi.def}{\from{\jobname.dtx}{table,lettrine-xetex-bidi.def}}}
\generate{\file{lineno-xetex-bidi.def}{\from{\jobname.dtx}{table,lineno-xetex-bidi.def}}}
\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{lscape-xetex-bidi.def}{\from{\jobname.dtx}{table,lscape-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{media9-xetex-bidi.def}{\from{\jobname.dtx}{table,media9-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}}}
\generate{\file{midfloat-xetex-bidi.def}{\from{\jobname.dtx}{table,midfloat-xetex-bidi.def}}}
diff --git a/Master/texmf-dist/tex/xelatex/bidi/adjmulticol-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/adjmulticol-xetex-bidi.def
index 41684570785..20ec9790b49 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/adjmulticol-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/adjmulticol-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/algorithm2e-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/algorithm2e-xetex-bidi.def
index d4c3abc598c..ef3233c5ff4 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/algorithm2e-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/algorithm2e-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,12 +37,12 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{algorithm2e-xetex-bidi.def}[2018/09/23 v0.2 bidi adaptations for algorithm2e package for XeTeX engine]
+\ProvidesFile{algorithm2e-xetex-bidi.def}[2025/01/03 v0.3 bidi adaptations for algorithm2e package for XeTeX engine]
\expandafter\ifx\csname algocf@within\endcsname\relax% if \algocf@within doesn't exist
\else% else
\renewcommand\thealgocf{\csname the\algocf@within\endcsname\@SepMark\@arabic\c@algocf}%
\fi
-\@ifpackageloaded{color}{}{%
+\ApplyPatchIfPackageLoadedF{color}{%
\bidi@patchcmd{\@algocf@start}{\bgroup}{%
\bgroup
\if@RTL
@@ -68,6 +68,16 @@
\fi
}{}{}
}
+
+\@ifpackagewith{algorithm2e}{algonl}{%
+\renewcommand{\theAlgoLine}{\expandafter\csname the\algocf@float\endcsname\@SepMark\arabic{AlgoLine}}%
+}{}
+
+\@ifpackagewith{algorithm2e}{algopart}{\renewcommand{\algocf@within}{part}}{}
+
+\@ifpackagewith{algorithm2e}{algochapter}{\renewcommand{\algocf@within}{chapter}}{}
+
+\@ifpackagewith{algorithm2e}{algosection}{\renewcommand{\algocf@within}{section}}{}
\endinput
%%
%% End of file `algorithm2e-xetex-bidi.def'.
diff --git a/Master/texmf-dist/tex/xelatex/bidi/amsart-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/amsart-xetex-bidi.def
index c0c881cb617..cc5380b0f54 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/amsart-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/amsart-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/amsbook-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/amsbook-xetex-bidi.def
index 1a8c9fea713..7b4f477709c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/amsbook-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/amsbook-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/amsmath-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/amsmath-xetex-bidi.def
index 23c6866b379..aec68c390c6 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/amsmath-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/amsmath-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/amstext-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/amstext-xetex-bidi.def
index 8486d9f3ca4..db2f62113d7 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/amstext-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/amstext-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/amsthm-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/amsthm-xetex-bidi.def
index 6337b1265af..4dbcaf84651 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/amsthm-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/amsthm-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/array-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/array-xetex-bidi.def
index 5fccc45ed53..a3f4d498693 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/array-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/array-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/article-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/article-xetex-bidi.def
index 8ab284b544e..5347a363990 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/article-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/article-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,8 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{article-xetex-bidi.def}[2024/12/07 v0.7 bidi adaptations for standard article class for XeTeX engine]
+\ProvidesFile{article-xetex-bidi.def}[2025/01/03 v0.8 bidi adaptations for standard article class for XeTeX engine]
+\IfClassLoadedT{svmult}{\endinput}
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
diff --git a/Master/texmf-dist/tex/xelatex/bidi/artikel1-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/artikel1-xetex-bidi.def
index b32d359eff9..afba34782fb 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/artikel1-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/artikel1-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/artikel2-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/artikel2-xetex-bidi.def
index df423997d4c..657e36f7065 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/artikel2-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/artikel2-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/artikel3-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/artikel3-xetex-bidi.def
index c2ae3f55062..dab00208108 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/artikel3-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/artikel3-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/arydshln-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/arydshln-xetex-bidi.def
index c2c47f6944a..129ab2a089f 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/arydshln-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/arydshln-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{arydshln-xetex-bidi.def}[2010/08/01 v0.2 bidi adaptations for arydshln package for XeTeX engine]
+\ProvidesFile{arydshln-xetex-bidi.def}[2025/01/03 v0.3 bidi adaptations for arydshln package for XeTeX engine]
\def\endarray{\adl@endarray \egroup \adl@arrayrestore \if@RTLtab\egroup\endR\egroup\fi\egroup}
\def\endtabular{\endarray $\if@RTLtab\endR\fi\egroup}
\expandafter\let\csname endtabular*\endcsname\endtabular
@@ -125,7 +125,7 @@
\def\adl@class@start{6}
\def\adl@class@iiiorvii{3}
\fi
-\@ifpackageloaded{colortbl}{%
+\ApplyPatchCodeToPackage{colortbl}{%
\def\adl@inactivate{\adl@org@inactivate \let\CT@setup\adl@CT@setup}
\def\adl@activate{\adl@org@activate \let\CT@setup\adl@act@CT@setup
\let\@endpbox\adl@org@endpbox}
@@ -171,7 +171,7 @@
\prepnext@tok}
\let\adl@act@classz\@classz
\let\adl@org@classz\@classz
-}{}
+}
\endinput
%%
%% End of file `arydshln-xetex-bidi.def'.
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamer-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamer-xetex-bidi.def
index 064b7e66052..f4def87dc28 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamer-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamer-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerbaseauxtemplates-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerbaseauxtemplates-xetex-bidi.def
index c2373267ea6..57c3886a083 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerbaseauxtemplates-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerbaseauxtemplates-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{beamerbaseauxtemplates-xetex-bidi.def}[2024/12/20 v0.4 bidi adaptations for beamerbaseauxtemplates package for XeTeX engine]
+\ProvidesFile{beamerbaseauxtemplates-xetex-bidi.def}[2025/01/03 v0.5 bidi adaptations for beamerbaseauxtemplates package for XeTeX engine]
\bidi@csundef{beamer@@tmpop@subsection in toc@sections numbered}
\bidi@csundef{beamer@@tmpop@subsubsection in toc@sections numbered}
@@ -347,14 +347,14 @@
\end{minipage}
}
-\@ifpackageloaded{caption}{%
+\ApplyPatchCodeToPackage{caption}{%
\DeclareCaptionFont{beamer@font}{%
\usebeamerfont*{caption}%
}
\SetCaptionDefault{font}{beamer@font}
\DeclareCaptionJustification{bidi@beamer@ragged}{\bidi@beamer@ragged}
\SetCaptionDefault{justification}{bidi@beamer@ragged}
-}{}
+}
\endinput
%%
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerbaseboxes-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerbaseboxes-xetex-bidi.def
index 132879f3f42..76a2e2dd0ee 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerbaseboxes-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerbaseboxes-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerbasecolor-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerbasecolor-xetex-bidi.def
index f050010bc99..fab6b3be528 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerbasecolor-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerbasecolor-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerbasecompatibility-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerbasecompatibility-xetex-bidi.def
index d20b40806ea..a07b1b65f92 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerbasecompatibility-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerbasecompatibility-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerbaseframecomponents-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerbaseframecomponents-xetex-bidi.def
index d49a0aba820..8713693212e 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerbaseframecomponents-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerbaseframecomponents-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -98,7 +98,7 @@
\usebeamertemplate***{sidebar left}%
\vfil%
}}%
- \@ifpackageloaded{beamerinnerthemeinmargin}{}{%
+ \ApplyPatchIfPackageLoadedF{beamerinnerthemeinmargin}{%
\hskip-\textwidth
}%
\fi
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerbaseframesize-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerbaseframesize-xetex-bidi.def
index 15783375ea7..97e221bcde9 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerbaseframesize-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerbaseframesize-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerbaselocalstructure-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerbaselocalstructure-xetex-bidi.def
index df17bdcfaa6..fe6be66976a 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerbaselocalstructure-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerbaselocalstructure-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerbasemisc-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerbasemisc-xetex-bidi.def
index f3ca4370977..3480616df88 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerbasemisc-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerbasemisc-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerbasenavigation-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerbasenavigation-xetex-bidi.def
index d469b764793..54d3452c5ef 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerbasenavigation-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerbasenavigation-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerbaseoverlay-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerbaseoverlay-xetex-bidi.def
index f2fafc289c4..cd602b5a091 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerbaseoverlay-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerbaseoverlay-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemecircles-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemecircles-xetex-bidi.def
index 646fdf13251..777eff14f90 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemecircles-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemecircles-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemedefault-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemedefault-xetex-bidi.def
index 83fd2318178..94c79f33334 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemedefault-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemedefault-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemefocus-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemefocus-xetex-bidi.def
index 15dcb692355..8b4b547ec25 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemefocus-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemefocus-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemeinmargin-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemeinmargin-xetex-bidi.def
index d1bac306312..0416ebf0a51 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemeinmargin-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemeinmargin-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthememetropolis-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthememetropolis-xetex-bidi.def
index 88e43639b7f..ff9067e5aca 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthememetropolis-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthememetropolis-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemerectangles-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemerectangles-xetex-bidi.def
index e2d92784c03..0e19d48299d 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemerectangles-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemerectangles-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemerounded-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemerounded-xetex-bidi.def
index f5e4c3d41be..c80595341fd 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemerounded-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerinnerthemerounded-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemedefault-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemedefault-xetex-bidi.def
index a3d74fb2287..ca0523f2e9d 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemedefault-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemedefault-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemefocus-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemefocus-xetex-bidi.def
index 84a05f11dfc..a86209b66cd 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemefocus-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemefocus-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemeinfolines-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemeinfolines-xetex-bidi.def
index 2d8b5addeeb..643321cd52c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemeinfolines-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemeinfolines-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthememetropolis-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthememetropolis-xetex-bidi.def
index a92f5d2b77a..eb7525ed4f9 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthememetropolis-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthememetropolis-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthememiniframes-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthememiniframes-xetex-bidi.def
index ff29d4e3bf5..b6d620a5eb0 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthememiniframes-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthememiniframes-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemeshadow-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemeshadow-xetex-bidi.def
index 28ed525bd82..7c80a0339c3 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemeshadow-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemeshadow-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesidebar-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesidebar-xetex-bidi.def
index f7bb6401432..5a80d892e9b 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesidebar-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesidebar-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesmoothbars-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesmoothbars-xetex-bidi.def
index 711f7be46ad..6a8c6cd450e 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesmoothbars-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesmoothbars-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesmoothtree-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesmoothtree-xetex-bidi.def
index 7f713ee3cd8..d188bfc57fc 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesmoothtree-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesmoothtree-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesplit-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesplit-xetex-bidi.def
index cd6711cacf5..ec8c662c3af 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesplit-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemesplit-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemetree-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemetree-xetex-bidi.def
index 3034a391839..4378a4798b1 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemetree-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerouterthemetree-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerthemeHannover-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerthemeHannover-xetex-bidi.def
index 4c79e21fe41..fd7aa90ca21 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerthemeHannover-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerthemeHannover-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/beamerthemeSingapore-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/beamerthemeSingapore-xetex-bidi.def
index 22f1d39d7ce..1b492d65840 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/beamerthemeSingapore-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/beamerthemeSingapore-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidi-media9.sty b/Master/texmf-dist/tex/xelatex/bidi/bidi-media9.sty
index 4d2a12980cc..630d40565e6 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidi-media9.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidi-media9.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidi-perpage.sty b/Master/texmf-dist/tex/xelatex/bidi/bidi-perpage.sty
index 35b542d6d8e..fdfee6b3c06 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidi-perpage.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidi-perpage.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidi.sty b/Master/texmf-dist/tex/xelatex/bidi/bidi.sty
index 7afe905f444..0e03f7c5335 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidi.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidi.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -38,9 +38,9 @@
%% Right brace \} Tilde \~}
%%
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2024/12/28}
-\def\bidi@version{40.8}
-\def\bidi@releasename{William Paul Thurston}
+\def\bididate{2025/01/03}
+\def\bidi@version{41.0}
+\def\bidi@releasename{Maryam Mirzakhani}
\newcommand*{\bidireleasename}{\bidi@releasename}
\ProvidesPackage{bidi}[\bididate\space v\bidi@version\space (Release \bidi@releasename)\space
Bidirectional typesetting in plain TeX and LaTeX]
@@ -255,7 +255,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
}
\newcommand*{\@bidi@pdfcustomproperties}{%
This is the bidi package, Version \bidi@version\space (Release \bidi@releasename),
- Released December 28, 2024.
+ Released January 3, 2025.
}
\newcommand*{\bidi@beamer@ragged}{}
\@RTLmainfalse
@@ -348,7 +348,6 @@ Bidirectional typesetting in plain TeX and LaTeX]
\ExplSyntaxOff
\@onlypreamble\pdfencryptsetup
\input{latex-xetex-bidi.def}
-\input{loadingorder-xetex-bidi.def}
\pdfencryptsetup{%
userpassword,%
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidi.tex b/Master/texmf-dist/tex/xelatex/bidi/bidi.tex
index b08f0406267..8bfc23c3196 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidi.tex
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidi.tex
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,10 +37,10 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\def\bididate{2024/12/28}
+\def\bididate{2025/01/03}
\catcode`@=11
-\def\bidi@version{40.8}
-\def\bidi@releasename{William Paul Thurston}
+\def\bidi@version{41.0}
+\def\bidi@releasename{Maryam Mirzakhani}
\def\bidireleasename{\bidi@releasename}
\let \protect \relax
\newlinechar`\^^J
@@ -154,7 +154,7 @@
}
\def\@bidi@pdfcustomproperties{%
This is the bidi package, Version \bidi@version\space (Release \bidi@releasename),
- Released December 28, 2024.
+ Released January 3, 2025.
}
\def\bidi@pdfm@mark{%
\special{pdf:%
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty b/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty
index 2718fcd5d6e..9669b052211 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty b/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty
index 983fad42f7f..ee35d589e52 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty b/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty
index 13e65f58a29..2be99710062 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls b/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls
index 289ebb6dfbf..74acbe986c8 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty b/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty
index 2462d368f28..a0493713309 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/biditools.sty b/Master/texmf-dist/tex/xelatex/bidi/biditools.sty
index 21e39381db5..b0bfdae3c12 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/biditools.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/biditools.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -38,7 +38,7 @@
%% Right brace \} Tilde \~}
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{biditools}[2024/12/07 v2.4 Programming tools for bidi package]
+\ProvidesPackage{biditools}[2025/01/03 v2.6 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%
@@ -124,12 +124,6 @@ Old form `\string#1' should be \string\begin{\expandafter\@gobble\string#1}%
ill-advised in the old versions of bidi package.%
}%
}
-\def\@tagsextension{clo}
-\def\@definitionfileextension{def}
-\def\@texfileextension{tex}
-\def\@iftagsloaded{\@ifl@aded\@tagsextension}
-\def\@ifdefinitionfileloaded{\@ifl@aded\@definitionfileextension}
-\def\@iftexfileloaded{\@ifl@aded\@texfileextension}
\def\eqnewif#1#2{%
\count@\escapechar \escapechar\m@ne
\let#1\iffalse
@@ -761,14 +755,6 @@ ill-advised in the old versions of bidi package.%
\catcode\number`\@=\the\catcode`\@\relax}%
\bidi@resrvda}
-\newcommand\bidi@isloaded[2][]{
- \expandafter\ifx\csname if@bidi@#2loaded@\endcsname\relax
- \expandafter\newif\csname if@bidi@#2loaded@\endcsname
- \fi
- \@ifpackageloaded{#2}
- {\csname @bidi@#2loaded@true\endcsname #1}
- {\csname @bidi@#2loaded@false\endcsname}}
-
\protected\def\bidi@ifscanable#1{%
\begingroup
\edef\bidi@resrvda{%
@@ -1325,435 +1311,270 @@ ill-advised in the old versions of bidi package.%
-\renewcommand{\InputIfFileExists}[2]{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #1-@bidi@alias\endcsname\relax
- \expandafter\@secondoftwo
- \else
- \bidi@replacefile@msg{\csname #1-@bidi@alias\endcsname}{#1}%
- \expandafter\@firstoftwo
- \fi
- {%
- \expandafter\InputIfFileExists\expandafter{\csname
- #1-@bidi@alias\endcsname}{#2}%
- }%
- {\IfFileExists{#1}{%
- \bidi@load@hook{before}{#1}%
- #2\@addtofilelist{#1}%
- \@@input \@filef@und
- \bidi@load@hook{after}{#1}%
- }}%
-}
+\ExplSyntaxOn
+\NewDocumentCommand \bidi@AfterClass { s m o +m }
+ {
+ \IfBooleanTF { #1 }
+ {
+ \@ifclassloaded{ #2 }
+ { #4 }
+ {
+ \hook_gput_code:nnn
+ { file / #2.\@clsextension / after }
+ { #3 }
+ { #4 }
+ }
+ }
+ {
+ \hook_gput_code:nnn { file / #2.\@clsextension / after } { #3 } { #4 }
+ }
+ }
-\newcommand*{\bidi@@loadwithoptions}{}
-\newcommand*{\bidi@loadwithoptions}{}
-\let\bidi@loadwithoptions\@loadwithoptions
+\seq_new:N \g__biditools_input_file_seq
-\renewcommand*{\@loadwithoptions}[3]{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #3.#1-@bidi@aliasname\endcsname\relax
- \def\bidi@@loadwithoptions{\bidi@loadwithoptions{#1}{#2}{#3}}%
- \else
- \bidi@replacefile@msg{\csname #3.#1-@bidi@aliasname\endcsname.#1}{#3.#1}%
- \def\bidi@@loadwithoptions{%
- \@loadwithoptions{#1}{#2}{\csname #3.#1-@bidi@aliasname\endcsname}%
- }%
- \fi
- \bidi@@loadwithoptions
-}
+\prg_new_protected_conditional:Npnn \__bidi_if_loading:n #1 { T, F, TF }
+ {
+ \str_set:Nx \l_tmpa_str { #1 }
+ \seq_if_in:NxTF \g__biditools_input_file_seq { \str_use:N \l_tmpa_str }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
-\newcommand*{\bidi@onefilewithoptions}{}
-\let\bidi@onefilewithoptions\@onefilewithoptions
-\def\@onefilewithoptions#1[#2][#3]#4{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #1.#4-@bidi@aliasname\endcsname\relax
- \def\bidi@@onefilewithoptions{\bidi@onefilewithoptions{#1}}%
- \else
- \bidi@replacefile@msg{\csname #1.#4-@bidi@aliasname\endcsname.#4}{#1.#4}%
- \edef\bidi@@onefilewithoptions{%
- \noexpand\@onefilewithoptions{\csname #1.#4-@bidi@aliasname\endcsname}}%
- \fi
- \bidi@@onefilewithoptions[{#2}][{#3}]{#4}%
- \bidi@load@hook{lateafter}{#1.#4}%
-}
+\prg_new_protected_conditional:Npnn \bidi_if_class_loaded:n #1 { T, F, TF }
+ {
+ \@ifclassloaded { #1 }
+ {
+ \__bidi_if_loading:nTF { #1.\@clsextension }
+ { \prg_return_false: }
+ { \prg_return_true: }
+ }
+ {
+ \prg_return_false:
+ }
+ }
-\newcommand*{\bidi@ReplaceInput}[2]{%
- \expandafter\edef\csname #1-@bidi@alias\endcsname{#2}%
-}
+\prg_new_protected_conditional:Npnn \bidi_if_package_loaded:n #1 { T, F, TF }
+ {
+ \@ifpackageloaded { #1 }
+ {
+ \__bidi_if_loading:nTF { #1.\@pkgextension }
+ { \prg_return_false: }
+ { \prg_return_true: }
+ }
+ {
+ \prg_return_false:
+ }
+ }
-\newcommand*{\bidi@UnReplaceInput}[1]{%
- \ifcsname #1-@bidi@alias\endcsname
- \expandafter\let\csname #1-@bidi@alias\endcsname\relax
- \fi
-}
+\NewDocumentCommand \bidi@AfterAtEndOfClass { s m o +m }
+ {
+ \IfBooleanTF { #1 }
+ {
+ \bidi_if_class_loaded:nTF { #2 }
+ { #4 }
+ { \hook_gput_code:nnn { class / #2 / after } { #3 } { #4 } }
+ }
+ {
+ \bidi_if_class_loaded:nF
+ { #2 }
+ { \hook_gput_code:nnn { class / #2 / after } { #3 } { #4 } }
+ }
+ }
-\newcommand*{\@bidi@replacefilewithext}[3]{%
- \expandafter\edef\csname #1.#3-@bidi@aliasname\endcsname{#2}%
- }
-\newcommand*{\bidi@ReplacePackage}[2]{%
- \@bidi@replacefilewithext{#1}{#2}\@pkgextension
-}
-\newcommand*{\bidi@ReplaceClass}[2]{%
- \@bidi@replacefilewithext{#1}{#2}\@clsextension
-}
-\newcommand*{\@bidi@unreplacefilewithext}[2]{%
- \ifcsname #1.#2-@bidi@aliasname\endcsname
- \expandafter\let\csname #1.#2-@bidi@aliasname\endcsname\relax
- \fi
-}
-\newcommand*{\bidi@UnReplacePackage}[1]{%
- \@bidi@unreplacefilewithext{#1}\@pkgextension
-}
-\newcommand*{\bidi@UnReplaceClass}[1]{%
- \@bidi@unreplacefilewithext{#1}\@clsextension
-}
-\newcommand*{\bidi@replacefile@msg}[2]{%
- \PackageInfo{biditools}{inputing `#1' instead of `#2'}%
-}
+\NewDocumentCommand \bidi@AfterPackage { s m o +m }
+ {
+ \IfBooleanTF { #1 }
+ {
+ \@ifpackageloaded{ #2 }
+ { #4 }
+ {
+ \hook_gput_code:nnn
+ { file / #2.\@pkgextension / after }
+ { #3 }
+ { #4 }
+ }
+ }
+ {
+ \hook_gput_code:nnn { file / #2.\@pkgextension / after } { #3 } { #4 }
+ }
+ }
-\newcommand*{\bidi@load@hook}[2]{%
- \@ifundefined{#2-@#1}{}{%
- \@nameuse{#2-@#1}%
- \expandafter\let\csname #2-@#1\endcsname=\relax}}
-\newcommand*{\bidi@set@load@hook}[2]{%
- \@ifundefined{#2-@#1}{\@namedef{#2-@#1}{}}{}%
- \expandafter\g@addto@macro\csname #2-@#1\endcsname}
-\newcommand*{\bidi@BeforeFile}{\bidi@set@load@hook{before}}
-\newcommand*{\bidi@AfterFile}{\bidi@set@load@hook{after}}
-\newcommand*{\bidi@BeforeClass}[1]{%
- \bidi@set@load@hook{before}{#1.\@clsextension}}
-\newcommand*{\bidi@AfterClass}{%
- \@ifstar {\@s@bidi@AfterClass}{%
- \@ifnextchar +\@@bidi@AfterClass{%
- \@ifnextchar !\@@@bidi@AfterClass\@bidi@AfterClass
- }%
- }%
-}
+\NewDocumentCommand \bidi@AfterAtEndOfPackage { s m o +m }
+ {
+ \IfBooleanTF { #1 }
+ {
+ \bidi_if_package_loaded:nTF { #2 }
+ { #4 }
+ { \hook_gput_code:nnn { package / #2 / after } { #3 } { #4 } }
+ }
+ {
+ \bidi_if_package_loaded:nF
+ { #2 }
+ { \hook_gput_code:nnn { package / #2 / after } { #3 } { #4 } }
+ }
+ }
-\newcommand*{\@@@bidi@AfterClass}[2]{%
- \begingroup\ifx\csname #2.\@clsextension-h@@k\endcsname\relax
- \aftergroup\@s@bidi@AfterClass
- \else
- \aftergroup\bidi@AfterAtEndOfClass
- \fi
- \endgroup{#2}%
-}
+\clist_new:N \l__biditools_package_clist
+\msg_new:nnn { biditools } { cannot-prevent-for-already-loaded-package }
+ {
+ Can~not~prevent~package~`#1'~from~being~loaded,~
+ since~it~has~been~loaded~already~before~line~\msg_line_number:
+ }
+\clist_new:N \g__biditools_prevent_clist
+
+\NewDocumentCommand \bidi@PreventPackageFromLoading { s +o m }
+ {
+ \clist_set:Nx \l__biditools_package_clist { #3 }
+ \clist_map_inline:Nn \l__biditools_package_clist
+ {
+ \@ifpackageloaded { ##1 }
+ {
+ \IfBooleanTF { #1 } { \msg_info:nnn } { \msg_warning:nnn }
+ { biditools } { cannot-prevent-for-already-loaded-package } { ##1 }
+ }
+ {
+ \clist_if_in:NnF \g__biditools_prevent_clist { ##1 }
+ { \clist_gput_right:Nn \g__biditools_prevent_clist { ##1 } }
+ \tl_if_exist:cF { g__biditools_exclude_package_##1_tl }
+ {
+ \tl_new:c { g__biditools_exclude_package_##1_tl }
+ }
+ \IfValueT { #2 }
+ {
+ \tl_gput_right:cn { g__biditools_exclude_package_##1_tl } { #2 }
+ }
+ \disable@package@load { ##1 }
+ { \tl_use:c { g__biditools_exclude_package_##1_tl } }
+ }
+ }
+ \clist_clear:N \l__biditools_package_clist
+ }
-\newcommand*{\bidi@AfterAtEndOfClass}[1]{%
- \bidi@set@load@hook{lateafter}{#1.\@clsextension}}
-\newcommand*{\@@bidi@AfterClass}[2]{%
- \begingroup
- \expandafter\ifx\csname #2.\@clsextension-h@@k\endcsname\relax
- \aftergroup\@s@bidi@AfterClass
- \else
- \aftergroup\@bidi@AfterClass
- \fi
- \endgroup{#2}%
-}
+\NewDocumentCommand \bidi@ResetPreventPackageFromLoading {}
+ {
+ \clist_map_function:NN \g__biditools_prevent_clist \reenable@package@load
+ \clist_gclear:N \g__biditools_prevent_clist
+ }
-\newcommand*{\@bidi@AfterClass}[1]{%
- \bidi@set@load@hook{after}{#1.\@clsextension}}
-\newcommand*{\@s@bidi@AfterClass}[1]{%
- \begingroup
- \@ifclassloaded{#1}{%
- \aftergroup\@secondoftwo
- }{%
- \aftergroup\@bidi@AfterClass
- }%
- \endgroup
- {#1}%
-}
+\NewDocumentCommand \bidi@StorePreventPackageFromLoading { m }
+ { \edef #1 { \clist_use:Nn \g__biditools_prevent_clist { , } } }
+
+\NewDocumentCommand \bidi@UnPreventPackageFromLoading { s m }
+ {
+ \clist_set:Nx \l__biditools_package_clist { #2 }
+ \clist_map_inline:Nn \l__biditools_package_clist
+ {
+ \clist_if_in:NnT \g__biditools_prevent_clist { ##1 }
+ {
+ \clist_gremove_all:Nn \g__biditools_prevent_clist { ##1 }
+ \reenable@package@load { ##1 }
+ \IfBooleanT { #1 }
+ { \cs_undefine:c { g__biditools_exclude_package_##1_tl } }
+ }
+ }
+ }
-\newcommand*{\bidi@BeforePackage}[1]{%
- \bidi@set@load@hook{before}{#1.\@pkgextension}}
-\newcommand*{\bidi@AfterPackage}{%
- \@ifstar {\@s@bidi@AfterPackage}{%
- \@ifnextchar +\@@bidi@AfterPackage{%
- \@ifnextchar !\@@@bidi@AfterPackage\@bidi@AfterPackage
- }%
- }%
-}
-\newcommand*{\@@@bidi@AfterPackage}[2]{%
- \begingroup\ifx\csname #2.\@pkgextension-h@@k\endcsname\relax
- \aftergroup\@s@bidi@AfterPackage
- \else
- \aftergroup\bidi@AfterAtEndOfPackage
- \fi
- \endgroup{#2}%
-}
-\newcommand*{\bidi@AfterAtEndOfPackage}[1]{%
- \bidi@set@load@hook{lateafter}{#1.\@pkgextension}}
-\newcommand*{\@@bidi@AfterPackage}[2]{%
- \begingroup
- \expandafter\ifx\csname #2.\@pkgextension-h@@k\endcsname\relax
- \aftergroup\@s@bidi@AfterPackage
- \else
- \aftergroup\@bidi@AfterPackage
- \fi
- \endgroup{#2}%
-}
-\newcommand*{\@bidi@AfterPackage}[1]{%
- \bidi@set@load@hook{after}{#1.\@pkgextension}}
-\newcommand*{\@s@bidi@AfterPackage}[1]{%
- \begingroup
- \@ifpackageloaded{#1}{%
- \aftergroup\@secondoftwo
- }{%
- \aftergroup\@bidi@AfterPackage
- }%
- \endgroup
- {#1}%
-}
+\NewDocumentCommand \bidi@BeforeClosingMainAux { o m }
+ {
+ \hook_gput_code:nnn { enddocument / afterlastpage } { #1 }
+ {
+ \debug_suspend:
+ \RenewDocumentCommand \bidi@BeforeClosingMainAux { m } { ##1 }
+ \cs_set_eq:NN \__biditools_protected@write:Nnn \protected@write
+ \cs_set_eq:NN \protected@write \bidi@protected@immediate@write
+ #2
+ \cs_set_eq:NN \protected@write \__biditools_protected@write:Nnn
+ \debug_resume:
+ }
+ }
-\newcommand*{\bidi@excludedpackages}{}
-\let\bidi@excludedpackages\@empty
-\newcommand*{\bidi@saved@RequirePackage}{}
-\newcommand*{\bidi@PreventPackageFromLoading}{%
- \@ifstar{\@bidi@PreventPackageFromLoading\PackageInfo}%
- {\@bidi@PreventPackageFromLoading\PackageWarning}%
-}
-\newcommand*{\@bidi@PreventPackageFromLoading}[1]{%
- \@ifnextchar [%]
- {\@@bidi@PreventPackageFromLoading#1}{\@@bidi@PreventPackageFromLoading#1[]}%
-}
-\newcommand*{\@@bidi@PreventPackageFromLoading}{}
-
-\def\@@bidi@PreventPackageFromLoading#1[#2]#3{%
- \edef\reserved@b{\zap@space#3 \@empty}%
- \ifx \reserved@b\@empty
- #1{biditools}{%
- \string\bidi@PreventPackageFromLoading\space with empty packages\MessageBreak
- argument ignored%
- }%
- \else
- \ifx\bidi@excludedpackages\@empty
- \let\bidi@saved@RequirePackage\RequirePackage
- \let\RequirePackage\bidi@RequirePackage
- \def\reserved@a##1##{%
- \@latex@error
- {\noexpand \usepackage before \string\documentclass}%
- {\noexpand \usepackage may only appear in the document
- preamble, i.e.,\MessageBreak
- between \noexpand\documentclass and
- \string\begin{document}.}%
- \@gobble}%
- \ifx\reserved@a\usepackage\else
- \ifx\usepackage\bidi@saved@RequirePackage\else
- \PackageWarning{biditools}{%
- Maybe serious problem: unexpected definition of\MessageBreak
- \string\usepackage
- }%
- \fi
- \let\usepackage\RequirePackage
- \fi
- \fi
- \expandafter\@for \expandafter\reserved@a\expandafter:\expandafter=%
- \reserved@b\do {%
- \ifx\reserved@a\@empty
- #1{biditools}{%
- empty package argument for
- \string\bidi@PreventPackageFromLoading\MessageBreak
- ignored%
- }%
- \else
- \expandafter\@ifpackageloaded\expandafter{\reserved@a}{%
- #1{biditools}{%
- package `\reserved@a' already loaded.\MessageBreak
- Cannot prevent it from beeing loaded%
- }%
- }{%
- \edef\bidi@excludedpackages{\bidi@excludedpackages,%
- \reserved@a}%
- \if\relax\detokenize{#2}\relax\else
- \@ifundefined{bidi@exclude@package@\reserved@a @do}{%
- \@namedef{bidi@exclude@package@\reserved@a @do}{}%
- }{}%
- \expandafter\def
- \csname bidi@exclude@package@\reserved@a
- @do\expandafter\expandafter\expandafter\endcsname
- \expandafter\expandafter\expandafter{%
- \csname bidi@exclude@package@\reserved@a @do\endcsname
- #2%
- }%
- \fi
- }%
- \fi
- }%
- \ifx\bidi@excludedpackages\@empty
- \bidi@ResetPreventPackageFromLoading
- \fi
- \fi
-}
+\NewDocumentCommand \bidi@AfterReadingMainAux { o m }
+ {
+ \hook_gput_code:nnn { enddocument / afteraux } { #1 }
+ {
+ \debug_suspend:
+ \RenewDocumentCommand \bidi@AfterReadingMainAux { m } { ##1 }
+ \cs_set_eq:NN \__biditools_protected@write:Nnn \protected@write
+ \cs_set_eq:NN \protected@write \bidi@protected@immediate@write
+ #2
+ \cs_set_eq:NN \protected@write \__biditools_protected@write:Nnn
+ \debug_resume:
+ }
+ }
-\@onlypreamble\bidi@PreventPackageFromLoading
-\newcommand*{\bidi@ResetPreventPackageFromLoading}{%
- \let\bidi@excludedpackages\@empty
- \ifx\RequirePackage\bidi@RequirePackage
- \ifx\usepackage\RequirePackage
- \let\usepackage\bidi@saved@RequirePackage
- \fi
- \let\RequirePackage\bidi@saved@RequirePackage
- \fi
-}
-\@onlypreamble\bidi@ResetPreventPackageFromLoading
-\newcommand*{\bidi@StorePreventPackageFromLoading}[1]{%
- \let#1\bidi@excludedpackages
+\clist_new:N \l__biditools_file_patch_clist
+
+\NewDocumentCommand \ApplyPatchToFiles { m O{def} O{bidi} }
+ {
+ \clist_set:Nx \l__biditools_file_patch_clist { #1 }
+ \clist_map_inline:Nn \l__biditools_file_patch_clist
+ {
+ \ApplyPatchToFile { ##1 } [ #2 ] [ #3 ]
+ }
+ \clist_clear:N \l__biditools_file_patch_clist
+ }
+
+\clist_new:N \l__biditools_package_patch_clist
+
+\NewDocumentCommand \ApplyPatchToPackages { m O{bidi} }
+ {
+ \clist_set:Nx \l__biditools_package_patch_clist { #1 }
+ \clist_map_inline:Nn \l__biditools_package_patch_clist
+ {
+ \ApplyPatchToPackage { ##1 } [ #2 ]
+ }
+ \clist_clear:N \l__biditools_package_patch_clist
+ }
+
+\clist_new:N \l__biditools_class_patch_clist
+
+\NewDocumentCommand \ApplyPatchToClasses { m O{bidi} }
+ {
+ \clist_set:Nx \l__biditools_class_patch_clist { #1 }
+ \clist_map_inline:Nn \l__biditools_class_patch_clist
+ {
+ \ApplyPatchToClass { ##1 } [ #2 ]
+ }
+ \clist_clear:N \l__biditools_class_patch_clist
+ }
+
+\NewDocumentCommand \ApplyPatchToClassesIfPackageLoadedF { m m O{bidi} }
+ {
+ \clist_set:Nx \l__biditools_class_patch_clist { #1 }
+ \clist_map_inline:Nn \l__biditools_class_patch_clist
+ {
+ \ApplyPatchToClassIfPackageLoadedF { ##1 } { #2 } [ #3 ]
+ }
+ \clist_clear:N \l__biditools_class_patch_clist
+ }
+\ExplSyntaxOff
+
+\newcommand*{\bidi@ReplaceInput}{\declare@file@substitution}
+\newcommand*{\bidi@UnReplaceInput}
+{\undeclare@file@substitution}
+\newcommand*{\bidi@ReplacePackage}[2]{%
+ \declare@file@substitution{#1.\@pkgextension}{#2.\@pkgextension}%
}
-\@onlypreamble\bidi@StorePreventPackageFromLoading
-\newcommand*{\bidi@UnPreventPackageFromLoading}{%
- \@ifstar {\@tempswatrue\@bidi@UnPreventPackageFromLoading}%
- {\@tempswafalse\@bidi@UnPreventPackageFromLoading}%
+\newcommand*{\bidi@UnReplacePackage}[1]{%
+ \undeclare@file@substitution{#1.\@pkgextension}%
}
-
-\newcommand*{\@bidi@UnPreventPackageFromLoading}[1]{%
- \edef\reserved@b{\zap@space#1 \@empty}%
- \if@tempswa
- \@for\reserved@a:=\reserved@b\do {%
- \ifx\reserved@a\@empty \else
- \ifcsname bidi@exclude@package@\reserved@a @do\endcsname
- \expandafter\let
- \csname bidi@exclude@package@\reserved@a @do\endcsname
- \undefined
- \fi
- \fi
- }%
- \fi
- \ifcsname bidi@excludedpackages\endcsname
- \let\reserved@a\bidi@excludedpackages
- \let\bidi@excludedpackages\@empty
- \expandafter\@for\expandafter\reserved@c
- \expandafter:\expandafter=\reserved@a
- \do{%
- \ifx\reserved@c\@empty\else
- \@expandtwoargs\in@{,\reserved@c,}{,\reserved@b,}%
- \ifin@
- \else
- \edef\bidi@excludedpackages{%
- \bidi@excludedpackages,\reserved@c
- }%
- \fi
- \fi
- }%
- \ifx\bidi@excludedpackages\@empty\bidi@ResetPreventPackageFromLoading\fi
- \fi
+\newcommand*{\bidi@ReplaceClass}[2]{%
+ \declare@file@substitution{#1.\@clsextension}{#2.\@clsextension}%
}
-
-\newcommand*{\bidi@RequirePackage}[2][]{%
- \let\reserved@c\@empty
- \let\reserved@d\@empty
- \edef\reserved@b{\zap@space#2 \@empty}%
- \expandafter\@for\expandafter\reserved@b\expandafter:\expandafter=\reserved@b
- \do {%
- \begingroup
- \@tempswatrue
- \@for\reserved@a:=\bidi@excludedpackages\do {%
- \ifx\reserved@a\reserved@b
- \@tempswafalse
- \fi
- }%
- \if@tempswa
- \xdef\reserved@c{\reserved@c,\reserved@b}%
- \else
- \ifx\reserved@b\@empty\else
- \PackageInfo{biditools}{Excluding package `\reserved@b'\MessageBreak
- from loading}%
- \@ifundefined{bidi@exclude@package@\reserved@b @do}{%
- }{%
- \expandafter\g@addto@macro\expandafter\reserved@d
- \csname bidi@exclude@package@\reserved@b @do\endcsname
- }%
- \fi
- \fi
- \endgroup
- }%
- \ifx\reserved@c\@empty
- \let\reserved@a\bidi@gobbleopt
- \else
- \edef\reserved@a{\noexpand\bidi@saved@RequirePackage[#1]{%
- \expandafter\@gobble\reserved@c\@empty}}%
- \fi
- \expandafter\reserved@d
- \reserved@a
+\newcommand*{\bidi@UnReplaceClass}[1]{%
+ \undeclare@file@substitution{#1.\@clsextension}%
}
-
-\newcommand{\bidi@gobbleopt}[1][]{}
-\AtEndDocument{%
- \let\bidi@saved@checkend=\@checkend
- \renewcommand*{\@checkend}[1]{%
- \def\reserved@a{#1}\def\reserved@b{document}%
- \bidi@saved@checkend{#1}%
- \ifx\reserved@a\reserved@b
- \let\bidi@saved@clearpage=\clearpage
- \renewcommand*{\clearpage}{\bidi@saved@clearpage
- \bidi@hook@bcma
- \bidi@restore@newpage
- \let\clearpage=\bidi@saved@clearpage}%
- \fi%
- \let\bidi@saved@dofilelist\@dofilelist
- \def\@dofilelist{%
- \bidi@hook@acma
- \let\@dofilelist\bidi@saved@dofilelist
- \bidi@saved@dofilelist
- }%
- }%
+\newcommand*{\bidi@BeforeFile}[1]{%
+ \AddToHook{file/#1/before}%
}
-
-\newcommand*{\bidi@saved@checkend}{}
-\newcommand*{\bidi@saved@dofilelist}{}
-\newcommand*{\bidi@redefine@newpage}{%
- \let\bidi@saved@newpage\newpage
- \def\bidi@restore@newpage{%
- \renewcommand*{\newpage}{%
- \PackageWarningNoLine{%
- biditools%
- }{%
- \string\newpage\space at main aux file!\MessageBreak
- You have output material at the main aux file.\MessageBreak
- Note, that the \string\bidi@BeforeClosingMainAux\space commands\MessageBreak
- are processed before the output from aux file%
- }%
- \let\newpage\bidi@saved@newpage
- \newpage
- }%
- }%
- \renewcommand*{\newpage}{%
- \PackageError{%
- biditools%
- }{%
- \string\newpage\space at \string\bidi@BeforeClosingMainAux
- }{%
- You should never use \string\newpage\space or
- \string\clear(double)page or other output material at the\MessageBreak
- argument of \string\bidi@BeforeClosingMainAux!\MessageBreak
- If you'll continue, the \string\newpage\space will be ignored to
- avoid corruption of\MessageBreak
- every prior use of \string\bidi@BeforeClosingMainAux.
- }%
- }%
+\newcommand*{\bidi@AfterFile}[1]{%
+ \AddToHook{file/#1/after}%
}
-
-\newcommand*{\bidi@restore@newpage}{}
-\newcommand*{\bidi@hook@bcma}{}
-\newcommand*{\bidi@hook@acma}{}
-\newcommand*{\bidi@BeforeClosingMainAux}{%
- \ifx\bidi@hook@bcma\@empty
- \gdef\bidi@hook@bcma{%
- \renewcommand*{\bidi@BeforeClosingMainAux}[1]{####1}%
- \let\protected@write\bidi@protected@immediate@write
- \bidi@redefine@newpage
- }%
- \fi
- \g@addto@macro\bidi@hook@bcma%
+\newcommand*{\bidi@BeforeClass}[1]{%
+ \bidi@BeforeFile{#1.\@clsextension}%
}
-
-\newcommand*{\bidi@AfterReadingMainAux}{%
- \ifx\bidi@hook@acma\@empty
- \gdef\bidi@hook@acma{%
- \renewcommand*{\bidi@AfterReadingMainAux}[1]{####1}%
- \let\protected@write\bidi@protected@immediate@write
- }%
- \fi
- \g@addto@macro\bidi@hook@acma%
+\newcommand*{\bidi@BeforePackage}[1]{%
+ \bidi@BeforeFile{#1.\@pkgextension}%
}
\long\def\bidi@protected@immediate@write#1#2#3{%
@@ -1766,79 +1587,126 @@ ill-advised in the old versions of bidi package.%
\if@nobreak\ifvmode\nobreak\fi\fi
}
-\def\bidi@patch@counter{0}%
-\if@bidi@csundef{numexpr}{%
- \def\bidi@patch@stepcounter{%
- \begingroup
- \count@\bidi@patch@counter\relax
- \advance\count@\@ne\relax
- \edef\x{\endgroup
- \noexpand\def\noexpand\bidi@patch@counter{\the\count@}%
- }%
- \x
- }%
-}{%
- \def\bidi@patch@stepcounter{%
- \edef\bidi@patch@counter{%
- \the\numexpr\bidi@patch@counter+\@ne\relax
- }%
- }%
-}
-\def\bidi@patch@list{}
-\def\bidi@patch@Add{%
- \bidi@appto\bidi@patch@list
-}
\def\bidi@patch@AfterPackage#1{%
\@ifpackageloaded{#1}{%
\@firstofone
}{%
- \@bidi@patch@AfterPackage{#1}%
+ \AddToHook{package/#1/after}%
}%
}
-\def\@bidi@patch@AfterPackage#1{%
- \edef\bidi@patch@temp{#1}%
- \bidi@patch@stepcounter
- \expandafter\bidi@patch@@AfterPackage
- \csname @bidi@patch@\bidi@patch@counter\expandafter\endcsname{%
- \bidi@patch@temp
+
+\def\bidi@patch@AfterFile#1{%
+ \IfFileLoadedTF{#1}{%
+ \@firstofone
+ }{%
+ \AddToHook{file/#1/after}%
}%
}
-\def\bidi@patch@@AfterPackage#1#2#3{%
- \begingroup
- \toks@{#3}%
- \xdef\bidi@patch@gtemp{%
- \noexpand\@ifpackageloaded{#2}{%
- \noexpand\let\noexpand#1\noexpand\relax
- \the\toks@
- }{}%
+
+\NewDocumentCommand \ApplyPatchToFile { m O{def} O{bidi} }
+ {
+ \bidi@patch@AfterFile{#1.#2}{%
+ \ifnum\catcode`\@=11
+ \input{#1-xetex-#3.def}%
+ \else
+ \bidi@storecatcode\@
+ \makeatletter
+ \input{#1-xetex-#3.def}%
+ \bidi@restorecatcode\@
+ \fi
}%
- \endgroup
- \let#1\bidi@patch@gtemp
- \bidi@patch@Add#1%
- \bidi@patch@try{bidi@AfterPackage}{#2}#1%
-}
+ }
-\def\bidi@patch@try#1#2#3{%
- \if@bidi@csundef{#1}{}{%
- \csname #1\endcsname{#2}{#3}%
- }%
-}
+\NewDocumentCommand \ApplyPatchCodeToFile { m +m O{def} }
+ {
+ \bidi@patch@AfterFile{#1.#3}{#2}%
+ }
+
+\NewDocumentCommand \ApplyPatchToFilesIfPackageLoadedF { m m O{def} O{bidi} }
+ {
+ \AddToHook{begindocument/before}{%
+ \IfPackageLoadedF{#1}{%
+ \ApplyPatchToFiles{#2}[#3][#4]%
+ }%
+ }
+ }
-\AtBeginDocument{\bidi@patch@list}
-
-\bidi@AtEndPreamble{\bidi@patch@list}%
-
-\bidi@AfterEndPreamble{%
- \let\bidi@patch@OrgIfPackageLoaded\@ifpackageloaded
- \let\bidi@patch@OrgIfPackageLater\@ifpackagelater
- \let\bidi@patch@OrgIfClassLoaded\@ifclassloaded
- \let\bidi@patch@OrgIfClassLater\@ifclasslater
- \bidi@patch@list
- \let\@ifpackageloaded\bidi@patch@OrgIfPackageLoaded
- \let\@ifpackagelater\bidi@patch@OrgIfPackageLater
- \let\@ifclassloaded\bidi@patch@OrgIfClassLoaded
- \let\@ifclasslater\bidi@patch@OrgIfClassLater
-}%
+\NewDocumentCommand \ApplyPatchToClassIfPackageLoadedF { m m O{bidi} }
+ {
+ \AddToHook{begindocument/before}{%
+ \IfPackageLoadedF{#2}{%
+ \ifnum\catcode`\@=11
+ \@ifclassloaded{#1}{%
+ \input{#1-xetex-#3.def}%
+ }{}%
+ \else
+ \bidi@storecatcode\@
+ \makeatletter
+ \@ifclassloaded{#1}{%
+ \input{#1-xetex-#3.def}%
+ }{}%
+ \bidi@restorecatcode\@
+ \fi
+ }%
+ }
+ }
+
+\NewDocumentCommand \ApplyPatchToPackageIfPackageLoadedF { m m O{bidi} }
+ {
+ \AddToHook{begindocument/before}{%
+ \IfPackageLoadedF{#2}{%
+ \IfPackageLoadedT{#1}{%
+ \ifnum\catcode`\@=11
+ \input{#1-xetex-#3.def}%
+ \else
+ \bidi@storecatcode\@
+ \makeatletter
+ \input{#1-xetex-#3.def}%
+ \bidi@restorecatcode\@
+ \fi
+ }%
+ }%
+ }
+ }
+
+\NewDocumentCommand \ApplyPatchIfPackageLoaded { m +m +m }
+ {
+ \AddToHook{begindocument/before}{%
+ \ifnum\catcode`\@=11
+ \@ifpackageloaded{#1}{#2}{#3}%
+ \else
+ \bidi@storecatcode\@
+ \makeatletter
+ \@ifpackageloaded{#1}{#2}{#3}%
+ \bidi@restorecatcode\@
+ \fi
+ }
+ }
+
+\NewDocumentCommand \ApplyPatchIfPackageLoadedT { m +m }
+ {
+ \ApplyPatchIfPackageLoaded{#1}{#2}{}%
+ }
+
+\NewDocumentCommand \ApplyPatchIfPackageLoadedF { m +m }
+ {
+ \ApplyPatchIfPackageLoaded{#1}{}{#2}%
+ }
+
+\NewDocumentCommand \ApplyPatchToPackage { m O{bidi} }
+ {
+ \bidi@patch@AfterPackage{#1}{\input{#1-xetex-#2.def}}%
+ }
+
+\NewDocumentCommand \ApplyPatchCodeToPackage { m +m }
+ {
+ \bidi@patch@AfterPackage{#1}{#2}%
+ }
+
+\NewDocumentCommand \ApplyPatchToClass { m O{bidi} }
+ {
+ \@ifclassloaded{#1}{\input{#1-xetex-#2.def}}{}%
+ }
\endinput
%%
%% End of file `biditools.sty'.
diff --git a/Master/texmf-dist/tex/xelatex/bidi/biditufte-book.cls b/Master/texmf-dist/tex/xelatex/bidi/biditufte-book.cls
index ead51da7eaa..6e13c469c96 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/biditufte-book.cls
+++ b/Master/texmf-dist/tex/xelatex/bidi/biditufte-book.cls
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/biditufte-handout.cls b/Master/texmf-dist/tex/xelatex/bidi/biditufte-handout.cls
index 86d61a6a442..544eccc1c6c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/biditufte-handout.cls
+++ b/Master/texmf-dist/tex/xelatex/bidi/biditufte-handout.cls
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty b/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty
index 930049cab0a..314ef8ca8bf 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -38,7 +38,7 @@
%% Right brace \} Tilde \~}
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bidituftefloat}[2017/05/19 v0.2
+\ProvidesPackage{bidituftefloat}[2025/01/03 v0.3
bidi implementation of tufte float]
\RequirePackage{xifthen}
\newcommand{\@bidituftefloat@pkgname}{bidituftefloat}
@@ -64,7 +64,7 @@ bidi implementation of tufte float]
\setboolean{@bidituftefloat@twoside}{false}%
\setboolean{@bidituftefloat@symmetric}{false}%
}
-\@ifclassloaded{book}{\ExecuteOptions{twoside}}{}
+\IfClassLoadedT{book}{\ExecuteOptions{twoside}}
\newboolean{@bidituftefloat@debug}
\newcommand*{\@bidituftefloat@caption@justification}{\@bidituftefloat@justification@autodetect}
\ProcessOptions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidituftegeneralstructure.sty b/Master/texmf-dist/tex/xelatex/bidi/bidituftegeneralstructure.sty
index 8ddc80caa26..fef4f8b9576 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidituftegeneralstructure.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidituftegeneralstructure.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty b/Master/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty
index 73319872f03..b0b52060c74 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidituftesidenote.sty b/Master/texmf-dist/tex/xelatex/bidi/bidituftesidenote.sty
index 47686737f01..20a01110378 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidituftesidenote.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidituftesidenote.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidituftetitle.sty b/Master/texmf-dist/tex/xelatex/bidi/bidituftetitle.sty
index cd895c7eb20..7667e88783f 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidituftetitle.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidituftetitle.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidituftetoc.sty b/Master/texmf-dist/tex/xelatex/bidi/bidituftetoc.sty
index 31a3acdad01..5b419460215 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bidituftetoc.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/bidituftetoc.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/boek-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/boek-xetex-bidi.def
index e8b6f50f78e..8e054602546 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/boek-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/boek-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/boek3-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/boek3-xetex-bidi.def
index d13afc44926..6d7c128864b 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/boek3-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/boek3-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/book-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/book-xetex-bidi.def
index e8f7b8cb28b..c7f2906ddb1 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/book-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/book-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{book-xetex-bidi.def}[2017/06/09 v1.0 bidi adaptations for standard book class for XeTeX engine]
+\ProvidesFile{book-xetex-bidi.def}[2025/01/03 v1.1 bidi adaptations for standard book class for XeTeX engine]
\renewenvironment{theindex}
{\if@twocolumn
\@restonecolfalse
@@ -53,7 +53,7 @@
\parskip\z@ \@plus .3\p@\relax
\let\item\@idxitem}
{\if@restonecol\onecolumn\else\clearpage\fi}
-\@ifclassloaded{bookest}{}{%
+\IfClassLoadedF{bookest}{%
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bookest-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/bookest-xetex-bidi.def
index bfd20bbb062..1b87bb0162c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/bookest-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/bookest-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/breqn-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/breqn-xetex-bidi.def
index 5ec104b4e17..20223787d30 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/breqn-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/breqn-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/cals-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/cals-xetex-bidi.def
index 7127424aea6..90d9f216759 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/cals-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/cals-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/caption-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/caption-xetex-bidi.def
index 6e358e97d52..2e4af80730c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/caption-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/caption-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/caption3-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/caption3-xetex-bidi.def
index 0b193299bf5..c87ad37655f 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/caption3-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/caption3-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/color-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/color-xetex-bidi.def
index 793d67a2787..00ac11b2606 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/color-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/color-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/colortbl-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/colortbl-xetex-bidi.def
index 895ab38eddf..50ccbed7e71 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/colortbl-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/colortbl-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/combine-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/combine-xetex-bidi.def
index 0ca6b54be4f..60f9b328595 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/combine-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/combine-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/crop-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/crop-xetex-bidi.def
index a5909a47798..a34ef37ffdf 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/crop-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/crop-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,9 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{crop-xetex-bidi.def}[2013/04/10 v0.2 bidi adaptations for crop package for XeTeX engine]
+\ProvidesFile{crop-xetex-bidi.def}[2025/01/03 v0.3 bidi adaptations for crop package for XeTeX engine]
+\IfClassLoadedT{memoir}{\endinput}
+\RequirePackage{graphicx}
\renewcommand*\CROP@@ulc{%
\if@RTLmain%
\begin{picture}(0,0)
diff --git a/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def
index 462f9e795e9..c1bc7bb4028 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/cutwin-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/cutwin-xetex-bidi.def
index c1f421e6609..fbaaacc5507 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/cutwin-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/cutwin-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty b/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty
index 503f4c57b1b..afaa487cd2e 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty b/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty
index ba6995a90bf..ffa19778b5e 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty
+++ b/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/dblfnote-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/dblfnote-xetex-bidi.def
index 7cb49b3cb8b..ba937a0f47c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/dblfnote-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/dblfnote-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/diagbox-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/diagbox-xetex-bidi.def
index 544dded0eef..047b878da5f 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/diagbox-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/diagbox-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-xetex-bidi.def
index 851697b1321..a1a32690af1 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/empheq-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/empheq-xetex-bidi.def
index 0a34b35cd49..d3c5edc4dbb 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/empheq-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/empheq-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/eso-pic-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/eso-pic-xetex-bidi.def
index dbe79d28d24..8c4ad1cd0a0 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/eso-pic-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/eso-pic-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/extarticle-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/extarticle-xetex-bidi.def
index d7ed0aebb0b..7e2fcd8d6ad 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/extarticle-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/extarticle-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/extbook-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/extbook-xetex-bidi.def
index b85c56b2e13..23067d2d474 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/extbook-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/extbook-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/extletter-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/extletter-xetex-bidi.def
index 5fb61a6b561..11e4db2a524 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/extletter-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/extletter-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def
index dbf7200b65a..c3a401f49e5 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{extrafootnotefeatures-xetex-bidi.def}[2023/08/02 v2.6 bidi extra footnote features for XeTeX engine]
+\ProvidesFile{extrafootnotefeatures-xetex-bidi.def}[2025/01/03 v2.7 bidi extra footnote features for XeTeX engine]
\newdimen\bidi@columnwidth
\def\bidi@floathook{%
\bidi@columnwidth\columnwidth
@@ -260,7 +260,7 @@
\@bidi@after@Hy@hyperfootnotes
\@ifstar\bidi@star@footmarkwidth\bidi@normal@footmarkwidth
}
-\@ifclassloaded{memoir}{\let\plainfootnotes\normalfootnotes}{}
+\IfClassLoadedT{memoir}{\let\plainfootnotes\normalfootnotes}
\bidi@ensure@newcommand*{\setSingleSpace}[1]{%
\def\m@m@singlespace{#1}%
\def\m@m@footnote@spacing{#1}%
diff --git a/Master/texmf-dist/tex/xelatex/bidi/extreport-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/extreport-xetex-bidi.def
index e3b06293a5f..e1aa5b12328 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/extreport-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/extreport-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/fancybox-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/fancybox-xetex-bidi.def
index bb2e08bb190..60ae3a1c846 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/fancybox-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/fancybox-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-xetex-bidi.def
index 63e74f85f22..b673c338742 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/fix2col-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/fix2col-xetex-bidi.def
index 431eab3c97a..a0d1aff022f 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/fix2col-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/fix2col-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/fleqn-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/fleqn-xetex-bidi.def
index 9f18aa6ddd7..0083544fcb6 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/fleqn-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/fleqn-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/float-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/float-xetex-bidi.def
index edc22b9c49c..f06304f18cc 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/float-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/float-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/floatrow-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/floatrow-xetex-bidi.def
index fdd834293d2..b033caf1169 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/floatrow-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/floatrow-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,8 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{floatrow-xetex-bidi.def}[2013/04/08 v0.1 bidi adaptations for floatrow package for XeTeX engine]
+\ProvidesFile{floatrow-xetex-bidi.def}[2025/01/03 v0.2 bidi adaptations for floatrow package for XeTeX engine]
+\RequirePackage{color}
\renewcommand\flnew@within[1]{\@addtoreset{\FB@captype}{#1}%
\expandafter\edef\csname the\FB@captype\endcsname{%
\expandafter\noexpand\csname
diff --git a/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def
index 84bc5cd5077..31331f0a182 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{flowfram-xetex-bidi.def}[2018/09/29 v0.5 bidi adaptations for flowfram package for XeTeX engine]
+\ProvidesFile{flowfram-xetex-bidi.def}[2025/01/03 v0.6 bidi adaptations for flowfram package for XeTeX engine]
\def\@outputdblcol{%
\@nxtcol=\c@thisframe
\c@curpg=\c@page
@@ -154,7 +154,7 @@
{\csname colheight\romannumeral#1\endcsname}{%
\expandafter\box\csname column\romannumeral#1\endcsname}%
}}}
-\@ifclassloaded{book}{%
+\IfClassLoadedT{book}{%
\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
\renewcommand \thefigure
@@ -166,8 +166,8 @@
\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection}
\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
-\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}{}
-\@ifclassloaded{report}{%
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}
+\IfClassLoadedT{report}{%
\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
\renewcommand \thefigure
@@ -179,7 +179,7 @@
\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection}
\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
-\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}{}
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}}
\renewcommand{\rotateframe}[2]{\if@ttb@rotate
\rotatebox{#1}{\if@RTL\beginL\fi#2\if@RTL\endL\fi}%
\else
diff --git a/Master/texmf-dist/tex/xelatex/bidi/footnote-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/footnote-xetex-bidi.def
index 7323749449d..de32ec75a99 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/footnote-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/footnote-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/footnotebackref-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/footnotebackref-xetex-bidi.def
index b1dfca0a756..4e41467a88c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/footnotebackref-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/footnotebackref-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/framed-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/framed-xetex-bidi.def
index b8ee159a7fe..909cefbdfd9 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/framed-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/framed-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/ftnright-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/ftnright-xetex-bidi.def
index 1bd554675bc..f123f772c1a 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/ftnright-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/ftnright-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/geometry-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/geometry-xetex-bidi.def
index 982c8519364..7484b1e02ba 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/geometry-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/geometry-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/graphicx-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/graphicx-xetex-bidi.def
index 4d8e4546660..54d3b7d0e31 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/graphicx-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/graphicx-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/hvfloat-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/hvfloat-xetex-bidi.def
index 75441c4d0e1..c0e9ee572ad 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/hvfloat-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/hvfloat-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def
index f4819d626b5..0d23efeead7 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{hyperref-xetex-bidi.def}[2018/11/11 v1.1 bidi adaptations for hyperref package for XeTeX engine]
+\ProvidesFile{hyperref-xetex-bidi.def}[2025/01/03 v1.2 bidi adaptations for hyperref package for XeTeX engine]
\AtBeginDocument{%
\def\contentsline#1#2#3#4{%
\ifx\\#4\\%
@@ -187,7 +187,7 @@
\fi
}%
}%
- \@ifpackageloaded{tabularx}{%
+ \ApplyPatchCodeToPackage{tabularx}{%
\let\HyOrg@TX@endtabularx\TX@endtabularx
\def\Hy@tabularx@hook{%
\let\@footnotetext\H@@footnotetext
@@ -206,8 +206,8 @@
}%
\endgroup
\let\TX@endtabularx\Hy@gtemp
- }{}%
- \@ifpackageloaded{longtable}{%
+ }%
+ \ApplyPatchCodeToPackage{longtable}{%
\CheckCommand*{\LT@p@LTRftntext}[1]{%
\edef\@tempa{%
\the\LT@p@ftn
@@ -284,8 +284,8 @@
\fi
}%
}%
- }{}%
- \@ifpackageloaded{bidipoem}{%
+ }%
+ \ApplyPatchCodeToPackage{bidipoem}{%
\long\def\bidipoem@p@ftntext#1{%
\edef\@tempx{%
\the\bidipoem@p@ftn
@@ -379,7 +379,7 @@
\fi
}%
}%
- }{}%
+ }%
\let\HyOrg@maketitle\maketitle
\def\maketitle{%
\let\Hy@saved@footnotemark\@footnotemark
@@ -584,7 +584,7 @@
\def\XeTeX{Xe\TeX}%
\def\XeLaTeX{Xe\LaTeX}%
}
-\@ifpackageloaded{longtable}{%
+\ApplyPatchCodeToPackage{longtable}{%
\begingroup
\def\y{\LT@array}%
\@ifundefined{scr@LT@array}{%
@@ -614,7 +614,7 @@
}%
}%
\expandafter\x\LT@start\@nil
-}{}
+}
\bidi@patchcmd\@TextField{%
\@pdfm@mark
}{%
diff --git a/Master/texmf-dist/tex/xelatex/bidi/imsproc-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/imsproc-xetex-bidi.def
index d0ccadc5dde..d9a9ba3b352 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/imsproc-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/imsproc-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def
index 6c2a6dacba5..ee5b0988cca 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{latex-xetex-bidi.def}[2024/12/08 v1.5.1 bidi adaptations for `latex.ltx' for XeTeX engine]
+\ProvidesFile{latex-xetex-bidi.def}[2025/01/03 v1.5.2 bidi adaptations for `latex.ltx' for XeTeX engine]
\newcommand{\TeXXeTOn}{\TeXXeTstate\@ne}
\newcommand{\TeXXeTOff}{\TeXXeTstate\z@}
\TeXXeTOn
@@ -155,7 +155,7 @@
\let\setLR=\setLTR
\let\unsetRL=\setLTR
\def\bidi@tabular@RTLcases{\let\@halignto\@empty\@bidi@tabular@RTLcases}
-\@ifpackageloaded{array}{%
+\ApplyPatchIfPackageLoaded{array}{%
\def\@bidi@tabular@RTLcases{\@RTLtabtrue%
\leavevmode
\hbox \bgroup $\left.\col@sep\tabcolsep \let\d@llarbegin\begingroup
@@ -839,7 +839,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\let\bidi@saved@leqno=\leqno
\def\eqno{\ifnum\predisplaydirection<\z@ \bidi@saved@leqno \else \bidi@saved@eqno \fi}
\def\leqno{\ifnum\predisplaydirection<\z@ \bidi@saved@eqno \else \bidi@saved@leqno \fi}
-\@ifpackageloaded{amsmath}{}{
+\ApplyPatchIfPackageLoadedF{amsmath}{
\def\@eqnnum{{\normalfont \normalcolor \if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}
}
\input{footnote-xetex-bidi.def}
@@ -852,182 +852,163 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\if@bidi@csundef{@idxitem}{}{%
\renewcommand\@idxitem{\par\hangindent \if@RTL-\fi40\p@}%
}
-\@ifpackageloaded{tocbasic}{\input{tocbasic-xetex-bidi.def}}{}
-\@ifclassloaded{article}{\@ifclassloaded{svmult}{}{\input{article-xetex-bidi.def}}}{}
-\@ifclassloaded{extarticle}{\input{extarticle-xetex-bidi.def}}{}
-\@ifclassloaded{artikel1}{\input{artikel1-xetex-bidi.def}}{}
-\@ifclassloaded{artikel2}{\input{artikel2-xetex-bidi.def}}{}
-\@ifclassloaded{artikel3}{\input{artikel3-xetex-bidi.def}}{}
-\@ifclassloaded{amsart}{\input{amsart-xetex-bidi.def}}{}
-\@ifclassloaded{beamer}{\input{beamer-xetex-bidi.def}}{}
-\@ifclassloaded{letter}{\input{letter-xetex-bidi.def}}{}
-\@ifclassloaded{extletter}{\input{extletter-xetex-bidi.def}}{}
-\@ifclassloaded{memoir}{\input{memoir-xetex-bidi.def}}{}
-\@ifclassloaded{refrep}{\input{refrep-xetex-bidi.def}}{}
-\@ifclassloaded{extreport}{\input{extreport-xetex-bidi.def}}{}
-\@ifclassloaded{report}{\@ifpackageloaded{flowfram}{}{\input{report-xetex-bidi.def}}}{}
-\@ifclassloaded{rapport1}{\input{rapport1-xetex-bidi.def}}{}
-\@ifclassloaded{rapport3}{\input{rapport3-xetex-bidi.def}}{}
-\@ifclassloaded{scrartcl}{\input{scrartcl-xetex-bidi.def}}{}
-\@ifclassloaded{scrbook}{\input{scrbook-xetex-bidi.def}}{}
-\@ifclassloaded{scrreprt}{\input{scrreprt-xetex-bidi.def}}{}
-\@ifclassloaded{amsbook}{\input{amsbook-xetex-bidi.def}}{}
-\@ifclassloaded{extbook}{\input{extbook-xetex-bidi.def}}{}
-\@ifclassloaded{boek}{\input{boek-xetex-bidi.def}}{}
-\@ifclassloaded{boek3}{\input{boek3-xetex-bidi.def}}{}
-\@ifclassloaded{book}{\@ifpackageloaded{flowfram}{}{\input{book-xetex-bidi.def}}}{}
-\@ifclassloaded{bookest}{\input{bookest-xetex-bidi.def}}{}
-\@ifclassloaded{combine}{\input{combine-xetex-bidi.def}}{}
-\@ifclassloaded{imsproc}{\input{imsproc-xetex-bidi.def}}{}
-\@ifpackageloaded{amsmath}{}{%
-\@iftagsloaded{leqno}{\input{leqno-xetex-bidi.def}}{}
-\@iftagsloaded{fleqn}{\input{fleqn-xetex-bidi.def}}{}
+
+\ApplyPatchToClassesIfPackageLoadedF{%
+ book, %
+ report %
+}{flowfram}
+
+\ApplyPatchToPackageIfPackageLoadedF{float}{floatrow}
+
+\ApplyPatchToFilesIfPackageLoadedF{amsmath}{%
+ fleqn, %
+ leqno%
+}[clo]
+
+\ApplyPatchToClasses{%
+ amsart, %
+ amsbook, %
+ article, %
+ artikel1, %
+ artikel2, %
+ artikel3, %
+ beamer, %
+ boek, %
+ boek3, %
+ bookest, %
+ combine, %
+ extbook, %
+ extletter, %
+ extarticle, %
+ extreport, %
+ imsproc, %
+ letter, %
+ memoir, %
+ rapport1, %
+ rapport3, %
+ refrep, %
+ scrartcl, %
+ scrbook, %
+ scrreprt %
}
-\@ifpackageloaded{mathtools}{%
- \RequirePackage{graphicx}%
- \input{mathtools-xetex-bidi.def}%
- }{}
-\@ifpackageloaded{crop}{\RequirePackage{graphicx}}{}
-\@ifpackageloaded{lscape}{\RequirePackage{graphicx}}{}
-\@ifpackageloaded{sidecap}{\RequirePackage{ragged2e}}{}
-\@ifpackageloaded{floatrow}{\RequirePackage{color}}{}
-\@ifpackageloaded{algorithm2e}{\input{algorithm2e-xetex-bidi.def}}{}
-\@ifpackagewith{algorithm2e}{algonl}{%
-\renewcommand{\theAlgoLine}{\expandafter\csname the\algocf@float\endcsname\@SepMark\arabic{AlgoLine}}%
-}{}
-\@ifpackagewith{algorithm2e}{algopart}{\renewcommand{\algocf@within}{part}}{}
-\@ifpackagewith{algorithm2e}{algochapter}{\renewcommand{\algocf@within}{chapter}}{}
-\@ifpackagewith{algorithm2e}{algosection}{\renewcommand{\algocf@within}{section}}{}
-\@ifpackageloaded{amsmath}{\input{amsmath-xetex-bidi.def}}{}
-\@ifpackageloaded{amstext}{\input{amstext-xetex-bidi.def}}{}
-\@ifpackageloaded{amsthm}{\input{amsthm-xetex-bidi.def}}{}
-\@ifpackageloaded{breqn}{\input{breqn-xetex-bidi.def}}{}
-\@ifpackageloaded{cals}{\input{cals-xetex-bidi.def}}{}
-\@ifpackageloaded{caption}{\input{caption-xetex-bidi.def}}{}
-\@ifpackageloaded{caption3}{\input{caption3-xetex-bidi.def}}{}
-\@ifpackageloaded{floatrow}{\input{floatrow-xetex-bidi.def}}{}
-\@ifpackageloaded{crop}{\@ifclassloaded{memoir}{}{\input{crop-xetex-bidi.def}}}{}
-\@ifpackageloaded{color}{\input{color-xetex-bidi.def}}{}
-\@ifpackageloaded{cutwin}{\input{cutwin-xetex-bidi.def}}{}
-\@ifpackageloaded{cuted}{\input{cuted-xetex-bidi.def}}{}
-\@ifpackageloaded{xcolor}{\input{xcolor-xetex-bidi.def}}{}
-\@ifpackageloaded{colortbl}{\input{colortbl-xetex-bidi.def}}{}
-\@ifpackageloaded{float}{\@ifpackageloaded{floatrow}{}{\input{float-xetex-bidi.def}}}{}
-\@ifpackageloaded{flowfram}{\input{flowfram-xetex-bidi.def}}{}
-\@ifpackageloaded{xltxtra}{\input{xltxtra-xetex-bidi.def}}{}
-\@ifpackageloaded{wrapfig}{\input{wrapfig-xetex-bidi.def}}{}
-\@ifpackageloaded{graphicx}{\input{graphicx-xetex-bidi.def}}{}
-\@ifpackageloaded{geometry}{\input{geometry-xetex-bidi.def}}{}
-\@ifpackageloaded{hvfloat}{\input{hvfloat-xetex-bidi.def}}{}
-\@ifpackageloaded{ntheorem}{\input{ntheorem-xetex-bidi.def}}{}
-\@ifpackageloaded{tabularx}{\input{tabularx-xetex-bidi.def}}{}
-\@ifpackageloaded{longtable}{\input{longtable-xetex-bidi.def}}{}
-\@ifpackageloaded{lscape}{\input{lscape-xetex-bidi.def}}{}
-\@ifpackageloaded{hyperref}{\input{hyperref-xetex-bidi.def}}{}
-\@ifpackageloaded{footnotebackref}{\input{footnotebackref-xetex-bidi.def}}{}
-\@ifpackageloaded{ntheorem-hyper}{\input{ntheorem-hyper-xetex-bidi.def}}{}
-\@ifpackageloaded{fancybox}{\input{fancybox-xetex-bidi.def}}{}
-\@ifpackageloaded{fancyhdr}{\input{fancyhdr-xetex-bidi.def}}{}
-\@ifpackageloaded{fix2col}{\input{fix2col-xetex-bidi.def}}{}
-\@ifpackageloaded{ftnright}{\input{ftnright-xetex-bidi.def}}{}
-\@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}}{}
-\@ifpackageloaded{overpic}{\input{overpic-xetex-bidi.def}}{}
-\@ifpackageloaded{pdfbase}{\input{pdfbase-xetex-bidi.def}}{}
-\@ifpackageloaded{pdflscape}{\input{pdflscape-xetex-bidi.def}}{}
-\@ifpackageloaded{pdfpages}{\input{pdfpages-xetex-bidi.def}}{}
-\@ifpackageloaded{lettrine}{\input{lettrine-xetex-bidi.def}}{}
-\@ifpackageloaded{lineno}{\input{lineno-xetex-bidi.def}}{}
-\@ifpackageloaded{listings}{\input{listings-xetex-bidi.def}}{}
-\@ifpackageloaded{media9}{\RequirePackage{bidi-media9}}{}
-\@iftexfileloaded{pstricks}{\input{pstricks-xetex-bidi.def}}{}
-\@iftexfileloaded{pgfcorescopes.code}{\input{pgfcorescopes.code-xetex-bidi.def}}{}
-\@ifpackageloaded{titlesec}{\input{titlesec-xetex-bidi.def}}{}
-\@ifpackageloaded{titletoc}{\input{titletoc-xetex-bidi.def}}{}
-\@ifpackageloaded{array}{\input{array-xetex-bidi.def}}{}
-\@ifpackageloaded{sidecap}{\input{sidecap-xetex-bidi.def}}{}
-\@ifpackagewith{sidecap}{innercaption}{%
-\if@RTL \renewcommand*{\SC@FLOAT}[2]{%
- \isSC@ODD{{#2}\hspace{\sidecaptionsep}{#1}} {{#1}\hspace{\sidecaptionsep}{#2}}}
- \renewcommand*\SC@justify@caption{%
- \isSC@ODD{\RaggedRight}{\RaggedLeft}}\else
- \renewcommand*{\SC@FLOAT}[2]{%
- \isSC@ODD{{#1}\hspace{\sidecaptionsep}{#2}} {{#2}\hspace{\sidecaptionsep}{#1}}}
- \renewcommand*\SC@justify@caption{%
- \isSC@ODD{\RaggedLeft}{\RaggedRight}}\fi
-}{}
-\@ifpackagewith{sidecap}{rightcaption}{%
- \if@RTL\renewcommand*{\SC@FLOAT}[2]{{#1}\hspace{\sidecaptionsep}{#2}}
- \def\SC@justify@caption{\RaggedLeft}\else%
- \renewcommand*{\SC@FLOAT}[2]{{#2}\hspace{\sidecaptionsep}{#1}}
- \def\SC@justify@caption{\RaggedRight}\fi%
-}{}
-\@ifpackagewith{sidecap}{leftcaption}{%
-\if@RTL \renewcommand*{\SC@FLOAT}[2]{{#2}\hspace{\sidecaptionsep}{#1}}
- \def\SC@justify@caption{\RaggedRight}\else%
- \renewcommand*{\SC@FLOAT}[2]{{#1}\hspace{\sidecaptionsep}{#2}}
- \def\SC@justify@caption{\RaggedLeft}\fi%
-}{}
-\@ifpackageloaded{soul}{\input{soul-xetex-bidi.def}}{}
-\@ifpackageloaded{stabular}{\input{stabular-xetex-bidi.def}}{}
-\@ifpackageloaded{subfigure}{\input{subfigure-xetex-bidi.def}}{}
-\@ifpackageloaded{arydshln}{\input{arydshln-xetex-bidi.def}}{}
-\@ifpackageloaded{mdframed}{\input{mdframed-xetex-bidi.def}}{}
-\@ifpackageloaded{multicol}{\input{multicol-xetex-bidi.def}}{}
-\@ifpackageloaded{adjmulticol}{\input{adjmulticol-xetex-bidi.def}}{}
-\@ifpackageloaded{multienum}{\input{multienum-xetex-bidi.def}}{}
-\@ifpackageloaded{natbib}{\input{natbib-xetex-bidi.def}}{}
-\@ifpackageloaded{newfloat}{\input{newfloat-xetex-bidi.def}}{}
-\@ifpackageloaded{nicematrix}{\input{nicematrix-xetex-bidi.def}}{}
-\@ifpackageloaded{minitoc}{\input{minitoc-xetex-bidi.def}}{}
-\@ifpackageloaded{pgfsys}{\input{pgfsys.code-xetex-bidi.def}}{}
-\@ifpackageloaded{picinpar}{\input{picinpar-xetex-bidi.def}}{}
-\@ifpackageloaded{quotchap}{\input{quotchap-xetex-bidi.def}}{}
-\@ifpackageloaded{ragged2e}{\input{ragged2e-xetex-bidi.def}}{}
-\@ifpackageloaded{rotating}{\input{rotating-xetex-bidi.def}}{}
-\@ifpackageloaded{tabls}{\input{tabls-xetex-bidi.def}}{}
-\@ifpackageloaded{tabulary}{\input{tabulary-xetex-bidi.def}}{}
-\@ifpackageloaded{tcolorbox}{\input{tcolorbox-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}}}{}
-\@ifdefinitionfileloaded{tc-xetex}{\input{tc-xetex-bidi.def}}{}
-\@ifpackageloaded{todonotes}{\input{todonotes-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaseauxtemplates}{\input{beamerbaseauxtemplates-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaseboxes}{\input{beamerbaseboxes-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbasecolor}{\input{beamerbasecolor-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbasecompatibility}{\input{beamerbasecompatibility-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaseframecomponents}{\input{beamerbaseframecomponents-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaseframesize}{\input{beamerbaseframesize-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaselocalstructure}{\input{beamerbaselocalstructure-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbasemisc}{\input{beamerbasemisc-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbasenavigation}{\input{beamerbasenavigation-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerbaseoverlay}{\input{beamerbaseoverlay-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemedefault}{\input{beamerinnerthemedefault-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemecircles}{\input{beamerinnerthemecircles-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemefocus}{\input{beamerinnerthemefocus-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemeinmargin}{\input{beamerinnerthemeinmargin-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthememetropolis}{\input{beamerinnerthememetropolis-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemerectangles}{\input{beamerinnerthemerectangles-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerinnerthemerounded}{\input{beamerinnerthemerounded-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemedefault}{\input{beamerouterthemedefault-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemefocus}{\input{beamerouterthemefocus-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemeinfolines}{\input{beamerouterthemeinfolines-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthememetropolis}{\input{beamerouterthememetropolis-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthememiniframes}{\input{beamerouterthememiniframes-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemesidebar}{\input{beamerouterthemesidebar-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemesplit}{\input{beamerouterthemesplit-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemeshadow}{\input{beamerouterthemeshadow-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemesmoothbars}{\input{beamerouterthemesmoothbars-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemesmoothtree}{\input{beamerouterthemesmoothtree-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerouterthemetree}{\input{beamerouterthemetree-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerthemeHannover}{\input{beamerthemeHannover-xetex-bidi.def}}{}
-\@ifpackageloaded{beamerthemeSingapore}{\input{beamerthemeSingapore-xetex-bidi.def}}{}
+
+\ApplyPatchToPackages{%
+ adjmulticol, %
+ algorithm2e, %
+ amsmath, %
+ amstext, %
+ amsthm, %
+ arydshln, %
+ array, %
+ beamerbaseauxtemplates, %
+ beamerbaseboxes, %
+ beamerbasecolor, %
+ beamerbasecompatibility, %
+ beamerbaseframecomponents, %
+ beamerbaseframesize, %
+ beamerbaselocalstructure, %
+ beamerbasemisc, %
+ beamerbasenavigation, %
+ beamerbaseoverlay, %
+ beamerinnerthemecircles, %
+ beamerinnerthemedefault, %
+ beamerinnerthemefocus, %
+ beamerinnerthemeinmargin, %
+ beamerinnerthememetropolis, %
+ beamerinnerthemerectangles, %
+ beamerinnerthemerounded, %
+ beamerouterthemedefault, %
+ beamerouterthemefocus, %
+ beamerouterthemeinfolines, %
+ beamerouterthememetropolis, %
+ beamerouterthememiniframes, %
+ beamerouterthemesidebar, %
+ beamerouterthemesplit, %
+ beamerouterthemeshadow, %
+ beamerouterthemesmoothbars, %
+ beamerouterthemesmoothtree, %
+ beamerouterthemetree, %
+ beamerthemeHannover, %
+ beamerthemeSingapore, %
+ breqn, %
+ cals, %
+ caption, %
+ caption3, %
+ color, %
+ colortbl, %
+ crop, %
+ cuted, %
+ cutwin, %
+ dblfnote, %
+ diagbox, %
+ draftwatermark, %
+ eso-pic, %
+ empheq, %
+ fancybox, %
+ fancyhdr, %
+ fix2col, %
+ float, %
+ floatrow, %
+ flowfram, %
+ footnotebackref, %
+ framed, %
+ ftnright, %
+ geometry, %
+ graphicx, %
+ hvfloat, %
+ hyperref, %
+ lettrine, %
+ lineno, %
+ listings, %
+ longtable, %
+ lscape, %
+ mathtools, %
+ mdframed, %
+ media9, %
+ midfloat, %
+ minitoc, %
+ multicol, %
+ multienum, %
+ natbib, %
+ newfloat, %
+ nicematrix, %
+ ntheorem, %
+ ntheorem-hyper, %
+ overpic, %
+ pdfbase, %
+ pdflscape, %
+ pdfpages, %
+ pgfsys, %
+ picinpar, %
+ quotchap, %
+ ragged2e, %
+ rotating, %
+ sidecap, %
+ soul, %
+ stabular, %
+ subfigure, %
+ tabls, %
+ tabularx, %
+ tabulary, %
+ tcolorbox, %
+ titlesec, %
+ titletoc, %
+ tocbasic, %
+ tocbibind, %
+ tocloft, %
+ tocstyle, %
+ todonotes, %
+ wrapfig, %
+ xcolor, %
+ xltxtra %
+}
+
+\ApplyPatchToFiles{%
+ pgfcorescopes.code, %
+ pstricks %
+}[tex]
+
+\ApplyPatchToFile{tc-xetex}
\endinput
%%
%% End of file `latex-xetex-bidi.def'.
diff --git a/Master/texmf-dist/tex/xelatex/bidi/leqno-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/leqno-xetex-bidi.def
index b8cc0b59a85..6ebfe450548 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/leqno-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/leqno-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/letter-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/letter-xetex-bidi.def
index ce9fccfb1b8..d9436838fce 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/letter-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/letter-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/lettrine-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/lettrine-xetex-bidi.def
index 497cca9d81f..313eaa88725 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/lettrine-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/lettrine-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/lineno-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/lineno-xetex-bidi.def
index b836f75f80b..ac50f3e59a4 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/lineno-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/lineno-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def
index 527bfae4ab1..daf42537d10 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{listings-xetex-bidi.def}[2018/09/15 v1.5 bidi adaptations for listings package for XeTeX engine]
+\ProvidesFile{listings-xetex-bidi.def}[2025/01/03 v1.6 bidi adaptations for listings package for XeTeX engine]
\lst@Key{captiondirection}{textdirection}{%
\lstKV@SwitchCases{#1}%
{textdirection:\\%
@@ -117,7 +117,7 @@
\endgroup%
}{}{}%
}
-\@ifpackageloaded{caption}{%
+\ApplyPatchIfPackageLoaded{caption}{%
\AtBeginCaption{%
\bidi@lst@ensure@caption@script{\@nonlatintrue}{\@nonlatinfalse}%
\bidi@lst@ensure@caption@direction{\@RTLfalse}{\@RTLtrue}%
diff --git a/Master/texmf-dist/tex/xelatex/bidi/loadingorder-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/loadingorder-xetex-bidi.def
deleted file mode 100644
index 8789e618be3..00000000000
--- a/Master/texmf-dist/tex/xelatex/bidi/loadingorder-xetex-bidi.def
+++ /dev/null
@@ -1,336 +0,0 @@
-%%
-%% This is file `loadingorder-xetex-bidi.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% bidi.dtx (with options: `table,loadingorder-xetex-bidi.def')
-%%
-%% __________________________________________________
-%% Vafa Khalighi
-%%
-%% Copyright (c) 2007--2025 Vafa Khalighi
-%% Copyright (c) 2018--2020 bidi-tex GitHub Organization
-%%
-%% It may be distributed and/or modified under the LaTeX Project Public License,
-%% version 1.3c or higher (your choice). The latest version of
-%% this license is at: http://www.latex-project.org/lppl.txt
-%%
-%% This work is “author-maintained” (as per LPPL maintenance status)
-%% by Vafa Khalighi.
-%%
-%%
-%% \CheckSum{58641}
-%% \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
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
-%%
-\ProvidesFile{loadingorder-xetex-bidi.def}[2024/12/08 v0.99 making sure that bidi is the last package loaded]
-\bidi@isloaded{amsmath}
-\bidi@isloaded{amstext}
-\bidi@isloaded{amsthm}
-\bidi@isloaded{animate}
-\bidi@isloaded{breqn}
-\bidi@isloaded{cals}
-\bidi@isloaded{caption}
-\bidi@isloaded{crop}
-\bidi@isloaded{cuted}
-\bidi@isloaded{cutwin}
-\bidi@isloaded{color}
-\bidi@isloaded{dblfnote}
-\bidi@isloaded{diagbox}
-\bidi@isloaded{xcolor}
-\bidi@isloaded{colortbl}
-\bidi@isloaded{float}
-\bidi@isloaded{floatrow}
-\bidi@isloaded{flowfram}
-\bidi@isloaded{framed}
-\bidi@isloaded{ftnright}
-\bidi@isloaded{xltxtra}
-\bidi@isloaded{xunicode}
-\bidi@isloaded{wrapfig}
-\bidi@isloaded{graphicx}
-\bidi@isloaded{geometry}
-\bidi@isloaded{hvfloat}
-\bidi@isloaded{mdframed}
-\bidi@isloaded{midfloat}
-\bidi@isloaded{ntheorem}
-\bidi@isloaded{ntheorem-hyper}
-\bidi@isloaded{hyperref}
-\bidi@isloaded{fancybox}
-\bidi@isloaded{fancyhdr}
-\bidi@isloaded{fix2col}
-\bidi@isloaded{draftwatermark}
-\bidi@isloaded{empheq}
-\bidi@isloaded{overpic}
-\bidi@isloaded{pdfpages}
-\bidi@isloaded{listings}
-\bidi@isloaded{lettrine}
-\bidi@isloaded{lineno}
-\bidi@isloaded{media9}
-\bidi@isloaded{pstricks}
-\bidi@isloaded{pgf}
-\bidi@isloaded{picinpar}
-\bidi@isloaded{quotchap}
-\bidi@isloaded{tikz}
-\bidi@isloaded{titlesec}
-\bidi@isloaded{titletoc}
-\bidi@isloaded{array}
-\bidi@isloaded{soul}
-\bidi@isloaded{stabular}
-\bidi@isloaded{subfig}
-\bidi@isloaded{subfigure}
-\bidi@isloaded{supertabular}
-\bidi@isloaded{xtab}
-\bidi@isloaded{longtable}
-\bidi@isloaded{arydshln}
-\bidi@isloaded{multicol}
-\bidi@isloaded{multienum}
-\bidi@isloaded{minitoc}
-\bidi@isloaded{natbib}
-\bidi@isloaded{newfloat}
-\bidi@isloaded{ragged2e}
-\bidi@isloaded{rotating}
-\bidi@isloaded{tabls}
-\bidi@isloaded{tabulary}
-\bidi@isloaded{tocbasic}
-\bidi@isloaded{tocstyle}
-\bidi@isloaded{tocbibind}
-\bidi@isloaded{fontspec}
-\bidi@isloaded{arabxetex}
-\bidi@isloaded{polyglossia}
-\bidi@isloaded{fancyvrb}
-\AtBeginDocument{
- \if@bidi@amsmathloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package amsmath after bidi package. Please load package amsmath before bidi package, and then try to run xelatex on your document again}{}]{amsmath}
- \fi%
- \if@bidi@amstextloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package amstext after bidi package. Please load package amstext before bidi package, and then try to run xelatex on your document again}{}]{amstext}
- \fi%
- \if@bidi@amsthmloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package amsthm after bidi package. Please load package amsthm before bidi package, and then try to run xelatex on your document again}{}]{amsthm}
- \fi%
- \if@bidi@animateloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package animate after bidi package. Please load package animate before bidi package, and then try to run xelatex on your document again}{}]{animate}
- \fi%
- \if@bidi@breqnloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package breqn after bidi package. Please load package breqn before bidi package, and then try to run xelatex on your document again}{}]{breqn}
- \fi%
- \if@bidi@calsloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package cals after bidi package. Please load package cals before bidi package, and then try to run xelatex on your document again}{}]{cals}
- \fi%
- \if@bidi@captionloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package caption after bidi package. Please load package caption before bidi package, and then try to run xelatex on your document again}{}]{caption}
- \fi%
- \if@bidi@croploaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package crop after bidi package. Please load package crop before bidi package, and then try to run xelatex on your document again}{}]{crop}
- \fi%
- \if@bidi@colorloaded@\else
- \@ifpackageloaded{hyperref}{}{%
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package color after bidi package. Please load package color before bidi package, and then try to run xelatex on your document again}{}]{color}}
- \fi%
- \if@bidi@cutwinloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package cutwin after bidi package. Please load package cutwin before bidi package, and then try to run xelatex on your document again}{}]{cutwin}
- \fi%
- \if@bidi@cutedloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package cuted after bidi package. Please load package cuted before bidi package, and then try to run xelatex on your document again}{}]{cuted}
- \fi%
- \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%
- \if@bidi@colortblloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package colortbl after bidi package. Please load package colortbl before bidi package, and then try to run xelatex on your document again}{}]{colortbl}
- \fi%
- \if@bidi@floatloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package float after bidi package. Please load package float before bidi package, and then try to run xelatex on your document again}{}]{float}
- \fi%
- \if@bidi@floatrowloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package floatrow after bidi package. Please load package floatrow before bidi package, and then try to run xelatex on your document again}{}]{floatrow}
- \fi%
- \if@bidi@flowframloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package flowfram after bidi package. Please load package flowfram before bidi package, and then try to run xelatex on your document again}{}]{flowfram}
- \fi%
- \if@bidi@framedloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package framed after bidi package. Please load package framed before bidi package, and then try to run xelatex on your document again}{}]{framed}
- \fi%
- \if@bidi@ftnrightloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package ftnright after bidi package. Please load package ftnright before bidi package, and then try to run xelatex on your document again}{}]{ftnright}
- \fi%
- \if@bidi@xltxtraloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xltxtra after bidi package. Please load package xltxtra before bidi package, and then try to run xelatex on your document again}{}]{xltxtra}
- \fi%
- \if@bidi@xunicodeloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xunicode after bidi package. Please load package xunicode before bidi package, and then try to run xelatex on your document again}{}]{xunicode}
- \fi%
- \if@bidi@wrapfigloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package wrapfig after bidi package. Please load package wrapfig before bidi package, and then try to run xelatex on your document again}{}]{wrapfig}
- \fi%
- \if@bidi@graphicxloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package graphicx after bidi package. Please load package graphicx before bidi package, and then try to run xelatex on your document again}{}]{graphicx}
- \fi%
- \if@bidi@geometryloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package geometry after bidi package. Please load package geometry before bidi package, and then try to run xelatex on your document again}{}]{geometry}
- \fi%
- \if@bidi@hvfloatloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package hvfloat after bidi package. Please load package hvfloat before bidi package, and then try to run xelatex on your document again}{}]{hvfloat}
- \fi%
- \if@bidi@mdframedloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package mdframed after bidi package. Please load package mdframed before bidi package, and then try to run xelatex on your document again}{}]{mdframed}
- \fi%
- \if@bidi@midfloatloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package midfloat after bidi package. Please load package midfloat before bidi package, and then try to run xelatex on your document again}{}]{midfloat}
- \fi%
- \if@bidi@ntheoremloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package ntheorem after bidi package. Please load package ntheorem before bidi package, and then try to run xelatex on your document again}{}]{ntheorem}
- \fi%
- \if@bidi@hyperrefloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package hyperref after bidi package. Please load package hyperref before bidi package, and then try to run xelatex on your document again}{}]{hyperref}
- \fi%
- \if@bidi@fancyboxloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fancybox after bidi package. Please load package fancybox before bidi package, and then try to run xelatex on your document again}{}]{fancybox}
- \fi%
- \if@bidi@fancyhdrloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fancyhdr after bidi package. Please load package fancyhdr before bidi package, and then try to run xelatex on your document again}{}]{fancyhdr}
- \fi%
- \if@bidi@draftwatermarkloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package draftwatermark after bidi package. Please load package draftwatermark before bidi package, and then try to run xelatex on your document again}{}]{draftwatermark}
- \fi%
- \if@bidi@empheqloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package empheq after bidi package. Please load package empheq before bidi package, and then try to run xelatex on your document again}{}]{empheq}
- \fi%
- \if@bidi@overpicloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package overpic after bidi package. Please load package overpic before bidi package, and then try to run xelatex on your document again}{}]{overpic}
- \fi%
- \if@bidi@pdfpagesloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pdfpages after bidi package. Please load package pdfpages before bidi package, and then try to run xelatex on your document again}{}]{pdfpages}
- \fi%
- \if@bidi@lettrineloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package lettrine after bidi package. Please load package lettrine before bidi package, and then try to run xelatex on your document again}{}]{lettrine}
- \fi
- \if@bidi@linenoloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package lineno after bidi package. Please load package lineno before bidi package, and then try to run xelatex on your document again}{}]{lineno}
- \fi%
- \if@bidi@listingsloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package listings after bidi package. Please load package listings before bidi package, and then try to run xelatex on your document again}{}]{listings}
- \fi%
- \csname if@bidi@media9loaded@\endcsname\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package media9 after bidi package. Please load package media9 before bidi package, and then try to run xelatex on your document again}{}]{media9}
- \fi%
- \if@bidi@pstricksloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pstricks after bidi package. Please load package pstricks before bidi package, and then try to run xelatex on your document again}{}]{pstricks}
- \fi%
- \if@bidi@pgfloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pgf after bidi package. Please load package pgf before bidi package, and then try to run xelatex on your document again}{}]{pgf}
- \fi%
- \if@bidi@picinparloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package picinpar after bidi package. Please load package picinpar before bidi package, and then try to run xelatex on your document again}{}]{picinpar}
- \fi%
- \if@bidi@quotchaploaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package quotchap after bidi package. Please load package quotchap before bidi package, and then try to run xelatex on your document again}{}]{quotchap}
- \fi%
- \if@bidi@tikzloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tikz after bidi package. Please load package tikz before bidi package, and then try to run xelatex on your document again}{}]{tikz}
- \fi%
- \if@bidi@titlesecloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package titlesec after bidi package. Please load package titlesec before bidi package, and then try to run xelatex on your document again}{}]{titlesec}
- \fi%
- \if@bidi@titletocloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package titletoc after bidi package. Please load package titletoc before bidi package, and then try to run xelatex on your document again}{}]{titletoc}
- \fi%
- \if@bidi@arrayloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package array after bidi package. Please load package array before bidi package, and then try to run xelatex on your document again}{}]{array}
- \fi%
- \if@bidi@stabularloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package stabular after bidi package. Please load package stabular before bidi package, and then try to run xelatex on your document again}{}]{stabular}
- \fi%
- \if@bidi@soulloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package soul after bidi package. Please load package soul before bidi package, and then try to run xelatex on your document again}{}]{soul}
- \fi%
- \if@bidi@subfigloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package subfig after bidi package. Please load package subfig before bidi package, and then try to run xelatex on your document again}{}]{subfig}
- \fi%
- \if@bidi@subfigureloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package subfigure after bidi package. Please load package subfigure before bidi package, and then try to run xelatex on your document again}{}]{subfigure}
- \fi%
- \if@bidi@supertabularloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package supertabular after bidi package. Please load package supertabular before bidi package, and then try to run xelatex on your document again}{}]{supertabular}
- \fi%
- \if@bidi@xtabloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package xtab after bidi package. Please load package xtab before bidi package, and then try to run xelatex on your document again}{}]{xtab}
- \fi%
- \if@bidi@longtableloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package longtable after bidi package. Please load package longtable before bidi package, and then try to run xelatex on your document again}{}]{longtable}
- \fi%
- \if@bidi@arydshlnloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package arydshln after bidi package. Please load package arydshln before bidi package, and then try to run xelatex on your document again}{}]{arydshln}
- \fi%
- \if@bidi@multicolloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package multicol after bidi package. Please load package multicol before bidi package, and then try to run xelatex on your document again}{}]{multicol}
- \fi%
- \if@bidi@multienumloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package multienum after bidi package. Please load package multienum before bidi package, and then try to run xelatex on your document again}{}]{multienum}
- \fi%
- \if@bidi@minitocloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package minitoc after bidi package. Please load package minitoc before bidi package, and then try to run xelatex on your document again}{}]{minitoc}
- \fi%
- \if@bidi@natbibloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package natbib after bidi package. Please load package natbib before bidi package, and then try to run xelatex on your document again}{}]{natbib}
- \fi%
- \if@bidi@newfloatloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package newfloat after bidi package. Please load package newfloat before bidi package, and then try to run xelatex on your document again}{}]{newfloat}
- \fi%
- \csname if@bidi@ragged2eloaded@\endcsname\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package ragged2e after bidi package. Please load package ragged2e before bidi package, and then try to run xelatex on your document again}{}]{ragged2e}
- \fi%
- \if@bidi@rotatingloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package rotating after bidi package. Please load package rotating before bidi package, and then try to run xelatex on your document again}{}]{rotating}
- \fi%
- \if@bidi@tablsloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tabls after bidi package. Please load package tabls before bidi package, and then try to run xelatex on your document again}{}]{tabls}
- \fi%
- \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%
- \if@bidi@tocbibindloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tocbibind after bidi package. Please load package tocbibind before bidi package, and then try to run xelatex on your document again}{}]{tocbibind}
- \fi%
- \if@bidi@fontspecloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fontspec after bidi package. Please load package fontspec before bidi package, and then try to run xelatex on your document again}{}]{fontspec}
- \fi%
- \if@bidi@arabxetexloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package arabxetex after bidi package. Please load package arabxetex before bidi package, and then try to run xelatex on your document again}{}]{arabxetex}
- \fi%
- \if@bidi@polyglossialoaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package polyglossia after bidi package. Please load package polyglossia before bidi package, and then try to run xelatex on your document again}{}]{polyglossia}
- \fi%
- \if@bidi@fancyvrbloaded@\else
- \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package fancyvrb after bidi package. Please load package fancyvrb before bidi package, and then try to run xelatex on your document again}{}]{fancyvrb}
- \fi%
-}
-\endinput
-%%
-%% End of file `loadingorder-xetex-bidi.def'.
diff --git a/Master/texmf-dist/tex/xelatex/bidi/longtable-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/longtable-xetex-bidi.def
index 55dd279fb71..4ad3fb0976c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/longtable-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/longtable-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{longtable-xetex-bidi.def}[2022/05/20 v0.6 bidi adaptations for longtable package for XeTeX engine]
+\ProvidesFile{longtable-xetex-bidi.def}[2025/01/03 v0.7 bidi adaptations for longtable package for XeTeX engine]
\def\LT@array[#1]#2{%
\refstepcounter{table}\stepcounter{LT@tables}%
\if l#1%
@@ -101,7 +101,7 @@
\fi
\endgraf\vskip\baselineskip}%
\hss}}}
-\@ifpackageloaded{caption}{%
+\ApplyPatchCodeToPackage{caption}{%
\renewcommand\LT@makecaption[3]{%
\caption@LT@make{%
\caption@LT@settype\LTcaptype
@@ -118,7 +118,7 @@
\caption@@make{#2}{#3}\endgraf
\caption@make@below
\caption@end}}%
-}{}
+}
\def\LT@startpbox#1{%
\bgroup\color@begingroup
\let\@footnotetext\LT@p@ftntext
diff --git a/Master/texmf-dist/tex/xelatex/bidi/lscape-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/lscape-xetex-bidi.def
index 15f0dcd024c..4e132275a3e 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/lscape-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/lscape-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,8 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{lscape-xetex-bidi.def}[2022/07/14 v0.2 bidi adaptations for lscape package for XeTeX engine]
+\ProvidesFile{lscape-xetex-bidi.def}[2025/01/03 v0.3 bidi adaptations for lscape package for XeTeX engine]
+\RequirePackage{graphicx}
\bidi@patchcmd{\LS@rot}{\rotatebox{90}{\box\@outputbox}}{%
\if@RTL
\rotatebox[origin=br]{-90}{\box\@outputbox}%
diff --git a/Master/texmf-dist/tex/xelatex/bidi/mathtools-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/mathtools-xetex-bidi.def
index 86606b94df1..df92f7f2ee7 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/mathtools-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/mathtools-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,8 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{mathtools-xetex-bidi.def}[2018/01/07 v0.1 bidi adaptations for mathtools package for XeTeX engine]
+\ProvidesFile{mathtools-xetex-bidi.def}[2025/01/03 v0.2 bidi adaptations for mathtools package for XeTeX engine]
+\RequirePackage{graphicx}
\MHInternalSyntaxOn
\def\MT_define_tagform:nwnn #1[#2]#3#4{
\@namedef{MT_tagform_#1:n}##1
diff --git a/Master/texmf-dist/tex/xelatex/bidi/mdframed-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/mdframed-xetex-bidi.def
index e8608f8f5e3..83f4f8df101 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/mdframed-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/mdframed-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/media9-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/media9-xetex-bidi.def
new file mode 100644
index 00000000000..60d4a7f3349
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/bidi/media9-xetex-bidi.def
@@ -0,0 +1,44 @@
+%%
+%% This is file `media9-xetex-bidi.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bidi.dtx (with options: `table,media9-xetex-bidi.def')
+%%
+%% __________________________________________________
+%% Vafa Khalighi
+%%
+%% Copyright (c) 2007--2025 Vafa Khalighi
+%% Copyright (c) 2018--2020 bidi-tex GitHub Organization
+%%
+%% It may be distributed and/or modified under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is “author-maintained” (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%% \CheckSum{57381}
+%% \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
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%%
+\ProvidesFile{media9-xetex-bidi.def}[2025/01/03 v0.1 bidi adaptations for media9 package for XeTeX engine]
+\RequirePackage{bidi-media9}
+\endinput
+%%
+%% End of file `media9-xetex-bidi.def'.
diff --git a/Master/texmf-dist/tex/xelatex/bidi/memoir-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/memoir-xetex-bidi.def
index a0349a0bed8..827acdd6b29 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/memoir-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/memoir-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{memoir-xetex-bidi.def}[2017/06/09 v0.6 bidi adaptations for memoir class for XeTeX engine]
+\ProvidesFile{memoir-xetex-bidi.def}[2025/01/03 v0.7 bidi adaptations for memoir class for XeTeX engine]
\renewcommand{\keepthetitle}{%
\@bsmtitlempty
\global\let\thanks\relax
@@ -147,7 +147,7 @@
} % end of the \parbox
\fi
\vskip\belowcaptionskip}
-\@ifpackageloaded{caption}{%
+\ApplyPatchCodeToPackage{caption}{%
\AtBeginPackage{caption}{
\ClassWarningNoLine{memoir}{%
You are using the caption package with the memoir \MessageBreak
@@ -188,7 +188,7 @@
\normalsize
\@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par
\endgroup}
-}}{}
+}}
\renewenvironment{thebibliography}[1]{%
\bibsection
\if@RTL\if@LTRbibitems\@RTLfalse\else\fi\else\if@RTLbibitems\@RTLtrue\else\fi\fi
diff --git a/Master/texmf-dist/tex/xelatex/bidi/midfloat-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/midfloat-xetex-bidi.def
index 843ae2c4543..a6fa071f878 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/midfloat-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/midfloat-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/minitoc-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/minitoc-xetex-bidi.def
index 77db25b7a37..2254560dbc1 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/minitoc-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/minitoc-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/multicol-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/multicol-xetex-bidi.def
index 8499c5f1c6e..0b58b91e925 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/multicol-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/multicol-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/multienum-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/multienum-xetex-bidi.def
index d2ce75fa7c9..760e5a604ae 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/multienum-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/multienum-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/natbib-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/natbib-xetex-bidi.def
index f4b251fa859..cf063fc94f8 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/natbib-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/natbib-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/newfloat-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/newfloat-xetex-bidi.def
index 501eed5a627..b4db7ba1a24 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/newfloat-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/newfloat-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/nicematrix-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/nicematrix-xetex-bidi.def
index c0760d4034f..604258a4fcc 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/nicematrix-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/nicematrix-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/ntheorem-hyper-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/ntheorem-hyper-xetex-bidi.def
index 847294740a2..73d24630bfa 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/ntheorem-hyper-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/ntheorem-hyper-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/ntheorem-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/ntheorem-xetex-bidi.def
index f937daab8f5..c62b1a2fe52 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/ntheorem-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/ntheorem-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/overpic-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/overpic-xetex-bidi.def
index a24b797f842..b7955b1d6a7 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/overpic-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/overpic-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/pdfbase-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/pdfbase-xetex-bidi.def
index 402b1504368..d3b372c787d 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/pdfbase-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/pdfbase-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def
index 1ed1f56ed46..027f2ee4d9f 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/pdfpages-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/pdfpages-xetex-bidi.def
index 462d44c6b9f..c51b8a3d1f4 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/pdfpages-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/pdfpages-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/pgfcorescopes.code-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/pgfcorescopes.code-xetex-bidi.def
index 96716a74547..7562052f596 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/pgfcorescopes.code-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/pgfcorescopes.code-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/pgfsys.code-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/pgfsys.code-xetex-bidi.def
index 36c314198fd..eaaddd055a6 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/pgfsys.code-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/pgfsys.code-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/picinpar-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/picinpar-xetex-bidi.def
index 165c24c7c9e..253ce6f35a3 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/picinpar-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/picinpar-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def
index 6bfe47883a7..b1f778fad61 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/pstricks-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/pstricks-xetex-bidi.def
index dd9fbd2f9bf..a73a33433a4 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/pstricks-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/pstricks-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/quotchap-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/quotchap-xetex-bidi.def
index d8402ed83fa..cd867e3791a 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/quotchap-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/quotchap-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/ragged2e-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/ragged2e-xetex-bidi.def
index b9de9c8ccc1..ed808e67563 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/ragged2e-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/ragged2e-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/rapport1-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/rapport1-xetex-bidi.def
index 3dba87edf57..5503ac7c272 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/rapport1-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/rapport1-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/rapport3-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/rapport3-xetex-bidi.def
index aa8d0bcb052..7501b08f196 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/rapport3-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/rapport3-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/refrep-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/refrep-xetex-bidi.def
index 37b78a47fdb..405c924c207 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/refrep-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/refrep-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/report-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/report-xetex-bidi.def
index 08003c18368..17821924c96 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/report-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/report-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/rotating-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/rotating-xetex-bidi.def
index 51f9bb747e8..12672e9fdf7 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/rotating-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/rotating-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def
index 2c8f7ef5c59..94ccc020b7f 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/scrbook-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/scrbook-xetex-bidi.def
index 5150f049a6d..d5c25b552f4 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/scrbook-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/scrbook-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/scrreprt-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/scrreprt-xetex-bidi.def
index 675fb226bee..f4432a7710a 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/scrreprt-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/scrreprt-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/sidecap-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/sidecap-xetex-bidi.def
index 454ade19518..80dfb533d1c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/sidecap-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/sidecap-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,13 +37,39 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{sidecap-xetex-bidi.def}[2010/08/01 v0.1 bidi adaptations for sidecap package for XeTeX engine]
+\ProvidesFile{sidecap-xetex-bidi.def}[2025/01/03 v0.2 bidi adaptations for sidecap package for XeTeX engine]
+\RequirePackage{ragged2e}
\renewcommand*{\SC@FLOAT}[2]{\if@RTL%
\isSC@ODD{{#1}\hspace{\sidecaptionsep}{#2}} {{#2}\hspace{\sidecaptionsep}{#1}}\else%
\isSC@ODD{{#2}\hspace{\sidecaptionsep}{#1}} {{#1}\hspace{\sidecaptionsep}{#2}}\fi}
\renewcommand*\SC@justify@caption{\if@RTL%
\isSC@ODD{\RaggedLeft}{\RaggedRight}\else%
\isSC@ODD{\RaggedRight}{\RaggedLeft}\fi}
+
+\@ifpackagewith{sidecap}{innercaption}{%
+\if@RTL \renewcommand*{\SC@FLOAT}[2]{%
+ \isSC@ODD{{#2}\hspace{\sidecaptionsep}{#1}} {{#1}\hspace{\sidecaptionsep}{#2}}}
+ \renewcommand*\SC@justify@caption{%
+ \isSC@ODD{\RaggedRight}{\RaggedLeft}}\else
+ \renewcommand*{\SC@FLOAT}[2]{%
+ \isSC@ODD{{#1}\hspace{\sidecaptionsep}{#2}} {{#2}\hspace{\sidecaptionsep}{#1}}}
+ \renewcommand*\SC@justify@caption{%
+ \isSC@ODD{\RaggedLeft}{\RaggedRight}}\fi
+}{}
+
+\@ifpackagewith{sidecap}{rightcaption}{%
+ \if@RTL\renewcommand*{\SC@FLOAT}[2]{{#1}\hspace{\sidecaptionsep}{#2}}
+ \def\SC@justify@caption{\RaggedLeft}\else%
+ \renewcommand*{\SC@FLOAT}[2]{{#2}\hspace{\sidecaptionsep}{#1}}
+ \def\SC@justify@caption{\RaggedRight}\fi%
+}{}
+
+\@ifpackagewith{sidecap}{leftcaption}{%
+\if@RTL \renewcommand*{\SC@FLOAT}[2]{{#2}\hspace{\sidecaptionsep}{#1}}
+ \def\SC@justify@caption{\RaggedRight}\else%
+ \renewcommand*{\SC@FLOAT}[2]{{#1}\hspace{\sidecaptionsep}{#2}}
+ \def\SC@justify@caption{\RaggedLeft}\fi%
+}{}
\endinput
%%
%% End of file `sidecap-xetex-bidi.def'.
diff --git a/Master/texmf-dist/tex/xelatex/bidi/soul-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/soul-xetex-bidi.def
index 018ff9531ea..41c1d2d6c2e 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/soul-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/soul-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/stabular-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/stabular-xetex-bidi.def
index 1305ab6363f..46354000b78 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/stabular-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/stabular-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/subfigure-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/subfigure-xetex-bidi.def
index 27cc4e1869d..3b60c608832 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/subfigure-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/subfigure-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/tabls-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tabls-xetex-bidi.def
index b0683c01eb2..18aa9e51728 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/tabls-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/tabls-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/tabularx-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tabularx-xetex-bidi.def
index 3386830a0f3..7d421dfbf2e 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/tabularx-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/tabularx-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/tabulary-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tabulary-xetex-bidi.def
index de6e711a959..f9c8ad7636b 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/tabulary-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/tabulary-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/tc-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tc-xetex-bidi.def
index d3c38951b31..0ca59fa0985 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/tc-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/tc-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/tcolorbox-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tcolorbox-xetex-bidi.def
index 9a1fad14a2a..0aba4497d07 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/tcolorbox-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/tcolorbox-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/titlesec-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/titlesec-xetex-bidi.def
index 0c143e984b6..13cddb80351 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/titlesec-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/titlesec-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/titletoc-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/titletoc-xetex-bidi.def
index 72469e89405..ff3df16a847 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/titletoc-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/titletoc-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def
index b3a54424959..648655d53b5 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/tocbibind-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tocbibind-xetex-bidi.def
index 36f5c856d7d..beb54709732 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/tocbibind-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/tocbibind-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,9 +37,10 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{tocbibind-xetex-bidi.def}[2017/06/09 v0.4 bidi adaptations for tocbibind package for XeTeX engine]
+\ProvidesFile{tocbibind-xetex-bidi.def}[2025/01/03 v0.5 bidi adaptations for tocbibind package for XeTeX engine]
+\IfClassLoadedT{memoir}{\endinput}
\if@dotocbib
- \@ifpackageloaded{natbib}{}{% natbib not loaded
+ \ApplyPatchIfPackageLoadedF{natbib}{% natbib not loaded
\renewcommand{\bibsection}{\t@cb@bchapsec}
\renewenvironment{thebibliography}[1]{%
\bibsection
@@ -64,9 +65,11 @@
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
+\ApplyPatchCodeToPackage{chapterbib}{%
\@ifpackagewith{chapterbib}{sectionbib}%
{\renewcommand{\sectionbib}[2]{}}%
- {}
+ {}%
+ }
\fi
\if@inltxdoc\else
diff --git a/Master/texmf-dist/tex/xelatex/bidi/tocloft-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tocloft-xetex-bidi.def
index b33c7f86014..83a4b99f3a3 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/tocloft-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/tocloft-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
@@ -37,7 +37,8 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{tocloft-xetex-bidi.def}[2023/08/02 v0.3 bidi adaptations for tocloft package for XeTeX engine]
+\ProvidesFile{tocloft-xetex-bidi.def}[2025/01/03 v0.4 bidi adaptations for tocloft package for XeTeX engine]
+\IfClassLoadedT{memoir}{\endinput}
\renewcommand{\cftpnumalign}{\if@RTL l\else r\fi}
\let\cftdot\@SepMark
\if@cfthaspart
diff --git a/Master/texmf-dist/tex/xelatex/bidi/tocstyle-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tocstyle-xetex-bidi.def
index 3da0ac9cf28..7f512d65e1c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/tocstyle-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/tocstyle-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def
index 61835d15456..82b13c12ea6 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/wrapfig-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/wrapfig-xetex-bidi.def
index fedbc166545..7854391432a 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/wrapfig-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/wrapfig-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/xcolor-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/xcolor-xetex-bidi.def
index a5186af494f..f9deb72c44e 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/xcolor-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/xcolor-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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
diff --git a/Master/texmf-dist/tex/xelatex/bidi/xltxtra-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/xltxtra-xetex-bidi.def
index 9730ab8b86f..7bd4c00622c 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/xltxtra-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/xltxtra-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{58641}
+%% \CheckSum{57381}
%% \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