summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/koma-script/scrkernel-compatibility.dtx
blob: eab2f595d1c9e7c51f91687a52ba8854bc740dc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
% \iffalse meta-comment
% ======================================================================
% scrkernel-compatibility.dtx
% Copyright (c) Markus Kohm, 2006-2023
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, version 1.3c of the license.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX 
% version 2005/12/01 or later and of this work.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in MANIFEST.md.
% ======================================================================
%%% From File: $Id: scrkernel-compatibility.dtx 4133 2024-10-24 09:54:28Z kohm $
%<identify>%%%            (run: identify)
%<init>%%%            (run: init)
%<option>%%%            (run: option)
%<body>%%%            (run: body)
%<*dtx>
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
  \def\filedate$#1: #2-#3-#4 #5${\def\filedate{#2/#3/#4}}
  \filedate$Date: 2024-10-24 11:54:28 +0200 (Do, 24. Okt 2024) $
  \def\filerevision$#1: #2 ${\def\filerevision{r#2}}
  \filerevision$Revision: 4133 $
  \edef\reserved@a{%
    \noexpand\endgroup
    \noexpand\ProvidesFile{scrkernel-compatibility.dtx}%
                          [\filedate\space\filerevision\space
                           KOMA-Script source
                           (compatibility)]
  }%
