texlive[63370] Master/texmf-dist: bidi (22may22)

commits+karl at tug.org commits+karl at tug.org
Sun May 22 22:24:55 CEST 2022


Revision: 63370
          http://tug.org/svn/texlive?view=revision&revision=63370
Author:   karl
Date:     2022-05-22 22:24:55 +0200 (Sun, 22 May 2022)
Log Message:
-----------
bidi (22may22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/xelatex/bidi/README
    trunk/Master/texmf-dist/doc/xelatex/bidi/bidi-doc.pdf
    trunk/Master/texmf-dist/doc/xelatex/bidi/bidi.pdf
    trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx
    trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx
    trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx
    trunk/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
    trunk/Master/texmf-dist/source/xelatex/bidi/bidi.ins
    trunk/Master/texmf-dist/tex/xelatex/bidi/adjmulticol-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/algorithm2e-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/amsart-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/amsbook-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/amsmath-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/amstext-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/amsthm-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/array-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/article-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/artikel1-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/artikel2-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/artikel3-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/arydshln-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidi-media9.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidi-perpage.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidi.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidi.tex
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/biditools.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/biditufte-book.cls
    trunk/Master/texmf-dist/tex/xelatex/bidi/biditufte-handout.cls
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftegeneralstructure.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftesidenote.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftetitle.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftetoc.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/boek-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/boek3-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/book-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/bookest-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/breqn-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/cals-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/caption-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/caption3-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/color-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/colortbl-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/combine-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/crop-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/cutwin-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty
    trunk/Master/texmf-dist/tex/xelatex/bidi/dblfnote-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/diagbox-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/empheq-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/eso-pic-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/extarticle-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/extbook-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/extletter-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/extreport-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/fancybox-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/fix2col-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/fleqn-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/float-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/floatrow-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/footnote-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/footnotebackref-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/framed-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/ftnright-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/geometry-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/graphicx-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/hvfloat-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/imsproc-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/leqno-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/letter-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/lettrine-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/lineno-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/loadingorder-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/longtable-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/lscape-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/mathtools-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/mdframed-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/memoir-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/midfloat-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/minitoc-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/multicol-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/multienum-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/natbib-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/newfloat-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/ntheorem-hyper-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/ntheorem-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/overpic-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/pdfbase-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/pdfpages-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/pgfcorescopes.code-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/picinpar-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/pstricks-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/quotchap-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/ragged2e-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/rapport1-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/rapport3-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/refrep-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/report-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/rotating-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/scrbook-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/scrreprt-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/sidecap-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/soul-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/stabular-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/subfigure-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/tabls-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/tabularx-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/tabulary-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/tc-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/tcolorbox-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/titlesec-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/titletoc-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/tocbibind-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/tocloft-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/tocstyle-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/wrapfig-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/xcolor-xetex-bidi.def
    trunk/Master/texmf-dist/tex/xelatex/bidi/xltxtra-xetex-bidi.def

Removed Paths:
-------------
    trunk/Master/texmf-dist/tex/xelatex/bidi/scrlettr-xetex-bidi.def

Modified: trunk/Master/texmf-dist/doc/xelatex/bidi/README
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/bidi/README	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/doc/xelatex/bidi/README	2022-05-22 20:24:55 UTC (rev 63370)
@@ -1,6 +1,6 @@
 ___________________
 The bidi package
-v36.8
+v36.9
 
 This package provides a convenient interface for typesetting
 bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -25,7 +25,7 @@
 also appear in the Discussions space under the Announcements
 category.
 
-Current version release date: 2022/05/20
+Current version release date: 2022/05/22
 
 ___________________________________________
 Vafa Khalighi

Modified: trunk/Master/texmf-dist/doc/xelatex/bidi/bidi-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/xelatex/bidi/bidi.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 * Copyright (c) 2007--2022 Vafa Khalighi
 * Copyright (c) 2018--2020 bidi-tex GitHub Organization
 * 
-* v36.8, 2022/05/20
+* v36.9, 2022/05/22
 * 
 * License: LaTeX Project Public License, version
 * 1.3c or higher (your choice)

Modified: trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx	2022-05-22 20:24:55 UTC (rev 63370)
@@ -3,7 +3,7 @@
 \begin{document}
 \title{\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}\\
 \LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt]
-\large User documentation for \textcolor{blue!65!black}{version 36.8}}
+\large User documentation for \textcolor{blue!65!black}{version 36.9}}
 \author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the  {\LaTeX} team to maintain the package in the period 2018--2020.}}
 \setcounter{page}{0}
 \thispagestyle{empty}
@@ -13,7 +13,7 @@
 \textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}
 
 \Large
-User documentation for \textcolor{blue!65!black}{version 36.8}}
+User documentation for \textcolor{blue!65!black}{version 36.9}}
 
 \vskip 0pt plus 3fill
 \textit{\large to my Master, \textbf{Ferdowsi The Great}}

Modified: trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx	2022-05-22 20:24:55 UTC (rev 63370)
@@ -1,7 +1,7 @@
 \documentclass{ltxdoc}
 \input{bidi-doc-preamble.ltx}
 \hypersetup{%
-  pdftitle={User documentation for version 36.8 of the bidi
+  pdftitle={User documentation for version 36.9 of the bidi
                 package}%
 }
 \begin{document}

Modified: trunk/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/bidi/bidi.dtx	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/source/xelatex/bidi/bidi.dtx	2022-05-22 20:24:55 UTC (rev 63370)
@@ -5,7 +5,7 @@
 %<*readme>
 ___________________
 The bidi package
-v36.8
+v36.9
 
 This package provides a convenient interface for typesetting
 bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -30,7 +30,7 @@
 also appear in the Discussions space under the Announcements
 category.
   
-Current version release date: 2022/05/20
+Current version release date: 2022/05/22
 
 ___________________________________________
 Vafa Khalighi
@@ -179,7 +179,6 @@
 \generate{\file{rotating-xetex-bidi.def}{\from{\jobname.dtx}{table,rotating-xetex-bidi.def}}}
 \generate{\file{scrartcl-xetex-bidi.def}{\from{\jobname.dtx}{table,scrartcl-xetex-bidi.def}}}
 \generate{\file{scrbook-xetex-bidi.def}{\from{\jobname.dtx}{table,scrbook-xetex-bidi.def}}}
-\generate{\file{scrlettr-xetex-bidi.def}{\from{\jobname.dtx}{table,scrlettr-xetex-bidi.def}}}
 \generate{\file{scrreprt-xetex-bidi.def}{\from{\jobname.dtx}{table,scrreprt-xetex-bidi.def}}}
 \generate{\file{sidecap-xetex-bidi.def}{\from{\jobname.dtx}{table,sidecap-xetex-bidi.def}}}
 \generate{\file{soul-xetex-bidi.def}{\from{\jobname.dtx}{table,soul-xetex-bidi.def}}}
@@ -235,7 +234,7 @@
 \documentclass{ltxdoc}
 \input{bidi-doc-preamble.ltx}
 \hypersetup{%
-  pdftitle={Source documentation for version 36.8 of the bidi
+  pdftitle={Source documentation for version 36.9 of the bidi
                 package}%
 }
 \EnableCrossrefs
@@ -254,7 +253,7 @@
 % \GetFileInfo{\jobname.dtx}
 % \title{\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}\\
 %\LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt]
-%\large Source documentation for \textcolor{blue!65!black}{version 36.8}}
+%\large Source documentation for \textcolor{blue!65!black}{version 36.9}}
 % \author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the  {\LaTeX} team to maintain the package in the period 2018--2020.}}
 %\setcounter{page}{0}
 %\thispagestyle{empty}
@@ -264,7 +263,7 @@
 %\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}
 %
 %\Large
-%Source documentation for \textcolor{blue!65!black}{version 36.8}}
+%Source documentation for \textcolor{blue!65!black}{version 36.9}}
 %
 %\vskip 0pt plus 3fill
 %\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -313,7 +312,7 @@
 %\iffalse
 %<*table>
 %\fi
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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
@@ -1933,8 +1932,8 @@
 % \section{File \texttt{bidi.sty}}
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
-\def\bididate{2022/05/20}
-\def\bidi at version{36.8}
+\def\bididate{2022/05/22}
+\def\bidi at version{36.9}
 \ProvidesPackage{bidi}[\bididate\space v\bidi at version\space
 Bidirectional typesetting in plain TeX and LaTeX]
 \edef\@bidi at info{****************************************************^^J%
@@ -2022,7 +2021,7 @@
 }
 \newcommand*{\@bidi at pdfcustomproperties}{%
   This is the bidi package, Version \bidi at version,
-  Released May 20, 2022. 
+  Released May 22, 2022. 
 }
 \@RTLmainfalse
 \AtBeginDocument{%
@@ -2265,9 +2264,9 @@
 %\fi
 % \section{File \texttt{bidi.tex}}
 %    \begin{macrocode}
-\def\bididate{2022/05/20}
+\def\bididate{2022/05/22}
 \catcode`@=11
-\def\bidi at version{36.8}
+\def\bidi at version{36.9}
 \let \protect \relax
 \newlinechar`\^^J
 \edef\@bidi at info{****************************************************^^J%
@@ -2369,7 +2368,7 @@
 }
 \def\@bidi at pdfcustomproperties{%
   This is the bidi package, Version \bidi at version,
-  Released May 20, 2022. 
+  Released May 22, 2022. 
 }
 \def\bidi at pdfm@mark{%
   \special{pdf:%
@@ -18286,7 +18285,7 @@
 %\fi
 % \section{File \texttt{scrartcl-xetex-bidi.def}}
 %    \begin{macrocode}
-\ProvidesFile{scrartcl-xetex-bidi.def}[2017/06/09 v1.1 bidi adaptations for scrartcl class for XeTeX engine]
+\ProvidesFile{scrartcl-xetex-bidi.def}[2022/05/22 v1.2 bidi adaptations for scrartcl class for XeTeX engine]
 \newcommand{\scr at saved@LTRfootnotetext}{}
 \newcommand{\scr at saved@RTLfootnotetext}{}
 \let\scr at saved@footnotetext\@footnotetext
@@ -18305,28 +18304,68 @@
   \csname FN at mf@prepare\endcsname
 }
 \renewcommand\deffootnote[4][]{%
-  \long\def\@makefntext##1{%
-    \setlength{\@tempdimc}{#3}%
-    \def\@tempa{#1}\ifx\@tempa\@empty
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#2}%
-        \if at RTL\parshape \@ne 0pt \@tempdima\else\parshape \@ne #2 \@tempdima\fi}%
-    \else
-      \addtolength{\@tempdimc}{#2}%
-      \addtolength{\@tempdimc}{-#1}%
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#1}%
-        \@tempdimb = \hsize
-        \addtolength{\@tempdimb}{-#2}%
-        \if at RTL\parshape \tw@ 0pt \@tempdima 0pt \@tempdimb\else\parshape \tw@ #1 \@tempdima #2 \@tempdimb\fi
+  \expandafter\ifnum\scr at v@is at ge{3.22}\relax
+    \long\def\@makefntext##1{%
+      \ExecuteDoHook{footnote/text/begin}%
+      \raggedfootnote
+      \if at RTL
+        \rightskip
+      \else
+        \leftskip 
+      \fi 
+      #2
+      \l at addto@macro\@trivlist{%
+        \ifnum\@listdepth=\@ne
+          \if at RTL
+            \advance\rightmargin #2\relax
+          \else
+            \advance\leftmargin #2\relax
+          \fi
+        \fi
       }%
-    \fi
-    \par
-    \parindent\@tempdimc\noindent
-    \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
-  }%
+      \parindent #3\noindent
+      \IfArgIsEmpty{#1}{}{%
+        \hskip \dimexpr #1-#2\relax
+      }%
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+      \ExecuteDoHook{footnote/text/end}%
+    }%
+  \else
+    \ClassInfo{\KOMAClassName}{%
+      Using old \string\@makefntext\space due to compatibility
+      level\MessageBreak
+      less than 3.22}%
+    \long\def\@makefntext##1{%
+      \setlength{\@tempdimc}{#3}%
+      \def\@tempa{#1}\ifx\@tempa\@empty
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#2}%
+          \if at RTL
+            \parshape \@ne \z@ \@tempdima
+          \else
+            \parshape \@ne #2 \@tempdima
+          \fi}%
+      \else
+        \addtolength{\@tempdimc}{#2}%
+        \addtolength{\@tempdimc}{-#1}%
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#1}%
+          \@tempdimb = \hsize
+          \addtolength{\@tempdimb}{-#2}%
+           \if at RTL
+             \parshape \tw@ \z@ \@tempdima \z@ \@tempdimb
+           \else
+             \parshape \tw@ #1 \@tempdima #2 \@tempdimb
+           \fi
+        }%
+      \fi
+      \par
+      \parindent\@tempdimc\noindent
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+    }%
+  \fi
   \def\@@makefnmark{\hbox{\ftnm at font{#4}}}%
 }
 \deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
@@ -18345,11 +18384,48 @@
       \hbox to \columnwidth{\hskip \dimexpr\columnwidth-\ftn at rule@width\relax  \leavevmode\leaders\hrule\@height\ftn at rule@height\hfill\kern\z@}}}%
   \kern 2.6\p@} 
 \renewcommand*\maketitle[1][1]{%
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+  \else
+    \def\and{%
+      \end{tabular}%
+      \hskip 1em \@plus.17fil%
+      \begin{tabular}[t]{c}%
+    }%
+  \fi
   \if at titlepage
     \begin{titlepage}
       \setcounter{page}{%
         #1%
       }%
+      \if at titlepageiscoverpage
+        \edef\titlepage at restore{%
+          \noexpand\endgroup
+          \noexpand\global\noexpand\@colht\the\@colht
+          \noexpand\global\noexpand\@colroom\the\@colroom
+          \noexpand\global\vsize\the\vsize
+          \noexpand\global\noexpand\@titlepageiscoverpagefalse
+          \noexpand\let\noexpand\titlepage at restore\noexpand\relax
+        }%
+        \begingroup
+        \topmargin=\dimexpr \coverpagetopmargin-1in\relax
+        \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \textwidth=\dimexpr
+        \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax
+        \textheight=\dimexpr
+        \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax
+        \headheight=0pt
+        \headsep=0pt
+        \footskip=\baselineskip
+        \@colht=\textheight
+        \@colroom=\textheight
+        \vsize=\textheight
+        \columnwidth=\textwidth
+        \hsize=\columnwidth
+        \linewidth=\hsize
+      \else
+        \let\titlepage at restore\relax
+      \fi
       \let\footnotesize\small
       \let\right at footnoterule\relax
       \let\left at footnoterule\relax
@@ -18360,54 +18436,97 @@
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
       \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
-      \ifx\@extratitle\@empty \else
-        \noindent\@extratitle\next at tpage\cleardoubleemptypage
-        \thispagestyle{empty}%
+      \ifx\@extratitle\@empty
+        \ifx\@frontispiece\@empty
+        \else
+          \if at twoside\mbox{}\next at tpage\fi
+          \noindent\@frontispiece\next at tdpage
+        \fi
+      \else
+        \noindent\@extratitle
+        \ifx\@frontispiece\@empty
+        \else
+          \next at tpage
+          \noindent\@frontispiece
+        \fi
+        \next at tdpage
       \fi
       \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
       \ifx\@titlehead\@empty \else
         \begin{minipage}[t]{\textwidth}%
-        \@titlehead
+          \usekomafont{titlehead}{\@titlehead\par}%
         \end{minipage}\par
       \fi
       \null\vfill
       \begin{center}
         \ifx\@subject\@empty \else
-          {\subject at font \@subject \par}%
+          {\usekomafont{subject}{\@subject\par}}%
           \vskip 3em
         \fi
-        {\titlefont\huge \@title\par}%
+        {\usekomafont{title}{\huge \@title\par}}%
         \vskip 1em
-        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
+        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}%
         \vskip 2em
-        {\Large \lineskip 0.75em
-          \begin{tabular}[t]{c}
-            \@author
-          \end{tabular}\par
+        {%
+          \usekomafont{author}{%
+            \lineskip 0.75em
+            \begin{tabular}[t]{c}
+              \@author
+            \end{tabular}\par
+          }%
         }%
         \vskip 1.5em
-        {\Large \@date \par}%
+        {\usekomafont{date}{\@date \par}}%
         \vskip \z@ \@plus3fill
-        {\Large \@publishers \par}%
+        {\usekomafont{publishers}{\@publishers \par}}%
         \vskip 3em
       \end{center}\par
-      \@thanks
+      \@thanks\global\let\@thanks\@empty
       \vfill\null
-      \if at twoside\next at tpage
-        \begin{minipage}[t]{\textwidth}
-          \@uppertitleback
-        \end{minipage}\par
-        \vfill
-        \begin{minipage}[b]{\textwidth}
-          \@lowertitleback
-        \end{minipage}
+      \if at twoside
+        \@tempswatrue
+        \expandafter\ifnum \@nameuse{scr at v@3.12}>\scr at compatibility\relax
+        \else
+          \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty
+            \@tempswafalse
+          \fi\fi
+        \fi
+        \if at tempswa
+          \next at tpage
+          \begin{minipage}[t]{\textwidth}
+            \@uppertitleback
+          \end{minipage}\par
+          \vfill
+          \begin{minipage}[b]{\textwidth}
+            \@lowertitleback
+          \end{minipage}\par
+          \@thanks\global\let\@thanks\@empty
+        \fi
+      \else
+        \ifx\@uppertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\uppertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
+        \ifx\@lowertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\lowertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
       \fi
-      \ifx\@dedication\@empty \else
-        \next at tpage\null\vfill
-        {\centering \Large \@dedication \par}%
+      \ifx\@dedication\@empty
+      \else
+        \next at tdpage\null\vfill
+        {\centering\usekomafont{dedication}{\@dedication \par}}%
         \vskip \z@ \@plus3fill
-        \if at twoside \next at tpage\cleardoubleemptypage \fi
+        \@thanks\global\let\@thanks\@empty
+        \cleardoubleemptypage
       \fi
+      \ifx\titlepage at restore\relax\else\clearpage\titlepage at restore\fi
     \end{titlepage}
   \else
     \par
@@ -18415,102 +18534,112 @@
     #1%
     \relax\ifnum\@tempcnta=1\else
       \ClassWarning{\KOMAClassName}{%
-        Optional argument of \string\maketitle\space ignored
-        at\MessageBreak
-        notitlepage-mode%
+        Optional argument of \string\maketitle\space ignored\MessageBreak
+        in `titlepage=false' mode%
       }%
     \fi
+    \ifx\@uppertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\uppertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
+    \ifx\@lowertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\lowertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
     \begingroup
+      \let\titlepage at restore\relax
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
-      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}
+      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
+      \next at tdpage
       \if at twocolumn
         \ifnum \col at number=\@ne
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \@makeextratitle
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \@makefrontispiece
+            \next at tdpage
+          \fi
           \@maketitle
         \else
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \twocolumn[\@makeextratitle]%
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \twocolumn[\@makefrontispiece]%
+            \next at tdpage
+          \fi
           \twocolumn[\@maketitle]%
         \fi
       \else
-        \newpage
-        \global\@topnum\z@
+        \ifx\@extratitle\@empty
+          \ifx\@frontispiece\@empty\else \mbox{}\fi
+        \else
+          \@makeextratitle
+        \fi
+        \ifx\@frontispiece\@empty
+          \ifx\@extratitle\@empty\else\next at tdpage\fi
+        \else
+          \next at tpage
+          \@makefrontispiece
+          \next at tdpage
+        \fi
         \@maketitle
       \fi
-      \thispagestyle{\titlepagestyle}\@thanks
+      \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi
+      \@thanks\global\let\@thanks\@empty
     \endgroup
   \fi
   \setcounter{footnote}{0}%
-  \let\thanks\relax
-  \let\LTRthanks\relax
-  \let\RTLthanks\relax
-  \let\maketitle\relax
-  \let\@maketitle\relax
-  \global\let\@thanks\@empty
-  \global\let\@author\@empty
-  \global\let\@date\@empty
-  \global\let\@title\@empty
-  \global\let\@subtitle\@empty
-  \global\let\@extratitle\@empty
-  \global\let\@titlehead\@empty
-  \global\let\@subject\@empty
-  \global\let\@publishers\@empty
-  \global\let\@uppertitleback\@empty
-  \global\let\@lowertitleback\@empty
-  \global\let\@dedication\@empty
-  \global\let\author\relax
-  \global\let\title\relax
-  \global\let\extratitle\relax
-  \global\let\titlehead\relax
-  \global\let\subject\relax
-  \global\let\publishers\relax
-  \global\let\uppertitleback\relax
-  \global\let\lowertitleback\relax
-  \global\let\dedication\relax
-  \global\let\date\relax
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+    \let\thanks\relax
+    \let\LTRthanks\relax
+    \let\RTLthanks\relax
+    \let\maketitle\relax
+    \let\@maketitle\relax
+    \global\let\@thanks\@empty
+    \global\let\@author\@empty
+    \global\let\@date\@empty
+    \global\let\@title\@empty
+    \global\let\@subtitle\@empty
+    \global\let\@extratitle\@empty
+    \global\let\@frontispiece\@empty
+    \global\let\@titlehead\@empty
+    \global\let\@subject\@empty
+    \global\let\@publishers\@empty
+    \global\let\@uppertitleback\@empty
+    \global\let\@lowertitleback\@empty
+    \global\let\@dedication\@empty
+    \global\let\author\relax
+    \global\let\title\relax
+    \global\let\extratitle\relax
+    \global\let\titlehead\relax
+    \global\let\subject\relax
+    \global\let\publishers\relax
+    \global\let\uppertitleback\relax
+    \global\let\lowertitleback\relax
+    \global\let\dedication\relax
+    \global\let\date\relax
+  \fi
   \global\let\and\relax
 }%
-\renewcommand*{\@maketitle}{%
-  \clearpage
-  \let\footnote\thanks
-  \let\LTRfootnote\LTRthanks
-  \let\RTLfootnote\RTLthanks
-  \ifx\@extratitle\@empty \else
-    \noindent\@extratitle \next at tpage \if at twoside \null\next at tpage \fi
-  \fi
-  \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
-  \ifx\@titlehead\@empty \else
-    \begin{minipage}[t]{\textwidth}
-      \@titlehead
-    \end{minipage}\par
-  \fi
-  \null
-  \vskip 2em%
-  \begin{center}%
-    \ifx\@subject\@empty \else
-      {\subject at font \@subject \par}
-      \vskip 1.5em
-    \fi
-    {\titlefont\huge \@title \par}%
-    \vskip .5em
-    {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
-    \vskip 1em
-    {\Large
-      \lineskip .5em%
-      \begin{tabular}[t]{c}
-        \@author
-      \end{tabular}\par
-    }%
-    \vskip 1em%
-    {\Large \@date \par}%
-    \vskip \z@ \@plus 1em
-    {\Large \@publishers \par}
-    \ifx\@dedication\@empty \else
-      \vskip 2em
-      {\Large \@dedication \par}
-    \fi
-  \end{center}%
-  \par
-  \vskip 2em
-}%
 \def\raggedsection{\if at RTL\raggedleft\else\raggedright\fi}
 \def\raggedpart{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*\autodot{\if at altsecnumformat\@SepMark\fi}
@@ -18587,16 +18716,6 @@
   \fi
   \bib at endhook
 }
-\renewcommand*\left at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hrule\@width.4\columnwidth
-  \kern 2.6\p@}
-\renewcommand*\right at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hbox to \columnwidth{\hskip .6\columnwidth \hrulefill }
-  \kern2.6\p@}
 \renewcommand*{\raggeddictum}{\if at RTL\raggedright\else\raggedleft\fi}
 \renewcommand*{\raggeddictumtext}{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*{\raggeddictumauthor}{\if at RTL\raggedright\else\raggedleft\fi}
@@ -18605,77 +18724,62 @@
 }
 \renewcommand{\@@makecaption}[3]{%
   \cap at margin
-  \ifonelinecaptions
-    \@tempcnta=\value{mpfootnote}\@tempcntb=\value{footnote}%
-    \let\scr at tmp@footnotetext=\@footnotetext
-    \let\@footnotetext=\@gobble
-    \let\scr at tmp@LTRfootnotetext=\@LTRfootnotetext
-    \let\@LTRfootnotetext=\@gobble
-    \let\scr at tmp@RTLfootnotetext=\@RTLfootnotetext
-    \let\@RTLfootnotetext=\@gobble
-    \sbox\@tempboxa{%
-      {\capfont{\strut\ignorespaces
-        #1{{\caplabelfont{#2\captionformat}}}%
-        #3\unskip\strut}}%
-    }%
-    \let\@footnotetext=\scr at tmp@footnotetext
-    \let\scr at tmp@footnotetext=\undefined
-    \let\@LTRfootnotetext=\scr at tmp@LTRfootnotetext
-    \let\scr at tmp@LTRfootnotetext=\undefined
-    \let\@RTLfootnotetext=\scr at tmp@RTLfootnotetext
-    \let\scr at tmp@RTLfootnotetext=\undefined
-    \setcounter{footnote}{\@tempcntb}%
-    \setcounter{mpfootnote}{\@tempcnta}%
-  \else
-    \sbox\@tempboxa{\hspace*{2\cap at width}}%
-  \fi
-  \begingroup%
-    \setlength{\@tempdima}{\cap at width}%
-    \ifdim \wd\@tempboxa >\@tempdima
-      \hb at xt@\hsize{%
-        \setbox\@tempboxa\vbox{\hsize=\cap at width
-          \ifdofullc at p
-            {\capfont{\@hangfrom{\scr at smashdp{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat}}}}}%
-              {#3\unskip\strut\par}}}%
-          \else%
-            \ifdim\cap at indent<\z@
-              {\capfont{\strut\ignorespaces
-                #1{{\caplabelfont{#2\captionformat\par}}}%
-                \noindent\hspace*{-\cap at indent}#3\unskip\strut\par}}%
-            \else%
-              \if at capbreak
-                {\capfont{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat\par}}}%
-                  \noindent\@hangfrom{\hspace*{\cap at indent}}{#3\par}}}%
-              \else
-                {\capfont{\@hangfrom{\scr at smashdp\strut\hspace*{\cap at indent}}%
-                  {\hspace{-\cap at indent}\scr at smashdp{\ignorespaces#1%
-                    {{\caplabelfont{#2\captionformat}}}}#3\unskip\strut\par}}}%
-              \fi
-            \fi
-          \fi
+  \begingroup
+    \ifonelinecaptions
+      \def\stepcounter##1{\advance\value{##1}\@ne}%
+      \let\refstepcounter\stepcounter
+      \let\label\@gobble
+      \let\@footnotetext=\@gobble
+      \let\@LTRfootnotetext=\@gobble
+      \let\@RTLfootnotetext=\@gobble
+      \let\hypertarget\@gobbletwo
+      \edef\@xnewline{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
         }%
-        \setlength{\@tempdima}{\ht\@tempboxa}%
-        \addtolength{\@tempdima}{\dp\@tempboxa}%
-        \addtolength{\@tempdima}{-\ht\strutbox}%
-        \ht\@tempboxa\ht\strutbox
-        \dp\@tempboxa\@tempdima
-        \strut\cap at left
-        \box\@tempboxa
-        \cap at right\strut
+        \unexpanded\expandafter{\@xnewline}%
       }%
+      \edef\@xcentercr{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
+        }%
+        \unexpanded\expandafter{\@xcentercr}%
+      }%
+      \settowidth{\@tempdima}{\scr@@makesinglelinecaption{#1}{#2}{#3}}%
+      \ifdim\@tempdima>\cap at width
+        \aftergroup\scr at makemultilinecaption
+      \else
+        \aftergroup\scr at makesinglelinecaption
+      \fi
     \else
-      \global \@minipagefalse
-      \sbox\@tempboxa{%
-        {\capfont{\scr at smashdp{\strut\ignorespaces
-          #1{{\caplabelfont{#2\captionformat}}}}%
-          #3}}%
-      }%
-      {\capfont{\hb at xt@\hsize{\strut\cap at left\if at RTL\beginR\fi\box\@tempboxa\if at RTL\endR\fi\cap at right\strut}}}%
+      \aftergroup\scr at makemultilinecaption
     \fi
   \endgroup
+  {#1}{#2}{#3}%
 }
+\renewcommand{\scr at makesinglelinecaption}[3]{%
+  {%
+    \usefontofkomafont{caption}{%
+      \hb at xt@\hsize{%
+        \cap at left
+        \if at RTL
+          \beginR
+        \fi
+        \scr@@makesinglelinecaption{#1}{#2}{#3}%
+        \if at RTL
+          \endR
+        \fi
+        \cap at right
+      }\par\kern\dp\strutbox%
+    }%
+  }\kern-\dp\strutbox
+}
 \renewcommand{\@makecaption}[2]{%
   \if at captionabove
     \vskip\belowcaptionskip
@@ -18689,10 +18793,8 @@
     \vskip\belowcaptionskip
   \fi
 }
+
 \bidi at AfterFile{longtable-xetex-bidi.def}{%
-  \@ifpackageloaded{caption2}{\@komalongtablefalse
-    \scr at caption@before at longtable@warning{caption2}%
-  }{}%
   \if at komalongtable
     \renewcommand{\LT at makecaption}[3]{%
       \noalign{%
@@ -18704,6 +18806,7 @@
       }%
       \LT at mcol\LT at cols c{%
         \hbox to\z@{\hss\parbox[t]\linewidth{%
+            \def\@captype{table}%
             \@@makecaption{#1}{#2}{#3}%
             \endgraf
             \if at captionabove
@@ -18755,12 +18858,11 @@
   \expandafter\renewcommand%
   \csname scr at tso@#1 at linefill\endcsname{%
     \if at sectionentrywithdots
-      \TOCLineLeaderFill\relax
+      {\usekomafont{sectionentrydots}{\TOCLineLeaderFill}}\relax
     \else
       \hfill
     \fi
   }%
-  % F^^fcr die Eintr^^e4ge die Schrift von Element sectionentry verwenden.
   \expandafter\renewcommand%
   \csname scr at tso@#1 at entryformat\endcsname{\usekomafont{sectionentry}}%
   \expandafter\renewcommand%
@@ -18778,14 +18880,6 @@
 \CloneTOCEntryStyle{subsection}{default}
 
 \DeclareSectionCommand[%
-  style=part,%
-  level=\z@,%
-  tocstyle=part,%
-  toclevel=\m at ne,%
-  tocindent=\z@,%
-  tocnumwidth=2em%
-]{part}
-\DeclareSectionCommand[%
   style=section,%
   level=1,%
   indent=\z@,%
@@ -18796,6 +18890,14 @@
   tocnumwidth=1.5em%
 ]{section}
 \DeclareSectionCommand[%
+  style=part,%
+  level=\z@,%
+  tocstyle=part,%
+  toclevel=\m at ne,%
+  tocindent=\z@,%
+  tocnumwidth=2em%
+]{part}
+\DeclareSectionCommand[%
   style=section,%
   level=2,%
   indent=\z@,%
@@ -18822,6 +18924,7 @@
   beforeskip=3.25ex \@plus1ex \@minus.2ex,%
   afterskip=-1em,%
   tocstyle=subsection,%
+  tocindentfollows=subsubsection,%
   tocindent=7.0em,%
   tocnumwidth=4.1em%
 ]{paragraph}
@@ -18842,7 +18945,7 @@
 %\fi
 % \section{File \texttt{scrbook-xetex-bidi.def}}
 %    \begin{macrocode}
-\ProvidesFile{scrbook-xetex-bidi.def}[2017/06/09 v1.1 bidi adaptations for scrbook class for XeTeX engine]
+\ProvidesFile{scrbook-xetex-bidi.def}[2022/05/22 v1.2 bidi adaptations for scrbook class for XeTeX engine]
 \newcommand{\scr at saved@LTRfootnotetext}{}
 \newcommand{\scr at saved@RTLfootnotetext}{}
 \let\scr at saved@footnotetext\@footnotetext
@@ -18861,28 +18964,69 @@
   \csname FN at mf@prepare\endcsname
 }
 \renewcommand\deffootnote[4][]{%
-  \long\def\@makefntext##1{%
-    \setlength{\@tempdimc}{#3}%
-    \def\@tempa{#1}\ifx\@tempa\@empty
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#2}%
-        \if at RTL\parshape \@ne 0pt \@tempdima\else\parshape \@ne #2 \@tempdima\fi}%
-    \else
-      \addtolength{\@tempdimc}{#2}%
-      \addtolength{\@tempdimc}{-#1}%
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#1}%
-        \@tempdimb = \hsize
-        \addtolength{\@tempdimb}{-#2}%
-        \if at RTL\parshape \tw@ 0pt \@tempdima 0pt \@tempdimb\else\parshape \tw@ #1 \@tempdima #2 \@tempdimb\fi
+  \expandafter\ifnum\scr at v@is at ge{3.22}\relax
+    \long\def\@makefntext##1{%
+      \ExecuteDoHook{footnote/text/begin}%
+      \raggedfootnote
+      \if at RTL
+        \rightskip
+      \else
+        \leftskip
+      \fi
+      #2
+      \l at addto@macro\@trivlist{%
+        \ifnum\@listdepth=\@ne\advance
+          \if at RTL
+            \rightmargin #2\relax
+          \else
+            \leftmargin #2\relax
+          \fi
+        \fi
       }%
-    \fi
-    \par
-    \parindent\@tempdimc\noindent
-    \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
-  }%
+      \parindent #3\noindent
+      \IfArgIsEmpty{#1}{}{%
+        \hskip \dimexpr #1-#2\relax
+      }%
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+      \ExecuteDoHook{footnote/text/end}%
+    }%
+  \else
+    \ClassInfo{\KOMAClassName}{%
+      Using old \string\@makefntext\space due to compatibility
+      level\MessageBreak
+      less than 3.22}%
+    \long\def\@makefntext##1{%
+      \setlength{\@tempdimc}{#3}%
+      \def\@tempa{#1}\ifx\@tempa\@empty
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#2}%
+          \if at RTL
+            \parshape \@ne \z@ \@tempdima
+          \else
+            \parshape \@ne #2 \@tempdima
+          \fi
+          }%
+      \else
+        \addtolength{\@tempdimc}{#2}%
+        \addtolength{\@tempdimc}{-#1}%
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#1}%
+          \@tempdimb = \hsize
+          \addtolength{\@tempdimb}{-#2}%
+          \if at RTL
+            \parshape \tw@ \z@ \@tempdima \z@ \@tempdimb
+          \else
+            \parshape \tw@ #1 \@tempdima #2 \@tempdimb
+          \fi
+        }%
+      \fi
+      \par
+      \parindent\@tempdimc\noindent
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+    }%
+  \fi
   \def\@@makefnmark{\hbox{\ftnm at font{#4}}}%
 }
 \deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
@@ -18901,11 +19045,48 @@
       \hbox to \columnwidth{\hskip \dimexpr\columnwidth-\ftn at rule@width\relax  \leavevmode\leaders\hrule\@height\ftn at rule@height\hfill\kern\z@}}}%
   \kern 2.6\p@} 
 \renewcommand*\maketitle[1][1]{%
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+  \else
+    \def\and{%
+      \end{tabular}%
+      \hskip 1em \@plus.17fil%
+      \begin{tabular}[t]{c}%
+    }%
+  \fi
   \if at titlepage
     \begin{titlepage}
       \setcounter{page}{%
         #1%
       }%
+      \if at titlepageiscoverpage
+        \edef\titlepage at restore{%
+          \noexpand\endgroup
+          \noexpand\global\noexpand\@colht\the\@colht
+          \noexpand\global\noexpand\@colroom\the\@colroom
+          \noexpand\global\vsize\the\vsize
+          \noexpand\global\noexpand\@titlepageiscoverpagefalse
+          \noexpand\let\noexpand\titlepage at restore\noexpand\relax
+        }%
+        \begingroup
+        \topmargin=\dimexpr \coverpagetopmargin-1in\relax
+        \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \textwidth=\dimexpr
+        \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax
+        \textheight=\dimexpr
+        \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax
+        \headheight=0pt
+        \headsep=0pt
+        \footskip=\baselineskip
+        \@colht=\textheight
+        \@colroom=\textheight
+        \vsize=\textheight
+        \columnwidth=\textwidth
+        \hsize=\columnwidth
+        \linewidth=\hsize
+      \else
+        \let\titlepage at restore\relax
+      \fi
       \let\footnotesize\small
       \let\right at footnoterule\relax
       \let\left at footnoterule\relax
@@ -18916,54 +19097,97 @@
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
       \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
-      \ifx\@extratitle\@empty \else
-        \noindent\@extratitle\next at tpage\cleardoubleemptypage
-        \thispagestyle{empty}%
+      \ifx\@extratitle\@empty
+        \ifx\@frontispiece\@empty
+        \else
+          \if at twoside\mbox{}\next at tpage\fi
+          \noindent\@frontispiece\next at tdpage
+        \fi
+      \else
+        \noindent\@extratitle
+        \ifx\@frontispiece\@empty
+        \else
+          \next at tpage
+          \noindent\@frontispiece
+        \fi
+        \next at tdpage
       \fi
       \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
       \ifx\@titlehead\@empty \else
         \begin{minipage}[t]{\textwidth}%
-        \@titlehead
+          \usekomafont{titlehead}{\@titlehead\par}%
         \end{minipage}\par
       \fi
       \null\vfill
       \begin{center}
         \ifx\@subject\@empty \else
-          {\subject at font \@subject \par}%
+          {\usekomafont{subject}{\@subject\par}}%
           \vskip 3em
         \fi
-        {\titlefont\huge \@title\par}%
+        {\usekomafont{title}{\huge \@title\par}}%
         \vskip 1em
-        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
+        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}%
         \vskip 2em
-        {\Large \lineskip 0.75em
-          \begin{tabular}[t]{c}
-            \@author
-          \end{tabular}\par
+        {%
+          \usekomafont{author}{%
+            \lineskip 0.75em
+            \begin{tabular}[t]{c}
+              \@author
+            \end{tabular}\par
+          }%
         }%
         \vskip 1.5em
-        {\Large \@date \par}%
+        {\usekomafont{date}{\@date \par}}%
         \vskip \z@ \@plus3fill
-        {\Large \@publishers \par}%
+        {\usekomafont{publishers}{\@publishers \par}}%
         \vskip 3em
       \end{center}\par
-      \@thanks
+      \@thanks\global\let\@thanks\@empty
       \vfill\null
-      \if at twoside\next at tpage
-        \begin{minipage}[t]{\textwidth}
-          \@uppertitleback
-        \end{minipage}\par
-        \vfill
-        \begin{minipage}[b]{\textwidth}
-          \@lowertitleback
-        \end{minipage}
+      \if at twoside
+        \@tempswatrue
+        \expandafter\ifnum \@nameuse{scr at v@3.12}>\scr at compatibility\relax
+        \else
+          \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty
+            \@tempswafalse
+          \fi\fi
+        \fi
+        \if at tempswa
+          \next at tpage
+          \begin{minipage}[t]{\textwidth}
+            \@uppertitleback
+          \end{minipage}\par
+          \vfill
+          \begin{minipage}[b]{\textwidth}
+            \@lowertitleback
+          \end{minipage}\par
+          \@thanks\global\let\@thanks\@empty
+        \fi
+      \else
+        \ifx\@uppertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\uppertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
+        \ifx\@lowertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\lowertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
       \fi
-      \ifx\@dedication\@empty \else
-        \next at tpage\null\vfill
-        {\centering \Large \@dedication \par}%
+      \ifx\@dedication\@empty
+      \else
+        \next at tdpage\null\vfill
+        {\centering\usekomafont{dedication}{\@dedication \par}}%
         \vskip \z@ \@plus3fill
-        \if at twoside \next at tpage\cleardoubleemptypage \fi
+        \@thanks\global\let\@thanks\@empty
+        \cleardoubleemptypage
       \fi
+      \ifx\titlepage at restore\relax\else\clearpage\titlepage at restore\fi
     \end{titlepage}
   \else
     \par
@@ -18971,106 +19195,116 @@
     #1%
     \relax\ifnum\@tempcnta=1\else
       \ClassWarning{\KOMAClassName}{%
-        Optional argument of \string\maketitle\space ignored
-        at\MessageBreak
-        notitlepage-mode%
+        Optional argument of \string\maketitle\space ignored\MessageBreak
+        in `titlepage=false' mode%
       }%
     \fi
+    \ifx\@uppertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\uppertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
+    \ifx\@lowertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\lowertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
     \begingroup
+      \let\titlepage at restore\relax
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
-      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}
+      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
+      \next at tdpage
       \if at twocolumn
         \ifnum \col at number=\@ne
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \@makeextratitle
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \@makefrontispiece
+            \next at tdpage
+          \fi
           \@maketitle
         \else
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \twocolumn[\@makeextratitle]%
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \twocolumn[\@makefrontispiece]%
+            \next at tdpage
+          \fi
           \twocolumn[\@maketitle]%
         \fi
       \else
-        \newpage
-        \global\@topnum\z@
+        \ifx\@extratitle\@empty
+          \ifx\@frontispiece\@empty\else \mbox{}\fi
+        \else
+          \@makeextratitle
+        \fi
+        \ifx\@frontispiece\@empty
+          \ifx\@extratitle\@empty\else\next at tdpage\fi
+        \else
+          \next at tpage
+          \@makefrontispiece
+          \next at tdpage
+        \fi
         \@maketitle
       \fi
-      \thispagestyle{\titlepagestyle}\@thanks
+      \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi
+      \@thanks\global\let\@thanks\@empty
     \endgroup
   \fi
   \setcounter{footnote}{0}%
-  \let\thanks\relax
-  \let\LTRthanks\relax
-  \let\RTLthanks\relax
-  \let\maketitle\relax
-  \let\@maketitle\relax
-  \global\let\@thanks\@empty
-  \global\let\@author\@empty
-  \global\let\@date\@empty
-  \global\let\@title\@empty
-  \global\let\@subtitle\@empty
-  \global\let\@extratitle\@empty
-  \global\let\@titlehead\@empty
-  \global\let\@subject\@empty
-  \global\let\@publishers\@empty
-  \global\let\@uppertitleback\@empty
-  \global\let\@lowertitleback\@empty
-  \global\let\@dedication\@empty
-  \global\let\author\relax
-  \global\let\title\relax
-  \global\let\extratitle\relax
-  \global\let\titlehead\relax
-  \global\let\subject\relax
-  \global\let\publishers\relax
-  \global\let\uppertitleback\relax
-  \global\let\lowertitleback\relax
-  \global\let\dedication\relax
-  \global\let\date\relax
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+    \let\thanks\relax
+    \let\LTRthanks\relax
+    \let\RTLthanks\relax
+    \let\maketitle\relax
+    \let\@maketitle\relax
+    \global\let\@thanks\@empty
+    \global\let\@author\@empty
+    \global\let\@date\@empty
+    \global\let\@title\@empty
+    \global\let\@subtitle\@empty
+    \global\let\@extratitle\@empty
+    \global\let\@frontispiece\@empty
+    \global\let\@titlehead\@empty
+    \global\let\@subject\@empty
+    \global\let\@publishers\@empty
+    \global\let\@uppertitleback\@empty
+    \global\let\@lowertitleback\@empty
+    \global\let\@dedication\@empty
+    \global\let\author\relax
+    \global\let\title\relax
+    \global\let\extratitle\relax
+    \global\let\titlehead\relax
+    \global\let\subject\relax
+    \global\let\publishers\relax
+    \global\let\uppertitleback\relax
+    \global\let\lowertitleback\relax
+    \global\let\dedication\relax
+    \global\let\date\relax
+  \fi
   \global\let\and\relax
 }%
-\renewcommand*{\@maketitle}{%
-  \clearpage
-  \let\footnote\thanks
-  \let\LTRfootnote\LTRthanks
-  \let\RTLfootnote\RTLthanks
-  \ifx\@extratitle\@empty \else
-    \noindent\@extratitle \next at tpage \if at twoside \null\next at tpage \fi
-  \fi
-  \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
-  \ifx\@titlehead\@empty \else
-    \begin{minipage}[t]{\textwidth}
-      \@titlehead
-    \end{minipage}\par
-  \fi
-  \null
-  \vskip 2em%
-  \begin{center}%
-    \ifx\@subject\@empty \else
-      {\subject at font \@subject \par}
-      \vskip 1.5em
-    \fi
-    {\titlefont\huge \@title \par}%
-    \vskip .5em
-    {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
-    \vskip 1em
-    {\Large
-      \lineskip .5em%
-      \begin{tabular}[t]{c}
-        \@author
-      \end{tabular}\par
-    }%
-    \vskip 1em%
-    {\Large \@date \par}%
-    \vskip \z@ \@plus 1em
-    {\Large \@publishers \par}
-    \ifx\@dedication\@empty \else
-      \vskip 2em
-      {\Large \@dedication \par}
-    \fi
-  \end{center}%
-  \par
-  \vskip 2em
-}%
 \def\raggedsection{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*\autodot{\if at altsecnumformat\@SepMark\fi}
 \renewcommand*\thesection{%
-  \ifnum \scr at compatibility>\@nameuse{scr at v@2.97d}\relax
+  \expandafter\ifnum\scr at v@is at gt{2.97d}%
     \if at mainmatter\thechapter\@SepMark\fi
   \else
   \thechapter\@SepMark%
@@ -19085,28 +19319,18 @@
 \renewcommand*{\thesubparagraph}{%
   \theparagraph\@SepMark\@arabic\c at subparagraph
 }
-\renewcommand*\thefigure{%
-  \ifnum \scr at compatibility>\@nameuse{scr at v@2.97d}\relax
+\expandafter\ifnum\scr at v@is at le{2.97d}%
+  \renewcommand*\thefigure{\thechapter\@SepMark\@arabic\c at figure}
+\fi
+\expandafter\ifnum\scr at v@is at le{2.97d}%
+  \renewcommand*\thetable{\thechapter\@SepMark\@arabic\c at table}
+\fi
+\renewcommand*{\theequation}{%
+  \expandafter\ifnum\scr at v@is at gt{2.97d}%
     \if at mainmatter\thechapter\@SepMark\fi
   \else
-  \thechapter\@SepMark%
+    \thechapter\@SepMark%
   \fi
-  \@arabic\c at figure
-}
-\renewcommand*\thetable{%
-  \ifnum \scr at compatibility>\@nameuse{scr at v@2.97d}\relax
-    \if at mainmatter\thechapter\@SepMark\fi
-  \else
-  \thechapter\@SepMark%
-  \fi
-  \@arabic\c at table
-}
-\renewcommand*\theequation{%
-  \ifnum \scr at compatibility>\@nameuse{scr at v@2.97d}\relax
-    \if at mainmatter\thechapter\@SepMark\fi
-  \else
-  \thechapter\@SepMark%
-  \fi
   \@arabic\c at equation
 }
 \renewenvironment{thebibliography}[1]{%
@@ -19174,16 +19398,6 @@
   \fi
   \bib at endhook
 }
-\renewcommand*\left at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hrule\@width.4\columnwidth
-  \kern 2.6\p@}
-\renewcommand*\right at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hbox to \columnwidth{\hskip .6\columnwidth \hrulefill }
-  \kern2.6\p@}
 \renewcommand*{\raggeddictum}{\if at RTL\raggedright\else\raggedleft\fi}
 \renewcommand*{\raggeddictumtext}{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*{\raggeddictumauthor}{\if at RTL\raggedright\else\raggedleft\fi}
@@ -19192,77 +19406,62 @@
 }
 \renewcommand{\@@makecaption}[3]{%
   \cap at margin
-  \ifonelinecaptions
-    \@tempcnta=\value{mpfootnote}\@tempcntb=\value{footnote}%
-    \let\scr at tmp@footnotetext=\@footnotetext
-    \let\@footnotetext=\@gobble
-    \let\scr at tmp@LTRfootnotetext=\@LTRfootnotetext
-    \let\@LTRfootnotetext=\@gobble
-    \let\scr at tmp@RTLfootnotetext=\@RTLfootnotetext
-    \let\@RTLfootnotetext=\@gobble
-    \sbox\@tempboxa{%
-      {\capfont{\strut\ignorespaces
-        #1{{\caplabelfont{#2\captionformat}}}%
-        #3\unskip\strut}}%
-    }%
-    \let\@footnotetext=\scr at tmp@footnotetext
-    \let\scr at tmp@footnotetext=\undefined
-    \let\@LTRfootnotetext=\scr at tmp@LTRfootnotetext
-    \let\scr at tmp@LTRfootnotetext=\undefined
-    \let\@RTLfootnotetext=\scr at tmp@RTLfootnotetext
-    \let\scr at tmp@RTLfootnotetext=\undefined
-    \setcounter{footnote}{\@tempcntb}%
-    \setcounter{mpfootnote}{\@tempcnta}%
-  \else
-    \sbox\@tempboxa{\hspace*{2\cap at width}}%
-  \fi
-  \begingroup%
-    \setlength{\@tempdima}{\cap at width}%
-    \ifdim \wd\@tempboxa >\@tempdima
-      \hb at xt@\hsize{%
-        \setbox\@tempboxa\vbox{\hsize=\cap at width
-          \ifdofullc at p
-            {\capfont{\@hangfrom{\scr at smashdp{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat}}}}}%
-              {#3\unskip\strut\par}}}%
-          \else%
-            \ifdim\cap at indent<\z@
-              {\capfont{\strut\ignorespaces
-                #1{{\caplabelfont{#2\captionformat\par}}}%
-                \noindent\hspace*{-\cap at indent}#3\unskip\strut\par}}%
-            \else%
-              \if at capbreak
-                {\capfont{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat\par}}}%
-                  \noindent\@hangfrom{\hspace*{\cap at indent}}{#3\par}}}%
-              \else
-                {\capfont{\@hangfrom{\scr at smashdp\strut\hspace*{\cap at indent}}%
-                  {\hspace{-\cap at indent}\scr at smashdp{\ignorespaces#1%
-                    {{\caplabelfont{#2\captionformat}}}}#3\unskip\strut\par}}}%
-              \fi
-            \fi
-          \fi
+  \begingroup
+    \ifonelinecaptions
+      \def\stepcounter##1{\advance\value{##1}\@ne}%
+      \let\refstepcounter\stepcounter
+      \let\label\@gobble
+      \let\@footnotetext=\@gobble
+      \let\@LTRfootnotetext=\@gobble
+      \let\@RTLfootnotetext=\@gobble
+      \let\hypertarget\@gobbletwo
+      \edef\@xnewline{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
         }%
-        \setlength{\@tempdima}{\ht\@tempboxa}%
-        \addtolength{\@tempdima}{\dp\@tempboxa}%
-        \addtolength{\@tempdima}{-\ht\strutbox}%
-        \ht\@tempboxa\ht\strutbox
-        \dp\@tempboxa\@tempdima
-        \strut\cap at left
-        \box\@tempboxa
-        \cap at right\strut
+        \unexpanded\expandafter{\@xnewline}%
       }%
+      \edef\@xcentercr{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
+        }%
+        \unexpanded\expandafter{\@xcentercr}%
+      }%
+      \settowidth{\@tempdima}{\scr@@makesinglelinecaption{#1}{#2}{#3}}%
+      \ifdim\@tempdima>\cap at width
+        \aftergroup\scr at makemultilinecaption
+      \else
+        \aftergroup\scr at makesinglelinecaption
+      \fi
     \else
-      \global \@minipagefalse
-      \sbox\@tempboxa{%
-        {\capfont{\scr at smashdp{\strut\ignorespaces
-          #1{{\caplabelfont{#2\captionformat}}}}%
-          #3}}%
-      }%
-      {\capfont{\hb at xt@\hsize{\strut\cap at left\if at RTL\beginR\fi\box\@tempboxa\if at RTL\endR\fi\cap at right\strut}}}%
+      \aftergroup\scr at makemultilinecaption
     \fi
   \endgroup
+  {#1}{#2}{#3}%
 }
+\renewcommand{\scr at makesinglelinecaption}[3]{%
+  {%
+    \usefontofkomafont{caption}{%
+      \hb at xt@\hsize{%
+        \cap at left
+        \if at RTL
+          \beginR
+        \fi
+        \scr@@makesinglelinecaption{#1}{#2}{#3}%
+        \if at RTL
+          \endR
+        \fi
+        \cap at right
+      }\par\kern\dp\strutbox%
+    }%
+  }\kern-\dp\strutbox
+}
 \renewcommand{\@makecaption}[2]{%
   \if at captionabove
     \vskip\belowcaptionskip
@@ -19277,9 +19476,6 @@
   \fi
 }
 \bidi at AfterFile{longtable-xetex-bidi.def}{%
-  \@ifpackageloaded{caption2}{\@komalongtablefalse
-    \scr at caption@before at longtable@warning{caption2}%
-  }{}%
   \if at komalongtable
     \renewcommand{\LT at makecaption}[3]{%
       \noalign{%
@@ -19291,6 +19487,7 @@
       }%
       \LT at mcol\LT at cols c{%
         \hbox to\z@{\hss\parbox[t]\linewidth{%
+            \def\@captype{table}%
             \@@makecaption{#1}{#2}{#3}%
             \endgraf
             \if at captionabove
@@ -19342,7 +19539,7 @@
   \expandafter\renewcommand%
   \csname scr at tso@#1 at linefill\endcsname{%
     \if at chapterentrywithdots
-      \TOCLineLeaderFill\relax
+      {\usekomafont{chapterentrydots}{\TOCLineLeaderFill}}\relax
     \else
       \hfill
     \fi
@@ -19365,15 +19562,6 @@
 \CloneTOCEntryStyle{section}{default}
 
 \DeclareSectionCommand[%
-  style=part,%
-  level=\m at ne,%
-  pagestyle=plain,%
-  tocstyle=part,%
-  toclevel=\m at ne,%
-  tocindent=\z@,%
-  tocnumwidth=2em%
-]{part}
-\DeclareSectionCommand[%
   style=chapter,%
   level=\z@,%
   pagestyle=plain,%
@@ -19388,10 +19576,20 @@
   beforeskip=-3.5ex \@plus -1ex \@minus -.2ex,%
   afterskip=2.3ex \@plus.2ex,%
   tocstyle=section,%
+  tocindentfollows=chapter,%
   tocindent=1.5em,%
   tocnumwidth=2.3em%
 ]{section}
 \DeclareSectionCommand[%
+  style=part,%
+  level=\m at ne,%
+  pagestyle=plain,%
+  tocstyle=part,%
+  toclevel=\m at ne,%
+  tocindent=\z@,%
+  tocnumwidth=2em%
+]{part}
+\DeclareSectionCommand[%
   style=section,%
   level=2,%
   indent=\z@,%
@@ -19417,6 +19615,7 @@
   indent=\z@,%
   beforeskip=3.25ex \@plus1ex \@minus.2ex,%
   afterskip=-1em,%
+  tocindentfollows=subsubsection,%
   tocstyle=section,%
   tocindent=10em,%
   tocnumwidth=5em%
@@ -19431,131 +19630,14 @@
   tocindent=12em,%
   tocnumwidth=6em%
 ]{subparagraph}
-
-
 %    \end{macrocode}
 % \iffalse
 %</scrbook-xetex-bidi.def>
-%<*scrlettr-xetex-bidi.def>
-%\fi
-% \section{File \texttt{scrlettr-xetex-bidi.def}}
-%    \begin{macrocode}
-\ProvidesFile{scrlettr-xetex-bidi.def}[2015/11/14 v0.3 bidi adaptations for scrlettr class for XeTeX engine]
-\renewcommand\deffootnote[4][]{%
-  \long\def\@makefntext##1{%
-    \edef\@tempa{#1}\ifx\@tempa\@empty
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#2}
-        \if at RTL\parshape \@ne 0pt \@tempdima\else\parshape \@ne #2 \@tempdima\fi}%
-    \else
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#1}
-        \@tempdimb = \hsize
-        \addtolength{\@tempdimb}{-#2}
-        \if at RTL\parshape \tw@ 0pt \@tempdima 0pt \@tempdimb\else\parshape \tw@ #1 \@tempdima #2 \@tempdimb\fi}%
-    \fi
-    \par
-    \parindent #3\noindent
-    \hbox to \z@{\hss\@@makefnmark}##1}
-  \def\@@makefnmark{\hbox{#4}}
-}
-\deffootnote[1em]{1.5em}{1em}
-  {\textsuperscript{\thefootnotemark}}
-\def\left at footnoterule{\kern-1\p@
- \hrule width 0.4\columnwidth
- \kern .6\p@}
-\def\right at footnoterule{%
-  \kern-1\p@
-  \hbox to \columnwidth{\hskip .6\columnwidth \hrulefill }
-  \kern .6\p@}
-\def\@datefield{\@reffalse
- \ifx\varyourref\@empty \else \@reftrue \fi
- \ifx\varyourmail\@empty \else \@reftrue \fi
- \ifx\varmyref\@empty \else \@reftrue \fi
- \ifx\varcustomer\@empty \else \@reftrue \fi
- \ifx\varinvoice\@empty \else \@reftrue \fi
- \ifx\varrefitemi\@empty \else \@reftrue \fi
- \ifx\varrefitemii\@empty \else \@reftrue \fi
- \ifx\varrefitemiii\@empty \else \@reftrue \fi
- \vskip -\parskip
- \vskip \refvskip
- \if at ref
-  \ifx\varyourref\@empty \else
-   \settowidth{\sc at temp}{\varyourref}
-   \setbox0\hbox{\scriptsize \sf \yourrefname}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varyourref}\hfill
-  \fi
-  \ifx\varyourmail\@empty \else
-   \settowidth{\sc at temp}{\varyourmail}
-   \setbox0\hbox{\scriptsize \sf \yourmailname}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varyourmail}\hfill
-  \fi
-  \ifx\varmyref\@empty \else
-   \settowidth{\sc at temp}{\varmyref}
-   \setbox0\hbox{\scriptsize \sf \myrefname}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varmyref}\hfill
-  \fi
-  \ifx\varcustomer\@empty \else
-   \settowidth{\sc at temp}{\varcustomer}
-   \setbox0\hbox{\scriptsize \sf \customername}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varcustomer}\hfill
-  \fi
-  \ifx\varinvoice\@empty \else
-   \settowidth{\sc at temp}{\varinvoice}
-   \setbox0\hbox{\scriptsize \sf \invoicename}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varinvoice}\hfill
-  \fi
-  \ifx\varrefitemi\@empty \else
-   \settowidth{\sc at temp}{\varrefitemi}
-   \setbox0\hbox{\scriptsize \sf \varrefitemnamei}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varrefitemi}\hfill
-  \fi
-  \ifx\varrefitemii\@empty \else
-   \settowidth{\sc at temp}{\varrefitemii}
-   \setbox0\hbox{\scriptsize \sf \varrefitemnameii}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varrefitemii}\hfill
-  \fi
-  \ifx\varrefitemiii\@empty \else
-   \settowidth{\sc at temp}{\varrefitemiii}
-   \setbox0\hbox{\scriptsize \sf \varrefitemnameiii}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varrefitemiii}\hfill
-  \fi
-  \ifx\@date\@empty \else
-   \settowidth{\sc at temp}{\@date}
-   \setbox0\hbox{\scriptsize \sf \datename}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \@date}
-  \fi
-  \par
-  \vspace{2.5\baselineskip}
- \else
-  {\ifx\@date\@empty \else \if at RTL\raggedright\else\raggedleft\fi\fromplace\ \@date\par \fi}
-  \vspace{1.5\baselineskip}
- \fi}
-\long\def\closing#1{\par\nobreak\vspace{0.5\baselineskip}
- \stopbreaks \noindent \sc at temp\textwidth \advance\sc at temp by
- -\sigindent \hspace{\sigindent}%
- \parbox{\sc at temp}{\if at RTL\raggedleft\else\raggedright\fi\ignorespaces #1\mbox{}\\[\presig at skip]
- \fromsig\strut}\par
- \vspace{1.5\baselineskip}}
-%    \end{macrocode}
-% \iffalse
-%</scrlettr-xetex-bidi.def>
 %<*scrreprt-xetex-bidi.def>
 %\fi
 % \section{File \texttt{scrreprt-xetex-bidi.def}}
 %    \begin{macrocode}
-\ProvidesFile{scrreprt-xetex-bidi.def}[2017/06/09 v1.1 bidi adaptations for scrreprt class for XeTeX engine]
+\ProvidesFile{scrreprt-xetex-bidi.def}[2022/05/22 v1.2 bidi adaptations for scrreprt class for XeTeX engine]
 \newcommand{\scr at saved@LTRfootnotetext}{}
 \newcommand{\scr at saved@RTLfootnotetext}{}
 \let\scr at saved@footnotetext\@footnotetext
@@ -19574,28 +19656,69 @@
   \csname FN at mf@prepare\endcsname
 }
 \renewcommand\deffootnote[4][]{%
-  \long\def\@makefntext##1{%
-    \setlength{\@tempdimc}{#3}%
-    \def\@tempa{#1}\ifx\@tempa\@empty
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#2}%
-        \if at RTL\parshape \@ne 0pt \@tempdima\else\parshape \@ne #2 \@tempdima\fi}%
-    \else
-      \addtolength{\@tempdimc}{#2}%
-      \addtolength{\@tempdimc}{-#1}%
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#1}%
-        \@tempdimb = \hsize
-        \addtolength{\@tempdimb}{-#2}%
-        \if at RTL\parshape \tw@ 0pt \@tempdima 0pt \@tempdimb\else\parshape \tw@ #1 \@tempdima #2 \@tempdimb\fi
+  \expandafter\ifnum\scr at v@is at ge{3.22}\relax
+    \long\def\@makefntext##1{%
+      \ExecuteDoHook{footnote/text/begin}%
+      \raggedfootnote
+      \if at RTL
+        \rightskip
+      \else
+        \leftskip 
+      \fi
+      #2
+      \l at addto@macro\@trivlist{%
+        \ifnum\@listdepth=\@ne
+          \if at RTL
+            \advance\rightmargin #2\relax
+          \else
+            \advance\leftmargin #2\relax
+          \fi
+        \fi
       }%
-    \fi
-    \par
-    \parindent\@tempdimc\noindent
-    \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
-  }%
+      \parindent #3\noindent
+      \IfArgIsEmpty{#1}{}{%
+        \hskip \dimexpr #1-#2\relax
+      }%
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+      \ExecuteDoHook{footnote/text/end}%
+    }%
+  \else
+    \ClassInfo{\KOMAClassName}{%
+      Using old \string\@makefntext\space due to compatibility
+      level\MessageBreak
+      less than 3.22}%
+    \long\def\@makefntext##1{%
+      \setlength{\@tempdimc}{#3}%
+      \def\@tempa{#1}\ifx\@tempa\@empty
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#2}%
+          \if at RTL
+            \parshape \@ne \z@ \@tempdima
+          \else
+            \parshape \@ne #2 \@tempdima
+          \fi
+          }%
+      \else
+        \addtolength{\@tempdimc}{#2}%
+        \addtolength{\@tempdimc}{-#1}%
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#1}%
+          \@tempdimb = \hsize
+          \addtolength{\@tempdimb}{-#2}%
+          \if at RTL
+            \parshape \tw@ \z@ \@tempdima \z@ \@tempdimb
+          \else
+            \parshape \tw@ #1 \@tempdima #2 \@tempdimb
+          \fi
+        }%
+      \fi
+      \par
+      \parindent\@tempdimc\noindent
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+    }%
+  \fi
   \def\@@makefnmark{\hbox{\ftnm at font{#4}}}%
 }
 \deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
@@ -19614,11 +19737,48 @@
       \hbox to \columnwidth{\hskip \dimexpr\columnwidth-\ftn at rule@width\relax  \leavevmode\leaders\hrule\@height\ftn at rule@height\hfill\kern\z@}}}%
   \kern 2.6\p@}  
 \renewcommand*\maketitle[1][1]{%
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+  \else
+    \def\and{%
+      \end{tabular}%
+      \hskip 1em \@plus.17fil%
+      \begin{tabular}[t]{c}%
+    }%
+  \fi
   \if at titlepage
     \begin{titlepage}
       \setcounter{page}{%
         #1%
       }%
+      \if at titlepageiscoverpage
+        \edef\titlepage at restore{%
+          \noexpand\endgroup
+          \noexpand\global\noexpand\@colht\the\@colht
+          \noexpand\global\noexpand\@colroom\the\@colroom
+          \noexpand\global\vsize\the\vsize
+          \noexpand\global\noexpand\@titlepageiscoverpagefalse
+          \noexpand\let\noexpand\titlepage at restore\noexpand\relax
+        }%
+        \begingroup
+        \topmargin=\dimexpr \coverpagetopmargin-1in\relax
+        \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \textwidth=\dimexpr
+        \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax
+        \textheight=\dimexpr
+        \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax
+        \headheight=0pt
+        \headsep=0pt
+        \footskip=\baselineskip
+        \@colht=\textheight
+        \@colroom=\textheight
+        \vsize=\textheight
+        \columnwidth=\textwidth
+        \hsize=\columnwidth
+        \linewidth=\hsize
+      \else
+        \let\titlepage at restore\relax
+      \fi
       \let\footnotesize\small
       \let\right at footnoterule\relax
       \let\left at footnoterule\relax
@@ -19629,54 +19789,97 @@
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
       \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
-      \ifx\@extratitle\@empty \else
-        \noindent\@extratitle\next at tpage\cleardoubleemptypage
-        \thispagestyle{empty}%
+      \ifx\@extratitle\@empty
+        \ifx\@frontispiece\@empty
+        \else
+          \if at twoside\mbox{}\next at tpage\fi
+          \noindent\@frontispiece\next at tdpage
+        \fi
+      \else
+        \noindent\@extratitle
+        \ifx\@frontispiece\@empty
+        \else
+          \next at tpage
+          \noindent\@frontispiece
+        \fi
+        \next at tdpage
       \fi
       \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
       \ifx\@titlehead\@empty \else
         \begin{minipage}[t]{\textwidth}%
-        \@titlehead
+          \usekomafont{titlehead}{\@titlehead\par}%
         \end{minipage}\par
       \fi
       \null\vfill
       \begin{center}
         \ifx\@subject\@empty \else
-          {\subject at font \@subject \par}%
+          {\usekomafont{subject}{\@subject\par}}%
           \vskip 3em
         \fi
-        {\titlefont\huge \@title\par}%
+        {\usekomafont{title}{\huge \@title\par}}%
         \vskip 1em
-        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
+        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}%
         \vskip 2em
-        {\Large \lineskip 0.75em
-          \begin{tabular}[t]{c}
-            \@author
-          \end{tabular}\par
+        {%
+          \usekomafont{author}{%
+            \lineskip 0.75em
+            \begin{tabular}[t]{c}
+              \@author
+            \end{tabular}\par
+          }%
         }%
         \vskip 1.5em
-        {\Large \@date \par}%
+        {\usekomafont{date}{\@date \par}}%
         \vskip \z@ \@plus3fill
-        {\Large \@publishers \par}%
+        {\usekomafont{publishers}{\@publishers \par}}%
         \vskip 3em
       \end{center}\par
-      \@thanks
+      \@thanks\global\let\@thanks\@empty
       \vfill\null
-      \if at twoside\next at tpage
-        \begin{minipage}[t]{\textwidth}
-          \@uppertitleback
-        \end{minipage}\par
-        \vfill
-        \begin{minipage}[b]{\textwidth}
-          \@lowertitleback
-        \end{minipage}
+      \if at twoside
+        \@tempswatrue
+        \expandafter\ifnum \@nameuse{scr at v@3.12}>\scr at compatibility\relax
+        \else
+          \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty
+            \@tempswafalse
+          \fi\fi
+        \fi
+        \if at tempswa
+          \next at tpage
+          \begin{minipage}[t]{\textwidth}
+            \@uppertitleback
+          \end{minipage}\par
+          \vfill
+          \begin{minipage}[b]{\textwidth}
+            \@lowertitleback
+          \end{minipage}\par
+          \@thanks\global\let\@thanks\@empty
+        \fi
+      \else
+        \ifx\@uppertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\uppertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
+        \ifx\@lowertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\lowertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
       \fi
-      \ifx\@dedication\@empty \else
-        \next at tpage\null\vfill
-        {\centering \Large \@dedication \par}%
+      \ifx\@dedication\@empty
+      \else
+        \next at tdpage\null\vfill
+        {\centering\usekomafont{dedication}{\@dedication \par}}%
         \vskip \z@ \@plus3fill
-        \if at twoside \next at tpage\cleardoubleemptypage \fi
+        \@thanks\global\let\@thanks\@empty
+        \cleardoubleemptypage
       \fi
+      \ifx\titlepage at restore\relax\else\clearpage\titlepage at restore\fi
     \end{titlepage}
   \else
     \par
@@ -19684,102 +19887,112 @@
     #1%
     \relax\ifnum\@tempcnta=1\else
       \ClassWarning{\KOMAClassName}{%
-        Optional argument of \string\maketitle\space ignored
-        at\MessageBreak
-        notitlepage-mode%
+        Optional argument of \string\maketitle\space ignored\MessageBreak
+        in `titlepage=false' mode%
       }%
     \fi
+    \ifx\@uppertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\uppertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
+    \ifx\@lowertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\lowertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
     \begingroup
+      \let\titlepage at restore\relax
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
-      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}
+      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
+      \next at tdpage
       \if at twocolumn
         \ifnum \col at number=\@ne
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \@makeextratitle
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \@makefrontispiece
+            \next at tdpage
+          \fi
           \@maketitle
         \else
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \twocolumn[\@makeextratitle]%
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \twocolumn[\@makefrontispiece]%
+            \next at tdpage
+          \fi
           \twocolumn[\@maketitle]%
         \fi
       \else
-        \newpage
-        \global\@topnum\z@
+        \ifx\@extratitle\@empty
+          \ifx\@frontispiece\@empty\else \mbox{}\fi
+        \else
+          \@makeextratitle
+        \fi
+        \ifx\@frontispiece\@empty
+          \ifx\@extratitle\@empty\else\next at tdpage\fi
+        \else
+          \next at tpage
+          \@makefrontispiece
+          \next at tdpage
+        \fi
         \@maketitle
       \fi
-      \thispagestyle{\titlepagestyle}\@thanks
+      \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi
+      \@thanks\global\let\@thanks\@empty
     \endgroup
   \fi
   \setcounter{footnote}{0}%
-  \let\thanks\relax
-  \let\LTRthanks\relax
-  \let\RTLthanks\relax
-  \let\maketitle\relax
-  \let\@maketitle\relax
-  \global\let\@thanks\@empty
-  \global\let\@author\@empty
-  \global\let\@date\@empty
-  \global\let\@title\@empty
-  \global\let\@subtitle\@empty
-  \global\let\@extratitle\@empty
-  \global\let\@titlehead\@empty
-  \global\let\@subject\@empty
-  \global\let\@publishers\@empty
-  \global\let\@uppertitleback\@empty
-  \global\let\@lowertitleback\@empty
-  \global\let\@dedication\@empty
-  \global\let\author\relax
-  \global\let\title\relax
-  \global\let\extratitle\relax
-  \global\let\titlehead\relax
-  \global\let\subject\relax
-  \global\let\publishers\relax
-  \global\let\uppertitleback\relax
-  \global\let\lowertitleback\relax
-  \global\let\dedication\relax
-  \global\let\date\relax
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+    \let\thanks\relax
+    \let\LTRthanks\relax
+    \let\RTLthanks\relax
+    \let\maketitle\relax
+    \let\@maketitle\relax
+    \global\let\@thanks\@empty
+    \global\let\@author\@empty
+    \global\let\@date\@empty
+    \global\let\@title\@empty
+    \global\let\@subtitle\@empty
+    \global\let\@extratitle\@empty
+    \global\let\@frontispiece\@empty
+    \global\let\@titlehead\@empty
+    \global\let\@subject\@empty
+    \global\let\@publishers\@empty
+    \global\let\@uppertitleback\@empty
+    \global\let\@lowertitleback\@empty
+    \global\let\@dedication\@empty
+    \global\let\author\relax
+    \global\let\title\relax
+    \global\let\extratitle\relax
+    \global\let\titlehead\relax
+    \global\let\subject\relax
+    \global\let\publishers\relax
+    \global\let\uppertitleback\relax
+    \global\let\lowertitleback\relax
+    \global\let\dedication\relax
+    \global\let\date\relax
+  \fi
   \global\let\and\relax
 }%
-\renewcommand*{\@maketitle}{%
-  \clearpage
-  \let\footnote\thanks
-  \let\LTRfootnote\LTRthanks
-  \let\RTLfootnote\RTLthanks
-  \ifx\@extratitle\@empty \else
-    \noindent\@extratitle \next at tpage \if at twoside \null\next at tpage \fi
-  \fi
-  \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
-  \ifx\@titlehead\@empty \else
-    \begin{minipage}[t]{\textwidth}
-      \@titlehead
-    \end{minipage}\par
-  \fi
-  \null
-  \vskip 2em%
-  \begin{center}%
-    \ifx\@subject\@empty \else
-      {\subject at font \@subject \par}
-      \vskip 1.5em
-    \fi
-    {\titlefont\huge \@title \par}%
-    \vskip .5em
-    {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
-    \vskip 1em
-    {\Large
-      \lineskip .5em%
-      \begin{tabular}[t]{c}
-        \@author
-      \end{tabular}\par
-    }%
-    \vskip 1em%
-    {\Large \@date \par}%
-    \vskip \z@ \@plus 1em
-    {\Large \@publishers \par}
-    \ifx\@dedication\@empty \else
-      \vskip 2em
-      {\Large \@dedication \par}
-    \fi
-  \end{center}%
-  \par
-  \vskip 2em
-}%
 \def\raggedsection{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*\autodot{\if at altsecnumformat\@SepMark\fi}
 \renewcommand*\thesection{%
@@ -19794,14 +20007,12 @@
 \renewcommand*{\thesubparagraph}{%
   \theparagraph\@SepMark\@arabic\c at subparagraph
 }
-\renewcommand*\thefigure{%
-  \thechapter\@SepMark%
-  \@arabic\c at figure
-}
-\renewcommand*\thetable{%
-  \thechapter\@SepMark%
-  \@arabic\c at table
-}
+\expandafter\ifnum\scr at v@is at le{2.97d}%
+  \renewcommand*\thefigure{\thechapter\@SepMark\@arabic\c at figure}
+\fi
+\expandafter\ifnum\scr at v@is at le{2.97d}%
+  \renewcommand*\thetable{\thechapter\@SepMark\@arabic\c at table}
+\fi
 \renewcommand*\theequation{%
   \thechapter\@SepMark%
   \@arabic\c at equation
@@ -19871,16 +20082,6 @@
   \fi
   \bib at endhook
 }
-\renewcommand*\left at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hrule\@width.4\columnwidth
-  \kern 2.6\p@}
-\renewcommand*\right at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hbox to \columnwidth{\hskip .6\columnwidth \hrulefill }
-  \kern2.6\p@}
 \renewcommand*{\raggeddictum}{\if at RTL\raggedright\else\raggedleft\fi}
 \renewcommand*{\raggeddictumtext}{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*{\raggeddictumauthor}{\if at RTL\raggedright\else\raggedleft\fi}
@@ -19889,77 +20090,62 @@
 }
 \renewcommand{\@@makecaption}[3]{%
   \cap at margin
-  \ifonelinecaptions
-    \@tempcnta=\value{mpfootnote}\@tempcntb=\value{footnote}%
-    \let\scr at tmp@footnotetext=\@footnotetext
-    \let\@footnotetext=\@gobble
-    \let\scr at tmp@LTRfootnotetext=\@LTRfootnotetext
-    \let\@LTRfootnotetext=\@gobble
-    \let\scr at tmp@RTLfootnotetext=\@RTLfootnotetext
-    \let\@RTLfootnotetext=\@gobble
-    \sbox\@tempboxa{%
-      {\capfont{\strut\ignorespaces
-        #1{{\caplabelfont{#2\captionformat}}}%
-        #3\unskip\strut}}%
-    }%
-    \let\@footnotetext=\scr at tmp@footnotetext
-    \let\scr at tmp@footnotetext=\undefined
-    \let\@LTRfootnotetext=\scr at tmp@LTRfootnotetext
-    \let\scr at tmp@LTRfootnotetext=\undefined
-   \let\@RTLfootnotetext=\scr at tmp@RTLfootnotetext
-    \let\scr at tmp@RTLfootnotetext=\undefined
-    \setcounter{footnote}{\@tempcntb}%
-    \setcounter{mpfootnote}{\@tempcnta}%
-  \else
-    \sbox\@tempboxa{\hspace*{2\cap at width}}%
-  \fi
-  \begingroup%
-    \setlength{\@tempdima}{\cap at width}%
-    \ifdim \wd\@tempboxa >\@tempdima
-      \hb at xt@\hsize{%
-        \setbox\@tempboxa\vbox{\hsize=\cap at width
-          \ifdofullc at p
-            {\capfont{\@hangfrom{\scr at smashdp{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat}}}}}%
-              {#3\unskip\strut\par}}}%
-          \else%
-            \ifdim\cap at indent<\z@
-              {\capfont{\strut\ignorespaces
-                #1{{\caplabelfont{#2\captionformat\par}}}%
-                \noindent\hspace*{-\cap at indent}#3\unskip\strut\par}}%
-            \else%
-              \if at capbreak
-                {\capfont{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat\par}}}%
-                  \noindent\@hangfrom{\hspace*{\cap at indent}}{#3\par}}}%
-              \else
-                {\capfont{\@hangfrom{\scr at smashdp\strut\hspace*{\cap at indent}}%
-                  {\hspace{-\cap at indent}\scr at smashdp{\ignorespaces#1%
-                    {{\caplabelfont{#2\captionformat}}}}#3\unskip\strut\par}}}%
-              \fi
-            \fi
-          \fi
+  \begingroup
+    \ifonelinecaptions
+      \def\stepcounter##1{\advance\value{##1}\@ne}%
+      \let\refstepcounter\stepcounter
+      \let\label\@gobble
+      \let\@footnotetext=\@gobble
+      \let\@LTRfootnotetext=\@gobble
+      \let\@RTLfootnotetext=\@gobble
+      \let\hypertarget\@gobbletwo
+      \edef\@xnewline{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
         }%
-        \setlength{\@tempdima}{\ht\@tempboxa}%
-        \addtolength{\@tempdima}{\dp\@tempboxa}%
-        \addtolength{\@tempdima}{-\ht\strutbox}%
-        \ht\@tempboxa\ht\strutbox
-        \dp\@tempboxa\@tempdima
-        \strut\cap at left
-        \box\@tempboxa
-        \cap at right\strut
+        \unexpanded\expandafter{\@xnewline}%
       }%
+      \edef\@xcentercr{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
+        }%
+        \unexpanded\expandafter{\@xcentercr}%
+      }%
+      \settowidth{\@tempdima}{\scr@@makesinglelinecaption{#1}{#2}{#3}}%
+      \ifdim\@tempdima>\cap at width
+        \aftergroup\scr at makemultilinecaption
+      \else
+        \aftergroup\scr at makesinglelinecaption
+      \fi
     \else
-      \global \@minipagefalse
-      \sbox\@tempboxa{%
-        {\capfont{\scr at smashdp{\strut\ignorespaces
-          #1{{\caplabelfont{#2\captionformat}}}}%
-          #3}}%
-      }%
-      {\capfont{\hb at xt@\hsize{\strut\cap at left\if at RTL\beginR\fi\box\@tempboxa\if at RTL\endR\fi\cap at right\strut}}}%
+      \aftergroup\scr at makemultilinecaption
     \fi
   \endgroup
+  {#1}{#2}{#3}%
 }
+\renewcommand{\scr at makesinglelinecaption}[3]{%
+  {%
+    \usefontofkomafont{caption}{%
+      \hb at xt@\hsize{%
+        \cap at left
+        \if at RTL
+          \beginR
+        \fi
+        \scr@@makesinglelinecaption{#1}{#2}{#3}%
+        \if at RTL
+          \endR
+        \fi
+        \cap at right
+      }\par\kern\dp\strutbox%
+    }%
+  }\kern-\dp\strutbox
+}
 \renewcommand{\@makecaption}[2]{%
   \if at captionabove
     \vskip\belowcaptionskip
@@ -19974,9 +20160,6 @@
   \fi
 }
 \bidi at AfterFile{longtable-xetex-bidi.def}{%
-  \@ifpackageloaded{caption2}{\@komalongtablefalse
-    \scr at caption@before at longtable@warning{caption2}%
-  }{}%
   \if at komalongtable
     \renewcommand{\LT at makecaption}[3]{%
       \noalign{%
@@ -19988,6 +20171,7 @@
       }%
       \LT at mcol\LT at cols c{%
         \hbox to\z@{\hss\parbox[t]\linewidth{%
+            \def\@captype{table}%
             \@@makecaption{#1}{#2}{#3}%
             \endgraf
             \if at captionabove
@@ -20039,7 +20223,7 @@
   \expandafter\renewcommand%
   \csname scr at tso@#1 at linefill\endcsname{%
     \if at chapterentrywithdots
-      \TOCLineLeaderFill\relax
+      {\usekomafont{chapterentrydots}{\TOCLineLeaderFill}}\relax
     \else
       \hfill
     \fi
@@ -20062,15 +20246,6 @@
 \CloneTOCEntryStyle{section}{default}
 
 \DeclareSectionCommand[%
-  style=part,%
-  level=\m at ne,%
-  pagestyle=plain,%
-  tocstyle=part,%
-  toclevel=\m at ne,%
-  tocindent=\z@,%
-  tocnumwidth=2em%
-]{part}
-\DeclareSectionCommand[%
   style=chapter,%
   level=\z@,%
   pagestyle=plain,%
@@ -20085,10 +20260,20 @@
   beforeskip=-3.5ex \@plus -1ex \@minus -.2ex,%
   afterskip=2.3ex \@plus.2ex,%
   tocstyle=section,%
+  tocindentfollows=chapter,%
   tocindent=1.5em,%
   tocnumwidth=2.3em%
 ]{section}
 \DeclareSectionCommand[%
+  style=part,%
+  level=\m at ne,%
+  pagestyle=plain,%
+  tocstyle=part,%
+  toclevel=\m at ne,%
+  tocindent=\z@,%
+  tocnumwidth=2em%
+]{part}
+\DeclareSectionCommand[%
   style=section,%
   level=2,%
   indent=\z@,%
@@ -20114,6 +20299,7 @@
   indent=\z@,%
   beforeskip=3.25ex \@plus1ex \@minus.2ex,%
   afterskip=-1em,%
+  tocindentfollows=subsubsection,%
   tocstyle=section,%
   tocindent=10em,%
   tocnumwidth=5em%
@@ -20128,8 +20314,6 @@
   tocindent=12em,%
   tocnumwidth=6em%
 ]{subparagraph}
-
-
 %    \end{macrocode}
 % \iffalse
 %</scrreprt-xetex-bidi.def>
@@ -20971,7 +21155,7 @@
 %\fi
 % \section{File \texttt{tocbasic-xetex-bidi.def}}
 %    \begin{macrocode}
-\ProvidesFile{tocbasic-xetex-bidi.def}[2016/09/14 v0.2 bidi adaptations for tocbasic package for XeTeX engine]
+\ProvidesFile{tocbasic-xetex-bidi.def}[2022/05/22 v0.3 bidi adaptations for tocbasic package for XeTeX engine]
 \bidi at undef\scr at dte@def at l@undottedtocline
 \bidi at undef\scr at dte@undottedtocline at init
 \DeclareTOCEntryStyle{undottedtocline}[{%
@@ -20980,15 +21164,15 @@
   \DefineTOCEntryLengthOption{numwidth}%
     {scr at tso@}{@numwidth}{entry number width}%
   \@ifundefined{#1tocdepth}{%
-    \ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
-      \ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
-        \ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
-          \ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
-            \ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
-              \ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
-                \ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
-                  \ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
-                    \ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
+    \Ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
+      \Ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
+        \Ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
+          \Ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
+            \Ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
+              \Ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
+                \Ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
+                  \Ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
+                    \Ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
                       \expandafter\let\csname #1tocdepth\expandafter\endcsname
                       \csname #1numdepth\endcsname
                     }%
@@ -21003,20 +21187,20 @@
   }{}%
   \@ifundefined{scr at tso@#1 at indent}{%
     \@ifundefined{scr@#1 at tocindent}{%
-      \ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-        \ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-          \ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
-            \ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+      \Ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+        \Ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+          \Ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+            \Ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
               \scr at ifundefinedorrelax{l at chapter}{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{3.8em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{7em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{10em}%
                         }{%
                         }%
@@ -21025,15 +21209,15 @@
                   }%
                 }%
               }{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{7.0em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{10em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{12em}%
                         }{%
                         }%
@@ -21052,19 +21236,19 @@
   }{}%
   \@ifundefined{scr at tso@#1 at numwidth}{%
     \@ifundefined{scr@#1 at tocnumwidth}{%
-      \ifstr{#1}{figure}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-        \ifstr{#1}{table}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-          \ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
+      \Ifstr{#1}{figure}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+        \Ifstr{#1}{table}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+          \Ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
             \scr at ifundefinedorrelax{chapter}{%
-              \ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
-                \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-                  \ifstr{#1}{subsubsection}{%
+              \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
+                \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+                  \Ifstr{#1}{subsubsection}{%
                     \@namedef{scr at tso@#1 at numwidth}{3.2em}%
                   }{%
-                    \ifstr{#1}{paragraph}{%
+                    \Ifstr{#1}{paragraph}{%
                       \@namedef{scr at tso@#1 at numwidth}{4.1em}%
                     }{%
-                      \ifstr{#1}{subparagraph}{%
+                      \Ifstr{#1}{subparagraph}{%
                         \@namedef{scr at tso@#1 at numwidth}{5m}%
                       }{%
                       }%
@@ -21073,15 +21257,15 @@
                 }%
               }%
             }{%
-              \ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-                \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{3.2em}}{%
-                  \ifstr{#1}{subsubsection}{%
+              \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+                \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{3.2em}}{%
+                  \Ifstr{#1}{subsubsection}{%
                     \@namedef{scr at tso@#1 at numwidth}{3.1em}%
                   }{%
-                    \ifstr{#1}{paragraph}{%
+                    \Ifstr{#1}{paragraph}{%
                       \@namedef{scr at tso@#1 at numwidth}{5em}%
                     }{%
-                      \ifstr{#1}{subparagraph}{%
+                      \Ifstr{#1}{subparagraph}{%
                         \@namedef{scr at tso@#1 at numwidth}{6em}%
                       }{%
                       }%
@@ -21118,8 +21302,12 @@
       \leavevmode
       \bfseries
       \advance\bidi at leftskip\@tempdima
-      \advance\bidi at leftskip\@nameuse{scr at tso@#1 at indent}%
-      \hskip -\dimexpr \bidi at leftskip-\@nameuse{scr at tso@#1 at indent}\relax
+      \Iftocfeature{\@currext}{noindent}{%
+        \hskip -\bidi at leftskip
+      }{%
+        \advance\bidi at leftskip\@nameuse{scr at tso@#1 at indent}%
+        \hskip -\dimexpr \bidi at leftskip-\@nameuse{scr at tso@#1 at indent}\relax
+      }%
       ##1%
       \nobreak
       \hfil \nobreak\hb at xt@\@pnumwidth{\hss ##2}%
@@ -21135,15 +21323,15 @@
   \DefineTOCEntryLengthOption{indent}%
     {scr at tso@}{@indent}{entry indent}%
   \@ifundefined{#1tocdepth}{%
-    \ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
-      \ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
-        \ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
-          \ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
-            \ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
-              \ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
-                \ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
-                  \ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
-                    \ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
+    \Ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
+      \Ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
+        \Ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
+          \Ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
+            \Ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
+              \Ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
+                \Ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
+                  \Ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
+                    \Ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
                       \expandafter\let\csname #1tocdepth\expandafter\endcsname
                       \csname #1numdepth\endcsname
                     }%
@@ -21158,20 +21346,20 @@
   }{}%
   \@ifundefined{scr at tso@#1 at indent}{%
     \@ifundefined{scr@#1 at tocindent}{%
-      \ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-        \ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-          \ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
-            \ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+      \Ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+        \Ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+          \Ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+            \Ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
               \scr at ifundefinedorrelax{l at chapter}{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{3.8em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{7em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{10em}%
                         }{%
                         }%
@@ -21180,15 +21368,15 @@
                   }%
                 }%
               }{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{7.0em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{10em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{12em}%
                         }{%
                         }%
@@ -21226,7 +21414,10 @@
       \leavevmode
       \large
       \bfseries
-      \advance\bidi at leftskip\@nameuse{scr at tso@#1 at indent}%
+      \Iftocfeature{\@currext}{noindent}{%
+      }{%
+        \advance\bidi at leftskip\@nameuse{scr at tso@#1 at indent}%
+      }%
       ##1%
       \hfil \nobreak\hb at xt@\@pnumwidth{\hss ##2}%
       \par
@@ -21245,14 +21436,57 @@
   \else
     \tocbasic at DependOnPenaltyAndTOCLevel{#1}%
     \addvspace{\@nameuse{scr at tso@#1 at beforeskip}}\relax
+    \@nameuse{Ifscr at tso@#1 at dynindent}{%
+      \expandafter\ifx\csname scr at tso@#1 at indentfollows\endcsname\@empty
+        \PackageWarning{tocbasic}{`dynindent' for `#1' not available}%
+      \else
+        \edef\reserved at a{\@nameuse{scr at tso@#1 at indentfollows}}%
+        \@for \reserved at a:=\reserved at a\do {%
+          \scr at trim@spaces\reserved at a
+          \ifx\reserved at a\@empty\else
+            \scr at ifundefinedorrelax{\reserved at a tocdepth}{%
+            }{%
+              \ifnum \@nameuse{\reserved at a tocdepth}<\@nameuse{#1tocdepth}%
+                \@tempdima\@nameuse{scr at tso@\reserved at a @indent}\relax
+                \@nameuse{Ifscr at tso@\reserved at a @dynnumwidth}{%
+                  \scr at ifundefinedorrelax
+                  {scr at dte@\reserved at a @lastmaxnumwidth}{%
+                    \advance\@tempdima
+                    \@nameuse{scr at tso@\reserved at a @numwidth}\relax
+                  }{%
+                    \advance\@tempdima
+                    \@nameuse{scr at dte@\reserved at a @lastmaxnumwidth}\relax
+                  }%
+                }{%
+                  \advance\@tempdima
+                  \@nameuse{scr at tso@\reserved at a @numwidth}\relax
+                }%
+                \ifdim \@tempdima>\@nameuse{scr at tso@#1 at indent}\relax
+                  \expandafter\edef\csname scr at tso@#1 at indent\endcsname
+                  {\the\@tempdima}%
+                \fi
+              \fi
+            }%
+          \fi
+        }%
+      \fi
+    }{}%
     {%
-      \bidi at leftskip \@nameuse{scr at tso@#1 at indent}\relax
-      \bidi at rightskip \@tocrmarg
+      \Iftocfeature{\@currext}{noindent}{%
+        \bidi at leftskip \z@
+      }{%
+        \bidi at leftskip \@nameuse{scr at tso@#1 at indent}\relax
+      }%
+      \bidi at rightskip \@nameuse{scr at tso@#1 at rightindent}\relax
       \parfillskip -\bidi at rightskip
       \@nameuse{Ifscr at tso@#1 at raggedpage}{%
         \addtolength{\parfillskip}{\z@ \@plus 1fil}%
       }{}%
-      \parindent \@nameuse{scr at tso@#1 at indent}\relax
+      \Iftocfeature{\@currext}{noindent}{%
+        \parindent \z@
+      }{%
+        \parindent \@nameuse{scr at tso@#1 at indent}\relax
+      }%
       \@afterindenttrue
       \interlinepenalty\@M
       \expandafter\ifx\csname ragged#1entry\endcsname\raggedright
@@ -21286,6 +21520,7 @@
           \sbox\scr at dte@tocline at numbox{\@nameuse{scr at tso@#1 at numberformat}{##1}}%
           \global\scr at dte@tocline at numberwidth
           \dimexpr\wd\scr at dte@tocline at numbox+\@nameuse{scr at tso@#1 at numsep}\relax
+          \relax
           \ifdim \scr at dte@tocline at numberwidth
                 >\@nameuse{scr at dte@#1 at maxnumwidth}\relax
             \global\@nameuse{scr at dte@#1 at maxnumwidth}\scr at dte@tocline at numberwidth
@@ -21293,9 +21528,8 @@
           \@nameuse{Ifscr at tso@#1 at dynnumwidth}{}{%
             \ifdim \scr at dte@tocline at numberwidth
                   >\dimexpr \@nameuse{scr at tso@#1 at numwidth}%
-                           +\@nameuse{scr at tso@#1 at numsep}\relax
-              \PackageWarning{tocbasic%
-              }{%
+                           +\@nameuse{scr at tso@#1 at numsep}\relax\relax
+              \PackageWarning{tocbasic}{%
                 number width of #1 toc entries should be
                 increased!\MessageBreak
                 Currently used number width =
@@ -21319,6 +21553,8 @@
           {%
             \normalfont\normalsize\@nameuse{scr at tso@#1 at linefill}%
             \nobreak
+            \expandafter\let\expandafter\scr at dte@pagenumberwidth
+            \csname scr at tso@#1 at pagenumberwidth\endcsname
             \@nameuse{scr at tso@#1 at pagenumberbox}{%
               \@nameuse{scr at tso@#1 at pagenumberformat}{#3}%
             }%
@@ -21331,6 +21567,7 @@
   \fi
 }
 
+
 \bidi at undef\scr at dte@def at l@tocline
 \bidi at undef\scr at dte@tocline at init
 \DeclareTOCEntryStyle{tocline}[{%
@@ -21340,6 +21577,10 @@
     {scr at tso@}{@breakafternumber}{line break after number flag}%
   \DefineTOCEntryIfOption{dynnumwidth}%
     {scr at tso@}{@dynnumwidth}{dynamic number width flag}%
+  \DefineTOCEntryListOption{indentfollows}%
+    {scr at tso@}{@indentfollows}{list of levels that define the indent}%
+  \DefineTOCEntryIfOption{dynindent}%
+    {scr at tso@}{@dynindent}{dynamic indent width flag}%
   \DefineTOCEntryCommandOption{entryformat}%
     {scr at tso@}{@entryformat}[1]{entry format}%
   \DefineTOCEntryCommandOption{entrynumberformat}%
@@ -21358,6 +21599,10 @@
     {scr at tso@}{@pagenumberbox}[1]{page number box}%
   \DefineTOCEntryCommandOption{pagenumberformat}%
     {scr at tso@}{@pagenumberformat}[1]{page number format}%
+  \DefineTOCEntryLengthOption{pagenumberwidth}%
+    {scr at tso@}{@pagenumberwidth}{width of page number box}%
+  \DefineTOCEntryLengthOption{rightindent}%
+    {scr at tso@}{@rightindent}{entry's text right indent}%
   \DefineTOCEntryOption{raggedentrytext}[true]{%
     \FamilySetBool{KOMAarg}{raggedentrytext}{@tempswa}{##1}%
     \ifx\FamilyKeyState\FamilyKeyStateProcessed
@@ -21377,7 +21622,7 @@
   \DefineTOCEntryLengthOption{numwidth}%
     {scr at tso@}{@numwidth}{entry number width}%
   \scr at ifundefinedorrelax{#1tocdepth}{%
-    \ifstrstart{#1}{sub}{%
+    \Ifstrstart{#1}{sub}{%
       \scr at ifundefinedorrelax{\scr at dte@nosub{#1}tocdepth}{}{%
         \expandafter\edef\csname #1tocdepth\endcsname{%
           \the\numexpr \noexpand\@nameuse{\scr at dte@nosub{#1}tocdepth}+\@ne\relax
@@ -21386,15 +21631,15 @@
     }{}%
   }{}%
   \@ifundefined{#1tocdepth}{%
-    \ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
-      \ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
-        \ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
-          \ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
-            \ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
-              \ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
-                \ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
-                  \ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
-                    \ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
+    \Ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
+      \Ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
+        \Ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
+          \Ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
+            \Ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
+              \Ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
+                \Ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
+                  \Ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
+                    \Ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
                       \expandafter\let\csname #1tocdepth\expandafter\endcsname
                       \csname #1numdepth\endcsname
                     }%
@@ -21409,7 +21654,7 @@
   }{}%
   \scr at ifundefinedorrelax{scr at tso@#1 at indent}{%
     \@ifundefined{scr@#1 at tocindent}{%
-      \ifstrstart{#1}{sub}{%
+      \Ifstrstart{#1}{sub}{%
         \scr at ifundefinedorrelax{scr at tso@\scr at dte@nosub{#1}@indent}{%
           \scr at ifundefinedorrelax{scr at tso@\scr at dte@nosub{#1}@numwidth}{}{%
             \expandafter\edef\csname scr at tso@#1 at indent\endcsname{%
@@ -21436,21 +21681,47 @@
       \@namedef{scr at tso@#1 at indent}{\@nameuse{scr@#1 at tocindent}}%
     }%
   }{}%
+  \scr at ifundefinedorrelax{scr at tso@#1 at pagenumberwidth}{%
+    \Ifstrstart{#1}{sub}{%
+      \scr at ifundefinedorrelax{scr at tso@\scr at dte@nosub{#1}@pagenumberwidth}{%
+        \@namedef{scr at tso@#1 at pagenumberwidth}{\@pnumwidth}%
+      }{%
+        \expandafter\let
+        \csname scr at tso@#1 at pagenumberwidth\expandafter\endcsname
+        \csname scr at tso@\scr at dte@nosub{#1}@pagenumberwidth\endcsname
+      }%
+    }{%
+      \@namedef{scr at tso@#1 at pagenumberwidth}{\@pnumwidth}%
+    }%
+  }{}%
+  \scr at ifundefinedorrelax{scr at tso@#1 at rightindent}{%
+    \Ifstrstart{#1}{sub}{%
+      \scr at ifundefinedorrelax{scr at tso@\scr at dte@nosub{#1}@rightindent}{%
+        \@namedef{scr at tso@#1 at rightindent}{\@tocrmarg}%
+      }{%
+        \expandafter\let
+        \csname scr at tso@#1 at rightindent\expandafter\endcsname
+        \csname scr at tso@\scr at dte@nosub{#1}@rightindent\endcsname
+      }%
+    }{%
+      \@namedef{scr at tso@#1 at rightindent}{\@tocrmarg}%
+    }%
+  }{}%
   \@ifundefined{scr at tso@#1 at indent}{%
-      \ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-        \ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-          \ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
-            \ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+      \Ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+        \Ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+          \Ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+            \Ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
               \scr at ifundefinedorrelax{l at chapter}{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{3.8em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{7em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{10em}%
                         }{%
                         }%
@@ -21459,15 +21730,15 @@
                   }%
                 }%
               }{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{7.0em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{10em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{12em}%
                         }{%
                         }%
@@ -21483,7 +21754,7 @@
   }{}%
   \scr at ifundefinedorrelax{scr at tso@#1 at numwidth}{%
     \scr at ifundefinedorrelax{scr@#1 at tocnumwidth}{%
-      \ifstrstart{#1}{sub}{%
+      \Ifstrstart{#1}{sub}{%
         \scr at ifundefinedorrelax{scr at tso@\scr at dte@nosub{#1}@numwidth}{}{%
           \expandafter\edef\csname scr at tso@#1 at numwidth\endcsname{%
             \glueexpr \noexpand\@nameuse{scr at tso@\scr at dte@nosub{#1}@numwidth}%
@@ -21497,19 +21768,19 @@
     }%
   }{}%
   \@ifundefined{scr at tso@#1 at numwidth}{%
-      \ifstr{#1}{figure}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-        \ifstr{#1}{table}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-          \ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
+      \Ifstr{#1}{figure}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+        \Ifstr{#1}{table}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+          \Ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
             \scr at ifundefinedorrelax{chapter}{%
-              \ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
-                \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-                  \ifstr{#1}{subsubsection}{%
+              \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
+                \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+                  \Ifstr{#1}{subsubsection}{%
                     \@namedef{scr at tso@#1 at numwidth}{3.2em}%
                   }{%
-                    \ifstr{#1}{paragraph}{%
+                    \Ifstr{#1}{paragraph}{%
                       \@namedef{scr at tso@#1 at numwidth}{4.1em}%
                     }{%
-                      \ifstr{#1}{subparagraph}{%
+                      \Ifstr{#1}{subparagraph}{%
                         \@namedef{scr at tso@#1 at numwidth}{5m}%
                       }{%
                       }%
@@ -21518,15 +21789,15 @@
                 }%
               }%
             }{%
-              \ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-                \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{3.2em}}{%
-                  \ifstr{#1}{subsubsection}{%
+              \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+                \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{3.2em}}{%
+                  \Ifstr{#1}{subsubsection}{%
                     \@namedef{scr at tso@#1 at numwidth}{3.1em}%
                   }{%
-                    \ifstr{#1}{paragraph}{%
+                    \Ifstr{#1}{paragraph}{%
                       \@namedef{scr at tso@#1 at numwidth}{5em}%
                     }{%
-                      \ifstr{#1}{subparagraph}{%
+                      \Ifstr{#1}{subparagraph}{%
                         \@namedef{scr at tso@#1 at numwidth}{6em}%
                       }{%
                       }%
@@ -21546,13 +21817,13 @@
   \expandafter\renewcommand%
   \csname scr at tso@#1 at LastTOCLevelWasHigher\endcsname{\LastTOCLevelWasHigher}%
   \@ifundefined{scr at tso@#1 at beforeskip}{%
-    \ifstr{#1}{part}{%
+    \Ifstr{#1}{part}{%
       \@namedef{scr at tso@#1 at beforeskip}{\glueexpr 2.25em \@plus\p@\relax}%
     }{%
-      \ifstr{#1}{chapter}{%
+      \Ifstr{#1}{chapter}{%
         \@namedef{scr at tso@#1 at beforeskip}{\glueexpr 1.0em \@plus\p@\relax}%
       }{%
-        \ifstr{#1}{section}{%
+        \Ifstr{#1}{section}{%
           \scr at ifundefinedorrelax{l at chapter}{%
             \@namedef{scr at tso@#1 at beforeskip}{\glueexpr 1.0em \@plus\p@\relax}%
           }{}%
@@ -21572,16 +21843,16 @@
   \csname scr at tso@#1 at numsep\endcsname{.4em}%
   \expandafter\renewcommand%
   \csname scr at tso@#1 at numberformat\endcsname[1]{##1}%
-  \ifstr{#1}{part}{%
+  \Ifstr{#1}{part}{%
     \expandafter\renewcommand%
     \csname scr at tso@#1 at entryformat\endcsname[1]{\large\bfseries ##1}%
   }{%
-    \ifstr{#1}{chapter}{%
+    \Ifstr{#1}{chapter}{%
       \expandafter\renewcommand%
       \csname scr at tso@#1 at entryformat\endcsname[1]{\bfseries ##1}%
     }{%
       \scr at ifundefinedorrelax{l at chapter}{%
-        \ifstr{#1}{section}{%
+        \Ifstr{#1}{section}{%
           \expandafter\renewcommand%
           \csname scr at tso@#1 at entryformat\endcsname[1]{\bfseries ##1}%
         }{}%
@@ -21593,17 +21864,17 @@
   \expandafter\renewcommand
   \csname Ifscr at tso@#1 at breakafternumber\endcsname[2]{##2}%
   \@ifundefined{scr at tso@#1 at linefill}{%
-    \ifstr{#1}{part}{%
+    \Ifstr{#1}{part}{%
       \@namedef{scr at tso@#1 at linefill}{\hfill}%
     }{%
-      \ifstr{#1}{chapter}{%
+      \Ifstr{#1}{chapter}{%
         \@namedef{scr at tso@#1 at linefill}{\hfill}%
       }{%
         \scr at ifundefinedorrelax{l at chapter}{%
-          \ifstr{#1}{section}{%
+          \Ifstr{#1}{section}{%
             \@namedef{scr at tso@#1 at linefill}{\hfill}%
-          }{}
-        }{}
+          }{}%
+        }{}%
         \expandafter\renewcommand%
         \csname scr at tso@#1 at linefill\endcsname{\TOCLineLeaderFill\relax}%
       }%
@@ -21610,22 +21881,42 @@
     }%
   }{}%
   \expandafter\renewcommand\csname Ifscr at tso@#1 at raggedpage\endcsname[2]{##2}%
-  \ifstr{#1}{part}{%
+  \Ifstr{#1}{part}{%
     \expandafter\renewcommand%
     \csname scr at tso@#1 at pagenumberformat\endcsname[1]{\large\bfseries ##1}%
   }{%
-    \expandafter\renewcommand%
-    \csname scr at tso@#1 at pagenumberformat\endcsname[1]{%
-      {\normalfont\normalcolor ##1}}%
+    \Ifstr{#1}{chapter}{%
+      \expandafter\renewcommand%
+      \csname scr at tso@#1 at pagenumberformat\endcsname[1]{\bfseries ##1}%
+    }{%
+      \scr at ifundefinedorrelax{l at chapter}{%
+        \Ifstr{#1}{section}{%
+          \expandafter\renewcommand%
+          \csname scr at tso@#1 at pagenumberformat\endcsname[1]{\bfseries ##1}%
+        }{}%
+      }{}%
+      \expandafter\renewcommand%
+      \csname scr at tso@#1 at pagenumberformat\endcsname[1]{%
+        {\normalfont\normalcolor ##1}}%
+    }%
   }%
   \expandafter\renewcommand%
   \csname scr at tso@#1 at pagenumberbox\endcsname[1]{%
-    \hb at xt@\@pnumwidth{\hfil ##1}}%
+    \hb at xt@\@nameuse{scr at dte@pagenumberwidth}{\hfil ##1}}%
   \expandafter\renewcommand\csname Ifscr at tso@#1 at dynnumwidth\endcsname[2]{##2}%
+  \expandafter\renewcommand\csname Ifscr at tso@#1 at dynindent\endcsname[2]{##2}%
+  \scr at ifundefinedorrelax{scr at tso@#1 at indentfollows}{%
+    \Ifstrstart{#1}{sub}{%
+      \expandafter\edef\csname scr at tso@#1 at indentfollows\endcsname{%
+        \scr at dte@nosub{#1}%
+      }%
+    }{%
+      \expandafter\let\csname scr at tso@#1 at indentfollows\endcsname\@empty
+    }%
+  }{}%
 }]{%
   \scr at dte@tocline{#1}{##1}{##2}%
 }
-
 %    \end{macrocode}
 % \iffalse
 %</tocbasic-xetex-bidi.def>
@@ -23024,7 +23315,6 @@
 \if at bidi@csundef{@idxitem}{}{%
 \renewcommand\@idxitem{\par\hangindent \if at 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}}{}
@@ -23032,7 +23322,6 @@
 \@ifclassloaded{artikel3}{\input{artikel3-xetex-bidi.def}}{}
 \@ifclassloaded{amsart}{\input{amsart-xetex-bidi.def}}{}
 \@ifclassloaded{letter}{\input{letter-xetex-bidi.def}}{}
-\@ifclassloaded{scrlettr}{\input{scrlettr-xetex-bidi.def}}{}
 \@ifclassloaded{extletter}{\input{extletter-xetex-bidi.def}}{}
 \@ifclassloaded{memoir}{\input{memoir-xetex-bidi.def}}{}
 \@ifclassloaded{refrep}{\input{refrep-xetex-bidi.def}}{}
@@ -23163,6 +23452,7 @@
 \@ifpackageloaded{tabls}{\input{tabls-xetex-bidi.def}}{}
 \@ifpackageloaded{tabulary}{\input{tabulary-xetex-bidi.def}}{}
 \@ifpackageloaded{tcolorbox}{\input{tcolorbox-xetex-bidi.def}}{}
+\@ifpackageloaded{tocbasic}{\input{tocbasic-xetex-bidi.def}}{}
 \@ifpackageloaded{tocstyle}{\input{tocstyle-xetex-bidi.def}}{}
 \@ifpackageloaded{tocbibind}{\@ifclassloaded{memoir}{}{\input{tocbibind-xetex-bidi.def}}}{}
 \@ifpackageloaded{tocloft}{\@ifclassloaded{memoir}{}{\input{tocloft-xetex-bidi.def}}}{}

Modified: trunk/Master/texmf-dist/source/xelatex/bidi/bidi.ins
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/bidi/bidi.ins	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/source/xelatex/bidi/bidi.ins	2022-05-22 20:24:55 UTC (rev 63370)
@@ -148,7 +148,6 @@
 \generate{\file{rotating-xetex-bidi.def}{\from{\jobname.dtx}{table,rotating-xetex-bidi.def}}}
 \generate{\file{scrartcl-xetex-bidi.def}{\from{\jobname.dtx}{table,scrartcl-xetex-bidi.def}}}
 \generate{\file{scrbook-xetex-bidi.def}{\from{\jobname.dtx}{table,scrbook-xetex-bidi.def}}}
-\generate{\file{scrlettr-xetex-bidi.def}{\from{\jobname.dtx}{table,scrlettr-xetex-bidi.def}}}
 \generate{\file{scrreprt-xetex-bidi.def}{\from{\jobname.dtx}{table,scrreprt-xetex-bidi.def}}}
 \generate{\file{sidecap-xetex-bidi.def}{\from{\jobname.dtx}{table,sidecap-xetex-bidi.def}}}
 \generate{\file{soul-xetex-bidi.def}{\from{\jobname.dtx}{table,soul-xetex-bidi.def}}}

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/adjmulticol-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/adjmulticol-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/adjmulticol-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/algorithm2e-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/algorithm2e-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/algorithm2e-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/amsart-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/amsart-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/amsart-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/amsbook-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/amsbook-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/amsbook-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/amsmath-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/amsmath-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/amsmath-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/amstext-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/amstext-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/amstext-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/amsthm-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/amsthm-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/amsthm-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/array-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/array-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/array-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/article-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/article-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/article-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/artikel1-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/artikel1-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/artikel1-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/artikel2-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/artikel2-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/artikel2-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/artikel3-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/artikel3-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/artikel3-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/arydshln-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/arydshln-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/arydshln-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidi-media9.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidi-media9.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidi-media9.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidi-perpage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidi-perpage.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidi-perpage.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidi.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidi.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidi.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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,8 +38,8 @@
 %%   Right brace   \}     Tilde         \~}
 %%
 \NeedsTeXFormat{LaTeX2e}
-\def\bididate{2022/05/20}
-\def\bidi at version{36.8}
+\def\bididate{2022/05/22}
+\def\bidi at version{36.9}
 \ProvidesPackage{bidi}[\bididate\space v\bidi at version\space
 Bidirectional typesetting in plain TeX and LaTeX]
 \edef\@bidi at info{****************************************************^^J%
@@ -127,7 +127,7 @@
 }
 \newcommand*{\@bidi at pdfcustomproperties}{%
   This is the bidi package, Version \bidi at version,
-  Released May 20, 2022.
+  Released May 22, 2022.
 }
 \@RTLmainfalse
 \AtBeginDocument{%

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidi.tex
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidi.tex	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidi.tex	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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,9 @@
 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
 %%   Right brace   \}     Tilde         \~}
 %%
-\def\bididate{2022/05/20}
+\def\bididate{2022/05/22}
 \catcode`@=11
-\def\bidi at version{36.8}
+\def\bidi at version{36.9}
 \let \protect \relax
 \newlinechar`\^^J
 \edef\@bidi at info{****************************************************^^J%
@@ -141,7 +141,7 @@
 }
 \def\@bidi at pdfcustomproperties{%
   This is the bidi package, Version \bidi at version,
-  Released May 20, 2022.
+  Released May 22, 2022.
 }
 \def\bidi at pdfm@mark{%
   \special{pdf:%

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidi2in1.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidicode.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidiftnxtra.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidimoderncv.cls	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidipoem.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/biditools.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/biditools.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/biditools.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/biditufte-book.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/biditufte-book.cls	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/biditufte-book.cls	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/biditufte-handout.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/biditufte-handout.cls	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/biditufte-handout.cls	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftegeneralstructure.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftegeneralstructure.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftegeneralstructure.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftesidenote.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftesidenote.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftesidenote.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftetitle.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftetitle.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftetitle.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftetoc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftetoc.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bidituftetoc.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/boek-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/boek-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/boek-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/boek3-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/boek3-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/boek3-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/book-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/book-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/book-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/bookest-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/bookest-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/bookest-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/breqn-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/breqn-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/breqn-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/cals-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/cals-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/cals-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/caption-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/caption-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/caption-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/caption3-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/caption3-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/caption3-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/color-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/color-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/color-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/colortbl-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/colortbl-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/colortbl-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/combine-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/combine-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/combine-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/crop-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/crop-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/crop-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/cuted-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/cutwin-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/cutwin-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/cutwin-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/cvthemebidicasual.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/cvthemebidiclassic.sty	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/dblfnote-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/dblfnote-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/dblfnote-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/diagbox-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/diagbox-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/diagbox-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/draftwatermark-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/empheq-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/empheq-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/empheq-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/eso-pic-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/eso-pic-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/eso-pic-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/extarticle-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/extarticle-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/extarticle-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/extbook-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/extbook-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/extbook-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/extletter-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/extletter-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/extletter-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/extrafootnotefeatures-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/extreport-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/extreport-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/extreport-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/fancybox-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/fancybox-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/fancybox-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/fancyhdr-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/fix2col-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/fix2col-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/fix2col-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/fleqn-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/fleqn-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/fleqn-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/float-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/float-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/float-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/floatrow-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/floatrow-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/floatrow-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/flowfram-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/footnote-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/footnote-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/footnote-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/footnotebackref-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/footnotebackref-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/footnotebackref-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/framed-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/framed-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/framed-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/ftnright-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/ftnright-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/ftnright-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/geometry-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/geometry-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/geometry-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/graphicx-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/graphicx-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/graphicx-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/hvfloat-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/hvfloat-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/hvfloat-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/imsproc-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/imsproc-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/imsproc-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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
@@ -844,7 +844,6 @@
 \if at bidi@csundef{@idxitem}{}{%
 \renewcommand\@idxitem{\par\hangindent \if at 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}}{}
@@ -852,7 +851,6 @@
 \@ifclassloaded{artikel3}{\input{artikel3-xetex-bidi.def}}{}
 \@ifclassloaded{amsart}{\input{amsart-xetex-bidi.def}}{}
 \@ifclassloaded{letter}{\input{letter-xetex-bidi.def}}{}
-\@ifclassloaded{scrlettr}{\input{scrlettr-xetex-bidi.def}}{}
 \@ifclassloaded{extletter}{\input{extletter-xetex-bidi.def}}{}
 \@ifclassloaded{memoir}{\input{memoir-xetex-bidi.def}}{}
 \@ifclassloaded{refrep}{\input{refrep-xetex-bidi.def}}{}
@@ -983,6 +981,7 @@
 \@ifpackageloaded{tabls}{\input{tabls-xetex-bidi.def}}{}
 \@ifpackageloaded{tabulary}{\input{tabulary-xetex-bidi.def}}{}
 \@ifpackageloaded{tcolorbox}{\input{tcolorbox-xetex-bidi.def}}{}
+\@ifpackageloaded{tocbasic}{\input{tocbasic-xetex-bidi.def}}{}
 \@ifpackageloaded{tocstyle}{\input{tocstyle-xetex-bidi.def}}{}
 \@ifpackageloaded{tocbibind}{\@ifclassloaded{memoir}{}{\input{tocbibind-xetex-bidi.def}}}{}
 \@ifpackageloaded{tocloft}{\@ifclassloaded{memoir}{}{\input{tocloft-xetex-bidi.def}}}{}

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/leqno-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/leqno-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/leqno-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/letter-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/letter-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/letter-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/lettrine-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/lettrine-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/lettrine-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/lineno-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/lineno-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/lineno-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/loadingorder-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/loadingorder-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/loadingorder-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/longtable-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/longtable-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/longtable-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/lscape-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/lscape-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/lscape-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/mathtools-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/mathtools-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/mathtools-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/mdframed-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/mdframed-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/mdframed-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/memoir-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/memoir-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/memoir-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/midfloat-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/midfloat-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/midfloat-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/minitoc-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/minitoc-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/minitoc-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/multicol-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/multicol-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/multicol-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/multienum-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/multienum-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/multienum-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/natbib-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/natbib-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/natbib-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/newfloat-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/newfloat-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/newfloat-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/ntheorem-hyper-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/ntheorem-hyper-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/ntheorem-hyper-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/ntheorem-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/ntheorem-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/ntheorem-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/overpic-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/overpic-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/overpic-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/pdfbase-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/pdfbase-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/pdfbase-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/pdflscape-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/pdfpages-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/pdfpages-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/pdfpages-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/pgfcorescopes.code-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/pgfcorescopes.code-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/pgfcorescopes.code-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/picinpar-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/picinpar-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/picinpar-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/plain-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/pstricks-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/pstricks-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/pstricks-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/quotchap-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/quotchap-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/quotchap-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/ragged2e-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/ragged2e-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/ragged2e-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/rapport1-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/rapport1-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/rapport1-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/rapport3-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/rapport3-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/rapport3-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/refrep-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/refrep-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/refrep-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/report-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/report-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/report-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/rotating-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/rotating-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/rotating-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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{scrartcl-xetex-bidi.def}[2017/06/09 v1.1 bidi adaptations for scrartcl class for XeTeX engine]
+\ProvidesFile{scrartcl-xetex-bidi.def}[2022/05/22 v1.2 bidi adaptations for scrartcl class for XeTeX engine]
 \newcommand{\scr at saved@LTRfootnotetext}{}
 \newcommand{\scr at saved@RTLfootnotetext}{}
 \let\scr at saved@footnotetext\@footnotetext
@@ -56,28 +56,68 @@
   \csname FN at mf@prepare\endcsname
 }
 \renewcommand\deffootnote[4][]{%
-  \long\def\@makefntext##1{%
-    \setlength{\@tempdimc}{#3}%
-    \def\@tempa{#1}\ifx\@tempa\@empty
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#2}%
-        \if at RTL\parshape \@ne 0pt \@tempdima\else\parshape \@ne #2 \@tempdima\fi}%
-    \else
-      \addtolength{\@tempdimc}{#2}%
-      \addtolength{\@tempdimc}{-#1}%
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#1}%
-        \@tempdimb = \hsize
-        \addtolength{\@tempdimb}{-#2}%
-        \if at RTL\parshape \tw@ 0pt \@tempdima 0pt \@tempdimb\else\parshape \tw@ #1 \@tempdima #2 \@tempdimb\fi
+  \expandafter\ifnum\scr at v@is at ge{3.22}\relax
+    \long\def\@makefntext##1{%
+      \ExecuteDoHook{footnote/text/begin}%
+      \raggedfootnote
+      \if at RTL
+        \rightskip
+      \else
+        \leftskip
+      \fi
+      #2
+      \l at addto@macro\@trivlist{%
+        \ifnum\@listdepth=\@ne
+          \if at RTL
+            \advance\rightmargin #2\relax
+          \else
+            \advance\leftmargin #2\relax
+          \fi
+        \fi
       }%
-    \fi
-    \par
-    \parindent\@tempdimc\noindent
-    \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
-  }%
+      \parindent #3\noindent
+      \IfArgIsEmpty{#1}{}{%
+        \hskip \dimexpr #1-#2\relax
+      }%
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+      \ExecuteDoHook{footnote/text/end}%
+    }%
+  \else
+    \ClassInfo{\KOMAClassName}{%
+      Using old \string\@makefntext\space due to compatibility
+      level\MessageBreak
+      less than 3.22}%
+    \long\def\@makefntext##1{%
+      \setlength{\@tempdimc}{#3}%
+      \def\@tempa{#1}\ifx\@tempa\@empty
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#2}%
+          \if at RTL
+            \parshape \@ne \z@ \@tempdima
+          \else
+            \parshape \@ne #2 \@tempdima
+          \fi}%
+      \else
+        \addtolength{\@tempdimc}{#2}%
+        \addtolength{\@tempdimc}{-#1}%
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#1}%
+          \@tempdimb = \hsize
+          \addtolength{\@tempdimb}{-#2}%
+           \if at RTL
+             \parshape \tw@ \z@ \@tempdima \z@ \@tempdimb
+           \else
+             \parshape \tw@ #1 \@tempdima #2 \@tempdimb
+           \fi
+        }%
+      \fi
+      \par
+      \parindent\@tempdimc\noindent
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+    }%
+  \fi
   \def\@@makefnmark{\hbox{\ftnm at font{#4}}}%
 }
 \deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
@@ -96,11 +136,48 @@
       \hbox to \columnwidth{\hskip \dimexpr\columnwidth-\ftn at rule@width\relax  \leavevmode\leaders\hrule\@height\ftn at rule@height\hfill\kern\z@}}}%
   \kern 2.6\p@}
 \renewcommand*\maketitle[1][1]{%
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+  \else
+    \def\and{%
+      \end{tabular}%
+      \hskip 1em \@plus.17fil%
+      \begin{tabular}[t]{c}%
+    }%
+  \fi
   \if at titlepage
     \begin{titlepage}
       \setcounter{page}{%
         #1%
       }%
+      \if at titlepageiscoverpage
+        \edef\titlepage at restore{%
+          \noexpand\endgroup
+          \noexpand\global\noexpand\@colht\the\@colht
+          \noexpand\global\noexpand\@colroom\the\@colroom
+          \noexpand\global\vsize\the\vsize
+          \noexpand\global\noexpand\@titlepageiscoverpagefalse
+          \noexpand\let\noexpand\titlepage at restore\noexpand\relax
+        }%
+        \begingroup
+        \topmargin=\dimexpr \coverpagetopmargin-1in\relax
+        \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \textwidth=\dimexpr
+        \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax
+        \textheight=\dimexpr
+        \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax
+        \headheight=0pt
+        \headsep=0pt
+        \footskip=\baselineskip
+        \@colht=\textheight
+        \@colroom=\textheight
+        \vsize=\textheight
+        \columnwidth=\textwidth
+        \hsize=\columnwidth
+        \linewidth=\hsize
+      \else
+        \let\titlepage at restore\relax
+      \fi
       \let\footnotesize\small
       \let\right at footnoterule\relax
       \let\left at footnoterule\relax
@@ -111,54 +188,97 @@
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
       \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
-      \ifx\@extratitle\@empty \else
-        \noindent\@extratitle\next at tpage\cleardoubleemptypage
-        \thispagestyle{empty}%
+      \ifx\@extratitle\@empty
+        \ifx\@frontispiece\@empty
+        \else
+          \if at twoside\mbox{}\next at tpage\fi
+          \noindent\@frontispiece\next at tdpage
+        \fi
+      \else
+        \noindent\@extratitle
+        \ifx\@frontispiece\@empty
+        \else
+          \next at tpage
+          \noindent\@frontispiece
+        \fi
+        \next at tdpage
       \fi
       \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
       \ifx\@titlehead\@empty \else
         \begin{minipage}[t]{\textwidth}%
-        \@titlehead
+          \usekomafont{titlehead}{\@titlehead\par}%
         \end{minipage}\par
       \fi
       \null\vfill
       \begin{center}
         \ifx\@subject\@empty \else
-          {\subject at font \@subject \par}%
+          {\usekomafont{subject}{\@subject\par}}%
           \vskip 3em
         \fi
-        {\titlefont\huge \@title\par}%
+        {\usekomafont{title}{\huge \@title\par}}%
         \vskip 1em
-        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
+        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}%
         \vskip 2em
-        {\Large \lineskip 0.75em
-          \begin{tabular}[t]{c}
-            \@author
-          \end{tabular}\par
+        {%
+          \usekomafont{author}{%
+            \lineskip 0.75em
+            \begin{tabular}[t]{c}
+              \@author
+            \end{tabular}\par
+          }%
         }%
         \vskip 1.5em
-        {\Large \@date \par}%
+        {\usekomafont{date}{\@date \par}}%
         \vskip \z@ \@plus3fill
-        {\Large \@publishers \par}%
+        {\usekomafont{publishers}{\@publishers \par}}%
         \vskip 3em
       \end{center}\par
-      \@thanks
+      \@thanks\global\let\@thanks\@empty
       \vfill\null
-      \if at twoside\next at tpage
-        \begin{minipage}[t]{\textwidth}
-          \@uppertitleback
-        \end{minipage}\par
-        \vfill
-        \begin{minipage}[b]{\textwidth}
-          \@lowertitleback
-        \end{minipage}
+      \if at twoside
+        \@tempswatrue
+        \expandafter\ifnum \@nameuse{scr at v@3.12}>\scr at compatibility\relax
+        \else
+          \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty
+            \@tempswafalse
+          \fi\fi
+        \fi
+        \if at tempswa
+          \next at tpage
+          \begin{minipage}[t]{\textwidth}
+            \@uppertitleback
+          \end{minipage}\par
+          \vfill
+          \begin{minipage}[b]{\textwidth}
+            \@lowertitleback
+          \end{minipage}\par
+          \@thanks\global\let\@thanks\@empty
+        \fi
+      \else
+        \ifx\@uppertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\uppertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
+        \ifx\@lowertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\lowertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
       \fi
-      \ifx\@dedication\@empty \else
-        \next at tpage\null\vfill
-        {\centering \Large \@dedication \par}%
+      \ifx\@dedication\@empty
+      \else
+        \next at tdpage\null\vfill
+        {\centering\usekomafont{dedication}{\@dedication \par}}%
         \vskip \z@ \@plus3fill
-        \if at twoside \next at tpage\cleardoubleemptypage \fi
+        \@thanks\global\let\@thanks\@empty
+        \cleardoubleemptypage
       \fi
+      \ifx\titlepage at restore\relax\else\clearpage\titlepage at restore\fi
     \end{titlepage}
   \else
     \par
@@ -166,102 +286,112 @@
     #1%
     \relax\ifnum\@tempcnta=1\else
       \ClassWarning{\KOMAClassName}{%
-        Optional argument of \string\maketitle\space ignored
-        at\MessageBreak
-        notitlepage-mode%
+        Optional argument of \string\maketitle\space ignored\MessageBreak
+        in `titlepage=false' mode%
       }%
     \fi
+    \ifx\@uppertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\uppertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
+    \ifx\@lowertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\lowertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
     \begingroup
+      \let\titlepage at restore\relax
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
-      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}
+      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
+      \next at tdpage
       \if at twocolumn
         \ifnum \col at number=\@ne
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \@makeextratitle
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \@makefrontispiece
+            \next at tdpage
+          \fi
           \@maketitle
         \else
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \twocolumn[\@makeextratitle]%
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \twocolumn[\@makefrontispiece]%
+            \next at tdpage
+          \fi
           \twocolumn[\@maketitle]%
         \fi
       \else
-        \newpage
-        \global\@topnum\z@
+        \ifx\@extratitle\@empty
+          \ifx\@frontispiece\@empty\else \mbox{}\fi
+        \else
+          \@makeextratitle
+        \fi
+        \ifx\@frontispiece\@empty
+          \ifx\@extratitle\@empty\else\next at tdpage\fi
+        \else
+          \next at tpage
+          \@makefrontispiece
+          \next at tdpage
+        \fi
         \@maketitle
       \fi
-      \thispagestyle{\titlepagestyle}\@thanks
+      \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi
+      \@thanks\global\let\@thanks\@empty
     \endgroup
   \fi
   \setcounter{footnote}{0}%
-  \let\thanks\relax
-  \let\LTRthanks\relax
-  \let\RTLthanks\relax
-  \let\maketitle\relax
-  \let\@maketitle\relax
-  \global\let\@thanks\@empty
-  \global\let\@author\@empty
-  \global\let\@date\@empty
-  \global\let\@title\@empty
-  \global\let\@subtitle\@empty
-  \global\let\@extratitle\@empty
-  \global\let\@titlehead\@empty
-  \global\let\@subject\@empty
-  \global\let\@publishers\@empty
-  \global\let\@uppertitleback\@empty
-  \global\let\@lowertitleback\@empty
-  \global\let\@dedication\@empty
-  \global\let\author\relax
-  \global\let\title\relax
-  \global\let\extratitle\relax
-  \global\let\titlehead\relax
-  \global\let\subject\relax
-  \global\let\publishers\relax
-  \global\let\uppertitleback\relax
-  \global\let\lowertitleback\relax
-  \global\let\dedication\relax
-  \global\let\date\relax
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+    \let\thanks\relax
+    \let\LTRthanks\relax
+    \let\RTLthanks\relax
+    \let\maketitle\relax
+    \let\@maketitle\relax
+    \global\let\@thanks\@empty
+    \global\let\@author\@empty
+    \global\let\@date\@empty
+    \global\let\@title\@empty
+    \global\let\@subtitle\@empty
+    \global\let\@extratitle\@empty
+    \global\let\@frontispiece\@empty
+    \global\let\@titlehead\@empty
+    \global\let\@subject\@empty
+    \global\let\@publishers\@empty
+    \global\let\@uppertitleback\@empty
+    \global\let\@lowertitleback\@empty
+    \global\let\@dedication\@empty
+    \global\let\author\relax
+    \global\let\title\relax
+    \global\let\extratitle\relax
+    \global\let\titlehead\relax
+    \global\let\subject\relax
+    \global\let\publishers\relax
+    \global\let\uppertitleback\relax
+    \global\let\lowertitleback\relax
+    \global\let\dedication\relax
+    \global\let\date\relax
+  \fi
   \global\let\and\relax
 }%
-\renewcommand*{\@maketitle}{%
-  \clearpage
-  \let\footnote\thanks
-  \let\LTRfootnote\LTRthanks
-  \let\RTLfootnote\RTLthanks
-  \ifx\@extratitle\@empty \else
-    \noindent\@extratitle \next at tpage \if at twoside \null\next at tpage \fi
-  \fi
-  \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
-  \ifx\@titlehead\@empty \else
-    \begin{minipage}[t]{\textwidth}
-      \@titlehead
-    \end{minipage}\par
-  \fi
-  \null
-  \vskip 2em%
-  \begin{center}%
-    \ifx\@subject\@empty \else
-      {\subject at font \@subject \par}
-      \vskip 1.5em
-    \fi
-    {\titlefont\huge \@title \par}%
-    \vskip .5em
-    {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
-    \vskip 1em
-    {\Large
-      \lineskip .5em%
-      \begin{tabular}[t]{c}
-        \@author
-      \end{tabular}\par
-    }%
-    \vskip 1em%
-    {\Large \@date \par}%
-    \vskip \z@ \@plus 1em
-    {\Large \@publishers \par}
-    \ifx\@dedication\@empty \else
-      \vskip 2em
-      {\Large \@dedication \par}
-    \fi
-  \end{center}%
-  \par
-  \vskip 2em
-}%
 \def\raggedsection{\if at RTL\raggedleft\else\raggedright\fi}
 \def\raggedpart{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*\autodot{\if at altsecnumformat\@SepMark\fi}
@@ -338,16 +468,6 @@
   \fi
   \bib at endhook
 }
-\renewcommand*\left at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hrule\@width.4\columnwidth
-  \kern 2.6\p@}
-\renewcommand*\right at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hbox to \columnwidth{\hskip .6\columnwidth \hrulefill }
-  \kern2.6\p@}
 \renewcommand*{\raggeddictum}{\if at RTL\raggedright\else\raggedleft\fi}
 \renewcommand*{\raggeddictumtext}{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*{\raggeddictumauthor}{\if at RTL\raggedright\else\raggedleft\fi}
@@ -356,77 +476,62 @@
 }
 \renewcommand{\@@makecaption}[3]{%
   \cap at margin
-  \ifonelinecaptions
-    \@tempcnta=\value{mpfootnote}\@tempcntb=\value{footnote}%
-    \let\scr at tmp@footnotetext=\@footnotetext
-    \let\@footnotetext=\@gobble
-    \let\scr at tmp@LTRfootnotetext=\@LTRfootnotetext
-    \let\@LTRfootnotetext=\@gobble
-    \let\scr at tmp@RTLfootnotetext=\@RTLfootnotetext
-    \let\@RTLfootnotetext=\@gobble
-    \sbox\@tempboxa{%
-      {\capfont{\strut\ignorespaces
-        #1{{\caplabelfont{#2\captionformat}}}%
-        #3\unskip\strut}}%
-    }%
-    \let\@footnotetext=\scr at tmp@footnotetext
-    \let\scr at tmp@footnotetext=\undefined
-    \let\@LTRfootnotetext=\scr at tmp@LTRfootnotetext
-    \let\scr at tmp@LTRfootnotetext=\undefined
-    \let\@RTLfootnotetext=\scr at tmp@RTLfootnotetext
-    \let\scr at tmp@RTLfootnotetext=\undefined
-    \setcounter{footnote}{\@tempcntb}%
-    \setcounter{mpfootnote}{\@tempcnta}%
-  \else
-    \sbox\@tempboxa{\hspace*{2\cap at width}}%
-  \fi
-  \begingroup%
-    \setlength{\@tempdima}{\cap at width}%
-    \ifdim \wd\@tempboxa >\@tempdima
-      \hb at xt@\hsize{%
-        \setbox\@tempboxa\vbox{\hsize=\cap at width
-          \ifdofullc at p
-            {\capfont{\@hangfrom{\scr at smashdp{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat}}}}}%
-              {#3\unskip\strut\par}}}%
-          \else%
-            \ifdim\cap at indent<\z@
-              {\capfont{\strut\ignorespaces
-                #1{{\caplabelfont{#2\captionformat\par}}}%
-                \noindent\hspace*{-\cap at indent}#3\unskip\strut\par}}%
-            \else%
-              \if at capbreak
-                {\capfont{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat\par}}}%
-                  \noindent\@hangfrom{\hspace*{\cap at indent}}{#3\par}}}%
-              \else
-                {\capfont{\@hangfrom{\scr at smashdp\strut\hspace*{\cap at indent}}%
-                  {\hspace{-\cap at indent}\scr at smashdp{\ignorespaces#1%
-                    {{\caplabelfont{#2\captionformat}}}}#3\unskip\strut\par}}}%
-              \fi
-            \fi
-          \fi
+  \begingroup
+    \ifonelinecaptions
+      \def\stepcounter##1{\advance\value{##1}\@ne}%
+      \let\refstepcounter\stepcounter
+      \let\label\@gobble
+      \let\@footnotetext=\@gobble
+      \let\@LTRfootnotetext=\@gobble
+      \let\@RTLfootnotetext=\@gobble
+      \let\hypertarget\@gobbletwo
+      \edef\@xnewline{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
         }%
-        \setlength{\@tempdima}{\ht\@tempboxa}%
-        \addtolength{\@tempdima}{\dp\@tempboxa}%
-        \addtolength{\@tempdima}{-\ht\strutbox}%
-        \ht\@tempboxa\ht\strutbox
-        \dp\@tempboxa\@tempdima
-        \strut\cap at left
-        \box\@tempboxa
-        \cap at right\strut
+        \unexpanded\expandafter{\@xnewline}%
       }%
+      \edef\@xcentercr{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
+        }%
+        \unexpanded\expandafter{\@xcentercr}%
+      }%
+      \settowidth{\@tempdima}{\scr@@makesinglelinecaption{#1}{#2}{#3}}%
+      \ifdim\@tempdima>\cap at width
+        \aftergroup\scr at makemultilinecaption
+      \else
+        \aftergroup\scr at makesinglelinecaption
+      \fi
     \else
-      \global \@minipagefalse
-      \sbox\@tempboxa{%
-        {\capfont{\scr at smashdp{\strut\ignorespaces
-          #1{{\caplabelfont{#2\captionformat}}}}%
-          #3}}%
-      }%
-      {\capfont{\hb at xt@\hsize{\strut\cap at left\if at RTL\beginR\fi\box\@tempboxa\if at RTL\endR\fi\cap at right\strut}}}%
+      \aftergroup\scr at makemultilinecaption
     \fi
   \endgroup
+  {#1}{#2}{#3}%
 }
+\renewcommand{\scr at makesinglelinecaption}[3]{%
+  {%
+    \usefontofkomafont{caption}{%
+      \hb at xt@\hsize{%
+        \cap at left
+        \if at RTL
+          \beginR
+        \fi
+        \scr@@makesinglelinecaption{#1}{#2}{#3}%
+        \if at RTL
+          \endR
+        \fi
+        \cap at right
+      }\par\kern\dp\strutbox%
+    }%
+  }\kern-\dp\strutbox
+}
 \renewcommand{\@makecaption}[2]{%
   \if at captionabove
     \vskip\belowcaptionskip
@@ -440,10 +545,8 @@
     \vskip\belowcaptionskip
   \fi
 }
+
 \bidi at AfterFile{longtable-xetex-bidi.def}{%
-  \@ifpackageloaded{caption2}{\@komalongtablefalse
-    \scr at caption@before at longtable@warning{caption2}%
-  }{}%
   \if at komalongtable
     \renewcommand{\LT at makecaption}[3]{%
       \noalign{%
@@ -455,6 +558,7 @@
       }%
       \LT at mcol\LT at cols c{%
         \hbox to\z@{\hss\parbox[t]\linewidth{%
+            \def\@captype{table}%
             \@@makecaption{#1}{#2}{#3}%
             \endgraf
             \if at captionabove
@@ -506,12 +610,11 @@
   \expandafter\renewcommand%
   \csname scr at tso@#1 at linefill\endcsname{%
     \if at sectionentrywithdots
-      \TOCLineLeaderFill\relax
+      {\usekomafont{sectionentrydots}{\TOCLineLeaderFill}}\relax
     \else
       \hfill
     \fi
   }%
-  % F^^fcr die Eintr^^e4ge die Schrift von Element sectionentry verwenden.
   \expandafter\renewcommand%
   \csname scr at tso@#1 at entryformat\endcsname{\usekomafont{sectionentry}}%
   \expandafter\renewcommand%
@@ -529,14 +632,6 @@
 \CloneTOCEntryStyle{subsection}{default}
 
 \DeclareSectionCommand[%
-  style=part,%
-  level=\z@,%
-  tocstyle=part,%
-  toclevel=\m at ne,%
-  tocindent=\z@,%
-  tocnumwidth=2em%
-]{part}
-\DeclareSectionCommand[%
   style=section,%
   level=1,%
   indent=\z@,%
@@ -547,6 +642,14 @@
   tocnumwidth=1.5em%
 ]{section}
 \DeclareSectionCommand[%
+  style=part,%
+  level=\z@,%
+  tocstyle=part,%
+  toclevel=\m at ne,%
+  tocindent=\z@,%
+  tocnumwidth=2em%
+]{part}
+\DeclareSectionCommand[%
   style=section,%
   level=2,%
   indent=\z@,%
@@ -573,6 +676,7 @@
   beforeskip=3.25ex \@plus1ex \@minus.2ex,%
   afterskip=-1em,%
   tocstyle=subsection,%
+  tocindentfollows=subsubsection,%
   tocindent=7.0em,%
   tocnumwidth=4.1em%
 ]{paragraph}

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/scrbook-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/scrbook-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/scrbook-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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{scrbook-xetex-bidi.def}[2017/06/09 v1.1 bidi adaptations for scrbook class for XeTeX engine]
+\ProvidesFile{scrbook-xetex-bidi.def}[2022/05/22 v1.2 bidi adaptations for scrbook class for XeTeX engine]
 \newcommand{\scr at saved@LTRfootnotetext}{}
 \newcommand{\scr at saved@RTLfootnotetext}{}
 \let\scr at saved@footnotetext\@footnotetext
@@ -56,28 +56,69 @@
   \csname FN at mf@prepare\endcsname
 }
 \renewcommand\deffootnote[4][]{%
-  \long\def\@makefntext##1{%
-    \setlength{\@tempdimc}{#3}%
-    \def\@tempa{#1}\ifx\@tempa\@empty
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#2}%
-        \if at RTL\parshape \@ne 0pt \@tempdima\else\parshape \@ne #2 \@tempdima\fi}%
-    \else
-      \addtolength{\@tempdimc}{#2}%
-      \addtolength{\@tempdimc}{-#1}%
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#1}%
-        \@tempdimb = \hsize
-        \addtolength{\@tempdimb}{-#2}%
-        \if at RTL\parshape \tw@ 0pt \@tempdima 0pt \@tempdimb\else\parshape \tw@ #1 \@tempdima #2 \@tempdimb\fi
+  \expandafter\ifnum\scr at v@is at ge{3.22}\relax
+    \long\def\@makefntext##1{%
+      \ExecuteDoHook{footnote/text/begin}%
+      \raggedfootnote
+      \if at RTL
+        \rightskip
+      \else
+        \leftskip
+      \fi
+      #2
+      \l at addto@macro\@trivlist{%
+        \ifnum\@listdepth=\@ne\advance
+          \if at RTL
+            \rightmargin #2\relax
+          \else
+            \leftmargin #2\relax
+          \fi
+        \fi
       }%
-    \fi
-    \par
-    \parindent\@tempdimc\noindent
-    \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
-  }%
+      \parindent #3\noindent
+      \IfArgIsEmpty{#1}{}{%
+        \hskip \dimexpr #1-#2\relax
+      }%
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+      \ExecuteDoHook{footnote/text/end}%
+    }%
+  \else
+    \ClassInfo{\KOMAClassName}{%
+      Using old \string\@makefntext\space due to compatibility
+      level\MessageBreak
+      less than 3.22}%
+    \long\def\@makefntext##1{%
+      \setlength{\@tempdimc}{#3}%
+      \def\@tempa{#1}\ifx\@tempa\@empty
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#2}%
+          \if at RTL
+            \parshape \@ne \z@ \@tempdima
+          \else
+            \parshape \@ne #2 \@tempdima
+          \fi
+          }%
+      \else
+        \addtolength{\@tempdimc}{#2}%
+        \addtolength{\@tempdimc}{-#1}%
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#1}%
+          \@tempdimb = \hsize
+          \addtolength{\@tempdimb}{-#2}%
+          \if at RTL
+            \parshape \tw@ \z@ \@tempdima \z@ \@tempdimb
+          \else
+            \parshape \tw@ #1 \@tempdima #2 \@tempdimb
+          \fi
+        }%
+      \fi
+      \par
+      \parindent\@tempdimc\noindent
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+    }%
+  \fi
   \def\@@makefnmark{\hbox{\ftnm at font{#4}}}%
 }
 \deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
@@ -96,11 +137,48 @@
       \hbox to \columnwidth{\hskip \dimexpr\columnwidth-\ftn at rule@width\relax  \leavevmode\leaders\hrule\@height\ftn at rule@height\hfill\kern\z@}}}%
   \kern 2.6\p@}
 \renewcommand*\maketitle[1][1]{%
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+  \else
+    \def\and{%
+      \end{tabular}%
+      \hskip 1em \@plus.17fil%
+      \begin{tabular}[t]{c}%
+    }%
+  \fi
   \if at titlepage
     \begin{titlepage}
       \setcounter{page}{%
         #1%
       }%
+      \if at titlepageiscoverpage
+        \edef\titlepage at restore{%
+          \noexpand\endgroup
+          \noexpand\global\noexpand\@colht\the\@colht
+          \noexpand\global\noexpand\@colroom\the\@colroom
+          \noexpand\global\vsize\the\vsize
+          \noexpand\global\noexpand\@titlepageiscoverpagefalse
+          \noexpand\let\noexpand\titlepage at restore\noexpand\relax
+        }%
+        \begingroup
+        \topmargin=\dimexpr \coverpagetopmargin-1in\relax
+        \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \textwidth=\dimexpr
+        \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax
+        \textheight=\dimexpr
+        \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax
+        \headheight=0pt
+        \headsep=0pt
+        \footskip=\baselineskip
+        \@colht=\textheight
+        \@colroom=\textheight
+        \vsize=\textheight
+        \columnwidth=\textwidth
+        \hsize=\columnwidth
+        \linewidth=\hsize
+      \else
+        \let\titlepage at restore\relax
+      \fi
       \let\footnotesize\small
       \let\right at footnoterule\relax
       \let\left at footnoterule\relax
@@ -111,54 +189,97 @@
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
       \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
-      \ifx\@extratitle\@empty \else
-        \noindent\@extratitle\next at tpage\cleardoubleemptypage
-        \thispagestyle{empty}%
+      \ifx\@extratitle\@empty
+        \ifx\@frontispiece\@empty
+        \else
+          \if at twoside\mbox{}\next at tpage\fi
+          \noindent\@frontispiece\next at tdpage
+        \fi
+      \else
+        \noindent\@extratitle
+        \ifx\@frontispiece\@empty
+        \else
+          \next at tpage
+          \noindent\@frontispiece
+        \fi
+        \next at tdpage
       \fi
       \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
       \ifx\@titlehead\@empty \else
         \begin{minipage}[t]{\textwidth}%
-        \@titlehead
+          \usekomafont{titlehead}{\@titlehead\par}%
         \end{minipage}\par
       \fi
       \null\vfill
       \begin{center}
         \ifx\@subject\@empty \else
-          {\subject at font \@subject \par}%
+          {\usekomafont{subject}{\@subject\par}}%
           \vskip 3em
         \fi
-        {\titlefont\huge \@title\par}%
+        {\usekomafont{title}{\huge \@title\par}}%
         \vskip 1em
-        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
+        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}%
         \vskip 2em
-        {\Large \lineskip 0.75em
-          \begin{tabular}[t]{c}
-            \@author
-          \end{tabular}\par
+        {%
+          \usekomafont{author}{%
+            \lineskip 0.75em
+            \begin{tabular}[t]{c}
+              \@author
+            \end{tabular}\par
+          }%
         }%
         \vskip 1.5em
-        {\Large \@date \par}%
+        {\usekomafont{date}{\@date \par}}%
         \vskip \z@ \@plus3fill
-        {\Large \@publishers \par}%
+        {\usekomafont{publishers}{\@publishers \par}}%
         \vskip 3em
       \end{center}\par
-      \@thanks
+      \@thanks\global\let\@thanks\@empty
       \vfill\null
-      \if at twoside\next at tpage
-        \begin{minipage}[t]{\textwidth}
-          \@uppertitleback
-        \end{minipage}\par
-        \vfill
-        \begin{minipage}[b]{\textwidth}
-          \@lowertitleback
-        \end{minipage}
+      \if at twoside
+        \@tempswatrue
+        \expandafter\ifnum \@nameuse{scr at v@3.12}>\scr at compatibility\relax
+        \else
+          \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty
+            \@tempswafalse
+          \fi\fi
+        \fi
+        \if at tempswa
+          \next at tpage
+          \begin{minipage}[t]{\textwidth}
+            \@uppertitleback
+          \end{minipage}\par
+          \vfill
+          \begin{minipage}[b]{\textwidth}
+            \@lowertitleback
+          \end{minipage}\par
+          \@thanks\global\let\@thanks\@empty
+        \fi
+      \else
+        \ifx\@uppertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\uppertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
+        \ifx\@lowertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\lowertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
       \fi
-      \ifx\@dedication\@empty \else
-        \next at tpage\null\vfill
-        {\centering \Large \@dedication \par}%
+      \ifx\@dedication\@empty
+      \else
+        \next at tdpage\null\vfill
+        {\centering\usekomafont{dedication}{\@dedication \par}}%
         \vskip \z@ \@plus3fill
-        \if at twoside \next at tpage\cleardoubleemptypage \fi
+        \@thanks\global\let\@thanks\@empty
+        \cleardoubleemptypage
       \fi
+      \ifx\titlepage at restore\relax\else\clearpage\titlepage at restore\fi
     \end{titlepage}
   \else
     \par
@@ -166,106 +287,116 @@
     #1%
     \relax\ifnum\@tempcnta=1\else
       \ClassWarning{\KOMAClassName}{%
-        Optional argument of \string\maketitle\space ignored
-        at\MessageBreak
-        notitlepage-mode%
+        Optional argument of \string\maketitle\space ignored\MessageBreak
+        in `titlepage=false' mode%
       }%
     \fi
+    \ifx\@uppertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\uppertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
+    \ifx\@lowertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\lowertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
     \begingroup
+      \let\titlepage at restore\relax
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
-      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}
+      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
+      \next at tdpage
       \if at twocolumn
         \ifnum \col at number=\@ne
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \@makeextratitle
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \@makefrontispiece
+            \next at tdpage
+          \fi
           \@maketitle
         \else
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \twocolumn[\@makeextratitle]%
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \twocolumn[\@makefrontispiece]%
+            \next at tdpage
+          \fi
           \twocolumn[\@maketitle]%
         \fi
       \else
-        \newpage
-        \global\@topnum\z@
+        \ifx\@extratitle\@empty
+          \ifx\@frontispiece\@empty\else \mbox{}\fi
+        \else
+          \@makeextratitle
+        \fi
+        \ifx\@frontispiece\@empty
+          \ifx\@extratitle\@empty\else\next at tdpage\fi
+        \else
+          \next at tpage
+          \@makefrontispiece
+          \next at tdpage
+        \fi
         \@maketitle
       \fi
-      \thispagestyle{\titlepagestyle}\@thanks
+      \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi
+      \@thanks\global\let\@thanks\@empty
     \endgroup
   \fi
   \setcounter{footnote}{0}%
-  \let\thanks\relax
-  \let\LTRthanks\relax
-  \let\RTLthanks\relax
-  \let\maketitle\relax
-  \let\@maketitle\relax
-  \global\let\@thanks\@empty
-  \global\let\@author\@empty
-  \global\let\@date\@empty
-  \global\let\@title\@empty
-  \global\let\@subtitle\@empty
-  \global\let\@extratitle\@empty
-  \global\let\@titlehead\@empty
-  \global\let\@subject\@empty
-  \global\let\@publishers\@empty
-  \global\let\@uppertitleback\@empty
-  \global\let\@lowertitleback\@empty
-  \global\let\@dedication\@empty
-  \global\let\author\relax
-  \global\let\title\relax
-  \global\let\extratitle\relax
-  \global\let\titlehead\relax
-  \global\let\subject\relax
-  \global\let\publishers\relax
-  \global\let\uppertitleback\relax
-  \global\let\lowertitleback\relax
-  \global\let\dedication\relax
-  \global\let\date\relax
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+    \let\thanks\relax
+    \let\LTRthanks\relax
+    \let\RTLthanks\relax
+    \let\maketitle\relax
+    \let\@maketitle\relax
+    \global\let\@thanks\@empty
+    \global\let\@author\@empty
+    \global\let\@date\@empty
+    \global\let\@title\@empty
+    \global\let\@subtitle\@empty
+    \global\let\@extratitle\@empty
+    \global\let\@frontispiece\@empty
+    \global\let\@titlehead\@empty
+    \global\let\@subject\@empty
+    \global\let\@publishers\@empty
+    \global\let\@uppertitleback\@empty
+    \global\let\@lowertitleback\@empty
+    \global\let\@dedication\@empty
+    \global\let\author\relax
+    \global\let\title\relax
+    \global\let\extratitle\relax
+    \global\let\titlehead\relax
+    \global\let\subject\relax
+    \global\let\publishers\relax
+    \global\let\uppertitleback\relax
+    \global\let\lowertitleback\relax
+    \global\let\dedication\relax
+    \global\let\date\relax
+  \fi
   \global\let\and\relax
 }%
-\renewcommand*{\@maketitle}{%
-  \clearpage
-  \let\footnote\thanks
-  \let\LTRfootnote\LTRthanks
-  \let\RTLfootnote\RTLthanks
-  \ifx\@extratitle\@empty \else
-    \noindent\@extratitle \next at tpage \if at twoside \null\next at tpage \fi
-  \fi
-  \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
-  \ifx\@titlehead\@empty \else
-    \begin{minipage}[t]{\textwidth}
-      \@titlehead
-    \end{minipage}\par
-  \fi
-  \null
-  \vskip 2em%
-  \begin{center}%
-    \ifx\@subject\@empty \else
-      {\subject at font \@subject \par}
-      \vskip 1.5em
-    \fi
-    {\titlefont\huge \@title \par}%
-    \vskip .5em
-    {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
-    \vskip 1em
-    {\Large
-      \lineskip .5em%
-      \begin{tabular}[t]{c}
-        \@author
-      \end{tabular}\par
-    }%
-    \vskip 1em%
-    {\Large \@date \par}%
-    \vskip \z@ \@plus 1em
-    {\Large \@publishers \par}
-    \ifx\@dedication\@empty \else
-      \vskip 2em
-      {\Large \@dedication \par}
-    \fi
-  \end{center}%
-  \par
-  \vskip 2em
-}%
 \def\raggedsection{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*\autodot{\if at altsecnumformat\@SepMark\fi}
 \renewcommand*\thesection{%
-  \ifnum \scr at compatibility>\@nameuse{scr at v@2.97d}\relax
+  \expandafter\ifnum\scr at v@is at gt{2.97d}%
     \if at mainmatter\thechapter\@SepMark\fi
   \else
   \thechapter\@SepMark%
@@ -280,28 +411,18 @@
 \renewcommand*{\thesubparagraph}{%
   \theparagraph\@SepMark\@arabic\c at subparagraph
 }
-\renewcommand*\thefigure{%
-  \ifnum \scr at compatibility>\@nameuse{scr at v@2.97d}\relax
+\expandafter\ifnum\scr at v@is at le{2.97d}%
+  \renewcommand*\thefigure{\thechapter\@SepMark\@arabic\c at figure}
+\fi
+\expandafter\ifnum\scr at v@is at le{2.97d}%
+  \renewcommand*\thetable{\thechapter\@SepMark\@arabic\c at table}
+\fi
+\renewcommand*{\theequation}{%
+  \expandafter\ifnum\scr at v@is at gt{2.97d}%
     \if at mainmatter\thechapter\@SepMark\fi
   \else
-  \thechapter\@SepMark%
+    \thechapter\@SepMark%
   \fi
-  \@arabic\c at figure
-}
-\renewcommand*\thetable{%
-  \ifnum \scr at compatibility>\@nameuse{scr at v@2.97d}\relax
-    \if at mainmatter\thechapter\@SepMark\fi
-  \else
-  \thechapter\@SepMark%
-  \fi
-  \@arabic\c at table
-}
-\renewcommand*\theequation{%
-  \ifnum \scr at compatibility>\@nameuse{scr at v@2.97d}\relax
-    \if at mainmatter\thechapter\@SepMark\fi
-  \else
-  \thechapter\@SepMark%
-  \fi
   \@arabic\c at equation
 }
 \renewenvironment{thebibliography}[1]{%
@@ -369,16 +490,6 @@
   \fi
   \bib at endhook
 }
-\renewcommand*\left at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hrule\@width.4\columnwidth
-  \kern 2.6\p@}
-\renewcommand*\right at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hbox to \columnwidth{\hskip .6\columnwidth \hrulefill }
-  \kern2.6\p@}
 \renewcommand*{\raggeddictum}{\if at RTL\raggedright\else\raggedleft\fi}
 \renewcommand*{\raggeddictumtext}{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*{\raggeddictumauthor}{\if at RTL\raggedright\else\raggedleft\fi}
@@ -387,77 +498,62 @@
 }
 \renewcommand{\@@makecaption}[3]{%
   \cap at margin
-  \ifonelinecaptions
-    \@tempcnta=\value{mpfootnote}\@tempcntb=\value{footnote}%
-    \let\scr at tmp@footnotetext=\@footnotetext
-    \let\@footnotetext=\@gobble
-    \let\scr at tmp@LTRfootnotetext=\@LTRfootnotetext
-    \let\@LTRfootnotetext=\@gobble
-    \let\scr at tmp@RTLfootnotetext=\@RTLfootnotetext
-    \let\@RTLfootnotetext=\@gobble
-    \sbox\@tempboxa{%
-      {\capfont{\strut\ignorespaces
-        #1{{\caplabelfont{#2\captionformat}}}%
-        #3\unskip\strut}}%
-    }%
-    \let\@footnotetext=\scr at tmp@footnotetext
-    \let\scr at tmp@footnotetext=\undefined
-    \let\@LTRfootnotetext=\scr at tmp@LTRfootnotetext
-    \let\scr at tmp@LTRfootnotetext=\undefined
-    \let\@RTLfootnotetext=\scr at tmp@RTLfootnotetext
-    \let\scr at tmp@RTLfootnotetext=\undefined
-    \setcounter{footnote}{\@tempcntb}%
-    \setcounter{mpfootnote}{\@tempcnta}%
-  \else
-    \sbox\@tempboxa{\hspace*{2\cap at width}}%
-  \fi
-  \begingroup%
-    \setlength{\@tempdima}{\cap at width}%
-    \ifdim \wd\@tempboxa >\@tempdima
-      \hb at xt@\hsize{%
-        \setbox\@tempboxa\vbox{\hsize=\cap at width
-          \ifdofullc at p
-            {\capfont{\@hangfrom{\scr at smashdp{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat}}}}}%
-              {#3\unskip\strut\par}}}%
-          \else%
-            \ifdim\cap at indent<\z@
-              {\capfont{\strut\ignorespaces
-                #1{{\caplabelfont{#2\captionformat\par}}}%
-                \noindent\hspace*{-\cap at indent}#3\unskip\strut\par}}%
-            \else%
-              \if at capbreak
-                {\capfont{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat\par}}}%
-                  \noindent\@hangfrom{\hspace*{\cap at indent}}{#3\par}}}%
-              \else
-                {\capfont{\@hangfrom{\scr at smashdp\strut\hspace*{\cap at indent}}%
-                  {\hspace{-\cap at indent}\scr at smashdp{\ignorespaces#1%
-                    {{\caplabelfont{#2\captionformat}}}}#3\unskip\strut\par}}}%
-              \fi
-            \fi
-          \fi
+  \begingroup
+    \ifonelinecaptions
+      \def\stepcounter##1{\advance\value{##1}\@ne}%
+      \let\refstepcounter\stepcounter
+      \let\label\@gobble
+      \let\@footnotetext=\@gobble
+      \let\@LTRfootnotetext=\@gobble
+      \let\@RTLfootnotetext=\@gobble
+      \let\hypertarget\@gobbletwo
+      \edef\@xnewline{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
         }%
-        \setlength{\@tempdima}{\ht\@tempboxa}%
-        \addtolength{\@tempdima}{\dp\@tempboxa}%
-        \addtolength{\@tempdima}{-\ht\strutbox}%
-        \ht\@tempboxa\ht\strutbox
-        \dp\@tempboxa\@tempdima
-        \strut\cap at left
-        \box\@tempboxa
-        \cap at right\strut
+        \unexpanded\expandafter{\@xnewline}%
       }%
+      \edef\@xcentercr{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
+        }%
+        \unexpanded\expandafter{\@xcentercr}%
+      }%
+      \settowidth{\@tempdima}{\scr@@makesinglelinecaption{#1}{#2}{#3}}%
+      \ifdim\@tempdima>\cap at width
+        \aftergroup\scr at makemultilinecaption
+      \else
+        \aftergroup\scr at makesinglelinecaption
+      \fi
     \else
-      \global \@minipagefalse
-      \sbox\@tempboxa{%
-        {\capfont{\scr at smashdp{\strut\ignorespaces
-          #1{{\caplabelfont{#2\captionformat}}}}%
-          #3}}%
-      }%
-      {\capfont{\hb at xt@\hsize{\strut\cap at left\if at RTL\beginR\fi\box\@tempboxa\if at RTL\endR\fi\cap at right\strut}}}%
+      \aftergroup\scr at makemultilinecaption
     \fi
   \endgroup
+  {#1}{#2}{#3}%
 }
+\renewcommand{\scr at makesinglelinecaption}[3]{%
+  {%
+    \usefontofkomafont{caption}{%
+      \hb at xt@\hsize{%
+        \cap at left
+        \if at RTL
+          \beginR
+        \fi
+        \scr@@makesinglelinecaption{#1}{#2}{#3}%
+        \if at RTL
+          \endR
+        \fi
+        \cap at right
+      }\par\kern\dp\strutbox%
+    }%
+  }\kern-\dp\strutbox
+}
 \renewcommand{\@makecaption}[2]{%
   \if at captionabove
     \vskip\belowcaptionskip
@@ -472,9 +568,6 @@
   \fi
 }
 \bidi at AfterFile{longtable-xetex-bidi.def}{%
-  \@ifpackageloaded{caption2}{\@komalongtablefalse
-    \scr at caption@before at longtable@warning{caption2}%
-  }{}%
   \if at komalongtable
     \renewcommand{\LT at makecaption}[3]{%
       \noalign{%
@@ -486,6 +579,7 @@
       }%
       \LT at mcol\LT at cols c{%
         \hbox to\z@{\hss\parbox[t]\linewidth{%
+            \def\@captype{table}%
             \@@makecaption{#1}{#2}{#3}%
             \endgraf
             \if at captionabove
@@ -537,7 +631,7 @@
   \expandafter\renewcommand%
   \csname scr at tso@#1 at linefill\endcsname{%
     \if at chapterentrywithdots
-      \TOCLineLeaderFill\relax
+      {\usekomafont{chapterentrydots}{\TOCLineLeaderFill}}\relax
     \else
       \hfill
     \fi
@@ -560,15 +654,6 @@
 \CloneTOCEntryStyle{section}{default}
 
 \DeclareSectionCommand[%
-  style=part,%
-  level=\m at ne,%
-  pagestyle=plain,%
-  tocstyle=part,%
-  toclevel=\m at ne,%
-  tocindent=\z@,%
-  tocnumwidth=2em%
-]{part}
-\DeclareSectionCommand[%
   style=chapter,%
   level=\z@,%
   pagestyle=plain,%
@@ -583,10 +668,20 @@
   beforeskip=-3.5ex \@plus -1ex \@minus -.2ex,%
   afterskip=2.3ex \@plus.2ex,%
   tocstyle=section,%
+  tocindentfollows=chapter,%
   tocindent=1.5em,%
   tocnumwidth=2.3em%
 ]{section}
 \DeclareSectionCommand[%
+  style=part,%
+  level=\m at ne,%
+  pagestyle=plain,%
+  tocstyle=part,%
+  toclevel=\m at ne,%
+  tocindent=\z@,%
+  tocnumwidth=2em%
+]{part}
+\DeclareSectionCommand[%
   style=section,%
   level=2,%
   indent=\z@,%
@@ -612,6 +707,7 @@
   indent=\z@,%
   beforeskip=3.25ex \@plus1ex \@minus.2ex,%
   afterskip=-1em,%
+  tocindentfollows=subsubsection,%
   tocstyle=section,%
   tocindent=10em,%
   tocnumwidth=5em%
@@ -626,7 +722,6 @@
   tocindent=12em,%
   tocnumwidth=6em%
 ]{subparagraph}
-
 \endinput
 %%
 %% End of file `scrbook-xetex-bidi.def'.

Deleted: trunk/Master/texmf-dist/tex/xelatex/bidi/scrlettr-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/scrlettr-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/scrlettr-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -1,150 +0,0 @@
-%%
-%% This is file `scrlettr-xetex-bidi.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% bidi.dtx  (with options: `table,scrlettr-xetex-bidi.def')
-%% 
-%%   __________________________________________________
-%%   Vafa Khalighi
-%% 
-%%   Copyright (c) 2007--2022  Vafa Khalighi
-%%   Copyright (c) 2018--2020 bidi-tex GitHub Organization
-%% 
-%%   It may be distributed and/or modified under the LaTeX Project Public License,
-%%   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{50563}
-%% \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{scrlettr-xetex-bidi.def}[2015/11/14 v0.3 bidi adaptations for scrlettr class for XeTeX engine]
-\renewcommand\deffootnote[4][]{%
-  \long\def\@makefntext##1{%
-    \edef\@tempa{#1}\ifx\@tempa\@empty
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#2}
-        \if at RTL\parshape \@ne 0pt \@tempdima\else\parshape \@ne #2 \@tempdima\fi}%
-    \else
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#1}
-        \@tempdimb = \hsize
-        \addtolength{\@tempdimb}{-#2}
-        \if at RTL\parshape \tw@ 0pt \@tempdima 0pt \@tempdimb\else\parshape \tw@ #1 \@tempdima #2 \@tempdimb\fi}%
-    \fi
-    \par
-    \parindent #3\noindent
-    \hbox to \z@{\hss\@@makefnmark}##1}
-  \def\@@makefnmark{\hbox{#4}}
-}
-\deffootnote[1em]{1.5em}{1em}
-  {\textsuperscript{\thefootnotemark}}
-\def\left at footnoterule{\kern-1\p@
- \hrule width 0.4\columnwidth
- \kern .6\p@}
-\def\right at footnoterule{%
-  \kern-1\p@
-  \hbox to \columnwidth{\hskip .6\columnwidth \hrulefill }
-  \kern .6\p@}
-\def\@datefield{\@reffalse
- \ifx\varyourref\@empty \else \@reftrue \fi
- \ifx\varyourmail\@empty \else \@reftrue \fi
- \ifx\varmyref\@empty \else \@reftrue \fi
- \ifx\varcustomer\@empty \else \@reftrue \fi
- \ifx\varinvoice\@empty \else \@reftrue \fi
- \ifx\varrefitemi\@empty \else \@reftrue \fi
- \ifx\varrefitemii\@empty \else \@reftrue \fi
- \ifx\varrefitemiii\@empty \else \@reftrue \fi
- \vskip -\parskip
- \vskip \refvskip
- \if at ref
-  \ifx\varyourref\@empty \else
-   \settowidth{\sc at temp}{\varyourref}
-   \setbox0\hbox{\scriptsize \sf \yourrefname}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varyourref}\hfill
-  \fi
-  \ifx\varyourmail\@empty \else
-   \settowidth{\sc at temp}{\varyourmail}
-   \setbox0\hbox{\scriptsize \sf \yourmailname}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varyourmail}\hfill
-  \fi
-  \ifx\varmyref\@empty \else
-   \settowidth{\sc at temp}{\varmyref}
-   \setbox0\hbox{\scriptsize \sf \myrefname}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varmyref}\hfill
-  \fi
-  \ifx\varcustomer\@empty \else
-   \settowidth{\sc at temp}{\varcustomer}
-   \setbox0\hbox{\scriptsize \sf \customername}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varcustomer}\hfill
-  \fi
-  \ifx\varinvoice\@empty \else
-   \settowidth{\sc at temp}{\varinvoice}
-   \setbox0\hbox{\scriptsize \sf \invoicename}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varinvoice}\hfill
-  \fi
-  \ifx\varrefitemi\@empty \else
-   \settowidth{\sc at temp}{\varrefitemi}
-   \setbox0\hbox{\scriptsize \sf \varrefitemnamei}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varrefitemi}\hfill
-  \fi
-  \ifx\varrefitemii\@empty \else
-   \settowidth{\sc at temp}{\varrefitemii}
-   \setbox0\hbox{\scriptsize \sf \varrefitemnameii}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varrefitemii}\hfill
-  \fi
-  \ifx\varrefitemiii\@empty \else
-   \settowidth{\sc at temp}{\varrefitemiii}
-   \setbox0\hbox{\scriptsize \sf \varrefitemnameiii}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \varrefitemiii}\hfill
-  \fi
-  \ifx\@date\@empty \else
-   \settowidth{\sc at temp}{\@date}
-   \setbox0\hbox{\scriptsize \sf \datename}
-   \ifdim \sc at temp > \wd0 \sc@@temp\sc at temp \else \sc@@temp\wd0 \fi
-   \parbox[t]{\sc@@temp}{\noindent \box0\par \@date}
-  \fi
-  \par
-  \vspace{2.5\baselineskip}
- \else
-  {\ifx\@date\@empty \else \if at RTL\raggedright\else\raggedleft\fi\fromplace\ \@date\par \fi}
-  \vspace{1.5\baselineskip}
- \fi}
-\long\def\closing#1{\par\nobreak\vspace{0.5\baselineskip}
- \stopbreaks \noindent \sc at temp\textwidth \advance\sc at temp by
- -\sigindent \hspace{\sigindent}%
- \parbox{\sc at temp}{\if at RTL\raggedleft\else\raggedright\fi\ignorespaces #1\mbox{}\\[\presig at skip]
- \fromsig\strut}\par
- \vspace{1.5\baselineskip}}
-\endinput
-%%
-%% End of file `scrlettr-xetex-bidi.def'.

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/scrreprt-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/scrreprt-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/scrreprt-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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{scrreprt-xetex-bidi.def}[2017/06/09 v1.1 bidi adaptations for scrreprt class for XeTeX engine]
+\ProvidesFile{scrreprt-xetex-bidi.def}[2022/05/22 v1.2 bidi adaptations for scrreprt class for XeTeX engine]
 \newcommand{\scr at saved@LTRfootnotetext}{}
 \newcommand{\scr at saved@RTLfootnotetext}{}
 \let\scr at saved@footnotetext\@footnotetext
@@ -56,28 +56,69 @@
   \csname FN at mf@prepare\endcsname
 }
 \renewcommand\deffootnote[4][]{%
-  \long\def\@makefntext##1{%
-    \setlength{\@tempdimc}{#3}%
-    \def\@tempa{#1}\ifx\@tempa\@empty
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#2}%
-        \if at RTL\parshape \@ne 0pt \@tempdima\else\parshape \@ne #2 \@tempdima\fi}%
-    \else
-      \addtolength{\@tempdimc}{#2}%
-      \addtolength{\@tempdimc}{-#1}%
-      \@setpar{\@@par
-        \@tempdima = \hsize
-        \addtolength{\@tempdima}{-#1}%
-        \@tempdimb = \hsize
-        \addtolength{\@tempdimb}{-#2}%
-        \if at RTL\parshape \tw@ 0pt \@tempdima 0pt \@tempdimb\else\parshape \tw@ #1 \@tempdima #2 \@tempdimb\fi
+  \expandafter\ifnum\scr at v@is at ge{3.22}\relax
+    \long\def\@makefntext##1{%
+      \ExecuteDoHook{footnote/text/begin}%
+      \raggedfootnote
+      \if at RTL
+        \rightskip
+      \else
+        \leftskip
+      \fi
+      #2
+      \l at addto@macro\@trivlist{%
+        \ifnum\@listdepth=\@ne
+          \if at RTL
+            \advance\rightmargin #2\relax
+          \else
+            \advance\leftmargin #2\relax
+          \fi
+        \fi
       }%
-    \fi
-    \par
-    \parindent\@tempdimc\noindent
-    \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
-  }%
+      \parindent #3\noindent
+      \IfArgIsEmpty{#1}{}{%
+        \hskip \dimexpr #1-#2\relax
+      }%
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+      \ExecuteDoHook{footnote/text/end}%
+    }%
+  \else
+    \ClassInfo{\KOMAClassName}{%
+      Using old \string\@makefntext\space due to compatibility
+      level\MessageBreak
+      less than 3.22}%
+    \long\def\@makefntext##1{%
+      \setlength{\@tempdimc}{#3}%
+      \def\@tempa{#1}\ifx\@tempa\@empty
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#2}%
+          \if at RTL
+            \parshape \@ne \z@ \@tempdima
+          \else
+            \parshape \@ne #2 \@tempdima
+          \fi
+          }%
+      \else
+        \addtolength{\@tempdimc}{#2}%
+        \addtolength{\@tempdimc}{-#1}%
+        \@setpar{\@@par
+          \@tempdima = \hsize
+          \addtolength{\@tempdima}{-#1}%
+          \@tempdimb = \hsize
+          \addtolength{\@tempdimb}{-#2}%
+          \if at RTL
+            \parshape \tw@ \z@ \@tempdima \z@ \@tempdimb
+          \else
+            \parshape \tw@ #1 \@tempdima #2 \@tempdimb
+          \fi
+        }%
+      \fi
+      \par
+      \parindent\@tempdimc\noindent
+      \ftn at font\hbox to \z@{\hss\@@makefnmark}##1%
+    }%
+  \fi
   \def\@@makefnmark{\hbox{\ftnm at font{#4}}}%
 }
 \deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
@@ -96,11 +137,48 @@
       \hbox to \columnwidth{\hskip \dimexpr\columnwidth-\ftn at rule@width\relax  \leavevmode\leaders\hrule\@height\ftn at rule@height\hfill\kern\z@}}}%
   \kern 2.6\p@}
 \renewcommand*\maketitle[1][1]{%
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+  \else
+    \def\and{%
+      \end{tabular}%
+      \hskip 1em \@plus.17fil%
+      \begin{tabular}[t]{c}%
+    }%
+  \fi
   \if at titlepage
     \begin{titlepage}
       \setcounter{page}{%
         #1%
       }%
+      \if at titlepageiscoverpage
+        \edef\titlepage at restore{%
+          \noexpand\endgroup
+          \noexpand\global\noexpand\@colht\the\@colht
+          \noexpand\global\noexpand\@colroom\the\@colroom
+          \noexpand\global\vsize\the\vsize
+          \noexpand\global\noexpand\@titlepageiscoverpagefalse
+          \noexpand\let\noexpand\titlepage at restore\noexpand\relax
+        }%
+        \begingroup
+        \topmargin=\dimexpr \coverpagetopmargin-1in\relax
+        \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax
+        \textwidth=\dimexpr
+        \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax
+        \textheight=\dimexpr
+        \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax
+        \headheight=0pt
+        \headsep=0pt
+        \footskip=\baselineskip
+        \@colht=\textheight
+        \@colroom=\textheight
+        \vsize=\textheight
+        \columnwidth=\textwidth
+        \hsize=\columnwidth
+        \linewidth=\hsize
+      \else
+        \let\titlepage at restore\relax
+      \fi
       \let\footnotesize\small
       \let\right at footnoterule\relax
       \let\left at footnoterule\relax
@@ -111,54 +189,97 @@
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
       \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
-      \ifx\@extratitle\@empty \else
-        \noindent\@extratitle\next at tpage\cleardoubleemptypage
-        \thispagestyle{empty}%
+      \ifx\@extratitle\@empty
+        \ifx\@frontispiece\@empty
+        \else
+          \if at twoside\mbox{}\next at tpage\fi
+          \noindent\@frontispiece\next at tdpage
+        \fi
+      \else
+        \noindent\@extratitle
+        \ifx\@frontispiece\@empty
+        \else
+          \next at tpage
+          \noindent\@frontispiece
+        \fi
+        \next at tdpage
       \fi
       \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
       \ifx\@titlehead\@empty \else
         \begin{minipage}[t]{\textwidth}%
-        \@titlehead
+          \usekomafont{titlehead}{\@titlehead\par}%
         \end{minipage}\par
       \fi
       \null\vfill
       \begin{center}
         \ifx\@subject\@empty \else
-          {\subject at font \@subject \par}%
+          {\usekomafont{subject}{\@subject\par}}%
           \vskip 3em
         \fi
-        {\titlefont\huge \@title\par}%
+        {\usekomafont{title}{\huge \@title\par}}%
         \vskip 1em
-        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
+        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}%
         \vskip 2em
-        {\Large \lineskip 0.75em
-          \begin{tabular}[t]{c}
-            \@author
-          \end{tabular}\par
+        {%
+          \usekomafont{author}{%
+            \lineskip 0.75em
+            \begin{tabular}[t]{c}
+              \@author
+            \end{tabular}\par
+          }%
         }%
         \vskip 1.5em
-        {\Large \@date \par}%
+        {\usekomafont{date}{\@date \par}}%
         \vskip \z@ \@plus3fill
-        {\Large \@publishers \par}%
+        {\usekomafont{publishers}{\@publishers \par}}%
         \vskip 3em
       \end{center}\par
-      \@thanks
+      \@thanks\global\let\@thanks\@empty
       \vfill\null
-      \if at twoside\next at tpage
-        \begin{minipage}[t]{\textwidth}
-          \@uppertitleback
-        \end{minipage}\par
-        \vfill
-        \begin{minipage}[b]{\textwidth}
-          \@lowertitleback
-        \end{minipage}
+      \if at twoside
+        \@tempswatrue
+        \expandafter\ifnum \@nameuse{scr at v@3.12}>\scr at compatibility\relax
+        \else
+          \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty
+            \@tempswafalse
+          \fi\fi
+        \fi
+        \if at tempswa
+          \next at tpage
+          \begin{minipage}[t]{\textwidth}
+            \@uppertitleback
+          \end{minipage}\par
+          \vfill
+          \begin{minipage}[b]{\textwidth}
+            \@lowertitleback
+          \end{minipage}\par
+          \@thanks\global\let\@thanks\@empty
+        \fi
+      \else
+        \ifx\@uppertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\uppertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
+        \ifx\@lowertitleback\@empty\else
+          \ClassWarning{\KOMAClassName}{%
+            non empty \string\lowertitleback\space ignored
+            by \string\maketitle\MessageBreak
+            in `twoside=false' mode%
+          }%
+        \fi
       \fi
-      \ifx\@dedication\@empty \else
-        \next at tpage\null\vfill
-        {\centering \Large \@dedication \par}%
+      \ifx\@dedication\@empty
+      \else
+        \next at tdpage\null\vfill
+        {\centering\usekomafont{dedication}{\@dedication \par}}%
         \vskip \z@ \@plus3fill
-        \if at twoside \next at tpage\cleardoubleemptypage \fi
+        \@thanks\global\let\@thanks\@empty
+        \cleardoubleemptypage
       \fi
+      \ifx\titlepage at restore\relax\else\clearpage\titlepage at restore\fi
     \end{titlepage}
   \else
     \par
@@ -166,102 +287,112 @@
     #1%
     \relax\ifnum\@tempcnta=1\else
       \ClassWarning{\KOMAClassName}{%
-        Optional argument of \string\maketitle\space ignored
-        at\MessageBreak
-        notitlepage-mode%
+        Optional argument of \string\maketitle\space ignored\MessageBreak
+        in `titlepage=false' mode%
       }%
     \fi
+    \ifx\@uppertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\uppertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
+    \ifx\@lowertitleback\@empty\else
+      \ClassWarning{\KOMAClassName}{%
+        non empty \string\lowertitleback\space ignored
+        by \string\maketitle\MessageBreak
+        in `titlepage=false' mode%
+      }%
+    \fi
     \begingroup
+      \let\titlepage at restore\relax
       \renewcommand*\thefootnote{\@fnsymbol\c at footnote}%
       \let\@oldmakefnmark\@makefnmark
-      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}
+      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
+      \next at tdpage
       \if at twocolumn
         \ifnum \col at number=\@ne
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \@makeextratitle
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \@makefrontispiece
+            \next at tdpage
+          \fi
           \@maketitle
         \else
+          \ifx\@extratitle\@empty
+            \ifx\@frontispiece\@empty\else\if at twoside\mbox{}\fi\fi
+          \else
+            \twocolumn[\@makeextratitle]%
+          \fi
+          \ifx\@frontispiece\@empty
+            \ifx\@extratitle\@empty\else\next at tdpage\fi
+          \else
+            \next at tpage
+            \twocolumn[\@makefrontispiece]%
+            \next at tdpage
+          \fi
           \twocolumn[\@maketitle]%
         \fi
       \else
-        \newpage
-        \global\@topnum\z@
+        \ifx\@extratitle\@empty
+          \ifx\@frontispiece\@empty\else \mbox{}\fi
+        \else
+          \@makeextratitle
+        \fi
+        \ifx\@frontispiece\@empty
+          \ifx\@extratitle\@empty\else\next at tdpage\fi
+        \else
+          \next at tpage
+          \@makefrontispiece
+          \next at tdpage
+        \fi
         \@maketitle
       \fi
-      \thispagestyle{\titlepagestyle}\@thanks
+      \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi
+      \@thanks\global\let\@thanks\@empty
     \endgroup
   \fi
   \setcounter{footnote}{0}%
-  \let\thanks\relax
-  \let\LTRthanks\relax
-  \let\RTLthanks\relax
-  \let\maketitle\relax
-  \let\@maketitle\relax
-  \global\let\@thanks\@empty
-  \global\let\@author\@empty
-  \global\let\@date\@empty
-  \global\let\@title\@empty
-  \global\let\@subtitle\@empty
-  \global\let\@extratitle\@empty
-  \global\let\@titlehead\@empty
-  \global\let\@subject\@empty
-  \global\let\@publishers\@empty
-  \global\let\@uppertitleback\@empty
-  \global\let\@lowertitleback\@empty
-  \global\let\@dedication\@empty
-  \global\let\author\relax
-  \global\let\title\relax
-  \global\let\extratitle\relax
-  \global\let\titlehead\relax
-  \global\let\subject\relax
-  \global\let\publishers\relax
-  \global\let\uppertitleback\relax
-  \global\let\lowertitleback\relax
-  \global\let\dedication\relax
-  \global\let\date\relax
+  \expandafter\ifnum \csname scr at v@3.12\endcsname>\scr at compatibility\relax
+    \let\thanks\relax
+    \let\LTRthanks\relax
+    \let\RTLthanks\relax
+    \let\maketitle\relax
+    \let\@maketitle\relax
+    \global\let\@thanks\@empty
+    \global\let\@author\@empty
+    \global\let\@date\@empty
+    \global\let\@title\@empty
+    \global\let\@subtitle\@empty
+    \global\let\@extratitle\@empty
+    \global\let\@frontispiece\@empty
+    \global\let\@titlehead\@empty
+    \global\let\@subject\@empty
+    \global\let\@publishers\@empty
+    \global\let\@uppertitleback\@empty
+    \global\let\@lowertitleback\@empty
+    \global\let\@dedication\@empty
+    \global\let\author\relax
+    \global\let\title\relax
+    \global\let\extratitle\relax
+    \global\let\titlehead\relax
+    \global\let\subject\relax
+    \global\let\publishers\relax
+    \global\let\uppertitleback\relax
+    \global\let\lowertitleback\relax
+    \global\let\dedication\relax
+    \global\let\date\relax
+  \fi
   \global\let\and\relax
 }%
-\renewcommand*{\@maketitle}{%
-  \clearpage
-  \let\footnote\thanks
-  \let\LTRfootnote\LTRthanks
-  \let\RTLfootnote\RTLthanks
-  \ifx\@extratitle\@empty \else
-    \noindent\@extratitle \next at tpage \if at twoside \null\next at tpage \fi
-  \fi
-  \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par at updaterelative
-  \ifx\@titlehead\@empty \else
-    \begin{minipage}[t]{\textwidth}
-      \@titlehead
-    \end{minipage}\par
-  \fi
-  \null
-  \vskip 2em%
-  \begin{center}%
-    \ifx\@subject\@empty \else
-      {\subject at font \@subject \par}
-      \vskip 1.5em
-    \fi
-    {\titlefont\huge \@title \par}%
-    \vskip .5em
-    {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
-    \vskip 1em
-    {\Large
-      \lineskip .5em%
-      \begin{tabular}[t]{c}
-        \@author
-      \end{tabular}\par
-    }%
-    \vskip 1em%
-    {\Large \@date \par}%
-    \vskip \z@ \@plus 1em
-    {\Large \@publishers \par}
-    \ifx\@dedication\@empty \else
-      \vskip 2em
-      {\Large \@dedication \par}
-    \fi
-  \end{center}%
-  \par
-  \vskip 2em
-}%
 \def\raggedsection{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*\autodot{\if at altsecnumformat\@SepMark\fi}
 \renewcommand*\thesection{%
@@ -276,14 +407,12 @@
 \renewcommand*{\thesubparagraph}{%
   \theparagraph\@SepMark\@arabic\c at subparagraph
 }
-\renewcommand*\thefigure{%
-  \thechapter\@SepMark%
-  \@arabic\c at figure
-}
-\renewcommand*\thetable{%
-  \thechapter\@SepMark%
-  \@arabic\c at table
-}
+\expandafter\ifnum\scr at v@is at le{2.97d}%
+  \renewcommand*\thefigure{\thechapter\@SepMark\@arabic\c at figure}
+\fi
+\expandafter\ifnum\scr at v@is at le{2.97d}%
+  \renewcommand*\thetable{\thechapter\@SepMark\@arabic\c at table}
+\fi
 \renewcommand*\theequation{%
   \thechapter\@SepMark%
   \@arabic\c at equation
@@ -353,16 +482,6 @@
   \fi
   \bib at endhook
 }
-\renewcommand*\left at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hrule\@width.4\columnwidth
-  \kern 2.6\p@}
-\renewcommand*\right at footnoterule{%
-  \kern-3\p@
-  \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
-  \hbox to \columnwidth{\hskip .6\columnwidth \hrulefill }
-  \kern2.6\p@}
 \renewcommand*{\raggeddictum}{\if at RTL\raggedright\else\raggedleft\fi}
 \renewcommand*{\raggeddictumtext}{\if at RTL\raggedleft\else\raggedright\fi}
 \renewcommand*{\raggeddictumauthor}{\if at RTL\raggedright\else\raggedleft\fi}
@@ -371,77 +490,62 @@
 }
 \renewcommand{\@@makecaption}[3]{%
   \cap at margin
-  \ifonelinecaptions
-    \@tempcnta=\value{mpfootnote}\@tempcntb=\value{footnote}%
-    \let\scr at tmp@footnotetext=\@footnotetext
-    \let\@footnotetext=\@gobble
-    \let\scr at tmp@LTRfootnotetext=\@LTRfootnotetext
-    \let\@LTRfootnotetext=\@gobble
-    \let\scr at tmp@RTLfootnotetext=\@RTLfootnotetext
-    \let\@RTLfootnotetext=\@gobble
-    \sbox\@tempboxa{%
-      {\capfont{\strut\ignorespaces
-        #1{{\caplabelfont{#2\captionformat}}}%
-        #3\unskip\strut}}%
-    }%
-    \let\@footnotetext=\scr at tmp@footnotetext
-    \let\scr at tmp@footnotetext=\undefined
-    \let\@LTRfootnotetext=\scr at tmp@LTRfootnotetext
-    \let\scr at tmp@LTRfootnotetext=\undefined
-   \let\@RTLfootnotetext=\scr at tmp@RTLfootnotetext
-    \let\scr at tmp@RTLfootnotetext=\undefined
-    \setcounter{footnote}{\@tempcntb}%
-    \setcounter{mpfootnote}{\@tempcnta}%
-  \else
-    \sbox\@tempboxa{\hspace*{2\cap at width}}%
-  \fi
-  \begingroup%
-    \setlength{\@tempdima}{\cap at width}%
-    \ifdim \wd\@tempboxa >\@tempdima
-      \hb at xt@\hsize{%
-        \setbox\@tempboxa\vbox{\hsize=\cap at width
-          \ifdofullc at p
-            {\capfont{\@hangfrom{\scr at smashdp{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat}}}}}%
-              {#3\unskip\strut\par}}}%
-          \else%
-            \ifdim\cap at indent<\z@
-              {\capfont{\strut\ignorespaces
-                #1{{\caplabelfont{#2\captionformat\par}}}%
-                \noindent\hspace*{-\cap at indent}#3\unskip\strut\par}}%
-            \else%
-              \if at capbreak
-                {\capfont{\strut\ignorespaces
-                  #1{{\caplabelfont{#2\captionformat\par}}}%
-                  \noindent\@hangfrom{\hspace*{\cap at indent}}{#3\par}}}%
-              \else
-                {\capfont{\@hangfrom{\scr at smashdp\strut\hspace*{\cap at indent}}%
-                  {\hspace{-\cap at indent}\scr at smashdp{\ignorespaces#1%
-                    {{\caplabelfont{#2\captionformat}}}}#3\unskip\strut\par}}}%
-              \fi
-            \fi
-          \fi
+  \begingroup
+    \ifonelinecaptions
+      \def\stepcounter##1{\advance\value{##1}\@ne}%
+      \let\refstepcounter\stepcounter
+      \let\label\@gobble
+      \let\@footnotetext=\@gobble
+      \let\@LTRfootnotetext=\@gobble
+      \let\@RTLfootnotetext=\@gobble
+      \let\hypertarget\@gobbletwo
+      \edef\@xnewline{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
         }%
-        \setlength{\@tempdima}{\ht\@tempboxa}%
-        \addtolength{\@tempdima}{\dp\@tempboxa}%
-        \addtolength{\@tempdima}{-\ht\strutbox}%
-        \ht\@tempboxa\ht\strutbox
-        \dp\@tempboxa\@tempdima
-        \strut\cap at left
-        \box\@tempboxa
-        \cap at right\strut
+        \unexpanded\expandafter{\@xnewline}%
       }%
+      \edef\@xcentercr{%
+        \unexpanded{\ClassInfo{\KOMAClassName}{%
+            Workaround for not recommended usage of \string\\ or\MessageBreak
+            \string\newline in caption text
+          }%
+          \hspace*{\linewidth}\hspace{1sp}%
+        }%
+        \unexpanded\expandafter{\@xcentercr}%
+      }%
+      \settowidth{\@tempdima}{\scr@@makesinglelinecaption{#1}{#2}{#3}}%
+      \ifdim\@tempdima>\cap at width
+        \aftergroup\scr at makemultilinecaption
+      \else
+        \aftergroup\scr at makesinglelinecaption
+      \fi
     \else
-      \global \@minipagefalse
-      \sbox\@tempboxa{%
-        {\capfont{\scr at smashdp{\strut\ignorespaces
-          #1{{\caplabelfont{#2\captionformat}}}}%
-          #3}}%
-      }%
-      {\capfont{\hb at xt@\hsize{\strut\cap at left\if at RTL\beginR\fi\box\@tempboxa\if at RTL\endR\fi\cap at right\strut}}}%
+      \aftergroup\scr at makemultilinecaption
     \fi
   \endgroup
+  {#1}{#2}{#3}%
 }
+\renewcommand{\scr at makesinglelinecaption}[3]{%
+  {%
+    \usefontofkomafont{caption}{%
+      \hb at xt@\hsize{%
+        \cap at left
+        \if at RTL
+          \beginR
+        \fi
+        \scr@@makesinglelinecaption{#1}{#2}{#3}%
+        \if at RTL
+          \endR
+        \fi
+        \cap at right
+      }\par\kern\dp\strutbox%
+    }%
+  }\kern-\dp\strutbox
+}
 \renewcommand{\@makecaption}[2]{%
   \if at captionabove
     \vskip\belowcaptionskip
@@ -456,9 +560,6 @@
   \fi
 }
 \bidi at AfterFile{longtable-xetex-bidi.def}{%
-  \@ifpackageloaded{caption2}{\@komalongtablefalse
-    \scr at caption@before at longtable@warning{caption2}%
-  }{}%
   \if at komalongtable
     \renewcommand{\LT at makecaption}[3]{%
       \noalign{%
@@ -470,6 +571,7 @@
       }%
       \LT at mcol\LT at cols c{%
         \hbox to\z@{\hss\parbox[t]\linewidth{%
+            \def\@captype{table}%
             \@@makecaption{#1}{#2}{#3}%
             \endgraf
             \if at captionabove
@@ -521,7 +623,7 @@
   \expandafter\renewcommand%
   \csname scr at tso@#1 at linefill\endcsname{%
     \if at chapterentrywithdots
-      \TOCLineLeaderFill\relax
+      {\usekomafont{chapterentrydots}{\TOCLineLeaderFill}}\relax
     \else
       \hfill
     \fi
@@ -544,15 +646,6 @@
 \CloneTOCEntryStyle{section}{default}
 
 \DeclareSectionCommand[%
-  style=part,%
-  level=\m at ne,%
-  pagestyle=plain,%
-  tocstyle=part,%
-  toclevel=\m at ne,%
-  tocindent=\z@,%
-  tocnumwidth=2em%
-]{part}
-\DeclareSectionCommand[%
   style=chapter,%
   level=\z@,%
   pagestyle=plain,%
@@ -567,10 +660,20 @@
   beforeskip=-3.5ex \@plus -1ex \@minus -.2ex,%
   afterskip=2.3ex \@plus.2ex,%
   tocstyle=section,%
+  tocindentfollows=chapter,%
   tocindent=1.5em,%
   tocnumwidth=2.3em%
 ]{section}
 \DeclareSectionCommand[%
+  style=part,%
+  level=\m at ne,%
+  pagestyle=plain,%
+  tocstyle=part,%
+  toclevel=\m at ne,%
+  tocindent=\z@,%
+  tocnumwidth=2em%
+]{part}
+\DeclareSectionCommand[%
   style=section,%
   level=2,%
   indent=\z@,%
@@ -596,6 +699,7 @@
   indent=\z@,%
   beforeskip=3.25ex \@plus1ex \@minus.2ex,%
   afterskip=-1em,%
+  tocindentfollows=subsubsection,%
   tocstyle=section,%
   tocindent=10em,%
   tocnumwidth=5em%
@@ -610,7 +714,6 @@
   tocindent=12em,%
   tocnumwidth=6em%
 ]{subparagraph}
-
 \endinput
 %%
 %% End of file `scrreprt-xetex-bidi.def'.

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/sidecap-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/sidecap-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/sidecap-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/soul-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/soul-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/soul-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/stabular-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/stabular-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/stabular-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/subfigure-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/subfigure-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/subfigure-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/tabls-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/tabls-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/tabls-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/tabularx-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/tabularx-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/tabularx-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/tabulary-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/tabulary-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/tabulary-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/tc-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/tc-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/tc-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/tcolorbox-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/tcolorbox-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/tcolorbox-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/titlesec-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/titlesec-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/titlesec-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/titletoc-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/titletoc-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/titletoc-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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{tocbasic-xetex-bidi.def}[2016/09/14 v0.2 bidi adaptations for tocbasic package for XeTeX engine]
+\ProvidesFile{tocbasic-xetex-bidi.def}[2022/05/22 v0.3 bidi adaptations for tocbasic package for XeTeX engine]
 \bidi at undef\scr at dte@def at l@undottedtocline
 \bidi at undef\scr at dte@undottedtocline at init
 \DeclareTOCEntryStyle{undottedtocline}[{%
@@ -46,15 +46,15 @@
   \DefineTOCEntryLengthOption{numwidth}%
     {scr at tso@}{@numwidth}{entry number width}%
   \@ifundefined{#1tocdepth}{%
-    \ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
-      \ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
-        \ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
-          \ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
-            \ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
-              \ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
-                \ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
-                  \ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
-                    \ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
+    \Ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
+      \Ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
+        \Ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
+          \Ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
+            \Ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
+              \Ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
+                \Ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
+                  \Ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
+                    \Ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
                       \expandafter\let\csname #1tocdepth\expandafter\endcsname
                       \csname #1numdepth\endcsname
                     }%
@@ -69,20 +69,20 @@
   }{}%
   \@ifundefined{scr at tso@#1 at indent}{%
     \@ifundefined{scr@#1 at tocindent}{%
-      \ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-        \ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-          \ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
-            \ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+      \Ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+        \Ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+          \Ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+            \Ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
               \scr at ifundefinedorrelax{l at chapter}{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{3.8em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{7em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{10em}%
                         }{%
                         }%
@@ -91,15 +91,15 @@
                   }%
                 }%
               }{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{7.0em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{10em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{12em}%
                         }{%
                         }%
@@ -118,19 +118,19 @@
   }{}%
   \@ifundefined{scr at tso@#1 at numwidth}{%
     \@ifundefined{scr@#1 at tocnumwidth}{%
-      \ifstr{#1}{figure}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-        \ifstr{#1}{table}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-          \ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
+      \Ifstr{#1}{figure}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+        \Ifstr{#1}{table}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+          \Ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
             \scr at ifundefinedorrelax{chapter}{%
-              \ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
-                \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-                  \ifstr{#1}{subsubsection}{%
+              \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
+                \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+                  \Ifstr{#1}{subsubsection}{%
                     \@namedef{scr at tso@#1 at numwidth}{3.2em}%
                   }{%
-                    \ifstr{#1}{paragraph}{%
+                    \Ifstr{#1}{paragraph}{%
                       \@namedef{scr at tso@#1 at numwidth}{4.1em}%
                     }{%
-                      \ifstr{#1}{subparagraph}{%
+                      \Ifstr{#1}{subparagraph}{%
                         \@namedef{scr at tso@#1 at numwidth}{5m}%
                       }{%
                       }%
@@ -139,15 +139,15 @@
                 }%
               }%
             }{%
-              \ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-                \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{3.2em}}{%
-                  \ifstr{#1}{subsubsection}{%
+              \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+                \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{3.2em}}{%
+                  \Ifstr{#1}{subsubsection}{%
                     \@namedef{scr at tso@#1 at numwidth}{3.1em}%
                   }{%
-                    \ifstr{#1}{paragraph}{%
+                    \Ifstr{#1}{paragraph}{%
                       \@namedef{scr at tso@#1 at numwidth}{5em}%
                     }{%
-                      \ifstr{#1}{subparagraph}{%
+                      \Ifstr{#1}{subparagraph}{%
                         \@namedef{scr at tso@#1 at numwidth}{6em}%
                       }{%
                       }%
@@ -184,8 +184,12 @@
       \leavevmode
       \bfseries
       \advance\bidi at leftskip\@tempdima
-      \advance\bidi at leftskip\@nameuse{scr at tso@#1 at indent}%
-      \hskip -\dimexpr \bidi at leftskip-\@nameuse{scr at tso@#1 at indent}\relax
+      \Iftocfeature{\@currext}{noindent}{%
+        \hskip -\bidi at leftskip
+      }{%
+        \advance\bidi at leftskip\@nameuse{scr at tso@#1 at indent}%
+        \hskip -\dimexpr \bidi at leftskip-\@nameuse{scr at tso@#1 at indent}\relax
+      }%
       ##1%
       \nobreak
       \hfil \nobreak\hb at xt@\@pnumwidth{\hss ##2}%
@@ -201,15 +205,15 @@
   \DefineTOCEntryLengthOption{indent}%
     {scr at tso@}{@indent}{entry indent}%
   \@ifundefined{#1tocdepth}{%
-    \ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
-      \ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
-        \ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
-          \ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
-            \ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
-              \ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
-                \ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
-                  \ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
-                    \ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
+    \Ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
+      \Ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
+        \Ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
+          \Ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
+            \Ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
+              \Ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
+                \Ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
+                  \Ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
+                    \Ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
                       \expandafter\let\csname #1tocdepth\expandafter\endcsname
                       \csname #1numdepth\endcsname
                     }%
@@ -224,20 +228,20 @@
   }{}%
   \@ifundefined{scr at tso@#1 at indent}{%
     \@ifundefined{scr@#1 at tocindent}{%
-      \ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-        \ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-          \ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
-            \ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+      \Ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+        \Ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+          \Ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+            \Ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
               \scr at ifundefinedorrelax{l at chapter}{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{3.8em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{7em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{10em}%
                         }{%
                         }%
@@ -246,15 +250,15 @@
                   }%
                 }%
               }{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{7.0em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{10em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{12em}%
                         }{%
                         }%
@@ -292,7 +296,10 @@
       \leavevmode
       \large
       \bfseries
-      \advance\bidi at leftskip\@nameuse{scr at tso@#1 at indent}%
+      \Iftocfeature{\@currext}{noindent}{%
+      }{%
+        \advance\bidi at leftskip\@nameuse{scr at tso@#1 at indent}%
+      }%
       ##1%
       \hfil \nobreak\hb at xt@\@pnumwidth{\hss ##2}%
       \par
@@ -311,14 +318,57 @@
   \else
     \tocbasic at DependOnPenaltyAndTOCLevel{#1}%
     \addvspace{\@nameuse{scr at tso@#1 at beforeskip}}\relax
+    \@nameuse{Ifscr at tso@#1 at dynindent}{%
+      \expandafter\ifx\csname scr at tso@#1 at indentfollows\endcsname\@empty
+        \PackageWarning{tocbasic}{`dynindent' for `#1' not available}%
+      \else
+        \edef\reserved at a{\@nameuse{scr at tso@#1 at indentfollows}}%
+        \@for \reserved at a:=\reserved at a\do {%
+          \scr at trim@spaces\reserved at a
+          \ifx\reserved at a\@empty\else
+            \scr at ifundefinedorrelax{\reserved at a tocdepth}{%
+            }{%
+              \ifnum \@nameuse{\reserved at a tocdepth}<\@nameuse{#1tocdepth}%
+                \@tempdima\@nameuse{scr at tso@\reserved at a @indent}\relax
+                \@nameuse{Ifscr at tso@\reserved at a @dynnumwidth}{%
+                  \scr at ifundefinedorrelax
+                  {scr at dte@\reserved at a @lastmaxnumwidth}{%
+                    \advance\@tempdima
+                    \@nameuse{scr at tso@\reserved at a @numwidth}\relax
+                  }{%
+                    \advance\@tempdima
+                    \@nameuse{scr at dte@\reserved at a @lastmaxnumwidth}\relax
+                  }%
+                }{%
+                  \advance\@tempdima
+                  \@nameuse{scr at tso@\reserved at a @numwidth}\relax
+                }%
+                \ifdim \@tempdima>\@nameuse{scr at tso@#1 at indent}\relax
+                  \expandafter\edef\csname scr at tso@#1 at indent\endcsname
+                  {\the\@tempdima}%
+                \fi
+              \fi
+            }%
+          \fi
+        }%
+      \fi
+    }{}%
     {%
-      \bidi at leftskip \@nameuse{scr at tso@#1 at indent}\relax
-      \bidi at rightskip \@tocrmarg
+      \Iftocfeature{\@currext}{noindent}{%
+        \bidi at leftskip \z@
+      }{%
+        \bidi at leftskip \@nameuse{scr at tso@#1 at indent}\relax
+      }%
+      \bidi at rightskip \@nameuse{scr at tso@#1 at rightindent}\relax
       \parfillskip -\bidi at rightskip
       \@nameuse{Ifscr at tso@#1 at raggedpage}{%
         \addtolength{\parfillskip}{\z@ \@plus 1fil}%
       }{}%
-      \parindent \@nameuse{scr at tso@#1 at indent}\relax
+      \Iftocfeature{\@currext}{noindent}{%
+        \parindent \z@
+      }{%
+        \parindent \@nameuse{scr at tso@#1 at indent}\relax
+      }%
       \@afterindenttrue
       \interlinepenalty\@M
       \expandafter\ifx\csname ragged#1entry\endcsname\raggedright
@@ -352,6 +402,7 @@
           \sbox\scr at dte@tocline at numbox{\@nameuse{scr at tso@#1 at numberformat}{##1}}%
           \global\scr at dte@tocline at numberwidth
           \dimexpr\wd\scr at dte@tocline at numbox+\@nameuse{scr at tso@#1 at numsep}\relax
+          \relax
           \ifdim \scr at dte@tocline at numberwidth
                 >\@nameuse{scr at dte@#1 at maxnumwidth}\relax
             \global\@nameuse{scr at dte@#1 at maxnumwidth}\scr at dte@tocline at numberwidth
@@ -359,9 +410,8 @@
           \@nameuse{Ifscr at tso@#1 at dynnumwidth}{}{%
             \ifdim \scr at dte@tocline at numberwidth
                   >\dimexpr \@nameuse{scr at tso@#1 at numwidth}%
-                           +\@nameuse{scr at tso@#1 at numsep}\relax
-              \PackageWarning{tocbasic%
-              }{%
+                           +\@nameuse{scr at tso@#1 at numsep}\relax\relax
+              \PackageWarning{tocbasic}{%
                 number width of #1 toc entries should be
                 increased!\MessageBreak
                 Currently used number width =
@@ -385,6 +435,8 @@
           {%
             \normalfont\normalsize\@nameuse{scr at tso@#1 at linefill}%
             \nobreak
+            \expandafter\let\expandafter\scr at dte@pagenumberwidth
+            \csname scr at tso@#1 at pagenumberwidth\endcsname
             \@nameuse{scr at tso@#1 at pagenumberbox}{%
               \@nameuse{scr at tso@#1 at pagenumberformat}{#3}%
             }%
@@ -406,6 +458,10 @@
     {scr at tso@}{@breakafternumber}{line break after number flag}%
   \DefineTOCEntryIfOption{dynnumwidth}%
     {scr at tso@}{@dynnumwidth}{dynamic number width flag}%
+  \DefineTOCEntryListOption{indentfollows}%
+    {scr at tso@}{@indentfollows}{list of levels that define the indent}%
+  \DefineTOCEntryIfOption{dynindent}%
+    {scr at tso@}{@dynindent}{dynamic indent width flag}%
   \DefineTOCEntryCommandOption{entryformat}%
     {scr at tso@}{@entryformat}[1]{entry format}%
   \DefineTOCEntryCommandOption{entrynumberformat}%
@@ -424,6 +480,10 @@
     {scr at tso@}{@pagenumberbox}[1]{page number box}%
   \DefineTOCEntryCommandOption{pagenumberformat}%
     {scr at tso@}{@pagenumberformat}[1]{page number format}%
+  \DefineTOCEntryLengthOption{pagenumberwidth}%
+    {scr at tso@}{@pagenumberwidth}{width of page number box}%
+  \DefineTOCEntryLengthOption{rightindent}%
+    {scr at tso@}{@rightindent}{entry's text right indent}%
   \DefineTOCEntryOption{raggedentrytext}[true]{%
     \FamilySetBool{KOMAarg}{raggedentrytext}{@tempswa}{##1}%
     \ifx\FamilyKeyState\FamilyKeyStateProcessed
@@ -443,7 +503,7 @@
   \DefineTOCEntryLengthOption{numwidth}%
     {scr at tso@}{@numwidth}{entry number width}%
   \scr at ifundefinedorrelax{#1tocdepth}{%
-    \ifstrstart{#1}{sub}{%
+    \Ifstrstart{#1}{sub}{%
       \scr at ifundefinedorrelax{\scr at dte@nosub{#1}tocdepth}{}{%
         \expandafter\edef\csname #1tocdepth\endcsname{%
           \the\numexpr \noexpand\@nameuse{\scr at dte@nosub{#1}tocdepth}+\@ne\relax
@@ -452,15 +512,15 @@
     }{}%
   }{}%
   \@ifundefined{#1tocdepth}{%
-    \ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
-      \ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
-        \ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
-          \ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
-            \ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
-              \ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
-                \ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
-                  \ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
-                    \ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
+    \Ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
+      \Ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
+        \Ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
+          \Ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
+            \Ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
+              \Ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
+                \Ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
+                  \Ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
+                    \Ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
                       \expandafter\let\csname #1tocdepth\expandafter\endcsname
                       \csname #1numdepth\endcsname
                     }%
@@ -475,7 +535,7 @@
   }{}%
   \scr at ifundefinedorrelax{scr at tso@#1 at indent}{%
     \@ifundefined{scr@#1 at tocindent}{%
-      \ifstrstart{#1}{sub}{%
+      \Ifstrstart{#1}{sub}{%
         \scr at ifundefinedorrelax{scr at tso@\scr at dte@nosub{#1}@indent}{%
           \scr at ifundefinedorrelax{scr at tso@\scr at dte@nosub{#1}@numwidth}{}{%
             \expandafter\edef\csname scr at tso@#1 at indent\endcsname{%
@@ -502,21 +562,47 @@
       \@namedef{scr at tso@#1 at indent}{\@nameuse{scr@#1 at tocindent}}%
     }%
   }{}%
+  \scr at ifundefinedorrelax{scr at tso@#1 at pagenumberwidth}{%
+    \Ifstrstart{#1}{sub}{%
+      \scr at ifundefinedorrelax{scr at tso@\scr at dte@nosub{#1}@pagenumberwidth}{%
+        \@namedef{scr at tso@#1 at pagenumberwidth}{\@pnumwidth}%
+      }{%
+        \expandafter\let
+        \csname scr at tso@#1 at pagenumberwidth\expandafter\endcsname
+        \csname scr at tso@\scr at dte@nosub{#1}@pagenumberwidth\endcsname
+      }%
+    }{%
+      \@namedef{scr at tso@#1 at pagenumberwidth}{\@pnumwidth}%
+    }%
+  }{}%
+  \scr at ifundefinedorrelax{scr at tso@#1 at rightindent}{%
+    \Ifstrstart{#1}{sub}{%
+      \scr at ifundefinedorrelax{scr at tso@\scr at dte@nosub{#1}@rightindent}{%
+        \@namedef{scr at tso@#1 at rightindent}{\@tocrmarg}%
+      }{%
+        \expandafter\let
+        \csname scr at tso@#1 at rightindent\expandafter\endcsname
+        \csname scr at tso@\scr at dte@nosub{#1}@rightindent\endcsname
+      }%
+    }{%
+      \@namedef{scr at tso@#1 at rightindent}{\@tocrmarg}%
+    }%
+  }{}%
   \@ifundefined{scr at tso@#1 at indent}{%
-      \ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-        \ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-          \ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
-            \ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+      \Ifstr{#1}{figure}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+        \Ifstr{#1}{table}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+          \Ifstr{#1}{part}{\@namedef{scr at tso@#1 at indent}{0em}}{%
+            \Ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at indent}{0em}}{%
               \scr at ifundefinedorrelax{l at chapter}{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{0pt}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{3.8em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{7em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{10em}%
                         }{%
                         }%
@@ -525,15 +611,15 @@
                   }%
                 }%
               }{%
-                \ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
-                  \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
-                    \ifstr{#1}{subsubsection}{%
+                \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at indent}{1.5em}}{%
+                  \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at indent}{3.8em}}{%
+                    \Ifstr{#1}{subsubsection}{%
                       \@namedef{scr at tso@#1 at indent}{7.0em}%
                     }{%
-                      \ifstr{#1}{paragraph}{%
+                      \Ifstr{#1}{paragraph}{%
                         \@namedef{scr at tso@#1 at indent}{10em}%
                       }{%
-                        \ifstr{#1}{subparagraph}{%
+                        \Ifstr{#1}{subparagraph}{%
                           \@namedef{scr at tso@#1 at indent}{12em}%
                         }{%
                         }%
@@ -549,7 +635,7 @@
   }{}%
   \scr at ifundefinedorrelax{scr at tso@#1 at numwidth}{%
     \scr at ifundefinedorrelax{scr@#1 at tocnumwidth}{%
-      \ifstrstart{#1}{sub}{%
+      \Ifstrstart{#1}{sub}{%
         \scr at ifundefinedorrelax{scr at tso@\scr at dte@nosub{#1}@numwidth}{}{%
           \expandafter\edef\csname scr at tso@#1 at numwidth\endcsname{%
             \glueexpr \noexpand\@nameuse{scr at tso@\scr at dte@nosub{#1}@numwidth}%
@@ -563,19 +649,19 @@
     }%
   }{}%
   \@ifundefined{scr at tso@#1 at numwidth}{%
-      \ifstr{#1}{figure}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-        \ifstr{#1}{table}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-          \ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
+      \Ifstr{#1}{figure}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+        \Ifstr{#1}{table}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+          \Ifstr{#1}{chapter}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
             \scr at ifundefinedorrelax{chapter}{%
-              \ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
-                \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-                  \ifstr{#1}{subsubsection}{%
+              \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{1.5em}}{%
+                \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+                  \Ifstr{#1}{subsubsection}{%
                     \@namedef{scr at tso@#1 at numwidth}{3.2em}%
                   }{%
-                    \ifstr{#1}{paragraph}{%
+                    \Ifstr{#1}{paragraph}{%
                       \@namedef{scr at tso@#1 at numwidth}{4.1em}%
                     }{%
-                      \ifstr{#1}{subparagraph}{%
+                      \Ifstr{#1}{subparagraph}{%
                         \@namedef{scr at tso@#1 at numwidth}{5m}%
                       }{%
                       }%
@@ -584,15 +670,15 @@
                 }%
               }%
             }{%
-              \ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
-                \ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{3.2em}}{%
-                  \ifstr{#1}{subsubsection}{%
+              \Ifstr{#1}{section}{\@namedef{scr at tso@#1 at numwidth}{2.3em}}{%
+                \Ifstr{#1}{subsection}{\@namedef{scr at tso@#1 at numwidth}{3.2em}}{%
+                  \Ifstr{#1}{subsubsection}{%
                     \@namedef{scr at tso@#1 at numwidth}{3.1em}%
                   }{%
-                    \ifstr{#1}{paragraph}{%
+                    \Ifstr{#1}{paragraph}{%
                       \@namedef{scr at tso@#1 at numwidth}{5em}%
                     }{%
-                      \ifstr{#1}{subparagraph}{%
+                      \Ifstr{#1}{subparagraph}{%
                         \@namedef{scr at tso@#1 at numwidth}{6em}%
                       }{%
                       }%
@@ -612,13 +698,13 @@
   \expandafter\renewcommand%
   \csname scr at tso@#1 at LastTOCLevelWasHigher\endcsname{\LastTOCLevelWasHigher}%
   \@ifundefined{scr at tso@#1 at beforeskip}{%
-    \ifstr{#1}{part}{%
+    \Ifstr{#1}{part}{%
       \@namedef{scr at tso@#1 at beforeskip}{\glueexpr 2.25em \@plus\p@\relax}%
     }{%
-      \ifstr{#1}{chapter}{%
+      \Ifstr{#1}{chapter}{%
         \@namedef{scr at tso@#1 at beforeskip}{\glueexpr 1.0em \@plus\p@\relax}%
       }{%
-        \ifstr{#1}{section}{%
+        \Ifstr{#1}{section}{%
           \scr at ifundefinedorrelax{l at chapter}{%
             \@namedef{scr at tso@#1 at beforeskip}{\glueexpr 1.0em \@plus\p@\relax}%
           }{}%
@@ -638,16 +724,16 @@
   \csname scr at tso@#1 at numsep\endcsname{.4em}%
   \expandafter\renewcommand%
   \csname scr at tso@#1 at numberformat\endcsname[1]{##1}%
-  \ifstr{#1}{part}{%
+  \Ifstr{#1}{part}{%
     \expandafter\renewcommand%
     \csname scr at tso@#1 at entryformat\endcsname[1]{\large\bfseries ##1}%
   }{%
-    \ifstr{#1}{chapter}{%
+    \Ifstr{#1}{chapter}{%
       \expandafter\renewcommand%
       \csname scr at tso@#1 at entryformat\endcsname[1]{\bfseries ##1}%
     }{%
       \scr at ifundefinedorrelax{l at chapter}{%
-        \ifstr{#1}{section}{%
+        \Ifstr{#1}{section}{%
           \expandafter\renewcommand%
           \csname scr at tso@#1 at entryformat\endcsname[1]{\bfseries ##1}%
         }{}%
@@ -659,17 +745,17 @@
   \expandafter\renewcommand
   \csname Ifscr at tso@#1 at breakafternumber\endcsname[2]{##2}%
   \@ifundefined{scr at tso@#1 at linefill}{%
-    \ifstr{#1}{part}{%
+    \Ifstr{#1}{part}{%
       \@namedef{scr at tso@#1 at linefill}{\hfill}%
     }{%
-      \ifstr{#1}{chapter}{%
+      \Ifstr{#1}{chapter}{%
         \@namedef{scr at tso@#1 at linefill}{\hfill}%
       }{%
         \scr at ifundefinedorrelax{l at chapter}{%
-          \ifstr{#1}{section}{%
+          \Ifstr{#1}{section}{%
             \@namedef{scr at tso@#1 at linefill}{\hfill}%
-          }{}
-        }{}
+          }{}%
+        }{}%
         \expandafter\renewcommand%
         \csname scr at tso@#1 at linefill\endcsname{\TOCLineLeaderFill\relax}%
       }%
@@ -676,22 +762,42 @@
     }%
   }{}%
   \expandafter\renewcommand\csname Ifscr at tso@#1 at raggedpage\endcsname[2]{##2}%
-  \ifstr{#1}{part}{%
+  \Ifstr{#1}{part}{%
     \expandafter\renewcommand%
     \csname scr at tso@#1 at pagenumberformat\endcsname[1]{\large\bfseries ##1}%
   }{%
-    \expandafter\renewcommand%
-    \csname scr at tso@#1 at pagenumberformat\endcsname[1]{%
-      {\normalfont\normalcolor ##1}}%
+    \Ifstr{#1}{chapter}{%
+      \expandafter\renewcommand%
+      \csname scr at tso@#1 at pagenumberformat\endcsname[1]{\bfseries ##1}%
+    }{%
+      \scr at ifundefinedorrelax{l at chapter}{%
+        \Ifstr{#1}{section}{%
+          \expandafter\renewcommand%
+          \csname scr at tso@#1 at pagenumberformat\endcsname[1]{\bfseries ##1}%
+        }{}%
+      }{}%
+      \expandafter\renewcommand%
+      \csname scr at tso@#1 at pagenumberformat\endcsname[1]{%
+        {\normalfont\normalcolor ##1}}%
+    }%
   }%
   \expandafter\renewcommand%
   \csname scr at tso@#1 at pagenumberbox\endcsname[1]{%
-    \hb at xt@\@pnumwidth{\hfil ##1}}%
+    \hb at xt@\@nameuse{scr at dte@pagenumberwidth}{\hfil ##1}}%
   \expandafter\renewcommand\csname Ifscr at tso@#1 at dynnumwidth\endcsname[2]{##2}%
+  \expandafter\renewcommand\csname Ifscr at tso@#1 at dynindent\endcsname[2]{##2}%
+  \scr at ifundefinedorrelax{scr at tso@#1 at indentfollows}{%
+    \Ifstrstart{#1}{sub}{%
+      \expandafter\edef\csname scr at tso@#1 at indentfollows\endcsname{%
+        \scr at dte@nosub{#1}%
+      }%
+    }{%
+      \expandafter\let\csname scr at tso@#1 at indentfollows\endcsname\@empty
+    }%
+  }{}%
 }]{%
   \scr at dte@tocline{#1}{##1}{##2}%
 }
-
 \endinput
 %%
 %% End of file `tocbasic-xetex-bidi.def'.

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/tocbibind-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/tocbibind-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/tocbibind-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/tocloft-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/tocloft-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/tocloft-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/tocstyle-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/tocstyle-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/tocstyle-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/wrapfig-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/wrapfig-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/wrapfig-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/xcolor-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/xcolor-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/xcolor-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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

Modified: trunk/Master/texmf-dist/tex/xelatex/bidi/xltxtra-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/bidi/xltxtra-xetex-bidi.def	2022-05-22 20:24:00 UTC (rev 63369)
+++ trunk/Master/texmf-dist/tex/xelatex/bidi/xltxtra-xetex-bidi.def	2022-05-22 20:24:55 UTC (rev 63370)
@@ -20,7 +20,7 @@
 %%   by Vafa Khalighi.
 %% 
 %% 
-%% \CheckSum{50563}
+%% \CheckSum{50672}
 %% \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



More information about the tex-live-commits mailing list.