texlive[76100] Master/texmf-dist: koma-script (20aug25)

commits+karl at tug.org commits+karl at tug.org
Wed Aug 20 21:59:36 CEST 2025


Revision: 76100
          https://tug.org/svn/texlive?view=revision&revision=76100
Author:   karl
Date:     2025-08-20 21:59:36 +0200 (Wed, 20 Aug 2025)
Log Message:
-----------
koma-script (20aug25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/koma-script/README.md
    trunk/Master/texmf-dist/doc/latex/koma-script/book-remarkbox-nopatch-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/book-remarkbox-nopatch-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/book-remarkbox-patch-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/book-remarkbox-patch-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-00-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-00-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-01-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-01-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-02-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-02-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-03-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-03-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-04-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-04-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-05-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-05-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-06-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-06-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-07-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-07-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-08-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-08-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-09-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-09-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-10-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-10-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-11-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-11-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-12-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-12-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-13-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-13-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-14-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-14-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-15-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-15-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-16-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-16-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-17-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-17-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-18-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-18-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-19-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-19-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-20-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-20-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-21-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-21-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-22-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-22-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-23-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-23-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/scrlayer-notecolumn-example-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/examples/scrlayer-notecolumn-example-en.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/scrguide-de.pdf
    trunk/Master/texmf-dist/doc/latex/koma-script/scrguide-en.pdf
    trunk/Master/texmf-dist/source/latex/koma-script/doc/preface-de.tex
    trunk/Master/texmf-dist/source/latex/koma-script/doc/preface-en.tex
    trunk/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-de.tex
    trunk/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-en.tex
    trunk/Master/texmf-dist/source/latex/koma-script/doc/scrguide.cls
    trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-scrpage-experts-de.tex
    trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-scrpage-experts-en.tex
    trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlfile-de.tex
    trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlfile-en.tex
    trunk/Master/texmf-dist/source/latex/koma-script/doc/tocbasic-de.tex
    trunk/Master/texmf-dist/source/latex/koma-script/doc/tocbasic-en.tex
    trunk/Master/texmf-dist/source/latex/koma-script/koma-script-source-doc.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scraddr.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-basics.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-compatibility.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-floats.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-fonts.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-index.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-letterclassoptions.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-listsof.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-notepaper.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-sections.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-tocstyle.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-version.dtx
    trunk/Master/texmf-dist/source/latex/koma-script/scrmain.ins
    trunk/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx
    trunk/Master/texmf-dist/tex/latex/koma-script/DIN.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/DIN5008A.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/DIN5008B.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/DINmtext.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/KOMAold.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/KakuLL.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/NF.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/NipponEH.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/NipponEL.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/NipponLH.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/NipponLL.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/NipponRL.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/SN.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/SNleft.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/UScommercial9.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/UScommercial9DW.lco
    trunk/Master/texmf-dist/tex/latex/koma-script/scraddr.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls
    trunk/Master/texmf-dist/tex/latex/koma-script/scrarticle.cls
    trunk/Master/texmf-dist/tex/latex/koma-script/scrbase.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrbook.cls
    trunk/Master/texmf-dist/tex/latex/koma-script/scrdate.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrextend.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrfontsizes.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrjura.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrkbase.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrlayer.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrletter.cls
    trunk/Master/texmf-dist/tex/latex/koma-script/scrletter.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-hook-3.34.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-hook.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-patcholdlatex.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrlogo.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls
    trunk/Master/texmf-dist/tex/latex/koma-script/scrreport.cls
    trunk/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls
    trunk/Master/texmf-dist/tex/latex/koma-script/scrsize10pt.clo
    trunk/Master/texmf-dist/tex/latex/koma-script/scrsize11pt.clo
    trunk/Master/texmf-dist/tex/latex/koma-script/scrsize12pt.clo
    trunk/Master/texmf-dist/tex/latex/koma-script/scrtime.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/typearea.sty
    trunk/Master/texmf-dist/tex/latex/koma-script/visualize.lco

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/koma-script/README.md	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/doc/latex/koma-script/README.md	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,4 +1,4 @@
-# KOMA-Script 2025/06/04 v3.45 
+# KOMA-Script 2025/08/19 v3.46 
 Copyright [Markus Kohm](mailto:komascript at gmx.info) 1994–2025
 
 This material is subject to the LaTeX Project Public License Version 1.3c. See [`lppl.txt`](lppl.txt) (English) or [`lppl-de.txt`](lppl-de.txt) (German) for the details of that license.
@@ -68,7 +68,7 @@
 Recommended:    scrlayer-scrpage - KOMA-Script package
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -85,7 +85,7 @@
 Requires:       scrartcl.cls - KOMA-Script class
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -126,7 +126,7 @@
                            manipulation
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -148,7 +148,7 @@
                 typearea - KOMA-Script package
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -169,7 +169,7 @@
                            manipulation
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -184,7 +184,7 @@
                 etoolbox - tool-box for LaTeX programming using e-TeX
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -198,7 +198,7 @@
 Requires:       scrextend - some KOMA-Script features for other classes
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -216,7 +216,7 @@
                 tocbasic - features for helper files and float environments
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -233,7 +233,7 @@
                            manipulation
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -278,7 +278,7 @@
 Requires:       scrlayer.sty
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -305,7 +305,7 @@
 Requires:       scrkbase.sty
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -320,7 +320,7 @@
                 scrletter.sty – KOMA-Script package
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -337,7 +337,7 @@
 Recommended:    marvosym - package by Martin Vogel providing symbols
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -351,7 +351,7 @@
 Requires:       scrlogo.sty
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -364,7 +364,7 @@
 Requires:       scrlogo.sty
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -377,7 +377,7 @@
 Requires:       scrlogo.sty
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -397,7 +397,7 @@
 Requires:       scrlfile-hook.sty, scrlfile-patcholdlatex.sty, scrlogo.sty
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -411,7 +411,7 @@
 Requires:
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -446,7 +446,7 @@
 Recommended:    marvosym - package by Martin Vogel providing symbols
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -463,7 +463,7 @@
 Requires:       scrreprt.cls - KOMA-Script class
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -485,7 +485,7 @@
                 typearea - KOMA-Script package
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -499,7 +499,7 @@
 Requires:       scrkbase - internal package with some basics of KOMA-Script
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -526,7 +526,7 @@
 Requires:       scrbase  - KOMA-Script package for some basic features.
 License:        LPPL 1.3c or later
 State:          Author maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 
@@ -549,7 +549,7 @@
 Requires:       scrkbase - internal basic features for KOMA-Script packages
 License:        LPPL 1.3c or later
 State:          Autor maintained
-Version:        2025/06/04 v3.45 
+Version:        2025/08/19 v3.46 
 </pre>
 ***
 

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/book-remarkbox-nopatch-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/book-remarkbox-nopatch-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/book-remarkbox-patch-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/book-remarkbox-patch-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-00-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-00-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-01-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-01-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-02-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-02-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-03-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-03-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-04-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-04-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-05-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-05-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-06-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-06-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-07-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-07-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-08-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-08-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-09-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-09-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-10-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-10-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-11-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-11-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-12-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-12-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-13-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-13-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-14-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-14-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-15-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-15-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-16-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-16-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-17-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-17-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-18-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-18-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-19-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-19-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-20-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-20-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-21-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-21-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-22-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-22-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-23-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/letter-example-23-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/scrlayer-notecolumn-example-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/examples/scrlayer-notecolumn-example-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/scrguide-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/koma-script/scrguide-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/preface-de.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/preface-de.tex	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/preface-de.tex	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,6 +1,6 @@
 % ======================================================================
 % preface-de.tex
-% Copyright (c) Markus Kohm, 2008-2022
+% Copyright (c) Markus Kohm, 2008-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -19,79 +19,54 @@
 % ======================================================================
 
 \KOMAProvidesFile{preface-de.tex}
-                 [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $
+                 [$Date: 2025-08-19 15:21:00 +0200 (Di, 19. Aug 2025) $
                   preface to a dedicated version]
 
-\addchap{Vorwort zu \KOMAScript~3.36 und 3.37}
+\addchap{Vorwort zu \KOMAScript~3.46}
 
-Mit \KOMAScript~3.36 wurde eine Phase größerer Umbauten an den Quellen von
-\KOMAScript{} eingeläutet. Begonnen wurde mit den Quellen der Klassen und
-Pakete. Dabei wurde nicht nur eine Umstellung auf Version~3 des Pakets
-\Package{doc} durchgeführt. Die ursprüngliche Quellcode-Dokumentationsklasse
-\Class{scrdoc} wurde auch obsolet und durch \Class{koma-script-source-doc}
-ersetzt. Die komplette Dokumentation des Quellcodes wurde außerdem ins
-Englische übertrage oder in Englisch neu erstellt. Im Zuge dieser Änderung
-wurden die Quellen teilweise auch innerhalb der Dateien umorganisiert oder in
-neue Dateien verschoben. Dabei entstand viele Dutzend neue Anmerkungen über
-unerledigte Aufgaben. Ob ich die jemals alle selbst abarbeiten
-kann, sei dahingestellt.
+Bei den Arbeiten an \KOMAScript{} 3.46 hat mich die Hiobsbotschaft erreicht,
+dass Axel Sommerfeldt die Pflege des \Package{caption}-Pakets einstellen will
+und deshalb keine Änderungs- und Verbesserungsvorschläge mehr annehmen
+wird. Das ist für \KOMAScript{} insofern relevant als nach einigen
+Verbesserungen an der \Macro{caption}-Verarbeitung offenkundig wurde, dass
+\Package{caption} für den Erhalt und die Verbesserung der Kompatibilität mit
+\KOMAScript{} ebenfalls einige kleinere Änderungen benötigt. Auf keinen Fall
+sollten sich Verbesserungen bei der \Macro{caption}-Verarbeitung innerhalb von
+\KOMAScript{} negativ auf die Kompatibilität des \Package{caption}-Pakets
+auswirken. Die Konsequenz ist, dass nun nicht mehr das
+\Package{caption}-Paket selbst für die Kompatibilität sorgt, sondern
+\KOMAScript{} auf das Lade von \Package{caption} reagiert, um dann selbst die
+Kompatibilität herbeizuführen.
 
-Durch die massiven Umbauten an den Quellen war von vornherein leider nicht
-auszuschließen, dass sich neue Fehler einschleichen. Aufgrund des akuten
-Mangels an Beta-Testern hat sich diese Befürchtung leider bewahrheitet. Ob all
-diese Fehler inzwischen beseitigt sind, ist schwer zu sagen.
+Wie in vielen anderen Fällen auch, bedeutet das natürlich wieder einmal mehr
+Arbeit sowohl in der Entwicklung als auch im Testen für mich selbst. Zusammen
+mit den unzähligen Änderungen, die beispielsweise aufgrund der rasanten
+Weiterentwicklung von \LaTeX{} selbst neuerdings immer wieder notwendig
+werden, führt das leider dazu, dass einige dringende Arbeiten an \KOMAScript{}
+ständig liegen bleiben. Auch einige andere Projekte, die letztlich sogar für
+den Fortbestand von \KOMAScript{} zunehmend wichtig werden, konnten wieder
+nicht in Angriff genommen werden. Dazu gehört leider auch der Tagging-Support.
 
-Mehr oder weniger nebenbei wurde eine neue, auf \Package{l3build} basierende
-Teststruktur aufgebaut. Damit soll zukünftig sichergestellt werden, dass
-einmal gemeldete Fehler künftig nicht wieder auftreten.
+Trotzdem ist es gelungen, in dieser Version von \KOMAScript{} die dringend
+notwendige Überarbeitung der Verteilung von Aufgaben zwischen den Klassen und
+den Paketen weiter voran zu bringen. Auch ein paar andere Probleme konnten
+angegangen werden, führen aber unter Umständen zu geänderten Seitenumbrüchen
+bei zweispaltigen Dokumenten mit Kapitelüberschriften. Siehe hierzu die
+Internet-Seite
+»\href{https://sourceforge.net/p/koma-script/wiki-de/Releases/}
+{Wichtige Hinweise und Änderungen}« und dort insbesondere
+»\href{https://sourceforge.net/p/koma-script/wiki-de/Release%203.46/}
+{Bekannte Probleme und wichtige Änderungen in \KOMAScript{} 3.46}«.
 
-Mit \KOMAScript~3.37 wurde begonnen, die Quellen der Anleitung zu
-restrukturieren. Für die Erzeugung der Deutschen und Englischen
-Benutzeranleitung einschließlich der vollständigen Beispiele mit PDF wird nun
-ebenfalls \Package{l3build} verwendet. Außerdem wird eine flache Hierarchie
-für die Anleitungen in allen Sprachen verwendet. Es gibt dadurch in den
-Quellen keine unterschiedlichen Dateien mit demselben Dateinamen
-mehr. Dadurch sollen nicht nur Anforderungen von CTAN befriedigt werden. Damit
-ist es auch erstmals seit langem wieder möglich, aus den CTAN-Quellen von
-\KOMAScript{} selbst die Anleitungen zu erzeugen.
+Mein Dank geht hauptsächlich an meine Frau. Sie federn all meine unschönen
+Erfahrungen im Internet ab. Ebenso erdulden sie seit mehr als 30~Jahren, wenn
+ich wieder einmal nicht ansprechbar bin, weil ich ganz und gar in
+\KOMAScript{} oder irgendwelche \LaTeX-Probleme vertieft bin. Dass ich es mir
+leisten kann, überhaupt geradezu wahnsinnig viel Zeit in ein derartiges
+Projekt zu investieren, ist ebenfalls allein meiner Frau zu verdanken.
 
-Aufgrund der bereits im Vorwort zu \KOMAScript~3.28 erklärten Probleme mit der
-Endlichkeit der Zeit eines einzelnen Entwicklers, werde ich mich auch in
-Zukunft weiterhin auf die Fehlerbehebung, die notwendige Reorganisation der
-Quellen und die Kompatibilität mit neuen \LaTeX-Kernel-Versionen
-konzentrieren. Vor allem bei letzterem steht mir inzwischen auch Marei
-Peischl zur Seite, die eigentlich mit eigenen Projekten bereits sehr gut
-ausgelastet ist. Von ihr stammt auch der ursprüngliche Code für die
-Abbildungen zu Pseudolängen und Variablen, für den ich mich recht herzlich
-bedanke. Damit war es mir endlich möglich, einem lange gehegten Wunsch vieler
-Anwender nachzukommen. Mit wenigen Änderungen sind die Pseudolängen in der
-Abbildung nun mit den zugehörigen Erklärungen im Text verlinkt.
-
-Durch den weitgehenden Verzicht auf neue Funktionen schwindet natürlich auch
-der Aufwand für die Dokumentation derselben. Leser dieser freien
-Bildschirm-Version der Anleitung müssen aber auch weiterhin mit gewissen
-Einschränkungen leben. So sind einige Informationen -- hauptsächliche solche
-für fortgeschrittene Anwender oder die dazu geeignet sind, aus einem Anwender
-einen fortgeschrittenen Anwender zu machen -- der Buchfassung vorbehalten. Das
-führt auch dazu, dass weiterhin einige Links in dieser Anleitung lediglich zu
-einer Seite führen, auf der genau diese Tatsache erwähnt ist. Darüber hinaus
-ist die freie Version nur eingeschränkt zum Ausdruck geeignet. Der Fokus liegt
-vielmehr auf der Verwendung am Bildschirm parallel zur Arbeit an einem
-Dokument. Sie hat auch weiterhin keinen optimierten Umbruch, sondern ist quasi
-ein erster Entwurf, bei dem Absatz- und Seitenumbruch in einigen Fällen
-durchaus dürftig sind. Entsprechende Optimierungen bleiben den Buchausgaben
-vorbehalten.
-
-Mein Dank geht hauptsächlich an meine Familie und allen voran an meine
-Frau. Sie federn all meine unschönen Erfahrungen im Internet ab. Ebenso
-erdulden sie seit teilweise mehr als 25~Jahren, wenn ich wieder einmal nicht
-ansprechbar bin, weil ich ganz und gar in \KOMAScript{} oder irgendwelche
-\LaTeX-Probleme vertieft bin. Dass ich es mir leisten kann, überhaupt geradezu
-wahnsinnig viel Zeit in ein derartiges Projekt zu investieren, ist allein
-meiner Frau zu verdanken.
-
 \bigskip\noindent
-Markus Kohm, Neckarhausen im Mai 2022
+Markus Kohm, Neckarhausen im August 2025
 \endinput
 
 %%% Local Variables: 

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/preface-en.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/preface-en.tex	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/preface-en.tex	2025-08-20 19:59:36 UTC (rev 76100)
@@ -19,76 +19,50 @@
 % ======================================================================
 
 \KOMAProvidesFile{preface-en.tex}
-                 [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $
+                 [$Date: 2025-08-19 15:21:00 +0200 (Di, 19. Aug 2025) $
                   preface to dedicated version]
-\translator{Markus Kohm\and Karl Hagen\and DeepL}
+\translator{Markus Kohm\and DeepL}
 
-\addchap{Preface to \KOMAScript~3.36 and 3.37}
+\addchap{Preface to \KOMAScript~3.46}
 
-With \KOMAScript~3.36 a phase of major rebuilds of the sources of
-\KOMAScript{} was initiated. It started with the sources of the classes and
-packages. Not only a conversion to version~3 of the package \Package{doc} was
-done. The original source code documentation class \Class{scrdoc} was also
-made obsolete and replaced by \Class{koma-script-source-doc}. The complete
-source code documentation was also transferred to English or recreated in
-English. In the course of this change, some of the sources were also
-reorganized within the files or moved to new files. In the process, many
-dozens of new notes about undone tasks were added. Whether I will ever be able
-to work through all of them myself remains to be seen.
+While working on \KOMAScript{} 3.46, I received the bad news that Axel
+Sommerfeldt intends to discontinue maintenance of the \Package{caption}
+package and will therefore no longer accept suggestions for changes and
+improvements. This is relevant for \KOMAScript{} insofar as, after some
+improvements to \Macro{caption} processing, it became apparent that
+\Package{caption} also needs some minor changes to maintain and improve
+compatibility with \KOMAScript{}. Under no circumstances should improvements
+to \Macro{caption} processing within \KOMAScript{} have a negative impact on
+the compatibility of the \Package{caption} package. The consequence is that
+the \Package{caption} package itself no longer ensures compatibility, but
+rather \KOMAScript{} reacts to the loading of \Package{caption} in order to
+then establish compatibility itself.
 
-Due to the massive modifications to the sources, it could not be ruled out
-from the outset that new errors could creep in. Due to the acute shortage of
-beta testers, this fear has unfortunately come true. Whether all these bugs
-have been fixed in the meantime is hard to say.
+As in many other cases, this naturally means more work for me in terms of both
+development and testing. Together with the countless changes that have
+recently become necessary due to the rapid development of \LaTeX{} itself,
+this unfortunately means that some urgent work on \KOMAScript{} is constantly
+being put on hold. Several other projects, which are ultimately becoming
+increasingly important for the continued existence of \KOMAScript{}, could not
+be worked on again. Unfortunately, this also includes tagging support.
 
-More or less in parallel, a new test structure based on \Package{l3build} was
-built. This should ensure in the future that once reported errors do not occur
-again in the future.
+Nevertheless, this version of \KOMAScript{} has succeeded in further advancing
+the urgently needed revision of the distribution of tasks between classes and
+packages. A few other problems have also been addressed, but these may lead to
+changed page breaks in two-column documents with chapter headings. See the
+website »\href{https://sourceforge.net/p/koma-script/wiki-en/Releases/}
+{Important notes and changes}« and, in particular,
+»\href{https://sourceforge.net/p/koma-script/wiki-en/Release%203.46/}
+{Known issues and important changes in \KOMAScript{} 3.46}«.
 
-With \KOMAScript~3.37 I started to restructure the sources of the manual. For
-the generation of the German and English user manual including the complete
-examples with PDF now also \Package{l3build} is used. In addition, a flat
-hierarchy is used for the user guides in all languages. Thus there are no
-different files with the same filename in the sources anymore. This is not
-only to satisfy CTAN requirements. With this it is also possible for the first
-time in a long time to generate the manuals from the CTAN sources of
-\KOMAScript.
+My thanks go mainly to my wife. She cushions all my unpleasant experiences on
+the Internet. She has also put up with me for more than 30~years when I am
+once again unresponsive because I am completely immersed in \KOMAScript{} or
+some \LaTeX{} problems. The fact that I can afford to invest such an insane
+amount of time in a project like this is also thanks to my wife alone.
 
-Due to the problems with the finiteness of a single developer's time already
-explained in the preface to \KOMAScript~3.28, I will therefore continue to
-concentrate on bug fixing, the necessary reorganisation of the sources and
-compatibility with new \LaTeX{} kernel versions in the future. Especially with
-the latter, I now have the support of Marei Peischl, who is already very busy
-with her own projects. She also wrote the original code for the illustrations
-of pseudo-lengths and variables, for which I thank her very much. This finally
-made it possible for me to fulfil a long-cherished wish of many users. With a
-few changes, the pseudo lengths in the illustration are now linked to the
-corresponding explanations in the text.
-
-
-By largely abstaining from new functions, the effort for documenting them
-naturally also dwindles. Readers of this free, screen version, however, still
-have to live with some restrictions. So some information\,---\,mainly intended
-for advanced users or capable of turning an ordinary user into an advanced
-one\,---\,is reserved for the printed book, which currently exists only in
-German. As a result, some links in this manual lead to a page that simply
-mentions this fact. In addition, the free version is scarcely suitable for
-making a hard-copy. The focus, instead, is on using it on screen, in parallel
-with the document you are working on. It still has no optimized wrapping but
-is almost a first draft, in which both the paragraph and page breaks are in
-some cases quite poor. Corresponding optimizations are reserved for the German
-book editions.
-
-
-The biggest thanks go to my family and above all to my wife. They absorb all
-my unpleasant experiences on the Internet. They have also tolerated it for
-more than 25~years, when I am again not approachable, because I am completely
-lost in \KOMAScript{} or some \LaTeX{} problems. The fact that I can afford to
-invest an incredible amount of time in such a project is entirely thanks to my
-wife.
-
 \bigskip\noindent
-Markus Kohm, Neckarhausen in May 2022.
+Markus Kohm, Neckarhausen in August 2025.
 
 \endinput
 

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-de.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-de.tex	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-de.tex	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,6 +1,6 @@
 % ======================================================================
 % scrbookreportarticle-de.tex
-% Copyright (c) Markus Kohm, 2001-2023
+% Copyright (c) Markus Kohm, 2001-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -24,7 +24,7 @@
 % ============================================================================
 
 \KOMAProvidesFile{scrbookreportarticle-de.tex}
-                 [$Date: 2023-07-31 15:38:10 +0200 (Mo, 31. Jul 2023) $
+                 [$Date: 2025-07-01 20:35:29 +0200 (Di, 01. Jul 2025) $
                   KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl)]
 
 \chapter{Die Hauptklassen \Class{scrbook}, \Class{scrreprt}, \Class{scrartcl}}
@@ -2628,8 +2628,7 @@
   \end{ShowOutput}%
 \end{Example}%
 \EndIndexGroup%
-% Zusammentreffen von Ausgabeende, Beispielende und Beschreibungsende:
-\vskip -1\baselineskip plus .75\ht\strutbox
+\ExampleEndFix
 
 \begin{Declaration}
   \Macro{raggedsection}
@@ -3307,7 +3306,11 @@
 versehen. \KOMAScript{} bietet daher mit der Einstellung
 \OptionValue{captions}{tableheading}%
 \IndexOption{captions~=\textKValue{tableheading}} die Möglichkeit, bei
-Tabellen die Formatierung auf Überschriften zu ändern.
+Tabellen die Formatierung auf Überschriften zu
+ändern. Intern\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+  \Class{scrartcl}} wird dies durch Verwendung der \Package{tocbasic}-Option
+\OptionValueRef{tocbasic}{tablecaptionposition}{top}%
+\IndexOption{tablecaptionposition~=top} erreicht.
 
 Es\textnote{Achtung!} sei %
 \iffalse an dieser Stelle \fi % Umbruchkorrektur
@@ -3319,17 +3322,21 @@
 \Package{supertabular}\IndexPackage{supertabular} (siehe
 \cite{package:supertabular}) benötigt.
 
-Mit\important{\OptionValue{captions}{tablesignature}}
-der Einstellung
+Mit\important{\OptionValue{captions}{tablesignature}} der Einstellung
 \OptionValue{captions}{tablesignature}%
-\IndexOption{captions~=\textKValue{tablesignature}}
-wird wieder die Voreinstellung der Formatierung als Tabellenunterschrift
-gewählt. Es\textnote{Achtung!} sei an dieser Stelle darauf hingewiesen, dass
-die beiden Werte lediglich die Formatierung ändern. Der Ort, an dem die Über"~
-oder Unterschrift gesetzt wird, hängt bei den Gleitumgebungen von
-\KOMAScript{} allein vom Ort ab, an dem die Anweisung
-\DescRef{\LabelBase.cmd.caption} verwendet wird. Dies ändert sich jedoch bei
-Verwendung des Pakets \Package{float}\IndexPackage{float} mit der Anweisung 
+\IndexOption{captions~=\textKValue{tablesignature}} wird wieder die
+Voreinstellung der Formatierung als Tabellenunterschrift gewählt.
+Intern\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+  \Class{scrartcl}} wird dies durch Verwendung der \Package{tocbasic}-Option
+\OptionValueRef{tocbasic}{tablecaptionposition}{bottom}%
+\IndexOption{tablecaptionposition~=bottom} erreicht.
+
+Es\textnote{Achtung!} sei an dieser Stelle darauf hingewiesen, dass die beiden
+Werte lediglich die Formatierung ändern. Der Ort, an dem die Über"~ oder
+Unterschrift gesetzt wird, hängt bei den Gleitumgebungen von \KOMAScript{}
+allein vom Ort ab, an dem die Anweisung \DescRef{\LabelBase.cmd.caption}
+verwendet wird. Dies ändert sich jedoch bei Verwendung des Pakets
+\Package{float}\IndexPackage{float} mit der Anweisung
 \Macro{restylefloat}\IndexCmd{restylefloat}\important{\Macro{restylefloat}}
 (siehe \cite{package:float}).
 
@@ -3340,11 +3347,17 @@
 \IndexOption{captions~=\textKValue{figureheading}} und
 \OptionValue{captions}{figuresignature}%
 \IndexOption{captions~=\textKValue{figuresignature}} auch die entsprechende
-Funktion für Abbildungen. Allerdings werden Abbildungen in der Regel wie im
-Falle von Fotos eher als Ganzes und im Falle von Diagrammen oder Graphen eher
-von unten links her betrachtet. In den wenigsten Fällen dürfte es daher
-sinnvoll sein, nur bei Abbildungen die Formatierung von Unterschriften in
-Überschriften zu ändern.
+Funktion für Abbildungen. Intern\ChangedAt{v3.46}{\Class{scrbook}\and
+  \Class{scrreprt}\and \Class{scrartcl}} werden diese durch Verwendung der
+\Package{tocbasic}-Option
+\OptionValueRef{tocbasic}{figurecaptionposition}{top}%
+\IndexOption{figurecaptionposition~=top} beziehungsweise
+\OptionValueRef{tocbasic}{figurecaptionposition}{bottom}%
+\IndexOption{figurecaptionposition~=bottom} realisiert. Allerdings werden
+Abbildungen in der Regel wie im Falle von Fotos eher als Ganzes und im Falle
+von Diagrammen oder Graphen eher von unten links her betrachtet. In den
+wenigsten Fällen dürfte es daher sinnvoll sein, nur bei Abbildungen die
+Formatierung von Unterschriften in Überschriften zu ändern.
 
 Manchmal wird jedoch gewünscht, alle Gleitumgebungen mit Überschriften zu
 versehen. Daher gibt es bei \KOMAScript{} die Einstellungen\important{%
@@ -3353,8 +3366,13 @@
 \IndexOption{captions~=\textKValue{heading}} und
 \OptionValue{captions}{signature}\IndexOption{captions~=\textKValue{signature}},
 mit der man die Formatierungen aller Gleitumgebungen entsprechend ändern
-kann. Diese entfalten ihre Wirkung auch noch, wenn sie innerhalb einer
-Gleitumgebung verwendet werden.
+kann. Intern\ChangedAt{v3.46}{\Class{scrbook}\and
+  \Class{scrreprt}\and \Class{scrartcl}} werden diese durch Verwendung der
+\Package{tocbasic}-Option
+\OptionValueRef{tocbasic}{captionposition}{top}%
+\IndexOption{captionposition~=top} beziehungsweise
+\OptionValueRef{tocbasic}{captionposition}{bottom}%
+\IndexOption{captionposition~=bottom} realisiert.
 
 Bitte\textnote{Achtung!}\OnlyAt{\Package{float}}\IndexPackage{float} beachten
 Sie, dass bei Verwendung des \Package{float}-Pakets die Einstellungen von
@@ -3430,7 +3448,12 @@
       \Class{scrartcl}}%
     Bei Abbildungen wird (gegebenenfalls abweichend von
     \OptionValue{captions}{signature}) die Formatierung als Überschrift
-    gewählt.}%
+    gewählt. Diese\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+      \Class{scrartcl}} Option basiert auf Option
+    \OptionValueRef{tocbasic}{figurecaptionposition}{top}%
+    \IndexOption{figurecaptionposition~=\KValue{top}} von Paket
+    \Package{tocbasic}. Siehe dazu \autoref{sec:tocbasic.caption}, ab
+    \autopageref{sec:tocbasic.caption}.}%
   \entry{\PValue{figuresignature}, \PValue{figurebelow}, \PValue{belowfigure},
     \PValue{bottomatfigure}%
     \IndexOption{captions~=\textKValue{figuresignature}}}{%
@@ -3438,15 +3461,24 @@
       \Class{scrartcl}}%
     Bei Abbildungen wird (gegebenenfalls abweichend von
     \OptionValue{captions}{heading}) die Formatierung als Unterschrift
-    gewählt.}%
+    gewählt. Diese\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+      \Class{scrartcl}} Option basiert auf Option
+    \OptionValueRef{tocbasic}{figurecaptionposition}{bottom}%
+    \IndexOption{figurecaptionposition~=\KValue{bottom}} von Paket
+    \Package{tocbasic}. Siehe dazu \autoref{sec:tocbasic.caption}, ab
+    \autopageref{sec:tocbasic.caption}.}%
   \entry{\PValue{heading}, \PValue{above}, \PValue{top}%
     \IndexOption{captions~=\textKValue{heading}}}{%
     Gleitumgebungstitel\ChangedAt{v3.09}{\Class{scrbook}\and
       \Class{scrreprt}\and \Class{scrartcl}} werden als Überschriften
     formatiert. Dies hat jedoch keinen Einfluss darauf, ob sie über oder unter
-    der Gleitumgebung platziert werden. Die Option impliziert auch
-    \OptionValue{captions}{tableheading} und
-    \OptionValue{captions}{figureheading}.}%
+    der Gleitumgebung platziert werden.
+    Diese\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+      \Class{scrartcl}} Option basiert auf Option
+    \OptionValueRef{tocbasic}{captionposition}{top}%
+    \IndexOption{captionposition~=\KValue{top}} von Paket
+    \Package{tocbasic}. Siehe dazu \autoref{sec:tocbasic.caption}, ab
+    \autopageref{sec:tocbasic.caption}.}%
   \entry{\PValue{innerbeside},
     \PValue{besideinner}\IndexOption{captions~=\textKValue{innerbeside}}}{%
     Gleitumgebungstitel der Umgebung \DescRef{\LabelBase.env.captionbeside}
@@ -3489,20 +3521,34 @@
       \Class{scrartcl}}%
     Gleitumgebungstitel werden als Unterschriften formatiert. Dies hat jedoch
     keinen Einfluss darauf, ob sie über oder unter der Gleitumgebung platziert
-    werden. Die Option impliziert auch \OptionValue{captions}{tablesignature}
-    und \OptionValue{captions}{figuresignature}.}%
+    werden. Diese\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+      \Class{scrartcl}} Option basiert auf Option
+    \OptionValueRef{tocbasic}{captionposition}{bottom}%
+    \IndexOption{captionposition~=\KValue{bottom}} von Paket
+    \Package{tocbasic}. Siehe dazu \autoref{sec:tocbasic.caption}, ab
+    \autopageref{sec:tocbasic.caption}.}%
   \entry{\PValue{tableheading}, \PValue{tableabove}, \PValue{abovetable},
     \PValue{abovetabular}, \PValue{topattable}%
     \IndexOption{captions~=\textKValue{tableheading}}}{%
     Bei Tabellen wird (gegebenenfalls abweichend von
     \OptionValue{captions}{signature}) die Formatierung als Überschrift
-    gewählt.}%
+    gewählt. Diese\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+      \Class{scrartcl}} Option basiert auf Option
+    \OptionValueRef{tocbasic}{tablecaptionposition}{top}%
+    \IndexOption{tablecaptionposition~=\KValue{top}} von Paket
+    \Package{tocbasic}. Siehe dazu \autoref{sec:tocbasic.caption}, ab
+    \autopageref{sec:tocbasic.caption}.}%
   \entry{\PValue{tablesignature}, \PValue{belowtable}, \PValue{belowtabular},
     \PValue{bottomattable}%
     \IndexOption{captions~=\textKValue{tablesignature}}}{%
     Bei Tabellen wird (gegebenenfalls abweichend von
     \OptionValue{captions}{heading}) die Formatierung als Unterschrift
-    gewählt.}%
+    gewählt. Diese\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+      \Class{scrartcl}} Option basiert auf Option
+    \OptionValueRef{tocbasic}{tablecaptionposition}{bottom}%
+    \IndexOption{tablecaptionposition~=\KValue{bottom}} von Paket
+    \Package{tocbasic}. Siehe dazu \autoref{sec:tocbasic.caption}, ab
+    \autopageref{sec:tocbasic.caption}.}%
   \entry{\PValue{topbeside}, \PValue{besidetop}}{%
     Gleitumgebungstitel der Umgebung \DescRef{\LabelBase.env.captionbeside}
     (siehe \autoref{sec:\LabelBase.floats},
@@ -3519,85 +3565,17 @@
   \Macro{caption}\OParameter{Verzeichniseintrag}\Parameter{Titel}
   \Macro{captionbelow}\OParameter{Verzeichniseintrag}\Parameter{Titel}
   \Macro{captionabove}\OParameter{Verzeichniseintrag}\Parameter{Titel}
+  \Macro{captionof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag}
+                   \Parameter{Titel}
+  \Macro{captionaboveof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag}
+                        \Parameter{Titel}
+  \Macro{captionbelowof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag}
+                        \Parameter{Titel}
 \end{Declaration}%
-Tabellen und Abbildungen werden bei den Standardklassen mit Hilfe der
-Anweisung \Macro{caption} mit einem \PName{Titel} in Form einer
-Unterschrift\Index{Tabellen>Unterschrift} versehen. Bei Abbildungen ist dies
-grundsätzlich korrekt. Bei Tabellen wird gestritten, ob der \PName{Titel} als
-Überschrift über oder konsistent mit der
-Bildunterschrift\Index{Bildunterschrift} unter die Tabelle gehört. Daher
-bietet \KOMAScript{}\textnote{\KOMAScript{} vs. Standardklassen} im
-Gegensatz zu den Standardklassen die Anweisungen \Macro{captionbelow} für
-\PName{Titel} in Form von Unterschriften und \Macro{captionabove} für
-\PName{Titel} in Form von Überschriften. 
+Bezüglich der generellen Funktion dieser Anweisungen zum Setzen eines Titels
+für Tabellen und Abbildungen sei \autoref{sec:tocbasic.caption}, ab
+\autopageref{sec:tocbasic.caption} verwiesen.
 
-Sowohl bei Tabellen als auch bei Abbildungen oder generell für alle
-Gleitumgebungen lässt sich das Verhalten von \Macro{caption} mit der Option
-\DescRef{\LabelBase.option.captions}\IndexOption{captions} steuern, die am
-Anfang dieses Abschnitts zu finden ist. Aus Gründen der Kompatibilität ist
-voreingestellt, dass sich \Macro{caption} bei allen Gleitumgebungen wie
-\Macro{captionbelow} verhält. Es wird jedoch empfohlen\textnote{Tipp!},
-Tabellenüberschriften zu verwenden und auf die Formatierung mit
-\OptionValueRef{\LabelBase}{captions}{tableheading} entsprechend umzustellen
-oder bei Tabellen auf \Macro{captionabove} zurückzugreifen.
-%
-\begin{Example}
-  Sie wollen mit
-  Tabellenüberschriften\Index{Tabellen>Ueberschrift=Überschrift} statt mit
-  Tabellenunterschriften arbeiten, weil Sie teilweise Tabellen haben, die über
-  mehr als eine Seite gehen. Mit den Standardklassen bliebe Ihnen nur die
-  Möglichkeit:
-\begin{lstcode}
-  \begin{table}
-    \caption{Dies ist nur eine Beispieltabelle}
-    \begin{tabular}{llll}
-      Dies & ist & ein & Beispiel.\\\hline
-      Bitte & lassen & Sie & den \\
-      Inhalt & dieser & Tabelle & unbeachtet.
-    \end{tabular}
-  \end{table}
-\end{lstcode}
-  Damit hätten Sie das unschöne Ergebnis:
-  \begin{ShowOutput}\centering
-    {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:}
-      Dies ist nur eine
-      Beispieltabelle}\\
-    \begin{tabular}{llll}
-      Dies & ist & ein & Beispiel.\\\hline
-      Bitte & lassen & Sie & den \\
-      Inhalt & dieser & Tabelle & unbeachtet.
-    \end{tabular}
-  \end{ShowOutput}
-  Bei \KOMAScript{} schreiben Sie hingegen:
-\begin{lstcode}
-  \begin{table}
-    \captionabove{Dies ist nur eine Beispieltabelle}
-    \begin{tabular}{llll}
-      Dies & ist & ein & Beispiel.\\\hline
-      Bitte & lassen & Sie & den \\
-      Inhalt & dieser & Tabelle & unbeachtet.
-    \end{tabular}
-  \end{table}
-\end{lstcode}
-  Sie erhalten dann das gewünschte Ergebnis:
-  \begin{ShowOutput}\centering
-    {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:}
-      Dies ist nur eine
-      Beispieltabelle}\\\vskip\abovecaptionskip
-    \begin{tabular}{llll}
-      Dies & ist & ein & Beispiel.\\\hline
-      Bitte & lassen & Sie & den \\
-      Inhalt & dieser & Tabelle & unbeachtet.
-    \end{tabular}
-  \end{ShowOutput}
-  Da Sie konsequent nicht nur eine, sondern alle Tabellen mit Überschriften
-  versehen, können Sie stattdessen auch die Option
-  \OptionValueRef{\LabelBase}{captions}{tableheading} setzen (siehe
-  \DescPageRef{\LabelBase.option.captions.tableheading}). Dann genügt es,
-  wenn Sie wie bei den Standardklassen \Macro{caption} verwenden.  Sie
-  erhalten trotzdem das Ergebnis von \Macro{captionabove}.
-\end{Example}
-
 \BeginIndex[indexother]{}{Schrift>Art}%
 \BeginIndex{FontElement}{caption}\LabelFontElement{caption}%
 \BeginIndex{FontElement}{captionlabel}\LabelFontElement{captionlabel}%
@@ -3659,146 +3637,9 @@
   \fi
 \end{Example}%
 \EndIndexGroup
-\vskip -1\ht\strutbox plus .75\strutbox% Beispiel am Beschreibungsende
+\ExampleEndFix
 
-
 \begin{Declaration}
-  \Macro{captionof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag}
-                   \Parameter{Titel}
-  \Macro{captionaboveof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag}
-                        \Parameter{Titel}
-  \Macro{captionbelowof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag}
-                        \Parameter{Titel}
-\end{Declaration}
-Ähnlich wie die Pakete \Package{caption}\IndexPackage{caption} und
-\Package{capt-of}\IndexPackage{capt-of} bietet auch \KOMAScript{} die
-Anweisung \Macro{captionof}\ChangedAt{v3.05}{\Class{scrbook}\and
-  \Class{scrreprt}\and \Class{scrartcl}} mit der man auch außerhalb einer
-Gleitumgebung oder in einer fremden Gleitumgebung einen entsprechenden Titel
-mit Eintrag in das jeweilige Verzeichnis setzen kann. Dabei muss im Gegensatz
-zu \DescRef{\LabelBase.cmd.caption} die Art des Gleitobjekts als zusätzliches
-erstes Argument angegeben werden.
-
-Darüber hinaus bietet \KOMAScript{} zusätzlich auch die Anweisungen
-\Macro{captionaboveof}\ChangedAt{v3.09}{\Class{scrbook}\and
-  \Class{scrreprt}\and \Class{scrartcl}} und \Macro{captionbelowof}. Diese
-dienen als Gegenstücke zu \DescRef{\LabelBase.cmd.captionabove} und
-\DescRef{\LabelBase.cmd.captionbelow}.
-
-Selbstverständlich berücksichtigt\ChangedAt{v3.09a}{\Class{scrbook}\and
-  \Class{scrreprt}\and \Class{scrartcl}} \Macro{captionof} auch die
-Einstellungen von Option \DescRef{\LabelBase.option.captions} bezüglich der
-Formatierung des Titels als Über- oder Unterschrift. Diese Fähigkeit geht
-jedoch eventuell durch das Laden von Paketen wie
-\Package{capt-of}\IndexPackage{capt-of} oder
-\Package{caption}\IndexPackage{caption} verloren. Bei Verwendung von
-\Package{caption} ist die Anleitung zu diesem Paket zu beachten (siehe
-\cite{package:caption})!%
-\begin{Example}
-  Angenommen, Sie wollen ein Gleitobjekt erstellen, bei dem eine Tabelle und
-  eine Abbildung nebeneinander stehen. Da es keine gemischten Gleitobjekte gibt,
-  verwenden Sie primär eine \Environment{figure}-Umgebung:
-\begin{lstcode}
-  \begin{figure}
-    \begin{minipage}{.5\linewidth}
-      \centering
-      \rule{4cm}{5cm}
-      \caption{Ein Rechteck}\label{fig:rechteck}
-    \end{minipage}%
-    \begin{minipage}{.5\linewidth}
-      \centering
-      \captionaboveof{table}
-      [Maße des Rechtecks aus
-        Abbildung~\ref{fig:rechteck}]%
-      {Rechtecksmaße}
-      \label{tab:rechteck}
-      \begin{tabular}{ll}
-        Breite: & 4\,cm\\
-        Höhe:   & 5\,cm
-      \end{tabular}
-    \end{minipage}
-  \end{figure}
-\end{lstcode}
-  Um Abbildung und Tabelle nebeneinander zu setzen, wurden zwei
-  \Environment{minipage}-Umgebungen verwendet. %
-  \iffalse % Umbruchkorrektur
-  Wichtig\textnote{Achtung!} ist hier das Prozentzeichen nach der ersten
-  \Environment{minipage}, ohne das ein zusätzlicher Wortabstand zwischen die
-  beiden \Environment{minipage}-Umgebungen gesetzt würde.%
-  \else %
-  Wichtig\textnote{Achtung!} ist das Prozentzeichen nach der ersten
-  \Environment{minipage} zur Unterdrückung des Wortabstands zwischen den
-  Umgebungen.%
-  \fi %
-
-  \iffalse % Umbruchkorrektur
-  Die Abbildungsunterschrift wurde mit \DescRef{\LabelBase.cmd.caption}
-  gesetzt. %
-  \fi %
-  Für die Tabellenüberschrift wurde \Macro{captionaboveof} verwendet. Als
-  erstes Argument wurde \PValue{table} angegeben. Dadurch weiß \KOMAScript{},
-  dass es sich trotz \Environment{figure}-Umgebung um eine Tabellenüberschrift
-  handelt.
-
-  Das optionale Argument von \Macro{captionaboveof} setzt den Eintrag in das
-  Tabellenverzeichnis. Ohne das optionale Argument würde der als letztes
-  Argument angegebene Titel ebenfalls in das Tabellenverzeichnis
-  geschrieben. Während dieser Titel im Gleitobjekt selbst völlig ausreichend
-  ist, wäre er jedoch im Tabellenverzeichnis wenig aussagekräftig. Daher wird
-  hier für das Verzeichnis ein abweichender Titel über das optionale Argument
-  verwendet. Das Ergebnis der Bemühungen zeigt
-  \autoref{fig:maincls.captionaboveof}.%
-%
-\begin{figure}
-%  \centering
-%  \caption
-  \KOMAoptions{captions=bottombeside}%
-  \setcapindent{0pt}%
-  \begin{captionbeside}
-    [{Beispiel: Verwendung von \Macro{captionaboveof} innerhalb einer
-      fremden Gleitumgebung}]
-    {\hspace{0pt plus 1ex}Verwendung von \Macro{captionaboveof} innerhalb einer
-      fremden Gleitumgebung\label{fig:maincls.captionaboveof}}
-    [l]
-  \begin{minipage}[b]{.66\linewidth}%
-  \raisebox{\depth}{\fbox{\KOMAoptions{captions=oneline}%
-    \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
-      \centering
-      \rule{4cm}{5cm}
-      \caption[Beispiel: Ein Rechteck]{Ein Rechteck}\label{fig:maincls.rechteck}
-    \end{minipage}%
-    \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
-      \centering
-      \captionaboveof{table}[Beispiel: Maße des Rechtecks aus
-      Abbildung~\ref{fig:maincls.rechteck}]{Rechteckmaße}
-      \label{tab:maincls.rechteck}
-      \begin{tabular}{ll}
-        Breite: & 4\,cm\\
-        Höhe:   & 5\,cm
-      \end{tabular}
-    \end{minipage}}}%
-  \end{minipage}%
-  \end{captionbeside}%
-\end{figure}%
-\end{Example}%
-In gleicher Weise, wie in obigem Beispiel eine Tabelle innerhalb einer
-Abbildungsumgebung gesetzt und mit einem Titel versehen wird, könnte man auch
-eine nicht gleitende Tabelle außerhalb jeder Gleitumgebung
-setzen. Dabei\ChangedAt{v3.41}{\Class{scrbook}\and \Class{scrreprt}\and
-  \Class{scrartcl}} versucht \KOMAScript{} auch einen Seitenumbruch zwischen
-der Überschrift und der Tabelle zu verhindern. Das kann allerdings nicht in
-allen Fällen sichergestellt werden. Daher sollte in der Regel eine
-\Environment{minipage} verwendet werden, um zu verhindern, dass zwischen
-Überschrift und Tabelle ein Seitenumbruch erfolgen kann. Zusätzlich sollte man
-die \Environment{minipage} dann noch in eine \Environment{flushleft}-Umgebung
-einbetten, um einerseits einen gefälligen Abstand zum Text davor und dahinter
-zu erreichen und andererseits den Absatzeinzug vor der \Environment{minipage}
-zu verhindern. Einfacher ist natürlich direkt die Umgebung
-\DescRef{\LabelBase.env.table-}\IndexEnv{table-} zu verwenden.%
-\EndIndexGroup
-
-
-\begin{Declaration}
   \begin{Environment}{captionbeside}
     \OParameter{Verzeichnistitel}
     \Parameter{Titel}
@@ -4030,11 +3871,9 @@
     \label{fig:maincls.captionbesidetop}
   \end{figure}
 \end{Example}
-\vskip -1\ht\strutbox plus .75\strutbox% Beispiel am Ende der Erklärung
-%
 \EndIndexGroup
+\ExampleEndFix
 
-
 \begin{Declaration}
   \begin{Environment}{captionofbeside}
     \Parameter{Objekttyp}
@@ -4119,7 +3958,7 @@
 \end{Example}
 %
 \EndIndexGroup
-\vskip -1\ht\strutbox plus .75\ht\strutbox% Beispiel am Ende
+\ExampleEndFix
 
 \begin{Declaration}
   \Macro{figureformat}
@@ -4168,7 +4007,7 @@
 \end{Example}
 %
 \EndIndexGroup
-\vskip -1\ht\strutbox plus  .75\ht\strutbox% Beispiel am Ende der Erklärung
+\ExampleEndFix
 
 \begin{Declaration}
   \Macro{setcapindent}\Parameter{Einzug}

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-en.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-en.tex	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-en.tex	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,6 +1,6 @@
 % ======================================================================
 % scrbookreportarticle-en.tex
-% Copyright (c) Markus Kohm, 2001-2023
+% Copyright (c) Markus Kohm, 2001-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -24,7 +24,7 @@
 % ============================================================================
 
 \KOMAProvidesFile{scrbookreportarticle-en.tex}
-                 [$Date: 2023-09-06 10:22:04 +0200 (Mi, 06. Sep 2023) $
+                 [$Date: 2025-07-01 20:35:29 +0200 (Di, 01. Jul 2025) $
                   KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl)]
 
 \translator{Jens-Uwe Morawski\and Gernot Hassenpflug\and Markus Kohm\and
@@ -3020,7 +3020,11 @@
 are normally at least two good reasons to provide all tables with headings.
 \KOMAScript{} therefore offers the \OptionValue{captions}{tableheading}%
 \IndexOption{captions~=\textKValue{tableheading}} option, which changes the
-formatting of table captions for use above the table.
+formatting of table captions for use above the
+table. Internally\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+  \Class{scrartcl}}, this is achieved by using the \Package{tocbasic} option
+\OptionValueRef{tocbasic}{tablecaptionposition}{top}%
+\IndexOption{tablecaptionposition~=top}.
 
 Note\textnote{Attention!} that multi-page tabulars cannot use a floating
 environment. To have an automatic page break in a tabular you need an
@@ -3030,7 +3034,13 @@
 
 You\important{\OptionValue{captions}{tablesignature}} can switch back to the
 default caption formatting using \OptionValue{captions}{tablesignature}%
-\IndexOption{captions~=\textKValue{tablesignature}}. Note\textnote{Attention!}
+\IndexOption{captions~=\textKValue{tablesignature}}. Internally\ChangedAt{v3.46}{\Class{scrbook}\and
+  \Class{scrreprt}\and \Class{scrartcl}}, this is achieved by using the
+\Package{tocbasic} option
+\OptionValueRef{tocbasic}{tablecaptionposition}{bottom}%
+\IndexOption{tablecaptionposition~=bottom}.
+
+Note\textnote{Attention!}
 that these options change only the formatting, not the actual position of the
 caption. Whether the caption is placed above or below a float depends solely
 upon where you use the \DescRef{\LabelBase.cmd.caption} command inside float
@@ -3045,21 +3055,31 @@
 \OptionValue{captions}{figureheading}%
 \IndexOption{captions~=\textKValue{figureheading}} and
 \OptionValue{captions}{figuresignature}%
-\IndexOption{captions~=\textKValue{figuresignature}}. However, figures such as
-photos tend to be viewed as a whole, and a diagram or graph will mostly be
-examined starting from the lower left. Therefore, it only rarely makes sense
-to change the caption format for figures alone from signatures to headings.
+\IndexOption{captions~=\textKValue{figuresignature}}.
+Internally\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+  \Class{scrartcl}}, this is achieved by using the \Package{tocbasic} option
+\OptionValueRef{tocbasic}{figurecaptionposition}{top}%
+\IndexOption{figurecaptionposition~=top}
+resp. \OptionValueRef{tocbasic}{figurecaptionposition}{bottom}%
+\IndexOption{figurecaptionposition~=bottom}. However, figures such as photos
+tend to be viewed as a whole, and a diagram or graph will mostly be examined
+starting from the lower left. Therefore, it only rarely makes sense to change
+the caption format for figures alone from signatures to headings.
 
 Sometimes, however, all floating environments should use headings. Therefore
 \KOMAScript{} provides\ChangedAt{v3.09}{\Class{scrbook}\and
   \Class{scrreprt}\and \Class{scrartcl}}
 options\important{\OptionValue{captions}{heading}\\
-	\OptionValue{captions}{signature}}
+  \OptionValue{captions}{signature}}
 \OptionValue{captions}{heading}\IndexOption{captions~=\textKValue{heading}}
 and \OptionValue{captions}{signature}%
 \IndexOption{captions~=\textKValue{signature}} to switch the format of every
-floating environment. These options can also be used inside a floating
-environment.
+floating environment. Internally\ChangedAt{v3.46}{\Class{scrbook}\and
+  \Class{scrreprt}\and \Class{scrartcl}}, this is achieved by using the
+\Package{tocbasic} option \OptionValueRef{tocbasic}{captionposition}{top}%
+\IndexOption{captionposition~=top}
+resp. \OptionValueRef{tocbasic}{captionposition}{bottom}%
+\IndexOption{figurecaptionposition~=bottom}.
 
 Please note\textnote{Achtung!}\OnlyAt{\Package{float}}\IndexPackage{float}
 when using the \Package{float} package that the settings for signatures or
@@ -3112,14 +3132,14 @@
     Available values for the \Option{captions} option (\emph{continued})%
   }%
   \entry{\PValue{bottombeside}, \PValue{besidebottom}}{%
-    Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see 
-    \autoref{sec:\LabelBase.floats}, 
-    \DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned with 
+    Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see
+    \autoref{sec:\LabelBase.floats},
+    \DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned with
     the bottommost baseline of the contents of the floating environment.%
     \IndexOption{captions~=\textKValue{bottombeside}}}%
   \entry{\PValue{centeredbeside}, \PValue{besidecentered},
     \PValue{middlebeside}, \PValue{besidemiddle}}{%
-    Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see 
+    Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see
     \autoref{sec:\LabelBase.floats},
     \DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned with
     the center of the contents of the floating environment.%
@@ -3130,7 +3150,12 @@
     \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and
       \Class{scrartcl}}%
     Captions for figures use heading format\,---\,possibly deviating from
-    \OptionValue{captions}{signature}.%
+    \OptionValue{captions}{signature}. This\ChangedAt{v3.46}{\Class{scrbook}\and
+      \Class{scrreprt}\and \Class{scrartcl}} option is based on option
+    \OptionValueRef{tocbasic}{figurecaptionposition}{top}%
+    \IndexOption{figurecaptionposition~=\KValue{top}} from package
+    \Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from
+    \autopageref{sec:tocbasic.caption}.%
   }%
   \entry{\PValue{figuresignature}, \PValue{belowfigure},
     \PValue{bottomatfiggure}%
@@ -3137,24 +3162,35 @@
     \IndexOption{captions~=\textKValue{figuresignature}}}{%
     \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and
       \Class{scrartcl}}%
-    Captions for figures use signature format\,---\,possibly deviating 
-    from \OptionValue{captions}{headings}.%
+    Captions for figures use signature format\,---\,possibly deviating from
+    \OptionValue{captions}{headings}. This\ChangedAt{v3.46}{\Class{scrbook}\and
+      \Class{scrreprt}\and \Class{scrartcl}} option is based on option
+    \OptionValueRef{tocbasic}{figurecaptionposition}{bottom}%
+    \IndexOption{figurecaptionposition~=\KValue{bottom}} from package
+    \Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from
+    \autopageref{sec:tocbasic.caption}.%
   }%
   \entry{\PValue{heading}, \PValue{above}, \PValue{top}%
     \IndexOption{captions~=\textKValue{heading}}}{%
     \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and
       \Class{scrartcl}} Captions for floating environments use formatting
-    suitable for use in a heading. This setting does not control whether they 
-    are placed at the top or the bottom of the object. This option also 
-    implies \OptionValue{captions}{tableheading} and
-    \OptionValue{captions}{figureheading}.%
+    suitable for use in a heading. This setting does not control whether they
+    are placed at the top or the bottom of the
+    object. This\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+      \Class{scrartcl}} option also implies
+    \OptionValue{captions}{tableheading} and
+    \OptionValue{captions}{figureheading}.  This option is based on option
+    \OptionValueRef{tocbasic}{captionposition}{top}%
+    \IndexOption{captionposition~=\KValue{top}} from package
+    \Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from
+    \autopageref{sec:tocbasic.caption}.%
   }%
   \entry{\PValue{innerbeside},
     \PValue{besideinner}\IndexOption{captions~=\textKValue{innerbeside}}}{%
     Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see
     \autoref{sec:\LabelBase.floats},
-    \DescPageRef{\LabelBase.env.captionbeside}) are placed inside of and next 
-    to the contents of the environment in two-sided printing. In one-sided 
+    \DescPageRef{\LabelBase.env.captionbeside}) are placed inside of and next
+    to the contents of the environment in two-sided printing. In one-sided
     printing, \OptionValue{captions}{leftbeside} is used.%
   }%
   \entry{\PValue{leftbeside},
@@ -3161,8 +3197,8 @@
     \PValue{besideleft}\IndexOption{captions~=\textKValue{leftbeside}}}{%
     Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see
     \autoref{sec:\LabelBase.floats},
-    \DescPageRef{\LabelBase.env.captionbeside}) are placed to the left of
-    the contents of the floating environment.%
+    \DescPageRef{\LabelBase.env.captionbeside}) are placed to the left of the
+    contents of the floating environment.%
   }%
   \pventry{nooneline}{%
     Single-line captions are handled the same as multi-line captions.%
@@ -3174,9 +3210,9 @@
     \IndexOption{captions~=\textKValue{outerbeside}}}{%
     Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see
     \autoref{sec:\LabelBase.floats},
-    \DescPageRef{\LabelBase.env.captionbeside}) are placed outside of and
-    next to the contents of the environment in two-sided printing. In
-    one-sided printing, \OptionValue{captions}{rightbeside} is used.%
+    \DescPageRef{\LabelBase.env.captionbeside}) are placed outside of and next
+    to the contents of the environment in two-sided printing. In one-sided
+    printing, \OptionValue{captions}{rightbeside} is used.%
   }%
   \entry{\PValue{rightbeside}, \PValue{besideright}%
     \IndexOption{captions~=\textKValue{rightbeside}}}{%
@@ -3189,25 +3225,43 @@
     \IndexOption{captions~=\textKValue{signature}}}{%
     \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and
       \Class{scrartcl}}%
-    Captions for floating environments use signature format. This setting 
-    does not control whether they are placed at the top or the bottom of the 
-    object. This options also implies \OptionValue{captions}{tablesignature} 
-    and \OptionValue{captions}{figuresignature}.%
+    Captions for floating environments use signature format. This setting does
+    not control whether they are placed at the top or the bottom of the
+    object. This options also implies \OptionValue{captions}{tablesignature}
+    and \OptionValue{captions}{figuresignature}.
+    This\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+      \Class{scrartcl}} option is based on option
+    \OptionValueRef{tocbasic}{captionposition}{bottom}%
+    \IndexOption{captionposition~=\KValue{bottom}} from package
+    \Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from
+    \autopageref{sec:tocbasic.caption}.%
   }%
   \entry{\PValue{tableheading}, \PValue{tableabove}, \PValue{abovetable},
     \PValue{abovetabular}, \PValue{topattable}%
     \IndexOption{captions~=\textKValue{tableheading}}}{%
     Captions for tables use heading format\,---\,possibly deviating from
-    \OptionValue{captions}{signature}.%
+    \OptionValue{captions}{signature}.
+    This\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+      \Class{scrartcl}} option is based on option
+    \OptionValueRef{tocbasic}{tablecaptionposition}{top}%
+    \IndexOption{tablecaptionposition~=\KValue{top}} from package
+    \Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from
+    \autopageref{sec:tocbasic.caption}.%
   }%
   \entry{\PValue{tablesignature}, \PValue{belowtable}, \PValue{belowtabular},
     \PValue{bottomattable}%
     \IndexOption{captions~=\textKValue{tablesignature}}}{%
-    Captions for tables use signature format\,---\,possibly deviating
-    from \OptionValue{captions}{heading}.%
+    Captions for tables use signature format\,---\,possibly deviating from
+    \OptionValue{captions}{heading}.
+    This\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and
+      \Class{scrartcl}} option is based on option
+    \OptionValueRef{tocbasic}{tablecaptionposition}{bottom}%
+    \IndexOption{tablecaptionposition~=\KValue{bottom}} from package
+    \Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from
+    \autopageref{sec:tocbasic.caption}.%
   }%
   \entry{\PValue{topbeside}, \PValue{besidetop}}{%
-    Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see 
+    Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see
     \autoref{sec:\LabelBase.floats},
     \DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned to the
     baseline at the top of the floating environment.%
@@ -3221,81 +3275,17 @@
   \Macro{caption}\OParameter{entry}\Parameter{title}
   \Macro{captionbelow}\OParameter{entry}\Parameter{title}
   \Macro{captionabove}\OParameter{entry}\Parameter{title}
+  \Macro{captionof}\Parameter{float type}\OParameter{entry}%
+  \Parameter{title}%
+  \Macro{captionbelowof}\Parameter{float type}\OParameter{entry}%
+  \Parameter{title}%
+  \Macro{captionaboveof}\Parameter{float type}\OParameter{entry}%
+  \Parameter{title}
 \end{Declaration}%
-In the standard classes, tables and figures are given captions with the 
-\Macro{caption} command placed below the table or figure. For figures, this is 
-generally correct. For tables, opinions differ as to whether captions should 
-be placed above the table or, consistent with captions of 
-figures\Index{caption>of figure}, below it\Index{caption>of table}. Therefore
-{\KOMAScript}\textnote{\KOMAScript{} vs. standard classes},
-unlike the standard classes, offers \Macro{captionbelow} for captions
-below and \Macro{captionabove} for captions above tables or
-figures.
+With regard to the general function of these commands for setting a caption
+for tables and figures, please refer to \autoref{sec:tocbasic.caption}, from
+\autopageref{sec:tocbasic.caption}.
 
-For tables and figures, or in general for all floating environments, you can
-control the behaviour of \Macro{caption} with the
-\DescRef{\LabelBase.option.captions}\IndexOption{captions} option described at
-the beginning of this section. For compatibility reasons, the default
-behaviour of \Macro{caption} for all floating environments is like
-\Macro{captionbelow}. However, you\textnote{Hint!} should use the
-\OptionValueRef{\LabelBase}{captions}{tableheading} option, which switches the
-behaviour of \Macro{caption} inside table environments to
-\Macro{captionabove}. Alternatively, you can use \Macro{captionabove} instead
-of \Macro{caption} inside every \Environment{table} environment.
-%
-\begin{Example}
-  Instead of using captions below a table, you want to place your
-  captions above it\Index{table>caption}, because you have tables
-  which span more then one page. In the standard classes you could
-  only write:
-\begin{lstcode}
-  \begin{table}
-    \caption{This is an example table}
-    \begin{tabular}{llll}
-      This & is & an & example.\\\hline
-      This & is & an & example.\\
-      This & is & an & example.
-    \end{tabular}
-  \end{table}
-\end{lstcode}
-  Then you would get this unsatisfying result:
-  \begin{ShowOutput}\centering
-    {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:}
-      This is an example table.}\\
-        \begin{tabular}{llll}
-      This & is & an & example.\\\hline
-      This & is & an & example.\\
-      This & is & an & example.
-        \end{tabular}
-\end{ShowOutput}
-  Using {\KOMAScript} you write instead:
-\begin{lstcode}
-  \begin{table}
-    \captionabove{This is just an example table}
-    \begin{tabular}{llll}
-      This & is & an & example.\\\hline
-      This & is & an & example.\\
-      This & is & an & example.
-    \end{tabular}
-  \end{table}
-\end{lstcode}
-  Then you get:
-  \begin{ShowOutput}\centering
-    {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:}
-      This is just an example table}\\\vskip\abovecaptionskip
-    \begin{tabular}{llll}
-      This & is & an & example.\\\hline
-      This & is & an & example.\\
-      This & is & an & example.
-    \end{tabular}
-  \end{ShowOutput}
-  Since you want all your tables typeset with captions above, you could
-  of course use the \OptionValueRef{\LabelBase}{captions}{tableheading} option
-  instead (see \DescPageRef{\LabelBase.option.captions.tableheading}). Then
-  you can use \Macro{caption} as you would in the standard classes. You will
-  get the same result as with \Macro{captionabove}.
-\end{Example}
-
 \BeginIndex[indexother]{}{font>style}%
 \BeginIndex{FontElement}{caption}\LabelFontElement{caption}%
 \BeginIndex{FontElement}{captionlabel}\LabelFontElement{captionlabel}%
@@ -3349,131 +3339,9 @@
   possible.
 \end{Example}%
 \EndIndexGroup
+\ExampleEndFix
 
-
 \begin{Declaration}
-  \Macro{captionof}\Parameter{float type}\OParameter{entry}%
-  \Parameter{title}%
-  \Macro{captionbelowof}\Parameter{float type}\OParameter{entry}%
-  \Parameter{title}%
-  \Macro{captionaboveof}\Parameter{float type}\OParameter{entry}%
-  \Parameter{title}
-\end{Declaration}%
-Like\ChangedAt{v3.05}{\Class{scrbook}\and \Class{scrreprt}\and
-	\Class{scrartcl}} the \Package{caption}\IndexPackage{caption} and
-\Package{capt-of}\IndexPackage{capt-of} packages, \KOMAScript{} offers the
-\Macro{captionof} command, with which you can put a caption for a floating
-environment, together with an entry in the corresponding environment list,
-outside of the floating environment or even in a different floating
-environment. Unlike \DescRef{\LabelBase.cmd.caption}, the type of floating
-environment must be specified as the first parameter.
-
-In addition, \KOMAScript{} also provides the commands
-\Macro{captionaboveof}\ChangedAt{v3.09}{\Class{scrbook}\and
-  \Class{scrreprt}\and \Class{scrartcl}} and \Macro{captionbelowof}. These are
-like \DescRef{\LabelBase.cmd.captionabove} and
-\DescRef{\LabelBase.cmd.captionbelow} but with the additional features and
-parameter of \Macro{captionof}.
-
-Of course\ChangedAt{v3.09a}{\Class{scrbook}\and \Class{scrreprt}\and 
-  \Class{scrartcl}} \Macro{captionof} takes into account the \PValue{heading}
-and \PValue{signature} settings of the \DescRef{\LabelBase.option.captions}
-option. But this feature may be lost if you load the
-\Package{capt-of}\IndexPackage{capt-of} or
-\Package{caption}\IndexPackage{caption} packages. When using
-\Package{caption}, you must follow the instructions for that package (see
-\cite{package:caption})!
-\begin{Example}
-  Suppose you want to create a floating object with a table and a figure next 
-  to each other. Since there are no mixed floating environments, you primarily
-  use a \Environment{figure} environment:
-\begin{lstcode}
-  \begin{figure}
-    \begin{minipage}{.5\linewidth}
-      \centering
-      \rule{4cm}{5cm}
-      \caption{A rectangle}\label{fig:rechteck}
-    \end{minipage}%
-    \begin{minipage}{.5\linewidth}
-      \centering
-      \captionaboveof{table}
-      [Measure of the rectangle in
-        figure~\ref{fig:rechteck}]%
-      {Rectangle measure}
-      \label{tab:rechteck}
-      \begin{tabular}{ll}
-        Width:  & 4\,cm\\
-        Height: & 5\,cm
-      \end{tabular}
-    \end{minipage}
-  \end{figure}
-\end{lstcode}
-  Two \Environment{minipage} environments were used to place the figure 
-  and the table side by side. The\textnote{Attention!} percent sign after the 
-  end of the first \Environment{minipage} is important. Without it, an 
-  additional space would appear between the \Environment{minipage}
-  environments.
-
-  The figure caption was created with \DescRef{\LabelBase.cmd.caption}. The 
-  table caption was created with \Macro{captionaboveof} with \PValue{table}
-  as the first argument. Because of this, \KOMAScript{} knows that this is a 
-  table caption even though it is inside the \Environment{figure} environment.
-
-  The optional argument of \Macro{captionaboveof} creates an entry in the
-  list of tables. Without the optional argument, the caption specified in the 
-  final mandatory argument would have been used for the list of tables too. 
-  Although this caption text is sufficient for the environment itself, it 
-  would not be very meaningful in the list of tables. Therefore, a different 
-  title is used for the list of tables using the optional argument.
-  \autoref{fig:\LabelBase.captionaboveof} shows the result of the example code.%
-\begin{figure}
-%  \centering
-%  \caption
-  \KOMAoptions{captions=bottombeside}%
-  \setcapindent{0pt}%
-  \begin{captionbeside}
-    [{Example: Using \Macro{captionaboveof} inside another floating
-      environment}]
-    {Example: Using \Macro{captionaboveof} inside another floating
-      environment\label{fig:\LabelBase.captionaboveof}}
-    [l]
-  \begin{minipage}[b]{.66\linewidth}%
-  \raisebox{\depth}{\fbox{\KOMAoptions{captions=oneline}%
-    \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
-      \centering
-      \rule{4cm}{5cm}
-      \caption[Example: A rectangle]{A rectangle}\label{fig:\LabelBase.rechteck}
-    \end{minipage}%
-    \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
-      \centering
-      \captionaboveof{table}[Example: Measure of the rectangle in
-        figure~\ref{fig:\LabelBase.rechteck}]{Rectangle measure}
-      \label{tab:\LabelBase.rechteck}
-      \begin{tabular}{ll}
-        Width:  & 4\,cm\\
-        Height: & 5\,cm
-      \end{tabular}
-    \end{minipage}}}%
-  \end{minipage}%
-  \end{captionbeside}%
-\end{figure}%
-\end{Example}%
-You can produce a non-floating table with a caption in the same way as the
-table inside a figure environment in the example
-above. Thereby\ChangedAt{v3.41}{\Class{scrbook}\and \Class{scrreprt}\and
-  \Class{scrartcl}} \KOMAScript{} also tries to prevent a page break between
-the heading and the table. However, this cannot be ensured in all
-cases. Therefore, a \Environment{minipage} environment should also be used to
-avoid page breaks between the caption and the table. In addition, you should
-embed the \Environment{minipage} environment in a \Environment{flushleft}
-environment both to achieve a pleasing separation between the surrounding text
-and to avoid the paragraph indentation of the \Environment{minipage}
-environment. Of course, it is easier to use the environment
-\DescRef{\LabelBase.env.table-}\IndexEnv{table-} directly.%
-\EndIndexGroup
-
-
-\begin{Declaration}
   \begin{Environment}{captionbeside}
     \OParameter{short title}
     \Parameter{caption text}

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/scrguide.cls
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/scrguide.cls	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/scrguide.cls	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,6 +1,6 @@
 % ======================================================================
 % scrguide.cls
-% Copyright (c) Markus Kohm, 2005-2022
+% Copyright (c) Markus Kohm, 2005-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -18,7 +18,7 @@
 % This work consists of all files listed in MANIFEST.md.
 % ----------------------------------------------------------------------
 % scrguide.cls
-% Copyright (c) Markus Kohm, 2005-2022
+% Copyright (c) Markus Kohm, 2005-2025
 %
 % Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
 % Version 1.3c, verteilt und/oder veraendert werden.
@@ -38,7 +38,7 @@
 % \section{Identification}
 %
 %    \begin{macrocode}
-\ProvidesClass{scrguide}[2022/07/17 v1.28 internal KOMA-Script guide class]
+\ProvidesClass{scrguide}[2025/07/28 v1.29 internal KOMA-Script guide class]
 %    \end{macrocode}
 %
 %
@@ -1419,6 +1419,10 @@
   \colorbox{Declaration}{\usebox\Declaration at Box}%
 }
 \newenvironment{Declaration}[1][2]{%
+  \if at revertexampleskip
+    \typeout{TRACE: Fix vskip in \the\inputlineno}%
+    \vskip -\topskip
+  \fi
   \def\Declare at Lines{#1\baselineskip}%
   % Als erstes wird eine neue Index-Gruppe begonnen. Dagegen darf die
   % vorherige Index-Gruppe hier nicht automatisch geschlossen werden, weil
@@ -1503,6 +1507,7 @@
     \Declaration at UseBox{\Declaration at Box}%
     \par\nobreak\vskip\fboxsep
   \endgroup\nobreak
+  \aftergroup\@revertexampleskipfalse
   % Der nachfolgende Text soll wie bei einer Überschrift behandelt werden.
   \aftergroup\@afterindentfalse\aftergroup\@afterheading
 }
@@ -1535,10 +1540,12 @@
 % \begin{macro}{\ExampleEndFix}
 % \changes{v1.18}{2019/10/25}{New}%^^A
 % If an example is at the end of a description and before a new description
-% the vertical spacing is suboptimal. Sorry, but this cannot be fixed
-% automatically currently. But here is a manual fix:
+% the vertical spacing is suboptimal. Usually this is handled automatically,
+% but there is also a user command to force the fix.
 %    \begin{macrocode}
-\newcommand*{\ExampleEndFix}{\vskip -1\ht\strutbox plus .75\strutbox}
+\newcommand*{\ExampleEndFix}{%
+  \@revertexampleskiptrue
+}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -2783,8 +2790,22 @@
                                % Index-Gruppen-Trennmarke packen.
   \push at IndexStack{\StopIndexGroup}%
 }
+\newif\if at revertexampleskip
 \newcommand*{\EndIndexGroup}{% Den Stapel bis zur nächsten Stop-Marke
                              % verarbeiten.
+  \ifvmode
+    \ifdim \lastskip=\topsep
+      \typeout{TRACE: topsep --> true}%
+      \@revertexampleskiptrue
+    \else
+      \ifdim \lastskip=\partopsep
+        \typeout{TRACE: partopsep --> true}%
+        \@revertexampleskiptrue
+      \else
+        \@revertexampleskipfalse
+      \fi
+    \fi
+  \fi
   \ifx\@IndexStack\@empty
     \ClassError{scrguide}{cannot end index group}{%
       You've told me to end the current index group,\MessageBreak

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-scrpage-experts-de.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-scrpage-experts-de.tex	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-scrpage-experts-de.tex	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,6 +1,6 @@
 % ======================================================================
 % scrlayer-scrpage-experts-de.tex
-% Copyright (c) Markus Kohm, 2013-2022
+% Copyright (c) Markus Kohm, 2013-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -23,7 +23,7 @@
 % ============================================================================
 
 \KOMAProvidesFile{scrlayer-scrpage-experts-de.tex}%
-                 [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $
+                 [$Date: 2025-07-16 10:53:10 +0200 (Mi, 16. Jul 2025) $
                   KOMA-Script guide (chapter: scrlayer-scrpage for experts)]
 
 \chapter[{Zusätzliche Möglichkeiten von \Package{scrlayer-scrpage}}]
@@ -197,6 +197,13 @@
 Sie ist jedoch hoch komplex und wird von Anwender nur sehr selten benötigt.
 \fi
 
+Ausdrücklich wird davon abgeraten, die hier vorgestellten Anweisungen dazu zu
+verwenden, um einzelne Teile bereits definierte Seitenstil-Paare
+umzudefinieren. Unter anderem würde dabei die Verknüpfung zu einem Paar
+beschädigt. Für die Umdefinierung von Seitenstil-Paaren sei auf
+\autoref{sec:\LabelBase.pagestyle.pairs} ab
+\autopageref{sec:\LabelBase.pagestyle.pairs} verwiesen.
+
 \begin{Declaration}
   \Macro{defpagestyle}\Parameter{Name}
                       \Parameter{Kopfdefinition}
@@ -418,9 +425,9 @@
 
 %%% Local Variables: 
 %%% mode: latex
-%%% TeX-master: "scrguide-en.tex"
+%%% TeX-master: "scrguide-de.tex"
 %%% coding: utf-8
-%%% ispell-local-dictionary: "en_GB"
+%%% ispell-local-dictionary: "de_DE"
 %%% eval: (flyspell-mode 1)
 %%% End:
 

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-scrpage-experts-en.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-scrpage-experts-en.tex	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-scrpage-experts-en.tex	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,6 +1,6 @@
 % ======================================================================
 % scrlayer-scrpage-experts-en.tex
-% Copyright (c) Markus Kohm, 2013-2022
+% Copyright (c) Markus Kohm, 2013-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -23,7 +23,7 @@
 % ============================================================================
 
 \KOMAProvidesFile{scrlayer-scrpage-experts-en.tex}%
-                 [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $
+                 [$Date: 2025-07-16 10:53:10 +0200 (Mi, 16. Jul 2025) $
                   KOMA-Script guide (chapter: scrlayer-scrpage-experts)]
 \translator{Markus Kohm\and Karl Hagen}
 
@@ -167,6 +167,12 @@
 achieve almost everything possible with this low-level interface by using the
 possibilities described previously.
 
+We expressly advise against using the commands presented here to redefine
+individual parts of already defined page style pairs. Among other things, this
+would damage the link to a pair. For the redefinition of page style pairs,
+please refer to \autoref{sec:\LabelBase.pagestyle.pairs} from
+\autopageref{sec:\LabelBase.pagestyle.pairs}.
+
 \begin{Declaration}
   \Macro{defpagestyle}%
   \Parameter{name}\Parameter{header specification}\Parameter{footer specification}%

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlfile-de.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlfile-de.tex	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlfile-de.tex	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,6 +1,6 @@
 % ======================================================================
 % scrlfile-de.tex
-% Copyright (c) Markus Kohm, 2001-2022
+% Copyright (c) Markus Kohm, 2001-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -24,7 +24,7 @@
 % ============================================================================
 
 \KOMAProvidesFile{scrlfile-de.tex}%
-                 [$Date: 2022-07-17 12:36:46 +0200 (So, 17. Jul 2022) $
+                 [$Date: 2025-07-01 20:35:29 +0200 (Di, 01. Jul 2025) $
                   KOMA-Script guide (chapter: scrlfile)]
 
 \chapter{Paketabhängigkeiten mit \Package{scrlfile} 
@@ -293,21 +293,6 @@
   es sich um eine verträgliche Version handelt. Falls dies nicht der
   Fall ist, wird eine Warnung ausgegeben.
 
-  An anderer Stelle findet sich in drei der \KOMAScript-Klassen folgendes:
-\begin{lstcode}
-  \AfterPackage{caption2}{%
-    \renewcommand*{\setcapindent}{%
-\end{lstcode}% }}
-  Nach dem Laden von \Package{caption2} und nur falls das Paket
-  geladen wird, wird hier die \KOMAScript{} eigene Anweisung
-  \DescRef{maincls.cmd.setcapindent} umdefiniert. Der Inhalt der Umdefinierung
-  ist für dieses Beispiel unerheblich. Es sei nur erwähnt, dass
-  \Package{caption2} die Kontrolle über die
-  \DescRef{maincls.cmd.caption}-Anweisung übernimmt und daher die normale
-  Definition von \DescRef{maincls.cmd.setcapindent} keinerlei Wirkung mehr
-  hätte. Die Umdefinierung verbessert dann die Zusammenarbeit mit dem
-  veralteten \Package{caption2}.
-
   Es gibt aber auch Beispiele für den sinnvollen Einsatz der neuen
   Anweisungen durch normale Anwender. Angenommen, Sie erstellen ein
   Dokument, aus dem sowohl eine PS-Datei mit \LaTeX{} und dvips als auch

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlfile-en.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlfile-en.tex	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/scrlfile-en.tex	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,6 +1,6 @@
 % ======================================================================
 % scrlfile-en.tex
-% Copyright (c) Markus Kohm, 2001-2022
+% Copyright (c) Markus Kohm, 2001-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -24,7 +24,7 @@
 % ============================================================================
 
 \KOMAProvidesFile{scrlfile-en.tex}
-                 [$Date: 2022-07-17 12:36:46 +0200 (So, 17. Jul 2022) $
+                 [$Date: 2025-07-01 20:35:29 +0200 (Di, 01. Jul 2025) $
                   KOMA-Script guide (chapter: scrlfile)]
 \translator{Gernot Hassenpflug\and Markus Kohm\and Karl Hagen}
 
@@ -256,19 +256,6 @@
   immediately after the package is loaded. If this is not the case, a warning
   is issued.
 
-  Elsewhere in three of the \KOMAScript{} classes, you can find the following:
-\begin{lstcode}
-  \AfterPackage{caption2}{%
-    \renewcommand*{\setcapindent}{%
-\end{lstcode}
-  After loading \Package{caption2}, and only if it has been loaded,
-  \KOMAScript{} redefines its own \DescRef{maincls.cmd.setcapindent} command.
-  The exact code of the redefinition is irrelevant. The important thing to
-  note is that \Package{caption2} takes control of the
-  \DescRef{maincls.cmd.caption} macro and that therefore the normal definition
-  of the \DescRef{maincls.cmd.setcapindent} command would have no effect. The
-  redefinition thus improves interoperability with \Package{caption2}.
-
   There are also, however, instances where these commands are useful to normal
   \LaTeX{} users. For example, suppose you create a document from which you
   want to generate both a PostScript file, using \LaTeX{} and dvips, and a PDF

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/tocbasic-de.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/tocbasic-de.tex	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/tocbasic-de.tex	2025-08-20 19:59:36 UTC (rev 76100)
@@ -24,7 +24,7 @@
 % ======================================================================
 
 \KOMAProvidesFile{tocbasic-de.tex}
-                 [$Date: 2025-05-28 08:46:51 +0200 (Mi, 28 Mai 2025) $
+                 [$Date: 2025-07-01 20:35:29 +0200 (Di, 01. Jul 2025) $
                   KOMA-Script guide (package tocbasic)]
 
 \chapter{Verzeichnisse verwalten mit Hilfe von \Package{tocbasic}}
@@ -2349,7 +2349,7 @@
 \Macro{theremarkbox} mit der Standardausgabe als arabische Zahl. Diese wird
 dann in der Definition der formatierten Ausgabe verwendet. Die formatierte
 Ausgabe wird wiederum als Gleitumgebungsnummer für die Verwendung in
-\DescRef{maincls.cmd.caption} definiert.
+\DescRef{\LabelBase.cmd.caption} definiert.
 
 Gleitumgebungen\textnote{Dateierweiterung} haben Verzeichnisse und diese haben
 eine Datei mit dem Namen \Macro{jobname} und einer Dateierweiterung.
@@ -2483,14 +2483,14 @@
 einzigen Schritt ein neues Verzeichnis, dessen Überschrift und die Bezeichnung
 für die Einträge unter Kontrolle von \Package{tocbasic} definiert. Optional
 können dabei gleichzeitig gleitende oder nicht gleitende Umgebungen definiert
-werden, innerhalb derer \DescRef{maincls.cmd.caption}%
-\important{\DescRef{maincls.cmd.caption}}\IndexCmd{caption} Einträge für
+werden, innerhalb derer \DescRef{\LabelBase.cmd.caption}%
+\important{\DescRef{\LabelBase.cmd.caption}}\IndexCmd{caption} Einträge für
 dieses neue Verzeichnis erzeugt. Auch die Erweiterungen
-\DescRef{maincls.cmd.captionabove}\important[i]{%
-  \DescRef{maincls.cmd.captionabove}\\
-  \DescRef{maincls.cmd.captionbelow}}, \DescRef{maincls.cmd.captionbelow} und
+\DescRef{\LabelBase.cmd.captionabove}\important[i]{%
+  \DescRef{\LabelBase.cmd.captionabove}\\
+  \DescRef{\LabelBase.cmd.captionbelow}}, \DescRef{\LabelBase.cmd.captionbelow} und
 \DescRef{maincls.env.captionbeside} aus den \KOMAScript-Klassen (siehe
-\autoref{sec:maincls.floats}, ab \DescPageRef{maincls.cmd.captionabove})
+\autoref{sec:maincls.floats}, ab \DescPageRef{\LabelBase.cmd.captionabove})
 können dann verwendet werden.
 
 \PName{Dateierweiterung} definiert dabei die Dateiendung der Hilfsdatei, die
@@ -2752,7 +2752,7 @@
   überlassen werden, so kann Option \Option{floattype} \iffalse im Beispiel \fi
   entfallen. Wird zusätzlich die Option \Option{nonfloat} angegeben, wird
   außerdem eine nicht gleitende Umgebung \Environment{remarkbox-} definiert,
-  in der ebenfalls \DescRef{maincls.cmd.caption}\IndexCmd{caption} verwendet
+  in der ebenfalls \DescRef{\LabelBase.cmd.caption}\IndexCmd{caption} verwendet
   werden kann.
 
   Zum besseren Verständnis zeigt \autoref{tab:\LabelBase.comparison} eine
@@ -2784,7 +2784,7 @@
       & spaltenübergreifende Gleitumgebung des jeweiligen Typs \\[1ex]
       \Counter{remarkbox} & \Counter{figure} 
       & \Option{type}, \Option{float} 
-      & Zähler, der von \DescRef{maincls.cmd.caption} verwendet wird \\[1ex]
+      & Zähler, der von \DescRef{\LabelBase.cmd.caption} verwendet wird \\[1ex]
       \Macro{theremarkbox} & \Macro{thefigure} 
       & \Option{type}, \Option{float} 
       & Anweisung zur Ausgabe des jeweiligen Zählers \\[1ex]
@@ -2791,10 +2791,10 @@
       \Macro{remarkboxformat} & \DescRef{maincls.cmd.figureformat}
       & \Option{type}, \Option{float}
       & Anweisung zur Formatierung des jeweiligen Zählers in der Ausgabe von
-        \DescRef{maincls.cmd.caption}\\[1ex]
+        \DescRef{\LabelBase.cmd.caption}\\[1ex]
       \Macro{remarkboxname} & \Macro{figurename}
       & \Option{type}, \Option{float}, \Option{name}
-      & Name, der im Label von \DescRef{maincls.cmd.caption} verwendet
+      & Name, der im Label von \DescRef{\LabelBase.cmd.caption} verwendet
         wird\\[1ex]
       \Macro{listofremarkboxes} & \DescRef{maincls.cmd.listoffigures}
       & \Option{types}, \Option{float}
@@ -2854,6 +2854,335 @@
 Verwendung eines aktuellen \Package{hyperref} mit einem aktuellen \LaTeX.%
 \EndIndexGroup%
 
+\section{Titel von (Gleit-)Umgebungen}
+\seclabel{caption}
+
+Wie\ChangedAt{v3.46}{\Package{tocbasic}} im vorherigen Abschnitt erklärt
+wurde, können mit der Anweisung \DescRef{\LabelBase.cmd.DeclareNewTOC} auch
+neue gleitende und nicht gleitende Umgebungen definiert werden, deren mit
+\DescRef{\LabelBase.cmd.caption} gesetzte Titel automatisch in das jeweils
+zugehörige Verzeichnisse eingetragen werden. Auch dafür bietet
+\Package{tocbasic} einige Erweiterungen.
+
+\textnote{Achtung!}Es wird darauf hingewiesen, dass alle in diesem Abschnitt
+beschriebenen Möglichkeiten zwingen eine \LaTeX-Version\textnote{\LaTeX{}
+  2022/06/01} ab 2022/06/01 benötigen. Mit älteren \LaTeX-Versionen sind diese
+Möglichkeiten daher \emph{nicht} verfügbar!
+
+\textnote{\Package{caption}}\IndexPackage{caption}%
+An dieser Stelle sei darauf hingewiesen, dass die in diesem Abschnitt
+dokumentierten Möglichkeiten derzeit auch bei Verwendung des
+\Package{caption}-Pakets funktionieren. Getestet wurde dies mit Version
+2023/08/05 v3.6o des \Package{caption}-Pakets. Generell wird jedoch nicht
+empfohlen, sich bei Verwendung irgend eines Pakets, das
+\DescRef{\LabelBase.cmd.caption} oder \DescRef{\LabelBase.cmd.captionof}
+bereitstellt oder verändert, oder bei Verwendung von Klassen, die
+\DescRef{\LabelBase.cmd.caption} in zu den Standardklassen oder den
+\KOMAScript-Klassen inkompatibler Weise bereitstellen, auf irgendeine der in
+diesem Abschnitt beschriebenen Möglichkeiten zu verlassen. Bei Verwendung des
+vorgenannten \Package{caption}-Pakets sollten beispielsweise stattdessen die in
+dessen Anleitung dokumentierten Möglichkeiten genutzt werden. Siehe dazu
+\cite{package:caption}.
+
+\begin{Declaration}
+  \OptionValue{captionposition}{top}
+  \OptionValue{captionposition}{bottom}
+  \OptionVName{captionabove}{Ein-Aus-Wert}
+  \OptionVName{captionbelow}{Ein-Aus-Wert}
+\end{Declaration}
+In der Voreinstellung werden die Abstände über und unter den Titeln so
+gewählt, dass sie für Titel unter dem jeweiligen
+Objekt, beispielsweise unter eine Abbildung oder einer Tabelle passen. Dies
+entspricht der Einstellung \OptionValue{captionposition}{bottom} oder den
+synonymen Einstellungen \OptionValue{captionabove}{false}
+oder \OptionValue{captionbelow}{true}. Mit den Einstellungen
+\OptionValue{captionposition}{top}, \OptionValue{captionabove}{true} oder
+\OptionValue{captionbelow}{false} kann man die Abstände aber auch automatisch
+vertauschen, so dass sie für Titel über dem Objekt passen. Die Wahl erfolgt
+innerhalb des Aufrufs von \DescRef{\LabelBase.cmd.caption} beziehungsweise
+\DescRef{\LabelBase.cmd.captionof} unter der Voraussetzung, dass der
+\Macro{caption}-Patch aktiviert wurde. Siehe dazu Option
+\DescRef{\LabelBase.option.enablepatch}%
+\important{\OptionValue{enabelpatch=caption}}%
+\IndexOption{enablepatch~caption} in
+\autoref{sec:\LabelBase.standardclasses} ab
+\autopageref{sec:\LabelBase.standardclasses}.
+
+Es ist zu beachten, dass es sich bei diesen Optionen nicht um
+\KOMAScript-Optionen handelt. Sie können also \emph{nicht} mit
+\DescRef{maincls.cmd.KOMAoptions} oder \DescRef{maincls.cmd.KOMAoption}
+gesetzt werden. Stattdessen sind sie beim Laden von \Package{tocbasic} als
+optionales Argument von \Macro{usepackage} -- bzw. \Macro{RequirePackage} für
+Klassen- und Paketautoren -- anzugeben. Zum Ausgleich ist es möglich, das
+Paket mehrfach mit unterschiedlichen Optionen zu laden. Darüber hinaus kann
+man sie innerhalb des Dokuments jederzeit per
+\verb|\SetKeys[tocbasic]|\Parameter{Optionen} setzen.
+
+Als \PName{Ein-Aus-Wert} sind nur \PValue{true}%
+\IndexOption[indexmain]{captionabove~=\KValue{true}}%
+\IndexOption[indexmain]{captionbelow~=\KValue{true}}
+oder \PValue{false}%
+\IndexOption[indexmain]{captionabove~=\KValue{false}}%
+\IndexOption[indexmain]{captionbelow~=\KValue{false}}
+erlaubt. Die Verwendung von \Option{captionabove} oder \Option{captionbelow}
+ohne Wert entspricht \OptionValue{captionabove}{true} beziehungsweise
+\OptionValue{captionbelow}{true}.
+
+Als Besonderheit definiert \Package{tocbasic} darüber hinaus für alle mit
+Hilfe von \DescRef{\LabelBase.cmd.DeclareNewTOC} definierten Umgebungen
+zusätzlich entsprechende Optionen mit dem Präfix des Namens der Umgebung, also
+beispielsweise für die bei den \KOMAScript-Klassen definierten Umgebungen
+\DescRef{maincls.env.figure} und \DescRef{maincls.env.table} die Optionen
+\OptionValue{figurecaptionposition}{Wert}%
+\IndexOption[indexmain]{figurecaptionposition~=\KValue{top}}%
+\LabelOptionValue{figurecaptionposition}{top}%
+\IndexOption[indexmain]{figurecaptionposition~=\KValue{bottom}}%
+\LabelOptionValue{figurecaptionposition}{bottom},
+\OptionVName{figurecaptionabove}{Ein-Aus-Wert}%
+\IndexOption[indexmain]{figurecaptionabove~=\PName{Ein-Aus-Wert}},
+\OptionVName{figurecaptionbelow}{Ein-Aus-Wert}%
+\IndexOption[indexmain]{figurecaptionbelow~=\PName{Ein-Aus-Wert}},
+\OptionValue{tablecaptionposition}{Wert}%
+\IndexOption[indexmain]{tablecaptionposition~=\KValue{top}}%
+\LabelOptionValue{tablecaptionposition}{top}%
+\IndexOption[indexmain]{tablecaptionposition~=\KValue{bottom}}%
+\LabelOptionValue{tablecaptionposition}{bottom},
+\OptionVName{tablecaptionabove}{Wert}%
+\LabelOption{tablecaptionabove}%
+\IndexOption[indexmain]{tablecaptionabove~=\PName{Ein-Aus-Wert}} und
+\OptionVName{tablecaptionbelow}{Wert}%
+\IndexOption[indexmain]{tablecaptionbelow~=\PName{Ein-Aus-Wert}}. Dabei ist
+neben den oben für \Option{captionposition}, \Option{captionabove} und
+\Option{captionbelow} angegebenen Werten zusätzlich jeweils der \PName{Wert}
+\PValue{default}%
+\IndexOption[indexmain]{figurecaptionposition~=\KValue{default}}%
+\IndexOption[indexmain]{figurecaptionabove~=\KValue{default}}%
+\IndexOption[indexmain]{figurecaptionbelow~=\KValue{default}}%
+\IndexOption[indexmain]{tablecaptionposition~=\KValue{default}}%
+\IndexOption[indexmain]{tablecaptionabove~=\KValue{default}}%
+\IndexOption[indexmain]{tablecaptionbelow~=\KValue{default}}
+erlaubt. Dieser deaktiviert die expliziten Einstellungen für
+die jeweilige Umgebung, so dass wieder die Einstellungen der allgemeinen
+Option \Option{captionposition}, \Option{captionabove} beziehungsweise
+\Option{captionbelow} verwendet werden.%
+\EndIndexGroup
+
+
+\begin{Declaration}
+  \Macro{caption}\OParameter{Verzeichniseintrag}\Parameter{Titel}
+  \Macro{captionbelow}\OParameter{Verzeichniseintrag}\Parameter{Titel}
+  \Macro{captionabove}\OParameter{Verzeichniseintrag}\Parameter{Titel}
+\end{Declaration}%
+Wie bei den Optionen \DescRef{\LabelBase.option.captionposition} erklärt,
+werden Gleitumgebungen und auch die nicht gleitenden Umgebungen, die mit
+\DescRef{\LabelBase.cmd.DeclareNewTOC} definiert werden können, normalerweise
+per \Macro{caption} mit einem Titel versehen. Dabei kann mit Hilfe von
+\Package{tocbasic} und der genannten Option eingestellt werde, ob die Abstände
+für Titel über oder unter dem Objekt gewählt werden sollen. Da dies aber nur
+funktioniert, wenn \Macro{caption} von \Package{tocbasic} passend umdefiniert
+wird, gibt es zusätzlich die Anweisungen \Macro{captionbelow} und
+\Macro{captionabove}. Diese funktionieren in der Regel auch dann, wenn der
+entsprechende Patch nicht aktiviert wurde, also \Macro{caption} nicht auf die
+Optionen \DescRef{\LabelBase.option.captionposition},
+\DescRef{\LabelBase.option.captionabove} und
+\DescRef{\LabelBase.option.captionbelow} reagiert.
+%
+\begin{Example}
+  Sie wollen mit
+  Tabellenüberschriften\Index{Tabellen>Ueberschrift=Überschrift} statt mit
+  Tabellenunterschriften arbeiten, weil Sie teilweise Tabellen haben, die über
+  mehr als eine Seite gehen. Mit den Standardklassen bliebe Ihnen nur die
+  Möglichkeit:
+\begin{lstcode}
+  \begin{table}
+    \caption{Dies ist nur eine Beispieltabelle}
+    \begin{tabular}{llll}
+      Dies & ist & ein & Beispiel.\\\hline
+      Bitte & lassen & Sie & den \\
+      Inhalt & dieser & Tabelle & unbeachtet.
+    \end{tabular}
+  \end{table}
+\end{lstcode}
+  Damit hätten Sie das unschöne Ergebnis:
+  \begin{ShowOutput}\centering
+    {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:}
+      Dies ist nur eine
+      Beispieltabelle}\\
+    \begin{tabular}{llll}
+      Dies & ist & ein & Beispiel.\\\hline
+      Bitte & lassen & Sie & den \\
+      Inhalt & dieser & Tabelle & unbeachtet.
+    \end{tabular}
+  \end{ShowOutput}
+  Bei \KOMAScript{} schreiben Sie hingegen:
+\begin{lstcode}
+  \begin{table}
+    \captionabove{Dies ist nur eine Beispieltabelle}
+    \begin{tabular}{llll}
+      Dies & ist & ein & Beispiel.\\\hline
+      Bitte & lassen & Sie & den \\
+      Inhalt & dieser & Tabelle & unbeachtet.
+    \end{tabular}
+  \end{table}
+\end{lstcode}
+  Sie erhalten dann das gewünschte Ergebnis:
+  \begin{ShowOutput}\centering
+    {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:}
+      Dies ist nur eine
+      Beispieltabelle}\\\vskip\abovecaptionskip
+    \begin{tabular}{llll}
+      Dies & ist & ein & Beispiel.\\\hline
+      Bitte & lassen & Sie & den \\
+      Inhalt & dieser & Tabelle & unbeachtet.
+    \end{tabular}
+  \end{ShowOutput}
+  Da Sie konsequent nicht nur eine, sondern alle Tabellen mit Überschriften
+  versehen, können Sie stattdessen auch
+\begin{lstcode}
+  \usepackage[enablepatch=caption,tablecaptionabove]{tocbasic}
+\end{lstcode}
+  verwenden. Dann genügt es, wenn Sie innerhalb der
+  \Environment{table}-Umgebung \Macro{caption} verwenden.  Sie erhalten
+  trotzdem das Ergebnis von \Macro{captionabove}. Die Verwendung von
+  \OptionValueRef{\LabelBase}{enablepatch}{caption} ist wichtig für die
+  Funktion der zweiten Option
+  \DescRef{\LabelBase.option.tablecaptionabove}. Die \KOMAScript-Klassen laden
+  \Package{tocbasic} daher bereits in der Voreinstellung mit dieser Option.
+\end{Example}
+\EndIndexGroup
+\ExampleEndFix
+
+\begin{Declaration}
+  \Macro{captionof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag}
+                   \Parameter{Titel}
+  \Macro{captionaboveof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag}
+                        \Parameter{Titel}
+  \Macro{captionbelowof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag}
+                        \Parameter{Titel}
+\end{Declaration}
+Ähnlich wie die Pakete \Package{caption}\IndexPackage{caption} und
+\Package{capt-of}\IndexPackage{capt-of} bietet auch \Package{tocbasic} die
+Anweisung \Macro{captionof} mit der man auch außerhalb einer
+Gleitumgebung oder in einer fremden Gleitumgebung einen entsprechenden Titel
+mit Eintrag in das jeweilige Verzeichnis setzen kann. Dabei muss im Gegensatz
+zu \DescRef{\LabelBase.cmd.caption} die Art des Gleitobjekts als zusätzliches
+erstes Argument angegeben werden.
+
+Darüber hinaus bietet \Package{tocbasic} zusätzlich auch die Anweisungen
+\Macro{captionaboveof}. Diese dienen als Gegenstücke zu
+\DescRef{\LabelBase.cmd.captionabove} und
+\DescRef{\LabelBase.cmd.captionbelow}.
+
+Selbstverständlich berücksichtigt \Macro{captionof} auch die
+Einstellungen von Option \DescRef{\LabelBase.option.captionposition},
+\DescRef{\LabelBase.option.captionabove} oder
+\DescRef{\LabelBase.option.captionbelow} und der individuellen Optionen für
+die mit \DescRef{\LabelBase.cmd.DeclareNewTOC} definierten Umgebungen
+bezüglich der Formatierung des Titels als Über- oder Unterschrift.
+\begin{Example}
+  Angenommen, Sie wollen ein Gleitobjekt erstellen, bei dem eine Tabelle und
+  eine Abbildung nebeneinander stehen. Da es keine gemischten Gleitobjekte gibt,
+  verwenden Sie primär eine \Environment{figure}-Umgebung:
+\begin{lstcode}
+  \begin{figure}
+    \begin{minipage}{.5\linewidth}
+      \centering
+      \rule{4cm}{5cm}
+      \caption{Ein Rechteck}\label{fig:rechteck}
+    \end{minipage}%
+    \begin{minipage}{.5\linewidth}
+      \centering
+      \captionaboveof{table}
+      [Maße des Rechtecks aus
+        Abbildung~\ref{fig:rechteck}]%
+      {Rechtecksmaße}
+      \label{tab:rechteck}
+      \begin{tabular}{ll}
+        Breite: & 4\,cm\\
+        Höhe:   & 5\,cm
+      \end{tabular}
+    \end{minipage}
+  \end{figure}
+\end{lstcode}
+  Um Abbildung und Tabelle nebeneinander zu setzen, wurden zwei
+  \Environment{minipage}-Umgebungen verwendet. %
+  \iffalse % Umbruchkorrektur
+    Wichtig\textnote{Achtung!} ist hier das Prozentzeichen nach der ersten
+    \Environment{minipage}, ohne das ein zusätzlicher Wortabstand zwischen die
+    beiden \Environment{minipage}-Umgebungen gesetzt würde.%
+  \else %
+    Wichtig\textnote{Achtung!} ist das Prozentzeichen nach der ersten
+    \Environment{minipage} zur Unterdrückung des Wortabstands zwischen den
+    Umgebungen.%
+  \fi %
+
+  \iffalse % Umbruchkorrektur
+    Die Abbildungsunterschrift wurde mit \DescRef{\LabelBase.cmd.caption}
+    gesetzt. %
+  \fi %
+  Für die Tabellenüberschrift wurde \Macro{captionaboveof} verwendet. Als
+  erstes Argument wurde \PValue{table} angegeben. Dadurch weiß
+  \Package{tocbasic}, dass es sich trotz \Environment{figure}-Umgebung um eine
+  Tabellenüberschrift handelt.
+
+  Das optionale Argument von \Macro{captionaboveof} setzt den Eintrag in das
+  Tabellenverzeichnis. Ohne das optionale Argument würde der als letztes
+  Argument angegebene Titel ebenfalls in das Tabellenverzeichnis
+  geschrieben. Während dieser Titel im Gleitobjekt selbst völlig ausreichend
+  ist, wäre er jedoch im Tabellenverzeichnis wenig aussagekräftig. Daher wird
+  hier für das Verzeichnis ein abweichender Titel über das optionale Argument
+  verwendet. Das Ergebnis der Bemühungen zeigt
+  \autoref{fig:\LabelBase.captionaboveof}.%
+%
+\begin{figure}
+%  \centering
+%  \caption
+  \KOMAoptions{captions=bottombeside}%
+  \setcapindent{0pt}%
+  \begin{captionbeside}
+    [{Beispiel: Verwendung von \Macro{captionaboveof} innerhalb einer
+      fremden Gleitumgebung}]
+    {\hspace{0pt plus 1ex}Verwendung von \Macro{captionaboveof} innerhalb einer
+      fremden Gleitumgebung\label{fig:\LabelBase.captionaboveof}}
+    [l]
+  \begin{minipage}[b]{.66\linewidth}%
+  \raisebox{\depth}{\fbox{\KOMAoptions{captions=oneline}%
+    \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
+      \centering
+      \rule{4cm}{5cm}
+      \caption[Beispiel: Ein Rechteck]{Ein Rechteck}
+      \label{fig:\LabelBase.rechteck}
+    \end{minipage}%
+    \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
+      \centering
+      \captionaboveof{table}[Beispiel: Maße des Rechtecks aus
+      Abbildung~\ref{fig:\LabelBase.rechteck}]{Rechteckmaße}
+      \label{tab:\LabelBase.rechteck}
+      \begin{tabular}{ll}
+        Breite: & 4\,cm\\
+        Höhe:   & 5\,cm
+      \end{tabular}
+    \end{minipage}}}%
+  \end{minipage}%
+  \end{captionbeside}%
+\end{figure}%
+\end{Example}%
+In gleicher Weise, wie in obigem Beispiel eine Tabelle innerhalb einer
+Abbildungsumgebung gesetzt und mit einem Titel versehen wird, könnte man auch
+eine nicht gleitende Tabelle außerhalb jeder Gleitumgebung
+setzen. Dabei versucht \Package{tocbasic} auch einen Seitenumbruch zwischen
+der Überschrift und der Tabelle zu verhindern. Das kann allerdings nicht in
+allen Fällen sichergestellt werden. Daher sollte in der Regel eine
+\Environment{minipage} verwendet werden, um zu verhindern, dass zwischen
+Überschrift und Tabelle ein Seitenumbruch erfolgen kann. Zusätzlich sollte man
+die \Environment{minipage} dann noch in eine \Environment{flushleft}-Umgebung
+einbetten, um einerseits einen gefälligen Abstand zum Text davor und dahinter
+zu erreichen und andererseits den Absatzeinzug vor der \Environment{minipage}
+zu verhindern. Einfacher ist natürlich direkt die Umgebung
+\DescRef{maincls.env.table-}\IndexEnv{table-} zu verwenden.%
+\EndIndexGroup
+
+
 \section{Nutzung von \Package{tocbasic} mit Fremdklassen}
 \seclabel{standardclasses}
 
@@ -2920,6 +3249,18 @@
       individuellen Einstellung ausgeführt. Falls eine \KOMAScript-Klasse
       geladen ist, gilt dies nicht für \PValue{chapter}.%
     }%
+    \pventry{caption}{%
+      \ChangedAt{v3.46}{\Package{tocbasic}}%
+      \IndexOption{enablepatch~=caption}\IndexOption{disablepatch~=caption}%
+      \IndexCmd{caption}\IndexCmd{captionof}%
+      Die Anweisungen \DescRef{\LabelBase.cmd.caption} und
+      \DescRef{\LabelBase.cmd.captionof} werden so umdefiniert, dass sie die
+      Optionen \DescRef{\LabelBase.option.captionposition},
+      \DescRef{\LabelBase.option.captionabove},
+      \DescRef{\LabelBase.option.captionbelow} beziehungsweise die
+      entsprechenden vom Type oder der Umgebung abhängenden Optionen
+      beachten.%
+    }%
     \pventry{chapter}{%
       \IndexOption{enablepatch~=chapter}\IndexOption{disablepatch~=chapter}%
       \IndexCmd{chapter}%
@@ -2974,7 +3315,22 @@
 nicht sämtliche Patches deaktiviert, sondern es werden wieder die
 Einstellungen für die einzelnen Patches beachtet.
 
-Eine zweite Besonderheit stellt \OptionValue{enablepatch}{chapter}%
+Eine zweite Besonderheit stellt \OptionValue{enablepatch}{caption}%
+\important{\OptionValue{enabelpatch=caption}}%
+\IndexOption{enablepatch~caption} dar. Da dieser Patch für die korrekte
+Funktion der Optionen aus \autoref{sec:\LabelBase.caption},
+\DescPageRef{\LabelBase.option.captionposition} und den darauf basierenden
+\KOMAScript-Optionen \OptionValueRef{maincls}{captions}{heading},
+\OptionValueRef{maincls}{captions}{signature},
+\OptionValueRef{maincls}{captions}{figureheading},
+\OptionValueRef{maincls}{captions}{figuresignature},
+\OptionValueRef{maincls}{captions}{tableheading} und
+\OptionValueRef{maincls}{captions}{tablesignature} zwingend notwendig ist,
+wird er von den \KOMAScript-Klassen automatisch aktiviert. Ohne die
+Aktivierung\textnote{Achtung!} haben die genannten Optionen keine definierte
+Wirkung.
+
+Eine dritte Besonderheit stellt \OptionValue{enablepatch}{chapter}%
 \important{\OptionValue{enablepatch}{chapter}}%
 \IndexOption{enablepatch~=chapter} dar. Da dieser Patch auch Schaden
 anrichten kann, wird seine Verwendung immer in der Terminalausgabe und der

Modified: trunk/Master/texmf-dist/source/latex/koma-script/doc/tocbasic-en.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/doc/tocbasic-en.tex	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/doc/tocbasic-en.tex	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,6 +1,6 @@
 % ======================================================================
 % tocbasic-en.tex
-% Copyright (c) Markus Kohm, 2002-2024
+% Copyright (c) Markus Kohm, 2002-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -24,7 +24,7 @@
 % ======================================================================
 
 \KOMAProvidesFile{tocbasic-en.tex}
-                 [$Date: 2024-06-30 20:35:47 +0200 (So, 30. Jun 2024) $
+                 [$Date: 2025-07-01 20:35:29 +0200 (Di, 01. Jul 2025) $
                   KOMA-Script guide (package tocbasic)]
 
 \translator{Markus Kohm\and Arndt Schubert\and Karl Hagen}
@@ -2151,7 +2151,7 @@
 \Macro{theremarkbox} with the default output as an Arabic number.
 This is then used to define the formatted output of the
 counter. The formatted output is again defined as a floating-point
-number for use in the \DescRef{maincls.cmd.caption} command.
+number for use in the \DescRef{\LabelBase.cmd.caption} command.
 
 Floating\textnote{file name extension} environments have their own content lists
 and those need an auxiliary file named \Macro{jobname} and a file 
@@ -2262,12 +2262,12 @@
 its heading, and the description of the entries controlled by
 \Package{tocbasic} all in a single step. Optionally, you can also define
 floating and non-floating environments at the same time. Inside of both such
-environments, \DescRef{maincls.cmd.caption}%
-\important{\DescRef{maincls.cmd.caption}}\IndexCmd{caption} creates entries
+environments, \DescRef{\LabelBase.cmd.caption}%
+\important{\DescRef{\LabelBase.cmd.caption}}\IndexCmd{caption} creates entries
 for this new content list. You can also use the \KOMAScript{} extensions
-\DescRef{maincls.cmd.captionabove}\important[i]{%
-  \DescRef{maincls.cmd.captionabove}\\
-  \DescRef{maincls.cmd.captionbelow}}, \DescRef{maincls.cmd.captionbelow}, and
+\DescRef{\LabelBase.cmd.captionabove}\important[i]{%
+  \DescRef{\LabelBase.cmd.captionabove}\\
+  \DescRef{\LabelBase.cmd.captionbelow}}, \DescRef{\LabelBase.cmd.captionbelow}, and
 \DescRef{maincls.env.captionbeside} (see \autoref{sec:maincls.floats}).
 
 The \PName{extension} argument is the file extension of the TOC file that
@@ -2513,7 +2513,7 @@
   type, the \Option{floattype} option can be omitted. If the \Option{nonfloat}
   option is specified, a non-floating environment, \Environment{remarkbox-},
   will also be defined, inside which you can use
-  \DescRef{maincls.cmd.caption}\IndexCmd{caption}.
+  \DescRef{\LabelBase.cmd.caption}\IndexCmd{caption}.
   \hyperref[tab:\LabelBase.comparison]{Figure~\ref*{tab:\LabelBase.comparison}}
   compares the commands, counters, and environments of the example
   \Environment{remarkbox} environment to the commands, counters, and
@@ -2536,7 +2536,7 @@
       & columns spanning floating environments of the respective types\\[1ex]
       \Counter{remarkbox} & \Counter{figure}
       & \Option{type}, \Option{float}
-      & counter used by \DescRef{maincls.cmd.caption}\\[1ex]
+      & counter used by \DescRef{\LabelBase.cmd.caption}\\[1ex]
       \Macro{theremarkbox} & \Macro{thefigure}
       & \Option{type}, \Option{float}
       & output command to the respective counters\\[1ex]
@@ -2543,10 +2543,10 @@
       \Macro{remarkboxformat} & \DescRef{maincls.cmd.figureformat}
       & \Option{type}, \Option{float}
       & formatting command to the respective counters used by
-        \DescRef{maincls.cmd.caption}\\[1ex]
+        \DescRef{\LabelBase.cmd.caption}\\[1ex]
       \Macro{remarkboxname} & \Macro{figurename}
       & \Option{type}, \Option{float}, \Option{name}
-      & names used in the label of \DescRef{maincls.cmd.caption}\\[1ex]
+      & names used in the label of \DescRef{\LabelBase.cmd.caption}\\[1ex]
       \Macro{listofremarkboxes} & \DescRef{maincls.cmd.listoffigures}
       & \Option{types}, \Option{float}
       & command to show the list of the respective environments\\[1ex]
@@ -2597,7 +2597,295 @@
 to use an up-to-date \Package{hyperref} with an up-to-date \LaTeX.%
 \EndIndexGroup
 
+\section{Captions of (Float) Environments}
+\seclabel{caption}
 
+As\ChangedAt{v3.46}{\Package{tocbasic}} explained in the previous section, the
+\DescRef{\LabelBase.cmd.DeclareNewTOC} command can also be used to define new
+floating and non-floating environments, whose titles set with
+\DescRef{\LabelBase.cmd.caption} are automatically entered in the
+corresponding directories. tocbasic also offers some extensions for this.
+
+Please note that all the features described in this section require a
+\LaTeX{}\textnote{\LaTeX{} 2022/06/01} version from 2022/06/01. These features
+are therefore not available with older LaTeX versions!
+
+\textnote{\Package{caption}}\IndexPackage{caption}%
+At this point it should be noted that the features documented in this section
+currently also work when using the caption package. This was tested with
+version 2023/08/05 v3.6o of the caption package. In general, however, it is
+not recommended to rely on any of the features described in this section when
+using any package that provides or modifies \DescRef{\LabelBase.cmd.caption}
+or \DescRef{\LabelBase.cmd.captionof}, or when using classes that provide
+\DescRef{\LabelBase.cmd.caption} in a way that is incompatible with the
+standard classes or the KOMA script classes. When using the aforementioned
+caption package, for example, the features documented in its manual should be
+used instead. See \cite{package:caption.engl}.
+
+\begin{Declaration}
+  \OptionValue{captionposition}{top}
+  \OptionValue{captionposition}{bottom}
+  \OptionVName{captionabove}{Boolean value}
+  \OptionVName{captionbelow}{Boolean value}
+\end{Declaration}
+By default, the distances above and below the captions are selected so that
+they fit for captions below the respective object, for example below an image
+or a table. This corresponds to the setting
+\OptionValue{captionposition}{bottom} or the synonymous settings
+\OptionValue{captionabove}{false} or \OptionValue{captionbelow}{true}. The
+settings \OptionValue{captionposition}{top}, \OptionValue{captionabove}{true}
+or \OptionValue{captionbelow}{false} can also be used to automatically swap
+the spacing so that it fits for titles above the object. The selection is made
+within the call to \DescRef{\LabelBase.cmd.caption} or
+\DescRef{\LabelBase.cmd.captionof} provided that the
+\DescRef{\LabelBase.cmd.caption} patch has been activated. See option
+enablepatch in \autoref{sec:\LabelBase.standardclasses} from
+\autopageref{sec:\LabelBase.standardclasses}.
+
+Please note that these options are not \KOMAScript{} options. They can
+therefore not be set with \DescRef{maincls.cmd.KOMAoptions} or
+\DescRef{maincls.cmd.KOMAoption}. Instead, when loading \Package{tocbasic},
+they are available as an optional argument of \Macro{usepackage} - or
+\Macro{RequirePackage} for class and package authors. To compensate for this,
+it is possible to load the package multiple times with different options. They
+can also be set at any time within the document using
+\verb|\SetKeys[tocbasic]|\Parameter{options}.
+
+Only \PValue{true}%
+\IndexOption[indexmain]{captionabove~=\KValue{true}}%
+\IndexOption[indexmain]{captionbelow~=\KValue{true}} or \PValue{false}%
+\IndexOption[indexmain]{captionabove~=\KValue{false}}%
+\IndexOption[indexmain]{captionbelow~=\KValue{false}} are permitted as
+\PName{Boolean value}s. The use of \Option{captionabove} or
+\Option{captionbelow} without a value corresponds to
+\OptionValue{captionabove}{true} or \OptionValue{captionbelow}{true}.
+
+As a special feature, \Package{tocbasic} also defines corresponding options
+with the prefix of the name of the environment for all environments defined
+with the help of \DescRef{\LabelBase.cmd.DeclareNewTOC}, for example the
+options \OptionValue{figurecaptionposition}{value}%
+\IndexOption[indexmain]{figurecaptionposition~=\KValue{top}}%
+\LabelOptionValue{figurecaptionposition}{top}%
+\IndexOption[indexmain]{figurecaptionposition~=\KValue{bottom}}%
+\LabelOptionValue{figurecaptionposition}{bottom},
+\OptionVName{figurecaptionabove}{Boolean value}%
+\IndexOption[indexmain]{figurecaptionabove~=\PName{Boolean value}},
+\OptionVName{figurecaptionbelow}{Boolean value}%
+\IndexOption[indexmain]{figurecaptionbelow~=\PName{Boolean value}},
+\OptionValue{tablecaptionposition}{value}%
+\IndexOption[indexmain]{tablecaptionposition~=\KValue{top}}%
+\LabelOptionValue{tablecaptionposition}{top}%
+\IndexOption[indexmain]{tablecaptionposition~=\KValue{bottom}}%
+\LabelOptionValue{tablecaptionposition}{bottom},
+\OptionVName{tablecaptionabove}{value}%
+\LabelOption{tablecaptionabove}%
+\IndexOption[indexmain]{tablecaptionabove~=\PName{Boolean value}}, and
+\OptionVName{tablecaptionbelow}{value}%
+\IndexOption[indexmain]{tablecaptionbelow~=\PName{Boolean value}} for the
+environments \Environment{figure} and \Environment{table} defined in the
+\KOMAScript{} classes. In addition to the values specified above for
+\Option{captionposition}, \Option{captionabove} and \Option{captionbelow}, the
+\PName{value} \PValue{default} is also permitted. This deactivates the
+explicit settings for the respective environment so that the settings of the
+general option \Option{captionposition}, \Option{captionabove} or
+\Option{captionbelow} are used again.
+\EndIndexGroup
+
+\begin{Declaration}
+  \Macro{caption}\OParameter{entry}\Parameter{title}
+  \Macro{captionbelow}\OParameter{entry}\Parameter{title}
+  \Macro{captionabove}\OParameter{entry}\Parameter{title}
+\end{Declaration}%
+As explained in the \DescRef{\LabelBase.option.captionposition} options,
+floating environments and also the non-floating environments that can be
+defined with \DescRef{\LabelBase.cmd.DeclareNewTOC} are normally provided with
+a caption using \Macro{caption}. Using \Package{tocbasic} and the option
+mentioned, you can set whether the spacing for captions should be selected
+above or below the object. However, as this only works if \Macro{caption} is
+redefined appropriately by \Package{tocbasic}, there are also the commands
+\Macro{captionbelow} and \Macro{captionabove}. These usually also work if the
+corresponding patch has not been activated, i.e. \Macro{caption} does not
+react to the options \Option{captionposition}, \Option{captionabove} and
+\Option{captionbelow}.
+%
+\begin{Example}
+  Instead of using captions below a table, you want to place your
+  captions above it\Index{table>caption}, because you have tables
+  which span more then one page. In the standard classes you could
+  only write:
+\begin{lstcode}
+  \begin{table}
+    \caption{This is an example table}
+    \begin{tabular}{llll}
+      This & is & an & example.\\\hline
+      This & is & an & example.\\
+      This & is & an & example.
+    \end{tabular}
+  \end{table}
+\end{lstcode}
+  Then you would get this unsatisfying result:
+  \begin{ShowOutput}\centering
+    {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:}
+      This is an example table.}\\
+        \begin{tabular}{llll}
+      This & is & an & example.\\\hline
+      This & is & an & example.\\
+      This & is & an & example.
+        \end{tabular}
+\end{ShowOutput}
+  Using {\KOMAScript} you write instead:
+\begin{lstcode}
+  \begin{table}
+    \captionabove{This is just an example table}
+    \begin{tabular}{llll}
+      This & is & an & example.\\\hline
+      This & is & an & example.\\
+      This & is & an & example.
+    \end{tabular}
+  \end{table}
+\end{lstcode}
+  Then you get:
+  \begin{ShowOutput}\centering
+    {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:}
+      This is just an example table}\\\vskip\abovecaptionskip
+    \begin{tabular}{llll}
+      This & is & an & example.\\\hline
+      This & is & an & example.\\
+      This & is & an & example.
+    \end{tabular}
+  \end{ShowOutput}
+  Since you want all your tables typeset with captions above, you could of
+  course use:
+\begin{lstcode}
+  \usepackage[enablepatch=caption,tablecaptionabove]{tocbasic}
+\end{lstcode}
+  Then you can use \Macro{caption} inside the \Environment{table} environment
+  to get the same result as with \Macro{captionabove}. The use of
+  \OptionValueRef{\LabelBase}{enablepatch}{caption} is important for the
+  correct functioning of the second option
+  \DescRef{\LabelBase.option.tablecaptionabove}. The \KOMAScript{} classes
+  therefore already load \Package{tocbasic} with this option by default.%
+\end{Example}
+\EndIndexGroup
+\ExampleEndFix
+
+\begin{Declaration}
+  \Macro{captionof}\Parameter{float type}\OParameter{entry}%
+  \Parameter{title}%
+  \Macro{captionbelowof}\Parameter{float type}\OParameter{entry}%
+  \Parameter{title}%
+  \Macro{captionaboveof}\Parameter{float type}\OParameter{entry}%
+  \Parameter{title}
+\end{Declaration}%
+Like the \Package{caption}\IndexPackage{caption} and
+\Package{capt-of}\IndexPackage{capt-of} packages, the \Package{tocbasic}
+package offers the \Macro{captionof} command, with which you can put a caption
+for a floating environment, together with an entry in the corresponding
+environment list, outside of the floating environment or even in a different
+floating environment. Unlike \DescRef{\LabelBase.cmd.caption}, the type of
+floating environment must be specified as the first parameter.
+
+In addition, \Package{tocbasic} also provides the commands
+\Macro{captionaboveof}. These are like \DescRef{\LabelBase.cmd.captionabove}
+and \DescRef{\LabelBase.cmd.captionbelow} but with the additional features and
+parameter of \Macro{captionof}.
+
+Of course takes into account the \PValue{heading} and \PValue{signature}
+settings of options \DescRef{\LabelBase.option.captionposition},
+\DescRef{\LabelBase.option.captionabove} or
+\DescRef{\LabelBase.option.captionbelow} and also the corresponding individual
+options of the environments defined using
+\DescRef{\LabelBase.cmd.DeclareNewTOC} to setup the distance for captions
+above or below the object.
+\begin{Example}
+  Suppose you want to create a floating object with a table and a figure next 
+  to each other. Since there are no mixed floating environments, you primarily
+  use a \Environment{figure} environment:
+\begin{lstcode}
+  \begin{figure}
+    \begin{minipage}{.5\linewidth}
+      \centering
+      \rule{4cm}{5cm}
+      \caption{A rectangle}\label{fig:rechteck}
+    \end{minipage}%
+    \begin{minipage}{.5\linewidth}
+      \centering
+      \captionaboveof{table}
+      [Measure of the rectangle in
+        figure~\ref{fig:rechteck}]%
+      {Rectangle measure}
+      \label{tab:rechteck}
+      \begin{tabular}{ll}
+        Width:  & 4\,cm\\
+        Height: & 5\,cm
+      \end{tabular}
+    \end{minipage}
+  \end{figure}
+\end{lstcode}
+  Two \Environment{minipage} environments were used to place the figure 
+  and the table side by side. The\textnote{Attention!} percent sign after the 
+  end of the first \Environment{minipage} is important. Without it, an 
+  additional space would appear between the \Environment{minipage}
+  environments.
+
+  The figure caption was created with \DescRef{\LabelBase.cmd.caption}. The
+  table caption was created with \Macro{captionaboveof} with \PValue{table} as
+  the first argument. Because of this, \Package{tocbasic} knows that this is a
+  table caption even though it is inside the \Environment{figure} environment.
+
+  The optional argument of \Macro{captionaboveof} creates an entry in the
+  list of tables. Without the optional argument, the caption specified in the 
+  final mandatory argument would have been used for the list of tables too. 
+  Although this caption text is sufficient for the environment itself, it 
+  would not be very meaningful in the list of tables. Therefore, a different 
+  title is used for the list of tables using the optional argument.
+  \autoref{fig:\LabelBase.captionaboveof} shows the result of the example code.%
+\begin{figure}
+%  \centering
+%  \caption
+  \KOMAoptions{captions=bottombeside}%
+  \setcapindent{0pt}%
+  \begin{captionbeside}
+    [{Example: Using \Macro{captionaboveof} inside another floating
+      environment}]
+    {Example: Using \Macro{captionaboveof} inside another floating
+      environment\label{fig:\LabelBase.captionaboveof}}
+    [l]
+  \begin{minipage}[b]{.66\linewidth}%
+  \raisebox{\depth}{\fbox{\KOMAoptions{captions=oneline}%
+    \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
+      \centering
+      \rule{4cm}{5cm}
+      \caption[Example: A rectangle]{A rectangle}\label{fig:\LabelBase.rechteck}
+    \end{minipage}%
+    \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
+      \centering
+      \captionaboveof{table}[Example: Measure of the rectangle in
+        figure~\ref{fig:\LabelBase.rechteck}]{Rectangle measure}
+      \label{tab:\LabelBase.rechteck}
+      \begin{tabular}{ll}
+        Width:  & 4\,cm\\
+        Height: & 5\,cm
+      \end{tabular}
+    \end{minipage}}}%
+  \end{minipage}%
+  \end{captionbeside}%
+\end{figure}%
+\end{Example}%
+You can produce a non-floating table with a caption in the same way as the
+table inside a figure environment in the example
+above. Thereby \Package{tocbasic} also tries to prevent a page break between
+the heading and the table. However, this cannot be ensured in all
+cases. Therefore, a \Environment{minipage} environment should also be used to
+avoid page breaks between the caption and the table. In addition, you should
+embed the \Environment{minipage} environment in a \Environment{flushleft}
+environment both to achieve a pleasing separation between the surrounding text
+and to avoid the paragraph indentation of the \Environment{minipage}
+environment. Of course, it is easier to use the environment
+\DescRef{maincls.env.table-}\IndexEnv{table-} directly.%
+\EndIndexGroup
+
+
 \section{Using \Package{tocbasic} with Third-Party Classes}
 \seclabel{standardclasses}
 
@@ -2658,6 +2946,17 @@
       individual setting. If a \KOMAScript{} class is loaded, this does not
       apply to \PValue{chapter}.%
     }%
+    \pventry{caption}{%
+      \ChangedAt{v3.46}{\Package{tocbasic}}%
+      \IndexOption{enablepatch~=caption}\IndexOption{disablepatch~=caption}%
+      \IndexCmd{caption}\IndexCmd{captionof}%
+      The commands \DescRef{\LabelBase.cmd.caption} and
+      \DescRef{\LabelBase.cmd.captionof} are redefined so that they respect
+      the options \DescRef{\LabelBase.option.captionposition},
+      \DescRef{\LabelBase.option.captionabove},
+      \DescRef{\LabelBase.option.captionbelow} or the corresponding options
+      depending on the type or environment.%
+    }%
     \pventry{chapter}{%
       \IndexOption{enablepatch~=chapter}\IndexOption{disablepatch~=chapter}%
       \IndexCmd{chapter}%
@@ -2707,8 +3006,23 @@
 \OptionValue{disablepatch}{all} not all patches are deactivated, but rather
 the individual settings for each patch are respected.
 
-A second noteworthy feature is
-\OptionValue{enablepatch}{chapter}\important{\OptionValue{enablepatch}{chapter}}%
+A second noteworthy feature is \OptionValue{enablepatch}{caption}%
+\important{\OptionValue{enabelpatch=caption}}%
+\IndexOption{enablepatch~caption}. As this patch is absolutely necessary for
+the correct function of the options from \autoref{sec:\LabelBase.caption},
+\DescPageRef{\LabelBase.option.captionposition} and the \KOMAScript{} options
+\OptionValueRef{maincls}{captions}{heading},
+\OptionValueRef{maincls}{captions}{signature},
+\OptionValueRef{maincls}{captions}{figureheading},
+\OptionValueRef{maincls}{captions}{figuresignature},
+\OptionValueRef{maincls}{captions}{tableheading} and
+\OptionValueRef{maincls}{captions}{tablesignature} based on them, it is
+automatically activated by the \KOMAScript{} classes. Without activation, the
+options mentioned have no defined effect.
+
+A third noteworthy feature is
+\OptionValue{enablepatch}{chapter}%
+\important{\OptionValue{enablepatch}{chapter}}%
 \IndexOption{enablepatch~=chapter}. Its usage may result in damage, hence a
 notification is displayed in the terminal output and add to the \File{log}
 file. Utilizing the patch with a \KOMAScript{} class can lead to actual

Modified: trunk/Master/texmf-dist/source/latex/koma-script/koma-script-source-doc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/koma-script-source-doc.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/koma-script-source-doc.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % ==========================================================================
 % komascript-source.doc.dtx
-% Copyright (c) Markus Kohm, 2023
+% Copyright (c) Markus Kohm, 2023-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -415,7 +415,7 @@
 % \begin{macro}{\index at prologue,\glossary at prologue}
 % \changes{v0.5}{2022/01/31}{generating ToC entry}
 % \begin{macro}{\kssd at section@hack}
-% \changes{v0.5}{2022/01/31}{new}
+% \changes{v0.5}{2022/01/31}{added}
 % We want to have an entry to the table of contents for the index and the
 % glossary. So we patch the default prologues. This is not a perfect solution,
 % but it works and  makes it possible to still define a complete new prologue

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scraddr.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scraddr.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scraddr.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % ======================================================================
 % scraddr.dtx
-% Copyright (c) Markus Kohm, 2006-2023
+% Copyright (c) Markus Kohm, 2006-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scraddr.dtx 4104 2024-02-01 09:52:39Z kohm $
+%%% From File: $Id: scraddr.dtx 4181 2025-06-14 09:11:13Z kohm $
 %<*dtx>
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \ProvidesFile{scraddr.dtx}
@@ -119,15 +119,15 @@
 % as other \KOMAScript{} packages do.
 %
 % \begin{option}{adrFreeIVempty}
-% \changes{v1.1a}{2002/05/19}{new}
+% \changes{v1.1a}{2002/05/19}{added}
 % \begin{option}{adrFreeIVshow}
-% \changes{v1.1a}{2002/05/19}{new}
+% \changes{v1.1a}{2002/05/19}{added}
 % \begin{option}{adrFreeIVwarn}
-% \changes{v1.1a}{2002/05/19}{new}
+% \changes{v1.1a}{2002/05/19}{added}
 % \begin{option}{adrFreeIVstop}
-% \changes{v1.1a}{2002/05/19}{new}
+% \changes{v1.1a}{2002/05/19}{added}
 % \begin{macro}{\@adrFIVerror}
-% \changes{v1.1a}{2002/05/19}{new}
+% \changes{v1.1a}{2002/05/19}{added}
 % The options allow the choice whether \cs{FreeIV}, defined by \cs{adrentry},
 % should be ignored, output, result in a warning or an error message. Default
 % is \opt{adrFreeIVshow}. The selected choice is stored as a number in

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-basics.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-basics.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-basics.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %<prepare>%%%            (run: prepare)
 %<option>%%%            (run: option)
 %<body>%%%            (run: body)
@@ -28,9 +28,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\def\filedate{#2/#3/#4}}
-  \filedate$Date: 2025-05-14 14:41:49 +0200 (Mi, 14. Mai 2025) $
+  \filedate$Date: 2025-08-15 11:19:27 +0200 (Fr, 15 Aug 2025) $
   \def\filerevision$#1: #2 ${\def\filerevision{r#2}}
-  \filerevision$Revision: 4146 $
+  \filerevision$Revision: 4198 $
   \edef\reserved at a{%
     \noexpand\endgroup
     \noexpand\ProvidesFile{scrkernel-basics.dtx}%
@@ -233,6 +233,35 @@
 %</koma>
 %    \end{macrocode}
 %
+%
+% \subsection{Define used commands missing with old \LaTeX{} kernel}
+%
+% There are some easy commands, we want to use, but don't want to need a very
+% new \LaTeX{} kernel. So we define them here.
+%
+% \begin{command}{\IfPackageLoadedT,\IfPackageLoadedF}
+%   \changes{v3.46}{2025/06/16}{added}
+%   These are only variants of \cs{IfPackageLoadedTF}, which is already
+%   available since \LaTeX{} 2021-11-15.
+%    \begin{macrocode}
+%<*koma>
+\providecommand*\IfPackageLoadedT[1]{\IfPackageLoadedTF{#1}\@firstofone\@gobble}
+\providecommand*\IfPackageLoadedF[1]{\IfPackageLoadedTF{#1}{}}
+%</koma>
+%    \end{macrocode}
+% \end{command}
+%
+% \begin{macro}{\@gobble at o,\@gobble at om,\@gobble at som}
+%   \changes{v3.46}{2025/08/15}{added}
+%    \begin{macrocode}
+%<*koma>
+\ProvideDocumentCommand\@gobble at o{+o}{}
+\ProvideExpandableDocumentCommand\@gobble at om{+o+m}{}
+\ProvideExpandableDocumentCommand\@gobble at som{s+o+m}{}
+%</koma>
+%    \end{macrocode}
+% \end{macro}
+%
 % \subsection{Package  \pkg*{scrlfile}}
 %
 % We need to react on the loading other packages like \pkg{polyglossia}. For
@@ -299,7 +328,7 @@
 % \end{command}
 %
 % \begin{command}{\IfLTXAtLeastTF}
-% \changes{v3.33}{2021/01/21}{new}
+% \changes{v3.33}{2021/01/21}{added}
 % This is the same like \cs{IfFormatAtLeastTF} of the current \LaTeX{} kernel,
 % but does also work, if \cs{IfFormatAtLeastTF} is not defined because of
 % very old \LaTeX{} kernel.
@@ -3253,7 +3282,7 @@
 % \changes{v3.12}{2013/03/04}{can be used after document preamble}
 % \changes{v3.14}{2014/10/17}{third argument is \cs{long}}
 % \begin{macro}{\@FamilyExecuteOptions}
-% \changes{v3.14}{2014/10/17}{new}
+% \changes{v3.14}{2014/10/17}{added}
 % \changes{v3.23}{2017/02/16}{fix: hook after uses family instead of member}
 % \changes{v3.27}{2019/10/02}{improved error message}
 % \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-compatibility.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-compatibility.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-compatibility.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % ======================================================================
 % scrkernel-compatibility.dtx
-% Copyright (c) Markus Kohm, 2006-2023
+% Copyright (c) Markus Kohm, 2006-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %<identify>%%%            (run: identify)
 %<init>%%%            (run: init)
 %<option>%%%            (run: option)
@@ -27,9 +27,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\def\filedate{#2/#3/#4}}
-  \filedate$Date: 2025-06-04 13:50:03 +0200 (Mi, 04 Jun 2025) $
+  \filedate$Date: 2025-06-05 16:12:28 +0200 (Do, 05. Jun 2025) $
   \def\filerevision$#1: #2 ${\def\filerevision{r#2}}
-  \filerevision$Revision: 4158 $
+  \filerevision$Revision: 4167 $
   \edef\reserved at a{%
     \noexpand\endgroup
     \noexpand\ProvidesFile{scrkernel-compatibility.dtx}%
@@ -562,6 +562,8 @@
 % \changes{v3.44}{2024//11/27}{added}
 % \begin{macro}{\scr at v@3.45}
 % \changes{v3.45}{2025/06/04}{added}
+% \begin{macro}{\scr at v@3.46}
+% \changes{v3.46}{2025/06/05}{added}
 % \begin{macro}{\scr at v@last}
 % \changes{v2.9u}{2005/03/05}{added}
 %    \begin{macrocode}
@@ -654,7 +656,8 @@
 \@namedef{scr at v@3.43}{34300}
 \@namedef{scr at v@3.44}{34400}
 \@namedef{scr at v@3.45}{34500}
-\@namedef{scr at v@last}{34500}
+\@namedef{scr at v@3.46}{34600}
+\@namedef{scr at v@last}{34600}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -706,6 +709,7 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 % \end{macro}
 % \end{macro}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-floats.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-floats.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-floats.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % ======================================================================
 % scrkernel-floats.dtx
-% Copyright (c) Markus Kohm, 2002-2023
+% Copyright (c) Markus Kohm, 2002-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %<option>%%%            (run: option)
 %<body>%%%            (run: body)
 %<*dtx>
@@ -25,9 +25,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
-  \filedate$Date: 2024-11-27 14:27:13 +0100 (Mi, 27. Nov 2024) $
+  \filedate$Date: 2025-08-15 11:13:30 +0200 (Fr, 15. Aug 2025) $
   \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
-  \filerevision$Revision: 4137 $
+  \filerevision$Revision: 4197 $
   \edef\reserved at a{%
     \noexpand\endgroup
     \noexpand\ProvidesFile{scrkernel-floats.dtx}%
@@ -114,8 +114,9 @@
 % \begin{macro}{\@captionabovefalse,\@captionabovetrue,\if at captionabove}
 % \changes{v2.8h}{2001/07/19}{added}
 % \changes{v3.09}{2011/03/23}{moved before definition of options}
-% Boolean switch to decide whether a \cs{caption} has to behave like
-% \cs{captionabove} or \cs{captionbelow}. The default is \cs{captionbelow}.
+% \changes{v3.46}{2025/06/13}{kept for \pkg{caption} and \pkg{longtable} only}
+% With new versions this switch is only used for captions inside
+% \env{longtable}.
 %    \begin{macrocode}
 %<*option>
 \newif\if at captionabove\@captionabovefalse
@@ -126,32 +127,31 @@
 % \changes{v2.8h}{2001/07/19}{added}
 % \changes{v2.8k}{2001/08/15}{moved from \pkg*{typearea} into the classes}
 % \changes{v2.98c}{2008/02/18}{moved before definition of options}
-% Boolean switch to decide whether a \cs{caption} inside a \env{table}
-% environment has to behave like \cs{captionabove} or \cs{captionbelow}. The
-% default is \cs{captionbelow}.
-%    \begin{macrocode}
-\newif\if at tablecaptionabove\@tablecaptionabovefalse
-%    \end{macrocode}
+% \changes{v3.46}{2025/06/17}{removed}
 % \end{macro}^^A \if at tablecaptionabove
-%
 % \begin{macro}{\@figurecaptionabovefalse,\@figurecaptionabovetrue,\if at figurecaptionabove}
 % \changes{v3.09}{2011/03/23}{added}
-% Boolean switch to decide whether a \cs{caption} inside a \env{figure}
-% environment has to behave like \cs{captionabove} or \cs{captionbelow}. The
-% default is \cs{captionbelow}.
-%    \begin{macrocode}
-\newif\if at figurecaptionabove\@figurecaptionabovefalse
-%    \end{macrocode}
+% \changes{v3.46}{2025/06/13}{removed}
 % \end{macro}^^A \if at figurecaptionabove
 %
 % \begin{macro}{\onelinecaptionsfalse,\onelinecaptionstrue,\ifonelinecaptions}
 % \changes{v2.8q}{2001/11/17}{added}
 % \changes{v2.98c}{2008/03/03}{earlier definition}
+% \changes{v3.46}{2025/06/23}{\pkg{caption3} support added}
 % The boolean is used to distinguish whether or not use a special handling of
 % captions with one text line only. The name of the boolean is traditionally
 % but nevertheless should seen as internal.
 %    \begin{macrocode}
 \newif\ifonelinecaptions\onelinecaptionstrue
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionSinglelinecheck{koma}{%
+    \ifonelinecaptions
+      \expandafter\@firstoftwo
+    \else
+      \expandafter\@secondoftwo
+    \fi}%
+  \SetCaptionDefault{singlelinecheck}{koma}%
+}
 %    \end{macrocode}
 % \end{macro}^^A \ifonelinecaptions
 %
@@ -202,6 +202,7 @@
 % \changes{v3.17}{2015/03/11}{using internal value storage}
 % \changes{v3.39}{2022/11/11}{initial dot removed from member argument of
 %   option storage commands}
+% \changes{v3.46}{2025/06/13}{several values are processed by \pkg*{tocbasic}}
 % This is the general option for the settings of captions. Because of
 % compatibility with package \pkg{caption}, several of the macros, that are
 % used to handle the values to the option, cannot be renamed and have to be
@@ -317,36 +318,32 @@
   }{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed
     \ifcase \@tempa\relax % heading
-      \@tablecaptionabovetrue
-      \@figurecaptionabovetrue
-      \@captionabovetrue
+      \SetKeys[tocbasic]{captionabove}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{heading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{signature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{heading}%
-   \or % signature
-      \@tablecaptionabovefalse
-      \@figurecaptionabovefalse
-      \@captionabovefalse
+    \or % signature
+      \SetKeys[tocbasic]{captionbelow}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{heading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{signature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{signature}%
     \or % tableheading
-      \@tablecaptionabovetrue
+      \SetKeys[tocbasic]{tablecaptionabove}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tableheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tablesignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{tableheading}%
     \or % tablesignature
-      \@tablecaptionabovefalse
+      \SetKeys[tocbasic]{tablecaptionbelow}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tableheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tablesignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{tablesignature}%
     \or % figureheading
-      \@figurecaptionabovetrue
+      \SetKeys[tocbasic]{figurecaptionabove}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figureheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figuresignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{figureheading}%
     \or % figuresignature
-      \@figurecaptionabovefalse
+      \SetKeys[tocbasic]{figurecaptionbelow}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figureheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figuresignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{figuresignature}%
@@ -410,8 +407,6 @@
   \fi
 }
 \KOMA at kav@add{\KOMAClassFileName}{captions}{signature}
-\KOMA at kav@add{\KOMAClassFileName}{captions}{tablesignature}
-\KOMA at kav@add{\KOMAClassFileName}{captions}{figuresignature}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{oneline}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{rightbeside}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{bottombeside}
@@ -489,36 +484,25 @@
 %    \end{macrocode}
 % \end{length}^^A \abovecaptionskip,\belowcaptionskip
 % \begin{command}{\captionformat}
-% \changes{v2.3c}{1995/08/06}{added}
-% Separator between label (with number) an text only.
+%   \changes{v2.3c}{1995/08/06}{added}
+%   \changes{v3.46}{2025/06/23}{\pkg*{caption3} support added}
+%   Separator between label (with number) an text only.
 %    \begin{macrocode}
 \newcommand*{\captionformat}{:\ }
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionLabelSeparator{koma}{\captionformat}%
+  \SetCaptionDefault{labelseparator}{koma}%
+}
 %    \end{macrocode}
 % \end{command}^^A \captionformat
 % \begin{command}{\captionabove,\captionbelow}
-% \changes{v2.8h}{2001/07/19}{added}
+%   \changes{v2.8h}{2001/07/19}{added}
+%   \changes{v3.46}{2025/06/16}{moved to \pkg*{tocbasic}}
+% \end{command}^^A \captionabove,\captionbelow
 % \begin{macro}{\scr at caption}
-% \changes{v2.8h}{2001/07/19}{added}
-% We have two different commands \cs{captionabove} and \cs{captionbelow} to
-% distinguish captions above or below the object. Internally both use
-% \cs{scr at caption}, but set either \cs{@captionabovetrue} or
-% \cs{@captionabovefalse}. To allow other packages (e.g. \pkg{hyperref} to
-% redefine \cs{caption} the final definition of \cs{scr at caption} is done in
-% |\begin{document}|. We cannot use \cs{caption} inside \cs{captionabove} or
-% \cs{captionbelow}, because we do use a redefinition of \cs{capion} to use
-% \cs{captionabove} or \cs{captionbelow} via \opt{atbegin} at \cs{DeclareNewTOC}.
-%    \begin{macrocode}
-\newcommand{\scr at caption}{}
-\AtBeginDocument{\let\scr at caption\caption}
-%    \end{macrocode}
+%   \changes{v2.8h}{2001/07/19}{added}
+%   \changes{v3.46}{2025/06/13}{removed to deactivate \pkg{caption} patches}
 % \end{macro}^^A \scr at caption
-% Jetzt ist es möglich durch einfaches Umlegen des Schalters für die
-% korrekte Darstellung zu sorgen:
-%    \begin{macrocode}
-\newcommand{\captionabove}{\@captionabovetrue\scr at caption}
-\newcommand{\captionbelow}{\@captionabovefalse\scr at caption}
-%    \end{macrocode}
-% \end{command}^^A \captionabove,\captionbelow
 %
 %
 % \begin{environment}{captionbeside}
@@ -795,12 +779,19 @@
 %    \end{macrocode}
 % \end{macro}^^A \capfont,\caplabelfont
 % \begin{macro}{\scr at fnt@caption,\scr at fnt@captionlabel}
-% \changes{v2.8o}{2001/09/14}{added}
-% Because of that non-default for the internal storage the font elements have
-% to be defined \emph{manually} instead of using \cs{newkomafont}.
+%   \changes{v2.8o}{2001/09/14}{added}
+%   \changes{v3.46}{2025/06/23}{\pkg{caption3} support added}
+%   Because of that non-default for the internal storage the font elements
+%   have to be defined \emph{manually} instead of using \cs{newkomafont}.
 %    \begin{macrocode}
 \newcommand*{\scr at fnt@caption}{\capfont}
 \newcommand*{\scr at fnt@captionlabel}{\caplabelfont}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionFont{scr at font}{\scr at fnt@caption}%
+  \DeclareCaptionFont{scr at labelfont}{\scr at fnt@captionlabel}%
+  \SetCaptionDefault{font}{scr at font}%
+  \SetCaptionDefault{labelfont}{scr at labelfont}%
+}
 %    \end{macrocode}
 % \end{macro}^^A \scr at fnt@caption,\scr at fnt@captionlabel
 % \end{fontelement}^^A caption,captionlabel
@@ -835,6 +826,12 @@
 % \changes{v2.8q}{2001/11/17}{redefined after loading \pkg{caption2}}
 % \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel at ifstar}}
 % \changes{v3.34}{2021/03/22}{special treatment of \pkg{caption2} removed}
+% \changes{v3.46}{2025/06/23}{removed}
+% \end{macro}^^A \@@setcaptindent,\@setcapindent
+% \changes{v3.46}{2025/06/23}{re-written to add support for the \pkg{caption}
+%   package}
+% \changes{v3.46}{2025/06/25}{undocumented feature for indent greater than
+%   \len{hsize} removed}
 % The user can configure the indent using:
 % \begin{quote}
 %   \cs{setcapindent}*\marg{indent}
@@ -844,24 +841,35 @@
 % local dimension assignment is done to report errors here and not at
 % usage of \cs{cap at indent}.
 %    \begin{macrocode}
-\newcommand*{\setcapindent}{\kernel at ifstar{\@@setcapindent}{\@setcapindent}}
-\newcommand*{\@setcapindent}[1]{%
-  \setlength{\@tempdima}{#1}%
-  \ifdim\@tempdima>\hsize
-    \addtolength{\@tempdima}{-\hsize}\@capbreaktrue
-  \else
-    \@capbreakfalse
-  \fi
-  \edef\cap at indent{\the\@tempdima}%
-  \dofullc at pfalse
-}
-\newcommand*{\@@setcapindent}[1]{%
-  \setlength{\@tempdima}{#1}%
-  \edef\cap at indent{\the\@tempdima}%
-  \dofullc at pfalse\@capbreaktrue
-}
+%<@@=scrkernel>
+\ExplSyntaxOn
+\NewDocumentCommand { \setcapindent } { s m }
+  {
+    \IfBooleanTF {#1}
+      {
+        \cs_set:Npe \cap at indent { \dim_eval:n { #2 } }
+        \@capbreaktrue
+      }
+      {
+        \cs_set:Npe \cap at indent { \dim_eval:n { #2 } }
+        \@capbreakfalse
+      }
+    \dofullc at pfalse
+    \@@_at_caption_package:n
+      {
+        \exp_args:No \msg_warning:nnee { \KOMAClassName }
+          { using-caption }
+          { \token_to_str:N\setcapindent\IfBooleanT{#1}*{#2} }
+          {
+            \token_to_str:N \captionsetup
+              { indent=\ifdim\cap at indent<\z@\z@\else\cap at indent\fi }
+          }
+        \captionsetup { indent=\ifdim\cap at indent<\z@\z@\else\cap at indent\fi }
+      }
+  }
+\ExplSyntaxOff
+%<@@=>  
 %    \end{macrocode}
-% \end{macro}^^A \@@setcaptindent,\@setcapindent
 % \end{command}^^A \setcapindent
 % \begin{command}{\setcaphanging}
 % \changes{v2.8q}{2001/11/17}{redefined after loading \pkg{caption2}}
@@ -871,16 +879,9 @@
 \newcommand*{\setcaphanging}{\dofullc at ptrue\@capbreakfalse}
 %    \end{macrocode}
 % \end{command}
-% Now, we have all to define \cs{@makecaption} as needed by the \LaTeX{} kernel.
-% \changes{v2.5g}{1999/10/09}{using \cs{newcommand}}
-% \changes{v2.8h}{2001/07/19}{support for headings and signatures}
-% \changes{v2.8j}{2001/07/30}{using \cs{@@makecaption}}
-% \changes{v2.8q}{2001/11/17}{special treatment of one line captions is optional}
-% \changes{v2.8q}{2001/11/17}{caption width can be limited}
-% \changes{v3.41}{2023/05/10}{no page break below caption above or above
-%   caption below content}
 % \begin{command}{\captionnopagebreak}
-% \changes{v3.41}{2023/05/10}{new}
+%   \changes{v3.41}{2023/05/10}{added}
+%   \changes{v3.46}{2025/06/13}{use socket to inject additional code}
 % Can be redefined by users to allow page breaks between content and caption.
 %    \begin{macrocode}
 \expandafter\ifnum\scr at v@is at ge{3.41}%
@@ -888,21 +889,42 @@
 \else
   \newcommand*{\captionnopagebreak}{}
 \fi
+\newcommand*{\@abovecaptionbreak}{}
+\newcommand*{\@belowcaptionbreak}{}
+\let\@belowcaptionbreak\captionnopagebreak
+\IfFormatAtLeastTF{2023/11/01}{%
+  \NewSocketPlug{tocbasic/swapskip/after}{swapbreak}{%
+    \let\@abovecaptionbreak\captionnopagebreak
+    \let\@belowcaptionbreak\relax
+  }%
+  \AssignSocketPlug{tocbasic/swapskip/after}{swapbreak}%
+}{%
+  \AddToHook{tocbasic/swapskip/after}{&
+    \let\@abovecaptionbreak\captionnopagebreak
+    \let\@belowcaptionbreak\relax
+  }%
+}
+%    \end{macrocode}
+% \end{command}
+%   Now, we have all to define \cs{@makecaption} as needed by the \LaTeX{}
+%   kernel.
+%   \changes{v2.5g}{1999/10/09}{using \cs{newcommand}}
+%   \changes{v2.8h}{2001/07/19}{support for headings and signatures}
+%   \changes{v2.8j}{2001/07/30}{using \cs{@@makecaption}}
+%   \changes{v2.8q}{2001/11/17}{special treatment of one line captions is
+%     optional}
+%   \changes{v2.8q}{2001/11/17}{caption width can be limited}
+%   \changes{v3.41}{2023/05/10}{no page break below caption above or above
+%     caption below content}
+%   \changes{v3.46}{2025/06/13}{moved caption above/below logic to
+%     \pkg*{tocbasic}}
+%    \begin{macrocode}
 \newcommand{\@makecaption}[2]{%
-  \if at captionabove
-    \vskip\belowcaptionskip
-  \else
-    \captionnopagebreak\vskip\abovecaptionskip\captionnopagebreak
-  \fi
+  \@abovecaptionbreak\vskip\abovecaptionskip\@abovecaptionbreak
   \@@makecaption\@firstofone{#1}{#2}%
-  \if at captionabove
-    \captionnopagebreak\vskip\abovecaptionskip\captionnopagebreak
-  \else
-    \vskip\belowcaptionskip
-  \fi
+  \@belowcaptionbreak\vskip\belowcaptionskip\@belowcaptionbreak
 }
 %    \end{macrocode}
-% \end{command}
 % \begin{macro}{\cap at width,\cap at left,\cap at right}
 % \changes{v2.8q}{2001/11/17}{added}
 % Multi line captions can printed with a reduced with. If the width is reduced
@@ -915,10 +937,13 @@
 % \end{macro}^^A \cap at width,\cap at left,\cap at right
 % \begin{command}{\setcapwidth}
 % \changes{v2.8q}{2001/11/17}{added}
-% \changes{v2.9a}{2002/06/27}{\cs{ifthispageodd} replaced by \cs{if at thispageodd}}
+% \changes{v2.9a}{2002/06/27}{\cs{ifthispageodd} replaced by
+%  \cs{if at thispageodd}}
 % \changes{v2.97}{2007/02/27}{minimum width for captions is 0\,pt}
 % \changes{v3.28}{2019/11/19}{\cs{ifthispageodd} replaced by \cs{Ifthispageodd}}
 % \changes{v3.34}{2021/03/22}{special treatment of \pkg{caption2} removed}
+% \changes{v3.46}{2025/06/17}{re-written to add support for the \pkg{caption}
+%   package}
 % The user command:
 % \begin{quote}
 %   \cs{setcapwidth}\oarg{alignment}\marg{width}
@@ -927,72 +952,130 @@
 % \meta{alignment} (as usual |l|, |r|, |o|, or |i|) also changes \cs{cap at left}
 % and \cs{cap at right}.
 %    \begin{macrocode}
-\newcommand*{\setcapwidth}[2][]{%
-  \begingroup%
-    \setlength{\@tempdima}{#2}%
-    \ifdim\@tempdima <\z@
-      \@tempdima\z@
-      \ClassWarning{\KOMAClassName}{%
-        caption width less than 0pt not allowed.\MessageBreak
-        Setting caption width to 0pt%
-      }%
-    \fi
-    \edef\@tempa{\endgroup\def\noexpand\cap at width{\the\@tempdima}}%
-  \@tempa
-  \begingroup
-    \edef\@tempa{#1}%
-    \def\@tempb{c}\ifx\@tempa\@tempb
-      \endgroup
-      \def\cap at margin{\let\cap at left=\hfill\let\cap at right=\hfill}%
-    \else
-      \def\@tempb{l}\ifx\@tempa\@tempb
-        \endgroup
-        \def\cap at margin{\let\cap at left=\relax\let\cap at right\hfill}%
-      \else
-        \def\@tempb{r}\ifx\@tempa\@tempb
-          \endgroup
-          \def\cap at margin{\let\cap at left=\hfill\let\cap at right=\relax}%
-        \else
-          \def\@tempb{i}\ifx\@tempa\@tempb
-            \endgroup
-            \def\cap at margin{%
-              \let\cap at left=\relax
-              \let\cap at right=\hfill
-              \if at twoside
-                \Ifthispageodd{}{%
-                  \let\cap at left=\hfill
-                  \let\cap at right=\relax
-                }%
-              \fi
-            }%
-          \else
-            \def\@tempb{o}\ifx\@tempa\@tempb
-              \endgroup
-              \def\cap at margin{%
-                \let\cap at left=\hfill
-                \let\cap at right=\relax
-                \if at twoside
-                  \Ifthispageodd{}{%
-                    \let\cap at left=\relax
-                    \let\cap at right=\hfill
-                  }%
-                \fi
-              }%
-            \else
-              \ifx \@tempa\@empty\else
-                \ClassError{\KOMAClassName}{%
-                  unknown optional position argument%
-                }{%
-                  You've used `#1' as position argument at
-                  \string\setcaptionwidth,\MessageBreak
-                  but only ONE of `c', `l', `r', `i`, `o` ist
-                  allowed.\MessageBreak
-                  Argument will be ignored, if you'll continue.%
-                }%
-              \fi
-              \endgroup
-  \fi\fi\fi\fi\fi
-}
+%<@@=scrkernel>
+\ExplSyntaxOn
+\prop_put:Non \g_msg_module_type_prop { \KOMAClassName } { Class }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { minimum-value-needed }
+  {
+    You've~tried~#2~\msg_line_context:,~
+    but~values~less~than~#1~are~not~allowed.~
+    Using~#1~instead.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { caption-not-support-setcapwidth-option }
+  {
+    Ignoring~command~
+    \token_to_str:N \setcapwidth [#1]{...}\\
+    because~the~caption~package~is~being\\
+    used~\msg_line_context:.
+  }  
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { caption-not-support-setcapdynwidth }
+  {
+    Ignoring~\token_to_str:N \setcapdynwidth \c_space_token
+    because~the~caption~package~is~being~used~\msg_line_context:.
+  }  
+\exp_args:No \msg_new:nnnn { \KOMAClassName }
+  { setcaption-unknown-option }
+  { unknown~optional~position~argument~[#1]~\msg_line_context: }
+  {
+    Only~ONE~of~c,~l,~r,~i,~o~is~allowed~as~optional~argument~to~
+    \token_to_str:N \setcapwidth \c_space_tl and~
+    \token_to_str:N \setcapdynwidth \c_space_tl \msg_line_context:.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { using-caption }
+  {
+    Mapping~of\\
+    \c_space_tl #1\\
+    to\\
+    \c_space_tl #2\\
+    because~the~caption~package~is~being~used.\\
+    When~using~the~caption~package,~it~is~recommended\\
+    to~use~the~options~of~this~package~directly~instead\\
+    of~the~KOMA-Script~setting~\msg_line_context:.
+  }
+\NewDocumentCommand { \setcapwidth } { om }
+  {
+    \dim_compare:nNnTF { #2 } < { \c_zero_dim }
+      {
+        \exp_args:No \msg_warning:nnne { \KOMAClassName }
+          { minimum-value-needed } { 0pt } { \dim_eval:n { #2 } }
+        \def\cap at width{0pt}
+      }
+      {
+        \cs_set:Npe \cap at width { \dim_eval:n { #2 } }
+      }
+    \IfPackageLoadedF { caption } { \@@_set_cap_left_right:n { #1 } }
+    \@@_at_caption_package:n
+      {
+        \IfValueTF { #1 }
+          {
+            \exp_args:No \msg_warning:nne { \KOMAClassName }
+              { caption-not-support-setcapwidth-option } { #1 }
+          }
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapwidth{#2} }
+              { \token_to_str:N \captionsetup { width=\cap at width } }
+            \captionsetup { width=\cap at width }
+          }
+      }
+  }
+\cs_new:Nn \@@_at_caption_package:n
+  {
+    \IfPackageLoadedTF { caption3 }
+      {
+        \cs_if_eq:NNTF \AtCaptionPackage \@notprerr
+          { #1 }
+          { \AtCaptionPackage { #1 } }
+      }
+      {
+        \hook_gput_code:nnn { pkg / caption3 / after } { \KOMAClassName }
+          { \AtCaptionPackage { #1 } }
+      }
+  }  
+\@@_at_caption_package:n
+  {
+    \cs_set:Nn \@@_at_caption_package:n { ##1 }
+  }
+\cs_new:Nn \@@_set_cap_left_right:n
+  {  
+    \str_case:enF { #1 }
+      {
+        { c } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \hfill } }
+        { l } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \relax 
+                                          \cs_set_eq:NN \cap at right \hfill } }
+        { r } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \relax } }
+        { i } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \relax
+                                          \cs_set_eq:NN \cap at right \hfill
+                                          \if at twoside
+                                            \Ifthispageodd {} {
+                                              \cs_set_eq:NN \cap at left  \hfill
+                                              \cs_set_eq:NN \cap at right \relax 
+                                            }
+                                          \fi } }
+        { o } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \relax
+                                          \if at twoside
+                                            \Ifthispageodd {
+                                              \cs_set_eq:NN \cap at left  \relax
+                                              \cs_set_eq:NN \cap at right \hfill 
+                                            } { }
+                                          \fi } }
+      }
+      {
+        \IfValueT{ #1 }
+          {
+            \exp_args:No \msg_error:nnn { \KOMAClassName }
+              { setcaption-unknown-option } { #1 }
+          }
+      }
+  }
 %    \end{macrocode}
 % \end{command}^^A \setcapwidth
 % \begin{command}{\setcapdynwidth}
@@ -1003,102 +1086,22 @@
 % \cs{setcapdynwidth}. But in this case mistakes can result in errors while
 % usage of \cs{cap at width} too.
 %    \begin{macrocode}
-\newcommand*{\setcapdynwidth}[2][]{%
-  \def\cap at width{#2}%
-  \begingroup
-    \edef\@tempa{#1}%
-    \def\@tempb{c}\ifx\@tempa\@tempb
-      \endgroup
-      \def\cap at margin{%
-        \ifdim \cap at width<\z@
-          \ClassWarning{\KOMAClassName}{%
-            caption width less than 0pt not allowed.\MessageBreak
-            Setting caption width to 0pt%
-          }%
-          \let\cap at width\z@
-        \fi
-        \let\cap at left=\hfill\let\cap at right=\hfill}%
-    \else
-      \def\@tempb{l}\ifx\@tempa\@tempb
-        \endgroup
-        \def\cap at margin{%
-          \ifdim \cap at width<\z@
-            \ClassWarning{\KOMAClassName}{%
-              caption width less than 0pt not allowed.\MessageBreak
-              Setting caption width to 0pt%
-            }%
-            \let\cap at width\z@
-          \fi
-          \let\cap at left=\relax\let\cap at right\hfill}%
-      \else
-        \def\@tempb{r}\ifx\@tempa\@tempb
-          \endgroup
-          \def\cap at margin{%
-            \ifdim \cap at width<\z@
-              \ClassWarning{\KOMAClassName}{%
-                caption width less than 0pt not allowed.\MessageBreak
-                Setting caption width to 0pt%
-              }%
-              \let\cap at width\z@
-            \fi
-            \let\cap at left=\hfill\let\cap at right=\relax}%
-        \else
-          \def\@tempb{i}\ifx\@tempa\@tempb
-            \endgroup
-            \def\cap at margin{%
-              \ifdim \cap at width<\z@
-                \ClassWarning{\KOMAClassName}{%
-                  caption width less than 0pt not allowed.\MessageBreak
-                  Setting caption width to 0pt%
-                }%
-                \let\cap at width\z@
-              \fi
-              \let\cap at left=\relax
-              \let\cap at right=\hfill
-              \if at twoside
-                \Ifthispageodd{}{%
-                  \let\cap at left=\hfill
-                  \let\cap at right=\relax
-                }%
-              \fi
-            }%
-          \else
-            \def\@tempb{o}\ifx\@tempa\@tempb
-              \endgroup
-              \def\cap at margin{%
-                \ifdim \cap at width<\z@
-                  \ClassWarning{\KOMAClassName}{%
-                    caption width less than 0pt not allowed.\MessageBreak
-                    Setting caption width to 0pt%
-                  }%
-                  \let\cap at width\z@
-                \fi
-                \let\cap at left=\hfill
-                \let\cap at right=\relax
-                \if at twoside
-                  \Ifthispageodd{}{%
-                    \let\cap at left=\relax
-                    \let\cap at right=\hfill
-                  }%
-                \fi
-              }%
-            \else
-              \ifx \@tempa\@empty\else
-                \ClassError{\KOMAClassName}{%
-                  unknown optional position argument%
-                }{%
-                  You've used `#1' as position argument at
-                  \string\setcaptionwidth,\MessageBreak
-                  but only ONE of `c', `l', `r', `i`, `o` ist
-                  allowed.\MessageBreak
-                  Argument will be ignored, if you'll continue.%
-                }%
-              \fi
-              \endgroup
-  \fi\fi\fi\fi\fi
-}
+\NewDocumentCommand { \setcapdynwidth } { om }
+  {
+    \IfPackageLoadedTF { caption }
+      {
+        \exp_args:No \msg_warning:nn { \KOMAClassName }
+          { caption-not-support-setcapdynwidth }
+      }
+      {  
+        \cs_set:Npn \cap at width { #2 }
+        \@@_set_cap_left_right:n { #1 }
+      }
+  }
+\ExplSyntaxOff
 %    \end{macrocode}
 % \end{command}^^A \setcapdynwidth
+%
 % \begin{macro}{\cap at margin}
 % \changes{v2.8q}{2001/11/17}{added}
 % \cs{cap at margin} is used to recalculate \cs{cap at left} and \cs{cap at right}
@@ -1114,60 +1117,72 @@
 % \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel at ifstar}}
 % \begin{macro}{\@@setcapmargin,\@setcapmargin}
 % \changes{v2.8q}{2001/11/17}{added}
-% \changes{v2.9a}{2002/06/27}{\cs{ifthispageodd} replaced by \cs{if at thispageodd}}
+% \changes{v2.9a}{2002/06/27}{\cs{ifthispageodd} replaced by
+%   \cs{if at thispageodd}}
 % \changes{v3.28}{2019/11/19}{\cs{ifthispageodd} replaced by \cs{Ifthispageodd}}
 % \changes{v3.34}{2021/03/22}{special treatment for \pkg{caption2} removed}
+% \changes{v3.46}{2025/06/25}{removed}
+% \end{macro}
+% \changes{v3.46}{2025/06/23}{re-written to add support for the \pkg{caption}
+%   package}
 % Instead of setting of the width of the caption, the left and right margin
 % can be set. The star variant switch left and right depending on odd or even
 % side in two side mode.
 %    \begin{macrocode}
-\newcommand*{\setcapmargin}{\kernel at ifstar{\@setcapmargin}{\@@setcapmargin}}
-\newcommand*{\@setcapmargin}[2][\@tempdimb]{%
-  \def\cap at margin{%
-    \onelinecaptionsfalse
-    \begingroup
-      \setlength{\@tempdima}{\hsize}%
-      \setlength{\@tempdimb}{#2}%
-      \addtolength{\@tempdima}{-\@tempdimb}%
-      \setlength{\@tempdimc}{#1}%
-      \addtolength{\@tempdima}{-\@tempdimc}%
-      \edef\@tempa{\endgroup
-        \def\noexpand\cap at width{\the\@tempdima}%
-        \noexpand\if at twoside
-          \noexpand\Ifthispageodd{%
-            \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-            \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-          }{%
-            \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimc}}%
-            \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimb}}%
-          }%
-        \noexpand\else
-          \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-          \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-        \noexpand\fi
-      }%
-    \@tempa
-  }%
-}
-\newcommand*{\@@setcapmargin}[2][\@tempdimb]{%
-  \def\cap at margin{%
-    \onelinecaptionsfalse
-    \begingroup
-      \setlength{\@tempdima}{\hsize}%
-      \setlength{\@tempdimb}{#2}%
-      \addtolength{\@tempdima}{-\@tempdimb}%
-      \setlength{\@tempdimc}{#1}%
-      \addtolength{\@tempdima}{-\@tempdimc}%
-      \edef\@tempa{\endgroup
-        \def\noexpand\cap at width{\the\@tempdima}%
-        \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-        \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-      }%
-    \@tempa
-  }%
-}
+\ExplSyntaxOn
+\NewDocumentCommand {\setcapmargin} { s O{#3} m }
+  {
+    \IfBooleanTF {#1}
+      {
+        \cs_set:Npn \cap at margin
+          {
+            \onelinecaptionsfalse
+            \cs_set:Npe \cap at width { \dim_eval:n { \hsize - #2 - #3 } }
+            \if at twoside
+              \Ifthispageodd
+                {
+                  \cs_set:Npn \cap at left  { \hspace*{#2} }
+                  \cs_set:Npn \cap at right { \hspace*{#3} }
+                }
+                {
+                  \cs_set:Npn \cap at left  { \hspace*{#3} }
+                  \cs_set:Npn \cap at right { \hspace*{#2} }
+                }
+            \else
+              \cs_set:Npn \cap at left  { \hspace*{#2} }
+              \cs_set:Npn \cap at right { \hspace*{#3} }
+            \fi
+          }
+        \@@_at_caption_package:n
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapmargin*[#2]{#3} }
+              { \token_to_str:N \captionsetup { twoside, slc=0, margin={#2,#3} } }
+            \captionsetup{ twoside, slc=0, margin={#2,#3} }
+          }
+      }
+      {
+        \cs_set:Npn \cap at margin
+          {
+            \onelinecaptionsfalse
+            \cs_set:Npe \cap at width { \dim_eval:n { \hsize - #2 - #3 } }
+            \cs_set:Npn \cap at left  { \hspace*{#2} }
+            \cs_set:Npn \cap at right { \hspace*{#3} }
+          }
+        \@@_at_caption_package:n
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapmargin[#2]{#3} }
+              { \token_to_str:N \captionsetup { oneside, slc=0, margin={#2,#3} } }
+            \captionsetup{oneside,slc=0,margin={#2,#3}}
+          }
+      }
+  }
+\ExplSyntaxOff
+%<@@=>
 %    \end{macrocode}
-% \end{macro}^^A \@@setcapmargin,\@setcapmargin
 % \end{command}^^A \setcapmargin
 % \begin{macro}{\@@makecaption}
 % The main job is done by \cs{@@makecaption}. It has an additional first
@@ -1183,7 +1198,10 @@
 % \changes{v3.11c}{2013/06/12}{using \cs{usekomafont}}
 % \changes{v3.12}{2013/06/12}{one \cs{usekomafont} replaced by \cs{usesizeofkomafont}}
 % \changes{v3.21}{2016/05/31}{re-implemented}
+% \changes{v3.46}{2025/08/15}{handling of \cs{label}, \cs{index},
+%   \cs{glossary} in online detection pass improved}
 %    \begin{macrocode}
+\NewHook{\KOMAClassName/makecaption/deactivate}
 \newcommand{\@@makecaption}[3]{%
 %    \end{macrocode}
 % Recalculate the margins.
@@ -1198,9 +1216,12 @@
     \ifonelinecaptions
       \def\stepcounter##1{\advance\value{##1}\@ne}%
       \let\refstepcounter\stepcounter
-      \let\label\@gobble
+      \let\label\@gobble at om
+      \let\index\@gobble at som
+      \let\glossary\@gobble at om
       \let\@footnotetext=\@gobble
       \let\hypertarget\@gobbletwo
+      \UseHook{\KOMAClassName/makecaption/deactivate}%
 %    \end{macrocode}
 % \changes{v3.22}{2016/09/01}{special treatment of hard coded line breaks}
 % If there are hard coded line breaks using |\\| or \cs{newline}, we inform
@@ -1591,6 +1612,27 @@
 % \end{command}^^A \setcaptionalignment
 % \end{macro}^^A \scr at makemultilinecaption
 % \end{macro}^^A \@@makecaption
+% \changes{v3.46}{2025/06/23}{\pkg*{caption3} support added}
+%    \begin{macrocode}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionFormat{koma}[#1#2#3\par]{%
+    \ifdofullc at p
+      \caption at useformat{hang}{#1}{#2}{#3}%
+    \else
+      #1#2%
+      \ifdim\cap at indent<\z@
+        \par
+        \noindent\hspace*{-\cap at indent}%
+      \else\if at capbreak
+        \par
+      \fi\fi
+      #3\par
+    \fi}%
+  \SetCaptionDefault{format}{koma}
+  \DeclareCaptionLabelFormat{koma}{\bothIfFirst{#1}{\nobreakspace}#2\autodot}
+  \SetCaptionFallback{labelformat}{koma}
+}
+%    \end{macrocode}
 % \end{macro}^^A \@makecaption
 %
 % \subsection{Special treatment of \texorpdfstring{\pkg*{longtable}}{`longtable'} captions}
@@ -1625,27 +1667,17 @@
 \AfterPackage{longtable}{%
   \if at komalongtable
     \renewcommand{\LT at makecaption}[3]{%
-      \noalign{%
-        \if at captionabove
-          \vskip\belowcaptionskip
-        \else
-          \vskip\abovecaptionskip
-        \fi
-      }%
       \LT at mcol\LT at cols c{%
         \hbox to\z@{\hss\parbox[t]\linewidth{%
 %    \end{macrocode}
-% \changes{v3.25}{2017/11/15}{\cs{@captype} set to \texttt{table}}
+%   \changes{v3.25}{2017/11/15}{\cs{@captype} set to \texttt{table}}
+%   \changes{v3.46}{2025/06/13}{use \cs{LTcaptype} if defined and not empty}
 % To make \cs{raggedtablecaption} available, \cs{@captype} has to be defined.
 %    \begin{macrocode}
-            \def\@captype{table}%
+            \if at captionabove\else\vskip\belowcaptionskip\fi
             \@@makecaption{#1}{#2}{#3}%
             \endgraf
-            \if at captionabove
-              \vskip\abovecaptionskip
-            \else
-              \vskip\belowcaptionskip
-            \fi
+            \if at captionabove\vskip\abovecaptionskip\fi
           }%
           \hss
         }%
@@ -1654,16 +1686,16 @@
     \newcommand*{\scr at LT@array}{}%
     \let\scr at LT@array=\LT at array
     \renewcommand*{\LT at array}{%
-      \let\scr at caption=\LT at caption
+      \def\@captype{table}%
+      \@ifundefined{LTcaptype}{}{%
+        \Ifstr{\LTcaptype}{}{}{\let\@captype\LTcaptype}%
+      }%
+      \csname tocbasic_if_caption_above:TF\endcsname
+        {\@captionabovetrue}{\@captionabovefalse}%
       \def\captionabove{\noalign{\global\@captionabovetrue}%
-        \scr at caption}%
+        \LT at caption}%
       \def\captionbelow{\noalign{\global\@captionabovefalse}%
-        \scr at caption}%
-      \if at tablecaptionabove
-        \let\LT at caption=\captionabove
-      \else
-        \let\LT at caption=\captionbelow
-      \fi
+        \LT at caption}%
       \scr at LT@array
     }%
     \ClassInfo{\KOMAClassName}{%
@@ -1743,30 +1775,17 @@
 % \subsection{Caption without float}
 %
 % \begin{command}{\captionof}
-% \changes{v3.05}{2009/07/08}{added}
-% \changes{v3.09}{2011/03/21}{using internal \cs{scr at caption}}
-% \changes{v3.09a}{2011/04/13}{handling of
-%   \opt{captions\quotechar=tableheading} and \opt{captions\quotechar=figureheading}}
+%   \changes{v3.05}{2009/07/08}{added}
+%   \changes{v3.09}{2011/03/21}{using internal \cs{scr at caption}}
+%   \changes{v3.09a}{2011/04/13}{handling of
+%     \opt{captions\quotechar=tableheading} and
+%     \opt{captions\quotechar=figureheading}} 
+%   \changes{v3.46}{2025/06/13}{moved to package \pkg*{tocbasic}}
+% \end{command}^^A \captionof
 % \begin{command}{\captionaboveof,\captionbelowof}
-% \changes{v3.09}{2011/03/21}{added}
-% We do not only provide a \cs{captionof} like \pkg{caption} or \pkg{capt-of}
-% but also \cs{captionaboveof} and \cs{captionbelowof}. Users should not
-% additionally use \pkg{capt-of}, but if they do, the definition of that
-% package will be used instead (which is usually not, what the user want, but
-% what they decided to do).
-%    \begin{macrocode}
-\newcommand*{\captionof}[1]{\def\@captype{#1}%
-  \begingroup\expandafter\expandafter\expandafter\endgroup
-  \expandafter\ifx\csname if@#1captionabove\endcsname\iftrue
-    \@captionabovetrue
-  \fi
-  \scr at caption}
-\newcommand*{\captionaboveof}{\@captionabovetrue\captionof}
-\newcommand*{\captionbelowof}{\@captionabovefalse\captionof}
-\BeforePackage{capt-of}{\let\captionof\relax}
-%    \end{macrocode}
+%   \changes{v3.09}{2011/03/21}{added}
+%   \changes{v3.46}{2025/06/13}{moved to package \pkg*{tocbasic}}
 % \end{command}^^A \captionaboveof,\captionbelowof
-% \end{command}^^A \captionof
 %
 % \begin{environment}{captionofbeside}
 % \changes{v3.10}{2011/09/02}{added}
@@ -1838,13 +1857,10 @@
 % \end{macro}
 % \changes{v3.11c}{2013/03/01}{fix: one \cs{caption} change removed}
 % \changes{v3.20}{2016/04/07}{internal redefinition of \cs{caption}}
+% \changes{v3.46}{2025/06/13}{internal redefinition of \cs{caption} removed}
 %    \begin{macrocode}
   tocentryindent=1.5em,
   tocentrynumwidth=2.3em,
-  atbegin=\def\caption{%
-    \if at figurecaptionabove\expandafter\captionabove
-    \else\expandafter\captionbelow\fi
-  }
 %    \end{macrocode}
 % \begin{macro}{\ext at figure}
 % Extension to be used (by \cs{DeclareNewTOC})
@@ -1917,13 +1933,10 @@
 %    \end{macrocode}
 % \end{macro}
 % \changes{v3.20}{2016/04/07}{internal redefinition of \cs{caption}}
+% \changes{v3.46}{2025/06/13}{internal redefinition of \cs{caption} removed}
 %    \begin{macrocode}
   tocentryindent=1.5em,
   tocentrynumwidth=2.3em,
-  atbegin=\def\caption{%
-    \if at tablecaptionabove\expandafter\captionabove
-    \else\expandafter\captionbelow\fi
-  }
 %    \end{macrocode}
 % \begin{macro}{\ext at table}
 % Extension to be used (by \cs{DeclareNewTOC})

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-fonts.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-fonts.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-fonts.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % ======================================================================
 % scrkernel-fonts.dtx
-% Copyright (c) Markus Kohm, 2002-2023
+% Copyright (c) Markus Kohm, 2002-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %<identify>%%%            (run: identify)
 %<option>%%%            (run: option)
 %<body>%%%            (run: body)
@@ -29,9 +29,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
-  \filedate$Date: 2023-04-20 10:03:46 +0200 (Do, 20. Apr 2023) $
+  \filedate$Date: 2025-06-14 11:11:13 +0200 (Sa, 14. Jun 2025) $
   \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
-  \filerevision$Revision: 4034 $
+  \filerevision$Revision: 4181 $
   \edef\reserved at a{%
     \noexpand\endgroup
     \noexpand\ProvidesFile{scrkernel-fonts.dtx}%
@@ -1704,7 +1704,7 @@
 % \begin{option}{sfdefaults}
 % Boolean option to change behave of \cs{maybesffamily}.
 % \begin{command}{\textmaybesf,\maybesffamily}
-% \changes{v3.39}{2023/04/04}{new}
+% \changes{v3.39}{2023/04/04}{added}
 % \begin{macro}{\@gr at gsffamily,\if at sfdefaults,
 %               \@sfdefaultfalse,\@sfdefaultstrue}
 % \changes{v3.20}{2016/01/29}{added}
@@ -1956,25 +1956,25 @@
 %
 %
 % \begin{command}{\usesizeofkomafont}
-% \changes{v3.12}{2013/03/30}{new}
+% \changes{v3.12}{2013/03/30}{added}
 % \changes{v3.17}{2015/04/03}{new more robust implementation}
 % \changes{v3.24}{2017/05/06}{new more robust implementation}
 % \changes{v3.34}{2021/05/17}{new implementation due to \LaTeX{} kernel change}
 % \begin{command}{\usefamilyofkomafont,\useseriesofkomafont}
-% \changes{v3.12}{2013/03/30}{new}
+% \changes{v3.12}{2013/03/30}{added}
 % \changes{v3.17}{2015/04/03}{new more robust implementation}
 % \changes{v3.24}{2017/05/06}{new more robust implementation}
 % \begin{command}{\useshapeofkomafont}
-% \changes{v3.12}{2013/03/30}{new}
+% \changes{v3.12}{2013/03/30}{added}
 % \changes{v3.16a}{2015/02/20}{fix of macro name}
 % \changes{v3.17}{2015/04/03}{new more robust implementation}
 % \changes{v3.24}{2017/05/06}{new more robust implementation}
 % \begin{command}{\useencodingofkomafont}
-% \changes{v3.12}{2013/03/30}{new}
+% \changes{v3.12}{2013/03/30}{added}
 % \changes{v3.17}{2015/04/03}{new more robust implementation}
 % \changes{v3.24}{2017/05/06}{new more robust implementation}
 % \begin{command}{\usefontofkomafont}
-% \changes{v3.12}{2013/03/30}{new}
+% \changes{v3.12}{2013/03/30}{added}
 % \changes{v3.17}{2015/04/03}{new more robust implementation}
 % \changes{v3.24}{2017/05/06}{new more robust implementation}
 % \changes{v3.34}{2021/05/17}{new implementation due to \LaTeX{} kernel change}

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-index.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-index.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-index.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % ======================================================================
 % scrkernel-index.dtx
-% Copyright (c) Markus Kohm, 2002-2023
+% Copyright (c) Markus Kohm, 2002-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-index.dtx 4052 2023-05-05 11:41:51Z kohm $
+%%% From File: $Id: scrkernel-index.dtx 4181 2025-06-14 09:11:13Z kohm $
 %<option>%%%            (run: option)
 %<body>%%%            (run: body)
 %<*dtx>
@@ -25,9 +25,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
-  \filedate$Date: 2023-05-05 13:41:51 +0200 (Fr, 05. Mai 2023) $
+  \filedate$Date: 2025-06-14 11:11:13 +0200 (Sa, 14. Jun 2025) $
   \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
-  \filerevision$Revision: 4052 $
+  \filerevision$Revision: 4181 $
   \edef\reserved at a{%
     \noexpand\endgroup
     \noexpand\ProvidesFile{scrkernel-index.dtx}%
@@ -138,7 +138,7 @@
 }
 %    \end{macrocode}
 % \begin{macro}{\idx@@mark,\idx@@forcemark,\idx@@forcemarknumbered}
-% \changes{v3.41}{2023/05/05}{new}
+% \changes{v3.41}{2023/05/05}{added}
 % We also need a command to do the mark for the running head to be used if a
 % sectioning command without automatic usage of \cs{chaptermark},
 % \cs{sectionmark} or \cs{subsectionmark} is used. For headings with automatic
@@ -268,7 +268,7 @@
 % \end{option}^^A index
 %
 % \begin{option}{idxtotoc}
-% \changes{v2.3h}{1995/01/21}{new}
+% \changes{v2.3h}{1995/01/21}{added}
 % \changes{v2.98c}{2008/03/04}{obsolete}
 % \changes{v3.01a}{2008/11/20}{deprecated}
 % \changes{v3.99}{2022/11/16}{not with \KOMAScript~4}

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-letterclassoptions.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-letterclassoptions.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-letterclassoptions.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % ======================================================================
 % scrkernel-letterclassoptions.dtx
-% Copyright (c) Markus Kohm, 2006-2023
+% Copyright (c) Markus Kohm, 2006-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %<option>%%%            (run: option)
 %<head>%%%            (run: head)
 %<body>%%%            (run: body)
@@ -26,9 +26,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
-  \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $
+  \filedate$Date: 2025-08-15 11:13:30 +0200 (Fr, 15. Aug 2025) $
   \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
-  \filerevision$Revision: 4032 $
+  \filerevision$Revision: 4197 $
 \endgroup
 \ProvidesFile{scrkernel-letterclassoptions.dtx}
              [\filedate\space \filerevision\space
@@ -260,6 +260,7 @@
 % \changes{v3.18}{2015/06/03}{added}
 % \changes{v3.26}{2018/08/29}{\cs{KV@@sp at def} replaced by
 %   \cs{scr at trim@spaces}}
+% \changes{v3.46}{2025/08/15}{\cs{scr at gobbleopt} replaced by \cs{@gobble at o}}
 % \begin{description}
 % \item[ToDo:] See the note above.
 % \end{description}
@@ -282,7 +283,7 @@
       }{}%
     }%
   \endgroup
-  \scr at gobbleopt
+  \@gobble at o
 }
 %    \end{macrocode}
 % \end{macro}^^A \lco at RequirePackage

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-listsof.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-listsof.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-listsof.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-listsof.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-listsof.dtx 4193 2025-08-12 14:24:39Z kohm $
 %<prepare>%%%            (run: prepare)
 %<option>%%%            (run: option)
 %<body>%%%            (run: body)
@@ -26,9 +26,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
-  \filedate$Date: 2025-06-04 13:53:33 +0200 (Mi, 04. Jun 2025) $
+  \filedate$Date: 2025-08-12 16:24:39 +0200 (Di, 12. Aug 2025) $
   \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
-  \filerevision$Revision: 4160 $
+  \filerevision$Revision: 4193 $
   \edef\reserved at a{%
     \noexpand\endgroup
     \noexpand\ProvidesFile{scrkernel-listsof.dtx}%
@@ -91,15 +91,6 @@
 % 
 % \subsection{Code used by all of the tables and lists of content}
 %
-% Before doing anything with the tocs we need package \pkg*{tocbasic}:
-%    \begin{macrocode}
-%<*prepare>
-\RequirePackage{tocbasic}[%
-%!KOMAScriptVersion
-]
-%</prepare>
-%    \end{macrocode}
-%
 % \begin{macro}{\numberline at numberpostfix}
 % \changes{v3.20}{2016/03/15}{used to add \cs{autodot}}
 % We extend this macro of \pkg*{tocbasic} to add the \cs{autodot} to the
@@ -132,7 +123,7 @@
 %   \texttt{chapteratlist}}
 % For classes with chapters we use the \pkg*{tocbasic} feature
 % \texttt{chapteratlist} for all directories of category/owner
-% \texttt{float}. This is done not only for already existing directories for
+% \texttt{float}. This is done not only for already existing directories but
 % also for those, that will be added later (using \pkg*{tocbasic}). Note: By
 % default this feature is used to add a vertical distance to, e.g., the list
 % of figures and the list of tables with each new chapter.

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-notepaper.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-notepaper.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-notepaper.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-notepaper.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-notepaper.dtx 4191 2025-07-28 07:01:41Z kohm $
 %<option>%%%            (run: option)
 %<body>%%%            (run: body)
 %<*dtx>
@@ -25,9 +25,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
-  \filedate$Date: 2025-06-04 17:36:11 +0200 (Mi, 04. Jun 2025) $
+  \filedate$Date: 2025-07-28 09:01:41 +0200 (Mo, 28 Jul 2025) $
   \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
-  \filerevision$Revision: 4161 $
+  \filerevision$Revision: 4191 $
   \edef\reserved at a{%
     \noexpand\endgroup
     \noexpand\ProvidesFile{scrkernel-notepaper.dtx}
@@ -1796,7 +1796,7 @@
 %    \end{macrocode}
 % \end{pseudolength}
 % \begin{pseudolength}{refheight}
-% \changes{v3.27}{2019/05/03}{new}
+% \changes{v3.27}{2019/05/03}{added}
 % The height of the reference line, if it is used.
 %    \begin{macrocode}
 %<*package&willbe>
@@ -3863,9 +3863,10 @@
           \if at tempswa
             \ifnum \@datepos=1 \@set at reffield{date}\fi%
 %    \end{macrocode}
-% From version~2.97c also test, of the font of the reference line is too big.
+%   From version~2.97c also test, of the font of the reference line is too big.
+%   \changes{v3.46}{2025/07/28}{\cs{strutbox} replaced by \cs{strut}}
 %    \begin{macrocode}
-            \sbox\z@{\usekomafont{refname}\strutbox}%
+            \sbox\z@{\usekomafont{refname}\strut}%
             \ifdim\ht\z@>\ht\strutbox
 %<class>              \ClassWarningNoLine{scrlttr2}{%
 %<package>              \PackageWarningNoLine{scrletter}{%
@@ -3872,7 +3873,7 @@
                 Font element `refname' should not be larger than
                 \string\normalsize!}%
             \fi
-            \sbox\z@{\usekomafont{refvalue}\strutbox}%
+            \sbox\z@{\usekomafont{refvalue}\strut}%
             \ifdim\ht\z@>\ht\strutbox
 %<class>              \ClassWarningNoLine{scrlttr2}{%
 %<package>              \PackageWarningNoLine{scrletter}{%
@@ -4696,7 +4697,7 @@
 \ExplSyntaxOff
 %    \end{macrocode}
 % \begin{command}{\sigalign,\sigspace}
-%   \changes{v3.44}{2025/05/28}{new}
+%   \changes{v3.44}{2025/05/28}{added}
 %   These are relevant for multiple signatures. \cs{sigalign} is the alignment
 %   character for the tabular. By default it is empty, which means it is
 %   defined by \cs{raggedsignature}. But users are allowed to explicitly set

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-sections.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-sections.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-sections.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 % The runs of run-time file generation:
 %<preidentify>%%%            (run: preidentify)
 % - everything that is needed before selfidentification of resulting files
@@ -40,9 +40,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
-  \filedate$Date: 2025-06-04 13:52:05 +0200 (Mi, 04. Jun 2025) $
+  \filedate$Date: 2025-08-19 12:12:30 +0200 (Di, 19 Aug 2025) $
   \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
-  \filerevision$Revision: 4159 $
+  \filerevision$Revision: 4199 $
   \edef\reserved at a{%
     \noexpand\endgroup
     \noexpand\ProvidesFile{scrkernel-sections.dtx}%
@@ -1191,7 +1191,11 @@
 %    \end{macrocode}
 % \changes{v3.41}{2023/06/29}{substitute definition of \cs{@currentlabelname}
 %   changed}
-% This case is complicated. Up to \LaTeX{} 2022/11/01 it was good enough to
+% \changes{v3.46}{2025/06/10}{substitute definition of \cs{@currentlabelname}
+%   changed}
+% \changes{v3.46}{2025/06/10}{allow star and optional argument for \cs{label},
+%   \cs{index}, \cs{glossary} and \cs{zlabel} when disabling}
+%   This case is complicated. Up to \LaTeX{} 2022/11/01 it was good enough to
 % use:
 % \begin{verbatim}
 % \def\@currentlabelname{#1}
@@ -1209,13 +1213,15 @@
 % \end{description}
 %    \begin{macrocode}
       \begingroup
-        \let\label\@gobble
-        \let\index\@gobble
-        \let\glossary\@gobble
+        \DeclareExpandableDocumentCommand{\label}{som}{}%
+        \DeclareExpandableDocumentCommand{\index}{som}{}%
+        \DeclareExpandableDocumentCommand{\glossary}{som}{}%
+        \DeclareExpandableDocumentCommand{\zlabel}{som}{}%
         \scr at ifundefinedorrelax{UseHook}{}{%
           \UseHook{\KOMAClassName/option/section/reference/fallback}%
         }%
-        \protected at edef\@currentlabelname{#1}%
+        \let\protect\noexpand
+        \edef\@currentlabelname{\expandafter\detokenize{#1}}%
       \expandafter\expandafter\expandafter\endgroup
       \expandafter\def\expandafter\@currentlabelname\expandafter{%
         \@currentlabelname}%
@@ -2807,7 +2813,7 @@
 }
 %    \end{macrocode}
 % \begin{macro}{\cs{\_\_scrkernel\_seq\_put\_unique:Nn}}
-%   \changes{v3.44}{2025/05/14}{new}
+%   \changes{v3.44}{2025/05/14}{added}
 %   A variant of \cs{seq\_put\_left:NN} that puts the new item only to the left,
 %   if it does not yet exist in the sequence.
 %    \begin{macrocode}
@@ -3857,6 +3863,8 @@
 % \changes{v3.20}{2016/12/05}{improved warning}
 % \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
 % \changes{v3.34}{2021/04/30}{\LaTeX{} hook added}
+% \changes{v3.46}{2025/08/13}{local redefinition of \cs{@chapapp} inside ToCs
+%   added}
 % \begin{command}{\appendixmore}
 % \changes{v2.8}{2001/06/15}{added}
 % \cs{appendixmore} is deprecated with \LaTeX{} 2020/10/01 (or newer) but
@@ -3888,10 +3896,14 @@
   \setcounter{subsection}{0}%
   \gdef\thesection{\@Alph\c at section}%
 %</article>
-%<*report|book>
+%<*report|book> 
   \setcounter{chapter}{0}%
   \setcounter{section}{0}%
   \gdef\@chapapp{\appendixname}%
+  \addtocontents{\ext at toc}{\def\protect\@chapapp{\protect\appendixname}}%
+  \doforeachtocfile[float]{%
+    \addtocontents{\@currext}{\def\protect\@chapapp{\protect\appendixname}}%
+  }%
   \gdef\thechapter{\@Alph\c at chapter}%
 %</report|book>
   \UseOneTimeHook{\KOMAClassName/appendix}%
@@ -5063,9 +5075,9 @@
     \fi
   \fi
 %    \end{macrocode}
-% \changes{v3.18}{2015/05/22}{\cs{@makechapterhead} replaced by
-%   \cs{@make\meta{Name}head}}
-% \changes{v3.36}{2022/03/16}{warning about deprecated \cs{@makechapterhead}}
+%   \changes{v3.18}{2015/05/22}{\cs{@makechapterhead} replaced by
+%     \cs{@make\meta{Name}head}}
+%   \changes{v3.36}{2022/03/16}{warning about deprecated \cs{@makechapterhead}}
 % Setting the heading itself is more or less a call of \cs{@make\meta{command
 % name}head}.
 % \begin{description}
@@ -5081,7 +5093,32 @@
     \if at at@twocolumn
       \@nameuse{@make#1head}{#3}%
     \else
-      \@topnewpage[\@nameuse{@make#1head}{#3}]%
+%    \end{macrocode}
+%   \changes{v3.46}{2025/08/19}{vertical alignment of chapters in twocolumn
+%     mode improved}
+% Here we have a problem or even two. First: Inside \cs{@topnewpage} the
+% paragraph settings are reset like with \cs{parboxrestore}. So we need to
+% store the settings outside and restore them inside. Restoring \cs{parskip}
+% usually would be enough, but we do the whole thing. Second: \cs{@topnewpage}
+% is output before \cs{topskip} us used. But here we need \cs{topskip} be used
+% first. So we need to compensate this by extra \cs{vskip} before and the
+% content.
+%    \begin{macrocode}
+      \edef\scr at restoreparsetup{%
+        \parskip\the\parskip
+        \parfillskip\the\parfillskip
+        \parindent\the\parindent
+      }%
+      \@topnewpage[%
+%<!v4>        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \scr at restoreparsetup
+        \vskip\topskip
+%<!v4>        \fi
+        \@nameuse{@make#1head}{#3\ifhmode\strut\fi}%
+%<!v4>        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \vskip\dimeval{\ht\strutbox-\dp\strutbox-\topskip+\parskip}%
+%<!v4>        \fi
+      ]%
     \fi
   \else
     \@nameuse{@make#1head}{#3}%
@@ -5169,7 +5206,32 @@
     \if at at@twocolumn
       \@nameuse{@makes#1head}{#2}%
     \else
-      \@topnewpage[\@nameuse{@makes#1head}{#2}]%
+%    \end{macrocode}
+%   \changes{v3.46}{2025/08/19}{vertical alignment of chapters in twocolumn
+%     mode improved}
+% Here we have a problem or even two. First: Inside \cs{@topnewpage} the
+% paragraph settings are reset like with \cs{parboxrestore}. So we need to
+% store the settings outside and restore them inside. Restoring \cs{parskip}
+% usually would be enough, but we do the whole thing. Second: \cs{@topnewpage}
+% is output before \cs{topskip} us used. But here we need \cs{topskip} be used
+% first. So we need to compensate this by extra \cs{vskip} before and the
+% content.
+%    \begin{macrocode}
+      \edef\scr at restoreparsetup{%
+        \parskip\the\parskip
+        \parfillskip\the\parfillskip
+        \parindent\the\parindent
+      }%
+      \@topnewpage[%
+%<!v4>        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \scr at restoreparsetup
+        \vskip\topskip
+%<!v4>        \fi
+        \@nameuse{@makes#1head}{#2\ifhmode\strut\fi}%
+%<!v4>        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \vskip\dimeval{\ht\strutbox-\dp\strutbox-\topskip+\parskip}%
+%<!v4>        \fi
+      ]%
     \fi
   \else
     \@nameuse{@makes#1head}{#2}%

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-tocstyle.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-tocstyle.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-tocstyle.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % ======================================================================
 % scrkernel-tocstyle.dtx
-% Copyright (c) Markus Kohm, 2015-2023
+% Copyright (c) Markus Kohm, 2015-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 % The runs of run-time file generation:
 %<preidentify>%%%            (run: preidentify)
 % - everything that is needed before selfidentification of resulting files
@@ -42,9 +42,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
-  \filedate$Date: 2023-06-20 10:59:01 +0200 (Di, 20. Jun 2023) $
+  \filedate$Date: 2025-08-15 11:12:57 +0200 (Fr, 15. Aug 2025) $
   \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
-  \filerevision$Revision: 4060 $
+  \filerevision$Revision: 4196 $
   \edef\reserved at a{%
     \noexpand\endgroup
     \noexpand\ProvidesFile{scrkernel-tocstyle.dtx}%
@@ -61,7 +61,7 @@
 %</dtx>
 % \fi
 %
-% \changes{v3.20}{2015/11/13}{new}
+% \changes{v3.20}{2015/11/13}{added}
 % \changes{v3.36}{2022/02/14}{switch over from \cls*{scrdoc} to
 %   \cls*{koma-script-source-doc}}
 % \changes{v3.36}{2022/02/14}{whole implementation documentation in English}
@@ -793,6 +793,7 @@
 % \end{macro}^^A \@DefineTOCEntryIfOptionWithDefault,\@DefineTOCEntryIfOptionWithoutDefault
 % \end{macro}^^A \@DefineTOCEntryIfOption
 %
+%<@@=>
 % \begin{macro}{\@DefineTOCEntryCommandOption}
 % \changes{v3.20}{2015/11/17}{added}
 % Use \cs{DefineTOCEntryOption} to define an option that represents a
@@ -1097,24 +1098,27 @@
 %
 %
 % \begin{command}{\DeclareTOCStyleEntry}
-% \changes{v3.20}{2015/11/13}{added}
-% \changes{v3.39}{2022/10/24}{error message about missing options improved}
-% \changes{v3.41}{2023/06/20}{usage of style definition files supported}
-% This user command defines a new ToC entry command. It tests, if all needed
-% style macros are already defined. Otherwise an error will be shown and the
-% ToC entry command will not be defined. The arguments are:
-% \begin{description}
-% \item[\oarg{options}:] comma-separated list of options to specify the entry;
-% \item[\marg{style}:] a string, that specifies the style of the ToC entry;
-% \item[\marg{level name}:] a string, that specifies the name of the
-%   sectioning level (or float environment), related to the ToC entry;
-% \end{description}
-% The real macro to define a ToC entry command is
-% \cs{scr at dte@def at l@\meta{style}}. That needs exactly one argument, the
-% \meta{level name}.
+%   \changes{v3.20}{2015/11/13}{added}
+%   \changes{v3.39}{2022/10/24}{error message about missing options improved}
+%   \changes{v3.41}{2023/06/20}{usage of style definition files supported}
+%   \changes{v3.46}{2025/07/17}{using \cs{NewDocumentCommand} for better
+%     handling of optional argument}
+%   This user command defines a new ToC entry command. It tests, if all needed
+%   style macros are already defined. Otherwise an error will be shown and the
+%   ToC entry command will not be defined. The arguments are:
+%   \begin{description}
+%   \item[\oarg{options}:] comma-separated list of options to specify the
+%     entry;
+%   \item[\marg{style}:] a string, that specifies the style of the ToC entry;
+%   \item[\marg{level name}:] a string, that specifies the name of the
+%     sectioning level (or float environment), related to the ToC entry;
+%   \end{description}
+%   The real macro to define a ToC entry command is
+%   \cs{scr at dte@def at l@\meta{style}}. That needs exactly one argument, the
+%   \meta{level name}.
 %    \begin{macrocode}
 %<*body>
-\newcommand*{\DeclareTOCStyleEntry}[3][]{%
+\NewDocumentCommand{\DeclareTOCStyleEntry}{+omm}{%
   \scr at ifundefinedorrelax{scr at dte@def at l@#2}{%
     \IfFileExists{tocbasic-tocstyle-#2.def}{%
       \edef\reserved at a{%
@@ -1138,7 +1142,7 @@
     \let\scr at dte@precheck\@gobble
     \def\scr at dte@current{#3}%
     \@ExecuteTOCEntryStyleInitCode{#2}{#3}%
-    \IfArgIsEmpty{#1}{}{%
+    \IfValueT{#1}{%
       \FamilyBoolKey[.dte]{KOMAarg}{expandtopt}{scr at dte@expandtopt}%
       \scr at dte@expandtoptfalse
       \FamilyExecuteOptions[.dte]{KOMAarg}{#1}%
@@ -1214,22 +1218,24 @@
 % \end{command}^^A \DeclareTOCStyleEntry
 %
 % \begin{command}{\DeclareTOCStyleEntries}
-% \changes{v3.26}{2018/08/27}{added}
-% Use \cs{DeclareTOCStyleEntry} to define a list of entries, all with the same
-% options and style.
+%   \changes{v3.26}{2018/08/27}{added}
+%   \changes{v3.46}{2025/07/17}{using \cs{NewDocumentCommand} for better
+%     handling of optional argument}
+%   Use \cs{DeclareTOCStyleEntry} to define a list of entries, all with the
+%   same options and style.
 %    \begin{macrocode}
 %<*body>
-\newcommand*{\DeclareTOCStyleEntries}[3][]{%
+\NewDocumentCommand{\DeclareTOCStyleEntries}{+omm}{%
   \edef\reserved at a{#3}%
   \@for \reserved at a:=\reserved at a \do {%
     \scr at trim@spaces\reserved at a
     \ifx\reserved at a\@empty\else
-      \IfArgIsEmpty{#1}{%
+      \IfValueTF{#1}{%
         \edef\reserved at a{%
-          \unexpanded{\DeclareTOCStyleEntry{#2}}{\reserved at a}}%
+          \unexpanded{\DeclareTOCStyleEntry[{#1}]{#2}}{\reserved at a}}%
       }{%
         \edef\reserved at a{%
-          \unexpanded{\DeclareTOCStyleEntry[{#1}]{#2}}{\reserved at a}}%
+          \unexpanded{\DeclareTOCStyleEntry{#2}}{\reserved at a}}%
       }%
       \reserved at a
     \fi
@@ -1240,32 +1246,30 @@
 % \end{command}^^A \DeclareTOCStyleEntries
 %
 % \begin{command}{\DeclareTOCEntryStyle}
-% \changes{v3.20}{2015/11/17}{added}
+%   \changes{v3.20}{2015/11/17}{added}
 % \begin{macro}{\@DeclareTOCEntryStyle}
-% \changes{v3.20}{2015/11/17}{added}
-% \changes{v3.41}{2023/06/20}{using \cs{TOCEntryStyleInitCode*} instead of
-%   \cs{TOCEntryStyleInitCode}}
-% The user command is used to define a new style for ToC entries. The
-% arguments are:
-% \begin{description}
-% \item[\marg{style}:] a string, that represents the name of the style;
-% \item[\oarg{initialization code}:] code, e.g., to initialize the options,
-%   that will be used to define the ToC entry command (note: this code can be
-%   executed more than once);
-% \item[\marg{code}:] code, that will be used to generate a ToC entry while
-%   loading the auxiliary file of the ToC;
-% \end{description}
-% Independent from the \meta{initialization code}, \opt{level} is always
-% defined, because a numerical ToC level is always needed.
+%   \changes{v3.46}{2025/07/17}{removed}
+% \end{macro}
+%   \changes{v3.20}{2015/11/17}{added}
+%   \changes{v3.41}{2023/06/20}{using \cs{TOCEntryStyleInitCode*} instead of
+%     \cs{TOCEntryStyleInitCode}}
+%  \changes{v3.46}{2025/07/17}{using \cs{NewDocumentCommand} to avoid
+%    auxiliary command}
+%   The user command is used to define a new style for ToC entries. The
+%   arguments are:
+%   \begin{description}
+%   \item[\marg{style}:] a string, that represents the name of the style;
+%   \item[\oarg{initialization code}:] code, e.g., to initialize the options,
+%     that will be used to define the ToC entry command (note: this code can be
+%     executed more than once);
+%   \item[\marg{code}:] code, that will be used to generate a ToC entry while
+%     loading the auxiliary file of the ToC;
+%   \end{description}
+%   Independent from the \meta{initialization code}, \opt{level} is always
+%   defined, because a numerical ToC level is always needed.
 %    \begin{macrocode}
 %<*body>
-\newcommand*{\DeclareTOCEntryStyle}[1]{%
-  \kernel at ifnextchar [%]
-    {\@DeclareTOCEntryStyle{#1}}%
-    {\@DeclareTOCEntryStyle{#1}[]}%
-}
-\newcommand{\@DeclareTOCEntryStyle}{}
-\long\def\@DeclareTOCEntryStyle#1[#2]#3{%
+\NewDocumentCommand{\DeclareTOCEntryStyle}{m+O{}+m}{%
   \@namedef{scr at dte@def at l@#1}##1{%
     \@namedef{l@##1}####1####2{%
       \TOC at EntryStartHook{##1}%
@@ -1280,7 +1284,6 @@
 }
 %</body>
 %    \end{macrocode}
-% \end{macro}^^A \@DeclareTOCEntryStyle
 % \end{command}^^A \DeclareTOCEntryStyle
 %
 %
@@ -1357,11 +1360,11 @@
 %    \end{macrocode}
 % 
 % \begin{macro}{\scr at dte@def at l@gobble}
-% \changes{v3.20}{2015/11/20}{ToC style \texttt{gobble} added}
-% Der aller einfachste Verzeichniseintragsstil ist |gobble|. Er nimmt
-% die beiden Argumente für den Verzeichniseintrag und die Seitenzahl und
-% vergisst sie unabhängig von der Ebene des Eintrags einfach. Daher benötigt
-% dieser Stil auch keinerlei Optionen oder Initialisierung.
+%   \changes{v3.20}{2015/11/20}{ToC style \texttt{gobble} added}
+%   The simplest directory entry style is |gobble|. It takes the two arguments
+%   for the directory entry and the page number and simply ignores them,
+%   regardless of the entry level. Therefore, this style does not require any
+%   options or initialization.
 %    \begin{macrocode}
 %<*gobble>
 %%%            (run: style,gobble)
@@ -1421,6 +1424,16 @@
 \DeclareTOCEntryStyle{tocline}[{%
 %</tocline>
 %    \end{macrocode}
+%   \changes{v3.46}{2025/08/13}{new option \opt{numberprefix}}
+%   \changes{v3.46}{2025/08/13}{new option \opt{numberpostfix}}
+%    \begin{macrocode}
+%<*tocline>
+  \DefineTOCEntryCommandOption{numberprefix}%
+    {scr at tso@}{@numberprefix}{number prefix definition}%
+  \DefineTOCEntryCommandOption{numberpostfix}%
+    {scr at tso@}{@numberpostfix}{number postfix definition}%
+%</tocline>
+%    \end{macrocode}
 % \changes{v3.31}{2020/06/09}{style \texttt{toctext} also provides option
 %   \opt{beforeskip}}
 %    \begin{macrocode}
@@ -1535,6 +1548,14 @@
     {scr at tso@}{@numwidth}{entry number width}%
 %</dottedtocline|undottedtocline|tocline>
 %    \end{macrocode}
+%   \changes{v3.46}{2025/08/13}{new default for option \opt{numberprefix}}
+%   \changes{v3.46}{2025/08/13}{new default for option \opt{numberpostfix}}
+%    \begin{macrocode}
+%<*tocline>
+  \ExpandArgs{c}\providecommand{scr at tso@#1 at numberprefix}{}%
+  \ExpandArgs{c}\providecommand{scr at tso@#1 at numberpostfix}{}%
+%</tocline>
+%    \end{macrocode}
 % Automatic setting of the numerical level of option \opt{level} resp. command
 % \cs{\meta{entry name}tocdepth} can be done either by increasing the parent
 % level number of a sub level, if the parent level has already be defined:
@@ -2036,6 +2057,7 @@
 %    \end{macrocode}
 % \changes{v3.27}{2019/07/08}{initialization of \opt{raggedentry}}
 % \changes{v3.27}{2019/07/08}{initialization of \opt{prepagenumber}}
+% \changes{v3.46}{2025/06/26}{initialization of \opt{pagenumberformat}}
 % With style |toctext| we have to initialize ragged or justified text and what
 % to print immediately before the page number (\opt{linefill} wouldn't have
 % been a suitable term).
@@ -2045,6 +2067,8 @@
   \csname Ifscr at tso@#1 at raggedright\endcsname[2]{##2}%
   \expandafter\providecommand%
   \csname scr at tso@#1 at prepagenumber\endcsname{\nobreakspace}%
+  \expandafter\providecommand%
+  \csname scr at tso@#1 at pagenumberformat\endcsname[1]{##1}%
 %</toctext>
 }]{%
 %    \end{macrocode}
@@ -2307,6 +2331,17 @@
       \null\nobreak\hskip -\leftskip
       {%
 %    \end{macrocode}
+% \changes{v3.46}{2025/08/13}{extending \cs{numberline at numberprefix}}
+% \changes{v3.46}{2025/08/13}{extending \cs{numberline at numberpostfix}}
+% Here we extend \cs{numberline at numberprefix} and
+% \cs{numberline at numberpostfix} to handle options \opt{numberprefix} and
+% \opt{numberpostfix}.
+%    \begin{macrocode}
+        \l at preto@macro\numberline at numberprefix
+          {\@nameuse{scr at tso@#1 at numberprefix}}%
+        \l at addto@macro\numberline at numberpostfix
+          {\@nameuse{scr at tso@#1 at numberpostfix}}%
+%    \end{macrocode}
 % Here we use a trick to detect the width of an eventually existing number
 % while printing it. For this it is a must to use the internal definition of
 % \cs{numberline}.

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %<identify>%%%            (run: identify)
 %<init>%%%            (run: init)
 %<options>%%%            (run: options)
@@ -29,9 +29,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
-  \filedate$Date: 2025-06-04 13:53:33 +0200 (Mi, 04. Jun 2025) $
+  \filedate$Date: 2025-06-14 11:11:13 +0200 (Sa, 14. Jun 2025) $
   \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
-  \filerevision$Revision: 4160 $
+  \filerevision$Revision: 4181 $
   \edef\reserved at a{%
     \noexpand\endgroup
     \noexpand\ProvidesFile{scrkernel-typearea.dtx}[%
@@ -1531,7 +1531,7 @@
 %
 %
 % \begin{command}{\SetDIVList}
-% \changes{v2.1a}{1994/10/28}{new}
+% \changes{v2.1a}{1994/10/28}{added}
 % \changes{v2.6}{2000/01/04}{\cs{ta at divlist} holds values for font sizes from 1\,pt}
 % \changes{v3.24}{2017/07/23}{deprecated}
 % The command is deprecated. Don't use it any longer.
@@ -2984,7 +2984,7 @@
 % \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}}
 % This macros will be needed when the paper size will be generated.
 % \begin{command}{\isopaper}
-% \changes{v2.5}{1997/06/17}{new}
+% \changes{v2.5}{1997/06/17}{added}
 % \changes{v2.95}{2002/12/03}{upper case letters are also allowed}
 % \changes{v3.23}{2017/02/22}{using \cs{ISO at PaperNameToSize}}
 % Because \cs{isopaper} is used inside the paper size detection by pattern
@@ -3019,7 +3019,7 @@
 %    \end{macrocode}
 % \pkg*{typearea} uses its own error message.
 % \begin{macro}{\scr at UnknownPaperSize@typearea}
-% \changes{v3.23}{2017/02/22}{new}
+% \changes{v3.23}{2017/02/22}{added}
 %    \begin{macrocode}
 \ProvideUnknownPaperSizeError{typearea}{%
   \PackageError{typearea}{%
@@ -3037,7 +3037,7 @@
 % \end{macro}^^A \scr at UnknownPaperSize@typearea
 % \end{command}^^A \isopaper
 % \begin{macro}{\scr at setpaperorientation}
-% \changes{v3.22}{2016/07/29}{new}
+% \changes{v3.22}{2016/07/29}{added}
 % Setup the paper orientation depending on \cs{if at landscape}.
 %    \begin{macrocode}
 \newcommand*\scr at setpaperorientation{%
@@ -3049,7 +3049,7 @@
 }
 %    \end{macrocode}
 % \begin{macro}{\scr at switchpapersizes}
-% \changes{v3.22}{2016/07/29}{new}
+% \changes{v3.22}{2016/07/29}{added}
 % Switches the two lengths \len{paperwidth} and \len{paperheight}.
 %    \begin{macrocode}
 \newcommand*\scr at switchpapersizes{%
@@ -3059,11 +3059,11 @@
 % \end{macro}^^A \scr at switchlength
 % \end{macro}^^A \scr at setpaperorientation
 % \begin{macro}{\iso at paper}
-% \changes{v2.95}{2002/12/03}{new}
+% \changes{v2.95}{2002/12/03}{added}
 % Similar to \cs{isopaper} but with only one argument for the base size and
 % the scale number.
 % \begin{macro}{\iso@@paper}
-% \changes{v2.95}{2002/12/03}{new}
+% \changes{v2.95}{2002/12/03}{added}
 % \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}}
 % The single argument is split into base size letter and scale number by
 % pattern matching.

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-version.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-version.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrkernel-version.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % ======================================================================
 % scrkernel-version.dtx
-% Copyright (c) Markus Kohm, 2002-2024
+% Copyright (c) Markus Kohm, 2002-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -18,7 +18,7 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 %
 % ATTENTION: In this file parts of the code and documentation are before the
 % driver. This must be, because this part of the code is needed by the driver
@@ -159,7 +159,7 @@
 % therefore the syntax or general structure of the line must not be changed!
 %    \begin{macrocode}
 %<*!v4>
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 %</!v4>
 %<v4>  \@nameuse{@CheckKOMAScriptVersion}{2022/10/25 v3.99 ALPHA KOMA-Script}%
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/koma-script/scrmain.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/scrmain.ins	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/scrmain.ins	2025-08-20 19:59:36 UTC (rev 76100)
@@ -1,6 +1,6 @@
 % ======================================================================
 % scrmain.ins
-% Copyright (c) Markus Kohm, 2002-2023
+% Copyright (c) Markus Kohm, 2002-2025
 %
 % This file is part of the LaTeX2e KOMA-Script bundle.
 %
@@ -18,7 +18,7 @@
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
 
-% $Id: scrmain.ins 4076 2023-07-31 13:38:10Z kohm $
+% $Id: scrmain.ins 4173 2025-06-13 20:46:20Z kohm $
 
 % ---------- KOMA-Script default docstrip declarations -----------------
 
@@ -91,6 +91,7 @@
   \file{scrbook.cls}{%
     \from{scrkernel-version.dtx}{class,book}%
     \from{scrkernel-basics.dtx}{class,load}%
+    \from{tocbasic.dtx}{class,load}%
     \from{scrkernel-listsof.dtx}{class,book,prepare}%
     \from{scrkernel-tocstyle.dtx}{class,book,prepare}%
     \from{scrkernel-sections.dtx}{class,book,prepare}%
@@ -140,6 +141,7 @@
   \file{scrreprt.cls}{%
     \from{scrkernel-version.dtx}{class,report}%
     \from{scrkernel-basics.dtx}{class,load}%
+    \from{tocbasic.dtx}{class,load}%
     \from{scrkernel-listsof.dtx}{class,report,prepare}%
     \from{scrkernel-tocstyle.dtx}{class,report,prepare}%
     \from{scrkernel-sections.dtx}{class,report,prepare}%
@@ -189,6 +191,7 @@
   \file{scrartcl.cls}{%
     \from{scrkernel-version.dtx}{class,article}%
     \from{scrkernel-basics.dtx}{class,load}%
+    \from{tocbasic.dtx}{class,load}%
     \from{scrkernel-listsof.dtx}{class,article,prepare}%
     \from{scrkernel-tocstyle.dtx}{class,article,prepare}%
     \from{scrkernel-sections.dtx}{class,article,prepare}%

Modified: trunk/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx	2025-08-20 19:59:36 UTC (rev 76100)
@@ -18,11 +18,12 @@
 %
 % This work consists of all files listed in MANIFEST.md.
 % ======================================================================
-%%% From File: $Id: tocbasic.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
 %<identify>%%%            (run: identify)
 %<prepare>%%%            (run: prepare)
 %<option>%%%            (run: option)
 %<execoption>%%%            (run: execoption)
+%<preparebody>%%%            (run: preparebody)
 %<body>%%%            (run: body)
 %<exit>%%%            (run: exit)
 %<*dtx>
@@ -29,9 +30,9 @@
 \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
 \begingroup
   \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
-  \filedate$Date: 2025-06-04 13:53:33 +0200 (Mi, 04. Jun 2025) $
+  \filedate$Date: 2025-06-25 15:06:22 +0200 (Mi, 25 Jun 2025) $
   \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
-  \filerevision$Revision: 4160 $
+  \filerevision$Revision: 4185 $
 \endgroup
 \ProvidesFile{tocbasic.dtx}[\filedate\space\filerevision\space
 %</dtx>
@@ -63,6 +64,7 @@
       \from{tocbasic.dtx}{package,prepare}%
       \from{tocbasic.dtx}{package,option}%
       \from{tocbasic.dtx}{package,execoption}%
+      \from{tocbasic.dtx}{package,preparebody}%
       \from{tocbasic.dtx}{package,body,deprecated}%
       \from{scrkernel-tocstyle.dtx}{package,body}%
       \from{scrkernel-tocstyle.dtx}{package,style,gobble}%
@@ -132,6 +134,7 @@
 % \label{sec:implementation}
 %
 %    \begin{macrocode}
+%<@@=tocbasic>
 %<*package>
 %    \end{macrocode}
 %
@@ -196,38 +199,54 @@
 % \changes{v3.42}{2023/09/08}{with old \LaTeX{} all options are unknown}
 %
 % \begin{option}{enablepatch,disablepatch}
-% \changes{v3.42}{2023/09/08}{new}
+% \changes{v3.42}{2023/09/08}{added}
 % From version 3.42 there a several optional patches executed while
 % |\begin{document}|. Every one of that patch can be enabled or disabled.
 % \ExplSyntaxOn
-% \begin{macro}{\@@_patch_all_bool,\@@_patch_starttoc_bool,\@@_patch_chapter_bool,
-%               \@@_patch_listoffigures_bool,\@@_patch_listoftables_bool}
+% \begin{macro}{\g_@@_patch_all_bool,\g_@@_patch_starttoc_bool,
+%               \g_@@_patch_chapter_bool,
+%               \g_@@_patch_listoffigures_bool,\g_@@_patch_listoftables_bool}
 % \ExplSyntaxOff
-% \changes{v3.42}{2023/09/08}{new}
+% \changes{v3.42}{2023/09/08}{added}
+% \changes{v3.46}{2025/06/10}{respecting l3 naming convention}
 % Enabling and disabling will be done using a boolean variable with default
 % |false| (disabled). The |all| patch is somehow different. In enables or
 % disables doing all patches. So |disablepatch=all| does not disable all
 % patches but disables to ignore the single patches.
 %    \begin{macrocode}
-%<@@=tocbasic>
 %<*option>
 \if at tocbasic@old at latex@found\else
   \ExplSyntaxOn
 
-  \bool_new:N \@@_patch_all_bool
-  \bool_new:N \@@_patch_starttoc_bool
-  \bool_new:N \@@_patch_chapter_bool
-  \bool_new:N \@@_patch_listoffigures_bool
-  \bool_new:N \@@_patch_listoftables_bool
+  \bool_new:N \g_@@_patch_all_bool
+  \bool_new:N \g_@@_patch_starttoc_bool
+  \bool_new:N \g_@@_patch_chapter_bool
+  \bool_new:c { g_@@_patch_chapter*_bool }
+  \bool_new:N \g_@@_patch_listoffigures_bool
+  \bool_new:N \g_@@_patch_listoftables_bool
 
 %    \end{macrocode}
 % \end{macro}
 % \ExplSyntaxOff
+% \ExplSyntaxOn
+% \begin{macro}{\g_@@_patch_caption_bool}
+%   \ExplSyntaxOff
+%   \changes{v3.46}{2025/06/10}{added}
+%   From version 3.46 the caption code of the \KOMAScript{} classes is
+%   (partially) redesigned and move to \pkg*{tocbasic}. But it is only
+%   activated with option \opt{enablepatch=caption}. The \KOMAScript{} classes
+%   load \pkg*{tocbasic} with this option. Nevertheless you can overwrite it
+%   an so get lost of all the extended caption features.
+%    \begin{macrocode}
+  \bool_new:N \g_@@_patch_caption_bool
+%    \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
 % The most simple part of the story is the definition of the two
 % options. Both allow a comma separated list of patches to set the
 % corresponding boolean value to |true| or |false|.
 %    \begin{macrocode}
-  \DeclareKeys
+  \keys_define:nn { tocbasic }
     {
       enablepatch  .code             = \@@_endisable_patch:nn {#1} \c_true_bool,
       enablepatch  .usage            = preamble,
@@ -241,7 +260,7 @@
 % \ExplSyntaxOn
 % \begin{macro}{\@@_endisable_patch:nn}
 % \ExplSyntaxOff
-% \changes{v3.42}{2023/09/08}{new}
+% \changes{v3.42}{2023/09/08}{added}
 % \changes{v3.43}{2024/10/22}{deprecated \cs{char\_uppercase:N} replaced by
 %   \cs{text\_uppercase:n}}
 % Switch the patch \#1 depending on argument \#2 or raise a warning for
@@ -262,9 +281,9 @@
     {
       \clist_map_inline:nn { #1 }
         {
-          \cs_if_exist:cTF { @@_patch_##1_bool }
+          \cs_if_exist:cTF { g_@@_patch_##1_bool }
             {
-              \bool_set_eq:cN { @@_patch_##1_bool } #2
+              \bool_set_eq:cN { g_@@_patch_##1_bool } #2
             }
             {
               \exp_args:Nnnx \msg_warning:nnnn { tocbasic } { unknown-patch }
@@ -308,18 +327,26 @@
 %    \end{macrocode}
 % The patches are:
 % \begin{description}
-% \item[\texttt{all}:] activate all other patches. The \texttt{chapter} patch
+% \item[\texttt{all}:]
+%   \changes{v3.46}{2025/06/13}{\opt{enablepath\quotechar=all} enables the
+%     caption patch, if \pkg*{caption} has not been loaded}
+%   activate all other patches. The \texttt{chapter} patch
 %   is not enabled for \KOMAScript{} classes. So if you want to use this patch
 %   with a \KOMAScript{} class\,---\,which usually will not make sense\,---\,,
 %   you have to use an explicit |enabelpatch=chapter|.
 %    \begin{macrocode}
-      \bool_if:NT \@@_patch_all_bool
+      \bool_if:NT \g_@@_patch_all_bool
         {
-          \bool_set_true:N \@@_patch_starttoc_bool
+          \bool_set_true:N \g_@@_patch_starttoc_bool
           \cs_if_exist:NF \KOMAClassName
-            { \bool_set_true:N \@@_patch_chapter_bool }
-          \bool_set_true:N \@@_patch_listoffigures_bool
-          \bool_set_true:N \@@_patch_listoftables_bool
+            {
+              \bool_set_true:N \g_@@_patch_chapter_bool
+              \bool_set_true:c { g_@@_patch_chapter*_bool }
+            }
+          \bool_set_true:N \g_@@_patch_listoffigures_bool
+          \bool_set_true:N \g_@@_patch_listoftables_bool
+          \IfPackageLoadedTF{ caption } { }
+            { \bool_set_true:N \g_@@_patch_caption_bool }
         }
 
 %    \end{macrocode}
@@ -329,29 +356,15 @@
 %   you are using an incompatible \cs{chapter} definition. This patch is
 %   potentially dangerous. So we raise at least a note and maybe a warning.
 %    \begin{macrocode}
-      \bool_if:NT \@@_patch_chapter_bool
+      \bool_if:NT \g_@@_patch_chapter_bool
         {
-          \cs_if_exist:NTF \KOMAClassName
-            {
-              \exp_args:Nnnx \msg_warn:nnnn { tocbasic } { dangerous-patch }
-                { \KOMAClassName } { chapter }
-            }
-            {
-              \exp_args:Nnnx \msg_note:nnnn { tocbasic } { dangerous-patch }
-                { } { chapter }
-            }
-          \hook_gput_code:nnn { cmd/@makechapterhead/before } { tocbasic }
-            {
-              \doforeachtocfile[float]{
-                \addtocontents{\@currext}{\protect\addvspace{10\p@}}
-              }
-            }
+          \@@_chapter_patch_code:
         }
 
 %    \end{macrocode}
 % \item[\texttt{starttoc}:] executes \cs{tocbasicautomode}
 %    \begin{macrocode}
-      \bool_if:NT \@@_patch_starttoc_bool \tocbasicautomode  
+      \bool_if:NT \g_@@_patch_starttoc_bool \tocbasicautomode  
 
 %    \end{macrocode}
 % \item[\texttt{listoffigures}] redefines \cs{listoffigures} to use
@@ -358,10 +371,9 @@
 %   \pkg*{tocbasic} (but without changing \cs{l at figure}, because
 %   \cs{DeclareTOCSTyleEntry} already has defaults for \texttt{figure}).
 %    \begin{macrocode}
-      \bool_if:NT \@@_patch_listoffigures_bool
+      \bool_if:NT \g_@@_patch_listoffigures_bool
         {
-          \renewcommand*{\listoffigures}{\listoftoc{\ext at figure}}%
-          \providecommand*{\listoflofname}{\listfigurename}%
+          \@@_listof_patch_code:n{figure}
         }
 
 %    \end{macrocode}
@@ -369,10 +381,9 @@
 %   \pkg*{tocbasic} (but without changing \cs{l at table}, because
 %   \cs{DeclareTOCSTyleEntry} already has defaults for \texttt{table}).
 %    \begin{macrocode}
-      \bool_if:NT \@@_patch_listoftables_bool
+      \bool_if:NT \g_@@_patch_listoftables_bool
         {
-          \renewcommand*{\listoftables}{\listoftoc{\ext at table}}%
-          \providecommand*{\listoflotname}{\listtablename}%
+          \@@_listof_patch_code:n{table}
         }
 
 %    \end{macrocode}
@@ -383,7 +394,6 @@
   \ExplSyntaxOff
 \fi
 %</body>
-%<@@=>
 %    \end{macrocode}
 % \end{option}
 % \ExplSyntaxOff
@@ -391,9 +401,9 @@
 %    \begin{macrocode}
 %<*execoption>
 \if at tocbasic@old at latex@found
-  \ProcessOptions
+  \ProcessOptions\relax
 \else
-  \ProcessKeyOptions
+  \ProcessKeyOptions[tocbasic]
 \fi
 %</execoption>
 %    \end{macrocode}
@@ -496,7 +506,7 @@
 % \end{command}^^A \ifattoclist,\Ifattoclist
 %
 % \begin{macro}{\tb at optowner}
-% \changes{v3.41}{2023/06/28}{new}
+% \changes{v3.41}{2023/06/28}{added}
 % Several of the following commands use an optional argument for the
 % owner. Almost always if the argument is not given but \cs{@currname} is not
 % empty \texttt{\cs{@currname}.\cs{@currext}} should be used. If the argument
@@ -531,6 +541,7 @@
 % second, mandatory argument is the extension of the toc-file. NOTE: An
 % empty first argument is not the same like omitting the first argument!
 %    \begin{macrocode}
+%<@@=>
 \NewDocumentCommand\addtotoclist{om}{%
   \edef\reserved at b{\tb at optowner{#1}}%
   \Ifattoclist{#2}{%
@@ -566,17 +577,8 @@
     }\reserved at a
   }%
 }
+%<@@=tocbasic>
 %    \end{macrocode}
-% \begin{macro}[noprint]{\@addtotoclist,\scr at addtotoclist,
-%                        \@@addtotoclist,\scr@@addtotoclist}
-% \changes{v1.0a}{2008/11/11}{\cs{@addtotoclist} renamed to
-%   \cs{scr at addtotoclist} because of package \pkg{flowfram}}
-% \changes{v1.0a}{2008/11/11}{\cs{@@addtotoclist} renamed to
-% \cs{scr@@addtotoclist} because of package \pkg{flowfram}}
-% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} replaced by
-%   \cs{Ifattoclist}}
-% \changes{v3.41}{2023/06/28}{removed}
-% \end{macro}
 % \end{command}
 %
 % \begin{command}{\owneroftoc}
@@ -629,9 +631,6 @@
   \expandafter\g at addto@macro\csname tb@\reserved at a @add at hook\endcsname
 }
 %    \end{macrocode}
-% \begin{macro}[noprint]{\@AtAddToTocList,\@@AtAddToTocList}
-% \changes{v3.41}{2023/06/28}{removed}
-% \end{macro}
 % \end{command}
 %
 % \begin{macro}{\tocbasic at extend@babel}
@@ -723,14 +722,6 @@
   \endgroup
 }
 %    \end{macrocode}
-% \begin{macro}[noprint]{\scr at removefromtoclist,\@removefromtoclist,
-%                        \scr@@removefromtoclist,\@@removefromtoclist}
-% \changes{v3.28}{2019/11/22}{\cs{@removefromtoclist} renamed to
-%   \cs{scr at removefromtoclist}}
-% \changes{v3.28}{2019/11/22}{\cs{@@removefromtoclist} renamed to
-%   \cs{scr at removefromtoclist}}
-% \changes{v3.41}{2023/06/28}{removed}
-% \end{macro}
 % \end{command}
 %
 % \begin{command}{\doforeachtocfile}
@@ -777,9 +768,6 @@
   \let\do\noexpand
 }
 %    \end{macrocode}
-% \begin{macro}[noprint]{\@doforeachtocfile,\@@doforeachtocfile}
-% \changes{v3.41}{2023/06/28}{removed}
-% \end{macro}
 % \end{command}
 % 
 % \begin{command}{\addtoeachtocfile}
@@ -799,10 +787,6 @@
 }
 %</body>
 %    \end{macrocode}
-% \begin{macro}[noprint]{\@addtoeachtocfile,\@@addtoeachtocfile}
-% \changes{v3.03b}{2009/06/08}{typo fix at usage of \cs{doforeachtocfile}}
-% \changes{v3.41}{2023/06/28}{removed}
-% \end{macro}
 % \end{command}
 %
 % \subsection{Adding entries into toc-files}
@@ -823,10 +807,6 @@
    \doforeachtocfile[{#1}]{\addcontentsline{\@currext}{#2}{#3}}%
 } 
 %    \end{macrocode}
-% \begin{macro}[noprint]{\@addcontentslinetoeachtocfile,
-%                        \@@addcontentslinetoeachtocfile}
-% \changes{v3.41}{2023/06/28}{removed}
-% \end{macro}
 % \end{command}
 % 
 % \begin{command}{\addxcontentsline}
@@ -891,16 +871,57 @@
 }
 %</body>
 %    \end{macrocode}
-% \begin{macro}[noprint]{\@addxcontentslinetoeachtocfile,
-%                        \@@addxcontentslinetoeachtocfile,
-%                        \@@@addxcontentslinetoeachtocfile,
-%                        \@@@@addxcontentslinetoeachtocfile}
-% \changes{v3.12}{2013/09/24}{added}
-% \changes{v3.41}{2023/06/28}{removed}
-% \end{macro}
 % \end{command}
 %
+% \ExplSyntaxOn
+% \begin{macro}{\@@_chapter_patch_code:,\tocbasic at chapter@skip}
+% \ExplSyntaxOff
+%   From version 3.42 \pkg*{tocbasic} provides the feature to patch
+%   \cs{@makechapterhead} to add a vertical space to every ToC of category
+%   \texttt{float}. From version 3.46 this is extended to also allow
+%   patching \cs{@makeschapterhead} and the code is moved to an internal
+%   macro. Patching of \cs{@makeschapterhead} is only supported as extension
+%   of \cs{@makechapterhead}.
+%    \begin{macrocode}
+%<*body>
+\if at tocbasic@old at latex@found\else
+  \ExplSyntaxOn
+  \cs_new:Npn \@@_chapter_patch_code:
+    {
+      \cs_if_exist:NTF \KOMAClassName
+        {
+          \exp_args:Nnnx \msg_warn:nnnn { tocbasic } { dangerous-patch }
+            { \KOMAClassName } { chapter }
+        }
+        {
+          \exp_args:Nnnx \msg_note:nnnn { tocbasic } { dangerous-patch }
+            { } { chapter }
+        }
+      \hook_gput_code:nnn { cmd/@makechapterhead/before } { tocbasic }
+        {
+          \doforeachtocfile[float]{
+            \addtocontents{\@currext}{\tocbasic at chapter@skip}
+          }
+        }
+      \bool_if:cT { g_@@_patch_chapter*_bool }
+        {
+          \hook_gput_code:nnn { cmd/@makeschapterhead/before } { tocbasic }
+            {
+              \doforeachtocfile[float]{
+                \addtocontents{\@currext}{\tocbasic at chapter@skip}
+              }
+            }
+        }
+      \ProvideDocumentCommand \tocbasic at chapter@skip { } { \addvspace{10\p@} }
+    }
+  \ExplSyntaxOff
+\fi
+%</body>
+%    \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
 %
+%
 % \subsection{Show list of toc-file}
 % \label{sec:showlistoftocfile}
 %
@@ -920,6 +941,7 @@
 % general hook wil be called, that's it.
 %    \begin{macrocode}
 %<*body>
+%<@@=>
 \newcommand*{\tocbasic at starttoc}[1]{%
   \begingroup
     \tocbasic at reentrant@warning
@@ -1020,6 +1042,7 @@
     \expandafter\g at addto@macro\csname tb@#1 at after@hook\endcsname{#2}%
   \fi
 }
+%<@@=tocbasic>
 %    \end{macrocode}
 % \end{command}^^A \BeforeStartingTOC,\AfterStartingTOC
 % \end{macro}^^A \tocbasic at starttoc
@@ -1083,14 +1106,40 @@
 % \end{macro}
 % \end{command}
 %
+% \ExplSyntaxOn
+% \begin{macro}{\@@_listof_patch_code:nn}
+% \ExplSyntaxOff
+% \changes{v3.46}{2025/06/10}{added}
+% Patch \cs{listof\#1} with extension \texttt{\#2} to use \cs{listoftoc}.
+%    \begin{macrocode}
+\if at tocbasic@old at latex@found\else
+  \ExplSyntaxOn
+  \cs_new:Nn \@@_listof_patch_code:n
+    {
+      \cs_set:cpn { listof#1s } { \exp_args:Nc \listoftoc { ext@#1  } }
+      \cs_if_exist:cF { listof \use:c { ext@#1 } name }
+        {
+          \cs_new:cpn { listof \use:c { ext@#1 } name }
+            { \use:c { list#1name } }
+        }
+    }
+  \ExplSyntaxOff
+\fi
+%    \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+%
 % \changes{v3.25}{2017/11/21}{\pkg{tocbibind} warning added}
+% \changes{v3.46}{2025/06/16}{revert to \cs{IfPackageLoadedTF} instead of
+%   \cs{IfPackageLoadedF} and \cs{IfPackageLoadedT}, because in \LaTeX{}
+%   2022-06-01 is only the first one available}
 % Using \pkg{tocbibind} and \pkg*{tocbasic} together can break features
 % either of \pkg{tocbibind} or \pkg*{tocbasic}.  Here we add at least a
 % warning:
 %    \begin{macrocode}
-\IfPackageLoadedF{tocbibind}{%
+\IfPackageLoadedTF{tocbibind}{}{%
   \AtBeginDocument{%
-    \IfPackageLoadedT{tocbibind}{%
+    \IfPackageLoadedTF{tocbibind}{%
       \PackageInfo{tocbasic}{usage of `tocbibind' detected}%
       \newcommand*{\tb at tocbibindpatch}[3]{%
         \long\def\reserved at a{\tocfile{#2}{#1} }%
@@ -1111,7 +1160,7 @@
       \tb at tocbibindpatch{toc}{\contentsname}{\tableofcontents}%
       \tb at tocbibindpatch{lof}{\listfigurename}{\listoffigures}%
       \tb at tocbibindpatch{lot}{\listtablename}{\listoftables}%
-    }%
+    }{}%
   }%
 }
 %    \end{macrocode}
@@ -1135,9 +1184,6 @@
   \doforeachtocfile[{#1}]{\listoftoc{\@currext}}%
 }
 %    \end{macrocode}
-% \begin{macro}[noprint]{\@listofeachtoc,\@@listofeachtoc}
-% \changes{v3.41}{2023/06/28}{removed}
-% \end{macro}
 % \end{command}
 %
 % \begin{macro}{\ext at toc}
@@ -1170,6 +1216,7 @@
 % Setting the headings of a list of something. The heading is the only
 % argument.
 %    \begin{macrocode}
+%<@@=>
 \newcommand*{\tocbasic at listhead}[1]{%
   \@ifundefined{tocbasic at listhead@\@currext}{%
     \scr at ifundefinedorrelax{chapter}{%
@@ -1277,6 +1324,7 @@
   \csname tb@\@currext @afterhead at hook\endcsname
   \csname tb@@afterhead at hook\endcsname
 }
+%<@@=tocbasic>
 %    \end{macrocode}
 % \begin{command}{\BeforeTOCHead,\AfterTOCHead}
 % \changes{v3.04b}{2010/01/05}{fix: define the hook if not already defined}
@@ -1446,7 +1494,7 @@
 % \end{command}
 %
 %
-% \subsection{High level interface for generating new ToCs and floats}
+% \subsection{High level interface for generating new ToCs and floats resp. nonfloats}
 % \label{sec:newfloats}
 %
 % \begin{command}{\DeclareNewTOC}
@@ -1762,6 +1810,7 @@
 % Earch entry of a TOC/list of is idented on the left side. This is the
 % amount of the indention of the text of the entry.
 %    \begin{macrocode}
+%<*deprecated>
     \DefineFamilyKey[.toc]{KOMAarg}{hang}{%
       \scr at ifundefinedorrelax{KV at KOMAarg.toc@tocnumwidth}{%
         \PackageWarning{tocbasic}{%
@@ -1779,6 +1828,7 @@
       }%
       \FamilyKeyStateProcessed
     }%
+%</deprecated>
     \scr at ifundefinedorrelax{KV at KOMAarg.toc@tocnumwidth}{}{%
       \l at addto@macro\tb at nt@tocstyle at options{,numwidth=1.5em}%
     }%
@@ -1789,6 +1839,7 @@
 % Earch entry of a TOC/list of is idented on the left side. This is the
 % amount of the indention of the number part.
 %    \begin{macrocode}
+%<*deprecated>
     \DefineFamilyKey[.toc]{KOMAarg}{indent}{%
       \scr at ifundefinedorrelax{KV at KOMAarg.toc@tocindent}{%
         \PackageWarning{tocbasic}{%
@@ -1806,6 +1857,7 @@
       }%
       \FamilyKeyStateProcessed
     }%
+%</deprecated>
     \scr at ifundefinedorrelax{KV at KOMAarg.toc@tocindent}{}{%
 %<trace>      \PackageInfo{tocbasic}{%
 %<trace>        TRACE \string\DeclareNewTOC[...]{#2}: set default indent 1em}%
@@ -1819,6 +1871,7 @@
 % Each entry to a TOC/list of has a numeric level. You may set up your own
 % level.
 %    \begin{macrocode}
+%<*deprecated>
     \DefineFamilyKey[.toc]{KOMAarg}{level}{%
       \PackageWarning{tocbasic}{%
         deprecated option `level'.\MessageBreak
@@ -1828,6 +1881,7 @@
       \l at addto@macro\tb at nt@tocstyle at options{,level={##1}}%
       \FamilyKeyStateProcessed
     }%
+%</deprecated>
 %    \end{macrocode}
 % \begin{macro}{\tb at nt@listname}
 % \changes{v3.18}{2015/06/20}{using \cs{def} instead of \cs{edef}}
@@ -1996,6 +2050,7 @@
 % The float environments:
 % \changes{v3.09a}{2011/05/30}{fixed: floats may have an optional argument}
 % \changes{v3.12}{2013/12/10}{fixed: usage of default placement}
+% \changes{v3.46}{2025/06/13}{keys definition added}
 %    \begin{macrocode}
   \iftb at nt@float
     \expandafter\newcommand\expandafter*\csname fps@\tb at nt@type\expandafter
@@ -2029,6 +2084,10 @@
           \noexpand\csname \tb at nt@type @atend\noexpand\endcsname
           \noexpand\end at dblfloat
         }%
+        \if at tocbasic@old at latex@found\else
+          \expandafter\noexpand\csname tocbasic_define_caption_keys:n\endcsname
+            {\tb at nt@type}%
+        \fi
       }%
     \@tempa
     \@tempswatrue
@@ -2049,6 +2108,10 @@
           \noexpand\csname \tb at nt@type @atend\noexpand\endcsname
           \noexpand\endminipage\noexpand\endtrivlist
         }%
+        \if at tocbasic@old at latex@found\else
+          \expandafter\noexpand\csname tocbasic_define_caption_keys:n\endcsname
+            {\tb at nt@type}%
+        \fi
       }%
     \@tempa
     \@tempswatrue
@@ -2180,7 +2243,462 @@
 % \end{macro}
 % \end{command}
 %
+% \subsection{Caption handling}
 %
+% \changes{v3.46}{2025/06/10}{\pkg*{tocbasic} handles captions}
+% From version 3.46 package \pkg*{tocbasic} not only supports but provides the
+% caption handling that was formerly part of the \KOMAScript{} classes. This
+% allows us also a (partial) redesign of the implementation. Nevertheless, we
+% try to keep it compatible. When package \pkg{caption} is loaded, most of the
+% features are delegated to that package.
+%
+% \ExplSyntaxOn
+% \begin{macro}{\g_@@__caption_above_bool}
+%   \ExplSyntaxOff
+%   \changes{v3.46}{2025/06/13}{added}
+%   The default formation for captions should above (instead of below) the
+%   content. This has to be predefined, because
+%   \cs{tocbasic\_define\_caption\_keys:n} does not automatically define
+%   it. The initial value is \optvalue{false}.
+%    \begin{macrocode}
+%<*option>
+\if at tocbasic@old at latex@found\else
+\ExplSyntaxOn
+\bool_new:N \g_@@__caption_above_bool
+%    \end{macrocode}
+% \end{macro}
+% \begin{command}{\tocbasic_define_caption_keys:n}
+%   \ExplSyntaxOff
+%   \changes{v3.46}{2025/06/13}{added}
+%   Allows to define the boolean looking choice options \opt{\#1captionabove}
+%   and \opt{\#1captionbelow} and the choice options \opt{\#1captionposition}
+%   with the three values \optvalue{top}, \optvalue{bottom} and
+%   \optvalue{default}. Value \optvalue{default} resets the caption position
+%   for \texttt{\#1} to the default caption position. If \texttt{\#1} is
+%   empty, the default value is not defined! The code not only respects
+%   package \pkg{caption} but actively supports its use. This is the main
+%   reason, why it cannot use real boolean options, but needs to simulate them
+%   using choice options. The code looks complicated because resetting the
+%   \pkg{caption} options for floats is different for \env{figures} and
+%   \env{tables} than for other floats. Also resetting \pkg{caption} options
+%   of single floats needs an extra command (at least after
+%   \verb|\begin{document}|).
+%    \begin{macrocode}
+\cs_new:Nn \tocbasic_define_caption_keys:n
+  {
+    \keys_if_exist:nnF { tocbasic } { #1captionabove }
+      {
+        \keys_define:nn { tocbasic }
+          {
+            #1captionabove .choice:,
+            #1captionabove / true .code:n       =
+              { \@@_set_caption_position_top_bottom:nn { #1 } { t } },
+            #1captionabove / false .code:n      =
+              { \@@_set_caption_position_top_bottom:nn { #1 } { b } },
+            #1captionabove / unknown .code:n    =
+              { \msg_error:nne { keys } { boolean-values-only } \l_keys_path_str },
+            #1captionabove .usage:n             = general,
+            #1captionabove .default:n           = true,
+            #1captionbelow .choice:,
+            #1captionbelow / true .code:n       =
+              { \@@_set_caption_position_top_bottom:nn { #1 } { b } },
+            #1captionbelow / false .code:n      =
+              { \@@_set_caption_position_top_bottom:nn { #1 } { t } },
+            #1captionbelow / unknown .code:n    =
+              { \msg_error:nne { keys } { boolean-values-only } \l_keys_path_str },
+            #1captionbelow .usage:n             = general,
+            #1captionbelow .default:n           = true,
+            #1captionposition .choice:,
+            #1captionposition / top .code:n     =
+              { \@@_set_caption_position_top_bottom:nn { #1 } { t } },
+            #1captionposition / bottom .code:n  =
+              { \@@_set_caption_position_top_bottom:nn { #1 } { b } },
+            #1captionposition .usage:n          = general,
+            #1captionposition .value_required:n = true,
+          }
+        \str_if_empty:nF { #1 }
+          {
+            \keys_define:nn { tocbasic }
+              {
+                #1captionposition / default .code:n =
+                  { \@@_set_caption_position_top_bottom:nn { #1 } { default } },
+                #1captionposition .initial:n = default
+              }
+          }
+        \cs_if_exist:NTF \captionsetup
+          {
+            \bool_if_exist:cTF { g_@@_ #1 _caption_above_bool }
+              {
+                \exp_last_unbraced:Ne \captionsetup
+                  {
+                    \str_if_empty:nF {#1} {[#1]}
+                    {
+                      #1position=
+                      { \bool_if:cTF { g_@@_ #1 _caption_above_bool } tb }
+                    }
+                  }
+              }
+              {
+                \tl_if_exist:cT { caption at opt@#1 }
+                  {
+                    \tl_if_empty:cF { caption at opt@#1 }
+                      { \clearcaptionsetup[position]{#1} }
+                  }
+              }  
+          }
+          {
+            \tl_if_eq:VnT \everypar { \@nodocument }
+              {
+                \str_if_in:nnTF { ,table,figure,, } { ,#1, }
+                  {
+                    \exp_args:Ne \PassOptionsToPackage
+                      {
+                        #1position=
+                        \bool_if_exist:cTF { g_@@_ #1 _caption_above_bool }
+                          { \bool_if:cTF { g_@@_ #1 _caption_above_bool } tb }
+                          { default }
+                      }
+                      { caption }
+                  }
+                  {  
+                    \hook_gput_code:nnn { package / caption / after } { tocbasic }
+                      {
+                        \bool_if_exist:cT { g_@@_ #1 _caption_above_bool }
+                          {
+                            \exp_last_unbraced:Ne \captionsetup
+                              {
+                                \str_if_empty:nF {#1} {[#1]}
+                                { position=\bool_if:cTF { g_@@_ #1 _caption_above_bool } tb }
+                              }
+                          }
+                      }
+                  }
+              }
+          }
+      }
+  }
+%    \end{macrocode}
+% \ExplSyntaxOn
+% \begin{macro}{\@@_set_caption_position_top_bottom:nn}
+%   \ExplSyntaxOff
+%   This is the helper to set option \opt{position} to top (\texttt{\#2=t}) or
+%   bottom (\texttt{\#2=b}). If \texttt{\#1} is not empty but the name of a
+%   float, it can also be \optvalue{default}. Most of the logic of the options
+%   and the \pkg{caption} support is here.
+%    \begin{macrocode}
+\cs_new:Nn \@@_set_caption_position_top_bottom:nn
+  { 
+    \str_if_eq:nnTF { #2 } { default }
+      {
+        \bool_if_exist:cT { g_@@_ #1 _caption_above_bool }
+          { \cs_undefine:c { g_@@_ #1 _caption_above_bool } }
+        \cs_if_exist:NTF \clearcaptionsetup
+          {
+            \tl_if_exist:cT { caption at opt@#1 }
+              {
+                \tl_if_empty:cF { caption at opt@#1 }
+                  { \clearcaptionsetup[position]{ #1 } }
+              }
+          }
+          {
+            \tl_if_eq:VnT \everypar { \@nodocument }
+              {
+                \str_if_in:nnT { ,table,figure,, } { ,#1, }
+                  {
+                    \PassOptionsToPackage { #1position=#2 } { caption }
+                  }
+              }
+          }
+      }
+      { 
+        \bool_if_exist:cF { g_@@_ #1 _caption_above_bool }
+          { \bool_new:c { g_@@_ #1 _caption_above_bool } }
+        \str_if_eq:nnTF { #2 } { t }
+          { \bool_set_true:c }
+          { \bool_set_false:c }
+          { g_@@_ #1 _caption_above_bool }
+        \cs_if_exist:NTF \captionsetup
+          {
+            \exp_last_unbraced:Ne \captionsetup
+              { \str_if_empty:nF {#1} {[#1]} }
+              { position=#2 }
+          }
+          {
+            \tl_if_eq:VnT \everypar { \@nodocument }
+              {
+                \str_if_in:nnT { ,table,figure,, } { ,#1, }
+                  {
+                    \PassOptionsToPackage { #1position=#2 } { caption }
+                  }
+              }
+          }
+      }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+% Now, we can initialize not only the option for the default caption position
+%    \begin{macrocode}
+\tocbasic_define_caption_keys:n {}
+%    \end{macrocode}
+% but also for usual floats like \env{table} and \env{figure}. Note, that the
+% captions of \env{lstlisting} are not configured here. If you want, you can
+% add such configuration using:
+% \begin{verbatim}
+%   \tocbasic_define_caption_keys:n { lstlisting }
+% \end{verbatim}
+%    \begin{macrocode}
+\clist_map_inline:nn { table, figure }
+  {
+    \bool_if:nT
+      {
+        { \cs_if_exist_p:c { #1 } && \cs_if_exist_p:c { end#1 } }
+        ||
+        { \cs_if_exist_p:c { #1- } && \cs_if_exist_p:c { end#1- } }
+      }
+      {
+        \tocbasic_define_caption_keys:n { #1 }
+      }
+  }
+
+\ExplSyntaxOff
+\fi  
+%</option>
+%    \end{macrocode}
+% \end{command}
+%
+% \ExplSyntaxOn
+% \begin{macro}{\@@_caption_patch_code:}
+% \ExplSyntaxOff
+%   \changes{v3.46}{2025/06/13}{added}
+%   Now we can define the patch code. Note, that the caption patch is not
+%   automatically activated if the \pkg{caption} package is detected. And if
+%   you manually activate it, you will get a warning.
+%    \begin{macrocode}
+%<*body>
+\if at tocbasic@old at latex@found\else
+\ExplSyntaxOn
+\hook_gput_code:nnn { begindocument } { tocbasic }
+  {
+    \cs_set_eq:NN \@@_saved_caption:w \caption
+    \bool_if:NT \g_@@_patch_caption_bool
+      {
+        \@@_caption_patch_code:
+      }
+  }
+\hook_gset_rule:nnnn { begindocument } { tocbasic } { after } { caption }
+\hook_gset_rule:nnnn { begindocument } { tocbasic } { after } { caption3 }
+
+\cs_new:Npn \@@_caption_patch_code:
+  {
+    \cs_set_eq:NN \caption \@@_caption:w
+    \cs_set_eq:NN \captionof \@@_caption_of:w
+  }
+%    \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOn
+% \begin{command}{\tocbasic_if_caption_above_p:n,
+%                 \tocbasic_if_caption_above:nT,
+%                 \tocbasic_if_caption_above:nF,
+%                 \tocbasic_if_caption_above:nTF,
+%                 \tocbasic_if_caption_above_p:,
+%                 \tocbasic_if_caption_above:T,
+%                 \tocbasic_if_caption_above:F,
+%                 \tocbasic_if_caption_above:TF}
+% \ExplSyntaxOff
+%    \begin{macrocode}
+\prg_new_conditional:Nnn \tocbasic_if_caption_above:n { p, T, F, TF }
+  {
+    \bool_if:nTF
+      {
+        \cs_if_exist_use:cF { g_@@_ #1 _caption_above_bool }
+          {
+            \g_@@__caption_above_bool
+          }
+      }
+      {
+        \prg_return_true:
+      }
+      {
+        \prg_return_false:
+      }
+  }
+\prg_new_conditional:Npnn \tocbasic_if_caption_above: { p, T, F, TF }
+  {
+    \bool_if:nTF
+      {
+        \cs_if_exist_use:cF { g_@@_ \@captype _caption_above_bool }
+          {
+            \g_@@__caption_above_bool
+          }
+      }
+      {
+        \prg_return_true:
+      }
+      {
+        \prg_return_false:
+      }
+  }
+%    \end{macrocode}
+% \end{command}
+% \ExplSyntaxOn
+% \begin{macro}{\@@_tocbasic_caption_setup:,\@@_tocbasic_captionof_setup:n}
+%   \ExplSyntaxOff
+%   \changes{v3.46}{2025/06/13}{added}
+%   Does all the setup needed before being able to call
+%   \cs{@@\_saved\_caption:w} either for a given caption type or
+%   \cs{@captype}. This should be used local only!
+%    \begin{macrocode}
+\cs_new:Nn \@@_tocbasic_caption_setup:
+  {
+    \tocbasic_if_caption_above:TF
+      {
+        \cs_if_exist:NTF \captionsetup
+          { \captionsetup { position=top } }
+          { \@@_swap_skip: }
+      }
+      {
+        \cs_if_exist:NT \captionsetup
+          { \captionsetup { position=bottom } }
+      }
+  }
+\cs_new:Nn \@@_tocbasic_captionof_setup:n
+  {
+    \tocbasic_if_caption_above:nTF { #1 }
+      {
+        \cs_if_exist:NTF \captionsetup
+          { \captionsetup { type=#1, position=top } }
+          {
+            \tl_set:Nn \@captype { #1 }
+            \@@_swap_skip:
+          }
+      }
+      {
+        \cs_if_exist:NTF \captionsetup
+          { \captionsetup { type=#1, position=bottom } }
+          { \tl_set:Nn \@captype { #1 } }
+      }
+  }  
+%    \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOn
+% \begin{macro}{\@@_caption:w}
+%   \ExplSyntaxOff
+%   \changes{v3.46}{2025/06/13}{added}
+%   This is, what will be \cs{caption}, if \cs{caption} is patched.
+%    \begin{macrocode}
+\NewDocumentCommand \@@_caption:w { s O{#3} m }
+  {
+    \group_begin:
+      \@@_tocbasic_caption_setup:
+      \exp_last_unbraced:Ne \@@_saved_caption:w { \IfBooleanT{#1}* }
+        [{#2}] {#3}
+    \group_end:
+  }
+%    \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+% \begin{command}{\captionabove,\captionbelow}
+%   \changes{v3.46}{2025/06/13}{new implementation moved to \pkg*{tocbasic}}
+%    \begin{macrocode}
+\NewDocumentCommand \captionabove { s O{#3} m }
+  {
+    \group_begin:
+      \cs_if_exist:NTF \captionsetup
+        { \captionsetup { position=top } }
+        { \@@_swap_skip: }
+      \exp_last_unbraced:Ne \@@_saved_caption:w { \IfBooleanT{#1}* }
+        [{#2}] {#3}
+    \group_end:
+  }
+
+\NewDocumentCommand \captionbelow { s O{#3} m }
+  {
+    \group_begin:
+      \cs_if_exist:NT \captionsetup
+        { \captionsetup { position=bottom } }
+      \exp_last_unbraced:Ne \@@_saved_caption:w { \IfBooleanT{#1}* }
+        [{#2}] {#3}
+    \group_end:
+  }
+%    \end{macrocode}
+% \end{command}
+% \ExplSyntaxOn
+% \begin{command}{\@@_caption_of:w,\captionof}
+% \ExplSyntaxOff
+%   \changes{v3.46}{2025/06/13}{added}
+%   This is, what will be \cs{captionof}, if \cs{captionof} is patched or not
+%   defined.
+%    \begin{macrocode}
+\NewDocumentCommand \@@_caption_of:w { s m O{#4} m }
+  {
+    \group_begin:
+      \@@_tocbasic_captionof_setup:n { #2 }
+      \exp_last_unbraced:Ne \@@_saved_caption:w { \IfBooleanT{#1}* } [{#3}] {#4}
+    \group_end:
+  }
+
+\cs_if_exist:NF { \captionof } { \cs_set_eq:NN \captionof \@@_caption_of:w }
+%    \end{macrocode}
+% \ExplSyntaxOn
+% \begin{macro}{\@@_swap_skips:}
+% \ExplSyntaxOff
+%   Helper to (locally) interchange the values of \cs{abovecaptionskip} and
+%   \cs{belowcaptionskip}. We also provide a socket (with older \LaTeX{}
+%   kernels a hook) to react on the swap.
+%    \begin{macrocode}
+\cs_if_exist:NTF \socket_new:nn
+  { \socket_new:nn { tocbasic / swapskip / after } { 0 } }
+  { \hook_new:n { tocbasic / swapskip / after } }
+\cs_new:Nn \@@_swap_skip:
+  {
+    \skip_set_eq:NN \l_tmpa_skip \abovecaptionskip
+    \skip_set_eq:NN \abovecaptionskip \belowcaptionskip
+    \skip_set_eq:NN \belowcaptionskip \l_tmpa_skip
+    \cs_if_exist_use:NF \socket_use:n \hook_use:n
+      { tocbasic / swapskip / after }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{command}
+% \ExplSyntaxOff
+% \begin{command}{\captionaboveof,\captionbelowof}
+%   \changes{v3.46}{2025/06/13}{new implementation moved to \pkg*{tocbasic}}
+%    \begin{macrocode}
+\NewDocumentCommand \captionaboveof { s m O{#4} m }
+  {
+    \group_begin:
+      \cs_if_exist:NTF \captionsetup
+        { \captionsetup { type=#2, position=top } }
+        {
+          \tl_set:Nn \@captype { #2 } 
+          \@@_swap_skip:
+        }
+      \exp_last_unbraced:Ne \@@_saved_caption:w { \IfBooleanT{#1}* }
+        [{#3}] {#4}
+    \group_end:
+  }
+
+\NewDocumentCommand \captionbelowof { s m O{#4} m }
+  {
+    \group_begin:
+      \cs_if_exist:NTF \captionsetup
+        { \captionsetup { type=#2, position=bottom } }
+        {
+          \tl_set:Nn \@captype { #2 } 
+        }
+      \exp_last_unbraced:Ne \@@_saved_caption:w { \IfBooleanT{#1}* }
+        [{#3}] {#4}
+    \group_end:
+  }
+\ExplSyntaxOff
+\fi  
+%<@@=>
+%</body>
+%    \end{macrocode}
+% \end{command}
+% \ExplSyntaxOff
+%
 % \begin{macrocode}
 %</package>
 %    \end{macrocode}
@@ -2187,11 +2705,20 @@
 %
 % \subsection{Loading the package}
 % Used at \KOMAScript{} packages and classes to load the package.
+% \changes{v3.46}{2025/06/13}{\KOMAScript{} classes need to load
+%   \pkg*{tocbasic} with option \opt{enablepatch\quotechar=caption}}
 %    \begin{macrocode}
 %<*load>
-\RequirePackage{tocbasic}[%
+\RequirePackage[enablepatch=caption]{tocbasic}[%
 %!KOMAScriptVersion
 ]
+%    \end{macrocode}
+% And do an early initialization of additional keys.
+%    \begin{macrocode}
+\ExplSyntaxOn
+\tocbasic_define_caption_keys:n { table }
+\tocbasic_define_caption_keys:n { figure }
+\ExplSyntaxOff
 %</load>
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/DIN.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/DIN.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/DIN.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
   DIN%
@@ -57,7 +57,7 @@
     Letter configuration option #1 Warning: #2%
   }%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \@ifundefined{scr at fromname@var}{%
   \LCOWarningNoLine{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/DIN5008A.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/DIN5008A.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/DIN5008A.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
  5008%
@@ -51,7 +51,7 @@
 \LoadLetterOption{%
   DINmtext%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \setplength{toaddrindent}{%
   5mm}

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/DIN5008B.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/DIN5008B.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/DIN5008B.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
  5008%
@@ -51,7 +51,7 @@
 \LoadLetterOption{%
   DIN%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \setplength{toaddrindent}{%
   5mm}

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/DINmtext.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/DINmtext.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/DINmtext.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
  DINmtext%
@@ -57,7 +57,7 @@
     Letter configuration option #1 Warning: #2%
   }%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \@ifundefined{scr at fromname@var}{%
   \LCOWarningNoLine{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/KOMAold.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/KOMAold.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/KOMAold.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -41,9 +41,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
   KOMAold%
@@ -58,7 +58,7 @@
     Letter configuration option #1 Warning: #2%
   }%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \@ifundefined{scr at fromname@var}{%
   \LCOWarningNoLine{%
@@ -196,7 +196,7 @@
   \@ObsoleteCommand{\subjectafteron}{subject=afteropening}}
 \def\subjectafteroff{%
   \@ObsoleteCommand{\subjectafteroff}{subject=beforeopening}}
-%%% From File: $Id: scrkernel-notepaper.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-notepaper.dtx 4191 2025-07-28 07:01:41Z kohm $
 %%%            (run: body)
 \def\setpresigskip{\setplength{sigbeforevskip}}
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/KakuLL.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/KakuLL.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/KakuLL.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,8 +40,8 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 %%% From File: $Id: japanlco.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: Kaku,LATE,LOW,head)
 \ProvidesFile{%
@@ -49,7 +49,7 @@
   L%
   L%
 }[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
 Japanese letter-class-option]
 \providecommand*\LCOWarningNoLine[2]{%
   \LCOWarning{#1}{#2\@gobble}%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/NF.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/NF.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/NF.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
   NF%
@@ -57,7 +57,7 @@
     Letter configuration option #1 Warning: #2%
   }%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \@ifundefined{scr at fromname@var}{%
   \LCOWarningNoLine{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/NipponEH.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/NipponEH.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/NipponEH.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,8 +40,8 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 %%% From File: $Id: japanlco.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: Ni,EARLY,HIGH,head)
 \ProvidesFile{%
@@ -49,7 +49,7 @@
   E%
   H%
 }[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
 Japanese letter-class-option]
 \providecommand*\LCOWarningNoLine[2]{%
   \LCOWarning{#1}{#2\@gobble}%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/NipponEL.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/NipponEL.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/NipponEL.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,8 +40,8 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 %%% From File: $Id: japanlco.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: Ni,EARLY,LOW,head)
 \ProvidesFile{%
@@ -49,7 +49,7 @@
   E%
   L%
 }[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
 Japanese letter-class-option]
 \providecommand*\LCOWarningNoLine[2]{%
   \LCOWarning{#1}{#2\@gobble}%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/NipponLH.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/NipponLH.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/NipponLH.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,8 +40,8 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 %%% From File: $Id: japanlco.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: Ni,LATE,HIGH,head)
 \ProvidesFile{%
@@ -49,7 +49,7 @@
   L%
   H%
 }[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
 Japanese letter-class-option]
 \providecommand*\LCOWarningNoLine[2]{%
   \LCOWarning{#1}{#2\@gobble}%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/NipponLL.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/NipponLL.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/NipponLL.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,8 +40,8 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 %%% From File: $Id: japanlco.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: Ni,LATE,LOW,head)
 \ProvidesFile{%
@@ -49,7 +49,7 @@
   L%
   L%
 }[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
 Japanese letter-class-option]
 \providecommand*\LCOWarningNoLine[2]{%
   \LCOWarning{#1}{#2\@gobble}%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/NipponRL.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/NipponRL.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/NipponRL.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,8 +40,8 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 %%% From File: $Id: japanlco.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: Ni,RIGHT,LOW,head)
 \ProvidesFile{%
@@ -49,7 +49,7 @@
   R%
   L%
 }[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
 Japanese letter-class-option]
 \providecommand*\LCOWarningNoLine[2]{%
   \LCOWarning{#1}{#2\@gobble}%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/SN.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/SN.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/SN.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
   SN%
@@ -57,7 +57,7 @@
     Letter configuration option #1 Warning: #2%
   }%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \@ifundefined{scr at fromname@var}{%
   \LCOWarningNoLine{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/SNleft.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/SNleft.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/SNleft.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
   SNleft%
@@ -57,7 +57,7 @@
     Letter configuration option #1 Warning: #2%
   }%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \@ifundefined{scr at fromname@var}{%
   \LCOWarningNoLine{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/UScommercial9.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/UScommercial9.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/UScommercial9.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
   UScommercial9
@@ -57,7 +57,7 @@
     Letter configuration option #1 Warning: #2%
   }%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \@ifundefined{scr at fromname@var}{%
   \LCOWarningNoLine{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/UScommercial9DW.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/UScommercial9DW.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/UScommercial9DW.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
   UScommercial9DW
@@ -57,7 +57,7 @@
     Letter configuration option #1 Warning: #2%
   }%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \@ifundefined{scr at fromname@var}{%
   \LCOWarningNoLine{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scraddr.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scraddr.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scraddr.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -39,7 +39,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scraddr.dtx 4104 2024-02-01 09:52:39Z kohm $
+%%% From File: $Id: scraddr.dtx 4181 2025-06-14 09:11:13Z kohm $
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
 \ProvidesPackage{scraddr}
               [2022/01/24 v1.1d KOMA-Script

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls	2025-08-20 19:59:36 UTC (rev 76100)
@@ -6,6 +6,7 @@
 %%
 %% scrkernel-version.dtx  (with options: `class,article')
 %% scrkernel-basics.dtx  (with options: `class,load')
+%% tocbasic.dtx  (with options: `class,load')
 %% scrkernel-listsof.dtx  (with options: `class,article,prepare')
 %% scrkernel-tocstyle.dtx  (with options: `class,article,prepare')
 %% scrkernel-sections.dtx  (with options: `class,article,prepare')
@@ -84,7 +85,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -109,7 +110,7 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at clsextension}{\@clsextension}
 \AtBeginDocument{%
   \let\scr at clsextension\@clsextension
@@ -121,17 +122,22 @@
   article%
 }
 \ProvidesClass{\KOMAClassName}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   document class (\ClassName)%
 ]
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: load)
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
-%%% From File: $Id: scrkernel-listsof.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
+\RequirePackage[enablepatch=caption]{tocbasic}[%
+  2025/08/19 v3.46 KOMA-Script
+]
+\ExplSyntaxOn
+\tocbasic_define_caption_keys:n { table }
+\tocbasic_define_caption_keys:n { figure }
+\ExplSyntaxOff
+%%% From File: $Id: scrkernel-listsof.dtx 4193 2025-08-12 14:24:39Z kohm $
 %%%            (run: prepare)
-\RequirePackage{tocbasic}[%
-  2025/06/04 v3.45 KOMA-Script
-]
 \addtotoclist[ToC]{toc}
 \Ifstr{\ext at toc}{toc}{}{%
   \expandafter\addtotoclist
@@ -138,9 +144,9 @@
   \expandafter[\expandafter T\expandafter o\expandafter C\expandafter ]%
   \expandafter{\ext at toc}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: prepare)
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: prepare)
 \newcommand*{\scr at dotchangeatdocument}[1]{%
   \ClassError{\KOMAClassName}{%
@@ -201,7 +207,7 @@
 \newcommand*{\size at subparagraph}{}
 \newcommand*{\scr at fnt@subparagraph}{\size at subparagraph}
 \newcommand*{\sectfont}{\normalcolor\maybesffamily\bfseries}
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: init)
 \newcommand*
   {\scr at compatibility}{\scr at v@last}
@@ -294,10 +300,11 @@
 \@namedef{scr at v@3.43}{34300}
 \@namedef{scr at v@3.44}{34400}
 \@namedef{scr at v@3.45}{34500}
-\@namedef{scr at v@last}{34500}
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+\@namedef{scr at v@3.46}{34600}
+\@namedef{scr at v@last}{34600}
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: init)
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: option)
 \newif\if at scr@emulatestandardclasses
 \let\scr at emulatestandardclassestrue\relax
@@ -453,7 +460,7 @@
 \DeclareOption{fleqn}{\input{fleqn.clo}}
 %%% From File: $Id: scrkernel-language.dtx 4140 2025-02-22 12:39:23Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
 \providecommand*\@ptsize{%
   11%
@@ -610,7 +617,7 @@
                            {sfdefaults}{\if at sfdefaults true\else false\fi}%
   \fi
 }
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: options)
 \KOMA at key{twoside}[true]{%
   \if at atdocument\else\PassOptionsToPackage{twoside=#1}{typearea}\fi%
@@ -940,9 +947,9 @@
 \KOMA at ifkey{abstract}{@abstrt}
 \KOMA at DeclareDeprecatedOption{abstracton}{abstract=true}
 \KOMA at DeclareDeprecatedOption{abstractoff}{abstract=false}
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: option)
 \KOMA at key{numbers}{%
   \KOMA at set@ncmdkey{numbers}{@tempa}{%
@@ -1286,12 +1293,19 @@
 \KOMA at DeclareDeprecatedOption{cleardoubleempty}{cleardoublepage=empty}
 \KOMA at DeclareDeprecatedOption{cleardoubleplain}{cleardoublepage=plain}
 \KOMA at DeclareDeprecatedOption{cleardoublestandard}{cleardoublepage=current}
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: option)
 \newif\if at captionabove\@captionabovefalse
-\newif\if at tablecaptionabove\@tablecaptionabovefalse
-\newif\if at figurecaptionabove\@figurecaptionabovefalse
 \newif\ifonelinecaptions\onelinecaptionstrue
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionSinglelinecheck{koma}{%
+    \ifonelinecaptions
+      \expandafter\@firstoftwo
+    \else
+      \expandafter\@secondoftwo
+    \fi}%
+  \SetCaptionDefault{singlelinecheck}{koma}%
+}
 \newcommand*{\scap at pos}{r}
 \newcommand*{\scap at valign}{b}
 \KOMA at key{captions}{%
@@ -1317,36 +1331,32 @@
   }{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed
     \ifcase \@tempa\relax % heading
-      \@tablecaptionabovetrue
-      \@figurecaptionabovetrue
-      \@captionabovetrue
+      \SetKeys[tocbasic]{captionabove}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{heading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{signature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{heading}%
-   \or % signature
-      \@tablecaptionabovefalse
-      \@figurecaptionabovefalse
-      \@captionabovefalse
+    \or % signature
+      \SetKeys[tocbasic]{captionbelow}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{heading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{signature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{signature}%
     \or % tableheading
-      \@tablecaptionabovetrue
+      \SetKeys[tocbasic]{tablecaptionabove}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tableheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tablesignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{tableheading}%
     \or % tablesignature
-      \@tablecaptionabovefalse
+      \SetKeys[tocbasic]{tablecaptionbelow}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tableheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tablesignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{tablesignature}%
     \or % figureheading
-      \@figurecaptionabovetrue
+      \SetKeys[tocbasic]{figurecaptionabove}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figureheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figuresignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{figureheading}%
     \or % figuresignature
-      \@figurecaptionabovefalse
+      \SetKeys[tocbasic]{figurecaptionbelow}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figureheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figuresignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{figuresignature}%
@@ -1410,8 +1420,6 @@
   \fi
 }
 \KOMA at kav@add{\KOMAClassFileName}{captions}{signature}
-\KOMA at kav@add{\KOMAClassFileName}{captions}{tablesignature}
-\KOMA at kav@add{\KOMAClassFileName}{captions}{figuresignature}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{oneline}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{rightbeside}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{bottombeside}
@@ -1492,7 +1500,7 @@
   \csname FN at mf@prepare\endcsname
   \ifhmode\spacefactor\@x at sf\fi
   \relax}
-%%% From File: $Id: scrkernel-listsof.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-listsof.dtx 4193 2025-08-12 14:24:39Z kohm $
 %%%            (run: option)
 \newif\if at tocleft
 \KOMA at key{toc}{%
@@ -1894,7 +1902,7 @@
 \KOMA at DeclareStandardOption{openbib}{bibliography=openstyle}
 \KOMA at DeclareDeprecatedOption{bibtotoc}{bibliography=totoc}
 \KOMA at DeclareDeprecatedOption{bibtotocnumbered}{bibliography=totocnumbered}
-%%% From File: $Id: scrkernel-index.dtx 4052 2023-05-05 11:41:51Z kohm $
+%%% From File: $Id: scrkernel-index.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
 \newcommand*{\idx@@heading}{%
   \ifidx at leveldown
@@ -2003,7 +2011,7 @@
 \KOMA at DeclareDeprecatedOption{idxtotoc}{index=totoc}
 %%% From File: $Id: scrkernel-listsandtabulars.dtx 4138 2025-02-10 13:55:51Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: execoption)
 \KOMAExecuteOptions{numbers=autoendperiod}
 %%% From File: $Id: scrkernel-miscellaneous.dtx 4094 2023-12-05 16:17:40Z kohm $
@@ -2013,7 +2021,7 @@
   headings=big%
 }
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: body)
 \AtBeginDocument{%
   \begingroup
@@ -2062,7 +2070,7 @@
     }%
   \endgroup
 }
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \newcommand*\scr at setlength[4]{%
   \expandafter\ifnum\scr at v@is at lt{3.12}\relax
@@ -2569,7 +2577,7 @@
         January\or February\or March\or April\or May\or June\or
         July\or August\or September\or October\or November\or December\fi
         \space\number\day, \number\year}%
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \let\@BCOR                =\relax
 \let\@@BCOR               =\relax
@@ -3171,10 +3179,10 @@
 \newcommand*\abstractname{Abstract}
 \providecaptionname{american,australian,british,canadian,english,newzealand,%
   UKenglish,ukenglish,USenglish,usenglish}\abstractname{Abstract}
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: body)
 \let\numberline\scr at numberline
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,part)
 \CloneTOCEntryStyle{tocline}{part}
 \TOCEntryStyleStartInitCode{part}{%
@@ -3188,7 +3196,7 @@
   \expandafter\providecommand\expandafter*%
   \csname scr at tso@#1 at beforeskip\endcsname{2.25em \@plus\p@}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,section)
 \CloneTOCEntryStyle{tocline}{section}
 \TOCEntryStyleStartInitCode{section}{%
@@ -3207,7 +3215,7 @@
   \expandafter\providecommand\expandafter*%
   \csname scr at tso@#1 at beforeskip\endcsname{1.0em \@plus\p@}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,subsection)
 \CloneTOCEntryStyle{tocline}{subsection}
 \TOCEntryStyleStartInitCode{subsection}{%
@@ -3214,10 +3222,10 @@
   \expandafter\providecommand%
   \csname scr at tso@#1 at linefill\endcsname{\TOCLineLeaderFill\relax}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,default)
 \CloneTOCEntryStyle{subsection}{default}
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: body)
 \BeforeClosingMainAux{%
   \if at autodot\if at filesw\immediate\write\@mainaux{%
@@ -3685,13 +3693,15 @@
   \scr at ifundefinedorrelax{NR at gettitle}{%
     \scr at ifundefinedorrelax{GetTitleString}{%
       \begingroup
-        \let\label\@gobble
-        \let\index\@gobble
-        \let\glossary\@gobble
+        \DeclareExpandableDocumentCommand{\label}{som}{}%
+        \DeclareExpandableDocumentCommand{\index}{som}{}%
+        \DeclareExpandableDocumentCommand{\glossary}{som}{}%
+        \DeclareExpandableDocumentCommand{\zlabel}{som}{}%
         \scr at ifundefinedorrelax{UseHook}{}{%
           \UseHook{\KOMAClassName/option/section/reference/fallback}%
         }%
-        \protected at edef\@currentlabelname{#1}%
+        \let\protect\noexpand
+        \edef\@currentlabelname{\expandafter\detokenize{#1}}%
       \expandafter\expandafter\expandafter\endgroup
       \expandafter\def\expandafter\@currentlabelname\expandafter{%
         \@currentlabelname}%
@@ -5628,7 +5638,7 @@
 \providecommand{\@mkdouble}[1]{%
   \@mkboth{#1}{#1}%
 }
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \newlength{\abovecaptionskip}
 \newlength{\belowcaptionskip}
@@ -5635,10 +5645,10 @@
 \setlength{\abovecaptionskip}{10\p@}
 \setlength{\belowcaptionskip}{0\p@}
 \newcommand*{\captionformat}{:\ }
-\newcommand{\scr at caption}{}
-\AtBeginDocument{\let\scr at caption\caption}
-\newcommand{\captionabove}{\@captionabovetrue\scr at caption}
-\newcommand{\captionbelow}{\@captionabovefalse\scr at caption}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionLabelSeparator{koma}{\captionformat}%
+  \SetCaptionDefault{labelseparator}{koma}%
+}
 \newcommand*{\scap at caption}{}
 \newcommand*{\scap at width}{\linewidth}
 \newcommand*{\scap at move}{\z@}
@@ -5761,26 +5771,42 @@
 \newcommand*\caplabelfont{\normalfont\normalcolor}
 \newcommand*{\scr at fnt@caption}{\capfont}
 \newcommand*{\scr at fnt@captionlabel}{\caplabelfont}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionFont{scr at font}{\scr at fnt@caption}%
+  \DeclareCaptionFont{scr at labelfont}{\scr at fnt@captionlabel}%
+  \SetCaptionDefault{font}{scr at font}%
+  \SetCaptionDefault{labelfont}{scr at labelfont}%
+}
 \newif\ifdofullc at p
 \dofullc at ptrue
 \newif\if at capbreak
 \@capbreakfalse
-\newcommand*{\setcapindent}{\kernel at ifstar{\@@setcapindent}{\@setcapindent}}
-\newcommand*{\@setcapindent}[1]{%
-  \setlength{\@tempdima}{#1}%
-  \ifdim\@tempdima>\hsize
-    \addtolength{\@tempdima}{-\hsize}\@capbreaktrue
-  \else
-    \@capbreakfalse
-  \fi
-  \edef\cap at indent{\the\@tempdima}%
-  \dofullc at pfalse
-}
-\newcommand*{\@@setcapindent}[1]{%
-  \setlength{\@tempdima}{#1}%
-  \edef\cap at indent{\the\@tempdima}%
-  \dofullc at pfalse\@capbreaktrue
-}
+\ExplSyntaxOn
+\NewDocumentCommand { \setcapindent } { s m }
+  {
+    \IfBooleanTF {#1}
+      {
+        \cs_set:Npe \cap at indent { \dim_eval:n { #2 } }
+        \@capbreaktrue
+      }
+      {
+        \cs_set:Npe \cap at indent { \dim_eval:n { #2 } }
+        \@capbreakfalse
+      }
+    \dofullc at pfalse
+    \__scrkernel_at_caption_package:n
+      {
+        \exp_args:No \msg_warning:nnee { \KOMAClassName }
+          { using-caption }
+          { \token_to_str:N\setcapindent\IfBooleanT{#1}*{#2} }
+          {
+            \token_to_str:N \captionsetup
+              { indent=\ifdim\cap at indent<\z@\z@\else\cap at indent\fi }
+          }
+        \captionsetup { indent=\ifdim\cap at indent<\z@\z@\else\cap at indent\fi }
+      }
+  }
+\ExplSyntaxOff
 \newcommand*{\setcaphanging}{\dofullc at ptrue\@capbreakfalse}
 \expandafter\ifnum\scr at v@is at ge{3.41}%
   \newcommand*{\captionnopagebreak}{\nopagebreak}
@@ -5787,229 +5813,220 @@
 \else
   \newcommand*{\captionnopagebreak}{}
 \fi
+\newcommand*{\@abovecaptionbreak}{}
+\newcommand*{\@belowcaptionbreak}{}
+\let\@belowcaptionbreak\captionnopagebreak
+\IfFormatAtLeastTF{2023/11/01}{%
+  \NewSocketPlug{tocbasic/swapskip/after}{swapbreak}{%
+    \let\@abovecaptionbreak\captionnopagebreak
+    \let\@belowcaptionbreak\relax
+  }%
+  \AssignSocketPlug{tocbasic/swapskip/after}{swapbreak}%
+}{%
+  \AddToHook{tocbasic/swapskip/after}{&
+    \let\@abovecaptionbreak\captionnopagebreak
+    \let\@belowcaptionbreak\relax
+  }%
+}
 \newcommand{\@makecaption}[2]{%
-  \if at captionabove
-    \vskip\belowcaptionskip
-  \else
-    \captionnopagebreak\vskip\abovecaptionskip\captionnopagebreak
-  \fi
+  \@abovecaptionbreak\vskip\abovecaptionskip\@abovecaptionbreak
   \@@makecaption\@firstofone{#1}{#2}%
-  \if at captionabove
-    \captionnopagebreak\vskip\abovecaptionskip\captionnopagebreak
-  \else
-    \vskip\belowcaptionskip
-  \fi
+  \@belowcaptionbreak\vskip\belowcaptionskip\@belowcaptionbreak
 }
 \newcommand*{\cap at width}{\hsize}
 \newcommand*{\cap at left}{\hfill}
 \newcommand*{\cap at right}{\hfill}
-\newcommand*{\setcapwidth}[2][]{%
-  \begingroup%
-    \setlength{\@tempdima}{#2}%
-    \ifdim\@tempdima <\z@
-      \@tempdima\z@
-      \ClassWarning{\KOMAClassName}{%
-        caption width less than 0pt not allowed.\MessageBreak
-        Setting caption width to 0pt%
-      }%
-    \fi
-    \edef\@tempa{\endgroup\def\noexpand\cap at width{\the\@tempdima}}%
-  \@tempa
-  \begingroup
-    \edef\@tempa{#1}%
-    \def\@tempb{c}\ifx\@tempa\@tempb
-      \endgroup
-      \def\cap at margin{\let\cap at left=\hfill\let\cap at right=\hfill}%
-    \else
-      \def\@tempb{l}\ifx\@tempa\@tempb
-        \endgroup
-        \def\cap at margin{\let\cap at left=\relax\let\cap at right\hfill}%
-      \else
-        \def\@tempb{r}\ifx\@tempa\@tempb
-          \endgroup
-          \def\cap at margin{\let\cap at left=\hfill\let\cap at right=\relax}%
-        \else
-          \def\@tempb{i}\ifx\@tempa\@tempb
-            \endgroup
-            \def\cap at margin{%
-              \let\cap at left=\relax
-              \let\cap at right=\hfill
-              \if at twoside
-                \Ifthispageodd{}{%
-                  \let\cap at left=\hfill
-                  \let\cap at right=\relax
-                }%
-              \fi
-            }%
-          \else
-            \def\@tempb{o}\ifx\@tempa\@tempb
-              \endgroup
-              \def\cap at margin{%
-                \let\cap at left=\hfill
-                \let\cap at right=\relax
-                \if at twoside
-                  \Ifthispageodd{}{%
-                    \let\cap at left=\relax
-                    \let\cap at right=\hfill
-                  }%
-                \fi
-              }%
+\ExplSyntaxOn
+\prop_put:Non \g_msg_module_type_prop { \KOMAClassName } { Class }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { minimum-value-needed }
+  {
+    You've~tried~#2~\msg_line_context:,~
+    but~values~less~than~#1~are~not~allowed.~
+    Using~#1~instead.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { caption-not-support-setcapwidth-option }
+  {
+    Ignoring~command~
+    \token_to_str:N \setcapwidth [#1]{...}\\
+    because~the~caption~package~is~being\\
+    used~\msg_line_context:.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { caption-not-support-setcapdynwidth }
+  {
+    Ignoring~\token_to_str:N \setcapdynwidth \c_space_token
+    because~the~caption~package~is~being~used~\msg_line_context:.
+  }
+\exp_args:No \msg_new:nnnn { \KOMAClassName }
+  { setcaption-unknown-option }
+  { unknown~optional~position~argument~[#1]~\msg_line_context: }
+  {
+    Only~ONE~of~c,~l,~r,~i,~o~is~allowed~as~optional~argument~to~
+    \token_to_str:N \setcapwidth \c_space_tl and~
+    \token_to_str:N \setcapdynwidth \c_space_tl \msg_line_context:.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { using-caption }
+  {
+    Mapping~of\\
+    \c_space_tl #1\\
+    to\\
+    \c_space_tl #2\\
+    because~the~caption~package~is~being~used.\\
+    When~using~the~caption~package,~it~is~recommended\\
+    to~use~the~options~of~this~package~directly~instead\\
+    of~the~KOMA-Script~setting~\msg_line_context:.
+  }
+\NewDocumentCommand { \setcapwidth } { om }
+  {
+    \dim_compare:nNnTF { #2 } < { \c_zero_dim }
+      {
+        \exp_args:No \msg_warning:nnne { \KOMAClassName }
+          { minimum-value-needed } { 0pt } { \dim_eval:n { #2 } }
+        \def\cap at width{0pt}
+      }
+      {
+        \cs_set:Npe \cap at width { \dim_eval:n { #2 } }
+      }
+    \IfPackageLoadedF { caption } { \__scrkernel_set_cap_left_right:n { #1 } }
+    \__scrkernel_at_caption_package:n
+      {
+        \IfValueTF { #1 }
+          {
+            \exp_args:No \msg_warning:nne { \KOMAClassName }
+              { caption-not-support-setcapwidth-option } { #1 }
+          }
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapwidth{#2} }
+              { \token_to_str:N \captionsetup { width=\cap at width } }
+            \captionsetup { width=\cap at width }
+          }
+      }
+  }
+\cs_new:Nn \__scrkernel_at_caption_package:n
+  {
+    \IfPackageLoadedTF { caption3 }
+      {
+        \cs_if_eq:NNTF \AtCaptionPackage \@notprerr
+          { #1 }
+          { \AtCaptionPackage { #1 } }
+      }
+      {
+        \hook_gput_code:nnn { pkg / caption3 / after } { \KOMAClassName }
+          { \AtCaptionPackage { #1 } }
+      }
+  }
+\__scrkernel_at_caption_package:n
+  {
+    \cs_set:Nn \__scrkernel_at_caption_package:n { ##1 }
+  }
+\cs_new:Nn \__scrkernel_set_cap_left_right:n
+  {
+    \str_case:enF { #1 }
+      {
+        { c } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \hfill } }
+        { l } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \relax
+                                          \cs_set_eq:NN \cap at right \hfill } }
+        { r } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \relax } }
+        { i } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \relax
+                                          \cs_set_eq:NN \cap at right \hfill
+                                          \if at twoside
+                                            \Ifthispageodd {} {
+                                              \cs_set_eq:NN \cap at left  \hfill
+                                              \cs_set_eq:NN \cap at right \relax
+                                            }
+                                          \fi } }
+        { o } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \relax
+                                          \if at twoside
+                                            \Ifthispageodd {
+                                              \cs_set_eq:NN \cap at left  \relax
+                                              \cs_set_eq:NN \cap at right \hfill
+                                            } { }
+                                          \fi } }
+      }
+      {
+        \IfValueT{ #1 }
+          {
+            \exp_args:No \msg_error:nnn { \KOMAClassName }
+              { setcaption-unknown-option } { #1 }
+          }
+      }
+  }
+\NewDocumentCommand { \setcapdynwidth } { om }
+  {
+    \IfPackageLoadedTF { caption }
+      {
+        \exp_args:No \msg_warning:nn { \KOMAClassName }
+          { caption-not-support-setcapdynwidth }
+      }
+      {
+        \cs_set:Npn \cap at width { #2 }
+        \__scrkernel_set_cap_left_right:n { #1 }
+      }
+  }
+\ExplSyntaxOff
+\newcommand*{\cap at margin}{}
+\let\cap at margin=\relax%
+\ExplSyntaxOn
+\NewDocumentCommand {\setcapmargin} { s O{#3} m }
+  {
+    \IfBooleanTF {#1}
+      {
+        \cs_set:Npn \cap at margin
+          {
+            \onelinecaptionsfalse
+            \cs_set:Npe \cap at width { \dim_eval:n { \hsize - #2 - #3 } }
+            \if at twoside
+              \Ifthispageodd
+                {
+                  \cs_set:Npn \cap at left  { \hspace*{#2} }
+                  \cs_set:Npn \cap at right { \hspace*{#3} }
+                }
+                {
+                  \cs_set:Npn \cap at left  { \hspace*{#3} }
+                  \cs_set:Npn \cap at right { \hspace*{#2} }
+                }
             \else
-              \ifx \@tempa\@empty\else
-                \ClassError{\KOMAClassName}{%
-                  unknown optional position argument%
-                }{%
-                  You've used `#1' as position argument at
-                  \string\setcaptionwidth,\MessageBreak
-                  but only ONE of `c', `l', `r', `i`, `o` ist
-                  allowed.\MessageBreak
-                  Argument will be ignored, if you'll continue.%
-                }%
-              \fi
-              \endgroup
-  \fi\fi\fi\fi\fi
-}
-\newcommand*{\setcapdynwidth}[2][]{%
-  \def\cap at width{#2}%
-  \begingroup
-    \edef\@tempa{#1}%
-    \def\@tempb{c}\ifx\@tempa\@tempb
-      \endgroup
-      \def\cap at margin{%
-        \ifdim \cap at width<\z@
-          \ClassWarning{\KOMAClassName}{%
-            caption width less than 0pt not allowed.\MessageBreak
-            Setting caption width to 0pt%
-          }%
-          \let\cap at width\z@
-        \fi
-        \let\cap at left=\hfill\let\cap at right=\hfill}%
-    \else
-      \def\@tempb{l}\ifx\@tempa\@tempb
-        \endgroup
-        \def\cap at margin{%
-          \ifdim \cap at width<\z@
-            \ClassWarning{\KOMAClassName}{%
-              caption width less than 0pt not allowed.\MessageBreak
-              Setting caption width to 0pt%
-            }%
-            \let\cap at width\z@
-          \fi
-          \let\cap at left=\relax\let\cap at right\hfill}%
-      \else
-        \def\@tempb{r}\ifx\@tempa\@tempb
-          \endgroup
-          \def\cap at margin{%
-            \ifdim \cap at width<\z@
-              \ClassWarning{\KOMAClassName}{%
-                caption width less than 0pt not allowed.\MessageBreak
-                Setting caption width to 0pt%
-              }%
-              \let\cap at width\z@
+              \cs_set:Npn \cap at left  { \hspace*{#2} }
+              \cs_set:Npn \cap at right { \hspace*{#3} }
             \fi
-            \let\cap at left=\hfill\let\cap at right=\relax}%
-        \else
-          \def\@tempb{i}\ifx\@tempa\@tempb
-            \endgroup
-            \def\cap at margin{%
-              \ifdim \cap at width<\z@
-                \ClassWarning{\KOMAClassName}{%
-                  caption width less than 0pt not allowed.\MessageBreak
-                  Setting caption width to 0pt%
-                }%
-                \let\cap at width\z@
-              \fi
-              \let\cap at left=\relax
-              \let\cap at right=\hfill
-              \if at twoside
-                \Ifthispageodd{}{%
-                  \let\cap at left=\hfill
-                  \let\cap at right=\relax
-                }%
-              \fi
-            }%
-          \else
-            \def\@tempb{o}\ifx\@tempa\@tempb
-              \endgroup
-              \def\cap at margin{%
-                \ifdim \cap at width<\z@
-                  \ClassWarning{\KOMAClassName}{%
-                    caption width less than 0pt not allowed.\MessageBreak
-                    Setting caption width to 0pt%
-                  }%
-                  \let\cap at width\z@
-                \fi
-                \let\cap at left=\hfill
-                \let\cap at right=\relax
-                \if at twoside
-                  \Ifthispageodd{}{%
-                    \let\cap at left=\relax
-                    \let\cap at right=\hfill
-                  }%
-                \fi
-              }%
-            \else
-              \ifx \@tempa\@empty\else
-                \ClassError{\KOMAClassName}{%
-                  unknown optional position argument%
-                }{%
-                  You've used `#1' as position argument at
-                  \string\setcaptionwidth,\MessageBreak
-                  but only ONE of `c', `l', `r', `i`, `o` ist
-                  allowed.\MessageBreak
-                  Argument will be ignored, if you'll continue.%
-                }%
-              \fi
-              \endgroup
-  \fi\fi\fi\fi\fi
-}
-\newcommand*{\cap at margin}{}
-\let\cap at margin=\relax%
-\newcommand*{\setcapmargin}{\kernel at ifstar{\@setcapmargin}{\@@setcapmargin}}
-\newcommand*{\@setcapmargin}[2][\@tempdimb]{%
-  \def\cap at margin{%
-    \onelinecaptionsfalse
-    \begingroup
-      \setlength{\@tempdima}{\hsize}%
-      \setlength{\@tempdimb}{#2}%
-      \addtolength{\@tempdima}{-\@tempdimb}%
-      \setlength{\@tempdimc}{#1}%
-      \addtolength{\@tempdima}{-\@tempdimc}%
-      \edef\@tempa{\endgroup
-        \def\noexpand\cap at width{\the\@tempdima}%
-        \noexpand\if at twoside
-          \noexpand\Ifthispageodd{%
-            \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-            \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-          }{%
-            \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimc}}%
-            \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimb}}%
-          }%
-        \noexpand\else
-          \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-          \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-        \noexpand\fi
-      }%
-    \@tempa
-  }%
-}
-\newcommand*{\@@setcapmargin}[2][\@tempdimb]{%
-  \def\cap at margin{%
-    \onelinecaptionsfalse
-    \begingroup
-      \setlength{\@tempdima}{\hsize}%
-      \setlength{\@tempdimb}{#2}%
-      \addtolength{\@tempdima}{-\@tempdimb}%
-      \setlength{\@tempdimc}{#1}%
-      \addtolength{\@tempdima}{-\@tempdimc}%
-      \edef\@tempa{\endgroup
-        \def\noexpand\cap at width{\the\@tempdima}%
-        \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-        \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-      }%
-    \@tempa
-  }%
-}
+          }
+        \__scrkernel_at_caption_package:n
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapmargin*[#2]{#3} }
+              { \token_to_str:N \captionsetup { twoside, slc=0, margin={#2,#3} } }
+            \captionsetup{ twoside, slc=0, margin={#2,#3} }
+          }
+      }
+      {
+        \cs_set:Npn \cap at margin
+          {
+            \onelinecaptionsfalse
+            \cs_set:Npe \cap at width { \dim_eval:n { \hsize - #2 - #3 } }
+            \cs_set:Npn \cap at left  { \hspace*{#2} }
+            \cs_set:Npn \cap at right { \hspace*{#3} }
+          }
+        \__scrkernel_at_caption_package:n
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapmargin[#2]{#3} }
+              { \token_to_str:N \captionsetup { oneside, slc=0, margin={#2,#3} } }
+            \captionsetup{oneside,slc=0,margin={#2,#3}}
+          }
+      }
+  }
+\ExplSyntaxOff
+\NewHook{\KOMAClassName/makecaption/deactivate}
 \newcommand{\@@makecaption}[3]{%
   \cap at margin
   \begingroup
@@ -6016,9 +6033,12 @@
     \ifonelinecaptions
       \def\stepcounter##1{\advance\value{##1}\@ne}%
       \let\refstepcounter\stepcounter
-      \let\label\@gobble
+      \let\label\@gobble at om
+      \let\index\@gobble at som
+      \let\glossary\@gobble at om
       \let\@footnotetext=\@gobble
       \let\hypertarget\@gobbletwo
+      \UseHook{\KOMAClassName/makecaption/deactivate}%
       \edef\@xnewline{%
         \unexpanded{\ClassInfo{\KOMAClassName}{%
             Workaround for not recommended usage of \string\\ or\MessageBreak
@@ -6277,6 +6297,24 @@
   \endgroup
 }
 \newcommand*\raggedcaption{}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionFormat{koma}[#1#2#3\par]{%
+    \ifdofullc at p
+      \caption at useformat{hang}{#1}{#2}{#3}%
+    \else
+      #1#2%
+      \ifdim\cap at indent<\z@
+        \par
+        \noindent\hspace*{-\cap at indent}%
+      \else\if at capbreak
+        \par
+      \fi\fi
+      #3\par
+    \fi}%
+  \SetCaptionDefault{format}{koma}
+  \DeclareCaptionLabelFormat{koma}{\bothIfFirst{#1}{\nobreakspace}#2\autodot}
+  \SetCaptionFallback{labelformat}{koma}
+}
 \newcommand*{\scr at caption@before at longtable@warning}[1]{%
   \ClassWarning{\KOMAClassName}{%
     you've loaded package `#1' before package\MessageBreak
@@ -6293,23 +6331,12 @@
 \AfterPackage{longtable}{%
   \if at komalongtable
     \renewcommand{\LT at makecaption}[3]{%
-      \noalign{%
-        \if at captionabove
-          \vskip\belowcaptionskip
-        \else
-          \vskip\abovecaptionskip
-        \fi
-      }%
       \LT at mcol\LT at cols c{%
         \hbox to\z@{\hss\parbox[t]\linewidth{%
-            \def\@captype{table}%
+            \if at captionabove\else\vskip\belowcaptionskip\fi
             \@@makecaption{#1}{#2}{#3}%
             \endgraf
-            \if at captionabove
-              \vskip\abovecaptionskip
-            \else
-              \vskip\belowcaptionskip
-            \fi
+            \if at captionabove\vskip\abovecaptionskip\fi
           }%
           \hss
         }%
@@ -6318,16 +6345,16 @@
     \newcommand*{\scr at LT@array}{}%
     \let\scr at LT@array=\LT at array
     \renewcommand*{\LT at array}{%
-      \let\scr at caption=\LT at caption
+      \def\@captype{table}%
+      \@ifundefined{LTcaptype}{}{%
+        \Ifstr{\LTcaptype}{}{}{\let\@captype\LTcaptype}%
+      }%
+      \csname tocbasic_if_caption_above:TF\endcsname
+        {\@captionabovetrue}{\@captionabovefalse}%
       \def\captionabove{\noalign{\global\@captionabovetrue}%
-        \scr at caption}%
+        \LT at caption}%
       \def\captionbelow{\noalign{\global\@captionabovefalse}%
-        \scr at caption}%
-      \if at tablecaptionabove
-        \let\LT at caption=\captionabove
-      \else
-        \let\LT at caption=\captionbelow
-      \fi
+        \LT at caption}%
       \scr at LT@array
     }%
     \ClassInfo{\KOMAClassName}{%
@@ -6358,15 +6385,6 @@
 \setcounter{dbltopnumber}{2}
 \renewcommand*\dbltopfraction{.7}
 \renewcommand*\dblfloatpagefraction{.5}
-\newcommand*{\captionof}[1]{\def\@captype{#1}%
-  \begingroup\expandafter\expandafter\expandafter\endgroup
-  \expandafter\ifx\csname if@#1captionabove\endcsname\iftrue
-    \@captionabovetrue
-  \fi
-  \scr at caption}
-\newcommand*{\captionaboveof}{\@captionabovetrue\captionof}
-\newcommand*{\captionbelowof}{\@captionabovefalse\captionof}
-\BeforePackage{capt-of}{\let\captionof\relax}
 \newenvironment{captionofbeside}[1]{%
   \def\@captype{#1}%
   \captionbeside
@@ -6387,10 +6405,6 @@
   floattype=1,
   tocentryindent=1.5em,
   tocentrynumwidth=2.3em,
-  atbegin=\def\caption{%
-    \if at figurecaptionabove\expandafter\captionabove
-    \else\expandafter\captionbelow\fi
-  }
 ]{lof}
 \expandafter\ifnum\scr at v@is at lt{3.35}%
   \renewcommand*\thefigure{\@arabic\c at figure}
@@ -6403,10 +6417,6 @@
   floattype=2,
   tocentryindent=1.5em,
   tocentrynumwidth=2.3em,
-  atbegin=\def\caption{%
-    \if at tablecaptionabove\expandafter\captionabove
-    \else\expandafter\captionbelow\fi
-  }
 ]{lot}
 \expandafter\ifnum\scr at v@is at lt{3.35}%
   \renewcommand*\thetable{\@arabic\c at table}
@@ -6572,7 +6582,7 @@
   \endgroup
   \@footnotemark
 }
-%%% From File: $Id: scrkernel-listsof.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-listsof.dtx 4193 2025-08-12 14:24:39Z kohm $
 %%%            (run: body)
 \g at addto@macro{\numberline at numberpostfix}{\autodot}
 \usetocbasicnumberline[%
@@ -6820,7 +6830,7 @@
 }
 \newcommand{\AfterBibliographyPreamble}{\g at addto@macro\bib at before@hook}
 \newcommand{\AtEndBibliography}{\g at addto@macro\bib at after@hook}
-%%% From File: $Id: scrkernel-index.dtx 4052 2023-05-05 11:41:51Z kohm $
+%%% From File: $Id: scrkernel-index.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \newcommand*{\index at preamble}{}
 \let\index at preamble=\relax

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrarticle.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrarticle.cls	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrarticle.cls	2025-08-20 19:59:36 UTC (rev 76100)
@@ -38,7 +38,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -63,7 +63,7 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at clsextension}{\@clsextension}
 \AtBeginDocument{%
   \let\scr at clsextension\@clsextension
@@ -77,7 +77,7 @@
 \newcommand*{\KOMALongClassFileName}{\KOMALongClassName.\@clsextension}
 \edef\KOMALongClassFileName{\KOMALongClassFileName}
 \ProvidesClass{\KOMALongClassName}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   document class (\ClassName)%
 ]
 \let\ClassName\relax

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrbase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrbase.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrbase.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -44,7 +44,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -69,18 +69,18 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at pkgextension}{\@pkgextension}
 \AtBeginDocument{%
   \let\scr at pkgextension\@pkgextension
 }
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: prepare)
 \NeedsTeXFormat{LaTeX2e}[2022/06/01]
 \ProvidesPackage{%
   scrbase%
 }[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (%
     KOMA-Script-independent
@@ -599,7 +599,7 @@
 \long\def\l at addto@macro#1#2{%
   \edef#1{\unexpanded\expandafter{#1#2}}%
 }%
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: option)
 \DefineFamily{KOMA}
 \DefineFamilyMember{KOMA}
@@ -613,7 +613,7 @@
 \FamilyProcessOptions{KOMA}\relax
 %%% From File: $Id: scrkernel-language.dtx 4140 2025-02-22 12:39:23Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: body)
 \newcommand*{\XdivY}[2]{%
   \numexpr ( #1 + #2 / 2 ) / #2 - 1\relax

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrbook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrbook.cls	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrbook.cls	2025-08-20 19:59:36 UTC (rev 76100)
@@ -6,6 +6,7 @@
 %%
 %% scrkernel-version.dtx  (with options: `class,book')
 %% scrkernel-basics.dtx  (with options: `class,load')
+%% tocbasic.dtx  (with options: `class,load')
 %% scrkernel-listsof.dtx  (with options: `class,book,prepare')
 %% scrkernel-tocstyle.dtx  (with options: `class,book,prepare')
 %% scrkernel-sections.dtx  (with options: `class,book,prepare')
@@ -84,7 +85,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -109,7 +110,7 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at clsextension}{\@clsextension}
 \AtBeginDocument{%
   \let\scr at clsextension\@clsextension
@@ -121,17 +122,22 @@
   book%
 }
 \ProvidesClass{\KOMAClassName}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   document class (\ClassName)%
 ]
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: load)
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
-%%% From File: $Id: scrkernel-listsof.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
+\RequirePackage[enablepatch=caption]{tocbasic}[%
+  2025/08/19 v3.46 KOMA-Script
+]
+\ExplSyntaxOn
+\tocbasic_define_caption_keys:n { table }
+\tocbasic_define_caption_keys:n { figure }
+\ExplSyntaxOff
+%%% From File: $Id: scrkernel-listsof.dtx 4193 2025-08-12 14:24:39Z kohm $
 %%%            (run: prepare)
-\RequirePackage{tocbasic}[%
-  2025/06/04 v3.45 KOMA-Script
-]
 \AtAddToTocList[\@currname.\@currext]{\setuptoc{\@currext}{onecolumn}}%
 \AtAddToTocList[ToC]{\setuptoc{\@currext}{onecolumn}}%
 \addtotoclist[ToC]{toc}
@@ -141,9 +147,9 @@
   \expandafter{\ext at toc}%
 }
 \AtAddToTocList[float]{\setuptoc{\@currext}{onecolumn}}%
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: prepare)
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: prepare)
 \newif\if at openright
 \@openrighttrue
@@ -230,7 +236,7 @@
 \newcommand*{\size at subparagraph}{}
 \newcommand*{\scr at fnt@subparagraph}{\size at subparagraph}
 \newcommand*{\sectfont}{\normalcolor\maybesffamily\bfseries}
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: init)
 \newcommand*
   {\scr at compatibility}{\scr at v@last}
@@ -323,10 +329,11 @@
 \@namedef{scr at v@3.43}{34300}
 \@namedef{scr at v@3.44}{34400}
 \@namedef{scr at v@3.45}{34500}
-\@namedef{scr at v@last}{34500}
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+\@namedef{scr at v@3.46}{34600}
+\@namedef{scr at v@last}{34600}
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: init)
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: option)
 \newif\if at scr@emulatestandardclasses
 \let\scr at emulatestandardclassestrue\relax
@@ -481,7 +488,7 @@
 \DeclareOption{fleqn}{\input{fleqn.clo}}
 %%% From File: $Id: scrkernel-language.dtx 4140 2025-02-22 12:39:23Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
 \providecommand*\@ptsize{%
   11%
@@ -638,7 +645,7 @@
                            {sfdefaults}{\if at sfdefaults true\else false\fi}%
   \fi
 }
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: options)
 \KOMA at key{twoside}[true]{%
   \if at atdocument\else\PassOptionsToPackage{twoside=#1}{typearea}\fi%
@@ -965,9 +972,9 @@
 }{titlepage}{\if at titlepage true\else false\fi}
 \KOMA at DeclareStandardOption%
   {notitlepage}{titlepage=false}
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: option)
 \KOMA at key{open}{%
   \KOMA at set@ncmdkey{open}{@tempa}{%
@@ -1457,12 +1464,19 @@
 \KOMA at DeclareDeprecatedOption{cleardoubleempty}{cleardoublepage=empty}
 \KOMA at DeclareDeprecatedOption{cleardoubleplain}{cleardoublepage=plain}
 \KOMA at DeclareDeprecatedOption{cleardoublestandard}{cleardoublepage=current}
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: option)
 \newif\if at captionabove\@captionabovefalse
-\newif\if at tablecaptionabove\@tablecaptionabovefalse
-\newif\if at figurecaptionabove\@figurecaptionabovefalse
 \newif\ifonelinecaptions\onelinecaptionstrue
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionSinglelinecheck{koma}{%
+    \ifonelinecaptions
+      \expandafter\@firstoftwo
+    \else
+      \expandafter\@secondoftwo
+    \fi}%
+  \SetCaptionDefault{singlelinecheck}{koma}%
+}
 \newcommand*{\scap at pos}{r}
 \newcommand*{\scap at valign}{b}
 \KOMA at key{captions}{%
@@ -1488,36 +1502,32 @@
   }{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed
     \ifcase \@tempa\relax % heading
-      \@tablecaptionabovetrue
-      \@figurecaptionabovetrue
-      \@captionabovetrue
+      \SetKeys[tocbasic]{captionabove}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{heading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{signature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{heading}%
-   \or % signature
-      \@tablecaptionabovefalse
-      \@figurecaptionabovefalse
-      \@captionabovefalse
+    \or % signature
+      \SetKeys[tocbasic]{captionbelow}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{heading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{signature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{signature}%
     \or % tableheading
-      \@tablecaptionabovetrue
+      \SetKeys[tocbasic]{tablecaptionabove}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tableheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tablesignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{tableheading}%
     \or % tablesignature
-      \@tablecaptionabovefalse
+      \SetKeys[tocbasic]{tablecaptionbelow}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tableheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tablesignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{tablesignature}%
     \or % figureheading
-      \@figurecaptionabovetrue
+      \SetKeys[tocbasic]{figurecaptionabove}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figureheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figuresignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{figureheading}%
     \or % figuresignature
-      \@figurecaptionabovefalse
+      \SetKeys[tocbasic]{figurecaptionbelow}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figureheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figuresignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{figuresignature}%
@@ -1581,8 +1591,6 @@
   \fi
 }
 \KOMA at kav@add{\KOMAClassFileName}{captions}{signature}
-\KOMA at kav@add{\KOMAClassFileName}{captions}{tablesignature}
-\KOMA at kav@add{\KOMAClassFileName}{captions}{figuresignature}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{oneline}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{rightbeside}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{bottombeside}
@@ -1663,7 +1671,7 @@
   \csname FN at mf@prepare\endcsname
   \ifhmode\spacefactor\@x at sf\fi
   \relax}
-%%% From File: $Id: scrkernel-listsof.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-listsof.dtx 4193 2025-08-12 14:24:39Z kohm $
 %%%            (run: option)
 \newif\if at tocleft
 \KOMA at key{toc}{%
@@ -2113,7 +2121,7 @@
 \KOMA at DeclareStandardOption{openbib}{bibliography=openstyle}
 \KOMA at DeclareDeprecatedOption{bibtotoc}{bibliography=totoc}
 \KOMA at DeclareDeprecatedOption{bibtotocnumbered}{bibliography=totocnumbered}
-%%% From File: $Id: scrkernel-index.dtx 4052 2023-05-05 11:41:51Z kohm $
+%%% From File: $Id: scrkernel-index.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
 \newcommand*{\idx@@heading}{%
   \ifidx at leveldown
@@ -2219,7 +2227,7 @@
 \KOMA at DeclareDeprecatedOption{idxtotoc}{index=totoc}
 %%% From File: $Id: scrkernel-listsandtabulars.dtx 4138 2025-02-10 13:55:51Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: execoption)
 \KOMAExecuteOptions{headings=openright}
 \KOMAExecuteOptions{numbers=autoendperiod}
@@ -2230,7 +2238,7 @@
   headings=big%
 }
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: body)
 \AtBeginDocument{%
   \begingroup
@@ -2279,7 +2287,7 @@
     }%
   \endgroup
 }
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \newcommand*\scr at setlength[4]{%
   \expandafter\ifnum\scr at v@is at lt{3.12}\relax
@@ -2793,7 +2801,7 @@
         January\or February\or March\or April\or May\or June\or
         July\or August\or September\or October\or November\or December\fi
         \space\number\day, \number\year}%
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \let\@BCOR                =\relax
 \let\@@BCOR               =\relax
@@ -3360,10 +3368,10 @@
 \newcommand*{\scr at fnt@title}{\titlefont}%
 \newcommand*{\subject at font}{\normalfont\normalcolor\bfseries\Large}%
 \newcommand*{\scr at fnt@subject}{\subject at font}%
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: body)
 \let\numberline\scr at numberline
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,part)
 \CloneTOCEntryStyle{tocline}{part}
 \TOCEntryStyleStartInitCode{part}{%
@@ -3377,7 +3385,7 @@
   \expandafter\providecommand\expandafter*%
   \csname scr at tso@#1 at beforeskip\endcsname{2.25em \@plus\p@}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,chapter)
 \CloneTOCEntryStyle{tocline}{chapter}
 \TOCEntryStyleStartInitCode{chapter}{%
@@ -3397,7 +3405,7 @@
   \expandafter\providecommand\expandafter*%
   \csname scr at tso@#1 at beforeskip\endcsname{1.0em \@plus\p@}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,section)
 \CloneTOCEntryStyle{tocline}{section}
 \TOCEntryStyleStartInitCode{section}{%
@@ -3404,10 +3412,10 @@
   \expandafter\providecommand%
   \csname scr at tso@#1 at linefill\endcsname{\TOCLineLeaderFill\relax}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,default)
 \CloneTOCEntryStyle{section}{default}
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: body)
 \BeforeClosingMainAux{%
   \if at autodot\if at filesw\immediate\write\@mainaux{%
@@ -3875,13 +3883,15 @@
   \scr at ifundefinedorrelax{NR at gettitle}{%
     \scr at ifundefinedorrelax{GetTitleString}{%
       \begingroup
-        \let\label\@gobble
-        \let\index\@gobble
-        \let\glossary\@gobble
+        \DeclareExpandableDocumentCommand{\label}{som}{}%
+        \DeclareExpandableDocumentCommand{\index}{som}{}%
+        \DeclareExpandableDocumentCommand{\glossary}{som}{}%
+        \DeclareExpandableDocumentCommand{\zlabel}{som}{}%
         \scr at ifundefinedorrelax{UseHook}{}{%
           \UseHook{\KOMAClassName/option/section/reference/fallback}%
         }%
-        \protected at edef\@currentlabelname{#1}%
+        \let\protect\noexpand
+        \edef\@currentlabelname{\expandafter\detokenize{#1}}%
       \expandafter\expandafter\expandafter\endgroup
       \expandafter\def\expandafter\@currentlabelname\expandafter{%
         \@currentlabelname}%
@@ -5292,6 +5302,10 @@
   \setcounter{chapter}{0}%
   \setcounter{section}{0}%
   \gdef\@chapapp{\appendixname}%
+  \addtocontents{\ext at toc}{\def\protect\@chapapp{\protect\appendixname}}%
+  \doforeachtocfile[float]{%
+    \addtocontents{\@currext}{\def\protect\@chapapp{\protect\appendixname}}%
+  }%
   \gdef\thechapter{\@Alph\c at chapter}%
   \UseOneTimeHook{\KOMAClassName/appendix}%
   \csname appendixmore\endcsname
@@ -5611,7 +5625,21 @@
     \if at at@twocolumn
       \@nameuse{@make#1head}{#3}%
     \else
-      \@topnewpage[\@nameuse{@make#1head}{#3}]%
+      \edef\scr at restoreparsetup{%
+        \parskip\the\parskip
+        \parfillskip\the\parfillskip
+        \parindent\the\parindent
+      }%
+      \@topnewpage[%
+        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \scr at restoreparsetup
+        \vskip\topskip
+        \fi
+        \@nameuse{@make#1head}{#3\ifhmode\strut\fi}%
+        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \vskip\dimeval{\ht\strutbox-\dp\strutbox-\topskip+\parskip}%
+        \fi
+      ]%
     \fi
   \else
     \@nameuse{@make#1head}{#3}%
@@ -5653,7 +5681,21 @@
     \if at at@twocolumn
       \@nameuse{@makes#1head}{#2}%
     \else
-      \@topnewpage[\@nameuse{@makes#1head}{#2}]%
+      \edef\scr at restoreparsetup{%
+        \parskip\the\parskip
+        \parfillskip\the\parfillskip
+        \parindent\the\parindent
+      }%
+      \@topnewpage[%
+        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \scr at restoreparsetup
+        \vskip\topskip
+        \fi
+        \@nameuse{@makes#1head}{#2\ifhmode\strut\fi}%
+        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \vskip\dimeval{\ht\strutbox-\dp\strutbox-\topskip+\parskip}%
+        \fi
+      ]%
     \fi
   \else
     \@nameuse{@makes#1head}{#2}%
@@ -6535,7 +6577,7 @@
 \providecommand{\@mkdouble}[1]{%
   \@mkboth{#1}{#1}%
 }
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \newlength{\abovecaptionskip}
 \newlength{\belowcaptionskip}
@@ -6542,10 +6584,10 @@
 \setlength{\abovecaptionskip}{10\p@}
 \setlength{\belowcaptionskip}{0\p@}
 \newcommand*{\captionformat}{:\ }
-\newcommand{\scr at caption}{}
-\AtBeginDocument{\let\scr at caption\caption}
-\newcommand{\captionabove}{\@captionabovetrue\scr at caption}
-\newcommand{\captionbelow}{\@captionabovefalse\scr at caption}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionLabelSeparator{koma}{\captionformat}%
+  \SetCaptionDefault{labelseparator}{koma}%
+}
 \newcommand*{\scap at caption}{}
 \newcommand*{\scap at width}{\linewidth}
 \newcommand*{\scap at move}{\z@}
@@ -6668,26 +6710,42 @@
 \newcommand*\caplabelfont{\normalfont\normalcolor}
 \newcommand*{\scr at fnt@caption}{\capfont}
 \newcommand*{\scr at fnt@captionlabel}{\caplabelfont}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionFont{scr at font}{\scr at fnt@caption}%
+  \DeclareCaptionFont{scr at labelfont}{\scr at fnt@captionlabel}%
+  \SetCaptionDefault{font}{scr at font}%
+  \SetCaptionDefault{labelfont}{scr at labelfont}%
+}
 \newif\ifdofullc at p
 \dofullc at ptrue
 \newif\if at capbreak
 \@capbreakfalse
-\newcommand*{\setcapindent}{\kernel at ifstar{\@@setcapindent}{\@setcapindent}}
-\newcommand*{\@setcapindent}[1]{%
-  \setlength{\@tempdima}{#1}%
-  \ifdim\@tempdima>\hsize
-    \addtolength{\@tempdima}{-\hsize}\@capbreaktrue
-  \else
-    \@capbreakfalse
-  \fi
-  \edef\cap at indent{\the\@tempdima}%
-  \dofullc at pfalse
-}
-\newcommand*{\@@setcapindent}[1]{%
-  \setlength{\@tempdima}{#1}%
-  \edef\cap at indent{\the\@tempdima}%
-  \dofullc at pfalse\@capbreaktrue
-}
+\ExplSyntaxOn
+\NewDocumentCommand { \setcapindent } { s m }
+  {
+    \IfBooleanTF {#1}
+      {
+        \cs_set:Npe \cap at indent { \dim_eval:n { #2 } }
+        \@capbreaktrue
+      }
+      {
+        \cs_set:Npe \cap at indent { \dim_eval:n { #2 } }
+        \@capbreakfalse
+      }
+    \dofullc at pfalse
+    \__scrkernel_at_caption_package:n
+      {
+        \exp_args:No \msg_warning:nnee { \KOMAClassName }
+          { using-caption }
+          { \token_to_str:N\setcapindent\IfBooleanT{#1}*{#2} }
+          {
+            \token_to_str:N \captionsetup
+              { indent=\ifdim\cap at indent<\z@\z@\else\cap at indent\fi }
+          }
+        \captionsetup { indent=\ifdim\cap at indent<\z@\z@\else\cap at indent\fi }
+      }
+  }
+\ExplSyntaxOff
 \newcommand*{\setcaphanging}{\dofullc at ptrue\@capbreakfalse}
 \expandafter\ifnum\scr at v@is at ge{3.41}%
   \newcommand*{\captionnopagebreak}{\nopagebreak}
@@ -6694,229 +6752,220 @@
 \else
   \newcommand*{\captionnopagebreak}{}
 \fi
+\newcommand*{\@abovecaptionbreak}{}
+\newcommand*{\@belowcaptionbreak}{}
+\let\@belowcaptionbreak\captionnopagebreak
+\IfFormatAtLeastTF{2023/11/01}{%
+  \NewSocketPlug{tocbasic/swapskip/after}{swapbreak}{%
+    \let\@abovecaptionbreak\captionnopagebreak
+    \let\@belowcaptionbreak\relax
+  }%
+  \AssignSocketPlug{tocbasic/swapskip/after}{swapbreak}%
+}{%
+  \AddToHook{tocbasic/swapskip/after}{&
+    \let\@abovecaptionbreak\captionnopagebreak
+    \let\@belowcaptionbreak\relax
+  }%
+}
 \newcommand{\@makecaption}[2]{%
-  \if at captionabove
-    \vskip\belowcaptionskip
-  \else
-    \captionnopagebreak\vskip\abovecaptionskip\captionnopagebreak
-  \fi
+  \@abovecaptionbreak\vskip\abovecaptionskip\@abovecaptionbreak
   \@@makecaption\@firstofone{#1}{#2}%
-  \if at captionabove
-    \captionnopagebreak\vskip\abovecaptionskip\captionnopagebreak
-  \else
-    \vskip\belowcaptionskip
-  \fi
+  \@belowcaptionbreak\vskip\belowcaptionskip\@belowcaptionbreak
 }
 \newcommand*{\cap at width}{\hsize}
 \newcommand*{\cap at left}{\hfill}
 \newcommand*{\cap at right}{\hfill}
-\newcommand*{\setcapwidth}[2][]{%
-  \begingroup%
-    \setlength{\@tempdima}{#2}%
-    \ifdim\@tempdima <\z@
-      \@tempdima\z@
-      \ClassWarning{\KOMAClassName}{%
-        caption width less than 0pt not allowed.\MessageBreak
-        Setting caption width to 0pt%
-      }%
-    \fi
-    \edef\@tempa{\endgroup\def\noexpand\cap at width{\the\@tempdima}}%
-  \@tempa
-  \begingroup
-    \edef\@tempa{#1}%
-    \def\@tempb{c}\ifx\@tempa\@tempb
-      \endgroup
-      \def\cap at margin{\let\cap at left=\hfill\let\cap at right=\hfill}%
-    \else
-      \def\@tempb{l}\ifx\@tempa\@tempb
-        \endgroup
-        \def\cap at margin{\let\cap at left=\relax\let\cap at right\hfill}%
-      \else
-        \def\@tempb{r}\ifx\@tempa\@tempb
-          \endgroup
-          \def\cap at margin{\let\cap at left=\hfill\let\cap at right=\relax}%
-        \else
-          \def\@tempb{i}\ifx\@tempa\@tempb
-            \endgroup
-            \def\cap at margin{%
-              \let\cap at left=\relax
-              \let\cap at right=\hfill
-              \if at twoside
-                \Ifthispageodd{}{%
-                  \let\cap at left=\hfill
-                  \let\cap at right=\relax
-                }%
-              \fi
-            }%
-          \else
-            \def\@tempb{o}\ifx\@tempa\@tempb
-              \endgroup
-              \def\cap at margin{%
-                \let\cap at left=\hfill
-                \let\cap at right=\relax
-                \if at twoside
-                  \Ifthispageodd{}{%
-                    \let\cap at left=\relax
-                    \let\cap at right=\hfill
-                  }%
-                \fi
-              }%
+\ExplSyntaxOn
+\prop_put:Non \g_msg_module_type_prop { \KOMAClassName } { Class }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { minimum-value-needed }
+  {
+    You've~tried~#2~\msg_line_context:,~
+    but~values~less~than~#1~are~not~allowed.~
+    Using~#1~instead.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { caption-not-support-setcapwidth-option }
+  {
+    Ignoring~command~
+    \token_to_str:N \setcapwidth [#1]{...}\\
+    because~the~caption~package~is~being\\
+    used~\msg_line_context:.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { caption-not-support-setcapdynwidth }
+  {
+    Ignoring~\token_to_str:N \setcapdynwidth \c_space_token
+    because~the~caption~package~is~being~used~\msg_line_context:.
+  }
+\exp_args:No \msg_new:nnnn { \KOMAClassName }
+  { setcaption-unknown-option }
+  { unknown~optional~position~argument~[#1]~\msg_line_context: }
+  {
+    Only~ONE~of~c,~l,~r,~i,~o~is~allowed~as~optional~argument~to~
+    \token_to_str:N \setcapwidth \c_space_tl and~
+    \token_to_str:N \setcapdynwidth \c_space_tl \msg_line_context:.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { using-caption }
+  {
+    Mapping~of\\
+    \c_space_tl #1\\
+    to\\
+    \c_space_tl #2\\
+    because~the~caption~package~is~being~used.\\
+    When~using~the~caption~package,~it~is~recommended\\
+    to~use~the~options~of~this~package~directly~instead\\
+    of~the~KOMA-Script~setting~\msg_line_context:.
+  }
+\NewDocumentCommand { \setcapwidth } { om }
+  {
+    \dim_compare:nNnTF { #2 } < { \c_zero_dim }
+      {
+        \exp_args:No \msg_warning:nnne { \KOMAClassName }
+          { minimum-value-needed } { 0pt } { \dim_eval:n { #2 } }
+        \def\cap at width{0pt}
+      }
+      {
+        \cs_set:Npe \cap at width { \dim_eval:n { #2 } }
+      }
+    \IfPackageLoadedF { caption } { \__scrkernel_set_cap_left_right:n { #1 } }
+    \__scrkernel_at_caption_package:n
+      {
+        \IfValueTF { #1 }
+          {
+            \exp_args:No \msg_warning:nne { \KOMAClassName }
+              { caption-not-support-setcapwidth-option } { #1 }
+          }
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapwidth{#2} }
+              { \token_to_str:N \captionsetup { width=\cap at width } }
+            \captionsetup { width=\cap at width }
+          }
+      }
+  }
+\cs_new:Nn \__scrkernel_at_caption_package:n
+  {
+    \IfPackageLoadedTF { caption3 }
+      {
+        \cs_if_eq:NNTF \AtCaptionPackage \@notprerr
+          { #1 }
+          { \AtCaptionPackage { #1 } }
+      }
+      {
+        \hook_gput_code:nnn { pkg / caption3 / after } { \KOMAClassName }
+          { \AtCaptionPackage { #1 } }
+      }
+  }
+\__scrkernel_at_caption_package:n
+  {
+    \cs_set:Nn \__scrkernel_at_caption_package:n { ##1 }
+  }
+\cs_new:Nn \__scrkernel_set_cap_left_right:n
+  {
+    \str_case:enF { #1 }
+      {
+        { c } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \hfill } }
+        { l } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \relax
+                                          \cs_set_eq:NN \cap at right \hfill } }
+        { r } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \relax } }
+        { i } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \relax
+                                          \cs_set_eq:NN \cap at right \hfill
+                                          \if at twoside
+                                            \Ifthispageodd {} {
+                                              \cs_set_eq:NN \cap at left  \hfill
+                                              \cs_set_eq:NN \cap at right \relax
+                                            }
+                                          \fi } }
+        { o } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \relax
+                                          \if at twoside
+                                            \Ifthispageodd {
+                                              \cs_set_eq:NN \cap at left  \relax
+                                              \cs_set_eq:NN \cap at right \hfill
+                                            } { }
+                                          \fi } }
+      }
+      {
+        \IfValueT{ #1 }
+          {
+            \exp_args:No \msg_error:nnn { \KOMAClassName }
+              { setcaption-unknown-option } { #1 }
+          }
+      }
+  }
+\NewDocumentCommand { \setcapdynwidth } { om }
+  {
+    \IfPackageLoadedTF { caption }
+      {
+        \exp_args:No \msg_warning:nn { \KOMAClassName }
+          { caption-not-support-setcapdynwidth }
+      }
+      {
+        \cs_set:Npn \cap at width { #2 }
+        \__scrkernel_set_cap_left_right:n { #1 }
+      }
+  }
+\ExplSyntaxOff
+\newcommand*{\cap at margin}{}
+\let\cap at margin=\relax%
+\ExplSyntaxOn
+\NewDocumentCommand {\setcapmargin} { s O{#3} m }
+  {
+    \IfBooleanTF {#1}
+      {
+        \cs_set:Npn \cap at margin
+          {
+            \onelinecaptionsfalse
+            \cs_set:Npe \cap at width { \dim_eval:n { \hsize - #2 - #3 } }
+            \if at twoside
+              \Ifthispageodd
+                {
+                  \cs_set:Npn \cap at left  { \hspace*{#2} }
+                  \cs_set:Npn \cap at right { \hspace*{#3} }
+                }
+                {
+                  \cs_set:Npn \cap at left  { \hspace*{#3} }
+                  \cs_set:Npn \cap at right { \hspace*{#2} }
+                }
             \else
-              \ifx \@tempa\@empty\else
-                \ClassError{\KOMAClassName}{%
-                  unknown optional position argument%
-                }{%
-                  You've used `#1' as position argument at
-                  \string\setcaptionwidth,\MessageBreak
-                  but only ONE of `c', `l', `r', `i`, `o` ist
-                  allowed.\MessageBreak
-                  Argument will be ignored, if you'll continue.%
-                }%
-              \fi
-              \endgroup
-  \fi\fi\fi\fi\fi
-}
-\newcommand*{\setcapdynwidth}[2][]{%
-  \def\cap at width{#2}%
-  \begingroup
-    \edef\@tempa{#1}%
-    \def\@tempb{c}\ifx\@tempa\@tempb
-      \endgroup
-      \def\cap at margin{%
-        \ifdim \cap at width<\z@
-          \ClassWarning{\KOMAClassName}{%
-            caption width less than 0pt not allowed.\MessageBreak
-            Setting caption width to 0pt%
-          }%
-          \let\cap at width\z@
-        \fi
-        \let\cap at left=\hfill\let\cap at right=\hfill}%
-    \else
-      \def\@tempb{l}\ifx\@tempa\@tempb
-        \endgroup
-        \def\cap at margin{%
-          \ifdim \cap at width<\z@
-            \ClassWarning{\KOMAClassName}{%
-              caption width less than 0pt not allowed.\MessageBreak
-              Setting caption width to 0pt%
-            }%
-            \let\cap at width\z@
-          \fi
-          \let\cap at left=\relax\let\cap at right\hfill}%
-      \else
-        \def\@tempb{r}\ifx\@tempa\@tempb
-          \endgroup
-          \def\cap at margin{%
-            \ifdim \cap at width<\z@
-              \ClassWarning{\KOMAClassName}{%
-                caption width less than 0pt not allowed.\MessageBreak
-                Setting caption width to 0pt%
-              }%
-              \let\cap at width\z@
+              \cs_set:Npn \cap at left  { \hspace*{#2} }
+              \cs_set:Npn \cap at right { \hspace*{#3} }
             \fi
-            \let\cap at left=\hfill\let\cap at right=\relax}%
-        \else
-          \def\@tempb{i}\ifx\@tempa\@tempb
-            \endgroup
-            \def\cap at margin{%
-              \ifdim \cap at width<\z@
-                \ClassWarning{\KOMAClassName}{%
-                  caption width less than 0pt not allowed.\MessageBreak
-                  Setting caption width to 0pt%
-                }%
-                \let\cap at width\z@
-              \fi
-              \let\cap at left=\relax
-              \let\cap at right=\hfill
-              \if at twoside
-                \Ifthispageodd{}{%
-                  \let\cap at left=\hfill
-                  \let\cap at right=\relax
-                }%
-              \fi
-            }%
-          \else
-            \def\@tempb{o}\ifx\@tempa\@tempb
-              \endgroup
-              \def\cap at margin{%
-                \ifdim \cap at width<\z@
-                  \ClassWarning{\KOMAClassName}{%
-                    caption width less than 0pt not allowed.\MessageBreak
-                    Setting caption width to 0pt%
-                  }%
-                  \let\cap at width\z@
-                \fi
-                \let\cap at left=\hfill
-                \let\cap at right=\relax
-                \if at twoside
-                  \Ifthispageodd{}{%
-                    \let\cap at left=\relax
-                    \let\cap at right=\hfill
-                  }%
-                \fi
-              }%
-            \else
-              \ifx \@tempa\@empty\else
-                \ClassError{\KOMAClassName}{%
-                  unknown optional position argument%
-                }{%
-                  You've used `#1' as position argument at
-                  \string\setcaptionwidth,\MessageBreak
-                  but only ONE of `c', `l', `r', `i`, `o` ist
-                  allowed.\MessageBreak
-                  Argument will be ignored, if you'll continue.%
-                }%
-              \fi
-              \endgroup
-  \fi\fi\fi\fi\fi
-}
-\newcommand*{\cap at margin}{}
-\let\cap at margin=\relax%
-\newcommand*{\setcapmargin}{\kernel at ifstar{\@setcapmargin}{\@@setcapmargin}}
-\newcommand*{\@setcapmargin}[2][\@tempdimb]{%
-  \def\cap at margin{%
-    \onelinecaptionsfalse
-    \begingroup
-      \setlength{\@tempdima}{\hsize}%
-      \setlength{\@tempdimb}{#2}%
-      \addtolength{\@tempdima}{-\@tempdimb}%
-      \setlength{\@tempdimc}{#1}%
-      \addtolength{\@tempdima}{-\@tempdimc}%
-      \edef\@tempa{\endgroup
-        \def\noexpand\cap at width{\the\@tempdima}%
-        \noexpand\if at twoside
-          \noexpand\Ifthispageodd{%
-            \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-            \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-          }{%
-            \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimc}}%
-            \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimb}}%
-          }%
-        \noexpand\else
-          \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-          \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-        \noexpand\fi
-      }%
-    \@tempa
-  }%
-}
-\newcommand*{\@@setcapmargin}[2][\@tempdimb]{%
-  \def\cap at margin{%
-    \onelinecaptionsfalse
-    \begingroup
-      \setlength{\@tempdima}{\hsize}%
-      \setlength{\@tempdimb}{#2}%
-      \addtolength{\@tempdima}{-\@tempdimb}%
-      \setlength{\@tempdimc}{#1}%
-      \addtolength{\@tempdima}{-\@tempdimc}%
-      \edef\@tempa{\endgroup
-        \def\noexpand\cap at width{\the\@tempdima}%
-        \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-        \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-      }%
-    \@tempa
-  }%
-}
+          }
+        \__scrkernel_at_caption_package:n
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapmargin*[#2]{#3} }
+              { \token_to_str:N \captionsetup { twoside, slc=0, margin={#2,#3} } }
+            \captionsetup{ twoside, slc=0, margin={#2,#3} }
+          }
+      }
+      {
+        \cs_set:Npn \cap at margin
+          {
+            \onelinecaptionsfalse
+            \cs_set:Npe \cap at width { \dim_eval:n { \hsize - #2 - #3 } }
+            \cs_set:Npn \cap at left  { \hspace*{#2} }
+            \cs_set:Npn \cap at right { \hspace*{#3} }
+          }
+        \__scrkernel_at_caption_package:n
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapmargin[#2]{#3} }
+              { \token_to_str:N \captionsetup { oneside, slc=0, margin={#2,#3} } }
+            \captionsetup{oneside,slc=0,margin={#2,#3}}
+          }
+      }
+  }
+\ExplSyntaxOff
+\NewHook{\KOMAClassName/makecaption/deactivate}
 \newcommand{\@@makecaption}[3]{%
   \cap at margin
   \begingroup
@@ -6923,9 +6972,12 @@
     \ifonelinecaptions
       \def\stepcounter##1{\advance\value{##1}\@ne}%
       \let\refstepcounter\stepcounter
-      \let\label\@gobble
+      \let\label\@gobble at om
+      \let\index\@gobble at som
+      \let\glossary\@gobble at om
       \let\@footnotetext=\@gobble
       \let\hypertarget\@gobbletwo
+      \UseHook{\KOMAClassName/makecaption/deactivate}%
       \edef\@xnewline{%
         \unexpanded{\ClassInfo{\KOMAClassName}{%
             Workaround for not recommended usage of \string\\ or\MessageBreak
@@ -7184,6 +7236,24 @@
   \endgroup
 }
 \newcommand*\raggedcaption{}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionFormat{koma}[#1#2#3\par]{%
+    \ifdofullc at p
+      \caption at useformat{hang}{#1}{#2}{#3}%
+    \else
+      #1#2%
+      \ifdim\cap at indent<\z@
+        \par
+        \noindent\hspace*{-\cap at indent}%
+      \else\if at capbreak
+        \par
+      \fi\fi
+      #3\par
+    \fi}%
+  \SetCaptionDefault{format}{koma}
+  \DeclareCaptionLabelFormat{koma}{\bothIfFirst{#1}{\nobreakspace}#2\autodot}
+  \SetCaptionFallback{labelformat}{koma}
+}
 \newcommand*{\scr at caption@before at longtable@warning}[1]{%
   \ClassWarning{\KOMAClassName}{%
     you've loaded package `#1' before package\MessageBreak
@@ -7200,23 +7270,12 @@
 \AfterPackage{longtable}{%
   \if at komalongtable
     \renewcommand{\LT at makecaption}[3]{%
-      \noalign{%
-        \if at captionabove
-          \vskip\belowcaptionskip
-        \else
-          \vskip\abovecaptionskip
-        \fi
-      }%
       \LT at mcol\LT at cols c{%
         \hbox to\z@{\hss\parbox[t]\linewidth{%
-            \def\@captype{table}%
+            \if at captionabove\else\vskip\belowcaptionskip\fi
             \@@makecaption{#1}{#2}{#3}%
             \endgraf
-            \if at captionabove
-              \vskip\abovecaptionskip
-            \else
-              \vskip\belowcaptionskip
-            \fi
+            \if at captionabove\vskip\abovecaptionskip\fi
           }%
           \hss
         }%
@@ -7225,16 +7284,16 @@
     \newcommand*{\scr at LT@array}{}%
     \let\scr at LT@array=\LT at array
     \renewcommand*{\LT at array}{%
-      \let\scr at caption=\LT at caption
+      \def\@captype{table}%
+      \@ifundefined{LTcaptype}{}{%
+        \Ifstr{\LTcaptype}{}{}{\let\@captype\LTcaptype}%
+      }%
+      \csname tocbasic_if_caption_above:TF\endcsname
+        {\@captionabovetrue}{\@captionabovefalse}%
       \def\captionabove{\noalign{\global\@captionabovetrue}%
-        \scr at caption}%
+        \LT at caption}%
       \def\captionbelow{\noalign{\global\@captionabovefalse}%
-        \scr at caption}%
-      \if at tablecaptionabove
-        \let\LT at caption=\captionabove
-      \else
-        \let\LT at caption=\captionbelow
-      \fi
+        \LT at caption}%
       \scr at LT@array
     }%
     \ClassInfo{\KOMAClassName}{%
@@ -7265,15 +7324,6 @@
 \setcounter{dbltopnumber}{2}
 \renewcommand*\dbltopfraction{.7}
 \renewcommand*\dblfloatpagefraction{.5}
-\newcommand*{\captionof}[1]{\def\@captype{#1}%
-  \begingroup\expandafter\expandafter\expandafter\endgroup
-  \expandafter\ifx\csname if@#1captionabove\endcsname\iftrue
-    \@captionabovetrue
-  \fi
-  \scr at caption}
-\newcommand*{\captionaboveof}{\@captionabovetrue\captionof}
-\newcommand*{\captionbelowof}{\@captionabovefalse\captionof}
-\BeforePackage{capt-of}{\let\captionof\relax}
 \newenvironment{captionofbeside}[1]{%
   \def\@captype{#1}%
   \captionbeside
@@ -7295,10 +7345,6 @@
   floattype=1,
   tocentryindent=1.5em,
   tocentrynumwidth=2.3em,
-  atbegin=\def\caption{%
-    \if at figurecaptionabove\expandafter\captionabove
-    \else\expandafter\captionbelow\fi
-  }
 ]{lof}
 \expandafter\ifnum\scr at v@is at le{2.97d}%
   \renewcommand*\thefigure{\thechapter.\@arabic\c at figure}
@@ -7312,10 +7358,6 @@
   floattype=2,
   tocentryindent=1.5em,
   tocentrynumwidth=2.3em,
-  atbegin=\def\caption{%
-    \if at tablecaptionabove\expandafter\captionabove
-    \else\expandafter\captionbelow\fi
-  }
 ]{lot}
 \expandafter\ifnum\scr at v@is at le{2.97d}%
   \renewcommand*\thetable{\thechapter.\@arabic\c at table}
@@ -7482,7 +7524,7 @@
   \endgroup
   \@footnotemark
 }
-%%% From File: $Id: scrkernel-listsof.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-listsof.dtx 4193 2025-08-12 14:24:39Z kohm $
 %%%            (run: body)
 \g at addto@macro{\numberline at numberpostfix}{\autodot}
 \usetocbasicnumberline[%
@@ -7736,7 +7778,7 @@
 }
 \newcommand{\AfterBibliographyPreamble}{\g at addto@macro\bib at before@hook}
 \newcommand{\AtEndBibliography}{\g at addto@macro\bib at after@hook}
-%%% From File: $Id: scrkernel-index.dtx 4052 2023-05-05 11:41:51Z kohm $
+%%% From File: $Id: scrkernel-index.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \newcommand*{\index at preamble}{}
 \let\index at preamble=\relax

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrdate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrdate.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrdate.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -43,7 +43,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -68,7 +68,7 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at pkgextension}{\@pkgextension}
 \AtBeginDocument{%
   \let\scr at pkgextension\@pkgextension
@@ -76,11 +76,11 @@
 %%% From File: $Id: scrtime.dtx 4145 2025-05-13 16:54:14Z kohm $
 \NeedsTeXFormat{LaTeX2e}[2022/06/01]
 \ProvidesPackage{scrdate}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (day of the week)%
 ]
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: load)
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
 %%% From File: $Id: scrtime.dtx 4145 2025-05-13 16:54:14Z kohm $

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrextend.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrextend.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrextend.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -78,7 +78,7 @@
   }%
   \expandafter\endinput
 \fi
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -103,7 +103,7 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at pkgextension}{\@pkgextension}
 \AtBeginDocument{%
   \let\scr at pkgextension\@pkgextension
@@ -111,7 +111,7 @@
 %%% From File: $Id: scrextend.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: prepare)
 \ProvidesPackage{scrextend}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package (extend other classes with features of KOMA-Script classes)%
 ]
 \newcommand*{\scr at ext@activate}[1]{%
@@ -135,13 +135,13 @@
     \expandafter\g at addto@macro\csname scr at ext@activate@#1\endcsname
   }%
 }
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: load)
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: prepare)
 \newcommand*{\sectfont}{\normalcolor\maybesffamily\bfseries}
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: init)
 \providecommand*
   {\scr at compatibility}{\scr at v@last}
@@ -234,7 +234,8 @@
 \@namedef{scr at v@3.43}{34300}
 \@namedef{scr at v@3.44}{34400}
 \@namedef{scr at v@3.45}{34500}
-\@namedef{scr at v@last}{34500}
+\@namedef{scr at v@3.46}{34600}
+\@namedef{scr at v@last}{34600}
 %%% From File: $Id: scrextend.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: option)
 \KOMA at key{extendedfeature}{%
@@ -259,7 +260,7 @@
     \def\FamilyKeyState{Option `extendedfeature' too late}%
   }%
 }
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: option)
 \KOMA at key{version}[last]{%
   \scr at ifundefinedorrelax{scr at v@#1}{%
@@ -390,7 +391,7 @@
 \KOMA at kav@xadd{scrextend.\scr at pkgextension}{overfullrule}{%
   \ifdim\overfullrule>\z@ true\else false\fi
 }
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
 \providecommand*{\@fontsizefilebase}{scrsize}
 \KOMA at key{fontsize}{%
@@ -542,7 +543,7 @@
 \KOMA at DeclareStandardOption%
   [scrextend]%
   {notitlepage}{titlepage=false}
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: option)
 %%% From File: $Id: scrkernel-pagestyles.dtx 4058 2023-06-16 08:32:27Z kohm $
 %%%            (run: option)
@@ -628,7 +629,7 @@
   {\pagestyle{#1}\cleardoublestandardpage}}
 \newcommand*{\cleardoubleemptypage}{\cleardoublepageusingstyle{empty}}
 \newcommand*{\cleardoubleplainpage}{\cleardoublepageusingstyle{plain}}
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: option)
 %%% From File: $Id: scrkernel-footnotes.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: option)
@@ -703,12 +704,12 @@
   \relax}
 %%% From File: $Id: scrkernel-listsandtabulars.dtx 4138 2025-02-10 13:55:51Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: execoption)
 %%% From File: $Id: scrkernel-miscellaneous.dtx 4094 2023-12-05 16:17:40Z kohm $
 %%%            (run: execoption)
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: body)
 \AtBeginDocument{%
   \begingroup
@@ -757,7 +758,7 @@
     }%
   \endgroup
 }
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \newcommand*\scr at setlength[4]{%
   \expandafter\ifnum\scr at v@is at lt{3.12}\relax
@@ -1523,7 +1524,7 @@
 \newcommand*{\scr at fnt@title}{\titlefont}%
 \newcommand*{\subject at font}{\normalfont\normalcolor\bfseries\Large}%
 \newcommand*{\scr at fnt@subject}{\subject at font}%
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: body)
 \newcommand*{\scr at fnt@disposition}{\sectfont}
 \aliaskomafont{sectioning}{disposition}
@@ -1636,7 +1637,7 @@
 \providecommand*{\scr at endstrut}{\unskip\ifhmode\nobreak\strut\fi}
 %%% From File: $Id: scrkernel-pagestyles.dtx 4058 2023-06-16 08:32:27Z kohm $
 %%%            (run: body)
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 %%% From File: $Id: scrkernel-footnotes.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: body)

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrfontsizes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrfontsizes.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrfontsizes.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -42,7 +42,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -67,20 +67,20 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at pkgextension}{\@pkgextension}
 \AtBeginDocument{%
   \let\scr at pkgextension\@pkgextension
 }
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: identify)
 \ProvidesPackage{scrfontsizes}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package (font size file generator)]
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
 \ProcessOptions\relax
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \@ifundefined{changefontsizes}{\RequirePackage{scrextend}}{}
 \newcommand*{\generatefontfile}[1]{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrjura.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrjura.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrjura.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -44,7 +44,7 @@
 %%%            (run: identify)
 \NeedsTeXFormat{LaTeX2e}[2022/06/01]
 \ProvidesPackage{scrjura}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (for jurists)
 ]

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrkbase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrkbase.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrkbase.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -44,7 +44,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -69,18 +69,18 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at pkgextension}{\@pkgextension}
 \AtBeginDocument{%
   \let\scr at pkgextension\@pkgextension
 }
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: prepare)
 \NeedsTeXFormat{LaTeX2e}[2022/06/01]
 \ProvidesPackage{%
   scrkbase%
 }[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (%
     KOMA-Script-dependent
@@ -102,6 +102,11 @@
     {No further help available!}%
     \batchmode \immediate\read -1 to \@tempa
 }
+\providecommand*\IfPackageLoadedT[1]{\IfPackageLoadedTF{#1}\@firstofone\@gobble}
+\providecommand*\IfPackageLoadedF[1]{\IfPackageLoadedTF{#1}{}}
+\ProvideDocumentCommand\@gobble at o{+o}{}
+\ProvideExpandableDocumentCommand\@gobble at om{+o+m}{}
+\ProvideExpandableDocumentCommand\@gobble at som{s+o+m}{}
 \newcommand*{\KOMA at key}[1][\@currname.\@currext]{%
   \DefineFamilyMember[{.#1}]{KOMA}%
   \@ifundefined{scr at kav@KOMA.#1}{\@namedef{scr at kav@KOMA.#1}{}}{}%
@@ -260,12 +265,12 @@
 }
 \newcommand*{\KOMAProcessOptions}{\FamilyProcessOptions{KOMA}}
 \@onlypreamble\KOMAProcessOptions
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: option)
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: body)
 \newcommand*{\KOMAExecuteOptions}[1][\@currname.\@currext]{%
   \Ifstrstart{#1}{.}{%
@@ -442,7 +447,7 @@
   }%
   \KOMAoptions{#3}%
 }
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \newcommand*{\IfExistskomafont}[1]{%
   \scr at ifundefinedorrelax{scr at fnt@#1}{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -49,7 +49,7 @@
 %%%            (run: identify)
 \NeedsTeXFormat{LaTeX2e}[2022/06/01]
 \ProvidesPackage{scrlayer-scrpage}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (end user interface for scrlayer)]
 %%% From File: $Id: scrlayer.dtx 4145 2025-05-13 16:54:14Z kohm $

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrlayer.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrlayer.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrlayer.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -47,7 +47,7 @@
 %%%            (run: identify)
 \NeedsTeXFormat{LaTeX2e}[2022/06/01]
 \ProvidesPackage{scrlayer}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (defining layers and page styles)]
 %%% From File: $Id: scrlayer.dtx 4145 2025-05-13 16:54:14Z kohm $

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrletter.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrletter.cls	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrletter.cls	2025-08-20 19:59:36 UTC (rev 76100)
@@ -38,7 +38,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -63,7 +63,7 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at clsextension}{\@clsextension}
 \AtBeginDocument{%
   \let\scr at clsextension\@clsextension
@@ -77,7 +77,7 @@
 \newcommand*{\KOMALongClassFileName}{\KOMALongClassName.\@clsextension}
 \edef\KOMALongClassFileName{\KOMALongClassFileName}
 \ProvidesClass{\KOMALongClassName}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   document class (\ClassName)%
 ]
 \let\ClassName\relax

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrletter.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrletter.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrletter.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -62,7 +62,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -87,16 +87,16 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at pkgextension}{\@pkgextension}
 \AtBeginDocument{%
   \let\scr at pkgextension\@pkgextension
 }
 \ProvidesPackage{scrletter}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   letter package extending any KOMA-Script class%
 ]
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: load)
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
 %%% From File: $Id: scrkernel-miscellaneous.dtx 4094 2023-12-05 16:17:40Z kohm $
@@ -123,11 +123,11 @@
   }
   \providecommand*{\par at updaterelative}{}
 }{}
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: init)
 %%% From File: $Id: scrkernel-miscellaneous.dtx 4094 2023-12-05 16:17:40Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: option)
 \AtEndOfPackage
   {\LoadLetterOption{DIN}}
@@ -147,13 +147,13 @@
 }{numericaldate}{true}
 \KOMA at DeclareDeprecatedOption{scrdate}{numericaldate=true}
 \KOMA at DeclareDeprecatedOption{orgdate}{numericaldate=false}
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
 %%% From File: $Id: scrkernel-variables.dtx 4151 2025-06-02 11:34:40Z kohm $
 %%%            (run: option)
 %%% From File: $Id: scrkernel-pseudolengths.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: options)
 \providecommand*{\PaperNameToSize}[2][warning]{%
   \Ifstr{#2}{letter}{%
@@ -246,7 +246,7 @@
 }
 %%% From File: $Id: scrkernel-pagestyles.dtx 4058 2023-06-16 08:32:27Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-notepaper.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-notepaper.dtx 4191 2025-07-28 07:01:41Z kohm $
 %%%            (run: option)
 \KOMA at ifkey{firsthead}{@firsthead}
 \KOMAExecuteOptions{firsthead=true}
@@ -820,12 +820,12 @@
 %%% From File: $Id: scrkernel-miscellaneous.dtx 4094 2023-12-05 16:17:40Z kohm $
 %%%            (run: execoption)
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 %%% From File: $Id: scrkernel-miscellaneous.dtx 4094 2023-12-05 16:17:40Z kohm $
 %%%            (run: body)
 \providecommand*{\scr at endstrut}{\unskip\ifhmode\nobreak\strut\fi}
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \newcommand*{\LoadLetterOption}[1]{%
   \@ifundefined{@restore at catcode@level}%
@@ -911,7 +911,7 @@
       }{}%
     }%
   \endgroup
-  \scr at gobbleopt
+  \@gobble at o
 }
 \newcommand*{\LoadLetterOptions}[1]{%
   \begingroup
@@ -1900,7 +1900,7 @@
   \rofoot[\ifnum\@pageat=5 \pagemark\fi]%
          {}%
 }
-%%% From File: $Id: scrkernel-notepaper.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-notepaper.dtx 4191 2025-07-28 07:01:41Z kohm $
 %%%            (run: body)
 
 \newkomavar{firsthead}
@@ -2817,13 +2817,13 @@
           \@set at reffields%
           \if at tempswa
             \ifnum \@datepos=1 \@set at reffield{date}\fi%
-            \sbox\z@{\usekomafont{refname}\strutbox}%
+            \sbox\z@{\usekomafont{refname}\strut}%
             \ifdim\ht\z@>\ht\strutbox
               \PackageWarningNoLine{scrletter}{%
                 Font element `refname' should not be larger than
                 \string\normalsize!}%
             \fi
-            \sbox\z@{\usekomafont{refvalue}\strutbox}%
+            \sbox\z@{\usekomafont{refvalue}\strut}%
             \ifdim\ht\z@>\ht\strutbox
               \PackageWarningNoLine{scrletter}{%
                 Font element `refvalue' should not be larger than

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-hook-3.34.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-hook-3.34.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-hook-3.34.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -41,7 +41,7 @@
 %% 
 %%% From File: $Id: scrlfile-hook.dtx$
 \ProvidesPackage{scrlfile-hook-3.34}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (using LaTeX hooks)]
 \@ifundefined{IfFormatAtLeastTF}{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-hook.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-hook.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-hook.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -41,7 +41,7 @@
 %% 
 %%% From File: $Id: scrlfile-hook.dtx$
 \ProvidesPackage{scrlfile-hook}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (using LaTeX hooks)]
 \@ifundefined{IfFormatAtLeastTF}{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-patcholdlatex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-patcholdlatex.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile-patcholdlatex.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -41,7 +41,7 @@
 %% 
 %%% From File: $Id: scrlfile-patcholdlatex.dtx 3874 2022-06-05 10:38:02Z kohm $
 \ProvidesPackage{scrlfile-patcholdlatex}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (patching old LaTeX kernels)]
 \@ifundefined{IfFormatAtLeastTF}{}{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -41,7 +41,7 @@
 %% 
 %%% From File: $Id: scrlfile.dtx 4032 2023-04-17 09:45:11Z kohm $
 \ProvidesPackage{scrlfile}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (file load hooks)]
 \@ifundefined{IfFormatAtLeastTF}{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrlogo.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrlogo.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrlogo.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,7 +40,7 @@
 %% 
 %%% From File: $Id: scrlogo.dtx 4032 2023-04-17 09:45:11Z kohm $
 \ProvidesPackage{scrlogo}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
    package
   (logo)]
 \@ifundefined{KOMAScript}{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls	2025-08-20 19:59:36 UTC (rev 76100)
@@ -73,7 +73,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -98,7 +98,7 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at clsextension}{\@clsextension}
 \AtBeginDocument{%
   \let\scr at clsextension\@clsextension
@@ -110,13 +110,13 @@
   letter%
 }
 \ProvidesClass{\KOMAClassName}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   document class (\ClassName)%
 ]
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: load)
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: init)
 \newcommand*
   {\scr at compatibility}{\scr at v@last}
@@ -209,10 +209,11 @@
 \@namedef{scr at v@3.43}{34300}
 \@namedef{scr at v@3.44}{34400}
 \@namedef{scr at v@3.45}{34500}
-\@namedef{scr at v@last}{34500}
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+\@namedef{scr at v@3.46}{34600}
+\@namedef{scr at v@last}{34600}
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: init)
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: option)
 \KOMA at key{version}[last]{%
   \scr at ifundefinedorrelax{scr at v@#1}{%
@@ -331,7 +332,7 @@
   \fi
 }
 \KOMA at kav@add{\KOMAClassFileName}{overfullrule}{false}
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: option)
 \newcommand*{\lco at test}{%
   \IfFileExists{\CurrentOption.lco}{%
@@ -372,7 +373,7 @@
 }{numericaldate}{true}
 \KOMA at DeclareDeprecatedOption{scrdate}{numericaldate=true}
 \KOMA at DeclareDeprecatedOption{orgdate}{numericaldate=false}
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
 \providecommand*\@ptsize{%
   12%
@@ -533,7 +534,7 @@
 %%%            (run: option)
 %%% From File: $Id: scrkernel-pseudolengths.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: options)
 \KOMA at key{twoside}[true]{%
   \if at atdocument\else\PassOptionsToPackage{twoside=#1}{typearea}\fi%
@@ -935,7 +936,7 @@
 \KOMA at DeclareDeprecatedOption{cleardoubleempty}{cleardoublepage=empty}
 \KOMA at DeclareDeprecatedOption{cleardoubleplain}{cleardoublepage=plain}
 \KOMA at DeclareDeprecatedOption{cleardoublestandard}{cleardoublepage=current}
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: option)
 %%% From File: $Id: scrkernel-footnotes.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: option)
@@ -1010,7 +1011,7 @@
   \relax}
 %%% From File: $Id: scrkernel-listsandtabulars.dtx 4138 2025-02-10 13:55:51Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-notepaper.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-notepaper.dtx 4191 2025-07-28 07:01:41Z kohm $
 %%%            (run: option)
 \KOMA at ifkey{firsthead}{@firsthead}
 \KOMAExecuteOptions{firsthead=true}
@@ -1575,7 +1576,7 @@
   parskip=false,%
 }
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: body)
 \AtBeginDocument{%
   \begingroup
@@ -1635,7 +1636,7 @@
     \expandafter\endgroup\@tempa
   }%
 \fi
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \newcommand*\scr at setlength[4]{%
   \expandafter\ifnum\scr at v@is at lt{3.12}\relax
@@ -2263,7 +2264,7 @@
   `parskip' with one of it's several values}
 \scr at package@not at recommended{titleps}{%
   package `scrlayer-scrpage'}
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \newcommand*{\LoadLetterOption}[1]{%
   \@ifundefined{@restore at catcode@level}%
@@ -2349,7 +2350,7 @@
       }{}%
     }%
   \endgroup
-  \scr at gobbleopt
+  \@gobble at o
 }
 \newcommand*{\LoadLetterOptions}[1]{%
   \begingroup
@@ -3308,7 +3309,7 @@
     Internal macro `\string\@addtoplength' is deprecated.\MessageBreak
     Please use `\string\addtoplength' instead}%
   \addtoplength}
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \let\@BCOR                =\relax
 \let\@@BCOR               =\relax
@@ -3551,7 +3552,7 @@
 }
 \pagestyle{plain}
 \pagenumbering{arabic}
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 %%% From File: $Id: scrkernel-footnotes.dtx 4032 2023-04-17 09:45:11Z kohm $
 %%%            (run: body)
@@ -3876,7 +3877,7 @@
 \setlength\arrayrulewidth{.4\p@}
 \setlength\doublerulesep{2\p@}
 \setlength\tabbingsep{\labelsep}
-%%% From File: $Id: scrkernel-notepaper.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-notepaper.dtx 4191 2025-07-28 07:01:41Z kohm $
 %%%            (run: body)
 
 \newkomavar{firsthead}
@@ -4842,13 +4843,13 @@
           \@set at reffields%
           \if at tempswa
             \ifnum \@datepos=1 \@set at reffield{date}\fi%
-            \sbox\z@{\usekomafont{refname}\strutbox}%
+            \sbox\z@{\usekomafont{refname}\strut}%
             \ifdim\ht\z@>\ht\strutbox
               \ClassWarningNoLine{scrlttr2}{%
                 Font element `refname' should not be larger than
                 \string\normalsize!}%
             \fi
-            \sbox\z@{\usekomafont{refvalue}\strutbox}%
+            \sbox\z@{\usekomafont{refvalue}\strut}%
             \ifdim\ht\z@>\ht\strutbox
               \ClassWarningNoLine{scrlttr2}{%
                 Font element `refvalue' should not be larger than

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrreport.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrreport.cls	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrreport.cls	2025-08-20 19:59:36 UTC (rev 76100)
@@ -38,7 +38,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -63,7 +63,7 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at clsextension}{\@clsextension}
 \AtBeginDocument{%
   \let\scr at clsextension\@clsextension
@@ -77,7 +77,7 @@
 \newcommand*{\KOMALongClassFileName}{\KOMALongClassName.\@clsextension}
 \edef\KOMALongClassFileName{\KOMALongClassFileName}
 \ProvidesClass{\KOMALongClassName}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   document class (\ClassName)%
 ]
 \let\ClassName\relax

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls	2025-08-20 19:59:36 UTC (rev 76100)
@@ -6,6 +6,7 @@
 %%
 %% scrkernel-version.dtx  (with options: `class,report')
 %% scrkernel-basics.dtx  (with options: `class,load')
+%% tocbasic.dtx  (with options: `class,load')
 %% scrkernel-listsof.dtx  (with options: `class,report,prepare')
 %% scrkernel-tocstyle.dtx  (with options: `class,report,prepare')
 %% scrkernel-sections.dtx  (with options: `class,report,prepare')
@@ -84,7 +85,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -109,7 +110,7 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at clsextension}{\@clsextension}
 \AtBeginDocument{%
   \let\scr at clsextension\@clsextension
@@ -121,17 +122,22 @@
   report%
 }
 \ProvidesClass{\KOMAClassName}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   document class (\ClassName)%
 ]
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: load)
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
-%%% From File: $Id: scrkernel-listsof.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
+\RequirePackage[enablepatch=caption]{tocbasic}[%
+  2025/08/19 v3.46 KOMA-Script
+]
+\ExplSyntaxOn
+\tocbasic_define_caption_keys:n { table }
+\tocbasic_define_caption_keys:n { figure }
+\ExplSyntaxOff
+%%% From File: $Id: scrkernel-listsof.dtx 4193 2025-08-12 14:24:39Z kohm $
 %%%            (run: prepare)
-\RequirePackage{tocbasic}[%
-  2025/06/04 v3.45 KOMA-Script
-]
 \AtAddToTocList[\@currname.\@currext]{\setuptoc{\@currext}{onecolumn}}%
 \AtAddToTocList[ToC]{\setuptoc{\@currext}{onecolumn}}%
 \addtotoclist[ToC]{toc}
@@ -141,9 +147,9 @@
   \expandafter{\ext at toc}%
 }
 \AtAddToTocList[float]{\setuptoc{\@currext}{onecolumn}}%
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: prepare)
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: prepare)
 \newif\if at openright
 \@openrightfalse
@@ -230,7 +236,7 @@
 \newcommand*{\size at subparagraph}{}
 \newcommand*{\scr at fnt@subparagraph}{\size at subparagraph}
 \newcommand*{\sectfont}{\normalcolor\maybesffamily\bfseries}
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: init)
 \newcommand*
   {\scr at compatibility}{\scr at v@last}
@@ -323,10 +329,11 @@
 \@namedef{scr at v@3.43}{34300}
 \@namedef{scr at v@3.44}{34400}
 \@namedef{scr at v@3.45}{34500}
-\@namedef{scr at v@last}{34500}
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+\@namedef{scr at v@3.46}{34600}
+\@namedef{scr at v@last}{34600}
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: init)
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: option)
 \newif\if at scr@emulatestandardclasses
 \let\scr at emulatestandardclassestrue\relax
@@ -482,7 +489,7 @@
 \DeclareOption{fleqn}{\input{fleqn.clo}}
 %%% From File: $Id: scrkernel-language.dtx 4140 2025-02-22 12:39:23Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
 \providecommand*\@ptsize{%
   11%
@@ -639,7 +646,7 @@
                            {sfdefaults}{\if at sfdefaults true\else false\fi}%
   \fi
 }
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: options)
 \KOMA at key{twoside}[true]{%
   \if at atdocument\else\PassOptionsToPackage{twoside=#1}{typearea}\fi%
@@ -969,9 +976,9 @@
 \KOMA at ifkey{abstract}{@abstrt}
 \KOMA at DeclareDeprecatedOption{abstracton}{abstract=true}
 \KOMA at DeclareDeprecatedOption{abstractoff}{abstract=false}
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: option)
 \KOMA at key{open}{%
   \KOMA at set@ncmdkey{open}{@tempa}{%
@@ -1461,12 +1468,19 @@
 \KOMA at DeclareDeprecatedOption{cleardoubleempty}{cleardoublepage=empty}
 \KOMA at DeclareDeprecatedOption{cleardoubleplain}{cleardoublepage=plain}
 \KOMA at DeclareDeprecatedOption{cleardoublestandard}{cleardoublepage=current}
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: option)
 \newif\if at captionabove\@captionabovefalse
-\newif\if at tablecaptionabove\@tablecaptionabovefalse
-\newif\if at figurecaptionabove\@figurecaptionabovefalse
 \newif\ifonelinecaptions\onelinecaptionstrue
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionSinglelinecheck{koma}{%
+    \ifonelinecaptions
+      \expandafter\@firstoftwo
+    \else
+      \expandafter\@secondoftwo
+    \fi}%
+  \SetCaptionDefault{singlelinecheck}{koma}%
+}
 \newcommand*{\scap at pos}{r}
 \newcommand*{\scap at valign}{b}
 \KOMA at key{captions}{%
@@ -1492,36 +1506,32 @@
   }{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed
     \ifcase \@tempa\relax % heading
-      \@tablecaptionabovetrue
-      \@figurecaptionabovetrue
-      \@captionabovetrue
+      \SetKeys[tocbasic]{captionabove}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{heading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{signature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{heading}%
-   \or % signature
-      \@tablecaptionabovefalse
-      \@figurecaptionabovefalse
-      \@captionabovefalse
+    \or % signature
+      \SetKeys[tocbasic]{captionbelow}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{heading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{signature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{signature}%
     \or % tableheading
-      \@tablecaptionabovetrue
+      \SetKeys[tocbasic]{tablecaptionabove}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tableheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tablesignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{tableheading}%
     \or % tablesignature
-      \@tablecaptionabovefalse
+      \SetKeys[tocbasic]{tablecaptionbelow}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tableheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{tablesignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{tablesignature}%
     \or % figureheading
-      \@figurecaptionabovetrue
+      \SetKeys[tocbasic]{figurecaptionabove}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figureheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figuresignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{figureheading}%
     \or % figuresignature
-      \@figurecaptionabovefalse
+      \SetKeys[tocbasic]{figurecaptionbelow}
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figureheading}%
       \KOMA at kav@remove{\KOMAClassFileName}{captions}{figuresignature}%
       \KOMA at kav@add{\KOMAClassFileName}{captions}{figuresignature}%
@@ -1585,8 +1595,6 @@
   \fi
 }
 \KOMA at kav@add{\KOMAClassFileName}{captions}{signature}
-\KOMA at kav@add{\KOMAClassFileName}{captions}{tablesignature}
-\KOMA at kav@add{\KOMAClassFileName}{captions}{figuresignature}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{oneline}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{rightbeside}
 \KOMA at kav@add{\KOMAClassFileName}{captions}{bottombeside}
@@ -1667,7 +1675,7 @@
   \csname FN at mf@prepare\endcsname
   \ifhmode\spacefactor\@x at sf\fi
   \relax}
-%%% From File: $Id: scrkernel-listsof.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-listsof.dtx 4193 2025-08-12 14:24:39Z kohm $
 %%%            (run: option)
 \newif\if at tocleft
 \KOMA at key{toc}{%
@@ -2117,7 +2125,7 @@
 \KOMA at DeclareStandardOption{openbib}{bibliography=openstyle}
 \KOMA at DeclareDeprecatedOption{bibtotoc}{bibliography=totoc}
 \KOMA at DeclareDeprecatedOption{bibtotocnumbered}{bibliography=totocnumbered}
-%%% From File: $Id: scrkernel-index.dtx 4052 2023-05-05 11:41:51Z kohm $
+%%% From File: $Id: scrkernel-index.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: option)
 \newcommand*{\idx@@heading}{%
   \ifidx at leveldown
@@ -2223,7 +2231,7 @@
 \KOMA at DeclareDeprecatedOption{idxtotoc}{index=totoc}
 %%% From File: $Id: scrkernel-listsandtabulars.dtx 4138 2025-02-10 13:55:51Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: execoption)
 \KOMAExecuteOptions{headings=openany}
 \KOMAExecuteOptions{numbers=autoendperiod}
@@ -2234,7 +2242,7 @@
   headings=big%
 }
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: body)
 \AtBeginDocument{%
   \begingroup
@@ -2283,7 +2291,7 @@
     }%
   \endgroup
 }
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \newcommand*\scr at setlength[4]{%
   \expandafter\ifnum\scr at v@is at lt{3.12}\relax
@@ -2790,7 +2798,7 @@
         January\or February\or March\or April\or May\or June\or
         July\or August\or September\or October\or November\or December\fi
         \space\number\day, \number\year}%
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \let\@BCOR                =\relax
 \let\@@BCOR               =\relax
@@ -3393,10 +3401,10 @@
 \newcommand*\abstractname{Abstract}
 \providecaptionname{american,australian,british,canadian,english,newzealand,%
   UKenglish,ukenglish,USenglish,usenglish}\abstractname{Abstract}
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: body)
 \let\numberline\scr at numberline
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,part)
 \CloneTOCEntryStyle{tocline}{part}
 \TOCEntryStyleStartInitCode{part}{%
@@ -3410,7 +3418,7 @@
   \expandafter\providecommand\expandafter*%
   \csname scr at tso@#1 at beforeskip\endcsname{2.25em \@plus\p@}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,chapter)
 \CloneTOCEntryStyle{tocline}{chapter}
 \TOCEntryStyleStartInitCode{chapter}{%
@@ -3430,7 +3438,7 @@
   \expandafter\providecommand\expandafter*%
   \csname scr at tso@#1 at beforeskip\endcsname{1.0em \@plus\p@}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,section)
 \CloneTOCEntryStyle{tocline}{section}
 \TOCEntryStyleStartInitCode{section}{%
@@ -3437,10 +3445,10 @@
   \expandafter\providecommand%
   \csname scr at tso@#1 at linefill\endcsname{\TOCLineLeaderFill\relax}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: class,style,default)
 \CloneTOCEntryStyle{section}{default}
-%%% From File: $Id: scrkernel-sections.dtx 4159 2025-06-04 11:52:05Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 4199 2025-08-19 10:12:30Z kohm $
 %%%            (run: body)
 \BeforeClosingMainAux{%
   \if at autodot\if at filesw\immediate\write\@mainaux{%
@@ -3908,13 +3916,15 @@
   \scr at ifundefinedorrelax{NR at gettitle}{%
     \scr at ifundefinedorrelax{GetTitleString}{%
       \begingroup
-        \let\label\@gobble
-        \let\index\@gobble
-        \let\glossary\@gobble
+        \DeclareExpandableDocumentCommand{\label}{som}{}%
+        \DeclareExpandableDocumentCommand{\index}{som}{}%
+        \DeclareExpandableDocumentCommand{\glossary}{som}{}%
+        \DeclareExpandableDocumentCommand{\zlabel}{som}{}%
         \scr at ifundefinedorrelax{UseHook}{}{%
           \UseHook{\KOMAClassName/option/section/reference/fallback}%
         }%
-        \protected at edef\@currentlabelname{#1}%
+        \let\protect\noexpand
+        \edef\@currentlabelname{\expandafter\detokenize{#1}}%
       \expandafter\expandafter\expandafter\endgroup
       \expandafter\def\expandafter\@currentlabelname\expandafter{%
         \@currentlabelname}%
@@ -5313,6 +5323,10 @@
   \setcounter{chapter}{0}%
   \setcounter{section}{0}%
   \gdef\@chapapp{\appendixname}%
+  \addtocontents{\ext at toc}{\def\protect\@chapapp{\protect\appendixname}}%
+  \doforeachtocfile[float]{%
+    \addtocontents{\@currext}{\def\protect\@chapapp{\protect\appendixname}}%
+  }%
   \gdef\thechapter{\@Alph\c at chapter}%
   \UseOneTimeHook{\KOMAClassName/appendix}%
   \csname appendixmore\endcsname
@@ -5630,7 +5644,21 @@
     \if at at@twocolumn
       \@nameuse{@make#1head}{#3}%
     \else
-      \@topnewpage[\@nameuse{@make#1head}{#3}]%
+      \edef\scr at restoreparsetup{%
+        \parskip\the\parskip
+        \parfillskip\the\parfillskip
+        \parindent\the\parindent
+      }%
+      \@topnewpage[%
+        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \scr at restoreparsetup
+        \vskip\topskip
+        \fi
+        \@nameuse{@make#1head}{#3\ifhmode\strut\fi}%
+        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \vskip\dimeval{\ht\strutbox-\dp\strutbox-\topskip+\parskip}%
+        \fi
+      ]%
     \fi
   \else
     \@nameuse{@make#1head}{#3}%
@@ -5672,7 +5700,21 @@
     \if at at@twocolumn
       \@nameuse{@makes#1head}{#2}%
     \else
-      \@topnewpage[\@nameuse{@makes#1head}{#2}]%
+      \edef\scr at restoreparsetup{%
+        \parskip\the\parskip
+        \parfillskip\the\parfillskip
+        \parindent\the\parindent
+      }%
+      \@topnewpage[%
+        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \scr at restoreparsetup
+        \vskip\topskip
+        \fi
+        \@nameuse{@makes#1head}{#2\ifhmode\strut\fi}%
+        \expandafter\ifnum\scr at v@is at ge{3.46}\relax
+        \vskip\dimeval{\ht\strutbox-\dp\strutbox-\topskip+\parskip}%
+        \fi
+      ]%
     \fi
   \else
     \@nameuse{@makes#1head}{#2}%
@@ -6533,7 +6575,7 @@
 \providecommand{\@mkdouble}[1]{%
   \@mkboth{#1}{#1}%
 }
-%%% From File: $Id: scrkernel-floats.dtx 4137 2024-11-27 13:27:13Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \newlength{\abovecaptionskip}
 \newlength{\belowcaptionskip}
@@ -6540,10 +6582,10 @@
 \setlength{\abovecaptionskip}{10\p@}
 \setlength{\belowcaptionskip}{0\p@}
 \newcommand*{\captionformat}{:\ }
-\newcommand{\scr at caption}{}
-\AtBeginDocument{\let\scr at caption\caption}
-\newcommand{\captionabove}{\@captionabovetrue\scr at caption}
-\newcommand{\captionbelow}{\@captionabovefalse\scr at caption}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionLabelSeparator{koma}{\captionformat}%
+  \SetCaptionDefault{labelseparator}{koma}%
+}
 \newcommand*{\scap at caption}{}
 \newcommand*{\scap at width}{\linewidth}
 \newcommand*{\scap at move}{\z@}
@@ -6666,26 +6708,42 @@
 \newcommand*\caplabelfont{\normalfont\normalcolor}
 \newcommand*{\scr at fnt@caption}{\capfont}
 \newcommand*{\scr at fnt@captionlabel}{\caplabelfont}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionFont{scr at font}{\scr at fnt@caption}%
+  \DeclareCaptionFont{scr at labelfont}{\scr at fnt@captionlabel}%
+  \SetCaptionDefault{font}{scr at font}%
+  \SetCaptionDefault{labelfont}{scr at labelfont}%
+}
 \newif\ifdofullc at p
 \dofullc at ptrue
 \newif\if at capbreak
 \@capbreakfalse
-\newcommand*{\setcapindent}{\kernel at ifstar{\@@setcapindent}{\@setcapindent}}
-\newcommand*{\@setcapindent}[1]{%
-  \setlength{\@tempdima}{#1}%
-  \ifdim\@tempdima>\hsize
-    \addtolength{\@tempdima}{-\hsize}\@capbreaktrue
-  \else
-    \@capbreakfalse
-  \fi
-  \edef\cap at indent{\the\@tempdima}%
-  \dofullc at pfalse
-}
-\newcommand*{\@@setcapindent}[1]{%
-  \setlength{\@tempdima}{#1}%
-  \edef\cap at indent{\the\@tempdima}%
-  \dofullc at pfalse\@capbreaktrue
-}
+\ExplSyntaxOn
+\NewDocumentCommand { \setcapindent } { s m }
+  {
+    \IfBooleanTF {#1}
+      {
+        \cs_set:Npe \cap at indent { \dim_eval:n { #2 } }
+        \@capbreaktrue
+      }
+      {
+        \cs_set:Npe \cap at indent { \dim_eval:n { #2 } }
+        \@capbreakfalse
+      }
+    \dofullc at pfalse
+    \__scrkernel_at_caption_package:n
+      {
+        \exp_args:No \msg_warning:nnee { \KOMAClassName }
+          { using-caption }
+          { \token_to_str:N\setcapindent\IfBooleanT{#1}*{#2} }
+          {
+            \token_to_str:N \captionsetup
+              { indent=\ifdim\cap at indent<\z@\z@\else\cap at indent\fi }
+          }
+        \captionsetup { indent=\ifdim\cap at indent<\z@\z@\else\cap at indent\fi }
+      }
+  }
+\ExplSyntaxOff
 \newcommand*{\setcaphanging}{\dofullc at ptrue\@capbreakfalse}
 \expandafter\ifnum\scr at v@is at ge{3.41}%
   \newcommand*{\captionnopagebreak}{\nopagebreak}
@@ -6692,229 +6750,220 @@
 \else
   \newcommand*{\captionnopagebreak}{}
 \fi
+\newcommand*{\@abovecaptionbreak}{}
+\newcommand*{\@belowcaptionbreak}{}
+\let\@belowcaptionbreak\captionnopagebreak
+\IfFormatAtLeastTF{2023/11/01}{%
+  \NewSocketPlug{tocbasic/swapskip/after}{swapbreak}{%
+    \let\@abovecaptionbreak\captionnopagebreak
+    \let\@belowcaptionbreak\relax
+  }%
+  \AssignSocketPlug{tocbasic/swapskip/after}{swapbreak}%
+}{%
+  \AddToHook{tocbasic/swapskip/after}{&
+    \let\@abovecaptionbreak\captionnopagebreak
+    \let\@belowcaptionbreak\relax
+  }%
+}
 \newcommand{\@makecaption}[2]{%
-  \if at captionabove
-    \vskip\belowcaptionskip
-  \else
-    \captionnopagebreak\vskip\abovecaptionskip\captionnopagebreak
-  \fi
+  \@abovecaptionbreak\vskip\abovecaptionskip\@abovecaptionbreak
   \@@makecaption\@firstofone{#1}{#2}%
-  \if at captionabove
-    \captionnopagebreak\vskip\abovecaptionskip\captionnopagebreak
-  \else
-    \vskip\belowcaptionskip
-  \fi
+  \@belowcaptionbreak\vskip\belowcaptionskip\@belowcaptionbreak
 }
 \newcommand*{\cap at width}{\hsize}
 \newcommand*{\cap at left}{\hfill}
 \newcommand*{\cap at right}{\hfill}
-\newcommand*{\setcapwidth}[2][]{%
-  \begingroup%
-    \setlength{\@tempdima}{#2}%
-    \ifdim\@tempdima <\z@
-      \@tempdima\z@
-      \ClassWarning{\KOMAClassName}{%
-        caption width less than 0pt not allowed.\MessageBreak
-        Setting caption width to 0pt%
-      }%
-    \fi
-    \edef\@tempa{\endgroup\def\noexpand\cap at width{\the\@tempdima}}%
-  \@tempa
-  \begingroup
-    \edef\@tempa{#1}%
-    \def\@tempb{c}\ifx\@tempa\@tempb
-      \endgroup
-      \def\cap at margin{\let\cap at left=\hfill\let\cap at right=\hfill}%
-    \else
-      \def\@tempb{l}\ifx\@tempa\@tempb
-        \endgroup
-        \def\cap at margin{\let\cap at left=\relax\let\cap at right\hfill}%
-      \else
-        \def\@tempb{r}\ifx\@tempa\@tempb
-          \endgroup
-          \def\cap at margin{\let\cap at left=\hfill\let\cap at right=\relax}%
-        \else
-          \def\@tempb{i}\ifx\@tempa\@tempb
-            \endgroup
-            \def\cap at margin{%
-              \let\cap at left=\relax
-              \let\cap at right=\hfill
-              \if at twoside
-                \Ifthispageodd{}{%
-                  \let\cap at left=\hfill
-                  \let\cap at right=\relax
-                }%
-              \fi
-            }%
-          \else
-            \def\@tempb{o}\ifx\@tempa\@tempb
-              \endgroup
-              \def\cap at margin{%
-                \let\cap at left=\hfill
-                \let\cap at right=\relax
-                \if at twoside
-                  \Ifthispageodd{}{%
-                    \let\cap at left=\relax
-                    \let\cap at right=\hfill
-                  }%
-                \fi
-              }%
+\ExplSyntaxOn
+\prop_put:Non \g_msg_module_type_prop { \KOMAClassName } { Class }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { minimum-value-needed }
+  {
+    You've~tried~#2~\msg_line_context:,~
+    but~values~less~than~#1~are~not~allowed.~
+    Using~#1~instead.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { caption-not-support-setcapwidth-option }
+  {
+    Ignoring~command~
+    \token_to_str:N \setcapwidth [#1]{...}\\
+    because~the~caption~package~is~being\\
+    used~\msg_line_context:.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { caption-not-support-setcapdynwidth }
+  {
+    Ignoring~\token_to_str:N \setcapdynwidth \c_space_token
+    because~the~caption~package~is~being~used~\msg_line_context:.
+  }
+\exp_args:No \msg_new:nnnn { \KOMAClassName }
+  { setcaption-unknown-option }
+  { unknown~optional~position~argument~[#1]~\msg_line_context: }
+  {
+    Only~ONE~of~c,~l,~r,~i,~o~is~allowed~as~optional~argument~to~
+    \token_to_str:N \setcapwidth \c_space_tl and~
+    \token_to_str:N \setcapdynwidth \c_space_tl \msg_line_context:.
+  }
+\exp_args:No \msg_new:nnn { \KOMAClassName }
+  { using-caption }
+  {
+    Mapping~of\\
+    \c_space_tl #1\\
+    to\\
+    \c_space_tl #2\\
+    because~the~caption~package~is~being~used.\\
+    When~using~the~caption~package,~it~is~recommended\\
+    to~use~the~options~of~this~package~directly~instead\\
+    of~the~KOMA-Script~setting~\msg_line_context:.
+  }
+\NewDocumentCommand { \setcapwidth } { om }
+  {
+    \dim_compare:nNnTF { #2 } < { \c_zero_dim }
+      {
+        \exp_args:No \msg_warning:nnne { \KOMAClassName }
+          { minimum-value-needed } { 0pt } { \dim_eval:n { #2 } }
+        \def\cap at width{0pt}
+      }
+      {
+        \cs_set:Npe \cap at width { \dim_eval:n { #2 } }
+      }
+    \IfPackageLoadedF { caption } { \__scrkernel_set_cap_left_right:n { #1 } }
+    \__scrkernel_at_caption_package:n
+      {
+        \IfValueTF { #1 }
+          {
+            \exp_args:No \msg_warning:nne { \KOMAClassName }
+              { caption-not-support-setcapwidth-option } { #1 }
+          }
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapwidth{#2} }
+              { \token_to_str:N \captionsetup { width=\cap at width } }
+            \captionsetup { width=\cap at width }
+          }
+      }
+  }
+\cs_new:Nn \__scrkernel_at_caption_package:n
+  {
+    \IfPackageLoadedTF { caption3 }
+      {
+        \cs_if_eq:NNTF \AtCaptionPackage \@notprerr
+          { #1 }
+          { \AtCaptionPackage { #1 } }
+      }
+      {
+        \hook_gput_code:nnn { pkg / caption3 / after } { \KOMAClassName }
+          { \AtCaptionPackage { #1 } }
+      }
+  }
+\__scrkernel_at_caption_package:n
+  {
+    \cs_set:Nn \__scrkernel_at_caption_package:n { ##1 }
+  }
+\cs_new:Nn \__scrkernel_set_cap_left_right:n
+  {
+    \str_case:enF { #1 }
+      {
+        { c } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \hfill } }
+        { l } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \relax
+                                          \cs_set_eq:NN \cap at right \hfill } }
+        { r } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \relax } }
+        { i } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \relax
+                                          \cs_set_eq:NN \cap at right \hfill
+                                          \if at twoside
+                                            \Ifthispageodd {} {
+                                              \cs_set_eq:NN \cap at left  \hfill
+                                              \cs_set_eq:NN \cap at right \relax
+                                            }
+                                          \fi } }
+        { o } { \cs_set:Npn \cap at margin { \cs_set_eq:NN \cap at left  \hfill
+                                          \cs_set_eq:NN \cap at right \relax
+                                          \if at twoside
+                                            \Ifthispageodd {
+                                              \cs_set_eq:NN \cap at left  \relax
+                                              \cs_set_eq:NN \cap at right \hfill
+                                            } { }
+                                          \fi } }
+      }
+      {
+        \IfValueT{ #1 }
+          {
+            \exp_args:No \msg_error:nnn { \KOMAClassName }
+              { setcaption-unknown-option } { #1 }
+          }
+      }
+  }
+\NewDocumentCommand { \setcapdynwidth } { om }
+  {
+    \IfPackageLoadedTF { caption }
+      {
+        \exp_args:No \msg_warning:nn { \KOMAClassName }
+          { caption-not-support-setcapdynwidth }
+      }
+      {
+        \cs_set:Npn \cap at width { #2 }
+        \__scrkernel_set_cap_left_right:n { #1 }
+      }
+  }
+\ExplSyntaxOff
+\newcommand*{\cap at margin}{}
+\let\cap at margin=\relax%
+\ExplSyntaxOn
+\NewDocumentCommand {\setcapmargin} { s O{#3} m }
+  {
+    \IfBooleanTF {#1}
+      {
+        \cs_set:Npn \cap at margin
+          {
+            \onelinecaptionsfalse
+            \cs_set:Npe \cap at width { \dim_eval:n { \hsize - #2 - #3 } }
+            \if at twoside
+              \Ifthispageodd
+                {
+                  \cs_set:Npn \cap at left  { \hspace*{#2} }
+                  \cs_set:Npn \cap at right { \hspace*{#3} }
+                }
+                {
+                  \cs_set:Npn \cap at left  { \hspace*{#3} }
+                  \cs_set:Npn \cap at right { \hspace*{#2} }
+                }
             \else
-              \ifx \@tempa\@empty\else
-                \ClassError{\KOMAClassName}{%
-                  unknown optional position argument%
-                }{%
-                  You've used `#1' as position argument at
-                  \string\setcaptionwidth,\MessageBreak
-                  but only ONE of `c', `l', `r', `i`, `o` ist
-                  allowed.\MessageBreak
-                  Argument will be ignored, if you'll continue.%
-                }%
-              \fi
-              \endgroup
-  \fi\fi\fi\fi\fi
-}
-\newcommand*{\setcapdynwidth}[2][]{%
-  \def\cap at width{#2}%
-  \begingroup
-    \edef\@tempa{#1}%
-    \def\@tempb{c}\ifx\@tempa\@tempb
-      \endgroup
-      \def\cap at margin{%
-        \ifdim \cap at width<\z@
-          \ClassWarning{\KOMAClassName}{%
-            caption width less than 0pt not allowed.\MessageBreak
-            Setting caption width to 0pt%
-          }%
-          \let\cap at width\z@
-        \fi
-        \let\cap at left=\hfill\let\cap at right=\hfill}%
-    \else
-      \def\@tempb{l}\ifx\@tempa\@tempb
-        \endgroup
-        \def\cap at margin{%
-          \ifdim \cap at width<\z@
-            \ClassWarning{\KOMAClassName}{%
-              caption width less than 0pt not allowed.\MessageBreak
-              Setting caption width to 0pt%
-            }%
-            \let\cap at width\z@
-          \fi
-          \let\cap at left=\relax\let\cap at right\hfill}%
-      \else
-        \def\@tempb{r}\ifx\@tempa\@tempb
-          \endgroup
-          \def\cap at margin{%
-            \ifdim \cap at width<\z@
-              \ClassWarning{\KOMAClassName}{%
-                caption width less than 0pt not allowed.\MessageBreak
-                Setting caption width to 0pt%
-              }%
-              \let\cap at width\z@
+              \cs_set:Npn \cap at left  { \hspace*{#2} }
+              \cs_set:Npn \cap at right { \hspace*{#3} }
             \fi
-            \let\cap at left=\hfill\let\cap at right=\relax}%
-        \else
-          \def\@tempb{i}\ifx\@tempa\@tempb
-            \endgroup
-            \def\cap at margin{%
-              \ifdim \cap at width<\z@
-                \ClassWarning{\KOMAClassName}{%
-                  caption width less than 0pt not allowed.\MessageBreak
-                  Setting caption width to 0pt%
-                }%
-                \let\cap at width\z@
-              \fi
-              \let\cap at left=\relax
-              \let\cap at right=\hfill
-              \if at twoside
-                \Ifthispageodd{}{%
-                  \let\cap at left=\hfill
-                  \let\cap at right=\relax
-                }%
-              \fi
-            }%
-          \else
-            \def\@tempb{o}\ifx\@tempa\@tempb
-              \endgroup
-              \def\cap at margin{%
-                \ifdim \cap at width<\z@
-                  \ClassWarning{\KOMAClassName}{%
-                    caption width less than 0pt not allowed.\MessageBreak
-                    Setting caption width to 0pt%
-                  }%
-                  \let\cap at width\z@
-                \fi
-                \let\cap at left=\hfill
-                \let\cap at right=\relax
-                \if at twoside
-                  \Ifthispageodd{}{%
-                    \let\cap at left=\relax
-                    \let\cap at right=\hfill
-                  }%
-                \fi
-              }%
-            \else
-              \ifx \@tempa\@empty\else
-                \ClassError{\KOMAClassName}{%
-                  unknown optional position argument%
-                }{%
-                  You've used `#1' as position argument at
-                  \string\setcaptionwidth,\MessageBreak
-                  but only ONE of `c', `l', `r', `i`, `o` ist
-                  allowed.\MessageBreak
-                  Argument will be ignored, if you'll continue.%
-                }%
-              \fi
-              \endgroup
-  \fi\fi\fi\fi\fi
-}
-\newcommand*{\cap at margin}{}
-\let\cap at margin=\relax%
-\newcommand*{\setcapmargin}{\kernel at ifstar{\@setcapmargin}{\@@setcapmargin}}
-\newcommand*{\@setcapmargin}[2][\@tempdimb]{%
-  \def\cap at margin{%
-    \onelinecaptionsfalse
-    \begingroup
-      \setlength{\@tempdima}{\hsize}%
-      \setlength{\@tempdimb}{#2}%
-      \addtolength{\@tempdima}{-\@tempdimb}%
-      \setlength{\@tempdimc}{#1}%
-      \addtolength{\@tempdima}{-\@tempdimc}%
-      \edef\@tempa{\endgroup
-        \def\noexpand\cap at width{\the\@tempdima}%
-        \noexpand\if at twoside
-          \noexpand\Ifthispageodd{%
-            \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-            \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-          }{%
-            \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimc}}%
-            \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimb}}%
-          }%
-        \noexpand\else
-          \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-          \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-        \noexpand\fi
-      }%
-    \@tempa
-  }%
-}
-\newcommand*{\@@setcapmargin}[2][\@tempdimb]{%
-  \def\cap at margin{%
-    \onelinecaptionsfalse
-    \begingroup
-      \setlength{\@tempdima}{\hsize}%
-      \setlength{\@tempdimb}{#2}%
-      \addtolength{\@tempdima}{-\@tempdimb}%
-      \setlength{\@tempdimc}{#1}%
-      \addtolength{\@tempdima}{-\@tempdimc}%
-      \edef\@tempa{\endgroup
-        \def\noexpand\cap at width{\the\@tempdima}%
-        \def\noexpand\cap at left{\noexpand\hspace*{\the\@tempdimc}}%
-        \def\noexpand\cap at right{\noexpand\hspace*{\the\@tempdimb}}%
-      }%
-    \@tempa
-  }%
-}
+          }
+        \__scrkernel_at_caption_package:n
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapmargin*[#2]{#3} }
+              { \token_to_str:N \captionsetup { twoside, slc=0, margin={#2,#3} } }
+            \captionsetup{ twoside, slc=0, margin={#2,#3} }
+          }
+      }
+      {
+        \cs_set:Npn \cap at margin
+          {
+            \onelinecaptionsfalse
+            \cs_set:Npe \cap at width { \dim_eval:n { \hsize - #2 - #3 } }
+            \cs_set:Npn \cap at left  { \hspace*{#2} }
+            \cs_set:Npn \cap at right { \hspace*{#3} }
+          }
+        \__scrkernel_at_caption_package:n
+          {
+            \exp_args:No \msg_warning:nnne { \KOMAClassName }
+              { using-caption }
+              { \setcapmargin[#2]{#3} }
+              { \token_to_str:N \captionsetup { oneside, slc=0, margin={#2,#3} } }
+            \captionsetup{oneside,slc=0,margin={#2,#3}}
+          }
+      }
+  }
+\ExplSyntaxOff
+\NewHook{\KOMAClassName/makecaption/deactivate}
 \newcommand{\@@makecaption}[3]{%
   \cap at margin
   \begingroup
@@ -6921,9 +6970,12 @@
     \ifonelinecaptions
       \def\stepcounter##1{\advance\value{##1}\@ne}%
       \let\refstepcounter\stepcounter
-      \let\label\@gobble
+      \let\label\@gobble at om
+      \let\index\@gobble at som
+      \let\glossary\@gobble at om
       \let\@footnotetext=\@gobble
       \let\hypertarget\@gobbletwo
+      \UseHook{\KOMAClassName/makecaption/deactivate}%
       \edef\@xnewline{%
         \unexpanded{\ClassInfo{\KOMAClassName}{%
             Workaround for not recommended usage of \string\\ or\MessageBreak
@@ -7182,6 +7234,24 @@
   \endgroup
 }
 \newcommand*\raggedcaption{}
+\AddToHook{package/caption3/after}{%
+  \DeclareCaptionFormat{koma}[#1#2#3\par]{%
+    \ifdofullc at p
+      \caption at useformat{hang}{#1}{#2}{#3}%
+    \else
+      #1#2%
+      \ifdim\cap at indent<\z@
+        \par
+        \noindent\hspace*{-\cap at indent}%
+      \else\if at capbreak
+        \par
+      \fi\fi
+      #3\par
+    \fi}%
+  \SetCaptionDefault{format}{koma}
+  \DeclareCaptionLabelFormat{koma}{\bothIfFirst{#1}{\nobreakspace}#2\autodot}
+  \SetCaptionFallback{labelformat}{koma}
+}
 \newcommand*{\scr at caption@before at longtable@warning}[1]{%
   \ClassWarning{\KOMAClassName}{%
     you've loaded package `#1' before package\MessageBreak
@@ -7198,23 +7268,12 @@
 \AfterPackage{longtable}{%
   \if at komalongtable
     \renewcommand{\LT at makecaption}[3]{%
-      \noalign{%
-        \if at captionabove
-          \vskip\belowcaptionskip
-        \else
-          \vskip\abovecaptionskip
-        \fi
-      }%
       \LT at mcol\LT at cols c{%
         \hbox to\z@{\hss\parbox[t]\linewidth{%
-            \def\@captype{table}%
+            \if at captionabove\else\vskip\belowcaptionskip\fi
             \@@makecaption{#1}{#2}{#3}%
             \endgraf
-            \if at captionabove
-              \vskip\abovecaptionskip
-            \else
-              \vskip\belowcaptionskip
-            \fi
+            \if at captionabove\vskip\abovecaptionskip\fi
           }%
           \hss
         }%
@@ -7223,16 +7282,16 @@
     \newcommand*{\scr at LT@array}{}%
     \let\scr at LT@array=\LT at array
     \renewcommand*{\LT at array}{%
-      \let\scr at caption=\LT at caption
+      \def\@captype{table}%
+      \@ifundefined{LTcaptype}{}{%
+        \Ifstr{\LTcaptype}{}{}{\let\@captype\LTcaptype}%
+      }%
+      \csname tocbasic_if_caption_above:TF\endcsname
+        {\@captionabovetrue}{\@captionabovefalse}%
       \def\captionabove{\noalign{\global\@captionabovetrue}%
-        \scr at caption}%
+        \LT at caption}%
       \def\captionbelow{\noalign{\global\@captionabovefalse}%
-        \scr at caption}%
-      \if at tablecaptionabove
-        \let\LT at caption=\captionabove
-      \else
-        \let\LT at caption=\captionbelow
-      \fi
+        \LT at caption}%
       \scr at LT@array
     }%
     \ClassInfo{\KOMAClassName}{%
@@ -7263,15 +7322,6 @@
 \setcounter{dbltopnumber}{2}
 \renewcommand*\dbltopfraction{.7}
 \renewcommand*\dblfloatpagefraction{.5}
-\newcommand*{\captionof}[1]{\def\@captype{#1}%
-  \begingroup\expandafter\expandafter\expandafter\endgroup
-  \expandafter\ifx\csname if@#1captionabove\endcsname\iftrue
-    \@captionabovetrue
-  \fi
-  \scr at caption}
-\newcommand*{\captionaboveof}{\@captionabovetrue\captionof}
-\newcommand*{\captionbelowof}{\@captionabovefalse\captionof}
-\BeforePackage{capt-of}{\let\captionof\relax}
 \newenvironment{captionofbeside}[1]{%
   \def\@captype{#1}%
   \captionbeside
@@ -7293,10 +7343,6 @@
   floattype=1,
   tocentryindent=1.5em,
   tocentrynumwidth=2.3em,
-  atbegin=\def\caption{%
-    \if at figurecaptionabove\expandafter\captionabove
-    \else\expandafter\captionbelow\fi
-  }
 ]{lof}
 \expandafter\ifnum\scr at v@is at le{2.97d}%
   \renewcommand*\thefigure{\thechapter.\@arabic\c at figure}
@@ -7310,10 +7356,6 @@
   floattype=2,
   tocentryindent=1.5em,
   tocentrynumwidth=2.3em,
-  atbegin=\def\caption{%
-    \if at tablecaptionabove\expandafter\captionabove
-    \else\expandafter\captionbelow\fi
-  }
 ]{lot}
 \expandafter\ifnum\scr at v@is at le{2.97d}%
   \renewcommand*\thetable{\thechapter.\@arabic\c at table}
@@ -7480,7 +7522,7 @@
   \endgroup
   \@footnotemark
 }
-%%% From File: $Id: scrkernel-listsof.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-listsof.dtx 4193 2025-08-12 14:24:39Z kohm $
 %%%            (run: body)
 \g at addto@macro{\numberline at numberpostfix}{\autodot}
 \usetocbasicnumberline[%
@@ -7734,7 +7776,7 @@
 }
 \newcommand{\AfterBibliographyPreamble}{\g at addto@macro\bib at before@hook}
 \newcommand{\AtEndBibliography}{\g at addto@macro\bib at after@hook}
-%%% From File: $Id: scrkernel-index.dtx 4052 2023-05-05 11:41:51Z kohm $
+%%% From File: $Id: scrkernel-index.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \newcommand*{\index at preamble}{}
 \let\index at preamble=\relax

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrsize10pt.clo
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrsize10pt.clo	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrsize10pt.clo	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: 10pt)
 \ProvidesFile{%
   scrsize10pt.clo%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrsize11pt.clo
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrsize11pt.clo	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrsize11pt.clo	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: 11pt)
 %%%            (run: 12pt)
 \ProvidesFile{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrsize12pt.clo
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrsize12pt.clo	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrsize12pt.clo	2025-08-20 19:59:36 UTC (rev 76100)
@@ -40,9 +40,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-fonts.dtx 4034 2023-04-20 08:03:46Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $
 \ProvidesFile{%
   scrsize12pt.clo%
 }[\KOMAScriptVersion\space font size class option %

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/scrtime.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/scrtime.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/scrtime.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -43,7 +43,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -68,7 +68,7 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at pkgextension}{\@pkgextension}
 \AtBeginDocument{%
   \let\scr at pkgextension\@pkgextension
@@ -76,11 +76,11 @@
 %%% From File: $Id: scrtime.dtx 4145 2025-05-13 16:54:14Z kohm $
 \NeedsTeXFormat{LaTeX2e}[2022/06/01]
 \ProvidesPackage{scrtime}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (time of LaTeX run)%
 ]
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: load)
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
 %%% From File: $Id: scrtime.dtx 4145 2025-05-13 16:54:14Z kohm $

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -8,6 +8,7 @@
 %% tocbasic.dtx  (with options: `package,prepare')
 %% tocbasic.dtx  (with options: `package,option')
 %% tocbasic.dtx  (with options: `package,execoption')
+%% tocbasic.dtx  (with options: `package,preparebody')
 %% tocbasic.dtx  (with options: `package,body,deprecated')
 %% scrkernel-tocstyle.dtx  (with options: `package,body')
 %% scrkernel-tocstyle.dtx  (with options: `package,style,gobble')
@@ -52,15 +53,15 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: tocbasic.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
 %%%            (run: identify)
 \NeedsTeXFormat{LaTeX2e}[2022/06/01]
 \ProvidesPackage{tocbasic}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (handling toc-files)%
 ]
-%%% From File: $Id: tocbasic.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
 %%%            (run: prepare)
 \newif\if at tocbasic@old at latex@found
 \ifnum 0=\ifcsname IfFormatAtLeastTF\endcsname
@@ -83,18 +84,20 @@
 \scr at ifundefinedorrelax{NewDocumentCommand}{%
   \RequirePackage{xparse}[2018-04-12]%
 }{}
-%%% From File: $Id: tocbasic.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
 %%%            (run: option)
 \if at tocbasic@old at latex@found\else
   \ExplSyntaxOn
 
-  \bool_new:N \__tocbasic_patch_all_bool
-  \bool_new:N \__tocbasic_patch_starttoc_bool
-  \bool_new:N \__tocbasic_patch_chapter_bool
-  \bool_new:N \__tocbasic_patch_listoffigures_bool
-  \bool_new:N \__tocbasic_patch_listoftables_bool
+  \bool_new:N \g__tocbasic_patch_all_bool
+  \bool_new:N \g__tocbasic_patch_starttoc_bool
+  \bool_new:N \g__tocbasic_patch_chapter_bool
+  \bool_new:c { g__tocbasic_patch_chapter*_bool }
+  \bool_new:N \g__tocbasic_patch_listoffigures_bool
+  \bool_new:N \g__tocbasic_patch_listoftables_bool
 
-  \DeclareKeys
+  \bool_new:N \g__tocbasic_patch_caption_bool
+  \keys_define:nn { tocbasic }
     {
       enablepatch  .code             = \__tocbasic_endisable_patch:nn {#1} \c_true_bool,
       enablepatch  .usage            = preamble,
@@ -119,9 +122,9 @@
     {
       \clist_map_inline:nn { #1 }
         {
-          \cs_if_exist:cTF { __tocbasic_patch_##1_bool }
+          \cs_if_exist:cTF { g__tocbasic_patch_##1_bool }
             {
-              \bool_set_eq:cN { __tocbasic_patch_##1_bool } #2
+              \bool_set_eq:cN { g__tocbasic_patch_##1_bool } #2
             }
             {
               \exp_args:Nnnx \msg_warning:nnnn { tocbasic } { unknown-patch }
@@ -132,14 +135,176 @@
 
   \ExplSyntaxOff
 \fi
-%%% From File: $Id: tocbasic.dtx 4160 2025-06-04 11:53:33Z kohm $
+\if at tocbasic@old at latex@found\else
+\ExplSyntaxOn
+\bool_new:N \g__tocbasic__caption_above_bool
+\cs_new:Nn \tocbasic_define_caption_keys:n
+  {
+    \keys_if_exist:nnF { tocbasic } { #1captionabove }
+      {
+        \keys_define:nn { tocbasic }
+          {
+            #1captionabove .choice:,
+            #1captionabove / true .code:n       =
+              { \__tocbasic_set_caption_position_top_bottom:nn { #1 } { t } },
+            #1captionabove / false .code:n      =
+              { \__tocbasic_set_caption_position_top_bottom:nn { #1 } { b } },
+            #1captionabove / unknown .code:n    =
+              { \msg_error:nne { keys } { boolean-values-only } \l_keys_path_str },
+            #1captionabove .usage:n             = general,
+            #1captionabove .default:n           = true,
+            #1captionbelow .choice:,
+            #1captionbelow / true .code:n       =
+              { \__tocbasic_set_caption_position_top_bottom:nn { #1 } { b } },
+            #1captionbelow / false .code:n      =
+              { \__tocbasic_set_caption_position_top_bottom:nn { #1 } { t } },
+            #1captionbelow / unknown .code:n    =
+              { \msg_error:nne { keys } { boolean-values-only } \l_keys_path_str },
+            #1captionbelow .usage:n             = general,
+            #1captionbelow .default:n           = true,
+            #1captionposition .choice:,
+            #1captionposition / top .code:n     =
+              { \__tocbasic_set_caption_position_top_bottom:nn { #1 } { t } },
+            #1captionposition / bottom .code:n  =
+              { \__tocbasic_set_caption_position_top_bottom:nn { #1 } { b } },
+            #1captionposition .usage:n          = general,
+            #1captionposition .value_required:n = true,
+          }
+        \str_if_empty:nF { #1 }
+          {
+            \keys_define:nn { tocbasic }
+              {
+                #1captionposition / default .code:n =
+                  { \__tocbasic_set_caption_position_top_bottom:nn { #1 } { default } },
+                #1captionposition .initial:n = default
+              }
+          }
+        \cs_if_exist:NTF \captionsetup
+          {
+            \bool_if_exist:cTF { g__tocbasic_ #1 _caption_above_bool }
+              {
+                \exp_last_unbraced:Ne \captionsetup
+                  {
+                    \str_if_empty:nF {#1} {[#1]}
+                    {
+                      #1position=
+                      { \bool_if:cTF { g__tocbasic_ #1 _caption_above_bool } tb }
+                    }
+                  }
+              }
+              {
+                \tl_if_exist:cT { caption at opt@#1 }
+                  {
+                    \tl_if_empty:cF { caption at opt@#1 }
+                      { \clearcaptionsetup[position]{#1} }
+                  }
+              }
+          }
+          {
+            \tl_if_eq:VnT \everypar { \@nodocument }
+              {
+                \str_if_in:nnTF { ,table,figure,, } { ,#1, }
+                  {
+                    \exp_args:Ne \PassOptionsToPackage
+                      {
+                        #1position=
+                        \bool_if_exist:cTF { g__tocbasic_ #1 _caption_above_bool }
+                          { \bool_if:cTF { g__tocbasic_ #1 _caption_above_bool } tb }
+                          { default }
+                      }
+                      { caption }
+                  }
+                  {
+                    \hook_gput_code:nnn { package / caption / after } { tocbasic }
+                      {
+                        \bool_if_exist:cT { g__tocbasic_ #1 _caption_above_bool }
+                          {
+                            \exp_last_unbraced:Ne \captionsetup
+                              {
+                                \str_if_empty:nF {#1} {[#1]}
+                                { position=\bool_if:cTF { g__tocbasic_ #1 _caption_above_bool } tb }
+                              }
+                          }
+                      }
+                  }
+              }
+          }
+      }
+  }
+\cs_new:Nn \__tocbasic_set_caption_position_top_bottom:nn
+  {
+    \str_if_eq:nnTF { #2 } { default }
+      {
+        \bool_if_exist:cT { g__tocbasic_ #1 _caption_above_bool }
+          { \cs_undefine:c { g__tocbasic_ #1 _caption_above_bool } }
+        \cs_if_exist:NTF \clearcaptionsetup
+          {
+            \tl_if_exist:cT { caption at opt@#1 }
+              {
+                \tl_if_empty:cF { caption at opt@#1 }
+                  { \clearcaptionsetup[position]{ #1 } }
+              }
+          }
+          {
+            \tl_if_eq:VnT \everypar { \@nodocument }
+              {
+                \str_if_in:nnT { ,table,figure,, } { ,#1, }
+                  {
+                    \PassOptionsToPackage { #1position=#2 } { caption }
+                  }
+              }
+          }
+      }
+      {
+        \bool_if_exist:cF { g__tocbasic_ #1 _caption_above_bool }
+          { \bool_new:c { g__tocbasic_ #1 _caption_above_bool } }
+        \str_if_eq:nnTF { #2 } { t }
+          { \bool_set_true:c }
+          { \bool_set_false:c }
+          { g__tocbasic_ #1 _caption_above_bool }
+        \cs_if_exist:NTF \captionsetup
+          {
+            \exp_last_unbraced:Ne \captionsetup
+              { \str_if_empty:nF {#1} {[#1]} }
+              { position=#2 }
+          }
+          {
+            \tl_if_eq:VnT \everypar { \@nodocument }
+              {
+                \str_if_in:nnT { ,table,figure,, } { ,#1, }
+                  {
+                    \PassOptionsToPackage { #1position=#2 } { caption }
+                  }
+              }
+          }
+      }
+  }
+\tocbasic_define_caption_keys:n {}
+\clist_map_inline:nn { table, figure }
+  {
+    \bool_if:nT
+      {
+        { \cs_if_exist_p:c { #1 } && \cs_if_exist_p:c { end#1 } }
+        ||
+        { \cs_if_exist_p:c { #1- } && \cs_if_exist_p:c { end#1- } }
+      }
+      {
+        \tocbasic_define_caption_keys:n { #1 }
+      }
+  }
+
+\ExplSyntaxOff
+\fi
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
 %%%            (run: execoption)
 \if at tocbasic@old at latex@found
-  \ProcessOptions
+  \ProcessOptions\relax
 \else
-  \ProcessKeyOptions
+  \ProcessKeyOptions[tocbasic]
 \fi
-%%% From File: $Id: tocbasic.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
+%%%            (run: preparebody)
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
 %%%            (run: body)
 \if at tocbasic@old at latex@found\else
   \ExplSyntaxOn
@@ -159,46 +324,35 @@
   \AtBeginDocument
     {
 
-      \bool_if:NT \__tocbasic_patch_all_bool
+      \bool_if:NT \g__tocbasic_patch_all_bool
         {
-          \bool_set_true:N \__tocbasic_patch_starttoc_bool
+          \bool_set_true:N \g__tocbasic_patch_starttoc_bool
           \cs_if_exist:NF \KOMAClassName
-            { \bool_set_true:N \__tocbasic_patch_chapter_bool }
-          \bool_set_true:N \__tocbasic_patch_listoffigures_bool
-          \bool_set_true:N \__tocbasic_patch_listoftables_bool
+            {
+              \bool_set_true:N \g__tocbasic_patch_chapter_bool
+              \bool_set_true:c { g__tocbasic_patch_chapter*_bool }
+            }
+          \bool_set_true:N \g__tocbasic_patch_listoffigures_bool
+          \bool_set_true:N \g__tocbasic_patch_listoftables_bool
+          \IfPackageLoadedTF{ caption } { }
+            { \bool_set_true:N \g__tocbasic_patch_caption_bool }
         }
 
-      \bool_if:NT \__tocbasic_patch_chapter_bool
+      \bool_if:NT \g__tocbasic_patch_chapter_bool
         {
-          \cs_if_exist:NTF \KOMAClassName
-            {
-              \exp_args:Nnnx \msg_warn:nnnn { tocbasic } { dangerous-patch }
-                { \KOMAClassName } { chapter }
-            }
-            {
-              \exp_args:Nnnx \msg_note:nnnn { tocbasic } { dangerous-patch }
-                { } { chapter }
-            }
-          \hook_gput_code:nnn { cmd/@makechapterhead/before } { tocbasic }
-            {
-              \doforeachtocfile[float]{
-                \addtocontents{\@currext}{\protect\addvspace{10\p@}}
-              }
-            }
+          \__tocbasic_chapter_patch_code:
         }
 
-      \bool_if:NT \__tocbasic_patch_starttoc_bool \tocbasicautomode
+      \bool_if:NT \g__tocbasic_patch_starttoc_bool \tocbasicautomode
 
-      \bool_if:NT \__tocbasic_patch_listoffigures_bool
+      \bool_if:NT \g__tocbasic_patch_listoffigures_bool
         {
-          \renewcommand*{\listoffigures}{\listoftoc{\ext at figure}}%
-          \providecommand*{\listoflofname}{\listfigurename}%
+          \__tocbasic_listof_patch_code:n{figure}
         }
 
-      \bool_if:NT \__tocbasic_patch_listoftables_bool
+      \bool_if:NT \g__tocbasic_patch_listoftables_bool
         {
-          \renewcommand*{\listoftables}{\listoftoc{\ext at table}}%
-          \providecommand*{\listoflotname}{\listtablename}%
+          \__tocbasic_listof_patch_code:n{table}
         }
 
     }
@@ -404,6 +558,38 @@
 \NewDocumentCommand\addxcontentslinetoeachtocfile{omom}{%
   \doforeachtocfile[{#1}]{\addxcontentsline{\@currext}{#2}[{#3}]{#4}}
 }
+\if at tocbasic@old at latex@found\else
+  \ExplSyntaxOn
+  \cs_new:Npn \__tocbasic_chapter_patch_code:
+    {
+      \cs_if_exist:NTF \KOMAClassName
+        {
+          \exp_args:Nnnx \msg_warn:nnnn { tocbasic } { dangerous-patch }
+            { \KOMAClassName } { chapter }
+        }
+        {
+          \exp_args:Nnnx \msg_note:nnnn { tocbasic } { dangerous-patch }
+            { } { chapter }
+        }
+      \hook_gput_code:nnn { cmd/@makechapterhead/before } { tocbasic }
+        {
+          \doforeachtocfile[float]{
+            \addtocontents{\@currext}{\tocbasic at chapter@skip}
+          }
+        }
+      \bool_if:cT { g__tocbasic_patch_chapter*_bool }
+        {
+          \hook_gput_code:nnn { cmd/@makeschapterhead/before } { tocbasic }
+            {
+              \doforeachtocfile[float]{
+                \addtocontents{\@currext}{\tocbasic at chapter@skip}
+              }
+            }
+        }
+      \ProvideDocumentCommand \tocbasic at chapter@skip { } { \addvspace{10\p@} }
+    }
+  \ExplSyntaxOff
+\fi
 \newcommand*{\tocbasic at starttoc}[1]{%
   \begingroup
     \tocbasic at reentrant@warning
@@ -507,9 +693,22 @@
     \tocbasic at starttoc{#2}%
   \endgroup
 }
-\IfPackageLoadedF{tocbibind}{%
+\if at tocbasic@old at latex@found\else
+  \ExplSyntaxOn
+  \cs_new:Nn \__tocbasic_listof_patch_code:n
+    {
+      \cs_set:cpn { listof#1s } { \exp_args:Nc \listoftoc { ext@#1  } }
+      \cs_if_exist:cF { listof \use:c { ext@#1 } name }
+        {
+          \cs_new:cpn { listof \use:c { ext@#1 } name }
+            { \use:c { list#1name } }
+        }
+    }
+  \ExplSyntaxOff
+\fi
+\IfPackageLoadedTF{tocbibind}{}{%
   \AtBeginDocument{%
-    \IfPackageLoadedT{tocbibind}{%
+    \IfPackageLoadedTF{tocbibind}{%
       \PackageInfo{tocbasic}{usage of `tocbibind' detected}%
       \newcommand*{\tb at tocbibindpatch}[3]{%
         \long\def\reserved at a{\tocfile{#2}{#1} }%
@@ -530,7 +729,7 @@
       \tb at tocbibindpatch{toc}{\contentsname}{\tableofcontents}%
       \tb at tocbibindpatch{lof}{\listfigurename}{\listoffigures}%
       \tb at tocbibindpatch{lot}{\listtablename}{\listoftables}%
-    }%
+    }{}%
   }%
 }
 \newcommand*{\listofname}{List of}
@@ -1038,6 +1237,10 @@
           \noexpand\csname \tb at nt@type @atend\noexpand\endcsname
           \noexpand\end at dblfloat
         }%
+        \if at tocbasic@old at latex@found\else
+          \expandafter\noexpand\csname tocbasic_define_caption_keys:n\endcsname
+            {\tb at nt@type}%
+        \fi
       }%
     \@tempa
     \@tempswatrue
@@ -1055,6 +1258,10 @@
           \noexpand\csname \tb at nt@type @atend\noexpand\endcsname
           \noexpand\endminipage\noexpand\endtrivlist
         }%
+        \if at tocbasic@old at latex@found\else
+          \expandafter\noexpand\csname tocbasic_define_caption_keys:n\endcsname
+            {\tb at nt@type}%
+        \fi
       }%
     \@tempa
     \@tempswatrue
@@ -1144,7 +1351,163 @@
   }%
 }
 \newcommand*{\tb at nt@autofloattype}{16}
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+\if at tocbasic@old at latex@found\else
+\ExplSyntaxOn
+\hook_gput_code:nnn { begindocument } { tocbasic }
+  {
+    \cs_set_eq:NN \__tocbasic_saved_caption:w \caption
+    \bool_if:NT \g__tocbasic_patch_caption_bool
+      {
+        \__tocbasic_caption_patch_code:
+      }
+  }
+\hook_gset_rule:nnnn { begindocument } { tocbasic } { after } { caption }
+\hook_gset_rule:nnnn { begindocument } { tocbasic } { after } { caption3 }
+
+\cs_new:Npn \__tocbasic_caption_patch_code:
+  {
+    \cs_set_eq:NN \caption \__tocbasic_caption:w
+    \cs_set_eq:NN \captionof \__tocbasic_caption_of:w
+  }
+\prg_new_conditional:Nnn \tocbasic_if_caption_above:n { p, T, F, TF }
+  {
+    \bool_if:nTF
+      {
+        \cs_if_exist_use:cF { g__tocbasic_ #1 _caption_above_bool }
+          {
+            \g__tocbasic__caption_above_bool
+          }
+      }
+      {
+        \prg_return_true:
+      }
+      {
+        \prg_return_false:
+      }
+  }
+\prg_new_conditional:Npnn \tocbasic_if_caption_above: { p, T, F, TF }
+  {
+    \bool_if:nTF
+      {
+        \cs_if_exist_use:cF { g__tocbasic_ \@captype _caption_above_bool }
+          {
+            \g__tocbasic__caption_above_bool
+          }
+      }
+      {
+        \prg_return_true:
+      }
+      {
+        \prg_return_false:
+      }
+  }
+\cs_new:Nn \__tocbasic_tocbasic_caption_setup:
+  {
+    \tocbasic_if_caption_above:TF
+      {
+        \cs_if_exist:NTF \captionsetup
+          { \captionsetup { position=top } }
+          { \__tocbasic_swap_skip: }
+      }
+      {
+        \cs_if_exist:NT \captionsetup
+          { \captionsetup { position=bottom } }
+      }
+  }
+\cs_new:Nn \__tocbasic_tocbasic_captionof_setup:n
+  {
+    \tocbasic_if_caption_above:nTF { #1 }
+      {
+        \cs_if_exist:NTF \captionsetup
+          { \captionsetup { type=#1, position=top } }
+          {
+            \tl_set:Nn \@captype { #1 }
+            \__tocbasic_swap_skip:
+          }
+      }
+      {
+        \cs_if_exist:NTF \captionsetup
+          { \captionsetup { type=#1, position=bottom } }
+          { \tl_set:Nn \@captype { #1 } }
+      }
+  }
+\NewDocumentCommand \__tocbasic_caption:w { s O{#3} m }
+  {
+    \group_begin:
+      \__tocbasic_tocbasic_caption_setup:
+      \exp_last_unbraced:Ne \__tocbasic_saved_caption:w { \IfBooleanT{#1}* }
+        [{#2}] {#3}
+    \group_end:
+  }
+\NewDocumentCommand \captionabove { s O{#3} m }
+  {
+    \group_begin:
+      \cs_if_exist:NTF \captionsetup
+        { \captionsetup { position=top } }
+        { \__tocbasic_swap_skip: }
+      \exp_last_unbraced:Ne \__tocbasic_saved_caption:w { \IfBooleanT{#1}* }
+        [{#2}] {#3}
+    \group_end:
+  }
+
+\NewDocumentCommand \captionbelow { s O{#3} m }
+  {
+    \group_begin:
+      \cs_if_exist:NT \captionsetup
+        { \captionsetup { position=bottom } }
+      \exp_last_unbraced:Ne \__tocbasic_saved_caption:w { \IfBooleanT{#1}* }
+        [{#2}] {#3}
+    \group_end:
+  }
+\NewDocumentCommand \__tocbasic_caption_of:w { s m O{#4} m }
+  {
+    \group_begin:
+      \__tocbasic_tocbasic_captionof_setup:n { #2 }
+      \exp_last_unbraced:Ne \__tocbasic_saved_caption:w { \IfBooleanT{#1}* } [{#3}] {#4}
+    \group_end:
+  }
+
+\cs_if_exist:NF { \captionof } { \cs_set_eq:NN \captionof \__tocbasic_caption_of:w }
+\cs_if_exist:NTF \socket_new:nn
+  { \socket_new:nn { tocbasic / swapskip / after } { 0 } }
+  { \hook_new:n { tocbasic / swapskip / after } }
+\cs_new:Nn \__tocbasic_swap_skip:
+  {
+    \skip_set_eq:NN \l_tmpa_skip \abovecaptionskip
+    \skip_set_eq:NN \abovecaptionskip \belowcaptionskip
+    \skip_set_eq:NN \belowcaptionskip \l_tmpa_skip
+    \cs_if_exist_use:NF \socket_use:n \hook_use:n
+      { tocbasic / swapskip / after }
+  }
+\NewDocumentCommand \captionaboveof { s m O{#4} m }
+  {
+    \group_begin:
+      \cs_if_exist:NTF \captionsetup
+        { \captionsetup { type=#2, position=top } }
+        {
+          \tl_set:Nn \@captype { #2 }
+          \__tocbasic_swap_skip:
+        }
+      \exp_last_unbraced:Ne \__tocbasic_saved_caption:w { \IfBooleanT{#1}* }
+        [{#3}] {#4}
+    \group_end:
+  }
+
+\NewDocumentCommand \captionbelowof { s m O{#4} m }
+  {
+    \group_begin:
+      \cs_if_exist:NTF \captionsetup
+        { \captionsetup { type=#2, position=bottom } }
+        {
+          \tl_set:Nn \@captype { #2 }
+        }
+      \exp_last_unbraced:Ne \__tocbasic_saved_caption:w { \IfBooleanT{#1}* }
+        [{#3}] {#4}
+    \group_end:
+  }
+\ExplSyntaxOff
+\fi
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: body)
 \newcommand*{\scr at numberline}[1]{%
   \numberline at box{%
@@ -1683,7 +2046,7 @@
     \let\DefineTOCEntryBooleanOption\relax
   }%
 }
-\newcommand*{\DeclareTOCStyleEntry}[3][]{%
+\NewDocumentCommand{\DeclareTOCStyleEntry}{+omm}{%
   \scr at ifundefinedorrelax{scr at dte@def at l@#2}{%
     \IfFileExists{tocbasic-tocstyle-#2.def}{%
       \edef\reserved at a{%
@@ -1707,7 +2070,7 @@
     \let\scr at dte@precheck\@gobble
     \def\scr at dte@current{#3}%
     \@ExecuteTOCEntryStyleInitCode{#2}{#3}%
-    \IfArgIsEmpty{#1}{}{%
+    \IfValueT{#1}{%
       \FamilyBoolKey[.dte]{KOMAarg}{expandtopt}{scr at dte@expandtopt}%
       \scr at dte@expandtoptfalse
       \FamilyExecuteOptions[.dte]{KOMAarg}{#1}%
@@ -1761,29 +2124,23 @@
     \fi
   }%
 }
-\newcommand*{\DeclareTOCStyleEntries}[3][]{%
+\NewDocumentCommand{\DeclareTOCStyleEntries}{+omm}{%
   \edef\reserved at a{#3}%
   \@for \reserved at a:=\reserved at a \do {%
     \scr at trim@spaces\reserved at a
     \ifx\reserved at a\@empty\else
-      \IfArgIsEmpty{#1}{%
+      \IfValueTF{#1}{%
         \edef\reserved at a{%
-          \unexpanded{\DeclareTOCStyleEntry{#2}}{\reserved at a}}%
+          \unexpanded{\DeclareTOCStyleEntry[{#1}]{#2}}{\reserved at a}}%
       }{%
         \edef\reserved at a{%
-          \unexpanded{\DeclareTOCStyleEntry[{#1}]{#2}}{\reserved at a}}%
+          \unexpanded{\DeclareTOCStyleEntry{#2}}{\reserved at a}}%
       }%
       \reserved at a
     \fi
   }%
 }
-\newcommand*{\DeclareTOCEntryStyle}[1]{%
-  \kernel at ifnextchar [%]
-    {\@DeclareTOCEntryStyle{#1}}%
-    {\@DeclareTOCEntryStyle{#1}[]}%
-}
-\newcommand{\@DeclareTOCEntryStyle}{}
-\long\def\@DeclareTOCEntryStyle#1[#2]#3{%
+\NewDocumentCommand{\DeclareTOCEntryStyle}{m+O{}+m}{%
   \@namedef{scr at dte@def at l@#1}##1{%
     \@namedef{l@##1}####1####2{%
       \TOC at EntryStartHook{##1}%
@@ -1807,10 +2164,10 @@
 \providecommand*\@pnumwidth{1.55em}
 \providecommand*\@tocrmarg {2.55em}
 \providecommand*\@dotsep   {4.5}
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: style,gobble)
 \DeclareTOCEntryStyle{gobble}{}%
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: style,dottedtocline)
 \DeclareTOCEntryStyle{dottedtocline}[{%
   \DefineTOCEntryLengthOption{indent}%
@@ -1954,7 +2311,7 @@
                    {\@nameuse{scr at tso@#1 at numwidth}}{##1}{##2}%
   }%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: style,undottedtocline)
 \DeclareTOCEntryStyle{undottedtocline}[{%
   \DefineTOCEntryLengthOption{indent}%
@@ -2124,7 +2481,7 @@
     \endgroup
   \fi
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: style, largetocline)
 \DeclareTOCEntryStyle{largetocline}[{%
   \DefineTOCEntryLengthOption{indent}%
@@ -2245,9 +2602,13 @@
     \endgroup
   \fi
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: style,tocline)
 \DeclareTOCEntryStyle{tocline}[{%
+  \DefineTOCEntryCommandOption{numberprefix}%
+    {scr at tso@}{@numberprefix}{number prefix definition}%
+  \DefineTOCEntryCommandOption{numberpostfix}%
+    {scr at tso@}{@numberpostfix}{number postfix definition}%
   \DefineTOCEntryLengthOption{beforeskip}%
     {scr at tso@}{@beforeskip}{vertical skip before the entry}%
   \DefineTOCEntryIfOption{breakafternumber}%
@@ -2298,6 +2659,8 @@
     {scr at tso@}{@indent}{entry indent}%
   \DefineTOCEntryLengthOption{numwidth}%
     {scr at tso@}{@numwidth}{entry number width}%
+  \ExpandArgs{c}\providecommand{scr at tso@#1 at numberprefix}{}%
+  \ExpandArgs{c}\providecommand{scr at tso@#1 at numberpostfix}{}%
   \scr at ifundefinedorrelax{#1tocdepth}{%
     \Ifstrstart{#1}{sub}{%
       \scr at ifundefinedorrelax{\scr at dte@nosub{#1}tocdepth}{}{%
@@ -2712,6 +3075,10 @@
       \advance\leftskip \@tempdima
       \null\nobreak\hskip -\leftskip
       {%
+        \l at preto@macro\numberline at numberprefix
+          {\@nameuse{scr at tso@#1 at numberprefix}}%
+        \l at addto@macro\numberline at numberpostfix
+          {\@nameuse{scr at tso@#1 at numberpostfix}}%
         \usetocbasicnumberline
         \let\scr at dte@numberline at box\numberline at box
         \def\numberline at box##1{%
@@ -2786,7 +3153,7 @@
     \mkern \@dotsep mu\hbox{#1}\mkern \@dotsep
     mu$}\hfill
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: style,toctext)
 \DeclareTOCEntryStyle{toctext}[{%
   \DefineTOCEntryLengthOption{beforeskip}%
@@ -2965,6 +3332,8 @@
   \csname Ifscr at tso@#1 at raggedright\endcsname[2]{##2}%
   \expandafter\providecommand%
   \csname scr at tso@#1 at prepagenumber\endcsname{\nobreakspace}%
+  \expandafter\providecommand%
+  \csname scr at tso@#1 at pagenumberformat\endcsname[1]{##1}%
 }]{%
   \scr at dte@toctext{#1}{##1}{##2}%
 }
@@ -3038,10 +3407,10 @@
 \newcommand*{\scr at dte@toctext at raggedright}{}
 \newcommand*{\scr at dte@toctext at parend}{}
 \newcommand*{\scr at dte@toctext at lastend}{}
-%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 4196 2025-08-15 09:12:57Z kohm $
 %%%            (run: style,dottedtocline)
 \CloneTOCEntryStyle{dottedtocline}{default}
-%%% From File: $Id: tocbasic.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: tocbasic.dtx 4185 2025-06-25 13:06:22Z kohm $
 %%%            (run: exit)
 \AtBeginDocument{%
   \@ifundefined{MakeMarkcase}{%

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/typearea.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/typearea.sty	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/typearea.sty	2025-08-20 19:59:36 UTC (rev 76100)
@@ -48,7 +48,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
 \providecommand*{\@CheckKOMAScriptVersion}{%
   \begingroup
     \ExplSyntaxOff
@@ -73,22 +73,22 @@
     }%
   \endgroup
 }
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
 \providecommand*{\scr at pkgextension}{\@pkgextension}
 \AtBeginDocument{%
   \let\scr at pkgextension\@pkgextension
 }
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: identify)
 \NeedsTeXFormat{LaTeX2e}[2022/06/01]
 \ProvidesPackage{typearea}[%
-  2025/06/04 v3.45 KOMA-Script
+  2025/08/19 v3.46 KOMA-Script
   package
   (type area)]
-%%% From File: $Id: scrkernel-basics.dtx 4146 2025-05-14 12:41:49Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 4198 2025-08-15 09:19:27Z kohm $
 %%%            (run: load)
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: init)
 \providecommand*
   {\scr at compatibility}{\scr at v@last}
@@ -182,13 +182,14 @@
 \@namedef{scr at v@3.43}{34300}
 \@namedef{scr at v@3.44}{34400}
 \@namedef{scr at v@3.45}{34500}
-\@namedef{scr at v@last}{34500}
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+\@namedef{scr at v@3.46}{34600}
+\@namedef{scr at v@last}{34600}
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: init)
 \providecommand\ta at divlist{{}{}{}{}{}{}{}{}{}{8}{10}{12}}
 \providecommand\ta at divlistelse{1}
 \newcommand*{\@lastdiv}{\z@}\let\@lastdiv\relax
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: option)
 \KOMA at key{version}[last]{%
   \scr at ifundefinedorrelax{scr at v@#1}{%
@@ -261,7 +262,7 @@
 \newcommand*{\scr at ta@v at is@ge}[1]{%
   \numexpr\scr at ta@compatibility+\@ne >\@nameuse{scr at v@#1}
 }
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: options)
 \providecommand*{\PaperNameToSize}[2][warning]{%
   \Ifstr{#2}{letter}{%
@@ -1048,9 +1049,9 @@
   \KOMAExecuteOptions{twoside=false}
 \fi
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-compatibility.dtx 4158 2025-06-04 11:50:03Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 4167 2025-06-05 14:12:28Z kohm $
 %%%            (run: body)
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: body)
 \newcommand*{\ta at divfor}[1]{%
   \ta at div=\z@
@@ -1799,7 +1800,7 @@
   \kernel at ifstar \l at addto@macro \g at addto@macro \@areaset at end
 }
 \newcommand*{\@areaset at end}{}
-%%% From File: $Id: scrkernel-typearea.dtx 4160 2025-06-04 11:53:33Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 4181 2025-06-14 09:11:13Z kohm $
 %%%            (run: final)
 \typearea[current]{current}
 %%% From File: $Id: scrlogo.dtx 4032 2023-04-17 09:45:11Z kohm $

Modified: trunk/Master/texmf-dist/tex/latex/koma-script/visualize.lco
===================================================================
--- trunk/Master/texmf-dist/tex/latex/koma-script/visualize.lco	2025-08-20 19:58:56 UTC (rev 76099)
+++ trunk/Master/texmf-dist/tex/latex/koma-script/visualize.lco	2025-08-20 19:59:36 UTC (rev 76100)
@@ -41,9 +41,9 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 4161 2025-06-04 15:36:11Z kohm $
-\@CheckKOMAScriptVersion{2025/06/04 v3.45 KOMA-Script}%
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 4200 2025-08-19 13:21:00Z kohm $
+\@CheckKOMAScriptVersion{2025/08/19 v3.46 KOMA-Script}%
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: head)
 \ProvidesFile{%
   visualize%
@@ -58,7 +58,7 @@
     Letter configuration option #1 Warning: #2%
   }%
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 4032 2023-04-17 09:45:11Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 4197 2025-08-15 09:13:30Z kohm $
 %%%            (run: body)
 \RequirePackage{eso-pic}
 \newcommand*{\showfields}[1]{%
@@ -555,7 +555,7 @@
 \newcommand*{\showUScheck}{%
   \showenvelope(8.625in,3.625in)%
 }
-%%% From File: $Id: scrkernel-notepaper.dtx 4161 2025-06-04 15:36:11Z kohm $
+%%% From File: $Id: scrkernel-notepaper.dtx 4191 2025-07-28 07:01:41Z kohm $
 %%%            (run: body)
 \endinput
 %%



More information about the tex-live-commits mailing list.