\reserved@a
\documentclass[USenglish]{koma-script-source-doc}
\usepackage{babel}
\usepackage{hvlogos}
\setcounter{StandardModuleDepth}{2}
\begin{document}
\DocInput{scrkernel-compatibility.dtx}
\end{document}
%</dtx>
% \fi^^A meta-comment
%
% \changes{v2.95}{2006/03/16}{new by splitting \file{scrclass.dtx}}
% \changes{v3.36}{2022/02/21}{switch over from \cls*{scrdoc} to
%   \cls*{koma-script-source-doc}}
% \changes{v3.36}{2022/02/21}{whole implementation documentation in English}
% \changes{v3.40}{2023/04/17}{guide names changed}
%
% \GetFileInfo{scrkernel-compatibility.dtx}
% \title{Compatibility with prior Versions of
%   \href{https://komascript.de}{\KOMAScript}}
% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
% \date{Revision \fileversion{} of \filedate}
% \maketitle
% \begin{abstract}
%   \KOMAScript{} has been designed to be as much compatible with the user
%   interface of the standard classes as possible. Compatibility with internal
%   commands of the standard classes is not possible and therefore sometimes
%   given, but mostly not. Compatibility with the lookalike of the standard
%   classes is not a main purpose of \KOMAScript{}, however with option
%   \opt{emulatestandardclasses} several layout elements can be changed to
%   look similar to the standard classes.
%
%   Another compatibility topic is compatibility of \KOMAScript{} to prior
%   version of \KOMAScript. Sometimes, \KOMAScript{} has been changed to
%   improve the typography. In most of these cases you can switch back to the
%   results of prior versions with option \opt{version}.
%
%   All those features are implemented in \file{scrkernel-compatibility.dtx}.
% \end{abstract}
% \tableofcontents
%
% \section{User Manual}
%
% You can find the user documentation of the commands implemented in
% \file{scrkernel-compatibility.dtx} in the \KOMAScript{} manual, either the
% German \file{scrguide-de.pdf} or the English \file{scrguide-en.pdf}.
% 
%
% \MaybeStop{\PrintIndex}
%
%
% \section{Implementation of Compatibility Selection}
%
% \changes{v3.99}{2022/10/25}{begin of less compatibility of \KOMAScript~4}
% For \KOMAScript{} before version 4 there are a lot of compatibility
% settings. However, testing of all those are almost impossible and with all
% those new features of new \LaTeX{} kernels it will become harder and
% harder. So from \KOMAScript~4, compatibility to prior versions will be
% reduced a lot. If users need such compatibility, they should use older
% releases. However, for some time, at least before the first official release
% of \KOMAScript~4, conditionally the sources support generation of a
% \KOMAScript~3 compatible version or alternatively of a \KOMAScript~4
% compatible version.
%
% \subsection{Options for compatibility with the standard classes}
% There is only one such option, which can only be used while loading a
% \KOMAScript{} class.
%
% \begin{option}{emulatestandardclasses}
% \changes{v3.12}{2013/11/11}{added}
% \changes{v3.20}{2016/02/16}{\opt{headings\quotechar=standardclasses} also for
%   \cls*{scrartcl}}
% Because this option has to change several defaults, it should be used as
% early as possible. The earliest time is the load time. So it has been
% defined as a classic option.
% \begin{macro}{\@scr@emulatestandardclassesfalse,\@scr@emulatestandardclassestrue,
%               \if@scr@emulatestandardclasses}
% \changes{v3.12}{2013/11/11}{added}
% We need a boolean switch, but it should be a kind of constant, so the
% default changing macros are deactivated.
%    \begin{macrocode}
%<*option&class&!letter>
\newif\if@scr@emulatestandardclasses
\let\scr@emulatestandardclassestrue\relax
\let\scr@emulatestandardclassesfalse\relax
\DeclareOption{emulatestandardclasses}{%
  \let\if@scr@emulatestandardclasses\iftrue
  \KOMAExecuteOptions{%
    fontsize=10pt,%
%<article|book|report>    headings=standardclasses,%
    cleardoublepage=current
  }%
  \newcommand*{\defaultpapersize}{letter}%
  \AtEndOfClass{%
    \setkomafont{descriptionlabel}{\bfseries}%
    \setkomafont{dictum}{\normalfont\small}%
    \setkomafont{caption}{}%
    \setkomafont{captionlabel}{}%
    \setcapindent{0pt}%
    \RequirePackage[pagestyleset=standard,markcase=upper]{scrlayer-scrpage}%
    \PreventPackageFromLoading{scrpage2}%
    \setkomafont{pagenumber}{\normalfont}%
    \setkomafont{pageheadfoot}{\normalfont}%
    \cfoot[\pagemark]{}%
%<article|report>    \pagestyle{plain}%
  }%
}
%</option&class&!letter>
%    \end{macrocode}
% \end{macro}
% \end{option}
%
%
% \subsection{Options for compatibility with prior versions of \KOMAScript}
%
% \changes{v3.99}{2022/10/25}{\KOMAScript~3 only}
% All features of this section are limited to \KOMAScript~3. \KOMAScript~4
% will not implement it.
%    \begin{macrocode}
%<*!v4>
%    \end{macrocode}
%
% For \KOMAScript~3 there is a single option to select compatibility with
% exactly one \KOMAScript{} version. The compatibility changes are limited to
% feature changes. Bug changes are not affected. So you would never be able to
% get exactly the result of the given version using this option. However
% falling back to compatibility with a prior version usually also deactivates
% other features of the current version.
%
% \changes{v3.01b}{2008/12/09}{compatibility definitions in packages only, if
% not yet defined}
%
% \begin{option}{version}
% \changes{v2.9u}{2005/03/05}{added}
% \changes{v2.95}{2006/03/16}{can be used while loading only}
% \changes{v3.39}{2022/11/11}{initial dot removed from member argument of
%   option storage commands}
% \begin{macro}{\scr@compatibility}
% \changes{v2.9u}{2005/03/05}{added}
% \changes{v3.01a}{2008/11/20}{default is \opt{\quotechar=last}}
% \begin{macro}{\scr@ta@compatibility}
% \changes{v3.01b}{2008/12/09}{added}
% Depending on \opt{version=\meta{version}} \cs{scr@compatibility}
% resp. \cs{scr@ta@compatibility} will be set to an integer. The mapping from
% \meta{version} to the integer is done with several macros
% \cs{scr@v@\meta{version}}.
%    \begin{macrocode}
%<*init>
%<class>\newcommand*
%<package>\providecommand*
  {\scr@compatibility}{\scr@v@last}
%<typearea>\newcommand*{\scr@ta@compatibility}{\scr@compatibility}
%</init>
%<*option>
\KOMA@key{version}[last]{%
  \scr@ifundefinedorrelax{scr@v@#1}{%
    \def\scr@compatibility{0}%
%<class>    \ClassWarningNoLine{\KOMAClassName}{%
%<*package>
    \PackageWarningNoLine{%
%<extend>      scrextend%
%<typearea>      typearea%
%<letter>      scrletter%
    }{%
%</package>
      You have set option `version' to value `#1', but\MessageBreak
      this value of version is not supported.\MessageBreak
      Because of this, version was set to `first'%
    }%
    \FamilyKeyStateProcessed
    \KOMA@kav@replacevalue{%
%<class>      \KOMAClassFileName
%<package&extend>      scrextend.\scr@pkgextension
%<package&typearea>      typearea.\scr@pkgextension
%<package&letter>      scrletter.\scr@pkgextension
    }{version}{first}%
  }{%
%<class>    \ClassInfoNoLine{\KOMAClassName}{%
%<*package>
    \PackageInfoNoLine{%
%<extend>      scrextend%
%<typearea>      typearea%
%<letter>      scrletter%
    }{%
%</package>
      Switching compatibility level to `#1'%
    }%
%<class|extend|letter> \edef\scr@compatibility{\@nameuse{scr@v@#1}}%
%<typearea>    \edef\scr@ta@compatibility{\@nameuse{scr@v@#1}}%
    \FamilyKeyStateProcessed
    \KOMA@kav@xreplacevalue{%
%<class>      \KOMAClassFileName
%<package&extend>      scrextend.\scr@pkgextension
%<package&typearea>      typearea.\scr@pkgextension
%<package&letter>      scrletter.\scr@pkgextension
    }{version}{#1}%
    \ifnum\scr@compatibility<\scr@v@last
%<class>      \ClassWarningNoLine{\KOMAClassName}{%
%<*package>
      \PackageWarningNoLine{%
%<extend>        scrextend%
%<typearea>        typearea%
%<letter>        scrletter%
      }{%
%</package>
        Switching back to an old KOMA-Script release does\MessageBreak
        not mean, that KOMA-Script is fully compatible with\MessageBreak
        the old release. If you need full compatibility\MessageBreak
        to an old KOMA-Script release, you should use that\MessageBreak
        old KOMA-Script release. However, in that case you\MessageBreak
        could also need old releases of other packages and\MessageBreak
        even of the LaTeX kernel.\MessageBreak
        Please also note, that the KOMA-Script developers\MessageBreak
        refuse support for documents using `version=#1'.\MessageBreak
        We recommend to eliminate all deprecated options\MessageBreak
        and commands. We also recommend to not use option\MessageBreak
        `version', i.e., with other values than `last'%
      }%    
    \fi
  }%
}
%<class>\KOMA@kav@add{\KOMAClassFileName}{version}{last}
%    \end{macrocode} 
% We do not use \cs{FamilyKeyState} if the option is set to late, but
% immediately report an error.
%    \begin{macrocode}
%<class>\AtEndOfClass{%
%<package>\AtEndOfPackage{%
  \KOMA@key{version}[]{%
%<class>    \ClassError{\KOMAClassName}{%
%<*package>
    \PackageError{%
%<extend>      scrextend%
%<typearea>      typearea%
%<letter>      scrletter%
    }{%
%</package>
      Option `version' too late%
    }{%
      Option `version' may be set only while loading the 
%<class>      class.\MessageBreak
%<package>      package.\MessageBreak
      But you've tried to set it up later.%
    }%
    \FamilyKeyStateProcessed
  }%
}
%</option>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*init>
%    \end{macrocode}
% \begin{macro}{\scr@v@first}
% \changes{v2.9u}{2005/03/05}{added}
% \begin{macro}{\scr@v@2.9}
% \changes{v2.9u}{2005/03/05}{added}
% \begin{macro}{\scr@v@2.9t}
% \changes{v2.9u}{2005/03/05}{added}
% \begin{macro}{\scr@v@2.95}
% \changes{v2.95}{2006/03/23}{added}
% \begin{macro}{\scr@v@2.95a}
% \changes{v2.96a}{2006/11/27}{added}
% \begin{macro}{\scr@v@2.95b}
% \changes{v2.96a}{2006/11/27}{added}
% \begin{macro}{\scr@v@2.96}
% \changes{v2.96a}{2006/11/27}{added}
% \begin{macro}{\scr@v@2.96a}
% \changes{v2.96a}{2006/11/27}{added}
% \begin{macro}{\scr@v@2.97}
% \changes{v2.97}{2007/03/02}{added}
% \begin{macro}{\scr@v@2.97a}
% \changes{v2.97a}{2007/03/07}{added}
% \begin{macro}{\scr@v@2.97b}
% \changes{v2.97b}{2007/03/25}{added}
% \begin{macro}{\scr@v@2.97c}
% \changes{v2.97c}{2007/05/12}{added}
% \changes{v2.97d}{2007/10/09}{Wert geändert}%^^A
% \begin{macro}{\scr@v@2.97d}
% \changes{v2.97d}{2007/10/03}{added}
% \changes{v2.97d}{2007/10/09}{Wert geändert}%^^A
% \begin{macro}{\scr@v@2.97e}
% \changes{v2.97e}{2007/11/27}{added}
% \begin{macro}{\scr@v@2.98}
% \changes{v2.98}{2007/12/24}{added}
% \begin{macro}{\scr@v@2.98a}
% \changes{v2.98a}{2008/01/08}{added}
% \begin{macro}{\scr@v@2.98b}
% \changes{v2.98b}{2008/01/30}{added}
% \begin{macro}{\scr@v@2.98c}
% \changes{v2.98c}{2008/02/01}{added}
% \begin{macro}{\scr@v@3.00}
% \changes{v3.00}{2008/11/04}{added}
% \begin{macro}{\scr@v@3.01}
% \changes{v3.01}{2008/11/14}{added}
% \begin{macro}{\scr@v@3.01a}
% \changes{v3.01a}{2008/11/20}{added}
% \begin{macro}{\scr@v@3.01b}
% \changes{v3.01b}{2008/11/24}{added}
% \begin{macro}{\scr@v@3.01c}
% \changes{v3.01c}{2008/12/09}{added}
% \begin{macro}{\scr@v@3.02}
% \changes{v3.02}{2009/01/01}{added}
% \begin{macro}{\scr@v@3.02b}
% \changes{v3.02b}{2009/01/24}{added}
% \begin{macro}{\scr@v@3.02c}
% \changes{v3.02c}{2009/01/28}{added}
% \begin{macro}{\scr@v@3.03}
% \changes{v3.03}{2009/04/01}{added}
% \begin{macro}{\scr@v@3.03a}
% \changes{v3.03a}{2009/04/02}{added}
% \begin{macro}{\scr@v@3.03b}
% \changes{v3.03b}{2009/04/12}{added}
% \begin{macro}{\scr@v@3.04}
% \changes{v3.04}{2009/07/07}{added}
% \begin{macro}{\scr@v@3.05}
% \changes{v3.05}{2009/07/08}{added}
% \begin{macro}{\scr@v@3.04a}
% \changes{v3.04a}{2009/07/24}{added}
% \begin{macro}{\scr@v@3.05a}
% \changes{v3.05a}{2010/03/10}{added}
% \begin{macro}{\scr@v@3.06}
% \changes{v3.06}{2010/06/17}{added}
% \begin{macro}{\scr@v@3.07}
% \changes{v3.07}{2010/09/14}{added}
% \begin{macro}{\scr@v@3.08}
% \changes{v3.08}{2010/10/28}{added}
% \begin{macro}{\scr@v@3.08a}
% \changes{v3.08a}{2011/01/25}{added}
% \begin{macro}{\scr@v@3.08b}
% \changes{v3.08b}{2011/02/22}{added}
% \begin{macro}{\scr@v@3.09}
% \changes{v3.09}{2011/04/02}{added}
% \begin{macro}{\scr@v@3.09a}
% \changes{v3.09a}{2011/04/12}{added}
% \begin{macro}{\scr@v@3.10}
% \changes{v3.10}{2011/08/30}{added}
% \begin{macro}{\scr@v@3.10a}
% \changes{v3.10a}{2012/03/08}{added}
% \begin{macro}{\scr@v@3.10b}
% \changes{v3.10b}{2012/03/13}{added}
% \begin{macro}{\scr@v@3.11}
% \changes{v3.11}{2012/05/15}{added}
% \begin{macro}{\scr@v@3.11a}
% \changes{v3.11a}{2012/05/25}{added}
% \begin{macro}{\scr@v@3.11b}
% \changes{v3.11b}{2012/07/29}{added}
% \begin{macro}{\scr@v@3.12}
% \changes{v3.12}{2013/03/05}{added}
% \begin{macro}{\scr@v@3.13}
% \changes{v3.13}{2014/03/19}{added}
% \begin{macro}{\scr@v@3.13a}
% \changes{v3.13a}{2014/08/07}{added}
% \begin{macro}{\scr@v@3.14}
% \changes{v3.14}{2014/10/28}{added}
% \begin{macro}{\scr@v@3.15}
% \changes{v3.15}{2014/11/20}{added}
% \begin{macro}{\scr@v@3.16}
% \changes{v3.16}{2015/02/08}{added}
% \begin{macro}{\scr@v@3.17}
% \changes{v3.17}{2015/02/08}{added}
% \begin{macro}{\scr@v@3.17a}
% \changes{v3.17a}{2015/05/06}{added}
% \begin{macro}{\scr@v@3.17c}
% \changes{v3.17c}{2015/05/13}{added}
% \begin{macro}{\scr@v@3.18}
% \changes{v3.18}{2015/05/14}{added}
% \begin{macro}{\scr@v@3.18a}
% \changes{v3.18a}{2015/07/03}{added}
% \begin{macro}{\scr@v@3.19}
% \changes{v3.19}{2015/07/26}{added}
% \begin{macro}{\scr@v@3.19a}
% \changes{v3.19a}{2015/10/03}{added}
% \begin{macro}{\scr@v@3.20}
% \changes{v3.20}{2015/10/06}{added}
% \begin{macro}{\scr@v@3.21}
% \changes{v3.21}{2016/05/19}{added}
% \begin{macro}{\scr@v@3.22}
% \changes{v3.22}{2016/07/29}{added}
% \begin{macro}{\scr@v@3.23}
% \changes{v3.23}{2017/02/04}{added}
% \begin{macro}{\scr@v@3.23}
% \changes{v3.24}{2017/04/22}{added}
% \begin{macro}{\scr@v@3.25}
% \changes{v3.25}{2017/09/07}{added}
% \begin{macro}{\scr@v@3.26}
% \changes{v3.26}{2018/03/31}{added}
% \begin{macro}{\scr@v@3.26a}
% \changes{v3.26a}{2018/12/30}{added}
% \begin{macro}{\scr@v@3.26b}
% \changes{v3.26b}{2018/12/30}{added}
% \begin{macro}{\scr@v@3.27}
% \changes{v3.27}{2019/02/02}{added}
% \begin{macro}{\scr@v@3.27a}
% \changes{v3.27a}{2019/10/13}{added}
% \begin{macro}{\scr@v@3.28}
% \changes{v3.28}{2019/11/20}{added}
% \begin{macro}{\scr@v@3.29}
% \changes{v3.29}{2020/01/06}{added}
% \begin{macro}{\scr@v@3.30}
% \changes{v3.30}{2020/02/24}{added}
% \begin{macro}{\scr@v@3.31}
% \changes{v3.31}{2020/04/26}{added}
% \begin{macro}{\scr@v@3.32}
% \changes{v3.32}{2020/08/06}{added}
% \begin{macro}{\scr@v@3.33}
% \changes{v3.33}{2021/01/01}{added}
% \begin{macro}{\scr@v@3.34}
% \changes{v3.34}{2021/03/22}{added}
% \begin{macro}{\scr@v@3.35}
% \changes{v3.35}{2021/10/12}{added}
% \begin{macro}{\scr@v@3.36}
% \changes{v3.36}{2021/11/17}{added}
% \begin{macro}{\scr@v@3.37}
% \changes{v3.37}{2022/05/04}{added}
% \begin{macro}{\scr@v@3.38}
% \changes{v3.38}{2022/07/06}{added}
% \begin{macro}{\scr@v@3.39}
% \changes{v3.39}{2022/10/13}{added}
% \begin{macro}{\scr@v@3.40}
% \changes{v3.40}{2023/04/17}{added}
% \begin{macro}{\scr@v@3.41}
% \changes{v3.41}{2023/04/24}{added}
% \begin{macro}{\scr@v@3.42}
% \changes{v3.42}{2023/07/13}{added}
% \begin{macro}{\scr@v@3.43}
% \changes{v3.43}{2024/10/22}{added}
% \begin{macro}{\scr@v@last}
% \changes{v2.9u}{2005/03/05}{added}
% Nun die unterschiedlichen möglichen Werte (|\scr@v@last| ist jeweils die
% höchste vorhandene Nummer):
%    \begin{macrocode}
\@namedef{scr@v@first}{0}
\@namedef{scr@v@2.9}{0}
\@namedef{scr@v@2.9t}{0}
\@namedef{scr@v@2.9u}{1}
\@namedef{scr@v@2.95}{2}
\@namedef{scr@v@2.95a}{2}
\@namedef{scr@v@2.95b}{2}
\@namedef{scr@v@2.96}{2}
\@namedef{scr@v@2.96a}{3}
\@namedef{scr@v@2.97}{3}
\@namedef{scr@v@2.97a}{3}
\@namedef{scr@v@2.97b}{3}
\@namedef{scr@v@2.97c}{4}
\@namedef{scr@v@2.97d}{5}
\@namedef{scr@v@2.97e}{6}
\@namedef{scr@v@2.98}{6}
\@namedef{scr@v@2.98a}{6}
\@namedef{scr@v@2.98b}{6}
\@namedef{scr@v@2.98c}{7}
\@namedef{scr@v@3.00}{8}
\@namedef{scr@v@3.01}{8}
\@namedef{scr@v@3.01a}{8}
\@namedef{scr@v@3.01b}{9}
\@namedef{scr@v@3.01c}{9}
\@namedef{scr@v@3.02}{9}
\@namedef{scr@v@3.02b}{9}
\@namedef{scr@v@3.02c}{10}
\@namedef{scr@v@3.03}{10}
\@namedef{scr@v@3.03a}{10}
\@namedef{scr@v@3.03b}{10}
\@namedef{scr@v@3.04}{10}
\@namedef{scr@v@3.04a}{10}
\@namedef{scr@v@3.05}{10}
\@namedef{scr@v@3.05a}{10}
\@namedef{scr@v@3.06}{10}
\@namedef{scr@v@3.07}{10}
\@namedef{scr@v@3.08}{10}
\@namedef{scr@v@3.08a}{10}
\@namedef{scr@v@3.08b}{10}
\@namedef{scr@v@3.09}{10}
\@namedef{scr@v@3.09a}{10}
\@namedef{scr@v@3.10}{10}
\@namedef{scr@v@3.10a}{10}
\@namedef{scr@v@3.10b}{10}
\@namedef{scr@v@3.11}{10}
\@namedef{scr@v@3.11a}{10}
\@namedef{scr@v@3.11b}{10}
\@namedef{scr@v@3.12}{11}
\@namedef{scr@v@3.13}{12}
\@namedef{scr@v@3.13a}{13}
\@namedef{scr@v@3.14}{13}
\@namedef{scr@v@3.15}{14}
\@namedef{scr@v@3.16}{14}
\@namedef{scr@v@3.17}{15}
\@namedef{scr@v@3.17a}{15}
\@namedef{scr@v@3.17c}{15}
\@namedef{scr@v@3.18}{15}
\@namedef{scr@v@3.18a}{15}
\@namedef{scr@v@3.19}{15}
\@namedef{scr@v@3.19a}{15}
\@namedef{scr@v@3.20}{15}
\@namedef{scr@v@3.21}{15}
\@namedef{scr@v@3.22}{16}
\@namedef{scr@v@3.23}{16}
\@namedef{scr@v@3.24}{16}
\@namedef{scr@v@3.25}{17}
\@namedef{scr@v@3.26}{17}
\@namedef{scr@v@3.26a}{17}
\@namedef{scr@v@3.26b}{17}
\@namedef{scr@v@3.27}{17}
\@namedef{scr@v@3.27a}{17}
\@namedef{scr@v@3.28}{17}
\@namedef{scr@v@3.29}{17}
\@namedef{scr@v@3.30}{17}
\@namedef{scr@v@3.31}{18}
\@namedef{scr@v@3.32}{18}
\@namedef{scr@v@3.33}{18}
\@namedef{scr@v@3.34}{18}
\@namedef{scr@v@3.35}{19}
\@namedef{scr@v@3.36}{20}
\@namedef{scr@v@3.37}{20}
\@namedef{scr@v@3.38}{20}
\@namedef{scr@v@3.39}{20}
\@namedef{scr@v@3.40}{20}
\@namedef{scr@v@3.41}{21}
\@namedef{scr@v@3.42}{21}
\@namedef{scr@v@3.43}{3430}
\@namedef{scr@v@last}{3430}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{option}
%    \begin{macrocode}
%</init>
%    \end{macrocode}
%
% \begin{macro}{\scr@v@is@lt,\scr@v@is@gt,\scr@v@is@le,\scr@v@is@ge}
% \changes{v3.17}{2015/03/10}{added}
% All these macros are to be used as condition for \cs{ifnum} and compare the
% currently selected version with a given \meta{version}, e.g.:
% \begin{quote}
%   \cs{expandafter}\cs{ifnum}\cs{scr@v@is@lt}\marg{version} \meta{true code}
%   \cs{else} \meta{false code} \cs{fi}
% \end{quote}
% The conditions are:
% \begin{quote}\raggedright
%   \cs{scr@v@is@lt} --- current version less than \meta{version} \\
%   \cs{scr@v@is@gt} --- current version greater than \meta{version} \\
%   \cs{scr@v@is@le} --- current version less than or equal to \meta{version} \\
%   \cs{scr@v@is@ge} --- current version greater than or equal to \meta{version} \\
% \end{quote}
%    \begin{macrocode}
%<*option&(class|extend)>
\newcommand*{\scr@v@is@lt}[1]{%
  \scr@compatibility<\@nameuse{scr@v@#1}
}
\newcommand*{\scr@v@is@gt}[1]{%
  \scr@compatibility>\@nameuse{scr@v@#1}
}
\newcommand*{\scr@v@is@le}[1]{%
  \numexpr\scr@compatibility-\@ne\relax<\@nameuse{scr@v@#1}
}
\newcommand*{\scr@v@is@ge}[1]{%
  \numexpr\scr@compatibility+\@ne\relax>\@nameuse{scr@v@#1}
}
%</option&(class|extend)>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\scr@v@is@eq}
% \changes{v3.39}{2022/10/25}{added}
% Similar to the above for equality test.
%    \begin{macrocode}
%<*option&(class|extend)>
\newcommand*{\scr@v@is@eq}[1]{%
  \scr@compatibility=\@nameuse{scr@v@#1}
}
%</option&(class|extend)>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\scr@ta@v@is@lt,\scr@ta@v@is@gt,\scr@ta@v@is@le,\scr@ta@v@is@ge}
% \changes{v3.17}{2015/03/10}{Neu (intern)}
% The same conditions are defined for \pkg*{typearea}.
%    \begin{macrocode}
%<*option&package&typearea>
\newcommand*{\scr@ta@v@is@lt}[1]{%
  \scr@ta@compatibility<\@nameuse{scr@v@#1}
}
\newcommand*{\scr@ta@v@is@gt}[1]{%
  \scr@ta@compatibility>\@nameuse{scr@v@#1}
}
\newcommand*{\scr@ta@v@is@le}[1]{%
  \numexpr\scr@ta@compatibility-\@ne <\@nameuse{scr@v@#1}
}
\newcommand*{\scr@ta@v@is@ge}[1]{%
  \numexpr\scr@ta@compatibility+\@ne >\@nameuse{scr@v@#1}
}
%</option&package&typearea>
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
%</!v4>
%    \end{macrocode}
% 
% \subsection{Compatibility with used \LaTeX{} kernel version}
% \changes{v3.37}{2022/06/21}{version test added}
% We also do some version tests at |\begin{document}| because of the extremely
% high speed of \LaTeX{} kernel development.
%    \begin{macrocode}
%<*body&(class|extend)>
\AtBeginDocument{%
  \begingroup
    \def\reserved@a#1/#2/#3 #4\@nil{\@tempcnta=#1\relax\@tempcntb=#2\relax}%
    \expandafter\reserved@a\KOMAScriptVersion\@nil
    \edef\reserved@a{\the\numexpr\@tempcnta+2\relax/%
      \ifnum\@tempcntb<10 0\fi\the\@tempcntb/01}%
    \expandafter\IfLTXAtLeastTF\expandafter{\reserved@a}{%
%<class>      \ClassWarningNoLine{\KOMAClassName}{%
%<package>      \PackageWarningNoLine{scrextend}{%
        Your are using a KOMA-Script version, that has not\MessageBreak
        been tested with your more than one year newer\MessageBreak
        LaTeX release `\fmtversion'.\MessageBreak
        Because of the high speed of LaTeX kernel development,\MessageBreak
        this could result in a lot of issues.\MessageBreak
        Please have a look at\MessageBreak
        <http://www.ctan.org/pkg/koma-script> and if this\MessageBreak
        shows a newer KOMA-Script version than\MessageBreak
        `\KOMAScriptVersion', we suggest to do\MessageBreak
        an update of KOMA-Script or maybe even the whole\MessageBreak
        TeX distribution%
      }%
    }{%
      \edef\reserved@a{\the\numexpr\@tempcnta-4\relax/%
        \ifnum\@tempcntb<10 0\fi\the\@tempcntb/01}%
      \expandafter\IfLTXAtLeastTF\expandafter{\reserved@a}{}{%
%<class>        \ClassWarningNoLine{\KOMAClassName}{%
%<package>        \PackageWarningNoLine{scrextend}{%
          You are using a KOMA-Script version, that has not been\MessageBreak
          tested with your more than four years older LaTeX\MessageBreak
          release `\fmtversion'.\MessageBreak
          Because of the high speed of LaTeX kernel development,\MessageBreak
          KOMA-Script releases cannot be tested with all past\MessageBreak
          LaTeX releases.\MessageBreak
          \ifnum\scr@compatibility<\scr@v@last
            So even if you are using option `version' implicitly\MessageBreak
            or explicitly, this
          \else
            So this
          \fi
          could result in a lot of issues.\MessageBreak
          We recommend, to update the whole TeX distribution.\MessageBreak
          If this could not be done, we suggest to use at\MessageBreak
          least an older KOMA-Script release, e.g., from\MessageBreak
          <https://komascript.de/current>%
        }%
      }%
    }%
  \endgroup
}
%</body&(class|extend)>
%    \end{macrocode}
%
%
% \subsection{Compatibility with early versions of \cls*{scrlttr2}}
% Early version of \cls*{scrlttr2} have had another macro. Because, there may
% still be \file{lco} files, that use is, it is also defined if compatibility
% to version before 2.95 has been selected.
%
% \begin{macro}{\@setif}
% \changes{v2.8q}{2001/10/08}{added}
% \changes{v2.95}{2006/03/31}{only for version settings before 2.95}
% The deprecated command has been used to set a boolean switch to true or
% false using one of the values |true|, |false|, |on|, or |off|.
%    \begin{macrocode}
%<*!v4>
%<*class&letter&body>
\expandafter\ifnum \@nameuse{scr@v@2.95}>\scr@compatibility\relax
  \newcommand*{\@setif}[2][]{%
    \begingroup
      \edef\@tempa{#1}\ifx\@tempa\@empty
        \def\@tempa{\KOMA@set@ifkey{#2}{@#2}}%
      \else
        \def\@tempa{\KOMA@set@ifkey{#2}{#1}}%
      \fi
    \expandafter\endgroup\@tempa
  }%
\fi
%</class&letter&body>
%</!v4>
%    \end{macrocode}
% \end{macro}
%
% \Finale
% \PrintChanges
% 
\endinput
% Local Variables:
% mode: doctex
% ispell-local-dictionary: "en_US"
% eval: (flyspell-mode 1)
% TeX-master: t
% TeX-engine: luatex-dev
% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
% End: