summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def')
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def94
1 files changed, 90 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def
index 7f4029079c5..5e17ee96d9e 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/scrartcl-xetex-bidi.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{51690}
+%% \CheckSum{52030}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\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}[2022/05/22 v1.2 bidi adaptations for scrartcl class for XeTeX engine]
+\ProvidesFile{scrartcl-xetex-bidi.def}[2022/05/27 v1.3 bidi adaptations for scrartcl class for XeTeX engine]
\newcommand{\scr@saved@LTRfootnotetext}{}
\newcommand{\scr@saved@RTLfootnotetext}{}
\let\scr@saved@footnotetext\@footnotetext
@@ -546,6 +546,89 @@
\fi
}
+\renewcommand{\scr@@makesinglelinecaption}[3]{%
+ {\usekomafont{caption}{\strut\ignorespaces
+ #1{{\usekomafont{captionlabel}{#2\captionformat}}}%
+ \ignorespaces #3\unskip}}%
+}
+
+\renewcommand{\scr@makemultilinecaption}[3]{%
+ {%
+ \usefontofkomafont{caption}{%
+ \hb@xt@\hsize{%
+ \cap@left
+ \vbox{\hsize\cap@width\linewidth\hsize
+ \scr@ifundefinedorrelax{@captype}{%
+ \ClassWarning{\KOMAClassName}{%
+ `\string\caption' outside float.\MessageBreak
+ Seems you are using `\string\caption' outside a
+ float.\MessageBreak
+ Maybe you are using a package that uses
+ `\string\@makecaption'\MessageBreak
+ without setting `\string\@captype' before.\MessageBreak
+ Because I cannot detect the caption type, I'm using\MessageBreak
+ the empty one.%
+ }%
+ \let\@captype\@empty
+ }{}%
+ \scr@ifundefinedorrelax{ragged\@captype caption}{\raggedcaption}{%
+ \@nameuse{ragged\@captype caption}%
+ }%
+ \ifdofullc@p
+ \@hangfrom{%
+ \strut
+ \scr@smashdp{%
+ #1{%
+ \usekomafont{caption}{%
+ \usekomafont{captionlabel}{#2\captionformat}%
+ }%
+ }%
+ }%
+ }%
+ {{\usekomafont{caption}{#3\scr@endstrut}}\par}%
+ \else
+ \ifdim\cap@indent<\z@
+ \strut
+ #1{%
+ {\usekomafont{caption}{%
+ \usekomafont{captionlabel}{#2\captionformat}%
+ }%
+ }\par}%
+ \noindent{{\usekomafont{caption}{%
+ \hspace*{-\cap@indent}#3\scr@endstrut
+ }}\par}%
+ \else
+ \if@capbreak
+ \strut
+ #1{%
+ {\usekomafont{caption}{%
+ \usekomafont{captionlabel}{#2\captionformat}%
+ }%
+ }\par}%
+ \noindent\@hangfrom{\hspace*{\cap@indent}}%
+ {{\usekomafont{caption}{#3\scr@endstrut}}\par}%
+ \else
+ \@hangfrom{\scr@smashdp\strut\hspace*{\cap@indent}}%
+ {%
+ \hspace{-\cap@indent}%
+ \scr@smashdp{%
+ #1{\usekomafont{caption}{%
+ \usekomafont{captionlabel}{#2\captionformat}%
+ }%
+ }%
+ }%
+ {{\usekomafont{caption}{#3\scr@endstrut}}\par}%
+ }%
+ \fi
+ \fi
+ \fi
+ }%
+ \cap@right
+ }\par\kern\dp\strutbox
+ }%
+ }\kern-\dp\strutbox
+}
+
\bidi@AfterFile{longtable-xetex-bidi.def}{%
\if@komalongtable
\renewcommand{\LT@makecaption}[3]{%
@@ -600,7 +683,7 @@
\csname scr@tso@#1@entryformat\endcsname[1]{\usekomafont{partentry}{##1}}%
\expandafter\renewcommand%
\csname scr@tso@#1@pagenumberformat\endcsname[1]{%
- \usekomafont{partentry}{\usekomafont{partentrypagenumber}{##1}}}%
+ {\usekomafont{partentry}{\usekomafont{partentrypagenumber}{##1}}}}%
\expandafter\renewcommand\expandafter*%
\csname scr@tso@#1@beforeskip\endcsname{2.25em \@plus\p@}%
}
@@ -618,7 +701,7 @@
\expandafter\renewcommand%
\csname scr@tso@#1@entryformat\endcsname{\usekomafont{sectionentry}}%
\expandafter\renewcommand%
- \csname scr@tso@#1@pagenumberformat\endcsname[1]{\usekomafont{sectionentry}{\usekomafont{sectionentrypagenumber}{##1}}}%
+ \csname scr@tso@#1@pagenumberformat\endcsname[1]{{\usekomafont{sectionentry}{\usekomafont{sectionentrypagenumber}{##1}}}}%
\expandafter\renewcommand\expandafter*%
\csname scr@tso@#1@beforeskip\endcsname{1.0em \@plus\p@}%
}
@@ -627,6 +710,9 @@
\TOCEntryStyleStartInitCode{subsection}{%
\expandafter\renewcommand%
\csname scr@tso@#1@linefill\endcsname{\TOCLineLeaderFill\relax}%
+ \expandafter\renewcommand%
+ \csname scr@tso@#1@pagenumberformat\endcsname[1]{%
+ {\normalfont\normalcolor ##1}}%
}
\CloneTOCEntryStyle{subsection}{default}