From a970931b012822a9e5d2aba79938171cf913165c Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 22 May 2022 20:25:25 +0000
Subject: xepersian (22may22)

git-svn-id: svn://tug.org/texlive/trunk@63371 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/xelatex/xepersian/scrartcl-xepersian.def   | 30 +++++++++++++++++++---
 1 file changed, 26 insertions(+), 4 deletions(-)

(limited to 'Master/texmf-dist/tex/xelatex/xepersian/scrartcl-xepersian.def')

diff --git a/Master/texmf-dist/tex/xelatex/xepersian/scrartcl-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/scrartcl-xepersian.def
index e0ca3716127..4600749c682 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/scrartcl-xepersian.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/scrartcl-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,14 +37,36 @@
 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
 %%   Right brace   \}     Tilde         \~}
 %%
-\ProvidesFile{scrartcl-xepersian.def}[2010/07/25 v0.2 adaptations for scrartcl class]
+\ProvidesFile{scrartcl-xepersian.def}[2022/05/22 v0.3 adaptations for scrartcl class]
 \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{section}{0}%
   \setcounter{subsection}{0}%
   \gdef\thesection{\@harfi\c@section}%
-  \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
-- 
cgit v1.2.3

