summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def')
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def30
1 files changed, 26 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def
index 297e417d5cc..825eac0547a 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/scrbook-xepersian.def
@@ -20,7 +20,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{10976}
+%% \CheckSum{11097}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\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,19 +37,41 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{scrbook-xepersian.def}[2010/07/25 v0.2 adaptations for scrbook class]
+\ProvidesFile{scrbook-xepersian.def}[2022/05/22 v0.3 adaptations for scrbook class]
\renewcommand*\frontmatter{%
\if@twoside\cleardoubleoddpage\else\clearpage\fi
\@mainmatterfalse\pagenumbering{harfi}%
}
\renewcommand*{\thepart}{\@tartibi\c@part}
-\renewcommand*\appendix{\par%
+\renewcommand*\appendix{%
+ \Ifstr{\@currenvir}{appendix}{%
+ \ClassWarning{\KOMAClassName}{%
+ You are using
+ `\string\begin{appendix}...\string\end{appendix}'.\MessageBreak
+ You should note, that `\string\appendix' is a mostly
+ globally\MessageBreak
+ working command not an enviroment with only local\MessageBreak
+ effects. Therefore `\string\end{appendix}' will neither\MessageBreak
+ switch back to normal section numbering nor finish\MessageBreak
+ every other effect of `\string\begin{appendix}'.\MessageBreak
+ Nevertheless, some effects may end with\MessageBreak
+ `\string\end{appendix}' and the document may become\MessageBreak
+ inconsistent.\MessageBreak
+ Because of this, you should remove `\string\end{appendix}'\MessageBreak
+ and replace `\string\begin{appendix}' by command\MessageBreak
+ `\string\appendix'%
+ }%
+ }{}%
+ \par
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\gdef\@chapapp{\appendixname}%
\gdef\thechapter{\@harfi\c@chapter}%
- \csname appendixmore\endcsname
}
+\IfLTXAtLeastTF{2020/10/01}{%
+ \g@addto@macro{\appendix}{\UseOneTimeHook{\KOMAClassName/appendix}}%
+}{}
+\g@addto@macro{\appendix}{\csname appendixmore\endcsname}
\renewcommand*{\@@maybeautodot}[1]{%
\ifx #1\@stop\let\@@maybeautodot\relax
\else