diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def | 358 |
1 files changed, 232 insertions, 126 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def index b0486d3b9e9..d9a3cc54998 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/tocbasic-xetex-bidi.def @@ -20,7 +20,7 @@ %% by Vafa Khalighi. %% %% -%% \CheckSum{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@undef\scr@dte@def@l@undottedtocline \bidi@undef\scr@dte@undottedtocline@init \DeclareTOCEntryStyle{undottedtocline}[{% @@ -46,15 +46,15 @@ \DefineTOCEntryLengthOption{numwidth}% {scr@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@tso@#1@indent}{% \@ifundefined{scr@#1@tocindent}{% - \ifstr{#1}{figure}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{table}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{part}{\@namedef{scr@tso@#1@indent}{0em}}{% - \ifstr{#1}{chapter}{\@namedef{scr@tso@#1@indent}{0em}}{% + \Ifstr{#1}{figure}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{table}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{part}{\@namedef{scr@tso@#1@indent}{0em}}{% + \Ifstr{#1}{chapter}{\@namedef{scr@tso@#1@indent}{0em}}{% \scr@ifundefinedorrelax{l@chapter}{% - \ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{0pt}}{% - \ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{subsubsection}{% + \Ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{0pt}}{% + \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{subsubsection}{% \@namedef{scr@tso@#1@indent}{3.8em}% }{% - \ifstr{#1}{paragraph}{% + \Ifstr{#1}{paragraph}{% \@namedef{scr@tso@#1@indent}{7em}% }{% - \ifstr{#1}{subparagraph}{% + \Ifstr{#1}{subparagraph}{% \@namedef{scr@tso@#1@indent}{10em}% }{% }% @@ -91,15 +91,15 @@ }% }% }{% - \ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{3.8em}}{% - \ifstr{#1}{subsubsection}{% + \Ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{3.8em}}{% + \Ifstr{#1}{subsubsection}{% \@namedef{scr@tso@#1@indent}{7.0em}% }{% - \ifstr{#1}{paragraph}{% + \Ifstr{#1}{paragraph}{% \@namedef{scr@tso@#1@indent}{10em}% }{% - \ifstr{#1}{subparagraph}{% + \Ifstr{#1}{subparagraph}{% \@namedef{scr@tso@#1@indent}{12em}% }{% }% @@ -118,19 +118,19 @@ }{}% \@ifundefined{scr@tso@#1@numwidth}{% \@ifundefined{scr@#1@tocnumwidth}{% - \ifstr{#1}{figure}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% - \ifstr{#1}{table}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% - \ifstr{#1}{chapter}{\@namedef{scr@tso@#1@numwidth}{1.5em}}{% + \Ifstr{#1}{figure}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% + \Ifstr{#1}{table}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% + \Ifstr{#1}{chapter}{\@namedef{scr@tso@#1@numwidth}{1.5em}}{% \scr@ifundefinedorrelax{chapter}{% - \ifstr{#1}{section}{\@namedef{scr@tso@#1@numwidth}{1.5em}}{% - \ifstr{#1}{subsection}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% - \ifstr{#1}{subsubsection}{% + \Ifstr{#1}{section}{\@namedef{scr@tso@#1@numwidth}{1.5em}}{% + \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% + \Ifstr{#1}{subsubsection}{% \@namedef{scr@tso@#1@numwidth}{3.2em}% }{% - \ifstr{#1}{paragraph}{% + \Ifstr{#1}{paragraph}{% \@namedef{scr@tso@#1@numwidth}{4.1em}% }{% - \ifstr{#1}{subparagraph}{% + \Ifstr{#1}{subparagraph}{% \@namedef{scr@tso@#1@numwidth}{5m}% }{% }% @@ -139,15 +139,15 @@ }% }% }{% - \ifstr{#1}{section}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% - \ifstr{#1}{subsection}{\@namedef{scr@tso@#1@numwidth}{3.2em}}{% - \ifstr{#1}{subsubsection}{% + \Ifstr{#1}{section}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% + \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@numwidth}{3.2em}}{% + \Ifstr{#1}{subsubsection}{% \@namedef{scr@tso@#1@numwidth}{3.1em}% }{% - \ifstr{#1}{paragraph}{% + \Ifstr{#1}{paragraph}{% \@namedef{scr@tso@#1@numwidth}{5em}% }{% - \ifstr{#1}{subparagraph}{% + \Ifstr{#1}{subparagraph}{% \@namedef{scr@tso@#1@numwidth}{6em}% }{% }% @@ -184,8 +184,12 @@ \leavevmode \bfseries \advance\bidi@leftskip\@tempdima - \advance\bidi@leftskip\@nameuse{scr@tso@#1@indent}% - \hskip -\dimexpr \bidi@leftskip-\@nameuse{scr@tso@#1@indent}\relax + \Iftocfeature{\@currext}{noindent}{% + \hskip -\bidi@leftskip + }{% + \advance\bidi@leftskip\@nameuse{scr@tso@#1@indent}% + \hskip -\dimexpr \bidi@leftskip-\@nameuse{scr@tso@#1@indent}\relax + }% ##1% \nobreak \hfil \nobreak\hb@xt@\@pnumwidth{\hss ##2}% @@ -201,15 +205,15 @@ \DefineTOCEntryLengthOption{indent}% {scr@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@tso@#1@indent}{% \@ifundefined{scr@#1@tocindent}{% - \ifstr{#1}{figure}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{table}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{part}{\@namedef{scr@tso@#1@indent}{0em}}{% - \ifstr{#1}{chapter}{\@namedef{scr@tso@#1@indent}{0em}}{% + \Ifstr{#1}{figure}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{table}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{part}{\@namedef{scr@tso@#1@indent}{0em}}{% + \Ifstr{#1}{chapter}{\@namedef{scr@tso@#1@indent}{0em}}{% \scr@ifundefinedorrelax{l@chapter}{% - \ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{0pt}}{% - \ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{subsubsection}{% + \Ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{0pt}}{% + \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{subsubsection}{% \@namedef{scr@tso@#1@indent}{3.8em}% }{% - \ifstr{#1}{paragraph}{% + \Ifstr{#1}{paragraph}{% \@namedef{scr@tso@#1@indent}{7em}% }{% - \ifstr{#1}{subparagraph}{% + \Ifstr{#1}{subparagraph}{% \@namedef{scr@tso@#1@indent}{10em}% }{% }% @@ -246,15 +250,15 @@ }% }% }{% - \ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{3.8em}}{% - \ifstr{#1}{subsubsection}{% + \Ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{3.8em}}{% + \Ifstr{#1}{subsubsection}{% \@namedef{scr@tso@#1@indent}{7.0em}% }{% - \ifstr{#1}{paragraph}{% + \Ifstr{#1}{paragraph}{% \@namedef{scr@tso@#1@indent}{10em}% }{% - \ifstr{#1}{subparagraph}{% + \Ifstr{#1}{subparagraph}{% \@namedef{scr@tso@#1@indent}{12em}% }{% }% @@ -292,7 +296,10 @@ \leavevmode \large \bfseries - \advance\bidi@leftskip\@nameuse{scr@tso@#1@indent}% + \Iftocfeature{\@currext}{noindent}{% + }{% + \advance\bidi@leftskip\@nameuse{scr@tso@#1@indent}% + }% ##1% \hfil \nobreak\hb@xt@\@pnumwidth{\hss ##2}% \par @@ -311,14 +318,57 @@ \else \tocbasic@DependOnPenaltyAndTOCLevel{#1}% \addvspace{\@nameuse{scr@tso@#1@beforeskip}}\relax + \@nameuse{Ifscr@tso@#1@dynindent}{% + \expandafter\ifx\csname scr@tso@#1@indentfollows\endcsname\@empty + \PackageWarning{tocbasic}{`dynindent' for `#1' not available}% + \else + \edef\reserved@a{\@nameuse{scr@tso@#1@indentfollows}}% + \@for \reserved@a:=\reserved@a\do {% + \scr@trim@spaces\reserved@a + \ifx\reserved@a\@empty\else + \scr@ifundefinedorrelax{\reserved@a tocdepth}{% + }{% + \ifnum \@nameuse{\reserved@a tocdepth}<\@nameuse{#1tocdepth}% + \@tempdima\@nameuse{scr@tso@\reserved@a @indent}\relax + \@nameuse{Ifscr@tso@\reserved@a @dynnumwidth}{% + \scr@ifundefinedorrelax + {scr@dte@\reserved@a @lastmaxnumwidth}{% + \advance\@tempdima + \@nameuse{scr@tso@\reserved@a @numwidth}\relax + }{% + \advance\@tempdima + \@nameuse{scr@dte@\reserved@a @lastmaxnumwidth}\relax + }% + }{% + \advance\@tempdima + \@nameuse{scr@tso@\reserved@a @numwidth}\relax + }% + \ifdim \@tempdima>\@nameuse{scr@tso@#1@indent}\relax + \expandafter\edef\csname scr@tso@#1@indent\endcsname + {\the\@tempdima}% + \fi + \fi + }% + \fi + }% + \fi + }{}% {% - \bidi@leftskip \@nameuse{scr@tso@#1@indent}\relax - \bidi@rightskip \@tocrmarg + \Iftocfeature{\@currext}{noindent}{% + \bidi@leftskip \z@ + }{% + \bidi@leftskip \@nameuse{scr@tso@#1@indent}\relax + }% + \bidi@rightskip \@nameuse{scr@tso@#1@rightindent}\relax \parfillskip -\bidi@rightskip \@nameuse{Ifscr@tso@#1@raggedpage}{% \addtolength{\parfillskip}{\z@ \@plus 1fil}% }{}% - \parindent \@nameuse{scr@tso@#1@indent}\relax + \Iftocfeature{\@currext}{noindent}{% + \parindent \z@ + }{% + \parindent \@nameuse{scr@tso@#1@indent}\relax + }% \@afterindenttrue \interlinepenalty\@M \expandafter\ifx\csname ragged#1entry\endcsname\raggedright @@ -352,6 +402,7 @@ \sbox\scr@dte@tocline@numbox{\@nameuse{scr@tso@#1@numberformat}{##1}}% \global\scr@dte@tocline@numberwidth \dimexpr\wd\scr@dte@tocline@numbox+\@nameuse{scr@tso@#1@numsep}\relax + \relax \ifdim \scr@dte@tocline@numberwidth >\@nameuse{scr@dte@#1@maxnumwidth}\relax \global\@nameuse{scr@dte@#1@maxnumwidth}\scr@dte@tocline@numberwidth @@ -359,9 +410,8 @@ \@nameuse{Ifscr@tso@#1@dynnumwidth}{}{% \ifdim \scr@dte@tocline@numberwidth >\dimexpr \@nameuse{scr@tso@#1@numwidth}% - +\@nameuse{scr@tso@#1@numsep}\relax - \PackageWarning{tocbasic% - }{% + +\@nameuse{scr@tso@#1@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@tso@#1@linefill}% \nobreak + \expandafter\let\expandafter\scr@dte@pagenumberwidth + \csname scr@tso@#1@pagenumberwidth\endcsname \@nameuse{scr@tso@#1@pagenumberbox}{% \@nameuse{scr@tso@#1@pagenumberformat}{#3}% }% @@ -406,6 +458,10 @@ {scr@tso@}{@breakafternumber}{line break after number flag}% \DefineTOCEntryIfOption{dynnumwidth}% {scr@tso@}{@dynnumwidth}{dynamic number width flag}% + \DefineTOCEntryListOption{indentfollows}% + {scr@tso@}{@indentfollows}{list of levels that define the indent}% + \DefineTOCEntryIfOption{dynindent}% + {scr@tso@}{@dynindent}{dynamic indent width flag}% \DefineTOCEntryCommandOption{entryformat}% {scr@tso@}{@entryformat}[1]{entry format}% \DefineTOCEntryCommandOption{entrynumberformat}% @@ -424,6 +480,10 @@ {scr@tso@}{@pagenumberbox}[1]{page number box}% \DefineTOCEntryCommandOption{pagenumberformat}% {scr@tso@}{@pagenumberformat}[1]{page number format}% + \DefineTOCEntryLengthOption{pagenumberwidth}% + {scr@tso@}{@pagenumberwidth}{width of page number box}% + \DefineTOCEntryLengthOption{rightindent}% + {scr@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@tso@}{@numwidth}{entry number width}% \scr@ifundefinedorrelax{#1tocdepth}{% - \ifstrstart{#1}{sub}{% + \Ifstrstart{#1}{sub}{% \scr@ifundefinedorrelax{\scr@dte@nosub{#1}tocdepth}{}{% \expandafter\edef\csname #1tocdepth\endcsname{% \the\numexpr \noexpand\@nameuse{\scr@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@ifundefinedorrelax{scr@tso@#1@indent}{% \@ifundefined{scr@#1@tocindent}{% - \ifstrstart{#1}{sub}{% + \Ifstrstart{#1}{sub}{% \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@indent}{% \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@numwidth}{}{% \expandafter\edef\csname scr@tso@#1@indent\endcsname{% @@ -502,21 +562,47 @@ \@namedef{scr@tso@#1@indent}{\@nameuse{scr@#1@tocindent}}% }% }{}% + \scr@ifundefinedorrelax{scr@tso@#1@pagenumberwidth}{% + \Ifstrstart{#1}{sub}{% + \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@pagenumberwidth}{% + \@namedef{scr@tso@#1@pagenumberwidth}{\@pnumwidth}% + }{% + \expandafter\let + \csname scr@tso@#1@pagenumberwidth\expandafter\endcsname + \csname scr@tso@\scr@dte@nosub{#1}@pagenumberwidth\endcsname + }% + }{% + \@namedef{scr@tso@#1@pagenumberwidth}{\@pnumwidth}% + }% + }{}% + \scr@ifundefinedorrelax{scr@tso@#1@rightindent}{% + \Ifstrstart{#1}{sub}{% + \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@rightindent}{% + \@namedef{scr@tso@#1@rightindent}{\@tocrmarg}% + }{% + \expandafter\let + \csname scr@tso@#1@rightindent\expandafter\endcsname + \csname scr@tso@\scr@dte@nosub{#1}@rightindent\endcsname + }% + }{% + \@namedef{scr@tso@#1@rightindent}{\@tocrmarg}% + }% + }{}% \@ifundefined{scr@tso@#1@indent}{% - \ifstr{#1}{figure}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{table}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{part}{\@namedef{scr@tso@#1@indent}{0em}}{% - \ifstr{#1}{chapter}{\@namedef{scr@tso@#1@indent}{0em}}{% + \Ifstr{#1}{figure}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{table}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{part}{\@namedef{scr@tso@#1@indent}{0em}}{% + \Ifstr{#1}{chapter}{\@namedef{scr@tso@#1@indent}{0em}}{% \scr@ifundefinedorrelax{l@chapter}{% - \ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{0pt}}{% - \ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{subsubsection}{% + \Ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{0pt}}{% + \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{subsubsection}{% \@namedef{scr@tso@#1@indent}{3.8em}% }{% - \ifstr{#1}{paragraph}{% + \Ifstr{#1}{paragraph}{% \@namedef{scr@tso@#1@indent}{7em}% }{% - \ifstr{#1}{subparagraph}{% + \Ifstr{#1}{subparagraph}{% \@namedef{scr@tso@#1@indent}{10em}% }{% }% @@ -525,15 +611,15 @@ }% }% }{% - \ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{1.5em}}{% - \ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{3.8em}}{% - \ifstr{#1}{subsubsection}{% + \Ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{1.5em}}{% + \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{3.8em}}{% + \Ifstr{#1}{subsubsection}{% \@namedef{scr@tso@#1@indent}{7.0em}% }{% - \ifstr{#1}{paragraph}{% + \Ifstr{#1}{paragraph}{% \@namedef{scr@tso@#1@indent}{10em}% }{% - \ifstr{#1}{subparagraph}{% + \Ifstr{#1}{subparagraph}{% \@namedef{scr@tso@#1@indent}{12em}% }{% }% @@ -549,7 +635,7 @@ }{}% \scr@ifundefinedorrelax{scr@tso@#1@numwidth}{% \scr@ifundefinedorrelax{scr@#1@tocnumwidth}{% - \ifstrstart{#1}{sub}{% + \Ifstrstart{#1}{sub}{% \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@numwidth}{}{% \expandafter\edef\csname scr@tso@#1@numwidth\endcsname{% \glueexpr \noexpand\@nameuse{scr@tso@\scr@dte@nosub{#1}@numwidth}% @@ -563,19 +649,19 @@ }% }{}% \@ifundefined{scr@tso@#1@numwidth}{% - \ifstr{#1}{figure}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% - \ifstr{#1}{table}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% - \ifstr{#1}{chapter}{\@namedef{scr@tso@#1@numwidth}{1.5em}}{% + \Ifstr{#1}{figure}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% + \Ifstr{#1}{table}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% + \Ifstr{#1}{chapter}{\@namedef{scr@tso@#1@numwidth}{1.5em}}{% \scr@ifundefinedorrelax{chapter}{% - \ifstr{#1}{section}{\@namedef{scr@tso@#1@numwidth}{1.5em}}{% - \ifstr{#1}{subsection}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% - \ifstr{#1}{subsubsection}{% + \Ifstr{#1}{section}{\@namedef{scr@tso@#1@numwidth}{1.5em}}{% + \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% + \Ifstr{#1}{subsubsection}{% \@namedef{scr@tso@#1@numwidth}{3.2em}% }{% - \ifstr{#1}{paragraph}{% + \Ifstr{#1}{paragraph}{% \@namedef{scr@tso@#1@numwidth}{4.1em}% }{% - \ifstr{#1}{subparagraph}{% + \Ifstr{#1}{subparagraph}{% \@namedef{scr@tso@#1@numwidth}{5m}% }{% }% @@ -584,15 +670,15 @@ }% }% }{% - \ifstr{#1}{section}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% - \ifstr{#1}{subsection}{\@namedef{scr@tso@#1@numwidth}{3.2em}}{% - \ifstr{#1}{subsubsection}{% + \Ifstr{#1}{section}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{% + \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@numwidth}{3.2em}}{% + \Ifstr{#1}{subsubsection}{% \@namedef{scr@tso@#1@numwidth}{3.1em}% }{% - \ifstr{#1}{paragraph}{% + \Ifstr{#1}{paragraph}{% \@namedef{scr@tso@#1@numwidth}{5em}% }{% - \ifstr{#1}{subparagraph}{% + \Ifstr{#1}{subparagraph}{% \@namedef{scr@tso@#1@numwidth}{6em}% }{% }% @@ -612,13 +698,13 @@ \expandafter\renewcommand% \csname scr@tso@#1@LastTOCLevelWasHigher\endcsname{\LastTOCLevelWasHigher}% \@ifundefined{scr@tso@#1@beforeskip}{% - \ifstr{#1}{part}{% + \Ifstr{#1}{part}{% \@namedef{scr@tso@#1@beforeskip}{\glueexpr 2.25em \@plus\p@\relax}% }{% - \ifstr{#1}{chapter}{% + \Ifstr{#1}{chapter}{% \@namedef{scr@tso@#1@beforeskip}{\glueexpr 1.0em \@plus\p@\relax}% }{% - \ifstr{#1}{section}{% + \Ifstr{#1}{section}{% \scr@ifundefinedorrelax{l@chapter}{% \@namedef{scr@tso@#1@beforeskip}{\glueexpr 1.0em \@plus\p@\relax}% }{}% @@ -638,16 +724,16 @@ \csname scr@tso@#1@numsep\endcsname{.4em}% \expandafter\renewcommand% \csname scr@tso@#1@numberformat\endcsname[1]{##1}% - \ifstr{#1}{part}{% + \Ifstr{#1}{part}{% \expandafter\renewcommand% \csname scr@tso@#1@entryformat\endcsname[1]{\large\bfseries ##1}% }{% - \ifstr{#1}{chapter}{% + \Ifstr{#1}{chapter}{% \expandafter\renewcommand% \csname scr@tso@#1@entryformat\endcsname[1]{\bfseries ##1}% }{% \scr@ifundefinedorrelax{l@chapter}{% - \ifstr{#1}{section}{% + \Ifstr{#1}{section}{% \expandafter\renewcommand% \csname scr@tso@#1@entryformat\endcsname[1]{\bfseries ##1}% }{}% @@ -659,39 +745,59 @@ \expandafter\renewcommand \csname Ifscr@tso@#1@breakafternumber\endcsname[2]{##2}% \@ifundefined{scr@tso@#1@linefill}{% - \ifstr{#1}{part}{% + \Ifstr{#1}{part}{% \@namedef{scr@tso@#1@linefill}{\hfill}% }{% - \ifstr{#1}{chapter}{% + \Ifstr{#1}{chapter}{% \@namedef{scr@tso@#1@linefill}{\hfill}% }{% \scr@ifundefinedorrelax{l@chapter}{% - \ifstr{#1}{section}{% + \Ifstr{#1}{section}{% \@namedef{scr@tso@#1@linefill}{\hfill}% - }{} - }{} + }{}% + }{}% \expandafter\renewcommand% \csname scr@tso@#1@linefill\endcsname{\TOCLineLeaderFill\relax}% }% }% }{}% \expandafter\renewcommand\csname Ifscr@tso@#1@raggedpage\endcsname[2]{##2}% - \ifstr{#1}{part}{% + \Ifstr{#1}{part}{% \expandafter\renewcommand% \csname scr@tso@#1@pagenumberformat\endcsname[1]{\large\bfseries ##1}% }{% - \expandafter\renewcommand% - \csname scr@tso@#1@pagenumberformat\endcsname[1]{% - {\normalfont\normalcolor ##1}}% + \Ifstr{#1}{chapter}{% + \expandafter\renewcommand% + \csname scr@tso@#1@pagenumberformat\endcsname[1]{\bfseries ##1}% + }{% + \scr@ifundefinedorrelax{l@chapter}{% + \Ifstr{#1}{section}{% + \expandafter\renewcommand% + \csname scr@tso@#1@pagenumberformat\endcsname[1]{\bfseries ##1}% + }{}% + }{}% + \expandafter\renewcommand% + \csname scr@tso@#1@pagenumberformat\endcsname[1]{% + {\normalfont\normalcolor ##1}}% + }% }% \expandafter\renewcommand% \csname scr@tso@#1@pagenumberbox\endcsname[1]{% - \hb@xt@\@pnumwidth{\hfil ##1}}% + \hb@xt@\@nameuse{scr@dte@pagenumberwidth}{\hfil ##1}}% \expandafter\renewcommand\csname Ifscr@tso@#1@dynnumwidth\endcsname[2]{##2}% + \expandafter\renewcommand\csname Ifscr@tso@#1@dynindent\endcsname[2]{##2}% + \scr@ifundefinedorrelax{scr@tso@#1@indentfollows}{% + \Ifstrstart{#1}{sub}{% + \expandafter\edef\csname scr@tso@#1@indentfollows\endcsname{% + \scr@dte@nosub{#1}% + }% + }{% + \expandafter\let\csname scr@tso@#1@indentfollows\endcsname\@empty + }% + }{}% }]{% \scr@dte@tocline{#1}{##1}{##2}% } - \endinput %% %% End of file `tocbasic-xetex-bidi.def'. |