summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/koma-script/source
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-07-05 03:01:03 +0000
committerNorbert Preining <norbert@preining.info>2022-07-05 03:01:03 +0000
commitf1e3d1ca3738aac0ba720e4c1d87795d5d0cdcd9 (patch)
treee8caf076081509f7dd667c7c608bbf660b35baac /macros/latex/contrib/koma-script/source
parent1c10375ec46d7d83b2f1efc2a71b7ea114c889f0 (diff)
CTAN sync 202207050301
Diffstat (limited to 'macros/latex/contrib/koma-script/source')
-rw-r--r--macros/latex/contrib/koma-script/source/Makefile468
-rw-r--r--macros/latex/contrib/koma-script/source/Makefile.baseinit225
-rw-r--r--macros/latex/contrib/koma-script/source/Makefile.baserules144
-rw-r--r--macros/latex/contrib/koma-script/source/japanlco.dtx445
-rw-r--r--macros/latex/contrib/koma-script/source/koma-script-source-doc.dtx785
-rw-r--r--macros/latex/contrib/koma-script/source/scraddr.dtx296
-rw-r--r--macros/latex/contrib/koma-script/source/scrdoc.dtx438
-rw-r--r--macros/latex/contrib/koma-script/source/scrdocstrip.tex311
-rw-r--r--macros/latex/contrib/koma-script/source/scrextend.dtx249
-rw-r--r--macros/latex/contrib/koma-script/source/scrhack.dtx1954
-rw-r--r--macros/latex/contrib/koma-script/source/scrjura.dtx2042
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-addressfiles.dtx164
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-basics.dtx5341
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-bibliography.dtx746
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-compatibility.dtx675
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-floats.dtx1859
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-fonts.dtx2028
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-footnotes.dtx635
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-index.dtx379
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-language.dtx1790
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx1719
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-listsandtabulars.dtx491
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-listsof.dtx1240
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-miscellaneous.dtx1111
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-notepaper.dtx5012
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-pagestyles.dtx784
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx724
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-pseudolengths.dtx342
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-sections.dtx6754
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-title.dtx1003
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx2712
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-typearea.dtx3225
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-variables.dtx463
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-version.dtx235
-rw-r--r--macros/latex/contrib/koma-script/source/scrlayer-notecolumn.dtx1703
-rw-r--r--macros/latex/contrib/koma-script/source/scrlayer-scrpage.dtx2495
-rw-r--r--macros/latex/contrib/koma-script/source/scrlayer.dtx4352
-rw-r--r--macros/latex/contrib/koma-script/source/scrlfile-hook.dtx707
-rw-r--r--macros/latex/contrib/koma-script/source/scrlfile-patcholdlatex.dtx1251
-rw-r--r--macros/latex/contrib/koma-script/source/scrlfile.dtx273
-rw-r--r--macros/latex/contrib/koma-script/source/scrlogo.dtx138
-rw-r--r--macros/latex/contrib/koma-script/source/scrmain.ins457
-rw-r--r--macros/latex/contrib/koma-script/source/scrsource.tex137
-rw-r--r--macros/latex/contrib/koma-script/source/scrstrip.inc119
-rw-r--r--macros/latex/contrib/koma-script/source/scrstrop.inc67
-rw-r--r--macros/latex/contrib/koma-script/source/scrtime.dtx765
-rw-r--r--macros/latex/contrib/koma-script/source/scrwfile.dtx502
-rw-r--r--macros/latex/contrib/koma-script/source/tocbasic.dtx2002
48 files changed, 0 insertions, 61757 deletions
diff --git a/macros/latex/contrib/koma-script/source/Makefile b/macros/latex/contrib/koma-script/source/Makefile
deleted file mode 100644
index d62b078a5d..0000000000
--- a/macros/latex/contrib/koma-script/source/Makefile
+++ /dev/null
@@ -1,468 +0,0 @@
-# ======================================================================
-# Makefile
-# Copyright (c) Markus Kohm, 2002-2022
-#
-# This file is part of the LaTeX2e KOMA-Script bundle.
-#
-# This work may be distributed and/or modified under the conditions of
-# the LaTeX Project Public License, version 1.3c of the license.
-# The latest version of this license is in
-# http://www.latex-project.org/lppl.txt
-# and version 1.3c or later is part of all distributions of LaTeX
-# version 2005/12/01 or later and of this work.
-#
-# This work has the LPPL maintenance status "author-maintained".
-#
-# The Current Maintainer and author of this work is Markus Kohm.
-#
-# This work consists of all files listed in manifest.txt.
-# ======================================================================
-
-NOCHANGELOG = 1 # We do not longer make or package the ChangeLog
-
-# ----------------------------------------------------------------------
-# All directories with Makefiles
-export BASEDIR ?= $(PWD)/
-SUBDIRS = doc
-# ----------------------------------------------------------------------
-# Load common rules
-include Makefile.baserules
-# Load variable definitions
-include Makefile.baseinit
-# ----------------------------------------------------------------------
-# Temporary folder, used to create distribution.
-# Same folder with postfix "-maintain" will be used to create maintain-
-# distribution.
-export DISTDIR := $(PWD)/koma-script-$(ISODATE)
-export MAINTAINDIR := $(DISTDIR)-maintain
-# ----------------------------------------------------------------------
-
-# ----------------------------------------------------------------------
-# More than once used:
-# Make implementation documentation
-define makepdffromdtx
- if ! $(LATEX) $(NONSTOPMODE) $(PDFOUTPUT) $<; then \
- $(RM) -v $@; \
- exit 1; \
- fi
- oncemore=true; \
- checksum=`$(CKSUM) $(basename $<).aux`; \
- while $$oncemore; \
- do \
- if ! $(MKINDEX) $(basename $<) \
- || ! $(LATEX) $(NONSTOPMODE) $(PDFOUTPUT) $<; then \
- $(RM) -v $@; \
- exit 1; \
- fi; \
- $(GREP) "Rerun to" $(basename $<).log || oncemore=false; \
- newchecksum=`$(CKSUM) $(basename $<).aux`; \
- [ "$$newchecksum"="$$checksum" ] || oncemore=true; \
- checksum="$$newchecksum"; \
- done
-endef
-# ----------------------------------------------------------------------
-
-# ----------------------------------------------------------------------
-# List of all Makefiles
-MAKE_FILES = Makefile Makefile.baserules Makefile.baseinit
-# ----------------------------------------------------------------------
-# make classes, packages, etc.
-CLS_MAIN = scrbook.cls \
- scrreprt.cls \
- scrartcl.cls \
- scrlttr2.cls \
- scrreport.cls \
- scrarticle.cls \
- scrletter.cls \
- scrletter.sty \
- typearea.sty \
- scrsize10pt.clo \
- scrsize11pt.clo \
- scrsize12pt.clo \
- scrlfile.sty \
- scrlfile-hook.sty \
- scrlfile-hook-3.34.sty \
- scrlfile-patcholdlatex.sty \
- scrlogo.sty \
- scrwfile.sty \
- scrbase.sty \
- scrkbase.sty \
- scraddr.sty \
- scrtime.sty \
- scrdate.sty \
- scrjura.sty \
- tocbasic.sty \
- scrextend.sty \
- scrhack.sty \
- float.hak \
- floatrow.hak \
- hyperref.hak \
- listings.hak \
- nomencl.hak \
- setspace.hak \
- lscape.hak \
- standardsections.hak \
- scrfontsizes.sty \
- visualize.lco \
- DIN.lco \
- DINmtext.lco \
- DIN5008A.lco \
- DIN5008B.lco \
- SN.lco \
- SNleft.lco \
- KOMAold.lco \
- NF.lco \
- UScommercial9.lco \
- UScommercial9DW.lco \
- NipponEH.lco \
- NipponEL.lco \
- NipponLH.lco \
- NipponLL.lco \
- NipponRL.lco \
- KakuLL.lco \
- scrlayer.sty \
- scrlayer-scrpage.sty \
- scrlayer-notecolumn.sty
-
-CLS_MAIN_DTX = scrkernel-basics.dtx \
- scrkernel-bibliography.dtx \
- scrkernel-addressfiles.dtx \
- scrkernel-compatibility.dtx \
- scrkernel-floats.dtx \
- scrkernel-fonts.dtx \
- scrkernel-footnotes.dtx \
- scrkernel-index.dtx \
- scrkernel-language.dtx \
- scrkernel-letterclassoptions.dtx \
- japanlco.dtx \
- scrkernel-listsof.dtx \
- scrkernel-listsandtabulars.dtx \
- scrkernel-miscellaneous.dtx \
- scrkernel-notepaper.dtx \
- scrkernel-pagestyles.dtx \
- scrkernel-paragraphs.dtx \
- scrkernel-pseudolengths.dtx \
- scrkernel-sections.dtx \
- scrkernel-title.dtx \
- scrkernel-tocstyle.dtx \
- scrkernel-typearea.dtx \
- scrkernel-variables.dtx \
- scrkernel-version.dtx \
- scrlfile.dtx \
- scrlfile-hook.dtx \
- scrlfile-patcholdlatex.dtx \
- scrwfile.dtx \
- scraddr.dtx \
- scrtime.dtx \
- scrlogo.dtx \
- scrextend.dtx \
- scrhack.dtx \
- scrjura.dtx \
- tocbasic.dtx \
- scrlayer.dtx \
- scrlayer-scrpage.dtx \
- scrlayer-notecolumn.dtx
-
-STATIC_DOC = README \
- INSTALL.txt \
- INSTALLD.txt \
- lppl.txt \
- lppl-de.txt \
- manifest.txt
-
-CLS_MAIN_DVI = scrsource.pdf
-
-CLS_MAIN_INS = scrmain.ins
-
-CLS_MAIN_SUBINS = scrstrip.inc scrstrop.inc scrdocstrip.tex
-
-ALPHA_INS =
-
-ALPHA_DOC =
-
-ALPHA_DTX = $(subst .pdf,.dtx,$(ALPHA_DOC))
-
-CLS_MAIN_SRC = $(CLS_MAIN_DTX) $(CLS_MAIN_INS) $(CLS_MAIN_SUBINS) \
- scrsource.tex
-
-$(ALPHA_DOC): $(ALPHA_DTX) scrdoc.cls $(CLS_MAIN)
- $(LATEX) $(BATCHMODE) $(PDFOUTPUT) $(subst .pdf,.dtx,$@)
- $(MKINDEX) $(subst .pdf,,$@)
- $(LATEX) $(BATCHMODE) $(PDFOUTPUT) $(subst .pdf,.dtx,$@)
- $(MKINDEX) $(subst .pdf,,$@)
- $(LATEX) $(BATCHMODE) $(PDFOUTPUT) $(subst .pdf,.dtx,$@)
-
-$(CLS_MAIN): $(CLS_MAIN_DVI) $(CLS_MAIN_INS) $(MAKE_FILES)
- $(TEXUNPACK) $(CLS_MAIN_INS)
- $(foreach alphains,$(ALPHA_INS),$(TEXUNPACK) $(alphains);)
-
-scrsource.pdf: scrsource.tex $(CLS_MAIN_DTX) $(MAKE_FILES) scrdoc.cls
- $(makepdffromdtx)
-
-scrdoc.cls: scrdoc.dtx koma-script-source-doc.cls
- $(SSYMLINK) scrdoc.dtx scrdoc.cls
-
-koma-script-source-doc.cls: koma-script-source-doc.dtx scrlogo.dtx
- $(TEXUNPACK) koma-script-source-doc.dtx
-
-# ----------------------------------------------------------------------
-CLS_FILES = scrdoc.cls koma-script-source-doc.cls $(CLS_MAIN)
-
-CLS_DVIS = $(CLS_MAIN_DVI)
-
-CLS_SRC = $(CLS_MAIN_SRC) koma-script-source-doc.dtx
-
-NODIST_GENERATED = $(CLS_DVIS) $(CLS_FILES) $(ALPHA_DOC)
-
-GENERATED = $(NODIST_GENERATED) \
- scrjura.ins \
- scrwfile.ins \
- tocbasic.ins
-
-MISC_SRC = $(MAKE_FILES) \
- scrdoc.dtx
-
-ifndef NOCHANGELOG
-GENERATED += ChangeLog
-MISC_SRC += ChangeLog ChangeLog.2
-endif
-
-DIST_SRC = $(MISC_SRC) $(CLS_SRC)
-
-DIST_FILES = $(DIST_SRC) $(STATIC_DOC) $(ALPHA_DOC)
-
-MAINTAIN_SRC = $(DIST_SRC) missing.dtx .cvsignore
-
-MAINTAIN_FILES = $(MAINTAIN_SRC)
-# ----------------------------------------------------------------------
-
-# ----------------------------------------------------------------------
-# additional rules
-tdsdist:dist
- # extract dist and make all
- $(UNTARGZ) $(DISTDIR).tar.gz
- chmod -R a+w $(DISTDIR)
- # If we use a local Makefile.cfg this should be copied too,
- # but it should not become part of the tds distribution.
- $(CP) Makefile.cfg $(DISTDIR)/Makefile.cfg
-ifdef PREPARERELEASE
- developer/scripts/preparerelease.sh 2 $(notdir $(DISTDIR))
-endif
- $(CD) $(notdir $(DISTDIR)) && \
- $(MAKE)
-ifdef PREPARERELEASE
- $(MKDIR) $(notdir $(DISTDIR))/README.in
- $(INSTALL) README.in/README.*.sty README.in/README.*.cls $(notdir $(DISTDIR))/README.in
- developer/scripts/preparerelease.sh 3 $(notdir $(DISTDIR))
- $(RMDIR) $(notdir $(DISTDIR))/README.in
-endif
- # install to temporary directory
- $(MKDIR) $(notdir $(DISTDIR))-bin/komascript-texmf
- $(CD) $(notdir $(DISTDIR)) && \
- $(MAKE) INSTALLTEXMF=$(PWD)/$(notdir $(DISTDIR))-bin/komascript-texmf install
-ifdef PREPARERELEASE
- developer/scripts/preparerelease.sh final $(notdir $(DISTDIR))
-endif
- $(RMDIR) $(notdir $(DISTDIR))
- $(SRM) $(notdir $(DISTDIR))-bin/komascript-texmf/ls-R
- # build the tds.zip
- $(SRM) komascript.tds.zip
- $(CD) $(notdir $(DISTDIR))-bin/komascript-texmf && \
- $(ZIP) ../../komascript.tds.zip source doc tex
- # clean up
- $(RMDIR) $(notdir $(DISTDIR))-bin
- $(SRM) $(notdir $(DISTDIR)).tar.gz
-
-bindist:tdsdist
- # extract tds.zip
- $(MKDIR) $(notdir $(DISTDIR))-bin
- $(MKDIR) $(notdir $(DISTDIR))-bin/komascript-texmf
- $(CD) $(notdir $(DISTDIR))-bin/komascript-texmf && \
- $(UNZIP) ../../komascript.tds.zip
- # copy some of the files to primary folder
- $(MV) komascript.tds.zip $(notdir $(DISTDIR))-bin/
-ifndef NOCHANGELOG
- $(INSTALL) $(notdir $(DISTDIR))-bin/komascript-texmf/source/latex/koma-script/ChangeLog $(notdir $(DISTDIR))-bin
-endif
- $(INSTALL) $(notdir $(DISTDIR))-bin/komascript-texmf/doc/latex/koma-script/scrgui* $(notdir $(DISTDIR))-bin
- $(INSTALL) $(notdir $(DISTDIR))-bin/komascript-texmf/doc/latex/koma-script/*.txt $(notdir $(DISTDIR))-bin
- $(INSTALL) $(notdir $(DISTDIR))-bin/komascript-texmf/doc/latex/koma-script/README $(notdir $(DISTDIR))-bin
- $(INSTALL) $(notdir $(DISTDIR))-bin/komascript-texmf/doc/latex/koma-script/koma*.html $(notdir $(DISTDIR))-bin
- $(GREP) 'CheckKOMAScriptVersion{' $(notdir $(DISTDIR))-bin/komascript-texmf/source/latex/koma-script/scrkernel-version.dtx | grep -o '2.*t' > $(notdir $(DISTDIR))-bin/VERSION
- # build the bin.zip
- $(RMDIR) $(notdir $(DISTDIR))-bin/komascript-texmf
- $(SRM) $(notdir $(DISTDIR))-bin.zip
- $(CD) $(notdir $(DISTDIR))-bin && \
- $(ZIP) ../$(notdir $(DISTDIR))-bin.zip *
- # clean up
- $(RMDIR) $(notdir $(DISTDIR))-bin
-
-ctandist:tdsdist
- # extract tds.zip
- $(SRMDIR) $(notdir $(DISTDIR))-ctan
- $(MKDIR) $(notdir $(DISTDIR))-ctan/texmf
- $(INSTALL) komascript.tds.zip $(notdir $(DISTDIR))-ctan
- $(CD) $(notdir $(DISTDIR))-ctan/texmf && \
- $(UNZIP) ../komascript.tds.zip
- # copy some doc files to doc source
- $(INSTALL) $(notdir $(DISTDIR))-ctan/texmf/doc/latex/koma-script/*.html \
- $(notdir $(DISTDIR))-ctan/texmf/doc/latex/koma-script/*.pdf \
- $(notdir $(DISTDIR))-ctan/texmf/source/latex/koma-script/doc/
- # copy some doc files to main source
- $(INSTALL) $(notdir $(DISTDIR))-ctan/texmf/doc/latex/koma-script/*.txt \
- $(notdir $(DISTDIR))-ctan/texmf/doc/latex/koma-script/*.tex \
- $(notdir $(DISTDIR))-ctan/texmf/doc/latex/koma-script/README \
- $(notdir $(DISTDIR))-ctan/texmf/source/latex/koma-script/
- # generate VERSION at main source
- $(GREP) 'CheckKOMAScriptVersion{' $(notdir $(DISTDIR))-ctan/texmf/source/latex/koma-script/scrkernel-version.dtx | grep -o '2.*t' \
- > $(notdir $(DISTDIR))-ctan/texmf/source/latex/koma-script/VERSION
- # generate README.distributors at upmost
- $(HEAD) 18 $(notdir $(DISTDIR))-ctan/texmf/source/latex/koma-script/README > $(notdir $(DISTDIR))-ctan/README.distributors
- $(SECHO) 'File komascript.tds.zip is a complete TEXMF tree of KOMA-Script. It may be' >> $(notdir $(DISTDIR))-ctan/README.distributors
- $(SECHO) 'used for manual installation or by distributors for distributions like' >> $(notdir $(DISTDIR))-ctan/README.distributors
- $(SECHO) '<http://mirror.ctan.org/tex-archive/install/macros/latex/contrib/komascript.tds.zip>.' >> $(notdir $(DISTDIR))-ctan/README.distributors
- $(SECHO) "File $(notdir $(DISTDIR)).ctan-src.zip is a file with sources and manuals of KOMA-Script" >> $(notdir $(DISTDIR))-ctan/README.distributors
- $(SECHO) 'that CTAN seems to prefer for the distribution at' >> $(notdir $(DISTDIR))-ctan/README.distributors
- $(SECHO) '<http://mirror.ctan.org/tex-archive/macros/latex/contrib/komascript>.' >> $(notdir $(DISTDIR))-ctan/README.distributors
- $(SECHO) 'Note, that it is not easy to generate a ready to use and complete installation' >> $(notdir $(DISTDIR))-ctan/README.distributors
- $(SECHO) "from $(notdir $(DISTDIR)).ctan-src.zip. So it is hardly recommended to use" >> $(notdir $(DISTDIR))-ctan/README.distributors
- $(SECHO) 'komascript.tds.zip not only by users, but redistributors also.' >> $(notdir $(DISTDIR))-ctan/README.distributors
- # build ctan-src.zip
- $(CD) $(notdir $(DISTDIR))-ctan/texmf/source/latex && \
- $(ZIP) ../../../$(notdir $(DISTDIR)).ctan-src.zip koma-script
- $(RMDIR) $(notdir $(DISTDIR))-ctan/texmf
- # build ctan.zip (with both ctan-src.zip and tds.zip)
- $(CD) $(notdir $(DISTDIR))-ctan && \
- $(ZIP) ../$(notdir $(DISTDIR))-ctan.zip *
- # clean up
- $(RMDIR) $(notdir $(DISTDIR))-ctan
-
-# ----------------------------------------------------------------------
-# local rules
-
-ChangeLog:
- $(warning Developers should generate ChangeLog manually, see developers/doc/README.)
- $(warning Distributors should not use a SVN version for their distributions!)
- $(warning Betatester may continue with an empty ChangeLog after using: touch ChangeLog)
- @exit 1
-
-default_local: test_baseinit $(CLS_FILES)
-
-prepare_local: # nothing to do
-
-install_local: test_baseinit $(DIST_SRC) $(CLS_FILES) $(STATIC_DOC) $(ALPHA_DOC)
- @if ! $(MKDIR) $(INSTALLSRCDIR) \
- || ! $(MKDIR) $(INSTALLCLSDIR) \
- || ! $(MKDIR) $(INSTALLDOCDIR) ; then \
- echo '--------------------------------------------------'; \
- echo '| Cannot install to' $(INSTALLSRCDIR) or $(INSTALLCLSDIR) or $(INSTALLDOCDIR)!; \
- echo '| You should try:'; \
- echo '| sudo "make install"'; \
- echo '--------------------------------------------------'; \
- exit 1; \
- fi
- $(INSTALL) $(DIST_SRC) $(INSTALLSRCDIR)
- $(INSTALL) $(CLS_FILES) $(INSTALLCLSDIR)
- $(INSTALL) $(STATIC_DOC) $(ALPHA_DOC) $(INSTALLDOCDIR)
- $(SECHO) ------------------------------------------------------------
- $(SECHO) Installed files at $(INSTALLSRCDIR):
- $(SECHO) $(DIST_SRC)
- $(SECHO) ------------------------------------------------------------
- $(SECHO) Installed files at $(INSTALLCLSDIR):
- $(SECHO) $(CLS_FILES)
- $(SECHO) ------------------------------------------------------------
- $(SECHO) Installed files at $(INSTALLDOCDIR):
- $(SECHO) $(STATIC_DOC) $(ALPHA_DOC)
- $(SECHO) ------------------------------------------------------------
-
-uninstall_local:
- @if [ -d $(INSTALLSRCDIR) ]; then \
- $(RM) -v $(foreach file,$(DIST_SRC),$(INSTALLSRCDIR)/$(file)); \
- if [ ls $(INSTALLSRCDIR) > /dev/null 2>&1; then \
- $(RMDIR) -v $(INSTALLSRCDIR); \
- else \
- echo "$(INSTALLSRCDIR) not empty!"; \
- fi; \
- else \
- echo "$(INSTALLSRCDIR) not found --> nothing to uninstall!"; \
- fi
- @if [ -d $(INSTALLCLSDIR) ]; then \
- $(RM) -v $(foreach file,$(CLS_FILES),$(INSTALLCLSDIR)/$(file)); \
- if ls $(INSTALLCLSDIR) > /dev/null 2>&1; then \
- $(RMDIR) -v $(INSTALLCLSDIR); \
- else \
- echo "$(INSTALLCLSDIR) not empty!"; \
- fi; \
- else \
- echo "$(INSTALLCLSDIR) not found --> nothing to uninstall!"; \
- fi
- @if [ -d $(INSTALLDOCDIR) ]; then \
- $(RM) -v $(foreach file,$(STATIC_DOC),$(INSTALLDOCDIR)/$(file)); \
- if ls $(INSTALLDOCDIR) > /dev/null 2>&1; then \
- $(RMDIR) -v $(INSTALLDOCDIR); \
- else \
- echo "$(INSTALLDOCDIR) not empty!"; \
- fi; \
- else \
- echo "$(INSTALLDOCDIR) not found --> nothing to uninstall!"; \
- fi
-
-clean_local:
- $(SRM) *~ $(CLEANEXTS)
-
-distclean_local: clean_local
- $(SRM) $(NODIST_GENERATED)
-
-maintainclean_local: clean_local
- $(SRM) $(GENERATED)
-
-dist_prior:
-ifdef PREPARERELEASE
-ifndef NOCHANGELOG
- developer/scripts/preparerelease.sh 1
-endif
- $(MAKE) prepare
-endif
- -$(RMDIR) $(DISTDIR)
- $(MKDIR) $(DISTDIR)
-
-dist_local: $(DIST_FILES) $(NODIST_GENERATED)
- $(CP) $(DIST_FILES) $(DISTDIR)
-
-dist_post:
- $(TARGZ) $(DISTDIR).tar.gz $(notdir $(DISTDIR))
- $(RMDIR) $(DISTDIR)
- $(LL) $(notdir $(DISTDIR)).tar.gz
-
-dist-bz2_post:
- $(STARBZ) $(DISTDIR).tar.bz2 $(notdir $(DISTDIR))
- $(SRMDIR) $(DISTDIR)
- $(SLL) $(notdir $(DISTDIR)).tar.bz2
-
-dist-zip_post:
- $(SZIP) $(DISTDIR).zip $(notdir $(DISTDIR))
- $(SRMDIR) $(DISTDIR)
- $(SLL) $(notdir $(DISTDIR)).zip
-
-maintain_prior:
- -$(RMDIR) $(MAINTAINDIR)
- $(MKDIR) $(MAINTAINDIR)
-
-maintain_local:
- $(CP) $(MAINTAIN_FILES) $(MAINTAINDIR)
-
-maintain_post:
- $(TARGZ) $(MAINTAINDIR).tar.gz $(notdir $(MAINTAINDIR))
- $(RMDIR) $(MAINTAINDIR)
- $(LL) $(notdir $(MAINTAINDIR)).tar.gz
-
-maintain-bz2_post:
- $(STARBZ) $(MAINTAINDIR).tar.bz2 $(notdir $(MAINTAINDIR))
- $(SRMDIR) $(MAINTAINDIR)
- $(SLL) $(notdir $(MAINTAINDIR)).tar.bz2
-
-maintain-zip_post:
- $(SZIP) $(MAINTAINDIR).zip $(notdir $(MAINTAINDIR))
- $(SRMDIR) $(MAINTAINDIR)
- $(SLL) $(notdir $(MAINTAINDIR)).zip
-# ----------------------------------------------------------------------
diff --git a/macros/latex/contrib/koma-script/source/Makefile.baseinit b/macros/latex/contrib/koma-script/source/Makefile.baseinit
deleted file mode 100644
index 28dc986096..0000000000
--- a/macros/latex/contrib/koma-script/source/Makefile.baseinit
+++ /dev/null
@@ -1,225 +0,0 @@
-# ======================================================================
-# Makefile.baseinit
-# Copyright (c) Markus Kohm, 2002-2013
-#
-# This file is part of the LaTeX2e KOMA-Script bundle.
-#
-# This work may be distributed and/or modified under the conditions of
-# the LaTeX Project Public License, version 1.3c of the license.
-# The latest version of this license is in
-# http://www.latex-project.org/lppl.txt
-# and version 1.3c or later is part of all distributions of LaTeX
-# version 2005/12/01 or later and of this work.
-#
-# This work has the LPPL maintenance status "author-maintained".
-#
-# The Current Maintainer and author of this work is Markus Kohm.
-#
-# This work consists of all files listed in manifest.txt.
-# ----------------------------------------------------------------------
-# Makefile.baseinit
-# Copyright (c) Markus Kohm, 2002-2013
-#
-# Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
-# Version 1.3c, verteilt und/oder veraendert werden.
-# Die neuste Version dieser Lizenz ist
-# http://www.latex-project.org/lppl.txt
-# und Version 1.3c ist Teil aller Verteilungen von LaTeX
-# Version 2005/12/01 oder spaeter und dieses Werks.
-#
-# Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
-# (allein durch den Autor verwaltet).
-#
-# Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
-#
-# Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
-# ======================================================================
-# This is the basic initialization of environment, programm variables
-# etc. You may overload each of the defined variables at Makefile.cfg.
-# To do so, just copy the original definition to Makefile.cfg and change
-# it there.
-# ----------------------------------------------------------------------
-# Hier finden Sie die Grundinitialisierung der Umgebungsvariablen,
-# Programmvariablen usw. Sie können die Definition jeder dieser
-# Variablen in Makefile.cfg überladen. Um dies zu tun, kopieren Sie
-# einfach die Originaldefinition in Makefile.cfg und ändern die
-# Definition dort entsprechend Ihrer Anforderungen.
-# ======================================================================
-
-# ----------------------------------------------------------------------
-# KOMA-Script subfolder
-KOMASCRIPTSUBDIR=/koma-script
-# ----------------------------------------------------------------------
-# The texmf-directory, where to install new stuff (see texmf.cnf)
-# If you don't know what to do, search for directory texmf at /usr.
-# With teTeX and linux often one of following is used:
-#INSTALLTEXMF ?= /usr/TeX/texmf
-#INSTALLTEXMF ?= /usr/local/TeX/texmf
-#INSTALLTEXMF ?= /usr/share/texmf
-#INSTALLTEXMF ?= /usr/local/share/texmf
-# user tree:
-#INSTALLTEXMF ?= $(HOME)/texmf
-# Try to use user's tree known by kpsewhich:
-#INSTALLTEXMF ?= $(shell kpsewhich -expand-var '$$HOMETEXMF')
-# Try to use the local tree known by kpsewhich:
-#INSTALLTEXMF ?= $(shell kpsewhich -expand-var '$$TEXMFLOCAL')
-# But you may set INSTALLTEXMF to every directory you want.
-# Use following, if you only want to test the installation:
-#INSTALLTEXMF ?= /tmp/texmf
-# Do a more complicate default:
-ifneq ($(USER),root)
- INSTALLTEXMF ?= $(shell kpsewhich -expand-var='$$HOMETEXMF')
-ifeq ($(INSTALLTEXMF),$$HOMETEXMF)
- INSTALLTEXMF :=
-endif
-ifeq ($(INSTALLTEXMF),)
- INSTALLTEXMF = $(shell kpsewhich -expand-var='$$TEXMFHOME')
-ifeq ($(INSTALLTEXMF),$$TEXMFHOME)
- INSTALLTEXMF :=
-endif
-endif
-endif
-
-ifeq ($(INSTALLTEXMF),)
- INSTALLTEXMF = $(shell kpsewhich -expand-var='$$TEXMFLOCAL')
-ifeq ($(INSTALLTEXMF),$$TEXMFLOCAL)
- INSTALLTEXMF :=
-endif
-endif
-
-ifeq ($(INSTALLTEXMF),)
- INSTALLTEXMF = $(shell kpsewhich -expand-var='$$TEXMFMAIN')
-ifeq ($(INSTALLTEXMF),$$TEXMFMAIN)
- INSTALLTEXMF :=
-endif
-endif
-# ----------------------------------------------------------------------
-# The directory, where to install *.cls, *.sty etc.
-INSTALLCLSDIR ?= $(INSTALLTEXMF)/tex/latex$(KOMASCRIPTSUBDIR)
-# ----------------------------------------------------------------------
-# The directory, where to install generic *.tex files
-INSTALLTEXDIR ?= $(INSTALLTEXMF)/tex/generic$(KOMASCRIPTSUBDIR)
-# ----------------------------------------------------------------------
-# The directory, where to install documentation
-INSTALLDOCDIR ?= $(INSTALLTEXMF)/doc/latex$(KOMASCRIPTSUBDIR)
-# ----------------------------------------------------------------------
-# The directory, where to install the sources
-INSTALLSRCDIR ?= $(INSTALLTEXMF)/source/latex$(KOMASCRIPTSUBDIR)
-# ----------------------------------------------------------------------
-# The directory, where to install demos
-INSTALLDEMODIR ?= $(INSTALLDOCDIR)/demo
-# ----------------------------------------------------------------------
-# Extensions of files which are generated for generation
-CLEANEXTS = *.aux *.bbl *.blg *.glg *.glo *.gls *.glx *.idx \
- *.ilg *.ind *.lof *.log *.lot *.out *.toc \
- *.toc[0-9] *.toc[0-9][0-9] *.synctex.gz *.slnc \
-# ----------------------------------------------------------------------
-
-# ----------------------------------------------------------------------
-# The programms/commands, which are used
-LATEX = pdflatex
-NONSTOPMODE = -interaction=nonstopmode
-BATCHMODE = -interachtion=batchmode
-DVIOUTPUT = \\pdfoutput=0\\let\\pdfoutput\\undefined\\input
-PDFOUTPUT = \\input
-
-MKINDEX = mkindex
-TEXUNPACK = tex
-
-SILENT = @
-RM = rm -f
-SRM = $(SILENT)$(RM)
-RMDIR = rm -fr
-SRMDIR = $(SILENT)$(RMDIR)
-CP = cp -f
-SCP = $(SILENT)$(CP)
-CPALL = cp -af
-SCPALL = $(SILENT)$(CPALL)
-CD = cd
-SCD = $(SILENT)$(CP)
-SYMLINK = ln -sf
-SSYMLINK = $(SILENT)$(SYMLINK)
-INSTALL = install -m 644
-SINSTALL = $(SILENT)$(INSTALL)
-INSTALLEXECUTABLE = install -m 744
-SINSTALLEXECUTABLE = $(SILENT)$(INSTALLEXECUTABLE)
-MKDIR = install -m 755 -d
-SMKDIR = $(SILENT)$(MKDIR)
-MV = mv -f
-SMV = $(SILENT)$(MV)
-ECHO = echo
-SECHO = $(SILENT)$(ECHO)
-LL = ls -l
-SLL = $(SILENT)$(LL)
-TARGZ = tar zc -f
-STARGZ = $(SILENT)$(TARGZ)
-UNTARGZ = tar zx -f
-SUNTARGZ = $(SILENT)$(UNTARGZ)
-TARBZ = tar jc -f
-STARBZ = $(SILENT)$(TARBZ)
-ZIP = zip -r9qy
-SZIP = $(SILENT)$(ZIP)
-UNZIP = unzip -q
-SUNZIP = $(SILENT)$(UNZIP)
-GREP = grep
-CKSUM = md5sum
-HEAD = head -n
-
-ISODATE = `date -I`
-MKTEXLSR = mktexlsr $(INSTALLTEXMF)
-# ----------------------------------------------------------------------
-
-
-# ======================================================================
-# Do not copy and change any of the following lines:
-# ======================================================================
-
-# ----------------------------------------------------------------------
-# Loading Makefile.cfg if it exists.
-# Don't
--include Makefile.cfg
-# ----------------------------------------------------------------------
-
-# ----------------------------------------------------------------------
-# Do all variable tests
-test_baseinit:
-ifndef INSTALLTEXMF
- $(error You have to define variable INSTALLTEXMF at Makefile.cfg!)
-endif
- $(SMKDIR) $(INSTALLTEXMF)
-ifdef INSTALLSRCDIR
- $(SMKDIR) $(INSTALLSRCDIR)
-else
- $(warning Sources will not be installed!)
-endif
-ifdef INSTALLDOCDIR
- $(SMKDIR) $(INSTALLDOCDIR)
-else
- $(warning Documentation will not be installed!)
-endif
-#ifdef INSTALLDEMODIR
-# $(SMKDIR) $(INSTALLDEMODIR)
-#else
-# $(warning Demos will not be installed!)
-#endif
-ifdef INSTALLCLSDIR
- $(SMKDIR) $(INSTALLCLSDIR)
-else
- $(warning Classes, Packages, etc. will not be installed!)
-endif
-ifdef VERBOSE
- $(SECHO) ============================================================
- $(SECHO) Makefile.baseinit: variables and their values:
- $(SECHO) " INSTALLTEXMF =$(INSTALLTEXMF)"
- $(SECHO) " INSTALLSRCDIR =$(INSTALLSRCDIR)"
- $(ECHO) " INSTALLTEXDIR =$(INSTALLTEXDIR)"
- $(SECHO) " INSTALLDOCDIR =$(INSTALLDOCDIR)"
- $(SECHO) " INSTALLDEMODIR=$(INSTALLDEMODIR)"
- $(SECHO) " INSTALLCLSDIR =$(INSTALLCLSDIR)"
- $(SECHO) " TEXINPUTS =$(TEXINPUTS)"
- $(SECHO) " CLEANEXTS =$(CLEANEXTS)"
- $(SECHO) ============================================================
-endif
-
-# ----------------------------------------------------------------------
-
diff --git a/macros/latex/contrib/koma-script/source/Makefile.baserules b/macros/latex/contrib/koma-script/source/Makefile.baserules
deleted file mode 100644
index 66c4d77590..0000000000
--- a/macros/latex/contrib/koma-script/source/Makefile.baserules
+++ /dev/null
@@ -1,144 +0,0 @@
-# ======================================================================
-# Makefile.baserules
-# Copyright (c) Markus Kohm, 2002-2013
-#
-# This file is part of the LaTeX2e KOMA-Script bundle.
-#
-# This work may be distributed and/or modified under the conditions of
-# the LaTeX Project Public License, version 1.3c of the license.
-# The latest version of this license is in
-# http://www.latex-project.org/lppl.txt
-# and version 1.3c or later is part of all distributions of LaTeX
-# version 2005/12/01 or later and of this work.
-#
-# This work has the LPPL maintenance status "author-maintained".
-#
-# The Current Maintainer and author of this work is Markus Kohm.
-#
-# This work consists of all files listed in manifest.txt.
-# ----------------------------------------------------------------------
-# Makefile.baserules
-# Copyright (c) Markus Kohm, 2002-2013
-#
-# Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
-# Version 1.3c, verteilt und/oder veraendert werden.
-# Die neuste Version dieser Lizenz ist
-# http://www.latex-project.org/lppl.txt
-# und Version 1.3c ist Teil aller Verteilungen von LaTeX
-# Version 2005/12/01 oder spaeter und dieses Werks.
-#
-# Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
-# (allein durch den Autor verwaltet).
-#
-# Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
-#
-# Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
-# ======================================================================
-
-.PHONY: default default_recursive default_local \
- prepare prepare_recursive prepare_local \
- install install_recursive install_local \
- uninstall uninstall_recursive uninstall_local \
- mktexlsr \
- clean clean_recursive clean_local \
- dist dist_prior dist_recursice dist_post \
- dist-bz2 dist-bz2_post \
- dist-zip dist-zip_post
- maintain maintain_prior maintain_recursice maintain_post \
- maintain-bz2 maintain-bz2_post \
- maintain-zip maintain-zip_post \
- testlist testinit testtest
-
-# ----------------------------------------------------------------------
-# The default rule
-default: prepare default_recursive
-
-# Prepare for the defaut rule
-prepare: prepare_recursive
-
-# Install all files
-install: install_recursive mktexlsr
-
-# Uninstall all files
-uninstall: uninstall_recursive mktexlsr
-
-mktexlsr:
- $(MKTEXLSR)
-
-# Delete all files, which are generated for generation.
-# "make; make clean; make" should be same like "make; make clean"
-clean: clean_recursive
-
-# Delete all files, which are not part of the distribution
-distclean: distclean_recursive
-
-# Delete all files, which are generated
-maintainclean: maintainclean_recursive
-
-# Create tar.gz, tar.bz2 or zip with distribution
-dist: dist_prior dist_recursive dist_post
-
-dist-bz2: dist_prior dist_recursive dist-bz2_post
-
-dist-zip: dist_prior dist_recursive dist-zip_post
-
-# Create tar.gz, tar.bz2 or zip with maintainance files
-maintain: maintain_prior maintain_recursive maintain_post
-
-maintain-bz2: maintain_prior maintain_recursive maintain-bz2_post
-
-maintain-zip: maintain_prior maintain_recursive maintain-zip_post
-
-testlist:
- $(MAKE) -C testsuite $@
-
-testinit:
- $(MAKE) -C testsuite $@
-
-testtest:
- $(MAKE) -C testsuite $@
-
-
-# ----------------------------------------------------------------------
-
-# ----------------------------------------------------------------------
-# recursive rules (don't call them, call the rules above)
-ifdef SUBDIRS
-define make_recursive
- for dir in $(SUBDIRS); \
- do \
- $(MAKE) -C $$dir $< || exit $$?; \
- done
-endef
-else
-define make_recursive
-endef
-endif
-
-default_recursive: default_local
- $(make_recursive)
-
-prepare_recursive: prepare_local
- $(make_recursive)
-
-install_recursive: install_local
- $(make_recursive)
-
-uninstall_recursive: uninstall_local
- $(make_recursive)
-
-clean_recursive: clean_local
- $(make_recursive)
-
-distclean_recursive: distclean_local
- $(make_recursive)
-
-maintainclean_recursive: maintainclean_local
- $(make_recursive)
-
-dist_recursive: dist_local
- $(make_recursive)
-
-maintain_recursive: maintain_local
- $(make_recursive)
-# ----------------------------------------------------------------------
diff --git a/macros/latex/contrib/koma-script/source/japanlco.dtx b/macros/latex/contrib/koma-script/source/japanlco.dtx
deleted file mode 100644
index c794644aef..0000000000
--- a/macros/latex/contrib/koma-script/source/japanlco.dtx
+++ /dev/null
@@ -1,445 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% japanlco.dtx
-% Copyright (c) Markus Kohm, 2008-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: japanlco.dtx 3690 2022-02-10 09:59:31Z kohm $
-%<Ni&EARLY&LOW&head>%%% (run: Ni,EARLY,LOW,head)
-%<Ni&EARLY&LOW&body>%%% (run: Ni,EARLY,LOW,body)
-%<Ni&EARLY&HIGH&head>%%% (run: Ni,EARLY,HIGH,head)
-%<Ni&EARLY&HIGH&body>%%% (run: Ni,EARLY,HIGH,body)
-%<Ni&LATE&LOW&head>%%% (run: Ni,LATE,LOW,head)
-%<Ni&LATE&LOW&body>%%% (run: Ni,LATE,LOW,body)
-%<Ni&LATE&HIGH&head>%%% (run: Ni,LATE,HIGH,head)
-%<Ni&LATE&HIGH&body>%%% (run: Ni,LATE,HIGH,body)
-%<Ni&RIGHT&LOW&head>%%% (run: Ni,RIGHT,LOW,head)
-%<Ni&RIGHT&LOW&body>%%% (run: Ni,RIGHT,LOW,body)
-%<Kaku&LATE&LOW&head>%%% (run: Kaku,LATE,LOW,head)
-%<Kaku&LATE&LOW&body>%%% (run: Kaku,LATE,LOW,body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-10 10:59:31 +0100 (Do, 10. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3690 $
-\endgroup
-\ProvidesFile{japanlco.dtx}[\filedate\space\filerevision\space
- KOMA-Script (letter class options)]
-\ifx\documentclass\undefined
- \ifx\ifTopLevel\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2007}
- \generate{\usepreamble\defaultpreamble
- \file{NipponEL.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{japanlco.dtx}{lco,Ni,EARLY,LOW,head}%
- \from{japanlco.dtx}{lco,Ni,EARLY,LOW,body}%
- }%
- \file{NipponEH.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{japanlco.dtx}{lco,Ni,EARLY,HIGH,head}%
- \from{japanlco.dtx}{lco,Ni,EARLY,HIGH,body}%
- }%
- \file{NipponLL.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{japanlco.dtx}{lco,Ni,LATE,LOW,head}%
- \from{japanlco.dtx}{lco,Ni,LATE,LOW,body}%
- }%
- \file{NipponLH.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{japanlco.dtx}{lco,Ni,LATE,HIGH,head}%
- \from{japanlco.dtx}{lco,Ni,LATE,HIGH,body}%
- }%
- \file{NipponRL.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{japanlco.dtx}{lco,Ni,RIGHT,LOW,head}%
- \from{japanlco.dtx}{lco,Ni,RIGHT,LOW,body}%
- }%
- \file{KakuLL.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{japanlco.dtx}{lco,Kaku,LATE,LOW,head}%
- \from{japanlco.dtx}{lco,Kaku,LATE,LOW,body}%
- }%
- }%
- \@@input scrstrop.inc
- \fi
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{graphicx}
-\begin{document}
- \DocInput{japanlco.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.98}{2007/11/13}{first version based on lco files from Gernot
-% Hassenpflug}
-% \changes{v3.36}{2022/01/21}{switch over to \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/01/21}{using \cs{setplength} and \cs{addtoplength}
-% instead of \cs{@setplength} and \cs{@addtoplength}}
-% \changes{v3.36}{2022/02/02}{self-extracting}
-% \changes{v3.36}{2022/02/02}{extended documentation}
-%
-% \GetFileInfo{japanlco.dtx}
-% \title{\href{https://komascript.de}{\KOMAScript} \partname\
-% \texttt{\filename}}
-% \date{Version \fileversion{} of \filedate}
-% \author{Markus Kohm}
-% \maketitle
-% \tableofcontents
-%
-% \section{Option Files for Japanese Letters}
-%
-% Gernot Hassenpflug wrote a lot of \file{lco}-files for use of Japanese
-% envelope formats. Markus Kohm, the author of \KOMAScript, adapted them to
-% an extended version of \cls*{scrlttr2} and wrote a \file{dtx}-file with the
-% moste recent \file{lco}-files. Table~\ref{tab:japan.envelopes} shows all
-% \file{lco}-files of the supported envelopes with their datas.
-%
-% \begin{table}
-% \begin{tabular}{@{}llllllll@{}}
-% \hline
-% \file{lco}-file & \multicolumn3{l}{Envelope} & \multicolumn4{l@{}}{Window} \\
-% & Name & Length & Width & H-pos & V-pos & Width & Height\\
-% \cline{1-3}\cline{4-8}
-% \texttt{NipponEL} &
-% Chou/You 3 & 235\,mm & 120\,mm & 22\,mm & 12\,mm & 90\,mm & 45\,mm \\
-% \texttt{NipponEH} &
-% Chou/You 3 & 235\,mm & 120\,mm & 22\,mm & 12\,mm & 90\,mm & 55\,mm \\
-% \texttt{NipponLL} &
-% Chou/You 3 & 235\,mm & 120\,mm & 25\,mm & 12\,mm & 90\,mm & 45\,mm \\
-% \texttt{NipponLH} &
-% Chou/You 3 & 235\,mm & 120\,mm & 25\,mm & 12\,mm & 90\,mm & 55\,mm \\
-% \texttt{NipponEL} &
-% Chou/You 4 & 205\,mm & 90\,mm & 22\,mm & 12\,mm & 90\,mm & 45\,mm \\
-% \texttt{NipponEH} &
-% Chou/You 4 & 205\,mm & 90\,mm & 22\,mm & 12\,mm & 90\,mm & 55\,mm \\
-% \texttt{NipponLL} &
-% Chou/You 4 & 205\,mm & 90\,mm & 25\,mm & 12\,mm & 90\,mm & 45\,mm \\
-% \texttt{NipponLH} &
-% Chou/You 4 & 205\,mm & 90\,mm & 25\,mm & 12\,mm & 90\,mm & 55\,mm \\
-% \texttt{NipponRL} &
-% Chou/You 4 & 205\,mm & 90\,mm & 98\,mm & 28\,mm & 90\,mm & 45\,mm \\
-% \texttt{KakuLL} &
-% Kaku-kata & 312\,mm & 228\,mm & 25\,mm & 24\,mm & 90\,mm & 45\,mm \\
-% \hline
-% \end{tabular}
-% \caption{The supported Japanese envelopes}
-% \label{tab:japan.envelopes}
-% \end{table}
-%
-% \iftrue
-% The following pages show images of example envelopes. For more information
-% see the English \file{scrguien.pdf} or the German \file{scrguide.pdf}.
-%
-% \newcommand\japanenvelope[7]{%
-% \begingroup
-% \setlength{\unitlength}{1mm}%^^A
-% \rotatebox{90}{\begin{picture}(#1,#2)
-% \thinlines
-% \put(0,0){^^A
-% \framebox(#1,#2){}%^^A
-% }%^^A
-% \put(5,5){\texttt{#7}: #1\,mm$\times$#2\,mm (B$\times$H)}%^^A
-% \csname @tempcnta\endcsname #2
-% \advance\csname @tempcnta\endcsname -#4
-% \put(0,\csname @tempcnta\endcsname){\vector(1,0){#3}}%^^A
-% \put(#3,\csname @tempcnta\endcsname){\vector(-1,0){#3}}%^^A
-% \put(0,\csname @tempcnta\endcsname){^^A
-% \makebox(#3,\baselineskip\csname @gobble\endcsname){#3\,mm}}%^^A
-% \put(#3,#2){\vector(0,-1){#4}}%^^A
-% \put(#3,\csname @tempcnta\endcsname){\vector(0,1){#4}}%^^A
-% \put(#3,\csname @tempcnta\endcsname){^^A
-% \makebox(0,#4)[l]{~#4\,mm}}
-% \advance\csname @tempcnta\endcsname -#6
-% \put(#3,\csname @tempcnta\endcsname){^^A
-% \framebox(#5,#6){}%^^A
-% }%^^A
-% \put(#3,\csname @tempcnta\endcsname){^^A
-% \makebox(0,5)[l]{~#5\,mm$\times$#6\,mm (B$\times$H)}%^^A
-% }%^^A
-% \end{picture}}
-% \endgroup
-% }
-%
-% \expandafter\ifx\csname rotatebox\endcsname\relax\else
-% \clearpage
-% \vspace*{\fill}\smash{\japanenvelope{235}{120}{22}{12}{90}{45}{Chou 3 EL}}%
-% \clearpage
-% \vspace*{\fill}\smash{\japanenvelope{235}{120}{22}{12}{90}{55}{Chou 3 EH}}%
-% \clearpage
-% \vspace*{\fill}\smash{\japanenvelope{235}{120}{25}{12}{90}{45}{Chou 3 LL}}%
-% \clearpage
-% \vspace*{\fill}\smash{\japanenvelope{235}{120}{25}{12}{90}{55}{Chou 3 LH}}%
-% \clearpage
-% \vspace*{\fill}\smash{\japanenvelope{205}{90}{22}{12}{90}{45}{Chou 4 EL}}%
-% \clearpage
-% \vspace*{\fill}\smash{\japanenvelope{205}{90}{22}{12}{90}{55}{Chou 4 EH}}%
-% \clearpage
-% \vspace*{\fill}\smash{\japanenvelope{205}{90}{25}{12}{90}{45}{Chou 4 LL}}%
-% \clearpage
-% \vspace*{\fill}\smash{\japanenvelope{205}{90}{25}{12}{90}{55}{Chou 4 LH}}%
-% \clearpage
-% \vspace*{\fill}\smash{\japanenvelope{205}{90}{98}{28}{90}{45}{Chou 4 RL}}%
-% \clearpage
-% \fi
-%\fi
-%
-% \StopEventually{\PrintIndex}
-%
-% \section{Implementation}
-% \begin{macrocode}
-%<*lco>
-% \end{macrocode}
-%
-% \subsection{The File Header}
-%
-% Declaration of the file.
-% \begin{macrocode}
-%<*head>
-\ProvidesFile{%
-%<Ni> Nippon%
-%<Kaku> Kaku%
-%<EARLY> E%
-%<LATE> L%
-%<RIGHT> R%
-%<LOW> L%
-%<HIGH> H%
-}[%
-%!KOMAScriptVersion
-Japanese letter-class-option]
-% \end{macrocode}
-%
-% \begin{command}{\LCOWarningNoLine}
-% \begin{command}{\LCOWarning}
-% We need macros that are similar to |\ClassWarningNoLine| or
-% |\PackageWarningNoLine| and |\ClassWarning| or |\PackageWarning|
-% \begin{macrocode}
-\providecommand*\LCOWarningNoLine[2]{%
- \LCOWarning{#1}{#2\@gobble}%
-}
-\providecommand*\LCOWarning[2]{%
- \GenericWarning{%
- (#1)\@spaces\@spaces\@spaces\@spaces\@spaces\@spaces\@spaces
- }{%
- Letter class option #1 Warning: #2%
- }%
-}
-%</head>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-%
-% \subsection{Main-Part}
-%
-% Check the class.
-% \changes{v3.25a}{2018/04/17}{check not only for \cls*{scrlttr2} but also
-% for \pkg*{scrletter}}%^^A
-% \begin{macrocode}
-%<*body>
-\@ifundefined{scr@fromname@var}{%
- \LCOWarningNoLine{%
-%<Ni> Nippon%
-%<Kaku> Kaku%
-%<EARLY> E%
-%<LATE> L%
-%<RIGHT> R%
-%<LOW> L%
-%<HIGH> H%
- }{%
- This letter class option file was made only\MessageBreak
- to be used with KOMA-Script letter class\MessageBreak
- `scrlttr2' or letter package `scrletter'.\MessageBreak
- Use with other classes and without that package\MessageBreak
- can result in a lot of errors%
- }%
-}{}
-% \end{macrocode}
-%
-% Is the expected paper size used?
-% \begin{macrocode}
-\LetterOptionNeedsPapersize{%
-%<Ni> Nippon%
-%<Kaku> Kaku%
-%<EARLY> E%
-%<LATE> L%
-%<RIGHT> R%
-%<LOW> L%
-%<HIGH> H%
-}{a4}
-% \end{macrocode}
-%
-% All the values
-% \begin{variable}{fromzipcode}
-% \changes{v3.03}{2009/03/04}{set term of variable \texttt{fromzipcode}}
-% \begin{macrocode}
-\setkomavar*{fromzipcode}{J}
-% \end{macrocode}
-% \end{variable}
-% \begin{pseudolength}{foldmarkhpos,
-% tfoldmarkvpos,tfoldmarklength,
-% mfoldmarkvpos,mfoldmarklength,
-% bfoldmarkvpos,bfoldmarklength,
-% foldmarkvpos,lfoldmarkhpos}
-% The fold marks. All of them are universal for Japanese \file{lco}-files.
-% \begin{macrocode}
-\setplength{foldmarkhpos}{3.5mm}
-\setplength{tfoldmarkvpos}{83mm}
-\setplength{tfoldmarklength}{4mm}
-\setplength{mfoldmarkvpos}{116mm}
-\setplength{mfoldmarklength}{2mm}
-\setplength{bfoldmarkvpos}{232mm}
-\setplength{bfoldmarklength}{2mm}
-\setplength{foldmarkvpos}{3.5mm}
-\setplength{lfoldmarkhpos}{202mm}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{toaddrhpos,toaddrvpos,toaddrwidth,toaddrheight}
-% The size and position of the address window. These values are the main
-% difference of the envelopes. The original values (all in cm) by Gernot:
-% \begin{center}
-% \begin{tabular}{lcccc}
-% \hline
-% Type & x & w & y & h \\
-% \hline
-% NipponEL & 22 & 90 & 12 & 45 \\
-% NipponEH & 22 & 90 & 12 & 55 \\
-% NipponLL & 25 & 90 & 12 & 45 \\
-% NipponLH & 25 & 90 & 12 & 55 \\
-% NipponRL & 98 & 90 & 28 & 45 \\
-% KakuLL & 25 & 90 & 24 & 45 \\
-% \hline
-% \end{tabular}
-% \end{center}
-% \begin{macrocode}
-%<EARLY>\setplength{toaddrhpos}{22mm}
-%<LATE>\setplength{toaddrhpos}{25mm}
-%<RIGHT>\setplength{toaddrhpos}{-22mm}
-\setplength{toaddrwidth}{90mm}
-%<Ni&!RIGHT>\setplength{toaddrvpos}{12mm}
-%<Ni&RIGHT>\setplength{toaddrvpos}{28mm}
-%<Kaku>\setplength{toaddrvpos}{24mm}
-%<LOW>\setplength{toaddrheight}{40mm}
-%<HIGH>\setplength{toaddrheight}{50mm}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{toaddrindent,backaddrheight,
-% specialmailindent,specialmailrightindent}
-% These are also inside the address window and same for all Japanese
-% envelopes.
-% \begin{macrocode}
-\setplength{toaddrindent}{\z@}
-\setplength{backaddrheight}{5mm}
-\setplength{specialmailindent}{\fill}
-\setplength{specialmailrightindent}{1em}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{locwidth,locheight}
-% The location field also depends on the address field.
-% \begin{macrocode}
-\setplength{locwidth}{\z@}
-%<Ni>\setplength{locheight}{55mm}%
-%<Kaku>\setplength{locheight}{45mm}%
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{refvpos,refwidth,refaftervskip}
-% While the position of the reference line also depends on the address field,
-% the space below it is fix. The zero of \plen{revwidth} is a magic. See
-% \file{scrkernel-notepaper.dtx} for more information.
-% \begin{macrocode}
-%<!Ni|!RIGHT>\setplength{refvpos}{69mm}
-%<Ni&RIGHT>\setplength{refvpos}{84mm}
-\setplength{refaftervskip}{\baselineskip}
-\setplength{refwidth}{\z@}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{firstheadvpos,firstheadwidth}
-% The header also depends on the address field. This is the reason we have
-% not defined it first, despite it is the first field.
-% \begin{macrocode}
-\setplength{firstheadvpos}{8mm}
-\setplength{firstheadwidth}{\paperwidth}
-\ifdim \useplength{toaddrhpos}>\z@
- \addtoplength[-2]{firstheadwidth}{\useplength{toaddrhpos}}
-\else
- \addtoplength[2]{firstheadwidth}{\useplength{toaddrhpos}}
-\fi
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{firstfootwidth,firstfootvpos}
-% The width of the footer depends on the width of the header. The position
-% depends on the paper height.
-% \begin{macrocode}
-\setplength{firstfootwidth}{\useplength{firstheadwidth}}
-\setplength{firstfootvpos}{\paperheight}
-\addtoplength{firstfootvpos}{-16mm}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{sigindent,sigbeforevskip}
-% Values of the signature
-% \begin{macrocode}
-\setplength{sigindent}{\z@}
-\setplength{sigbeforevskip}{2\baselineskip}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{command}{\raggedsignature}
-% The signature is centered, but maybe this should be changed to
-% \cs{raggedright}?
-% \begin{macrocode}
-\let\raggedsignature=\centering
-% \end{macrocode}
-% \end{command}
-%
-% \begin{option}{fromalign}
-% The default alignment of the sender is in the location field.
-% \begin{macrocode}
-\ifcase\@alignfrom
- \KOMAoptions{fromalign=locationright}%
-\or
- \KOMAoptions{fromalign=locationright}%
-\or
- \KOMAoptions{fromalign=locationright}%
-\fi
-% \end{macrocode}
-% \end{option}
-%
-% \begin{macrocode}
-%</body>
-%</lco>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/koma-script-source-doc.dtx b/macros/latex/contrib/koma-script/source/koma-script-source-doc.dtx
deleted file mode 100644
index d1ce7326c5..0000000000
--- a/macros/latex/contrib/koma-script/source/koma-script-source-doc.dtx
+++ /dev/null
@@ -1,785 +0,0 @@
-% \iffalse meta-comment
-% ==========================================================================
-% komascript-source.doc.dtx
-% Copyright (c) Markus Kohm, 2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% --------------------------------------------------------------------------
-% Note: This is a self unpacking dtx-file, so you have to run:
-% tex koma-script-source-doc.dtx
-% to unpack the file(s), but
-% lualatex-dev koma-script-source-doc.dtx
-% mkindex koma-script-source-doc
-% lualatex-dev koma-script-source-doc.dtx
-% mkindex koma-script-source-doc
-% lualatex-dev koma-script-source-doc.dtx
-% to generate the manual. Before generation of the manual it is
-% recommended to install or at least unpack KOMA-Script.
-% ==========================================================================
-%%
-%<+drv>\ProvidesFile{koma-script-source-doc.drv}
-%<+class>\ProvidesClass{koma-script-source-doc}
-%<*ins>
-\expandafter\expandafter\expandafter\ifx\csname ProvidesFile\endcsname\relax
- \def\ProvidesFile#1[#2]{}
-\fi
-%</ins>
-%<*dtx>
-\ProvidesFile{koma-script-source-doc.dtx}
-%</dtx>
-%<+ins>\ProvidesFile{koma-script-source-doc.ins}
-[2022-03-10 v0.91 KOMA-Script source documentation]
-%<*dtx>
-\ifx\documentclass\undefined
-%</dtx>
-%<*ins>
- \input docstrip.tex
- \ifToplevel{\keepsilent\askforoverwritefalse}
- \generate{%
-% \file{koma-script-source-doc.drv}{%
-% \from{koma-script-source-doc.dtx}{drv}%
-% }
-% \file{koma-script-source-doc.ins}{%
-% \from{koma-script-source-doc.dtx}{ins}%
-% }
- \file{koma-script-source-doc.cls}{%
- \from{koma-script-source-doc.dtx}{class}%
- \from{scrlogo.dtx}{logo,forcedefine}%
- }%
- }
-%</ins>
-%<*dtx>
-\else
- \let\endbatchfile\relax
-\fi
-%</dtx>
-%<*dtx|ins>
-\endbatchfile
-%</dtx|ins>
-%<*drv>
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{libertinus}
-\usepackage{babel}
-\NewDocElement[%
- macrolike = false,
- toplevel = true,
- idxtype = \textit{d.\,i.},
- idxgroup = Documentation items,
- printtype = \textit{d.\,i.},
-]{DocItem}{docitem}
-\begin{document}
-\DocInput{koma-script-source-doc.dtx}
-\end{document}
-%</drv>
-% \fi^^A meta-comment
-%
-% \changes{v0.0}{2022/01/15}{start of the new class}
-% \changes{v0.1}{2022/01/15}{first self documenting test}
-% \changes{v0.6}{2022/02/02}{force definition of \KOMAScript{} logo}
-% \changes{v0.6}{2022/02/02}{\pkg{hyperref} hook for \KOMAScript{} logo moved
-% to \file{scrlogo.dtx}}
-%
-% \DoNotIndex{\actualchar}
-%
-% \GetFileInfo{\jobname.dtx}
-% \title{\href{https://komascript.de}{\KOMAScript} Source Documentation\\
-% Using\\
-% \cls*{koma-script-source-doc}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Version \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% From 2002 up to end of 2021 \cls*{scrdoc} was the class, that has been used
-% for the sources of \KOMAScript{} and several other packages of the
-% \KOMAScript{} author. This class was more or less a ugly hack to use a
-% modified and extended version of \cls{ltxdoc}, the source documentation
-% class of The \LaTeX{} Team. There has been advisement to redesign this
-% class for years, but as changing the source documentation class is more a
-% work of month than of days, I've always put it on the back burner.
-%
-% In January 2022, The \LaTeX{} Team switched over from \pkg{doc} version 2 to
-% version 3. The new version is compatible on user interface level, but as
-% expected not on implementation level. So the extensions made in \cls*{scrdoc}
-% result in several error messages. For such cases The \LaTeX{} Team has the
-% fallback solution to use an old \pkg{doc}. But this can only be used, if you
-% load \pkg{doc} yourself using either |\usepackage| or
-% |\RequirePackage|. If class \cls{ltxdoc} is used, the fallback does not
-% exist.
-%
-% A first workaround for \cls*{scrdoc} was a typical hacker solution, that
-% forces \cls{ltxdoc} to use an old version of \pkg{doc} and to fix the
-% resulting issues after loading \cls{ltxdoc}. But this does only work as long
-% as new releases of \cls{ltxdoc} are compatible with the \pkg{doc} release of
-% 2021.
-%
-% So in January 2022, it was really time for a new \KOMAScript{} source
-% documentation class. This new class does not use internal commands of
-% \cls{ltxdoc} any longer but uses the extended interface of \pkg{doc} version
-% 3 to define further documentation items.
-% \end{abstract}
-%
-% \tableofcontents
-%
-% \section{Prerequisites}
-% \label{sec:prerequisites}
-%
-% Class \cls*{koma-script-source-doc} needs at least class \cls{ltxdoc} version
-% 2.1d which depends on package \pkg{doc} version 3, because it used several
-% of the new features of that \pkg{doc} release. This is part of
-% \texttt{latex-base-dev} 2022-06-01 pre-release~1 distributed on
-% \href{https://www.ctan.org}{CTAN} on 14th January 2022 and therefore will be
-% part of \LaTeX{} 2022-06-01. If you still use an older \LaTeX{} you cannot
-% use class \cls*{koma-script-source-doc}.
-%
-%
-% \section{Basic Settings}
-% \label{sec:basicsettings}
-%
-% For \KOMAScript{} we use some basic settings:
-% \begin{itemize}
-% \item Generation of the indexing of new commands is generally enabled by
-% \pkg{doc}. We do not use \cs{EnableCrossrefs}, because this would not
-% allow to disable this feature using \cs{DisableCrossrefs}. It is also
-% recommended not to generally use \cs{EnableCrossrefs} in the
-% \file{dtx}-file.
-% \item We use \cs{CodeLineIndex} to have code line numbers for the
-% indexing. This could be problematic sometimes. In this case, you should
-% use \cs{PageIndex} and \cs{CodelineNumbered} to use page numbers in the
-% index but nevertheless add line numbers to the code.
-% \item For \KOMAScript{} code we usually record the changes. So we use
-% \cs{RecordChanges} and option \opt{reportchangedates} This is the only
-% real changelog we do. However, if your \file{dtx}-file contains the user
-% manual, it would be recommended to list the main changes like new features
-% and incompatibilities as a section either at the very beginning or the end
-% of the user manual.
-% \item \DescribeOption{indexlatex} For \KOMAScript{} sources I do not like to
-% index all the \LaTeX{} interface commands and internal
-% commands\footnote{This does only work for those \LaTeX{} macros, already
-% internally listed. The list should be generated automatically after each
-% \LaTeX{} release. Unfortunately, currently it is build step by step with
-% every new \KOMAScript{} release instead.}. You can changes this, using
-% option \opt{indexlatex}. You can also use explicit \opt{indexlatex=false}
-% to again not index the \LaTeX{} kernel macros.
-% \item You also should use \cs{GetFileInfo}\marg{dtx-filename} to get
-% information like \cs{filedate} and \cs{fileversion} from the
-% \cs{ProvidesFile} command of the \file{dtx}-file. Sometimes it may even be
-% better to use the generated package or class as argument.
-% \end{itemize}
-%
-%
-% \section{Simple Formatting Commands}
-% \label{sec:simpleformatting}
-%
-% \DescribeCommand{\file}
-% \DescribeCommand{\opt}
-% \DescribeCommand{\optvalue}
-% \DescribeCommand{\env}
-% \DescribeCommand{\cnt}
-% \DescribeCommand{\fnt}
-% \DescribeCommand{\len}
-% \DescribeCommand{\var}
-% \DescribeCommand{\plen}
-% \DescribeCommand{\pstyle}
-% \DescribeCommand{\dhook}
-% There are some very simple formatting commands. They all expect one
-% mandatory argument \meta{object name}. The default formatting is to use
-% \cs{texttt}. The commands are mentioned for the name of a file, option,
-% value of an option, environment, \LaTeX{} counter, font, length (either
-% dimension or skip), variable (usually \KOMAScript{} variables used by
-% \cls*{scrlttr2} or \pkg*{scrletter}), pseudo-length (of \cls*{scrlttr2} or
-% \pkg*{scrletter}), page style, or do hook.
-%
-% \DescribeCommand{\cls}
-% \DescribeCommand{\pkg}
-% The commands:
-% \begin{quote}
-% \cs{cls}\oarg{hyper link}\marg{package name}\hfill and\hfill
-% \cs{pkg}\oarg{hyper link}\marg{class name}
-% \end{quote}
-% do not only print the name of a class or package, but also generate a hyper
-% link. For this the commands have a first optional argument. If this is
-% empty, no link will be generated. If it is not empty, it has to be the
-% link. If it is not used an automatic package link to the
-% \href{https://www.ctan.org/pkg}{CTAN} package with the same name will be
-% generated. There are also star variants \cs{cls*} and \cs{pkg*}, that do not
-% produce any link. For links with special characters like \texttt{\char`\#}
-% it is recommended to use \cs{href} and the star variant.
-% \begin{center}
-% Examples:\hspace{0pt plus 1filll}\null\\[-\baselineskip]
-% \cs{cls}|{scrbook}| \textrightarrow{} \cls{scrbook}\\
-% \cs{cls*}|{scrbook}| \textrightarrow{} \cls*{scrbook}\\
-% \cs{cls}|[https://koma-script.de]{koma-script-source-doc}|
-% \textrightarrow{} \cls[https://koma-script.de]{koma-script-source-doc}\\
-% \cs{pkg}|[]{scrlayer}| \textrightarrow{} \pkg[]{scrlayer} \\
-% \cs{href}|{http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguien.pdf#cha:typearea}{\pkg*{typearea}}|
-% \textrightarrow{}
-% \href{http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguien.pdf#chapter.2}{\pkg*{typearea}}
-% \end{center}
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation}
-%
-% \begin{macrocode}
-%<*class>
-% \end{macrocode}
-%
-% \subsection{Class Options}
-%
-% We use \pkg{l3keys2e} for the options. Using \pkg*{scrkbase} would be nice
-% too, but it cannot be used until \KOMAScript{} is available, to the
-% emergency fallback to using the standard class \cls*{article} wouldn't make
-% sense in this case.
-% \begin{macrocode}
-\RequirePackage{l3keys2e}
-\ExplSyntaxOn
-% \end{macrocode}
-% \begin{option}{indexlatex}
-% \changes{v0.3}{2022/01/17}{new option}
-% The option to switch on/off the indexing of \LaTeX{} interface and internal
-% macros (and also \TeX{} primitives). The pre-setting is \texttt{false}. The
-% default of the option is \texttt{true}.
-% \begin{macrocode}
-\newif \ifkdoc@indexlatex \kdoc@indexlatexfalse
-\keys_define:nn {kdoc}
- {
- indexlatex .choice:,
- indexlatex / true .code:n = { \legacy_if_set_true:n { kdoc@indexlatex } },
- indexlatex / false .code:n = { \legacy_if_set_false:n { kdoc@indexlatex } },
- indexlatex .default:n = { true },
- }
-% \end{macrocode}
-% \end{option}
-% \begin{macrocode}
-\ExplSyntaxOff
-\ProcessKeysOptions {kdoc}
-% \end{macrocode}
-%
-%
-% \subsection{Base Class and Packages}
-%
-% \changes{v0.2}{2022/01/16}{emergency fallback to \cls*{article}}
-% \changes{v0.3}{2022/01/17}{new basic defaults}
-% \changes{v0.3}{2022/01/17}{\cs{DoNotIndex} of several \LaTeX{} kernel
-% macros}
-% \changes{v0.3a}{2022/01/21}{using an old \pkg{doc} is fatal}
-% Currently we use base class \cls{ltxdoc} at least version 2021/12/07
-% v2.1d. In future this could change. In this case we would need to load
-% package \pkg{doc} at least version 2022/06/01 v3.0g. However, we also want
-% \cls{ltxdoc} to use \KOMAScript{} class \cls*{scrartcl} instead of standard
-% class \cls*{article}. But if \KOMAScript{} has not been made, we cannot use
-% a \KOMAScript{} class or package to compile the source. So in this case
-% we use an emergency fallback.
-% \begin{macrocode}
-\IfFileExists{scrartcl.cls}{%
- \declare@file@substitution{article.cls}{scrartcl.cls}
- \PassOptionsToClass{fontsize=10pt}{scrartcl}
-}{%
- \ClassWarningNoLine{koma-script-source-doc}{%
- Usually this class should be used with KOMA-Script\MessageBreak
- scrartcl. But as that class is not available we use\MessageBreak
- standard class article as emergency fallback.\MessageBreak
- It is recommended to repeat this LaTeX run after\MessageBreak
- build/installation of a complete KOMA-Script%
- }%
-}
-\LoadClassWithOptions{ltxdoc}[2021/12/07]
-\IfPackageAtLeastTF{doc}{2022/06/01}{}{%
- \ClassError{koma-script-source-doc}{old package `doc' detected}{%
- This class needs `doc' v3. It cannot be used with\MessageBreak
- `doc' v2. `doc' v3 is available at LaTeX developer\MessageBreak
- release from at least January 2022}%
- \csname fi\endcsname\csname @@end\endcsname\end\endinput
-}
-\SetupDoc{reportchangedates}
-\CodelineIndex
-\RecordChanges
-\ifkdoc@indexlatex\else
- \DoNotIndex{\.,\\,\ ,\@,\@Alph,\@M}
- \DoNotIndex{\@abstrtfalse,\@abstrttrue,\@addtoreset,\@afterheading}
- \DoNotIndex{\@afterindentfalse,\@alph,\@arabic}
- \DoNotIndex{\@beginparpenalty}
- \DoNotIndex{\@car,\@cdr,\@centercr}
- \DoNotIndex{\@dblfloat,\@dotsep}
- \DoNotIndex{\@dottedtocline,\@empty,\@endparpenalty}
- \DoNotIndex{\@float,\@fontswitch}
- \DoNotIndex{\@gobbletwo}
- \DoNotIndex{\@hangfrom,\@highpenalty}
- \DoNotIndex{\@ifnextchar,\@ifundefined,\@itempenalty}
- \DoNotIndex{\@latex@warning}
- \DoNotIndex{\@m,\@medpenalty,\@minus,\@mkboth,\@mparswitchfalse}
- \DoNotIndex{\@mparswitchtrue}
- \DoNotIndex{\@ne,\@nil,\@nobreakfalse,\@nobreaktrue,\@nomath}
- \DoNotIndex{\@plus}
- \DoNotIndex{\@Roman,\@roman}
- \DoNotIndex{\@tempa,\@tempcnta,\@tempdima,\@tempskipka}
- \DoNotIndex{\@tempswafalse,\@tempswatrue}
- \DoNotIndex{\@tempb,\@tempcntb,\@tempdimb,\@tempskipkb}
- \DoNotIndex{\@tempswbfalse,\@tempswbtrue}
- \DoNotIndex{\@tempc,\@tempcntc,\@tempdimc,\@tempskipkc}
- \DoNotIndex{\@tocrmarg,\@topnewpage,\@topnum,\@twocolumnfalse}
- \DoNotIndex{\@twocolumntrue,\@twosidefalse,\@twosidetrue}
- \DoNotIndex{\@whiledim,\@whilenum}
- \DoNotIndex{\addcontentsline,\addpenalty,\addtocontents,\addtolength}
- \DoNotIndex{\addvspace,\advance,\AtBeginDocument}
- \DoNotIndex{\begin,\begingroup,\bfseries,\box,\bullet}
- \DoNotIndex{\c@figure,\c@page,\c@secnumdepth,\c@table,\c@tocdepth}
- \DoNotIndex{\cdot,\centering,\changes,\cleardoublepage,\clearpage}
- \DoNotIndex{\cmd,\col@number,\CurrentOption,\CodelineIndex,\cs}
- \DoNotIndex{\day,\dblfloatpagefraction,\dbltopfraction}
- \DoNotIndex{\declare@file@substitution}
- \DoNotIndex{\DeclareOldFontCommand,\DeclareOption,\def,\DisableCrossrefs}
- \DoNotIndex{\divide,\DoNotIndex}
- \DoNotIndex{\ifdim,\else,\fi,\empty,\em,\EnableCrossrefs,\end}
- \DoNotIndex{\end@dblfloat}
- \DoNotIndex{\end@float,\endgroup,\endlist,\endquotation,\endtitlepage}
- \DoNotIndex{\everypar,\ExecuteOptions,\expandafter}
- \DoNotIndex{\fboxrule,\fboxsep}
- \DoNotIndex{\g@addto@macro,\gdef,\global}
- \DoNotIndex{\hangindent,\hbox,\hfil,\hrule,\hsize,\hskip,\hspace,\hss}
- \DoNotIndex{\if@tempswa,\ifcase,\or,\fi,\fi}
- \DoNotIndex{\ifnum,\ifodd,\ifx,\fi,\fi,\fi}
- \DoNotIndex{\include,\input,\InputIfFileExists,\item,\itshape}
- \DoNotIndex{\kern,\kernel@ifnextchar}
- \DoNotIndex{\leavevmode,\leftmark,\leftskip,\let,\lineskip}
- \DoNotIndex{\list,\long,\LoadClass,\LoadClassWithOptions}
- \DoNotIndex{\m@ne,\m@th,\marginpar,\markboth,\markright,\mathbf,\mathcal}
- \DoNotIndex{\mathit,\mathnormal,\mathrm,\mathsf,\mathtt,\MessageBreak}
- \DoNotIndex{\month}
- \DoNotIndex{\newblock,\newcommand,\newcount,\newcounter,\newdimen}
- \DoNotIndex{\newenvironment,\newlength,\newpage,\nobreak,\noindent}
- \DoNotIndex{\normalfont,\normallineskip,\normalsize,\null,\number}
- \DoNotIndex{\numberline,\normalcolor}
- \DoNotIndex{\OldMakeindex,\OnlyDescription,\overfullrule}
- \DoNotIndex{\p@,\PackageError,\PackageInfo,\PackageWarningNoLine}
- \DoNotIndex{\pagenumbering,\pagestyle,\par,\paragraph,\parbox}
- \DoNotIndex{\PassOptionsToPackage,\pcal,\penalty,\pmit,\PrintChanges}
- \DoNotIndex{\PrintIndex,\ProcessOptions,\protect,\providecommand}
- \DoNotIndex{\ProvidesClass}
- \DoNotIndex{\raggedbottom,\raggedleft,\raggedright,\refstepcounter,\relax}
- \DoNotIndex{\renewcommand,\RenewDocElement,\RequirePackage}
- \DoNotIndex{\reserved@a,\reserved@b,\reserved@c,\reset@font}
- \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rmfamily}
- \DoNotIndex{\scshape,\secdef,\setbox,\setcounter,\setlength}
- \DoNotIndex{\settowidth,\sfcode,\sffamily,\skip,\sloppy,\slshape,\space}
- \DoNotIndex{\string}
- \DoNotIndex{\TeX,\textbf,\textit,\textrm,\textsf,\texttt,\textup}
- \DoNotIndex{\the,\thispagestyle,\triangleright,\ttfamily}
- \DoNotIndex{\twocolumn,\typeout}
- \DoNotIndex{\undefined,\usecounter}
- \DoNotIndex{\vfil,\vfill,\vspace}
- \DoNotIndex{\wd,\xdef,\year,\z@}
-\fi
-% \end{macrocode}
-%
-% \changes{v0.2}{2022/01/16}{do not fail if \pkg*{typearea} has not been
-% loaded}
-% The left margin is highly used, but the right margin is not. So it is a kind
-% of \opt{mpinclude} but with the left instead of the right margin. A simple
-% solution for this is to move the whole page content to the right. But we do
-% so only, if \cls*{koma-script-source-doc} is used with \cls*{scrartcl}.
-% \begin{macrocode}
-\ifdefined\AfterCalculatingTypearea
- \AfterCalculatingTypearea{%
- \addtolength{\oddsidemargin}
- {.5\dimexpr\oddsidemargin+1in\relax}%
- \setlength{\marginparwidth}
- {\dimexpr \oddsidemargin+1in-2\marginparsep\relax}%
- \setlength{\marginparpush}{0pt}%
- }
- \KOMAoption{DIV}{9}
-\fi
-% \end{macrocode}
-%
-% Because \pkg{doc} uses a late hook to load \pkg{hyperref} there may be a
-% problem with package \pkg{auxhook} used by \pkg{hyperref}. So we load it
-% early to avoid such problems.
-% \begin{macrocode}
-\RequirePackage{auxhook}
-% \end{macrocode}
-%
-%
-% \begin{macro}{\index@prologue,\glossary@prologue}
-% \changes{v0.5}{2022/01/31}{generating ToC entry}
-% \begin{macro}{\kssd@section@hack}
-% \changes{v0.5}{2022/01/31}{new}
-% 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
-% using \cs{IndexPrologue} resp. \cs{GlossaryPrologue} as documented for
-% \pkg{doc}.
-% \begin{macrocode}
-\expandafter\def\expandafter\index@prologue\expandafter{%
- \expandafter\kssd@section@hack\index@prologue}
-\expandafter\def\expandafter\glossary@prologue\expandafter{%
- \expandafter\kssd@section@hack\glossary@prologue}
-\newcommand*{\kssd@section@hack}{%
- \let\ksdd@markboth\markboth
- \def\markboth##1##2{%
- \@ifundefined{addsectiontocentry}{%
- \@ifundefined{addxcontentsline}{%
- \addcontentsline{toc}{section}{\numberline{}##1}%
- }{%
- \addxcontentsline{toc}{section}{##1}%
- }%
- }{%
- \addsectiontocentry{}{##1}%
- }%
- \let\markboth\ksdd@markboth
- \markboth{##1}{##2}%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \subsection{Simple Formatting Macros}
-%
-% These are very simply defined macros for names of
-% \begin{command}{\file}
-% files,
-% \begin{macrocode}
-\newcommand*{\file}{\texttt}
-% \end{macrocode}
-% \begin{command}{\cls}
-% \changes{v0.8}{2022/02/08}{using \cs{textsf}}
-% \changes{v0.9}{2022/02/09}{using \cs{pkg} for automatic link generation}
-% classes,
-% \begin{macrocode}
-\newcommand*{\cls}{\pkg}
-% \end{macrocode}
-% \begin{command}{\pkg}
-% \changes{v0.8}{2022/02/08}{using \cs{textsf}}
-% \changes{v0.9}{2022/02/09}{automatic link generation}
-% packages (note: we cannot use \cs{ExplSyntaxOn}/\cs{ExplSyntaxOff}, because
-% \cs{href} would generate a file link),
-% \begin{macrocode}
-\NewDocumentCommand{\pkg}{sO{https://www.ctan.org/pkg/#3}m}{%
- \IfBooleanTF{#1}{\@gobble}{%
- \csname tl_if_blank:nTF\endcsname{#2}{\@gobble}{\href}%
- }%
- {#2}{\textsf{#3}}%
-}
-% \end{macrocode}
-% \begin{command}{\opt}
-% options,
-% \begin{macrocode}
-\newcommand*{\opt}{\texttt}
-% \end{macrocode}
-% \begin{command}{\optvalue}
-% option values,
-% \begin{macrocode}
-\newcommand*{\optvalue}{\texttt}
-% \end{macrocode}
-% \begin{command}{\env}
-% environments,
-% \begin{macrocode}
-\newcommand*{\env}{\texttt}
-% \end{macrocode}
-% \begin{command}{\len}
-% \changes{v0.6}{2022/02/02}{added}
-% lengths,
-% \begin{macrocode}
-\newcommand*{\len}{\cs}
-% \end{macrocode}
-% \begin{command}{\cnt}
-% counters,
-% \begin{macrocode}
-\newcommand*{\cnt}{\texttt}
-% \end{macrocode}
-% \begin{command}{\fnt}
-% fonts,
-% \begin{macrocode}
-\newcommand*{\fnt}{\texttt}
-% \end{macrocode}
-% \begin{command}{\var}
-% \changes{v0.6}{2022/02/02}{added}
-% variables,
-% \begin{macrocode}
-\newcommand*{\var}{\texttt}
-% \end{macrocode}
-% \begin{command}{\plen}
-% \changes{v0.6}{2022/02/02}{added}
-% pseudo-lengths,
-% \begin{macrocode}
-\newcommand*{\plen}{\texttt}
-% \end{macrocode}
-% \begin{command}{\pstyle}
-% \changes{v0.8}{2022/02/08}{added}
-% page styles,
-% \begin{macrocode}
-\newcommand*{\pstyle}{\texttt}
-% \end{macrocode}
-% \begin{command}{\dhook}
-% \changes{v0.91}{2022/03/10}{added}
-% do hooks.
-% \begin{macrocode}
-\newcommand*{\dhook}{\texttt}
-% \end{macrocode}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-%
-%
-% \subsection{Documentation Items}
-% \label{sec:documentationitems}
-%
-% \KOMAScript{} has several additional items beside macros and environments.
-% The old \cls*{scrdoc} class provides macros, environments, options, lengths,
-% counters, variables and fonts. But now we also distinguish internal macros
-% vs. users commands and internal lengths vs. user lengths. In this
-% documentation we additionally provide documentation items.
-%
-% \begin{docitem}{Macro}
-% \begin{command}{\DescribeMacro}
-% \begin{environment}{macro}
-% An internal macro.
-% \begin{macrocode}
-\RenewDocElement[%
- macrolike = true,
- toplevel = false,
- idxtype = ,
- idxgroup = TeX macros (internal)\actualchar\TeX{} macros (internal),
- printtype = \textit{intern}
-]{Macro}{macro}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{Command}
-% \begin{command}{\DescribeCommand}
-% \begin{environment}{command}
-% User command.
-% \begin{macrocode}
-\NewDocElement[%
- macrolike = true,
- toplevel = true,
- idxtype = ,
- idxgroup = Commands,
- printtype = ,
-]{Command}{command}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{Env}
-% \begin{command}{\DescribeEnv}
-% \begin{environment}{environment}
-% Environments.
-% \begin{macrocode}
-\RenewDocElement[%
- macrolike = false,
- toplevel = true,
- idxtype = \textit{env.} ,
- idxgroup = Environments,
- printtype = \textit{env.}
-]{Env}{environment}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{Option}
-% \begin{command}{\DescribeOption}
-% \begin{environment}{option}
-% Options.
-% \begin{macrocode}
-\NewDocElement[%
- macrolike = false,
- toplevel = true,
- idxtype = \textit{opt.},
- idxgroup = Options,
- printtype = \textit{opt.}
-]{Option}{option}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{ILength}
-% \begin{command}{\DescribeILength}
-% \begin{environment}{ilength}
-% An internal length.
-% \begin{macrocode}
-\NewDocElement[%
- macrolike = true,
- toplevel = false,
- idxtype = ,
- idxgroup = Lengths (internal),
- printtype = \textit{ilen.}
-]{ILength}{ilength}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{Length}
-% \begin{command}{\DescribeLength}
-% \begin{environment}{length}
-% User length.
-% \begin{macrocode}
-\NewDocElement[%
- macrolike = true,
- toplevel = true,
- idxtype = \textit{len.},
- idxgroup = Lengths (user),
- printtype = \textit{len.},
-]{Length}{length}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{Counter}
-% \begin{command}{\DescribeCounter}
-% \begin{environment}{counter}
-% User counter.
-% \begin{macrocode}
-\NewDocElement[%
- macrolike = false,
- toplevel = true,
- idxtype = \textit{cnt.},
- idxgroup = Counters,
- printtype = \textit{cnt.},
-]{Counter}{counter}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{KOMAfont}
-% \begin{command}{\DescribeKOMAfont}
-% \begin{environment}{fontelement}
-% \KOMAScript{} font element
-% \begin{macrocode}
-\NewDocElement[%
- macrolike = false,
- toplevel = true,
- idxtype = \textit{font},
- idxgroup = KOMA-Script font elements\actualchar\KOMAScript{} font elements,
- printtype = \textit{font},
-]{KOMAfont}{fontelement}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{KOMAvar}
-% \begin{command}{\DescribeKOMAvar}
-% \begin{environment}{variable}
-% \KOMAScript{} variable (used by \cls*{scrlttr2} and \pkg*{scrletter}).
-% \begin{macrocode}
-\NewDocElement[%
- macrolike = false,
- toplevel = true,
- idxtype = \textit{var.},
- idxgroup = KOMA-Script variables\actualchar\KOMAScript{} variables,
- printtype = \textit{var.},
-]{KOMAvar}{variable}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{PLength}
-% \changes{v0.6}{2022/02/02}{added}
-% \begin{command}{\DescribePLength}
-% \changes{v0.6}{2022/02/02}{added}
-% \begin{environment}{peudolength}
-% \changes{v0.6}{2022/02/02}{added}
-% \KOMAScript{} pseudo-lengths (used by \cls*{scrlttr2} and \pkg*{scrletter}).
-% \begin{macrocode}
-\NewDocElement[%
- macrolike = false,
- toplevel = true,
- idxtype = \textit{plen.},
- idxgroup = KOMA-Script pseudo-lengths\actualchar\KOMAScript{} pseudo-lengths,
- printtype = \textit{plen.},
-]{PLength}{pseudolength}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{PageStyle}
-% \changes{v0.8}{2022/02/08}{added}
-% \begin{command}{\DescribePageStyle}
-% \changes{v0.8}{2022/02/08}{added}
-% \begin{environment}{pgstyle}
-% \changes{v0.8}{2022/02/08}{added}
-% Page style.
-% \begin{macrocode}
-\NewDocElement[%
- macrolike = false,
- toplevel = true,
- idxtype = \textit{pgstyle},
- idxgroup = page styles,
- printtype = \textit{style}
-]{PageStyle}{pgstyle}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{docitem}{DoHook}
-% \changes{v0.91}{2022/03/10}{added}
-% \begin{command}{\DescribeDoHook}
-% \changes{v0.91}{2022/03/10}{added}
-% \begin{environment}{dohook}
-% \changes{v0.91}{2022/03/10}{added}
-% Page style.
-% \begin{macrocode}
-\NewDocElement[%
- macrolike = false,
- toplevel = true,
- idxtype = \textit{do hook},
- idxgroup = do hooks,
- printtype = \textit{dohook}
-]{DoHook}{dohook}
-% \end{macrocode}
-% \end{environment}
-% \end{command}
-% \end{docitem}
-%
-% \begin{macrocode}
-%</class>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scraddr.dtx b/macros/latex/contrib/koma-script/source/scraddr.dtx
deleted file mode 100644
index f01483bf59..0000000000
--- a/macros/latex/contrib/koma-script/source/scraddr.dtx
+++ /dev/null
@@ -1,296 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scraddr.dtx
-% Copyright (c) Markus Kohm, 2006-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scraddr.dtx 3688 2022-02-10 08:26:37Z kohm $
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\ProvidesFile{scraddr.dtx}
-%</dtx>>
-%<scraddr>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-%<driver>\ProvidesFile{scraddr.drv}
-%<scraddr>\ProvidesPackage{scraddr}
-%<*dtx|scraddr|driver>
- [2022/01/24 v1.1d KOMA-Script
-%</dtx|scraddr|driver>
-%<scraddr> package]
-%<*dtx|driver>
- Script bundle]
-%</dtx|driver>
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2006}
- \generate{\usepreamble\defaultpreamble
- \file{scraddr.sty}{%
- \from{scraddr.dtx}{scraddr}%
- \from{scrlogo.dtx}{logo}%
- }%
- }
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-%</dtx>
-%<*driver>
-\documentclass{koma-script-source-doc}
-\usepackage[USenglish]{babel}
-\begin{document}
- \DocInput{scraddr.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \changes{v1.1a}{2002/05/19}{first version, separated from \cls{scrlettr}}
-% \changes{v1.1d}{2022/01/24}{switched from \cls{scrdoc} to
-% \cls{koma-script-source-doc}}
-% \changes{v1.1d}{2022/01/24}{whole implementation documentation in English}
-%
-% \GetFileInfo{scraddr.dtx}
-% \title{Parsing Address Files \\
-% Using Package \pkg*{scraddr}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}
-% \and Jens-Uwe Morawski}
-% \date{Version \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% Address files are not only of interest for letters using the \KOMAScript{}
-% class \cls*{scrlttr2} or the \KOMAScript{} package \pkg*{scrletter}. Other
-% applications such as the creation of address books or telephone directories
-% are also quite common. In addition, it can also be useful to access not only
-% the addressee's record in a letter, but also other records in an address
-% file. This is exactly the task of the \pkg*{scraddr} package.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user manual of \pkg*{scraddr} in the \KOMAScript{} manual,
-% either the German \file{scrguide} or the English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation}
-%
-%\iffalse
-% \begin{macrocode}
-%<*scraddr>
-%<*beta>
-\PackageWarningNoLine{scraddr}
- {THIS IS A BETA VERSION!\MessageBreak
- YOU SHOULD NOT USE THIS VERSION!\MessageBreak
- YOU SHOULD INSTALL THE RELEASE FROM CTAN\MessageBreak
- AND USE THAT INSTEAD OF THIS BETA VERSION}
-%</beta>
-%</scraddr>
-%\fi
-%
-% \changes{v1.0}{1996/01/22}{New package \pkg*{scraddr}}
-%
-% \begin{macrocode}
-%<*scraddr>
-% \end{macrocode}
-%
-% \subsection{Options}
-%
-% Preliminary note: \pkg*{scraddr} is a very, very old package from the early
-% days of \KOMAScript. Therefore it does not support \emph{key=value} options
-% as other \KOMAScript{} packages do.
-%
-% \begin{option}{adrFreeIVempty}
-% \changes{v1.1a}{2002/05/19}{new}
-% \begin{option}{adrFreeIVshow}
-% \changes{v1.1a}{2002/05/19}{new}
-% \begin{option}{adrFreeIVwarn}
-% \changes{v1.1a}{2002/05/19}{new}
-% \begin{option}{adrFreeIVstop}
-% \changes{v1.1a}{2002/05/19}{new}
-% \begin{macro}{\@adrFIVerror}
-% \changes{v1.1a}{2002/05/19}{new}
-% 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
-% \cs{@adrFIVerror} (0 = \opt{adrFreeIVempty}, 1 = \opt{adrFreeIVshow},
-% 2 = \opt{adrFreewarn}, 3 = \opt{adrFreeIVstop}). Unknown values should
-% be handled as \opt{adrFreeIVstop} too, but are not recommended.
-% \begin{macrocode}
-\newcommand*{\@adrFIVerror}{}
-\DeclareOption{adrFreeIVempty}{\renewcommand*{\@adrFIVerror}{0}}
-\DeclareOption{adrFreeIVshow}{\renewcommand*{\@adrFIVerror}{1}}
-\DeclareOption{adrFreeIVwarn}{\renewcommand*{\@adrFIVerror}{2}}
-\DeclareOption{adrFreeIVstop}{\renewcommand*{\@adrFIVerror}{3}}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-% \end{option}
-% \end{option}
-% \end{option}
-%
-% \changes{v1.0a}{2001/08/07}{\cs{ExecuteOption}\cs{relax} fixed}
-% \changes{v1.1a}{2002/05/19}{\texttt{adrFreeIVshow} is default}
-% \begin{macrocode}
-\ExecuteOptions{adrFreeIVshow}
-\ProcessOptions\relax
-% \end{macrocode}
-%
-% \subsection{Reading address files}
-% \begin{command}{\InputAdressFile}
-% This command reads the address file given as mandatory argument. While
-% reading global internal macros are generated for every \cs{adrentry} or
-% \cs{addrentry}. To do so, these two macros are redefined locally only.
-% \changes{v1.1}{2002/05/18}{extended by \cs{addrentry} handling}
-% \changes{v1.1b}{2002/06/02}{\cs{addrchar} and \cs{adrchar} are defined also
-% if undefined}
-% \begin{macrocode}
-\newcommand{\InputAddressFile}[1]{\begingroup
- \ifcase\@adrFIVerror
- \def\adrentry##1##2##3##4##5##6##7{%
- \addrentry{##1}{##2}{##3}{##4}{##5}{##6}{##7}{}}%
- \or
- \def\adrentry##1##2##3##4##5##6##7##8{%
- \addrentry{##1}{##2}{##3}{##4}{##5}{##6}{##7}{%
- (entry FreeIV undefined at `##8')}{##8}}%
- \or
- \def\adrentry##1##2##3##4##5##6##7##8{%
- \addrentry{##1}{##2}{##3}{##4}{##5}{##6}{##7}{%
- \PackageWarning{scraddr}{%
- `##8' was defined using \string\adrentry\MessageBreak
- so \string\FreeIV-entry is not defined}}{##8}}%
- \else
- \def\adrentry##1##2##3##4##5##6##7##8{%
- \addrentry{##1}{##2}{##3}{##4}{##5}{##6}{##7}{%
- \PackageError{scraddr}{%
- \string\FreeIV\space undefined at `##8'}{%
- `##8' was defined using \string\adrentry\MessageBreak
- so \string\FreeIV-entry is not defined.\MessageBreak
- You may continue but you should check output}}{##8}}%
- \fi
- \providecommand*{\addrchar}[1]{}%
- \providecommand*{\adrchar}{\addrchar}%
- \def\addrentry##1##2##3##4##5##6##7##8##9{%
- \def\@tempa{##9}\ifx\@tempa\@empty\else
- \expandafter\gdef\csname ##9.LN\endcsname{##1}
- \expandafter\gdef\csname ##9.FN\endcsname{##2}
- \expandafter\gdef\csname ##9.A\endcsname{##3}
- \expandafter\gdef\csname ##9.P\endcsname{##4}
- \expandafter\gdef\csname ##9.FI\endcsname{##5}
- \expandafter\gdef\csname ##9.FII\endcsname{##6}
- \expandafter\gdef\csname ##9.FIII\endcsname{##7}
- \expandafter\gdef\csname ##9.FIV\endcsname{##8}
- \fi}
-% \end{macrocode}
-% Not existing files result in an error message. Found files are only noted.
-% \begin{macrocode}
- \InputIfFileExists{#1.adr}
- {\typeout{Load addressfile: #1.adr.}}
- {\PackageError{scraddr}
- {File #1.adr not found}
- {The addressfile you wanted is not
- available}}
- \endgroup}
-% \end{macrocode}
-% \end{command}
-%
-% \subsection{Using an element of an address file}
-%
-% Selecting the elements by names instead of cryptic macros, could be
-% easier. So we use well named macros for the selection. All these macros have
-% exactly one mandatory argument: the \meta{shortcut} which is argument 8 of
-% \cs{adrentry} resp. argument 9 of \cs{addrentry} in the address file.
-%
-% \begin{command}{\Name}
-% The \cs{Name} is a combination of \cs{Firstname} and \cs{Lastname} with a
-% normal word separator space in between.
-% \begin{macrocode}
-\newcommand*{\Name}[1]{\FirstName{#1}\ \LastName{#1}}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\FirstName}
-% Firstname or given from internal macro \cs{\meta{shortcut}.FN}.
-% \begin{macrocode}
-\newcommand*{\FirstName}[1]{\csname #1.FN\endcsname}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\LastName}
-% Lastname from internal macro \cs{\meta{shortcut}.LN}.
-% \begin{macrocode}
-\newcommand*{\LastName}[1]{\csname #1.LN\endcsname}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\Address}
-% Address from internal macro \cs{\meta{shortcut}.A}.
-% \begin{macrocode}
-\newcommand*{\Address}[1]{\csname #1.A\endcsname}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\Telephone}
-% Telephone number from internal macro \cs{\meta{shortcut}.P}.
-% \begin{macrocode}
-\newcommand*{\Telephone}[1]{\csname #1.P\endcsname}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\FreeI,\FreeII}
-% Two free entries from internal macros \cs{\meta{shortcut}.FI} and
-% \cs{\meta{shortcut}.FII}.
-% \begin{macrocode}
-\newcommand*{\FreeI}[1]{\csname #1.FI\endcsname}
-\newcommand*{\FreeII}[1]{\csname #1.FII\endcsname}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\Comment,\FreeIII}
-% The third free element is available by two commands, because originally it
-% was specified as \meta{comment}. It is stored in the internal macro
-% \cs{\meta{shortcut}.FIII}.
-% \changes{v1.1}{2002/05/18}{extended to \cs{addrentry}}
-% \begin{macrocode}
-\newcommand*{\Comment}{}
-\newcommand*{\FreeIII}[1]{\csname #1.FIII\endcsname}
-\let\Comment\FreeIII
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\FreeIV}
-% Forth free entry from internal macro \cs{\meta{shortcut}.FIV} only available
-% with \cs{addrentry} but not woth \cs{adreentry}.
-% \changes{v1.1}{2002/05/18}{extended to \cs{addrentry}}
-% \begin{macrocode}
-\newcommand*{\FreeIV}[1]{\csname #1.FIV\endcsname}
-% \end{macrocode}
-% \end{command}
-%
-% \subsection{Ende of package}
-% \begin{macrocode}
-%</scraddr>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
-
diff --git a/macros/latex/contrib/koma-script/source/scrdoc.dtx b/macros/latex/contrib/koma-script/source/scrdoc.dtx
deleted file mode 100644
index 99096df899..0000000000
--- a/macros/latex/contrib/koma-script/source/scrdoc.dtx
+++ /dev/null
@@ -1,438 +0,0 @@
-% ======================================================================
-% scrdoc.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ----------------------------------------------------------------------
-% scrdoc.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
-% Version 1.3c, verteilt und/oder veraendert werden.
-% Die neuste Version dieser Lizenz ist
-% http://www.latex-project.org/lppl.txt
-% und Version 1.3c ist Teil aller Verteilungen von LaTeX
-% Version 2005/12/01 oder spaeter und dieses Werks.
-%
-% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
-% (allein durch den Autor verwaltet).
-%
-% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
-%
-% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
-% ======================================================================
-%
-% Note: This class was made to shrink size of dtx files.
-% Do not use this class for anything because it may change
-% incompatible from distribution to distribution
-%
-\newcommand*{\UseOldscrdoc}{%
- \def\reserved@a{scrsource}\edef\reserved@b{\jobname}%
- \@onelevel@sanitize\reserved@a
- \@onelevel@sanitize\reserved@b
- \ifx\reserved@a\reserved@b
- \AtBeginDocument{%
- \ClassWarning{scrdoc}{%
- Using emergency fallback definitions to make\MessageBreak
- several new commands and environments of\MessageBreak
- `koma-script-source-doc' available with\MessageBreak
- deprecated `scrdoc'}%
- \newcommand*{\cls}{\@ifstar\Class\Class}%
- \newcommand*{\pkg}{\@ifstar\Package\Package}%
- \newcommand*{\file}{\File}%
- \newcommand*{\opt}{\Option}%
- \newcommand*{\optvalue}{\texttt}%
- \newcommand*{\fnt}{\texttt}%
- \newenvironment{length}{\Length}{\endLength}%
- \newenvironment{counter}{\Counter}{\endCounter}%
- \newenvironment{fontelement}{\KOMAfont}{\endKOMAfont}%
- \newenvironment{variable}{\KOMAvar}{\endKOMAvar}%
- \newenvironment{command}{\macro}{\endmacro}%
- \newcommand*{\MaybeStop}{\StopEventually}%
- \newcommand*{\href}[2]{##2}%
- }%
- \fi
-}
-\ifdefined\IfFormatAtLeastTF
- \IfFormatAtLeastTF{2022/06/01}{%
- \IfFileExists{doc-2021-06-01.sty}{%
- \renewcommand*{\UseOldscrdoc}{%
- \ProvidesClass{scrdoc}[2022/01/16 v0.1zz
- emulating deprecated class scrdoc using koma-script-source-doc]
- \LoadClassWithOptions{koma-script-source-doc}
- \RequirePackage{hologo}
- \DeclareRobustCommand*{\eTeX}{\hologo{eTeX}}%
- \NewCommandCopy\Class\cls
- \NewCommandCopy\Package\pkg
- \NewCommandCopy\Option\opt
- \NewCommandCopy\File\file
- \NewCommandCopy\Macro\cs
- \NewCommandCopy\endLength\endlength
- \NewCommandCopy\Length\length
- \NewCommandCopy\endCounter\endcounter
- \NewCommandCopy\Counter\counter
- \NewCommandCopy\endKOMAfont\endfontelement
- \NewCommandCopy\KOMAfont\fontelement
- \NewCommandCopy\endKOMAvar\endvariable
- \NewCommandCopy\KOMAvar\variable
- \setcounter{IndexColumns}{2}%
- \endinput
- }%
- }{}%
- }{}%
-\fi
-
-\UseOldscrdoc
-\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{scrdoc}[%
- 2022/02/09 v0.1i KOMA-Script source documentation class]
-
-% Load standard LaTeX documentation class, passing all options to it
-% but use scrartcl instead of article.
-\IfFileExists{scrartcl.cls}{%
- \newcommand*{\sd@saved@LoadClass}{}
- \let\sd@saved@LoadClass=\LoadClass
- \renewcommand*{\LoadClass}[2][]{%
- \begingroup
- \edef\@tempc{##2}\def\@tempb{article}%
- \ifx\@tempc\@tempb
- \let\LoadClass\sd@saved@LoadClass
- \def\@tempc{scrartcl}%
- \fi
- \edef\@tempc{%
- \noexpand\endgroup\noexpand\sd@saved@LoadClass[{##1}]{\@tempc}}%
- \@tempc
- }
- \newcommand*{\sd@saved@PassOptionsToClass}{}
- \let\sd@saved@PassOptionsToClass=\PassOptionsToClass
- \renewcommand*{\PassOptionsToClass}[2]{%
- \begingroup
- \edef\@tempc{##2}\def\@tempb{article}%
- \ifx\@tempc\@tempb
- \def\@tempc{scrartcl}%
- \fi
- \edef\@tempc{%
- \noexpand\endgroup\noexpand\sd@saved@PassOptionsToClass{##1}{%
- \@tempc}}%
- \@tempc
- }
-}{%
- \typeout{^^J%
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
- !!! You should generate KOMA-Script classes first!^^J%
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
- ^^J%
- }%
- \DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
- M\kern.05em A\kern.1em-\kern.1em Script}}%
- \def\addsec{\section*}%
- \newenvironment{labeling}[2][]{%
- \description
- }{%
- \csname enddescription\endcsname
- }%
- \newcommand*{\marginline}{\marginpar}%
-}
-% scrdoc is incompatible with ltxdoc v3 and doc v3. Several changes will
-% be needed to improve this. However, currently a kind of emergency
-% workaround can be used.
-\IfFileExists{doc-2021-06-01.sty}{%
- \RequirePackage{scrlfile}%
- \ReplaceInput{doc.sty}{doc-2021-06-01.sty}%
- \PassOptionsToClass{nocfg}{ltxdoc}%
-}{}
-\LoadClassWithOptions{ltxdoc}
-\@ifundefined{cs}{\DeclareRobustCommand\cs[1]{\texttt{\bslash #1}}}{}
-
-% Use two columns at index
-\setcounter{IndexColumns}{2}
-
-% If \EnableCrossrefs is used, we don't want following macros to be
-% indexed:
-
-\DoNotIndex{\.,\\,\ ,\@Alph,\@M}
-\DoNotIndex{\@abstrtfalse,\@abstrttrue,\@addtoreset,\@afterheading}
-\DoNotIndex{\@afterindentfalse,\@alph,\@arabic}
-\DoNotIndex{\@beginparpenalty}
-\DoNotIndex{\@car,\@cdr,\@centercr}
-\DoNotIndex{\@dblfloat,\@dotsep}
-\DoNotIndex{\@dottedtocline,\@empty,\@endparpenalty}
-\DoNotIndex{\@float,\@fontswitch}
-\DoNotIndex{\@gobbletwo}
-\DoNotIndex{\@hangfrom,\@highpenalty}
-\DoNotIndex{\@ifnextchar,\@ifundefined,\@itempenalty}
-\DoNotIndex{\@latex@warning}
-\DoNotIndex{\@m,\@medpenalty,\@minus,\@mkboth,\@mparswitchfalse}
-\DoNotIndex{\@mparswitchtrue}
-\DoNotIndex{\@ne,\@nil,\@nobreakfalse,\@nobreaktrue,\@nomath}
-\DoNotIndex{\@plus}
-\DoNotIndex{\@tempa,\@tempcnta,\@tempdima,\@tempskipka}
-\DoNotIndex{\@tempswafalse,\@tempswatrue}
-\DoNotIndex{\@tempb,\@tempcntb,\@tempdimb,\@tempskipkb}
-\DoNotIndex{\@tempswbfalse,\@tempswbtrue}
-\DoNotIndex{\@tempc,\@tempcntc,\@tempdimc,\@tempskipkc}
-\DoNotIndex{\@tocrmarg,\@topnewpage,\@topnum,\@twocolumnfalse}
-\DoNotIndex{\@twocolumntrue,\@twosidefalse,\@twosidetrue}
-\DoNotIndex{\@whiledim,\@whilenum}
-\DoNotIndex{\addcontentsline,\addpenalty,\addtocontents,\addtolength}
-\DoNotIndex{\addvspace,\advance}
-\DoNotIndex{\begin,\begingroup,\bfseries,\box,\bullet}
-\DoNotIndex{\c@figure,\c@page,\c@secnumdepth,\c@table,\c@tocdepth}
-\DoNotIndex{\cdot,\centering,\changes,\cleardoublepage,\clearpage}
-\DoNotIndex{\cmd,\col@number,\CurrentOption,\CodelineIndex,\cs}
-\DoNotIndex{\day,\dblfloatpagefraction,\dbltopfraction}
-\DoNotIndex{\DeclareOldFontCommand,\DeclareOption,\def,\DisableCrossrefs}
-\DoNotIndex{\divide,\DoNotIndex}
-\DoNotIndex{\ifdim,\else,\fi,\empty,\em,\EnableCrossrefs,\end}
-\DoNotIndex{\end@dblfloat}
-\DoNotIndex{\end@float,\endgroup,\endlist,\endquotation,\endtitlepage}
-\DoNotIndex{\everypar,\ExecuteOptions,\expandafter}
-\DoNotIndex{\fboxrule,\fboxsep}
-\DoNotIndex{\gdef,\global}
-\DoNotIndex{\hangindent,\hbox,\hfil,\hrule,\hsize,\hskip,\hspace,\hss}
-\DoNotIndex{\if@tempswa,\ifcase,\or,\fi,\fi}
-\DoNotIndex{\ifnum,\ifodd,\ifx,\fi,\fi,\fi}
-\DoNotIndex{\include,\input,\InputIfFileExists,\item,\itshape}
-\DoNotIndex{\kern,\kernel@ifnextchar}
-\DoNotIndex{\leavevmode,\leftmark,\leftskip,\let,\lineskip}
-\DoNotIndex{\list,\long}
-\DoNotIndex{\m@ne,\m@th,\marginpar,\markboth,\markright,\mathbf,\mathcal}
-\DoNotIndex{\mathit,\mathnormal,\mathrm,\mathsf,\mathtt,\MessageBreak}
-\DoNotIndex{\month}
-\DoNotIndex{\newblock,\newcommand,\newcount,\newcounter,\newdimen}
-\DoNotIndex{\newenvironment,\newlength,\newpage,\nobreak,\noindent}
-\DoNotIndex{\normalfont,\normallineskip,\normalsize,\null,\number}
-\DoNotIndex{\numberline,\normalcolor}
-\DoNotIndex{\OldMakeindex,\OnlyDescription,\overfullrule}
-\DoNotIndex{\p@,\PackageError,\PackageInfo,\PackageWarningNoLine}
-\DoNotIndex{\pagenumbering,\pagestyle,\par,\paragraph,\parbox}
-\DoNotIndex{\PassOptionsToPackage,\pcal,\penalty,\pmit,\PrintChanges}
-\DoNotIndex{\PrintIndex,\ProcessOptions,\protect,\providecommand}
-\DoNotIndex{\ProvidesClass}
-\DoNotIndex{\raggedbottom,\raggedleft,\raggedright,\refstepcounter,\relax}
-\DoNotIndex{\renewcommand,\RequirePackage,\reset@font}
-\DoNotIndex{\rightmargin,\rightmark,\rightskip,\rmfamily,\@Roman,\@roman}
-\DoNotIndex{\scshape,\secdef,\setbox,\setcounter,\setlength}
-\DoNotIndex{\settowidth,\sfcode,\sffamily,\skip,\sloppy,\slshape,\space}
-\DoNotIndex{\string}
-\DoNotIndex{\the,\thispagestyle,\triangleright,\ttfamily}
-\DoNotIndex{\twocolumn,\typeout}
-\DoNotIndex{\undefined,\usecounter}
-\DoNotIndex{\vfil,\vfill,\vspace}
-\DoNotIndex{\wd,\xdef,\year,\z@}
-% More may be set by the source files.
-
-% Redefine some defaults to handle not only macros and environments
-% but also options, Length, Counters, KOMAvars. Also define some new.
-\def\macro{\begingroup
- \catcode`\\12
- \MakePrivateLetters \m@cro@{0}}
-\def\environment{\begingroup
- \catcode`\\12
- \MakePrivateLetters \m@cro@{1}}
-\def\option{\begingroup
- \catcode`\\12
- \MakePrivateLetters \m@cro@{2}}
-\def\Length{\begingroup
- \catcode`\\12
- \MakePrivateLetters \m@cro@{3}}
-\def\Counter{\begingroup
- \catcode`\\12
- \MakePrivateLetters \m@cro@{4}}
-\def\KOMAvar{\begingroup
- \catcode`\\12
- \MakePrivateLetters \m@cro@{5}}
-\def\KOMAfont{\begingroup
- \catcode`\\12
- \MakePrivateLetters \m@cro@{6}}
-\long\def\m@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist
- \edef\saved@macroname{\string#2}%
- \ifcase #1
- \edef\saved@indexname{\expandafter\@gobble\string#2}%
- \else
- \let\saved@indexname\saved@macroname
- \fi
- \def\makelabel##1{\llap{##1}}%
- \if@inlabel
- \let\@tempa\@empty \count@\macro@cnt
- \loop \ifnum\count@>\z@
- \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne
- \repeat
- \edef\makelabel##1{\llap{\vtop to\baselineskip
- {\@tempa\hbox{##1}\vss}}}%
- \advance \macro@cnt \@ne
- \else \macro@cnt\@ne \fi
- \edef\@tempa{\noexpand\item[%
- \ifcase #1
- \noexpand\PrintMacroName
- \or
- \noexpand\PrintEnvName
- \or
- \noexpand\PrintOptionName
- \or
- \noexpand\PrintLengthName
- \or
- \noexpand\PrintCounterName
- \or
- \noexpand\PrintKOMAvarName
- \or
- \noexpand\PrintKOMAfontName
- \fi
- {\string#2}]}%
- \@tempa
- \global\advance\c@CodelineNo\@ne
- \ifcase #1
- \SpecialMainIndex{#2}\nobreak
- \DoNotIndex{#2}%
- \or
- \SpecialMainEnvIndex{#2}\nobreak
- \or
- \SpecialMainOptionIndex{#2}\nobreak
- \or
- \SpecialMainLengthIndex{#2}\nobreak
- \DoNotIndex{#2}%
- \or
- \SpecialMainCounterIndex{#2}\nobreak
- \or
- \SpecialMainKOMAvarIndex{#2}\nobreak
- \or
- \SpecialMainKOMAfontIndex{#2}\nobreak
- \fi
- \global\advance\c@CodelineNo\m@ne
- \ignorespaces}
-\let\endoption\endmacro
-\let\endLength\endmacro
-\let\endCounter\endmacro
-\let\endKOMAvar\endmacro
-
-% Some new command
-\newcommand*{\File}[1]{\texttt{\mbox{#1}}}
-\newcommand*{\Class}{\File}
-\newcommand*{\Package}{\File}
-\newcommand*{\Macro}{\cs}
-\newcommand*{\Option}{\File}
-
-% The new names we need
-\providecommand*{\EnvName}{Umgebung}% This is german
-\providecommand*{\EnvsName}{Umgebungen}% This is german
-\providecommand*{\OptionName}{Option}% This is german
-\providecommand*{\OptionsName}{Optionen}% This is german
-\providecommand*{\PrintOptionName}[1]{\strut \MacroFont #1\ }
-\providecommand*{\PrintDescribeOption}[1]{\strut \MacroFont #1\ }
-\providecommand*{\LengthName}{L\"ange}% This is german
-\providecommand*{\LengthsName}{L\"angen}% This is german
-\providecommand*{\PrintLengthName}[1]{\strut \MacroFont \string #1\ }
-\providecommand*{\PrintDescribeLength}[1]{\strut \MacroFont \string #1\ }
-\providecommand*{\CounterName}{Z\"ahler}% This is german
-\providecommand*{\CountersName}{Z\"ahler}% This is german
-\providecommand*{\PrintCounterName}[1]{\strut \MacroFont #1\ }
-\providecommand*{\PrintDescribeCounter}[1]{\strut \MacroFont #1\ }
-\providecommand*{\KOMAvarName}{Variable}% This is german
-\providecommand*{\KOMAvarsName}{Variablen}% This is german
-\providecommand*{\PrintKOMAvarName}[1]{\strut \MacroFont #1\ }
-\providecommand*{\PrintDescribeKOMAvar}[1]{\strut \MacroFont #1\ }
-\providecommand*{\KOMAfontName}{Element mit Schrift}% This is german
-\providecommand*{\KOMAfontsName}{Elemente mit Schrift}% This is german
-\providecommand*{\PrintKOMAfontName}[1]{\strut \MacroFont #1\ }
-\providecommand*{\PrintDescribeKOMAfont}[1]{\strut \MacroFont #1\ }
-
-% Defining new main index commands
-\newcommand*{\SpecialMainIndex@Type}[3]{%
- \@bsphack\special@index{%
- #1\actualchar
- {\string\ttfamily\space#1}
- (\string #2)%
- \encapchar main}%
- \special@index{%
- #3:\levelchar{%
- \string\ttfamily\space#1}\encapchar
- main}\@esphack}
-\renewcommand*{\SpecialMainEnvIndex}[1]{%
- \SpecialMainIndex@Type{#1}{\EnvName}{\EnvsName}}
-\newcommand*{\SpecialMainOptionIndex}[1]{%
- \SpecialMainIndex@Type{#1}{\OptionName}{\OptionsName}}
-\newcommand*{\SpecialMainLengthIndex}[1]{%
- \@bsphack\SpecialIndex@{#1}{(\string\LengthName )\encapchar main}%
- \@esphack}
-\newcommand*{\SpecialMainCounterIndex}[1]{%
- \SpecialMainIndex@Type{#1}{\CounterName}{\CountersName}}
-\newcommand*{\SpecialMainKOMAvarIndex}[1]{%
- \SpecialMainIndex@Type{#1}{\KOMAvarName}{\KOMAvarsName}}
-\newcommand*{\SpecialMainKOMAfontIndex}[1]{%
- \SpecialMainIndex@Type{#1}{\KOMAfontName}{\KOMAfontsName}}
-
-% Defining new usage index commands
-\newcommand*{\SpecialIndex@Type}[3]{%
- \@bsphack
- \index{#1\actualchar{\protect\ttfamily#1}
- (#2)\encapchar usage}%
- \index{#3:\levelchar{\protect\ttfamily#1}\encapchar
- usage}\@esphack}
-\renewcommand{\SpecialEnvIndex}[1]{%
- \SpecialIndex@Type{#1}{\EnvName}{\EnvsName}}
-\newcommand*{\SpecialOptionIndex}[1]{%
- \SpecialMainIndex@Type{#1}{\OptionName}{\OptionsName}}
-\newcommand*{\SpecialLengthIndex}[1]{\@bsphack%
- {\let\special@index\index
- \SpecialIndex@{#1}{(\string\LengthName )\encapchar usage}}%
- \@esphack}
-\newcommand*{\SpecialCounterIndex}[1]{%
- \SpecialMainIndex@Type{#1}{\CounterName}{\CountersName}}
-\newcommand*{\SpecialKOMAvarIndex}[1]{%
- \SpecialMainIndex@Type{#1}{\KOMAvarName}{\KOMAvarsName}}
-
-% Define new describe commands
-\newcommand*{\newDescribe}[1]{%
- \expandafter\newcommand\expandafter*\csname Describe#1\endcsname{%
- \leavevmode\@bsphack\begingroup\MakePrivateLetters
- \csname Describe@#1\endcsname}%
- \expandafter\newcommand\expandafter*\csname Describe@#1\endcsname[1]{%
- \endgroup
- \marginpar{\raggedleft\csname PrintDescribe#1\endcsname{##1}}%
- \csname Special#1Index\endcsname{##1}\@esphack\ignorespaces}%
-}
-\newDescribe{Option}
-
-% We use left margin very much, so shift everything to the right
-\if@twoside
-\else
-\addtolength{\oddsidemargin}{1in}
-\setlength{\oddsidemargin}{1.5\oddsidemargin}
-\addtolength{\oddsidemargin}{-1in}
-\fi
-
-% We need some logos:
-\providecommand*{\eTeX}{$\m@th\varepsilon$-\TeX}
-
-% Terms for other languages:
-\AtBeginDocument{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname addto\endcsname\relax
- \ClassWarning{scrdoc}{Package babel not loaded}%
- \else
- \addto\captionsenglish{%
- \def\partname{File}%
- }%
- \addto\captionsngerman{%
- \def\partname{Datei}%
- }%
- \ClassInfo{scrdoc}{Select language \languagename}%
- \expandafter\selectlanguage\expandafter{\languagename}%
- \fi
-}
-
-\endinput
-% end of ``scrdoc.cls''
diff --git a/macros/latex/contrib/koma-script/source/scrdocstrip.tex b/macros/latex/contrib/koma-script/source/scrdocstrip.tex
deleted file mode 100644
index c0f1078361..0000000000
--- a/macros/latex/contrib/koma-script/source/scrdocstrip.tex
+++ /dev/null
@@ -1,311 +0,0 @@
-% ======================================================================
-% scrdocstrip.tex
-% Copyright (c) Markus Kohm, 2013-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-% $Id: scrdocstrip.tex 3725 2022-02-26 12:17:09Z kohm $
-
-\expandafter\ifx\csname scrdocstripversion\endcsname\relax
- \let\KOMAbatchfile\batchfile
- \let\batchfile\undefined
-\fi
-
-\expandafter\ifx\csname ifbeta\endcsname\undefined
- \expandafterlet\csname ifbeta\expandafter\csname iftrue\endcsname
-\fi
-
-\input docstrip.tex
-
-\ifx\generate\undefined
- \errhelp{| This installation requires docstrip version 2.3c or * later,^^J%
- | but an old version of docstrip has been input.^^J%
- | This error is fatal, because You have to update docstrip and maybe LaTeX
- fist!}
- \errmessage{| Fatal error: Old docstrip in input path}
- \batchmode
- \csname @@end\endcsname
-\fi
-
-\expandafter\ifx\csname scrdocstripversion\endcsname\relax
-\else \expandafter\endinput
-\fi
-\Msg{| Using KOMA-Script's docstrip extensions.}%|
-% Support for variables:
-\def\KOMAdefVariable#1#2{%
- \expandafter\def\csname KOMAvar@#1\endcsname{#2}%
-}
-\def\KOMAifVariable#1{%
- \expandafter\ifx\csname KOMAvar@#1\endcsname\relax
- \expandafter\@secondoftwo
- \else
- \expandafter\@firstoftwo
- \fi
-}
-\def\KOMAuseVariable#1{%
- \KOMAifVariable{#1}{%
- \csname KOMAvar@#1\endcsname
- }{%
- variable #1\undefined
- }%
-}
-\KOMAdefVariable{AUTHOR}{Markus Kohm}
-\KOMAdefVariable{COPYRIGHT}{%
- Copyright (c)
- \KOMAifVariable{COPYRIGHTFROM}{\KOMAuseVariable{COPYRIGHTFROM}-}{}%
- \KOMAifVariable{COPYRIGHTTILL}{\KOMAuseVariable{COPYRIGHTTILL}}{}
- \KOMAuseVariable{AUTHOR}%
- \KOMAifVariable{EMAIL}{ \KOMAuseVariable{EMAIL}}{}%
-}
-\KOMAdefVariable{COPYRIGHTCOMMENT}{%
- \MetaPrefix\space\KOMAuseVariable{COPYRIGHT}%
-}
-% Provide validity test: All files listed in a file must exists.
-% You should note, that some TeX distributions cannot find files without
-% extension!
-\def\defuppercase#1#2{%
- \edef\reserved@a{\noexpand\def\noexpand#1{#2}}%
- \expandafter\uppercase\expandafter{\reserved@a}%
-}
-\def\KOMAdocExtensions{HTML,PDF,TXT}
-\let\KOMAdocFilesMissing\empty
-\let\KOMAnoFilesMissing\empty
-\let\KOMAFilesMissing\empty
-\def\getlastextension#1.#2.#3\@nil{%
- \ifx\relax#2\relax
- \ifx\relax#3\relax
- \else
- #1%
- \fi
- \else
- \getlastextension#2.#3..\@nil
- \fi
-}
-\def\KOMAvalidityTest#1{%
- \maybeMsg{^^J| Testing validity of distribution: }%|
- \begingroup
- \def\readloop{%
- \ifeof\inFile\else
- \read\inFile to \input@testfile\relax
- \ifx\input@testfile\empty
- \maybeMsg{\space}%
- \else
- \openin\inputcheck \input@testfile\relax
- \ifeof\inputcheck
- \maybeMsg{-}%
- \defuppercase\reserved@a{%
- \expandafter\getlastextension\input@testfile..\@nil
- }%
- \ifx\reserved@a\empty
- \@addto\KOMAnoFilesMissing{\noexpand\do{\input@testfile}}%
- \let\reserved@a\empty
- \else
- \forlist\reserved@b:=\KOMAdocExtensions\do
- \ifx\reserved@a\reserved@b
- \@addto\KOMAdocFilesMissing{\noexpand\do{\input@testfile}}%
- \let\reserved@a\empty
- \Forlistfalse
- \fi
- \od
- \fi
- \ifx\reserved@a\empty\else
- \@addto\KOMAFilesMissing{\noexpand\do{\input@testfile}}%
- \fi
- \else
- \maybeMsg{+}%
- \fi
- \closein\inputcheck
- \fi
- \expandafter\readloop
- \fi
- }%
- \endlinechar=-1
- \openin\inFile #1\relax
- \ifeof\inFile
- \global\@addto\KOMAFilesMissing{\noexpand\do{#1}}%
- \else
- \readloop
- \closein\inFile
- \fi
- \ifx\KOMAFilesMissing\empty
- \ifx\KOMAdocFilesMissing\empty
- \ifx\KOMAnoFilesMissing\empty
- \maybeMsg{\space OK.^^J}%
- \fi
- \fi
- \else
- \def\do##1{,^^J| \@spaces\@spaces\@spaces##1}%
- \errhelp{| You should ask your distributor for a valid and legal
- distribution.}%|
- \errmessage{^^J%
- | Missing files: \expandafter\expandafter\expandafter\@gobble
- \KOMAFilesMissing\KOMAdocFilesMissing\KOMAnoFilesMissing^^J%
- | Distribution seems to be invalid.^^J%
- | This error is fatal}%|
- \batchmode
- \csname @@end\endcsname
- \fi
- \global\let\KOMAnoFilesMissing\KOMAnoFilesMissing
- \global\let\KOMAdocFilesMissing\KOMAdocFilesMissing
- \endgroup
-}
-\def\@gobbletwo#1#2{}
-\expandafter\def\expandafter\ReportTotals\expandafter{\ReportTotals
- \ifx\KOMAnoFilesMissing\empty\else
- \Msg{%
- +----------------------------------------------------------------------%
- ^^J%
- | Following files without extension seem to be missing:}
- \begingroup
- \def\do##1{,^^J| \space\space##1}%
- \Msg{\expandafter\expandafter\expandafter\@gobbletwo\KOMAnoFilesMissing}
- \endgroup
- \Msg{%
- | PLEASE NOTE, THAT DISTRIBUTIONS WITHOUT THOSE FILES ARE NOT ALLOWED!^^J%
- | But maybe those files are there and you're TeX distribution simply^^J%
- | cannot open files without extension.^^J%
- +----------------------------------------------------------------------}%|
- \fi
- \ifx\KOMAdocFilesMissing\empty\else
- \Msg{%
- +----------------------------------------------------------------------%
- ^^J%
- | Following documentations files are missing:}
- \begingroup
- \def\do##1{,^^J| \space\space##1}%
- \Msg{\expandafter\expandafter\expandafter\@gobbletwo\KOMAdocFilesMissing}
- \endgroup
- \Msg{%
- | PLEASE NOTE, THAT DISTRIBUTIONS WITHOUT THOSE FILES ARE NOT ALLOWED!^^J%
- | MAYBE YOU CAN GENERATE THOSE FILES FROM OTHER PARTS OF THE SOURCES.^^J%
- +----------------------------------------------------------------------}
- \fi
-}
-% Extend line scanner by:
-% - %!VARIABLE : to write variable into files
-% - %?VARIABLE=VALUE : to setup a new variable
-\begingroup
-\catcode`\%=12 \catcode`\*=14
-\gdef\processLineX%#1{*
- \ifcase\ifx%#10\else
- \ifx<#11\else
- \ifx!#12\else 3\fi\fi\fi\relax
- \expandafter\putMetaComment\or
- \expandafter\checkOption\or
- \expandafter\KOMAexpandVariable\or
- \expandafter\removeComment\fi
- #1}
-\gdef\KprocessLineX%#1{*
- \ifcase\ifx%#10\else
- \ifx<#11\else
- \ifx!#12\else
- \ifx?#13\else 4\fi\fi\fi\fi\relax
- \expandafter\putMetaComment\or
- \expandafter\checkOption\or
- \expandafter\KOMAexpandVariable\or
- \expandafter\KOMAsetVariable\or
- \expandafter\removeComment\fi
- #1}
-\endgroup
-\def\KOMAexpandVariable!#1\endLine{%
- \advance\codeLinesPassed\@ne
- \maybeMsg{x}%
- \edef\inLine{\KOMAuseVariable{#1}}%
- \let\do\putline@do
- \activefiles
-}
-\def\KOMAsetVariable?#1=#2\endLine{%
- \expandafter\gdef\csname KOMAvar@#1\endcsname{#2}%
-}
-% Extend heading
-\def\ds@heading{%
- \expandafter\ifx\csname ifbeta\expandafter\endcsname
- \csname iftrue\endcsname
- \use@Warning{\outFileName}{%
- YOU SHOULD NOTE, THAT THIS IS NOT AN OFFICIAL RELEASE!^^J%
- THIS VERSION IS INTENDED TO BE USED FOR TESTING ONLY!^^J%
- USAGE FOR PURPOSES OTHER THAN INTENDED IS DANGEROUS!^^J%
- DON'T EXPECT ANY SUPPORT FOR THIS VERSION!%
- }%
- \fi
- \MetaPrefix ^^J%
- \MetaPrefix\space This is file `\outFileName',^^J%
- \MetaPrefix\space generated with the docstrip utility, extended by
- scrdocstrip.^^J%
-}
-\def\commentWarning#1#2{%
- \MetaPrefix\space
- -------------------------------------------------------------------------^^J%
- \@commentWarning#2^^J\@nil
- \MetaPrefix\space
- -------------------------------------------------------------------------^^J%
-}
-\def\@commentWarning#1^^J#2\@nil{%
- \MetaPrefix\space #1^^J%
- \ifx\relax#2\relax\else\@commentWarning#2\@nil\fi
-}
-\def\KNL{^\empty^J\perCent^^J}
-\def\XKNL{^\empty^J\perCent|^^J}
-\def\genericWarning#1#2{%
- \string\expandafter\string\ifx\string\csname\space scrWMSG\string\endcsname\string\relax^^J%
- \space\space\string\def\string\scrWMSG{\string\immediate\string\write17}^^J%
- \string\fi^^J%
- \string\scrWMSG{\KNL
- +----------------------------------------------------------------------\KNL
- | WARNING (`#1'):\XKNL
- +----------------------------------------------------------------------\KNL
- \@genericWarning#2^^J\@nil
- +----------------------------------------------------------------------\KNL
- }^^J%
-}
-\def\@genericWarning#1^^J#2\@nil{%
- | #1\XKNL
- \ifx\relax#2\relax\else\@genericWarning#2\@nil\fi
-}%|
-\def\useWarning#1{\let\use@Warning#1}
-\useWarning\genericWarning
-
-% Now, we need some code from docstrip to start old docstrip-processing
-\ifx\undefined\KOMAbatchfile\else
- \Defaultfalse
- \let\batchfile\KOMAbatchfile
- \def\process@first@batchfile{%
- \processbatchFile
- \ifnum\NumberOfFiles=\z@
- \interactive
- \fi
- \endbatchfile
- }
-\fi
-
-\chardef\scrdocstripversion 1\relax
-
-\def\fromoptional#1{%
- \immediate\openin\inputcheck\uptospace#1 \qStop\relax
- \ifeof\inputcheck
- \Msg{Ignorring not existing optional file `#1'.}%
- \expandafter\@gobbletwo
- \else
- \immediate\closein\inputcheck
- \expandafter\from
- \fi
- {#1}%
-}
-
-\process@first@batchfile
-\endinput
-%
-% end of file `scrdocstrip.tex'
diff --git a/macros/latex/contrib/koma-script/source/scrextend.dtx b/macros/latex/contrib/koma-script/source/scrextend.dtx
deleted file mode 100644
index 0be97835df..0000000000
--- a/macros/latex/contrib/koma-script/source/scrextend.dtx
+++ /dev/null
@@ -1,249 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrextend.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrextend.dtx 3773 2022-03-29 06:27:55Z kohm $
-%<preidentify>%%% (run: preidentify)
-%<prepare>%%% (run: prepare)
-%<option>%%% (run: option)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-29 08:27:55 +0200 (Tue, 29 Mar 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3773 $
-\endgroup
-\ProvidesFile{scrextend.dtx}[\filedate\space\filerevision\space
- KOMA-Script package source
- (extend other classes)]
-\documentclass{koma-script-source-doc}
-\usepackage[USenglish]{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
- \DocInput{scrextend.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v3.00}{2008/05/01}{new package}
-% \changes{v3.36}{2022/01/31}{switched from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/01/31}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrextend.dtx}
-% \title{Extending Non-\href{https://komascript.de}{\KOMAScript} Classes by
-% some \href{https://komascript.de}{\KOMAScript} Class Features using
-% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrextend}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% The purpose of this package is to provide \KOMAScript{} class features to
-% other classes, i.\,e., the standard classes too. On the other hand it does
-% not make sense to nor should you load this package, if you are using a
-% \KOMAScript{} class.
-% \end{abstract}
-%
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user manual of \pkg{scrextend} in the \KOMAScript{} manual,
-% either the German \file{scrguide} or the English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation}
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% \subsection{Before the identification of the package}
-%
-% Just before the identification of the package, we have to take care, that it
-% is not loaded with a \KOMAScript{} class. If so, we output a warning an
-% terminate.
-%
-% \changes{v3.30}{2020/02/25}{Using \cs{PackageWarningNoLine} instead of
-% \cs{PackageWarning} with final \cs{@gobble}}
-% \begin{macrocode}
-%<*preidentify>
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname KOMAClassName\endcsname\relax\else
- \PackageWarningNoLine{scrextend}{%
- This package was made to extend other classes but\MessageBreak
- KOMA-Script classes by some features of the\MessageBreak
- KOMA-Script classes.\MessageBreak
- It should never be used with a KOMA-Script class.\MessageBreak
- Loading of the package will be aborted%
- }%
- \expandafter\endinput
-\fi
-%</preidentify>
-% \end{macrocode}
-%
-%
-% \subsection{Package identification}
-%
-% We use the major \KOMAScript{} version for this package, because it uses
-% several main parts of the classes of the same version.
-%
-% \begin{macrocode}
-%<*identify>
-\ProvidesPackage{scrextend}[%
-%!KOMAScriptVersion
- package (extend other classes with features of KOMA-Script classes)%
-]
-%</identify>
-% \end{macrocode}
-%
-%
-% \subsection{Preparation of options}
-%
-% The preparation state is used before the option handling. To allow
-% definition of optional features. Such definitions are used in other parts of
-% the \KOMAScript{} classes. For example \file{scrkernel-title.dtx} defines
-% the \optvalue{title} \opt{feature}.
-%
-% Note: The method used here is very fragile, i.\,e., the definition of
-% feature code with arguments needs to be adapted for \pkg{scrextend}. So
-% there is a big fat
-% \begin{description}
-% \item[ToDo:] Reimplementation of the optional features should simplify the
-% definition of such features a lot in other files. Best would be to have a
-% kind of start command and a kind of end command without the need to change
-% anything in between, if the package instead of a class is defined. But
-% this is hard to reach, because of usage of \cs{ClassError}
-% vs. \cs{PackageError}, \cs{ClassWarning} vs. \cs{PackageWarning}. So at
-% least these commands have to be dependent. Nevertheless the need to
-% change, e.g., |#1| into |##1|, |#2| into |##2| etc. for \pkg{scrextend} is
-% annoying. Moreover the whole usage of \cs{scr@extend@activate@\dots} and
-% \cs{sr@extend@immediate@\dots} is very complicated and currently I'm even
-% not sure, that is always works as expected. Maybe a less complicated
-% feature implementation could be found.
-% \end{description}
-%
-% \begin{macro}{\scr@ext@activate,\scr@ext@activateable,
-% \scr@ext@addto@activateable}
-% One special feature of this package is, to provide some \KOMAScript{}
-% features only, if they have been activated explicitly. To do so
-% \begin{quote}
-% \cs{scr@ext@activateable}\marg{feature}\marg{definition}
-% \end{quote}
-% is used. This macro defines \cs{scr@ext@activate@\meta{feature}}. There is
-% also a
-% \begin{quote}
-% \cs{scr@ext@addto@activateable}\marg{feature}\marg{definition}
-% \end{quote}
-% that does append \meta{definition} to the already existing code of
-% \cs{scr@act@activate@\meta{feature}}, if it already exists, or define it
-% new, if is does not exist already.
-% \begin{quote}
-% \cs{scr@ext@activate}\marg{feature}
-% \end{quote}
-% is used to \emph{activate} a \meta{feature}. That means: If there is a
-% \cs{scr@ext@activate@\meta{feature}} it is executed and afterwards
-% \cs{scr@ext@activate@\meta{feature}} is destroyed making it \cs{relax}. But
-% if there is not yet a \cs{scr@ext@activate@\meta{feature}} a
-% \cs{scr@ext@immediate@\meta{feature}} is defined. The definition of this
-% is, to redefine itself to be \cs{scr@ext@activate@\meta{feature}}.
-% \begin{macrocode}
-%<*prepare>
-\newcommand*{\scr@ext@activate}[1]{%
- \scr@ifundefinedorrelax{scr@ext@activate@#1}{%
- \@namedef{scr@ext@immediate@#1}{%
- \expandafter\let\csname scr@ext@immediate@#1\endcsname\relax
- \csname scr@ext@activate@#1\endcsname
- }%
- }{%
- \csname scr@ext@activate@#1\endcsname
- \expandafter\let\csname scr@ext@activate@#1\endcsname\relax
- }%
-}
-\newcommand*{\scr@ext@activateable}[1]{%
- \expandafter\newcommand\expandafter*\csname scr@ext@activate@#1\endcsname
-}
-\newcommand*{\scr@ext@addto@activateable}[1]{%
- \scr@ifundefinedorrelax{scr@ext@activate@#1}{%
- \expandafter\newcommand\expandafter*\csname scr@ext@activate@#1\endcsname
- }{%
- \expandafter\g@addto@macro\csname scr@ext@activate@#1\endcsname
- }%
-}
-%</prepare>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Options}
-%
-% Now, after the preparation, the universal option that enables optional
-% features can defined. This option can be used while loading the package
-% only. Later activation of features is currently not supported.
-%
-% \begin{option}{extendedfeature}
-% \changes{v3.12}{2013/03/05}{using state signaling with \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/09}{internal value storage}
-% \begin{macrocode}
-%<*option>
-\KOMA@key{extendedfeature}{%
- \scr@ext@activate{#1}%
- \AtEndOfPackage{%
- \scr@ifundefinedorrelax{scr@ext@immediate@#1}{}{%
- \PackageWarningNoLine{unkown extended feature `#1'\MessageBreak
- You have used option `extendedfeature' to\MessageBreak
- activate an extended feature `#1',\MessageBreak
- but there is no such extended feature.\MessageBreak
- See the KOMA-Script manual for more\MessageBreak
- information about known activatable\MessageBreak
- extended features%
- }%
- }%
- }%
- \FamilyKeyStateProcessed
- \KOMA@kav@xadd{.scrextend.sty}{extendedfeature}{#1}%
-}
-\AtEndOfPackage{%
- \KOMA@key{extendedfeature}{%
- \def\FamilyKeyState{Option `extendedfeature' too late}%
- }%
-}
-%</option>
-% \end{macrocode}
-% \end{option}
-%
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
-
diff --git a/macros/latex/contrib/koma-script/source/scrhack.dtx b/macros/latex/contrib/koma-script/source/scrhack.dtx
deleted file mode 100644
index dc1ea8b087..0000000000
--- a/macros/latex/contrib/koma-script/source/scrhack.dtx
+++ /dev/null
@@ -1,1954 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrhack.dtx
-% Copyright (c) Markus Kohm, 2008-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.<3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-%
-% To create `scrhack.sty' run `tex scrhack.dtx'. Using LaTeX instead
-% of TeX would generate the implementation documentation.
-% ======================================================================
-%%% From File: $Id: scrhack.dtx 3690 2022-02-10 09:59:31Z kohm $
-%<package&identify>%%% using: package,identify
-%<package&option>%%% using: package,option
-%<package&body>%%% using: package,body
-%<package&identity>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-10 10:59:31 +0100 (Do, 10. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3690 $
-\endgroup
-\ProvidesFile{scrhack.dtx}[\filedate\space\filerevision\space
-%</dtx>
-%<package&identify>\ProvidesPackage{scrhack}[%
-%<hyperref&identify>\ProvidesFile{hyperref.hak}[%
-%<float&identify>\ProvidesFile{float.hak}[%
-%<floatrow&identify>\ProvidesFile{floatrow.hak}[%
-%<listings&identify>\ProvidesFile{listings.hak}[%
-%<setspace&identify>\ProvidesFile{setspace.hak}[%
-%<lscape&identify>\ProvidesFile{lscape.hak}[%
-%<nomencl&identify>\ProvidesFile{nomencl.hak}[%
-%<standardsections&identify>\ProvidesFile{standardsections.hak}[%
-%<*dtx|identify>
-%!KOMAScriptVersion
-%<*dtx>
- source of
-%</dtx>
-%<*dtx|package>
- package (hacking other packages)%
-%</dtx|package>
-%<*hack>
-%<hack> scrhack part
-%<!standardsections> (hacking package
-%<hyperref&identify> hyperref)%
-%<float&identify> float)%
-%<floatrow&identify> floatrow)%
-%<listings&identify> listings)%
-%<setspace&identify> setspace)%
-%<lscape&identify> lscape)%
-%<nomencl&identify> nomencl)%
-%<standardsections&identify> (defining standard LaTeX class section headings)%
-%</hack>
-]
-%</dtx|identify>
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2008}
- \generate{\usepreamble\defaultpreamble
- \file{scrhack.sty}{%
- \from{scrkernel-version.dtx}{package,scrhack}%
- \from{scrhack.dtx}{package,identify}%
- \from{scrkernel-basics.dtx}{load}%
- \from{scrhack.dtx}{package,option}%
- \from{scrhack.dtx}{package,body}%
- \from{scrlogo.dtx}{logo}%
- }%
- \file{hyperref.hak}{%
- \from{scrkernel-version.dtx}{file,hyperref.hak}%
- \from{scrhack.dtx}{hack,hyperref,identify}%
- \from{scrhack.dtx}{hack,hyperref,body}%
- }%
- \file{float.hak}{%
- \from{scrkernel-version.dtx}{file,float.hak}%
- \from{scrhack.dtx}{hack,float,identify}%
- \from{scrhack.dtx}{hack,float,body}%
- }%
- \file{floatrow.hak}{%
- \from{scrkernel-version.dtx}{file,floatrow.hak}%
- \from{scrhack.dtx}{hack,floatrow,identify}%
- \from{scrhack.dtx}{hack,floatrow,body}%
- }%
- \file{listings.hak}{%
- \from{scrkernel-version.dtx}{file,listings.hak}%
- \from{scrhack.dtx}{hack,listings,identify}%
- \from{scrhack.dtx}{hack,listings,body}%
- }%
- \file{setspace.hak}{%
- \from{scrkernel-version.dtx}{file,setspace.hak}%
- \from{scrhack.dtx}{hack,setspace,identify}%
- \from{scrhack.dtx}{hack,setspace,body}%
- }%
- \file{lscape.hak}{%
- \from{scrkernel-version.dtx}{file,lscape.hak}%
- \from{scrhack.dtx}{hack,lscape,identify}%
- \from{scrhack.dtx}{hack,lscape,body}%
- }%
- \file{nomencl.hak}{%
- \from{scrkernel-version.dtx}{file,nomencl.hak}%
- \from{scrhack.dtx}{hack,nomencl,identify}%
- \from{scrhack.dtx}{hack,nomencl,body}%
- }%
- \file{standardsections.hak}{%
- \from{scrkernel-version.dtx}{file,standardsections.hak}%
- \from{scrhack.dtx}{hack,standardsections,identify}%
- \from{scrhack.dtx}{hack,standardsections,body}%
- }%
- }
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
- \DocInput{scrhack.dtx}
-\end{document}
-%</dtx>
-%\fi
-%
-% \changes{v3.03}{2009/03/12}{first version ever}
-% \changes{v3.36}{2022/02/08}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/08}{require package \pkg*{scrlogo} instead of
-% defining \cs{KOMAScript}}
-% \changes{v3.36}{2022/02/08}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrhack.dtx}
-% \title{Patching Third-Party Packages using
-% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrhack}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% Some packages from other authors may have problems with \KOMAScript{}. In
-% my opinion some packages could be improved. With some packages this makes
-% only sense, if \KOMAScript{} was used. With some other packages the
-% package author has another opinion. Sometimes proposals was never
-% answered. Package \pkg*{scrhack} contains all those improvement proposals
-% for other packages. This means, \pkg*{scrhack} redefines macros of packages
-% from other authors! The redefinitions are only activated, if those
-% packages were loaded. Users may prevent \pkg*{scrhack} from redefining
-% macros of individual packages.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user manuals of \pkg*{scrhack} in the \KOMAScript{} manual,
-% either the German \file{scrguide} or the English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of \pkg*{scrhack}}
-%
-% \changes{v3.04b}{2009/08/05}{order of commands/macros and options changed}
-%
-% \subsection{Optionen}
-%
-% The package uses \cs{KOMAoptions} of \pkg*{scrkbase}, which is loaded by
-% (virtual) \file{scrkbase.ins}.
-%
-% The options allow the selection of the used manipulations of other
-% packages. But all these options are valid only until both \pkg*{scrhack} and
-% the other package has been loaded. Later settings are invalid.
-%
-%
-% \subsection{Used Macros and Commands}
-% \label{sec:macros}
-% \begin{macrocode}
-%<*package&body>
-% \end{macrocode}
-%
-% \begin{macro}{\scr@ifexpected}
-% Mentioned to do (re)definitions only, if local execution of code does not
-% change a command. Concrete, if (local) execution of \marg{test code} of
-% \begin{quote}
-% \cs{scr@ifexpected}\marg{command}\marg{test code}\marg{then
-% code}\marg{else code}
-% \end{quote}
-% would not result in a change of \cs{\meta{command}}, the \marg{then code}
-% will be executed, otherwise the \marg{else code}.
-% \begin{description}\item[Note:] \meta{test code} must not have any global
-% side effect!\end{description}
-% \begin{macrocode}
-\newcommand{\scr@ifexpected}[2]{%
- \begingroup
- \let\@tempa#1
- #2
- \ifx\@tempa#1
- \aftergroup\@firstoftwo
- \else
- \aftergroup\@secondoftwo
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\scr@hack@load}
-% Conditionally loading of a hack file.
-% \begin{quote}
-% \cs{scr@hack@load}\marg{extension}\marg{basename}\marg{hack}%
-% \marg{true code}\marg{false code}
-% \end{quote}
-% The first two arguments \marg{} and \marg{extension} and \marg{basename} are
-% same to the internal\LaTeX{} kernel command \cs{@ifl@aded}. With \LaTeX{}
-% from 2021/11/15 we even could use \cs{@ifl@aded} for the test, because it is
-% not restricted to the preamble any more. But because it is restricted with
-% older \LaTeX{} kernels, we test the definition of
-% \cs{ver@}\meta{basename}\texttt{.}\meta{extension}. If it is defined, we
-% also test the definition of \cs{ver@}\meta{basename}\texttt{.hak}. If this
-% is not defined, \file{\meta{hack}.hak} is loaded and \meta{true code} is
-% executed. Otherwise \meta{false code} is executed. This means: A hack file
-% is only loaded, if a class or package (or other file with version) has
-% already been loaded, but the hack file has not already been loaded.
-% \begin{macrocode}
-\newcommand*{\scr@hack@load}[2]{%
- \expandafter\ifx\csname ver@#2.#1\endcsname\relax
- \expandafter\@secondoftwo
- \else
-% \end{macrocode}
-% Load a hack only once.
-% \begin{macrocode}
- \expandafter\ifx\csname ver@#2.hak\endcsname\relax
- \expandafter\expandafter\expandafter\@firstoftwo
- \else
- \expandafter\expandafter\expandafter\@secondoftwo
- \fi
- \fi
- {%
- \PackageInfo{scrhack}{loading #2 hack}%
- \edef\reserved@a{%
- \noexpand\makeatletter\noexpand\input{#2.hak}%
- \noexpand\catcode`\noexpand\@\the\catcode`\@\relax
- }\reserved@a
- }{%
- \PackageInfo{scrhack}{ignorring #2 hack}%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-%</package&body>
-% \end{macrocode}
-%
-% \subsection{The \pkg*{hyperref} hack}
-%
-% Package \pkg{hyperref} places the anchor of the star variant of a heading
-% after the heading, but the anchor of the normal variant before the heading
-% even if the heading is not numbered because of the value of
-% \cnt{secnumdepth}. The hack changes this to more consistent placing always
-% before the heading.
-%
-% \begin{option}{hyperref}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
-% \changes{v3.17}{2015/03/09}{defaults by \cs{KOMAExecuteOptions}}
-% \begin{macrocode}
-%<*package&option>
-\KOMA@ifkey{hyperref}{@scrhack@hyperref}%
-\KOMAExecuteOptions{hyperref=true}%
-%</package&option>
-% \end{macrocode}
-% \changes{v3.04b}{2009/11/09}{loading \pkg{hyperref} hack earlier}
-% \changes{v3.17}{2015/03/09}{auto deactivation for newer versions of
-% \pkg{hyperref}}
-% \changes{v3.18}{2015/05/22}{newer versions of \KOMAScript{} classes also
-% deactivate the the hack}
-% This is a little bit tricky, because \pkg{hyperref} loads the driver file
-% via \cs{AtEndOfPackage} and the hack cannot be loaded before loading the
-% driver file. Using \cs{AfterPackage*} would not be good enough therefore,
-% because it would load the hack before the driver file. But using
-% \cs{AtEndOfPackage} inside \cs{AfterPackage*} should delay the loading
-% enough. This also works, if \pkg{hyperref} has already been loaded. In this
-% case the code will be executed at the end of \pkg*{scrhack} instead of
-% \pkg{hyperref}. This is no problem.
-% \begin{macrocode}
-%<*package&body>
-\BeforePackage{hyperref}{%
- \scr@ifundefinedorrelax{hy@insteadofrefstepcounter}{}{%
- \PackageInfo{scrhack}{hyperref hack deactivated because of\MessageBreak
- detection of KOMA-Script class, that doesn't\MessageBreak
- need that hack,}%
- \KOMAExecuteOptions[.scrhack.sty]{hyperref=false}%
- }%
-}
-\AfterPackage*{hyperref}{%
- \if@scrhack@hyperref
- \@ifpackagelater{hyperref}{2009/11/24}{%
- \PackageInfo{scrhack}{hyperref hack deactivated because of\MessageBreak
- detection of hyperref version, that doesn't\MessageBreak
- need that hack,}%
- \KOMAExecuteOptions[.scrhack.sty]{hyperref=false}%
- }{%
- \AtEndOfPackage{%
- \KOMA@key[.scrhack.sty]{hyperref}{%
- \PackageWarning{scrhack}{option `hyperref=#1' ignored}%
- \FamilyKeyStateProcessed
- }%
- \if@scrhack@hyperref\scr@hack@load\@pkgextension{hyperref}\fi
- }%
- }%
- \fi
-}
-%</package&body>
-% \end{macrocode}
-% \end{option}
-%
-%
-% \begin{macro}{\@schapter,\@spart,\@ssect}
-% We do not hack \pkg{hyperref} itself, but the driver files. After loading
-% \pkg{hyperref} the driver file is also loaded. Moreover, all driver files
-% that re-define these commands have to be patched also. So the patch is
-% related to the loading of \pkg{hyperref} instead of every single driver
-% file. This have already been tested by \cs{scr@hack@load}. So we just have
-% to test, whether the definition of these commands are the expected one.
-% derzeit den erwarteten Inhalt haben.
-% \begin{macrocode}
-%<*hyperref&body>
-\scr@ifexpected\@schapter{%
- \def\@schapter#1{%
- \H@old@schapter{#1}%
- \begingroup
- \let\@mkboth\@gobbletwo
- \Hy@GlobalStepCount\Hy@linkcounter
- \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
- \Hy@raisedlink{%
- \hyper@anchorstart{\@currentHref}\hyper@anchorend
- }%
- \endgroup
- }%
-}{%
- \PackageInfo{scrhack}{redefining \string\@schapter}%
- \def\@schapter#1{%
- \begingroup
- \let\@mkboth\@gobbletwo
- \Hy@GlobalStepCount\Hy@linkcounter
- \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
- \Hy@raisedlink{%
- \hyper@anchorstart{\@currentHref}\hyper@anchorend
- }%
- \endgroup
- \H@old@schapter{#1}%
- }%
-}{%
- \scr@ifexpected\@schapter{%
- \def\@schapter#1{%
- \begingroup
- \let\@mkboth\@gobbletwo
- \Hy@GlobalStepCount\Hy@linkcounter
- \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
- \Hy@raisedlink{%
- \hyper@anchorstart{\@currentHref}\hyper@anchorend
- }%
- \endgroup
- \H@old@schapter{#1}%
- }%
- }{}{%
- \PackageWarningNoLine{scrhack}{unknown \string\@schapter\space
- definition found!\MessageBreak
- Maybe you are using a unsupported hyperref version}%
- }%
-}
-\scr@ifexpected\@spart{%
- \def\@spart#1{%
- \H@old@spart{#1}%
- \Hy@GlobalStepCount\Hy@linkcounter
- \xdef\@currentHref{part*.\the\Hy@linkcounter}%
- \Hy@raisedlink{%
- \hyper@anchorstart{\@currentHref}\hyper@anchorend
- }%
- }%
-}{%
- \PackageInfo{scrhack}{redefining \string\@spart}%
- \def\@spart#1{%
- \Hy@GlobalStepCount\Hy@linkcounter
- \xdef\@currentHref{part*.\the\Hy@linkcounter}%
- \Hy@raisedlink{%
- \hyper@anchorstart{\@currentHref}\hyper@anchorend
- }%
- \H@old@spart{#1}%
- }%
-}{%
- \scr@ifexpected\@spart{%
- \def\@spart#1{%
- \Hy@GlobalStepCount\Hy@linkcounter
- \xdef\@currentHref{part*.\the\Hy@linkcounter}%
- \Hy@raisedlink{%
- \hyper@anchorstart{\@currentHref}\hyper@anchorend
- }%
- \H@old@spart{#1}%
- }%
- }{}{%
- \PackageWarningNoLine{scrhack}{unknown \string\@spart\space
- definition found!\MessageBreak
- Maybe you are using a unsupported hyperref version}%
- }%
-}
-\scr@ifexpected\@ssect{%
- \def\@ssect#1#2#3#4#5{%
- \H@old@ssect{#1}{#2}{#3}{#4}{#5}%
- \phantomsection
- }%
-}{%
- \PackageInfo{scrhack}{redefining \string\@ssect}%
- \def\@ssect#1#2#3#4#5{%
- \H@old@ssect{#1}{#2}{#3}{#4}{\phantomsection\ignorespaces#5}%
- }%
-}{%
- \scr@ifexpected\@ssect{%
- \def\@ssect#1#2#3#4#5{%
- \H@old@ssect{#1}{#2}{#3}{#4}{\phantomsection\ignorespaces#5}%
- }%
- }{}{%
- \PackageWarningNoLine{scrhack}{unknown \string\@ssect\space
- definition found!\MessageBreak
- Maybe you are using a unsupported hyperref version}%
- }%
-}
-%</hyperref&body>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{The \pkg*{floatrow} hack}
-%
-% Package \pkg{floatrow} insists in using \cs{float@listhead} for the setting
-% of the headings. This is not recommended any longer since \KOMAScript~2.95
-% from July 2006! The \KOMAScript{} classes will remove the support for
-% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The
-% effort to do so, it very small and I do not understand, why package authors
-% are not willing to use it. Because the benefit would be a lot.
-%
-% This hack adds \pkg*{tocbasic} usage to \pkg{floatrow}. Nevertheless it is
-% more complicated than adding \pkg*{tocbasic} support into \pkg{floatrow}.
-%
-% \begin{option}{floatrow}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
-% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}}
-% \changes{v3.34}{2021/06/03}{deactivation of the \pkg{float} hack}
-% \begin{macrocode}
-%<*package&option>
-\KOMA@ifkey{floatrow}{@scrhack@floatrow}
-\KOMAExecuteOptions{floatrow=true}
-%</package&option>
-%<*package&body>
-\AfterPackage*{floatrow}{%
- \KOMAoptions{float=false}%
- \PackageInfo{scrhack}{option `float' deactivated}%
- \KOMA@key[.scrhack.sty]{floatrow}{%
- \PackageWarning{scrhack}{option `floatrow' ignored}%
- \FamilyKeyStateProcessed
- }%
- \if@scrhack@floatrow\scr@hack@load\@pkgextension{floatrow}\fi
-}
-%</package&body>
-% \end{macrocode}
-% \end{option}
-%
-%
-% \begin{command}{\DeclareNewFloatType,\listof}
-% \changes{v3.25}{2018/03/16}{using \cs{DeclareTOCStyleEntry}}
-% Command \cs{DeclareNewFloatType} is used to define a new float
-% environment. We have to add registration of the file extension (third
-% argument) with \pkg*{tocbasic}.
-% Command \cs{listof} outputs the list of the float environments. Here we
-% just use the corresponding macro of \pkg*{tocbasic}.
-% \begin{macro}{\float@addtolists}
-% The deprecated macro \cs{float@addtolists} is not needed any longer an will
-% be reset to the original definition.
-% \begin{macrocode}
-%<*floatrow&body>
-\scr@ifexpected{\DeclareNewFloatType}{%
- \long\def\DeclareNewFloatType#1#2{\def\FB@captype{#1}%
- \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
- \addtocounter{float@type}{\value{float@type}}%
- \@namedef{#1name}{#1}\newcounter{#1}%
- \expandafter\edef\csname fnum@#1\endcsname
- {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
- \expandafter\noexpand\csname the#1\endcsname}%
- \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
- \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
- \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
- \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
- \@tempa}%
-}{%
- \scr@ifexpected{\listof}{%
- \def\listof#1#2{%
- \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
- \expandafter\providecommand\csname l@#1\endcsname
- {\@dottedtocline{1}{1.5em}{2.3em}}%
- \float@listhead{#2}%
- \begingroup\setlength{\parskip}{\z@}%
- \@starttoc{\@nameuse{ext@#1}}%
- \endgroup}}%
- }{%
- \RequirePackage{tocbasic}%
- \PackageInfo{scrhack}{redefining \string\DeclareNewFloatType}%
-% \end{macrocode}
-% \begin{description}
-% \item[Note:] It would be better to first test, if the new extension is
-% already in use like done at the \pkg{float} hack. But I don't know the
-% \pkg{floatrow} code good enough to make such a change!
-% \end{description}
-% \begin{macrocode}
- \renewcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
- \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
- \addtocounter{float@type}{\value{float@type}}%
- \@namedef{#1name}{#1}\newcounter{#1}%
- \expandafter\edef\csname fnum@#1\endcsname
- {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
- \expandafter\noexpand\csname the#1\endcsname}%
- \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
- \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]{default}{#1}%
- \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
- \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
- \@tempa
- \xdef\@tempa{\noexpand\addtotoclist[float]{\@nameuse{ext@\FB@captype}}%
- \noexpand\setuptoc{\@nameuse{ext@\FB@captype}}{chapteratlist}%
- }%
- \@tempa
- }%
- \PackageInfo{scrhack}{redefining \string\listof}%
- \renewcommand*\listof[2]{%
- \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
- \@ifundefined{l@#1}{\expandafter\let\csname l@#1\endcsname\l@figure
- \@ifundefined{l@#1}{%
- \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]
- {default}{#1}%
- }{}%
- }{}%
- \listoftoc[{#2}]{\csname ext@#1\endcsname}%
- }%
- }%
- \scr@ifexpected{\float@addtolists}{%
- \long\def\float@addtolists#1{%
- \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}%
- }{%
- \PackageInfo{scrhack}{undefining \string\float@addtolists}%
- \let\float@addtolists\relax
- }{%
- \PackageWarningNoLine{scrhack}{unkown \string\float@addtolists\space
- definition found!\MessageBreak
- Maybe you are using a unsupported floatrow version}%
- }%
- }{%
- \PackageWarningNoLine{scrhack}{unknown \string\listof\space
- definition found!\MessageBreak
- Maybe you are using a unsupported floatrow version}%
- }%
-}{%
- \PackageWarningNoLine{scrhack}{unknown \string\DeclareNewFloatType\space
- definition found!\MessageBreak
- Maybe you are using a unsupported floatrow version}%
-}
-%</floatrow&body>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-%
-% \subsection{The \pkg*{float} hack}
-%
-% Package \pkg{float} insists in using \cs{float@listhead} for the setting
-% of the headings. This is not recommended any longer since \KOMAScript~2.95
-% from July 2006! The \KOMAScript{} classes will remove the support for
-% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The
-% effort to do so, it very small and I do not understand, why package authors
-% are not willing to use it. Because the benefit would be a lot.
-%
-% This hack adds \pkg*{tocbasic} usage to \pkg{float}. Nevertheless it is
-% more complicated than adding \pkg*{tocbasic} support into \pkg{float}.
-%
-% \begin{option}{float}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
-% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}}
-% \begin{macrocode}
-%<*package&option>
-\KOMA@ifkey{float}{@scrhack@float}%
-\KOMAExecuteOptions{float=true}%
-%</package&option>
-%<*package&body>
-\AfterPackage*{float}{%
- \KOMA@key[.scrhack.sty]{float}{%
- \PackageWarning{scrhack}{option `float' ignored}%
- \FamilyKeyStateProcessed
- }%
- \if@scrhack@float\scr@hack@load\@pkgextension{float}\fi
-}
-%</package&body>
-% \end{macrocode}
-% \end{option}
-%
-%
-% \begin{command}{\newfloat}
-% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} replaced by
-% \cs{Ifattoclist}}
-% \changes{v3.25}{2018/03/16}{using \cs{DeclareTOCStyleEntry}}
-% We have to add registration of the file extension (third argument of
-% \cs{newfloat}) with \pkg*{tocbasic}.
-% \begin{command}{\listof}
-% Command \cs{listof} outputs the list of the float environments. Here we
-% just use the corresponding macro of \pkg*{tocbasic}.
-% \begin{macro}{\float@addtolists}
-% The deprecated macro \cs{float@addtolists} is not needed any longer an will
-% be reset to the original definition.
-% \begin{macrocode}
-%<*float&body>
-\scr@ifexpected{\newfloat}{%
- \long\def\newfloat#1#2#3{\@namedef{ext@#1}{#3}
- \let\float@do=\relax
- \xdef\@tempa{\noexpand\float@exts{\the\float@exts \float@do{#3}}}%
- \@tempa
- \floatplacement{#1}{#2}%
- \@ifundefined{fname@#1}{\floatname{#1}{#1}}{}
- \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}%
- \addtocounter{float@type}{\value{float@type}}
- \restylefloat{#1}%
- \expandafter\edef\csname fnum@#1\endcsname%
- {\expandafter\noexpand\csname fname@#1\endcsname{}
- \expandafter\noexpand\csname the#1\endcsname}
- \@ifnextchar[%]
- {\float@newx{#1}}%
- {\@ifundefined{c@#1}{\newcounter{#1}\@namedef{the#1}{\arabic{#1}}}%
- {}}}%
-}{%
- \scr@ifexpected{\listof}{%
- \def\listof#1#2{%
- \@ifundefined{ext@#1}{\float@error{#1}}{%
- \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
- \float@listhead{#2}%
- \begingroup\setlength{\parskip}{\z@}%
- \@starttoc{\@nameuse{ext@#1}}%
- \endgroup}}%
- }{%
- \RequirePackage{tocbasic}%
- \PackageInfo{scrhack}{redefining \string\newfloat}%
- \renewcommand\newfloat[3]{%
- \Ifattoclist{#3}{%
- \PackageError{scrhack}{extension `#3' already in use}{%
- Each extension may be used only once.\MessageBreak
- You, the class, or another package already uses extension
- `#3'.\MessageBreak
- \string\newfloat\space command will be ignored!}%
- }{%
- \addtotoclist[float]{#3}%
- \setuptoc{#3}{chapteratlist}%
- \@namedef{ext@#1}{#3}%
- \let\float@do=\relax
- \xdef\@tempa{\noexpand\float@exts{\the\float@exts \float@do{#3}}}%
- \@tempa
- \floatplacement{#1}{#2}%
- \@ifundefined{fname@#1}{\floatname{#1}{#1}}{}%
- \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}%
- \addtocounter{float@type}{\value{float@type}}
- \restylefloat{#1}%
- \expandafter\edef\csname fnum@#1\endcsname%
- {\expandafter\noexpand\csname fname@#1\endcsname{}
- \expandafter\noexpand\csname the#1\endcsname}%
- \@ifnextchar[%]
- {\float@newx{#1}}%
- {\@ifundefined{c@#1}{\newcounter{#1}\@namedef{the#1}{\arabic{#1}}}%
- {}}}%
- }%
- \PackageInfo{scrhack}{redefining \string\listof}%
- \renewcommand*\listof[2]{%
- \@ifundefined{ext@#1}{\float@error{#1}}{%
- \@ifundefined{l@#1}{\expandafter\let\csname l@#1\endcsname\l@figure
- \@ifundefined{l@#1}{%
- \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]
- {default}{#1}%
- }{}%
- }{}%
- \listoftoc[{#2}]{\csname ext@#1\endcsname}%
- }%
- }%
- \scr@ifexpected{\float@addtolists}{%
- \long\def\float@addtolists#1{%
- \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}%
- }{%
- \PackageInfo{scrhack}{undefining \string\float@addtolists}%
- \let\float@addtolists\relax
- }{%
- \PackageWarningNoLine{scrhack}{unkown \string\float@addtolists\space
- definition found!\MessageBreak
- Maybe you are using a unsupported float version}%
- }%
- }{%
- \PackageWarningNoLine{scrhack}{unknown \string\listof\space
- definition found!\MessageBreak
- Maybe you are using a unsupported float version}%
- }%
-}{%
- \PackageWarningNoLine{scrhack}{unknown \string\newfloat\space
- definition found!\MessageBreak
- Maybe you are using a unsupported float version}%
-}
-%</float&body>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-% \end{command}
-%
-%
-% \subsection{The \pkg*{listings} hack}
-%
-% Package \pkg{listing} insists in using \cs{float@listhead} for the setting
-% of the headings. This is not recommended any longer since \KOMAScript~2.95
-% from July 2006! The \KOMAScript{} classes will remove the support for
-% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The
-% effort to do so, it very small and I do not understand, why package authors
-% are not willing to use it. Because the benefit would be a lot.
-%
-% This hack adds \pkg*{tocbasic} usage to \pkg{listings}. Nevertheless it is
-% more complicated than adding \pkg*{tocbasic} support into \pkg{listings}.
-%
-% \begin{option}{listings}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
-% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}}
-% \begin{macrocode}
-%<*package&option>
-\KOMA@ifkey{listings}{@scrhack@listings}
-\KOMAExecuteOptions{listings=true}
-%</package&option>
-%<*package&body>
-\AfterPackage*{listings}{%
- \KOMA@key[.scrhack.sty]{listings}{%
- \PackageWarning{scrhack}{option `listings' ignored}%
- \FamilyKeyStateProcessed
- }%
- \if@scrhack@listings\scr@hack@load\@pkgextension{listings}\fi
-}
-%</package&body>
-% \end{macrocode}
-% \end{option}
-%
-%
-% \begin{macro}{\scr@do@hack@listings}
-% \begin{command}{\lstlistoflistings}
-% \cs{scr@do@hack@listings} patches \pkg{listings} to use \pkg*{tocbasic} for
-% the whole output of the list of listings. This adds several new features to
-% \pkg{listings}.
-% \begin{macro}{\float@addtolists}
-% The deprecated macro \cs{float@addtolists} is not needed any longer an will
-% be reset to the original definition. But, because \pkg{listings} delays the
-% redefinition with \cs{AtBeginDocument} we have to do the same here.
-% \begin{macrocode}
-%<*listings&body>
-\newcommand*{\scr@do@hack@listings}{%
- \RequirePackage{tocbasic}%
- \addtotoclist[float]{lol}%
- \setuptoc{lol}{chapteratlist}%
- \PackageInfo{scrhack}{redefining \string\lstlistoflistings}%
- \renewcommand*{\lstlistoflistings}{\listoftoc[{\lstlistlistingname}]{lol}}%
- \AtBeginDocument{%
- \scr@ifexpected{\float@addtolists}{%
- \def\float@addtolists##1{\addtocontents{lol}{##1}}%
- }{%
- \PackageInfo{scrhack}{undefining \string\float@addtolists}%
- \let\float@addtolists\relax
- }{%
- \scr@ifexpected{\float@addtolists}{%
- \def\float@addtolists##1{\addtocontents{lol}{##1}%
- \orig@float@addtolists{##1}}%
- }{%
- \PackageInfo{scrhack}{setting \string\float@addtolists\MessageBreak
- to \string\orig@float@addtolists}%
- \let\float@addtolists\orig@float@addtolists
- }{%
- \PackageWarningNoLine{scrhack}{unkown \string\float@addtolists\space
- definition found!\MessageBreak
- Maybe you are using a unsupported listings version}%
- }%
- }%
- }%
-% \end{macrocode}
-% \begin{macro}{\lst@makecaption}
-% \changes{v3.30}{2020/04/01}{setting of \cs{@captype} added}
-% From version~3.30 setting of \cs{@captype} to \texttt{lstlisting} is added
-% to \cs{lst@makecaption}. This adds support for usage of
-% \cs{raggedlstlistingcaption} (if the user or a package author defines
-% it). The change is a little bit dangerous, because it will break, if
-% \pkg{listings} would add an argument to \cs{lst@makecaption}.
-% \begin{macrocode}
- \expandafter\def\expandafter\lst@makecaption\expandafter{%
- \expandafter\def\expandafter\@captype\expandafter{%
- \expandafter l\expandafter s\expandafter t\expandafter l%
- \expandafter i\expandafter s\expandafter t\expandafter i%
- \expandafter n\expandafter g\expandafter}\lst@makecaption
- }%
- \let\scr@do@hack@listings\relax
-}
-\scr@ifexpected{\lstlistoflistings}{%
- \def\lstlistoflistings{\bgroup
- \let\contentsname\lstlistlistingname
- \let\lst@temp\@starttoc \def\@starttoc##1{\lst@temp{lol}}%
- \tableofcontents \egroup}%
-}{%
- \scr@do@hack@listings
-}{%
- \scr@ifexpected{\lstlistoflistings}{%
- \def\lstlistoflistings{%
- \begingroup
- \@ifundefined{@restonecoltrue}{}{%
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \else
- \@restonecolfalse
- \fi
- }%
- \float@listhead{\lstlistlistingname}%
- \parskip\z@\parindent\z@\parfillskip \z@ \@plus 1fil%
- \@starttoc{lol}%
- \@ifundefined{@restonecoltrue}{}{%
- \if@restonecol\twocolumn\fi
- }%
- \endgroup
- }%
- }{%
- \scr@do@hack@listings
- }{%
- \PackageWarningNoLine{scrhack}{unknown \string\lstlistoflistings\space
- definition found!\MessageBreak
- Maybe you are using a unsupported listings version}%
- }%
-}
-%</listings&body>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{command}
-% \end{macro}
-%
-%
-%
-% \subsection{The \pkg*{nomencl} hack}
-%
-% With package \pkg{nomencl} and the \KOMAScript{} classes there is only a
-% small disharmony between relating the ToC entry. Nevertheless the package
-% can benefit from using \pkg*{tocbasic}.
-%
-% This hack adds \pkg*{tocbasic} usage to \pkg{nomencl}. This is done using
-% \pkg{xpatch} Nevertheless it is much more complicated than adding real
-% \pkg*{tocbasic} support into \pkg{nomencl}. The mess is, that every new
-% release of \pkg{nomencl} changes the kind of ``support'' of
-% \pkg*{tocbasic}. For some versions there isn't any such support. Other
-% versions use \pkg*{tocbasic} if it has been loaded. Other versions need an
-% option to activate usage of \pkg*{tocbasic}. So don't expect that the
-% following hack does the correct thing for every version of \pkg{nomencl}!
-%
-% \begin{option}{nomencl}
-% \changes{v3.23}{2017/03/31}{added}
-% \begin{macrocode}
-%<*package&option>
-\RequirePackage{xpatch}%
-\KOMA@ifkey{nomencl}{@scrhack@nomencl}
-\KOMAExecuteOptions{nomencl=true}
-%</package&option>
-%<*package&body>
-\AfterPackage*{nomencl}{%
- \KOMA@key[.scrhack.sty]{nomencl}{%
- \PackageWarning{scrhack}{option `nomencl' ignored}%
- \FamilyKeyStateProcessed
- }%
- \if@scrhack@nomencl\scr@hack@load\@pkgextension{nomencl}\fi
-}
-%</package&body>
-% \end{macrocode}
-% \end{option}^^A nomencl
-%
-% \begin{command}{\thenomenclature}
-% \changes{v3.23}{2017/03/31}{added}
-% Instead of using the several definitions by cases of the several versions of
-% \pkg{nomencl} we use a patch, that should remove all such cases and use
-% \pkg*{tocbasic} always.
-% \begin{macrocode}
-%<*nomencl&body>
-\RequirePackage{tocbasic}
-% \end{macrocode}
-% With \pkg{nomencl} > 5.0 this should be all.
-% Unfortunately is isn't, because newer versions of \pkg{nomencl} need option
-% \opt{tocbasic} to be set. Good luck: It is the default. So the chances
-% are good, that with new versions of \pkg{nomencl} usage of \pkg*{tocbasic} is
-% the default.
-% \begin{macrocode}
-\@ifpackagelater{nomencl}{2019/01/01}{%
- \PackageInfo{scrhack}{only `tocbasic' loaded for `nomencl'}%
- \expandafter\endinput
-}{}
-% \end{macrocode}
-% Otherwise we have to patch it.
-% \begin{macrocode}
-\addtotoclist[nomencl]{nlo}
-\addtotoclist[nomencl]{nls}
-\xpatchcmd{\thenomenclature}{%
- \@ifundefined{chapter}%
- {
- \section*{\nomname}
- \if@intoc\addcontentsline{toc}{section}{\nomname}\fi%
- }%
- {
- \chapter*{\nomname}
- \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi%
- }%
-}{%
- \scr@hack@nomencl@head
-}{%
- \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
-}{%
-% \end{macrocode}
-% \changes{v3.26b}{2019/01/23}{new \pkg{nomencl} 5.0}
-% From \pkg{nomencl} 5.0 another code is used if the nomenclature is a
-% chapter. So we need another patch:
-% \begin{macrocode}
- \xpatchcmd{\thenomenclature}{%
- \@ifundefined{chapter}%
- {
- \section*{\nomname}
- \if@intoc\addcontentsline{toc}{section}{\nomname}\fi%
- }%
- {
- \chapter*{\nomname}
- \markboth{\nomname}{\nomname}%
- \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi%
- }%
- }{%
- \scr@hack@nomencl@head
- }{%
- \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
- }{%
-% \end{macrocode}
-% \changes{v3.26b}{2019/01/23}{prepared for hoply comming \pkg{nomencl}}
-% But this code is also wrong, because it breaks manual running heads, e.g.,
-% of page style \texttt{myheadings}. So I hope, there will be another code,
-% that needs a somehow different patch:
-% \begin{macrocode}
- \xpatchcmd{\thenomenclature}{%
- \@ifundefined{chapter}%
- {
- \section*{\nomname}
- \if@intoc\addcontentsline{toc}{section}{\nomname}\fi%
- }%
- {
- \chapter*{\nomname}
- \@mkboth{\nomname}{\nomname}%
- \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi%
- }%
- }{%
- \scr@hack@nomencl@head
- }{%
- \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
- }{%
-% \end{macrocode}
-% \changes{v3.25}{2019/01/23}{emergency patch added}
-% \changes{v3.30}{2020/02/25}{spurious space in warning message removed}
-% If this also does not work, we try an emergency patch, that could break
-% things.
-% \begin{macrocode}
- \xpatchcmd{\thenomenclature}{%
- \@ifundefined{chapter}%
- }{%
- \scr@hack@nomencl@head
- \@gobbletwo
- }{%
- \PackageWarning{scrhack}{%
- using emergency patch of \string\thenomenclature.\MessageBreak
- This could happen if you are using an unknown\MessageBreak
- release of package `nomencl'.\MessageBreak
- Mostly this patch does work too, but it also could\MessageBreak
- break `nomencl`. If this happens, please deactivate\MessageBreak
- the `nomencl` hack of `scrhack`%
- }%
- }{%
- \PackageWarning{scrhack}{%
- cannot patch \string\thenomenclature.\MessageBreak
- This could happen if you are using an unknown\MessageBreak
- release of package `nomencl'%
- }%
- }%
- }%
- }%
-}
-%</nomencl&body>
-% \end{macrocode}
-% \end{command}^^A \thenomenclature
-%
-% \begin{macro}{\scr@hack@nomencl@head}
-% \changes{v3.23}{2017/03/31}{heading of \env{thenomenclature} by
-% \pkg*{tocbasic}}
-% \changes{v3.31}{2020/07/08}{internal \cs{list@fname} eliminated}
-% We don't need an extra group, because \env{thenomenclature} already adds the
-% group.
-% \begin{macrocode}
-%<*nomencl&body>
-\newcommand*{\scr@hack@nomencl@head}{%
- \providecommand*{\listofnlsname}{\nomname}%
- \def\@currext{nls}%
- \tocbasic@listhead{\nomname}%
-}
-%</nomencl&body>
-% \end{macrocode}
-% \begin{description}
-% \item[Note:] Only the heading hooks of \pkg*{tocbasic} are used. The other
-% hooks can be set, but would never be used!
-% \end{description}
-% \end{macro}^^A \scr@hack@nomencl@head
-%
-% \begin{macro}{\if@intoc}
-% \changes{3.23}{2017/03/31}{support of \cs{if@intoc}}
-% Generally we have to support \pkg{nomencl}'s option \opt{intoc} and the
-% switch \cs{if@intoc}. This is done by (un-)setting \pkg*{tocbasic} feature
-% \texttt{totoc}. So additional changes of the feature can be done at first
-% after loading both, \pkg{nomencl} and \pkg*{scrhack}. Moreover, later changes
-% of \cs{if@intoc} are not recognized.
-% \begin{macrocode}
-%<*nomencl&body>
-\if@intoc
- \setuptoc{nls}{totoc}
-\fi
-%</nomencl&body>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{The \pkg*{setspace} hack}
-%
-% Package \pkg{setspace} internally uses \cs{@ptsize} in a way, that only
-% works as long as \cs{@ptsize} is an integer. But because \KOMAScript{}
-% supports non integer font sizes, \cs{@ptsize} can also contain non-integer
-% values. Moreover for \opt{11pt}, \LaTeX{} does not use a 11\,pt font but
-% a 10.95\,pt font with a \len{baselineskip} of 13.6\,pt, the correct factor
-% for, e.g., \cs{onehalfspacing} would be:
-% \[ 10{,}95\,\mathrm{pt} \dot 1{,5} / 13{,}6\,\mathrm{pt} \equiv 1{,}208 \]
-% But \pkg{setspace} uses 1.213, which would be correct for 11\,pt. Moreover
-% the factor is always relative to the base font size and not the current font
-% size. Because of this
-% \begin{verbatim}
-% \documentclass[10pt]{article}
-% \usepackage{setspace}
-% \begin{document}
-% \large\onehalfspacing\raggedright
-% Fontsize: \csname f@size\endcsname pt\\
-% Normal baselineskip: \csname f@baselineskip\endcsname\\
-% baselineskip: \the\baselineskip
-% \end{document}
-% \end{verbatim}
-% results in another \len{baselineskip} than:
-% \begin{verbatim}
-% \documentclass[11pt]{article}
-% \usepackage{setspace}
-% \begin{document}
-% \large\onehalfspacing\raggedright
-% Fontsize: \csname f@size\endcsname pt\\
-% Normal baselineskip: \csname f@baselineskip\endcsname\\
-% baselineskip: \the\baselineskip
-% \end{document}
-% \end{verbatim}
-% despite both examples use the same font size. So, to make it absolutely
-% correct, the factor would have to change with every change of the font
-% size. But the hack also does not do so. It just calculates the factor
-% depending on the base font size an the current font size. This is enough to
-% have the same \len{baselineskip} with both of the examples above.
-%
-% \begin{option}{setspace}
-% \changes{v3.17}{2015/04/16}{added}
-% \begin{macrocode}
-%<*package&option>
-\KOMA@ifkey{setspace}{@scrhack@setspace}
-\KOMAExecuteOptions{setspace=true}
-%</package&option>
-%<*package&body>
-\AfterPackage*{setspace}{%
- \KOMA@key[.scrhack.sty]{setspace}{%
- \PackageWarning{scrhack}{option `setspace' ignored}%
- \FamilyKeyStateProcessed
- }%
- \if@scrhack@setspace\scr@hack@load\@pkgextension{setspace}\fi
-}
-%</package&body>
-% \end{macrocode}
-% \end{option}
-%
-%
-% \begin{command}{\onehalfspacing}
-% \changes{v3.17}{2015/04/16}{added}
-% This selects the one half line spacing. I think, a factor with three digits
-% for the decimals should be enough.
-% \begin{macrocode}
-%<*setspace&body>
-\scr@ifexpected{\onehalfspacing}{%
- \long\def\onehalfspacing{%
- \setstretch{1.25}% default
- \ifcase \@ptsize \relax % 10pt
- \setstretch {1.25}%
- \or % 11pt
- \setstretch {1.213}%
- \or % 12pt
- \setstretch {1.241}%
- \fi
- }%
-}{%
- \renewcommand*{\onehalfspacing}{%
- \@tempdima=\dimexpr (\f@size pt)*1500/
- (\dimexpr \f@baselineskip\relax)*\p@/1000\relax
- \expandafter\setstretch\expandafter{\strip@pt\@tempdima}%
- }%
-}{%
- \PackageWarning{scrhack}{unknown \string\onehalfspacing\space
- definition found!\MessageBreak
- Maybe you are using a unsupported setpace version}%
-}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\doublespacing}
-% \changes{v3.17}{2015/04/16}{new}
-% This selects the double line spacing. I think, a factor with three digits
-% for the decimals should be enough.
-% \begin{macrocode}
-\scr@ifexpected{\doublespacing}{%
- \long\def\doublespacing{%
- \setstretch{1.667}% default
- \ifcase \@ptsize \relax % 10pt
- \setstretch {1.667}%
- \or % 11pt
- \setstretch {1.618}%
- \or % 12pt
- \setstretch {1.655}%
- \fi
- }%
-}{%
- \renewcommand*{\doublespacing}{%
- \@tempdima=\dimexpr (\f@size pt)*2000/
- (\dimexpr \f@baselineskip\relax)*\p@/1000\relax
- \expandafter\setstretch\expandafter{\strip@pt\@tempdima}%
- }%
-}{%
- \PackageWarning{scrhack}{unknown \string\doublespacing\space
- definition found!\MessageBreak
- Maybe you are using a unsupported setpace version}%
-}
-%</setspace&body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{The \pkg*{lscape} hack}
-% \changes{v3.18a}{2015/07/07}{\pkg{lscape} hack added}
-%
-% The package does change \len{textheight} inside \env{landscape} to the prior
-% value of \len{textwidth}, nevertheless is does not change \len{textwidth} to
-% the prior value of \len{textheight}. This is at least inconsistent. After
-% asking him, David~Carlisle answered, that he does not change
-% \len{textwidth}, because this could result in problems. Therefore it is very
-% strange, that he does change \cs{textheight}, despite this also to problems,
-% e.g., with packages \pkg{showframe} or \pkg*{scrlayer}. So the patch here
-% also keeps \len{textheight} unchanged. This also has to take care for
-% \pkg{pdflscape}. The patches are done using \pkg{xpatch}.
-%
-%
-% \begin{option}{lscape}
-% \changes{v3.18a}{2015/07/07}{added}
-% \changes{v3.20}{2016/05/07}{loading \pkg{xpatch} in option part already}
-% \begin{macrocode}
-%<*package&option>
-\RequirePackage{xpatch}%
-\KOMA@ifkey{lscape}{@scrhack@lscape}%
-\KOMAExecuteOptions{lscape=true}%
-%</package&option>
-%<*package&body>
-\AfterPackage*{lscape}{%
- \if@scrhack@lscape\scr@hack@load\@pkgextension{lscape}\else
- \KOMA@key[.scrhack.sty]{lscape}{%
- \PackageWarning{scrhack}{option `lscape' ignored}%
- \FamilyKeyStateProcessed
- }%
- \fi
-}
-%</package&body>
-% \end{macrocode}
-% \end{option}
-%
-% \begin{command}{\landscape}
-% \changes{v3.18a}{2015/07/07}{added}
-% \changes{v3.20}{2016/05/07}{loading \pkg{xpatch} in option part already}
-% This command is the beginning of environment \env{landscape}. This has to be
-% patched using \pkg{xpatch}.
-% \begin{description}
-% \item[Note:] This is a load time option and cannot be changed after loading
-% the package!
-% \end{description}
-% \begin{macrocode}
-%<*lscape&body>
-\xpatchcmd{\landscape}{\textheight=\vsize}{%
- \if@scrhack@lscape
-% \end{macrocode}
-% \begin{macro}{\@outputpage}
-% \changes{v3.18a}{2015/08/11}{added}
-% Here the changed value of \len{textheight} is needed for initialization of
-% \cs{@colht}. So we patch it to use the new internal \len{scr@LT@textheight}
-% instead of \len{textheight}.
-% \begin{macrocode}
- \scrh@LT@textheight=\vsize
- \let\scrh@LT@outputpage\@outputpage
- \def\@outputpage{\scrh@LT@outputpage\global\@colht\scrh@LT@textheight}%
- \else
- \textheight=\vsize
- \fi
-}{%
- \PackageInfo{scrhack}{\string\landscape\space patched to make
- \string\textheight\space change optional}%
-}{%
- \PackageWarning{scrhack}{Cannot patch \string\landscape!\MessageBreak
- Maybe you are using a unsupported lscape version}%
- \@scrhack@lscapefalse
-}
-% \end{macrocode}
-% \begin{ilength}{\scrh@LT@textheight}
-% \changes{v3.18a}{2015/08/11}{new}
-% \begin{macrocode}
-\newlength{\scrh@LT@textheight}
-%</lscape&body>
-% \end{macrocode}
-% \end{ilength}^^A \scrh@LT@textheight
-% \end{macro}^^A \@outputpage
-% \end{command}^^A \landscape
-%
-%
-% \subsection{The standard classes sections hack}
-% \label{sec:standardsections}
-% The \emph{standard classes sections hack} differs from each other
-% hack. First of all it does not patch a specific package but the class
-% definitions of section commands from \cs{part} till
-% \cs{subparagraph}. Additionally it resets several internal \LaTeX{} macros
-% which are changed by \KOMAScript{} classes to their original
-% definition. Last but not least it is not activated by default, but the user
-% has to activate it, if he needs it. The hack has more potential to break
-% things than to make things better. Because of this, there is not any support
-% for using this hack and the hack shows several warning messages.
-%
-% \begin{option}{standardsections}
-% \begin{macrocode}
-%<*package&option>
-\KOMA@ifkey{standardsections}{@scrhack@standardsections}
-\KOMAExecuteOptions{standardsections=false}
-%</package&option>
-%<*package&body>
-\AtEndOfPackage{%
- \if@scrhack@standardsections
- \PackageInfo{scrhack}{loading standard classes sections hack}%
- \input{standardsections.hak}%
- \fi
-}
-%</package&body>
-% \end{macrocode}
-% \end{option}^^A standardsections
-%
-% \begin{command}{\part,\chapter,
-% \section,\subsection,\subsubsection,
-% \paragraph,\subparagraph}
-% The hack redefines all these commands to a definition copied from the
-% standard \LaTeX{} classes version v1.4i. Copyright of this code is by the
-% \LaTeX3{} Project. The complete, unmodified code can be found on
-% \url{https://ctan.org/tex-archive/macros/latex/base/classes.dtx}.
-% \begin{macrocode}
-%<*standardsections&body>
-\PackageWarningNoLine{scrhack}{%
- You are loosing every kind of support because of\MessageBreak
- using the dangerous standard classes sections hack!\MessageBreak
- This hack can break several classes and packages.\MessageBreak
- However, sometimes it is needed to make a\MessageBreak
- package work%
-}%
-\PackageInfo{scrhack}{%
- Using code from the standard LaTeX classes.\MessageBreak
- For more information about this code and the\MessageBreak
- license of this code, please see:\MessageBreak
- https://ctan.org/tex-archive/macros/latex/base/classes.dtx
-}%
-\@ifpackageloaded{hyperref}{%
- \PackageWarning{scrhack}{this hack should not be loaded after `hyperref'}%
-}{}
-\@ifpackageloaded{titlesec}{%
- \PackageWarning{scrhack}{this hack should not be loaded after `titlesec'}%
-}{}
-\@ifpackageloaded{sectsty}{%
- \PackageWarning{scrhack}{this hack should not be loaded after `sectsty'}%
-}{}
-\@ifpackageloaded{sectsty}{%
- \PackageWarning{scrhack}{this hack should not be loaded after `sectsty'}%
-}{}
-\scr@ifundefinedorrelax{chapter}{%
-% \end{macrocode}
-% It seems to be an article class, so we use the code from
-% \href{http://mirrors.ctan.org/macros/latex/base/classes.dtx}{\cls*{article}}.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{c@part}{\newcounter{part}}{}%
- \scr@ifundefinedorrelax{c@section}{\newcounter{section}}{}%
- \scr@ifundefinedorrelax{c@subsection}{\newcounter{subsection}[section]}{}%
- \scr@ifundefinedorrelax{c@subsubsection}{%
- \newcounter{subsubsection}[subsection]}{}%
- \scr@ifundefinedorrelax{c@paragraph}{%
- \newcounter{paragraph}[subsubsection]}{}%
- \scr@ifundefinedorrelax{c@subparagraph}{%
- \newcounter{subparagraph}[paragraph]}{}%
- \renewcommand\thepart {\@Roman\c@part}%
- \renewcommand\thesection {\@arabic\c@section}%
- \renewcommand\thesubsection {\thesection.\@arabic\c@subsection}%
- \renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}%
- \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}%
- \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}%
- \def\part{%
- \if@noskipsec \leavevmode \fi
- \par
- \addvspace{4ex}%
- \@afterindentfalse
- \secdef\@part\@spart}%
- \def\@part[#1]#2{%
- \ifnum \c@secnumdepth >\m@ne
- \refstepcounter{part}%
- \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
- \else
- \addcontentsline{toc}{part}{#1}%
- \fi
- {\parindent \z@ \raggedright
- \interlinepenalty \@M
- \normalfont
- \ifnum \c@secnumdepth >\m@ne
- \Large\bfseries \partname\nobreakspace\thepart
- \par\nobreak
- \fi
- \huge \bfseries #2%
- \markboth{}{}\par}%
- \nobreak
- \vskip 3ex
- \@afterheading}%
- \def\@spart#1{%
- {\parindent \z@ \raggedright
- \interlinepenalty \@M
- \normalfont
- \huge \bfseries #1\par}%
- \nobreak
- \vskip 3ex
- \@afterheading}%
- \def\section{\@startsection {section}{1}{\z@}%
- {-3.5ex \@plus -1ex \@minus -.2ex}%
- {2.3ex \@plus.2ex}%
- {\normalfont\Large\bfseries}}%
- \def\subsection{\@startsection{subsection}{2}{\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\large\bfseries}}%
- \def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\normalsize\bfseries}}%
- \def\paragraph{\@startsection{paragraph}{4}{\z@}%
- {3.25ex \@plus1ex \@minus.2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}}%
- \def\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
- {3.25ex \@plus1ex \@minus .2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}}%
-}{%
-% \end{macrocode}
-% It seems to be either a book or report class.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{c@part}{\newcounter{part}}{}%
- \scr@ifundefinedorrelax{c@chapter}{\newcounter{chapter}}{}%
- \scr@ifundefinedorrelax{c@section}{\newcounter{section}[chapter]}{}%
- \scr@ifundefinedorrelax{c@subsection}{\newcounter{subsection}[section]}{}%
- \scr@ifundefinedorrelax{c@subsubsection}{%
- \newcounter{subsubsection}[subsection]}{}%
- \scr@ifundefinedorrelax{c@paragraph}{%
- \newcounter{paragraph}[subsubsection]}{}%
- \scr@ifundefinedorrelax{c@subparagraph}{%
- \newcounter{subparagraph}[paragraph]}{}%
- \def\@chapapp{\chaptername}%
- \scr@ifundefinedorrelax{frontmatter}{%
-% \end{macrocode}
-% It seems not to be a book class.
-% \begin{macrocode}
- \def\part{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
- \thispagestyle{plain}%
- \if@twocolumn
- \onecolumn
- \@tempswatrue
- \else
- \@tempswafalse
- \fi
- \null\vfil
- \secdef\@part\@spart}
-
- \def\@part[#1]#2{%
- \ifnum \c@secnumdepth >-2\relax
- \refstepcounter{part}%
- \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
- \else
- \addcontentsline{toc}{part}{#1}%
- \fi
- \markboth{}{}%
- {\centering
- \interlinepenalty \@M
- \normalfont
- \ifnum \c@secnumdepth >-2\relax
- \huge\bfseries \partname\nobreakspace\thepart
- \par
- \vskip 20\p@
- \fi
- \Huge \bfseries #2\par}%
- \@endpart}
- \def\@spart#1{%
- {\centering
- \interlinepenalty \@M
- \normalfont
- \Huge \bfseries #1\par}%
- \@endpart}
- \def\@endpart{\vfil\newpage
- \if@twoside
- \if@openright
- \null
- \thispagestyle{empty}%
- \newpage
- \fi
- \fi
- \if@tempswa
- \twocolumn
- \fi}
- \def\chapter{\if@openright\cleardoublepage\else\clearpage\fi
- \thispagestyle{plain}%
- \global\@topnum\z@
- \@afterindentfalse
- \secdef\@chapter\@schapter}
- \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
- \refstepcounter{chapter}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}%
- {\protect\numberline{\thechapter}#1}%
- \else
- \addcontentsline{toc}{chapter}{#1}%
- \fi
- \chaptermark{#1}%
- \addtocontents{lof}{\protect\addvspace{10\p@}}%
- \addtocontents{lot}{\protect\addvspace{10\p@}}%
- \if@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \@afterheading
- \fi}
- \def\@makechapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \raggedright \normalfont
- \ifnum \c@secnumdepth >\m@ne
- \huge\bfseries \@chapapp\space \thechapter
- \par\nobreak
- \vskip 20\p@
- \fi
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
- \def\@schapter#1{\if@twocolumn
- \@topnewpage[\@makeschapterhead{#1}]%
- \else
- \@makeschapterhead{#1}%
- \@afterheading
- \fi}
- \def\@makeschapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \raggedright
- \normalfont
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
- \def\section{\@startsection {section}{1}{\z@}%
- {-3.5ex \@plus -1ex \@minus -.2ex}%
- {2.3ex \@plus.2ex}%
- {\normalfont\Large\bfseries}}%
- \def\subsection{\@startsection{subsection}{2}{\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\large\bfseries}}%
- \def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\normalsize\bfseries}}%
- \def\paragraph{\@startsection{paragraph}{4}{\z@}%
- {3.25ex \@plus1ex \@minus.2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}}%
- \def\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
- {3.25ex \@plus1ex \@minus .2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}}%
- }{%
-% \end{macrocode}
-% It seems to be a book class.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{if@mainmatter}{%
- \expandafter\newif\csname if@mainmatter\endcsname
- }{}%
- \def\frontmatter{%
- \cleardoublepage
- \@mainmatterfalse
- \pagenumbering{roman}}%
- \def\mainmatter{%
- \cleardoublepage
- \@mainmattertrue
- \pagenumbering{arabic}}%
- \def\backmatter{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
- \@mainmatterfalse}%
- \def\part{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
- \thispagestyle{plain}%
- \if@twocolumn
- \onecolumn
- \@tempswatrue
- \else
- \@tempswafalse
- \fi
- \null\vfil
- \secdef\@part\@spart}%
-
- \def\@part[#1]#2{%
- \ifnum \c@secnumdepth >-2\relax
- \refstepcounter{part}%
- \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
- \else
- \addcontentsline{toc}{part}{#1}%
- \fi
- \markboth{}{}%
- {\centering
- \interlinepenalty \@M
- \normalfont
- \ifnum \c@secnumdepth >-2\relax
- \huge\bfseries \partname\nobreakspace\thepart
- \par
- \vskip 20\p@
- \fi
- \Huge \bfseries #2\par}%
- \@endpart}%
- \def\@spart#1{%
- {\centering
- \interlinepenalty \@M
- \normalfont
- \Huge \bfseries #1\par}%
- \@endpart}%
- \def\@endpart{\vfil\newpage
- \if@twoside
- \if@openright
- \null
- \thispagestyle{empty}%
- \newpage
- \fi
- \fi
- \if@tempswa
- \twocolumn
- \fi}%
- \def\chapter{\if@openright\cleardoublepage\else\clearpage\fi
- \thispagestyle{plain}%
- \global\@topnum\z@
- \@afterindentfalse
- \secdef\@chapter\@schapter}%
- \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \refstepcounter{chapter}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}%
- {\protect\numberline{\thechapter}#1}%
- \else
- \addcontentsline{toc}{chapter}{#1}%
- \fi
- \else
- \addcontentsline{toc}{chapter}{#1}%
- \fi
- \chaptermark{#1}%
- \addtocontents{lof}{\protect\addvspace{10\p@}}%
- \addtocontents{lot}{\protect\addvspace{10\p@}}%
- \if@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \@afterheading
- \fi}%
- \def\@makechapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \raggedright \normalfont
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \huge\bfseries \@chapapp\space \thechapter
- \par\nobreak
- \vskip 20\p@
- \fi
- \fi
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}%
- \def\@schapter#1{\if@twocolumn
- \@topnewpage[\@makeschapterhead{#1}]%
- \else
- \@makeschapterhead{#1}%
- \@afterheading
- \fi}%
- \def\@makeschapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \raggedright
- \normalfont
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}%
- \def\section{\@startsection {section}{1}{\z@}%
- {-3.5ex \@plus -1ex \@minus -.2ex}%
- {2.3ex \@plus.2ex}%
- {\normalfont\Large\bfseries}}%
- \def\subsection{\@startsection{subsection}{2}{\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\large\bfseries}}%
- \def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\normalsize\bfseries}}%
- \def\paragraph{\@startsection{paragraph}{4}{\z@}%
- {3.25ex \@plus1ex \@minus.2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}}%
- \def\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
- {3.25ex \@plus1ex \@minus .2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries}}%
- }%
-}% End of the derived code.
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macro}{\@startsection}
-% \KOMAScript{} classes redefine this internal \LaTeX{} kernel macro. In this
-% case \cs{scr@saved@startsection} is defined, differs from
-% \cs{@startsection} and has the definition found before redefining the
-% original macro. We do nothing else but resetting \cs{@startsection} to this
-% saved definition.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{scr@saved@startsection}{}{%
- \ifx\@startsection\scr@saved@startsection\else
- \PackageWarningNoLine{scrhack}{%
- Resetting \string\@startsection,\MessageBreak
- because of loading standard classes sections hack%
- }%
- \let\@startsection\scr@saved@startsection
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \@startsection
-%
-% \begin{macro}{\@sect,\@ssect,\@xsect}
-% All these should be resetted to their original definitions stored in
-% \cs{scr@latex@\dots}.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{scr@latex@sect}{}{%
- \ifx\@sect\scr@latex@sect\else
- \PackageWarningNoLine{scrhack}{%
- Resetting \string\@sect,\MessageBreak
- because of loading standard classes sections hack%
- }%
- \let\@sect\scr@latex@sect
- \fi
-}
-\scr@ifundefinedorrelax{scr@latex@ssect}{}{%
- \ifx\@ssect\scr@latex@ssect\else
- \PackageWarningNoLine{scrhack}{%
- Resetting \string\@ssect,\MessageBreak
- because of loading standard classes sections hack%
- }%
- \let\@sect\scr@latex@ssect
- \fi
-}
-\scr@ifundefinedorrelax{scr@latex@xsect}{}{%
- \ifx\@xsect\scr@latex@xsect\else
- \PackageWarningNoLine{scrhack}{%
- Resetting \string\@xsect,\MessageBreak
- because of loading standard classes sections hack%
- }%
- \let\@sect\scr@latex@sect
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \@xsect,\@ssect,\@sect
-%
-% \begin{command}{\DeclareSectionCommand,\RedeclareSectionCommand,
-% \DeclareNewSectionCommand,\ProvideSectionCommand,
-% \DeclareSectionCommands,\RedeclareSectionCommands,
-% \DeclareNewSectionCommands,\ProvideSectionCommands}
-% These \KOMAScript{} commands do not make sense any longer after forced
-% redefinition of \cs{part} \dots{} \cs{subparagraph}. They even would not
-% work correctly after resetting, e.g., \cs{@startsection}. So best reaction
-% is to \emph{undefine} them.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{DeclareSectionCommand}{}{%
- \PackageWarningNoLine{scrhack}{%
- \string\DeclareSectionCommand\space
- and all derivates deactivated,\MessageBreak
- because of loading standard classes sections hack%
- }%
- \let\DeclareSectionCommand\undefined
- \let\DeclareSectionCommands\undefined
- \let\RedeclareSectionCommand\undefined
- \let\RedeclareSectionCommands\undefined
- \let\DeclareNewSectionCommand\undefined
- \let\DeclareNewSectionCommands\undefined
- \let\ProvideSectionCommand\undefined
- \let\ProvideSectionCommands\undefined
-}
-% \end{macrocode}
-% \begin{macro}{\scr@chapter@before@hyperref@patch,
-% \scr@chapter@after@hyperref@patch}
-% Now, definitions without respecting \pkg{hyperref} are used, so
-% \pkg{hyperref} should again be able to patch them. So the hack should
-% deactivate the patch deactivation of the \KOMAScript{} classes.
-% \begin{macrocode}
-\let\scr@chapter@before@hyperref@patch\relax
-\let\scr@chapter@after@hyperref@patch\relax
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{macro}{\scr@osectarg}
-% The \KOMAScript{} classes use this macro to store how to use the optional
-% argument of section commands. But with the standard class definition the
-% only possibility is to use it as running head and write it into the table of
-% contents without any extended handling. So the only value, that makes sense
-% is 0.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{scr@osectarg}{}{%
- \def\reserved@a{0}%
- \ifx\scr@osectarg\reserved@a\else
- \let\scr@osectarg\reserved@a
- \PackageWarningNoLine{scrhack}{%
- Extended option handling for section commands deactivated,\MessageBreak
- because of loading standard classes sections hack%
- }%
- \fi
-}%
-% \end{macrocode}
-% \begin{macro}{\scr@activate@xsection}
-% Further changing of the value has to be deactivated.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{scr@activate@xsection}{}{%
- \renewcommand*{\scr@activate@xsection}[1]{%
- \edef\scr@osectarg{#1}\def\reserved@a{0}%
- \ifx\scr@osectarg\reserved@a
- \else
- \let\scr@osectarg\reserved@a
- \PackageWarning{scrhack}{%
- Because of loading the standard classes\MessageBreak
- sections hack, the extended option handling\MessageBreak
- of section commands failed%
- }%
- \fi
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@activate@xsection
-% \end{macro}^^A \scr@osectarg
-%
-% \begin{command}{\partformat,\chapterformat}
-% Most \cs{\dots format} macros of \KOMAScript{} are still used, because of
-% the redefinition of \cs{@seccntformat}. But \cs{part} and \cs{chapter} are
-% defined without using them.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{partformat}{}{%
- \PackageWarningNoLine{scrhack}{%
- Usage of \string\partformat\space
- deactivated,\MessageBreak
- because of loading the standard classes sections hack%
- }%
-}
-\scr@ifundefinedorrelax{chapterformat}{}{%
- \PackageWarningNoLine{scrhack}{%
- Usage of \string\chapterformat\space
- deactivated,\MessageBreak
- because of loading the standard classes sections hack%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \chapterformat,\partformat
-%
-% \begin{command}{\sectionformat,\subsectionformat,\subsubsectionformat,
-% \paragraphformat,\subparagraphformat}
-% All these commands have to be resetted to not use the automatic dot and to
-% add a \cs{quad} instead of an \cs{enskip}.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{sectionformat}{}{%
- \PackageWarningNoLine{scrhack}{%
- \string\sectionformat\space set to
- `\string\thesection\string\quad',\MessageBreak
- because of loading the standard classes sections hack%
- }%
- \renewcommand*{\sectionformat}{\thesection\quad}%
-}
-\scr@ifundefinedorrelax{subsectionformat}{}{%
- \PackageWarningNoLine{scrhack}{%
- \string\subsectionformat\space set to
- `\string\thesubsection\string\quad'\MessageBreak
- because of loading the standard classes sections hack%
- }%
- \renewcommand*{\subsectionformat}{\thesubsection\quad}%
-}
-\scr@ifundefinedorrelax{subsubsectionformat}{}{%
- \PackageWarningNoLine{scrhack}{%
- \string\subsubsectionformat\space set to
- `\string\thesubsubsection\string\quad'\MessageBreak
- because of loading the standard classes sections hack%
- }%
- \renewcommand*{\subsubsectionformat}{\thesubsubsection\quad}%
-}
-\scr@ifundefinedorrelax{paragraphformat}{}{%
- \PackageWarningNoLine{scrhack}{%
- \string\paragraphformat\space set to
- `\string\theparagraph\string\quad'\MessageBreak
- because of loading the standard classes sections hack%
- }%
- \renewcommand*{\paragraphformat}{\theparagraph\quad}%
-}
-\scr@ifundefinedorrelax{subparagraphformat}{}{%
- \PackageWarningNoLine{scrhack}{%
- \string\subparagraphformat\space set to
- `\string\thesubparagraph\string\quad'\MessageBreak
- because of loading the standard classes sections hack%
- }%
- \renewcommand*{\subparagraphformat}{\thesubparagraph\quad}%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\partlineswithprefixformat,
-% \chapterlineswithprefixformat,\chapterlinesformat,
-% \sectionlinesformat,\sectioncatchphraseformat}
-% These \KOMAScript{} commands are not used any longer.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{partlineswithprefixformat}{}{%
- \PackageWarningNoLine{scrhack}{%
- Usage of \string\partlineswithprefixformat\space deactivated,\MessageBreak
- because of loading the standard classes sections hack%
- }%
-}
-\scr@ifundefinedorrelax{chapterlineswithprefixformat}{}{%
- \PackageWarningNoLine{scrhack}{%
- Usage of \string\chapterlineswithprefixformat\space and\MessageBreak
- \string\chapterlinesformat\space deactivated,\MessageBreak
- because of using standard classes sections hack%
- }%
-}
-\scr@ifundefinedorrelax{sectionlinesformat}{}{%
- \PackageWarningNoLine{scrhack}{%
- Usage of \string\sectionlinesformat\space and\MessageBreak
- \string\sectioncatchphraseformat\space deactivated,\MessageBreak
- because of using standard classes sections hack%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \partlineswithprefixformat …
-%
-% \begin{option}{headings}
-% The \KOMAScript{} option does not make sense any longer. So it is
-% deactivated and usage will throw an error.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{KOMAClassName}{}{%
- \PackageWarningNoLine{scrhack}{%
- KOMA-Script option `headings' removed,\MessageBreak
- because of loading standard classes sections hack%
- }%
- \RelaxFamilyKey[.\KOMAClassFileName]{KOMA}{headings}%
- \KOMA@kav@removekey{.\KOMAClassFileName}{headings}%
-}
-% \end{macrocode}
-% \end{option}^^A headings
-%
-% \begin{macro}{\scr@class@titlesec@warning}
-% The warning about loading \pkg{titlesec} has to be changes, because we do
-% not expect errors any longer.
-% \begin{macrocode}
-\def\scr@class@titlesec@warning{%
- \PackageWarning{scrhack}{%
- Usage of `titlesec' should work, because of\MessageBreak
- loading the standard classes sections hack.\MessageBreak
- However, you should know, there is not any\MessageBreak
- support for this combination by the\MessageBreak
- KOMA-Script author%
- }%
-}
-%</standardsections&body>
-% \end{macrocode}
-% \end{macro}^^A \scr@class@titlesec@warning
-%
-% \subsection{Executing options}
-%
-% Last but not least the options have to be processed. In the generated
-% package this will be done before the commands of \autoref{sec:macros}.
-% \begin{macrocode}
-%<*package&option>
-\KOMAProcessOptions\relax
-%</package&option>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrjura.dtx b/macros/latex/contrib/koma-script/source/scrjura.dtx
deleted file mode 100644
index 8fe4bc4532..0000000000
--- a/macros/latex/contrib/koma-script/source/scrjura.dtx
+++ /dev/null
@@ -1,2042 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrjura.dtx
-% Copyright (c) Markus Kohm, 2007-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% The KOMA-Script bundle consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrjura.dtx 3773 2022-03-29 06:27:55Z kohm $
-%<identify>%%% (run: identify)
-%<init>%%% (run: init)
-%<options>%%% (run: options)
-%<postoptions>%%% (run: postoptions)
-%<body>%%% (run: body)
-%<final>%%% (run: final)
-%<*dtx>
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-29 08:27:55 +0200 (Tue, 29 Mar 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3773 $
-\endgroup
-\expandafter\ifx\csname ProvidesFile\endcsname\relax
-\def\ProvidesFile#1[#2]{}
-\fi
-\ProvidesFile{scrjura.dtx}[\filedate\space\filerevision\space
-%</dtx>
-%<package&identify>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
-%<package&identify>\ProvidesPackage{scrjura}[%
-%<*dtx|(package&identify)>
-%!KOMAScriptVersion
- package
-%<*dtx>
- source
-%</dtx>
- (for jurists)
-]
-%</dtx|(package&identify)>
-%<*dtx>
-\ifx\documentclass\undefined
-%</dtx>
-%<*ins>
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2007}
- \generate{\usepreamble\defaultpreamble
- \file{scrjura.ins}{%
- \from{scrjura.dtx}{ins}%
- }%
- \file{scrjura.sty}{%
- \from{scrjura.dtx}{package,identify}%
- \from{scrjura.dtx}{package,init}%
- \from{scrjura.dtx}{package,options}%
- \from{scrjura.dtx}{package,postoptions}%
- \from{scrjura.dtx}{package,body}%
- \from{scrjura.dtx}{package,final}%
- \from{scrlogo.dtx}{logo}%
- }%
- }%
- \@@input scrstrop.inc
-%</ins>
-%<*dtx>
-\else
- \let\endbatchfile\relax
-\fi
-%</dtx>
-%<*ins>
-\endbatchfile
-%</ins>
-%<*dtx>
-\documentclass{koma-script-source-doc}
-\usepackage[USenglish]{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
- \DocInput{scrjura.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v3.36}{2022/01/25}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-%
-% \GetFileInfo{scrjura.dtx}
-% \title{\KOMAScript{} in the Law Office\\
-% with Package \pkg*{scrjura}}
-% \date{Version \fileversion{} of \filedate}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \maketitle
-% \begin{abstract}
-% The \pkg*{scrjura} package is intended for cautelar jurisprudence. It is
-% intended to provide flexible help for lawyers and notaries in drafting
-% contracts, statutes and legal commentaries. It has been developed in
-% cooperation with Dr.\,Alexander Willand, and is still in the process of
-% development.
-% \end{abstract}
-%
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user manual of \pkg*{scrjura} in the \KOMAScript{} manual,
-% either the German \file{scrguide} or the English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation}
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% \changes{v0.7b}{2014/11/11}{General renaming of ``Paragraph'' into
-% ``Clause''}
-%
-% \subsection{Cooperation with \pkg*{hyperref}}
-%
-% If \pkg{hyperref} has already loaded before \pkg*{scrjura} the package cannot
-% work correctly. So we throw an error. Maybe it would be a good idea to make
-% this error fatal. But currently it is only an error.
-% \begin{macrocode}
-%<*init>
-\@ifpackageloaded{hyperref}{%
- \PackageError{scrjura}{Package hyperref already loaded}{%
- If you want to use package scrjura with package hyperref, you have
- to\MessageBreak
- load package scrjura before package hyperref.\MessageBreak
- To solve the problem, you just should move the loading of package
- hyperref\MessageBreak
- behind the loading of package scrjura.}%
-}
-%</init>
-% \end{macrocode}
-%
-% \subsection{Prerequisites}
-%
-% We need package \pkg*{scrkbase}. We could load this also together with
-% \pkg*{tocbasic}, which is loaded later. But loading it on its own, we can
-% require a minimum version.
-% \begin{macrocode}
-%<*init>
-\RequirePackage{scrkbase}[2013/03/26]
-%</init>
-% \end{macrocode}
-%
-% And now, \pkg*{tocbasic}.
-% \begin{macrocode}
-%<*init>
-\RequirePackage{tocbasic}
-%</init>
-% \end{macrocode}
-%
-% \subsection{Options}
-%
-% \begin{option}{contract}
-% \begin{macro}{\if@documentcontract,
-% \@documentcontractfalse,\@documentcontracttrue}
-% \changes{v3.36}{2022/01/25}{switched to a \KOMAScript{} option}
-% Option \opt{contract} can be used to make the whole document to be a
-% contract. But in this case you are not allowed to reuse the \env{contract}
-% environment in the document. Now it is allowed to stop or restart the
-% contract. With older \LaTeX{} this is done by adding \cs{contract} to the
-% end of \cs{document}. With an up to date \LaTeX{} we us a hook.
-% \begin{macrocode}
-%<*options>
-\KOMA@ifkey{contract}{@documentcontract}
-\IfLTXAtLeastTF{2020/10/01}{%
- \AddToHook{begindocument/end}{%
- \RelaxFamilyKey[.scrjura.sty]{KOMA}{contract}%
- \if@documentcontract\expandafter\contract\fi
- }%
-}{%
- \g@addto@macro\document{%
- \RelaxFamilyKey[.scrjura.sty]{KOMA}{contract}%
- \if@documentcontract\expandafter\contract\fi
- }%
-}
-%</options>
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{juratotoc}
-% Allow to set the toc level of the entries. Value \optvalue{true} is the same
-% like \optvalue{2}, value \optvalue{false} is the same like \cs{maxdimen}.
-% \changes{v0.7}{2013/11/04}{usage of renewed interface with
-% \cs{FamilyKeyState}}
-% \changes{v0.9a}{2015/03/09}{internal value storage}
-% \begin{macro}{\if@juratotoc}
-% \changes{v0.6}{2011/09/29}{replaced by counter}
-% \begin{counter}{juratoclevel}
-% \changes{v0.6}{2011/09/29}{definition moved}
-% \changes{v3.27}{2019/02/25}{removed}
-% \begin{macro}{\toclevel@cpar}
-% \changes{v0.7}{2013/06/09}{new, because of \pkg{hyperref}}
-% \changes{v3.27}{2019/02/25}{handled by \pkg*{tocbasic}}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{juratotoc}[true]{%
- \KOMA@set@ifkey{juratotoc}{@tempswa}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \if@tempswa
- \DeclareTOCStyleEntry[level=2]{default}{cpar}%
- \else
- \DeclareTOCStyleEntry[level=\maxdimen]{default}{cpar}%
- \fi
- \else
- \DeclareTOCStyleEntry[level=#1]{default}{cpar}%
- \fi
- \KOMA@kav@xreplacevalue{.scrjura.sty}{juratotoc}{\cpartocdepth}%
-}
-\KOMA@kav@xadd{.scrjura.sty}{juratotoc}{\cpartocdepth}%
-%</options>
-% \end{macrocode}
-% \end{macro}
-% \end{counter}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{juratocnumberwidth,juratocindent}
-% \changes{v0.6}{2011/09/29}{new}
-% \changes{v0.7}{2013/11/04}{usage of renewed interface with
-% \cs{FamilyKeyState}}
-% \changes{v0.9a}{2015/03/09}{internal value storage}
-% \begin{ilength}{\cpar@numberwidth,\cpar@indent}
-% \changes{v0.6}{2011/09/29}{new}
-% \changes{v3.27}{2019/02/25}{replaced by usage of \cs{DeclareTOCStyleEntry}}
-% Indent and number width of the toc entries.
-% \begin{macrocode}
-%<*options>
-\KOMA@key{juratocnumberwidth}{%
- \DeclareTOCStyleEntry[numwidth=#1]{default}{cpar}%
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.scrjura.sty}{juratocnumberwidth}{#1}%
-}
-\KOMA@kav@add{.scrjura.sty}{juratocnumberwidth}{2em}
-\KOMA@key{juratocindent}{%
- \DeclareTOCStyleEntry[indent=#1]{default}{cpar}%
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.scrjura.sty}{juratocindent}{#1}%
-}
-\KOMA@kav@add{.scrjura.sty}{juratocindent}{1.5em}%
-%</options>
-% \end{macrocode}
-% \end{ilength}
-% \end{option}
-%
-% \begin{option}{juratitlepagebreak}
-% \changes{v0.5b}{2010/04/05}{new}
-% The options sets the boolean \cs{if@juratitlepagebreak}.
-% \begin{macro}{\if@juratitlepagebreak,
-% \@juratitlepagebreaktrue,\@juratitlepagebreakfalse}
-% If the boolean is \cs{iftrue} page breaks inside clause headings are
-% allowed (which is not recommended).
-% \begin{macrocode}
-%<*options>
-\KOMA@ifkey{juratitlepagebreak}{@juratitlepagebreak}
-%</options>
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{parnumber}
-% \changes{v0.6}{2011/09/29}{new}
-% \changes{v0.6a}{2012/10/15}{value mistake message changed}
-% \changes{v0.7}{2013/11/04}{usage of renewed interface with
-% \cs{FamilyKeyState}}
-% \changes{v0.9a}{2015/03/09}{internal value storage}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed into \cs{Ifstr}}
-% The options switches the (automatic) paragraph numbering.
-% \begin{macrocode}
-%<*options>
-\newif\ifparnumber
-\KOMA@key{parnumber}[true]{%
- \Ifstr{#1}{auto}{%
- \AutoPar
- \FamilyKeyStateProcessed
- \KOMA@kav@remove{.scrjura.sty}{parnumber}{manual}%
- \KOMA@kav@remove{.scrjura.sty}{parnumber}{auto}%
- \KOMA@kav@add{.scrjura.sty}{parnumber}{auto}%
- }{%
- \Ifstr{#1}{manual}{%
- \ManualPar
- \FamilyKeyStateProcessed
- \KOMA@kav@remove{.scrjura.sty}{parnumber}{manual}%
- \KOMA@kav@remove{.scrjura.sty}{parnumber}{auto}%
- \KOMA@kav@add{.scrjura.sty}{parnumber}{manual}%
- }{%
- \KOMA@set@ifkey{parnumber}{parnumber}{#1}%
- \KOMA@kav@replacebool{.scrjura.sty}{parnumber}{parnumber}%
- }%
- }%
-}
-\KOMA@kav@add{.scrjura.sty}{parnumber}{true}
-\KOMA@kav@add{.scrjura.sty}{parnumber}{auto}
-%</options>
-% \end{macrocode}
-% \end{option}
-%
-% \begin{option}{paragraphmark,clausemark}
-% \changes{v0.9h}{2016/04/11}{\opt{paragraphmark} renamed to \opt{clausemark}}
-% \changes{v0.7}{2013/11/04}{usage of renewed interface with
-% \cs{FamilyKeyState}}
-% \changes{v0.9a}{2015/03/09}{internal value storage}
-% \begin{option}{markright,markboth}
-% \changes{v0.7}{2013/11/04}{deprecated}
-% \begin{command}{\Clausemark}
-% \changes{v0.5e}{2011/08/31}{support for \cs{MakeMarkcase}}
-% The options are used to activate either \cs{markright} or \cs{markboth} for
-% clauses. \cs{Clausemark} expects not only the title but also the
-% number. So it differs from, e.g., \cs{chaptermark}, which uses the counter
-% automatically. But maybe I will change this some time.
-% \begin{macrocode}
-%<*options>
-\newcommand*{\Clausemark}[1]{}
-\KOMA@key{clausemark}{%
- \begingroup
- \KOMA@set@ncmdkey{clausemark}{@tempa}{%
- {false}{0},{off}{0},{no}{0},%
- {forceright}{1},%
- {forceboth}{2},%
- {right}{3},%
- {both}{4}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifcase\number\@tempa
- \endgroup
- \let\Clausemark\@gobble
- \or
- \endgroup
- \renewcommand*{\Clausemark}[1]{%
- \markright{\csname MakeMarkcase\endcsname{##1}}}%
- \or
- \endgroup
- \renewcommand*{\Clausemark}[1]{%
- \markboth{\csname MakeMarkcase\endcsname{##1}}%
- {\csname MakeMarkcase\endcsname{##1}}}%
- \or
- \endgroup
- \renewcommand*{\Clausemark}[1]{%
- \ifx
- \@mkboth\@gobbletwo
- \else
- \markright{\csname MakeMarkcase\endcsname{##1}}%
- \fi}%
- \or
- \endgroup
- \renewcommand*{\Clausemark}[1]{%
- \@mkboth{\csname MakeMarkcase\endcsname{##1}}%
- {\csname MakeMarkcase\endcsname{##1}}}%
- \else
- \endgroup
- \fi
- \FamilyKeyStateProcessed
- \else
- \endgroup
- \FamilyKeyStateUnknownValue
- \fi
- \KOMA@kav@xreplacevalue{.scrjura.sty}{clausemark}{#1}%
-}
-\KOMA@kav@add{.scrjura.sty}{clausemark}{false}
-\KOMA@DeclareDeprecatedOption[scrjura]{markright}{clausemark=forceright}
-\KOMA@DeclareDeprecatedOption[scrjura]{markboth}{clausemark=forceboth}
-\KOMA@key{paragraphmark}{%
- \PackageWarningNoLine{scrjura}{%
- You've used obsolete option `paragraphmark'.\MessageBreak
- Usage of this option is deprecated.\MessageBreak
- You should simply replace `paragraphmark'\MessageBreak
- by `clausemark'%
- }%
- \KOMAExecuteOptions[.scrjura.sty]{clausemark=#1}%
-}
-%</options>
-% \end{macrocode}
-% \end{command}
-% \end{option}
-% \end{option}
-%
-% \begin{option}{ref}
-% \changes{v0.5d}{2010/06/07}{new values \optvalue{nopar},
-% \optvalue{nosentence}, \optvalue{OnlyParagraph}}
-% \changes{v0.7}{2013/11/04}{usage of renewed interface with
-% \cs{FamilyKeyState}}
-% \changes{v0.9a}{2015/03/09}{internal value storage}
-% \begin{option}{parcitename,sentencecitename}
-% \changes{v0.5d}{2010/06/07}{deprecated}
-% The formatting of the references of paragraphs and sentences. There are a
-% long a short and a numeric form.
-% \begin{macro}{\parcite@format,\sentencecite@format}
-% Default is the long form. Corresponding values of the two helper macros are:
-% 0 = long, 1 = short, 2 = numerical, -1 = nothing.
-% \begin{macrocode}
-%<*options>
-\newcommand*{\parcite@format}{0}
-\newcommand*{\sentencecite@format}{0}
-% \end{macrocode}
-% \end{macro}
-% The options can be used to change the default.
-% \begin{macrocode}
-\KOMA@key{ref}{%
- \begingroup
- \KOMA@set@ncmdkey{ref}{@tempa}{%
- {parlong}{1},{longpar}{1},{ParL}{1},%
- {parshort}{2},{shortpar}{2},{ParS}{2},%
- {parnumeric}{3},{numericpar}{3},{ParN}{3},%
- {paroff}{4},{nopar}{4},%
- {sentencelong}{10},{longsentence}{10},{SentenceL}{10},%
- {sentenceshort}{20},{shortsentence}{20},{SentenceS}{20},%
- {sentencenumeric}{30},{numericsentence}{30},{SentenceN}{30},%
- {sentenceoff}{40},{nosentence}{40},%
- {long}{11},%
- {short}{22},%
- {numeric}{33},%
- {paragraphonly}{44},{onlyparagraph}{44},%
- {ParagraphOnly}{44},{OnlyParagraph}{44}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \aftergroup\FamilyKeyStateProcessed
- \@tempcnta=\@tempa\relax
- \@tempcntb=\z@
- \@whilenum \@tempcnta>9 \do{%
- \advance\@tempcnta -10\relax
- \advance\@tempcntb \@ne\relax
- }%
- \ifcase \@tempcnta
- \or
- \aftergroup\def\aftergroup\parcite@format
- \aftergroup{\aftergroup0\aftergroup}%
- \or
- \aftergroup\def\aftergroup\parcite@format
- \aftergroup{\aftergroup1\aftergroup}%
- \or
- \aftergroup\def\aftergroup\parcite@format
- \aftergroup{\aftergroup2\aftergroup}%
- \or
- \aftergroup\def\aftergroup\parcite@format
- \aftergroup{\aftergroup-\aftergroup1\aftergroup}%
- \fi
- \ifcase \@tempcntb
- \or
- \aftergroup\def\aftergroup\sentencecite@format
- \aftergroup{\aftergroup0\aftergroup}%
- \or
- \aftergroup\def\aftergroup\sentencecite@format
- \aftergroup{\aftergroup1\aftergroup}%
- \or
- \aftergroup\def\aftergroup\sentencecite@format
- \aftergroup{\aftergroup2\aftergroup}%
- \or
- \aftergroup\def\aftergroup\sentencecite@format
- \aftergroup{\aftergroup-\aftergroup1\aftergroup}%
- \fi
- \else
- \aftergroup\FamilyKeyStateUnknownValue
- \fi
- \endgroup
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@removekey{.scrjura.sty}{ref}%
- \ifcase\parcite@format
- \KOMA@kav@add{.scrjura.sty}{ref}{parlong}%
- \or
- \KOMA@kav@add{.scrjura.sty}{ref}{parshort}%
- \or
- \KOMA@kav@add{.scrjura.sty}{ref}{parnumeric}%
- \or
- \KOMAQkav@add{.scrjura.sty}{ref}{paroff}%
- \fi
- \ifcase\sentencecite@format
- \KOMA@kav@add{.scrjura.sty}{ref}{sentencelong}%
- \or
- \KOMA@kav@add{.scrjura.sty}{ref}{sentenceshort}%
- \or
- \KOMA@kav@add{.scrjura.sty}{ref}{sentencenumeric}%
- \or
- \KOMA@kav@add{.scrjura.sty}{ref}{sentenceoff}%
- \fi
- \fi
-}
-\KOMA@kav@add{.scrjura.sty}{ref}{parlong}%
-\KOMA@kav@add{.scrjura.sty}{ref}{sentencelong}%
-\KOMA@DeclareDeprecatedOption[scrjura]{parcitename}{ref=parlong}
-\KOMA@DeclareDeprecatedOption[scrjura]{sentencecitename}{ref=sentencelong}
-%</options>
-% \end{macrocode}
-% \end{option}
-% \end{option}
-%
-% Execute the options.
-% \begin{macrocode}
-%<*postoptions>
-\KOMAProcessOptions\relax
-%</postoptions>
-% \end{macrocode}
-%
-% \subsection{Deprecated paragraph commands}
-%
-% All these commands are deprecated and now generate error messages instead of
-% code.
-%
-% \begin{command}{\Paragraph,\SubParagraph,\refParagraph,\refParagraphN,
-% \DeprecatedParagraph,\ParagraphCompatibilityHacks}
-% \changes{1.0}{2014/11/22}{throw error for deprecated commands but only once}
-% \begin{macrocode}
-%<*body>
-\providecommand*{\DeprecatedParagraph}{%
- \PackageError{scrjura}{modification of old document needed}{%
- It seem that this document was made for scrjura up to version
- 0.7a.\MessageBreak
- Since scrjura version 0.9 \string\Paragraph, \string\SubParagraph, and all
- depending\MessageBreak
- commands, options, and counters have been renamed.\MessageBreak
- You should replace the terms `Paragraph' and `paragraph` by `Clause`
- and\MessageBreak
- `clause` if they are part of the name of a scrjura feature, otherwise
- this\MessageBreak
- document may produce severall additional error messages and maybe the
- wrong\MessageBreak
- result. Sorry for the inconvenience.%
- }%
- \ParagraphCompatibilityHacks
-}
-\newcommand*{\ParagraphCompatibilityHacks}{%
- \PackageWarning{scrjura}{compatibility hacks for `\string\Paragraph'
- executed.\MessageBreak
- There is no support for documents using these hacks!\MessageBreak
- There is no warranty for real compatibility!\MessageBreak
- Even if the LaTeX run of the document doesn't report\MessageBreak
- any error, the result may be completely wrong.\MessageBreak
- Therefore it is recommended to solve the problem,\MessageBreak
- instead of trying to work around using the\MessageBreak
- compatibility hacks%
- }%
- \gdef\Paragraph{\Clause}%
- \gdef\SubParagraph{\SubClause}%
- \gdef\c@Paragraph{\c@Clause}%
- \gdef\cl@Paragraph{\cl@Clause}%
- \gdef\c@SubParagraph{\c@SubClause}%
- \gdef\cl@SubParagraph{\cl@SubClause}%
- \gdef\theParagraph{\theClause}%
- \gdef\theSubParagraph{\theSubClause}%
- \gdef\refParagraph{\refClause}%
- \gdef\refParagraphN{\refClauseN}%
- \aliaskomafont{Paragraph}{Clause}%
- \scr@ifundefinedorrelax{Paragraphmark}{}{%
- \global\let\Clausemark\Paragraphmark
- }%
-}
-\providecommand*{\Paragraph}{\DeprecatedParagraph\Paragraph}
-\providecommand*{\SubParagraph}{\DeprecatedParagraph\SubParagraph}
-\providecommand*{\refParagraph}{\DeprecatedParagraph\refParagraph}
-\providecommand*{\refParagraphN}{\DeprecatedParagraph\refParagraphN}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{Contracts, clauses, paragraphs and sentences}
-%
-%
-% \begin{macro}{\scrjura@env@type}
-% \changes{v0.5d}{2010/04/28}{new}
-% \changes{v0.7b}{2014/11/03}{renamed}
-% This macro shows the currently active \pkg*{scrjura} environment.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\scrjura@env@type}{}
-%</body>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{command}{\ellipsispar}
-% \changes{v0.7}{2013/05/02}{new}
-% \changes{v0.7b}{2014/11/03}{\cs{thecontractAbsoluteClause} made more
-% flexible}
-% \changes{v0.9g}{2016/03/25}{write to \file{aux}-file only \cs{if@filesw}}
-% \begin{command}{\parellipsis}
-% \changes{v0.7}{2013/05/02}{new}
-% Count one or more paragraphs given by the optional argument but print
-% \cs{parellipsis} instead of a real paragraph. The default is either
-% \cs{dots} or \cs{textellipsis} if available.
-% \changes{v0.7}{2013/05/02}{new}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\ellipsispar}[1][1]{%
- \begingroup
- \KOMAoptions{parnumber=manual}\parellipsis\par
- \addtocounter{par}{#1}%
- \if@filesw
- \protected@write\@auxout{}{%
- \string\newmaxpar{\scrjura@env@type}%
- {\csname the\scrjura@env@type
- AbsoluteClause\endcsname}%
- {\thepar}%
- }%
- \fi
- \endgroup
- \addtocounter{par}{-1}\refstepcounter{par}%
- \ignorespaces
-}
-\newcommand*{\parellipsis}{%
- \scr@ifundefinedorrelax{textellipsis}{\dots}{\textellipsis}%
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-% \begin{environment}{contract}
-% \changes{v0.5d}{2010/04/28}{missing error message added}
-% \changes{v0.5d}{2010/04/28}{not self-redefining any more}
-% \changes{v0.5d}{2010/04/28}{defining \cs{jura@env@type}}
-% \changes{v3.36}{2022/01/25}{defining an environment (because of hooks)}
-% \begin{counter}{contractClause}
-% \begin{command}{\thecontractClause}
-% \changes{v0.9b}{2015/05/01}{must use counter \cnt{Clause} instead of
-% \cnt{contractClause}}
-% \begin{macro}{\contract@Clauseformat}
-% \begin{command}{\Clauseformat,\paragraphformat}
-% \changes{v0.6b}{2013/04/16}{redefinition of \cs{paragraphformat}}
-% \begin{counter}{contractSubClause}
-% \changes{v0.9b}{2015/05/01}{must use counter \cnt{SubClause} instead of
-% \cnt{contractSubClause}}
-% \begin{command}{\thecontractSubClause}
-% \begin{counter}{contractAbsoluteClause}
-% \changes{v0.7}{2013/04/18}{new (internal) counter for all clauses to make
-% it possible to reset the users clause counter}
-% It is not allowed to nest the \env{contract} environments, but you can end
-% them and start them new. But this would not end the contract and start a new
-% contract but only delay it for some other code.
-% \begin{macrocode}
-%<*body>
-\newenvironment{contract}{%
- \ifx\scrjura@env@type\@empty
- \let\@doendpe\scrjura@doendpe
- \let\Clause\contract@paragraph
- \let\c@Clause\c@contractClause
- \edef\cl@Clause{\cl@Clause\cl@contractClause}%
- \let\SubClause\contract@subparagraph
- \let\c@SubClause\c@contractSubClause
- \edef\cl@SubClause{\cl@SubClause\cl@contractSubClause}%
- \let\Sentence\contract@sentence
- \renewcommand*{\scrjura@env@type}{contract}%
- \aliaskomafont{Clause}{contract.Clause}%
- \else
- \PackageError{scrjura}{nested `contract` detected}{%
- You may not use a `contract' environment inside\MessageBreak
- a `\scrjura@env@type' environment or after loading\MessageBreak
- package `scrjura' with option `\scrjura@env@type'!}%
- \fi
-}{}
-\let\if@scrjura@skiphyperref\iftrue
-\let\cl@Clause\@empty
-\let\cl@SubClause\@empty
-\newcounter{contractClause}
-\renewcommand*{\thecontractClause}{%
- {\contract@Clauseformat{\arabic{Clause}}}}
-\DeclareRobustCommand*{\contract@Clauseformat}[1]{\Clauseformat{#1}}
-\newcommand*{\Clauseformat}[1]{\S~#1}
-\newcounter{contractSubClause}
-\@addtoreset{SubClause}{Clause}
-\renewcommand*{\thecontractSubClause}{%
- {\theClause\alph{SubClause}}}
-\newcounter{contractAbsoluteClause}
-%</body>
-% \end{macrocode}
-% \end{counter}
-% \end{command}
-% \end{counter}
-% \end{command}
-% \end{macro}
-% \end{command}
-% \end{counter}
-% \end{environment}
-%
-% \begin{command}{\DeclareNewJuraEnvironment}
-% \changes{v0.9}{2014/11/12}{new}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% Using \cs{@defjuraenvironment} to define a new juristic environment. This
-% can be done only in document preamble.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\DeclareNewJuraEnvironment}[1]{%
- \@ifundefined{#1}{\expandafter\let\csname #1\expandafter\endcsname
- \csname end#1\endcsname}{}%
- \@ifundefined{#1}{\let\reserved@defjuraenvironment\@defjuraenvironment}{%
- \PackageError{scrjura}{ignorring declaration of `#1'}{%
- You've tried to declare jura environment `#1', but
- environment\MessageBreak
- `#1' or command
- \expandafter\string\csname #1\endcsname\space or
- \expandafter\string\csname end#1\endcsname\MessageBreak
- already exists.\MessageBreak
- Declaration will be ignored}%
- \long\def\reserved@defjuraenvironment##1[##2]##3##4{}%
- }%
- \kernel@ifnextchar [%]
- {\reserved@defjuraenvironment{#1}}{\reserved@defjuraenvironment{#1}[]}%
-}
-\@onlypreamble\DeclareNewJuraEnvironment
-% \end{macrocode}
-% \begin{macro}{\@defjuraenvironment}
-% \changes{v0.9}{2014/11/04}{new}
-% \changes{v3.25}{2017/12/08}{new command options \opt{ClauseFont}}
-% \changes{v3.25}{2017/12/08}{\cs{reserved@defjuraenvironment} set back to
-% \cs{relax}}
-% \changes{v3.25}{2017/12/08}{using local instead of global command options}
-% This command is used to define a new \pkg*{scrjura} environment like
-% \env{contract}. Several options are provided (see the user manual for
-% details).
-% \begin{macrocode}
-\DefineFamily{KOMAarg}
-\DefineFamilyMember{KOMAarg}
-\newcommand{\@defjuraenvironment}{}
-\long\def\@defjuraenvironment#1[#2]#3#4{%
- \let\reserved@defjuraenvironment\relax
-% \end{macrocode}
-% The counters:
-% \begin{macrocode}
- \newcounter{#1Clause}%
- \newcounter{#1AbsoluteClause}%
- \newcounter{#1SubClause}%
- \FamilyCSKey[.scrjura.sty]{KOMAarg}{Clause}{#1@Clause}%
- \FamilyCSKey[.scrjura.sty]{KOMAarg}{SubClause}{#1@SubClause}%
- \FamilyCSKey[.scrjura.sty]{KOMAarg}{Sentence}{#1@Sentence}%
- \DefineFamilyKey[.scrjura.sty]{KOMAarg}{ClauseNumberFormat}{%
- \expandafter\def\csname #1@Clauseformat \endcsname####1{##1{####1}}%
- \expandafter\edef\csname #1@Clauseformat\endcsname{%
- \noexpand\protect\expandafter\noexpand\csname #1@Clauseformat \endcsname
- }%
- \FamilyKeyStateProcessed
- }
- \DefineFamilyKey[.scrjura.sty]{KOMAarg}{ClauseFont}{%
- \IfExistskomafont{#1.Clause}{%
- \IfIsAliaskomafont{#1.Clause}{%
- \expandafter\let\csname scr@fnt@instead@#1.Clause\endcsname\relax
- \newkomafont{#1.Clause}{##1}%
- }{\setkomafont{#1.Clause}{##1}}%
- }{%
- \newkomafont{#1.Clause}{##1}%
- }%
- }
- \FamilyExecuteOptions[.scrjura.sty]{KOMAarg}{#2}%
- \RelaxFamilyKey[.scrjura.sty]{KOMAarg}{ClauseFont}%
- \RelaxFamilyKey[.scrjura.sty]{KOMAarg}{ClauseNumberFormat}%
- \RelaxFamilyKey[.scrjura.sty]{KOMAarg}{Sentence}%
- \RelaxFamilyKey[.scrjura.sty]{KOMAarg}{SubClause}%
- \RelaxFamilyKey[.scrjura.sty]{KOMAarg}{Clause}%
- \@ifundefined{#1@Clauseformat}{%
- \expandafter\DeclareRobustCommand\expandafter*%
- \csname #1@Clauseformat\endcsname[1]{\Clauseformat{##1}}%
- }{}%
-% \end{macrocode}
-% \changes{v0.9c}{2015/05/13}{defining \cs{the\dots Clause}}
-% \changes{v0.9f}{2016/02/24}{\cs{protect}\cs{\@nameuse} instead of
-% \cs{csname}\dots\cs{endcsname}}
-% \begin{macrocode}
- \expandafter\renewcommand\expandafter*\csname the#1Clause\endcsname{%
- \protect\@nameuse{#1@Clauseformat}{\arabic{#1Clause}}}%
-% \end{macrocode}
-% Environment:
-% \begin{macrocode}
- \newenvironment{#1}{%
- \par
- \ifx\scrjura@env@type\@empty
- \edef\scrjura@env@type{#1}%
- \let\@doendpe\scrjura@doendpe
- \expandafter\let\expandafter\c@Clause\csname c@#1Clause\endcsname
- \edef\cl@Clause{\cl@Clause\csname cl@#1Clause\endcsname}%
- \expandafter\let\expandafter\c@SubClause
- \csname c@#1SubClause\endcsname
- \edef\cl@SubClause{\cl@SubClause
- \csname cl@#1SubClause\endcsname}%
- \@ifundefined{#1@Clause}{%
- \let\Clause\contract@paragraph
- }{%
- \expandafter\let\expandafter\Clause
- \csname #1@Clause\endcsname
- }%
- \@ifundefined{#1@SubClause}{%
- \let\SubClause\contract@subparagraph
- }{%
- \expandafter\let\expandafter\SubClause
- \csname #1@SubClause\endcsname
- }%
- \@ifundefined{#1@Sentence}{%
- \let\Sentence\contract@sentence
- }{%
- \expandafter\let\expandafter\Sentence\csname #1@Sentence\endcsname
- }%
- \@ifundefined{\scrjura@env@type @everypar}{%
- \expandafter\let
- \csname \scrjura@env@type @everypar\endcsname
- \contract@everypar
- }{}%
-% \end{macrocode}
-% Font alias for \fnt{Clause}. If neither a font not an alias is defined for
-% the new environment \fnt{contract.Clause} is used.
-% \changes{v3.25}{2017/12/08}{Font alias fixed}
-% \begin{macrocode}
- \IfExistskomafont{#1.Clause}{%
- \IfIsAliaskomafont{#1.Clause}{%
- \aliaskomafont{Clause}{\csname scr@fnt@instead@#1.Clause\endcsname}%
- }{%
- \aliaskomafont{Clause}{#1.Clause}%
- }%
- }{%
- \aliaskomafont{Clause}{contract.Clause}%
- }%
- #3%
- \else
- \PackageError{scrjura}{nested scrjura environments detected}{%
- You must not use a `#1' environment inside\MessageBreak
- a `\scrjura@env@type' environment or after loading\MessageBreak
- package `scrjura' with option `\scrjura@env@type'!}%
- \fi
- }{%
- #4%
- \par
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}%^^A \@dewjuraenvironment
-% \end{command}%^^A \DeclareNewJuraEnvironment
-%
-% \begin{macro}{\contract@paragraph}
-% This is the \cs{Clause} used by contracts. A contract consists (usually) of
-% several clauses. Each clause has optional elements managed by
-% \meta{key}=\meta{value} pairs handled by \pkg*{scrkbase} and last but not
-% least by \pkg{keyval}.
-% \begin{option}{title,head,nohead}
-% \begin{option}{entry,noentry}
-% \changes{v0.6}{2011/09/30}{deprecated}
-% \begin{option}{tocentry,notocentry}
-% \changes{v0.6}{2011/09/30}{new}
-% Title, running head and toc entry of the clause. The title is the default
-% for running head and toc entry. But you can also use an empty value for
-% each of them or use the \opt{no\dots} options to switch them off.
-% \begin{macrocode}
-%<*body>
-\define@key{contract}{title}{%
- \def\contract@title{#1}%
- \ifx\contract@entry\relax\def\contract@entry{\contract@title}\fi
- \ifx\contract@head\relax\def\contract@head{\contract@title}\fi
-}
-\define@key{contract}{entry}{%
- \PackageWarning{scrjura}{deprecated option `entry'.\MessageBreak
- You should use option `tocentry' instead of\MessageBreak
- option `entry'%
- }%
- \def\contract@entry{#1}}
-\define@key{contract}{tocentry}{\def\contract@entry{#1}}
-\define@key{contract}{noentry}[]{%
- \PackageWarning{scrjura}{deprecated option `noentry'.\MessageBreak
- You should use option `notocentry' instead of\MessageBreak
- option `noentry'%
- }%
- \let\contract@entry\relax}
-\define@key{contract}{notocentry}[]{\let\contract@entry\relax}
-\define@key{contract}{head}{\def\contract@head{#1}}
-\define@key{contract}{nohead}[]{\let\contract@head\relax}
-% \end{macrocode}
-% \end{option}
-% \end{option}
-% \end{option}
-% \begin{option}{number}
-% The number can be changed manually. But clauses without numbers are not
-% allowed. So if you use an empty value, the number is automatically set.
-% \begin{macrocode}
-\define@key{contract}{number}{\def\contract@number{#1}}
-% \end{macrocode}
-% \end{option}
-% \begin{macro}{\contract@preskip,\contract@postskip}
-% \begin{option}{preskip,postskip}
-% The options are used to specify the distance before and after the
-% clause. The preset value of these options are the global settings done by
-% |\setkeys{contract}{…}|.
-% \begin{macrocode}
-\newcommand*{\contract@preskip}{2\baselineskip}
-\newcommand*{\contract@postskip}{\baselineskip}
-\define@key{contract}{preskip}{\def\contract@preskip{#1}}
-\define@key{contract}{postskip}{\def\contract@postskip{#1}}
-% \end{macrocode}
-% \end{option}
-% \end{macro}
-% \begin{option}{dummy}
-% The option switches the boolean \cs{ifcontract@dummy}.
-% \begin{macro}{\ifcontract@dummy}
-% If the boolean is \cs{iftrue} the clause will not be printed. But note: you
-% cannot use this to remove the paragraphs or sentences of the clause. But you
-% can use this option to generate holes in the numbering without manually
-% manipulating the counters.
-% \begin{macrocode}
-\newif\ifcontract@dummy
-\define@key{contract}{dummy}[true]{\csname contract@dummy#1\endcsname}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-% \begin{fontelement}{contract.Clause}
-% \begin{macro}{\contract@paragraph@font}
-% \changes{v3.25}{2017/12/08}{using element \fnt{Clause} instead of
-% \fnt{contract.Clause}}
-% Correctly this macro should be named \cs{contract@paragraph@format}. But it
-% is already used by some users for ugly tricks. So I will not rename it to
-% avoid problems for existing documents. Additionally it would be better to
-% use a new macro per environment. However the same reason not to change this.
-% \begin{macrocode}
-\newkomafont{contract.Clause}{\sffamily\bfseries\large}
-\newcommand*{\contract@paragraph@font}{\usekomafont{Clause}%
- \@hangfrom}
-% \end{macrocode}
-% \end{macro}
-% \end{fontelement}
-% \begin{counter}{@AbsClause}
-% \begin{macro}{\theH@AbsClause}
-% \begin{command}{\theHClause,\theHSubClause}
-% \begin{macrocode}
-% Here we have some not good tested code for \pkg{hyperref}.
-\newcounter{@AbsClause}
-\newcommand*{\theH@AbsClause}{P-\arabic{@AbsClause}}
-\newcommand*{\theHClause}{\theH@AbsClause}
-\newcommand*{\theHSubClause}{\theH@AbsClause}
-% \end{macrocode}
-% \end{command}
-% \end{macro}
-% \end{counter}
-% For the headings we use manual paragraph numbering, because we don't want
-% any paragraph numbering inside the heading. After initializing the options
-% they are processed.
-% \changes{v0.7}{2013/04/18}{increase counter \cnt{contractAbsoluteClause}}
-% \changes{v0.7b}{2014/11/03}{more flexible
-% \cnt{\meta{environment}AbsoluteClause}}
-% \begin{macrocode}
-\newcommand*{\contract@paragraph}[1]{%
- \stepcounter{\scrjura@env@type AbsoluteClause}%
- \ManualPar\parnumbertrue
- \let\contract@title\relax
- \let\contract@entry\relax
- \let\contract@head\relax
- \let\contract@number\relax
- \contract@dummyfalse
- \ifx\relax#1\relax\else\setkeys{contract}{#1}\fi
-% \end{macrocode}
-% Unless this is a dummy clause, the headings will be initialized and vertical
-% skips will be done.
-% \changes{v0.6a}{2012/10/08}{missing \cs{par} added}
-% \begin{macrocode}
- \ifcontract@dummy\else
- \par
- \@afterindentfalse
- \addvspace{\contract@preskip}%
- \fi
-% \end{macrocode}
-% If there isn't a manual number, we use the next number. If there is a manual
-% number, this number is printed and we take care that labels and
-% \pkg{hyperref} also use the manual number.
-% \changes{v0.6b}{2013/04/16}{using \cs{contract@Clauseformat} for manual
-% numbers too}
-% \changes{v0.9c}{2015/05/13}{\cs{thecontractClause} replaced by
-% environment-dependent macro}
-% \begin{macrocode}
- \ifx\contract@number\relax
- \let\p@Clause\@empty
- \expandafter\let\expandafter\theClause
- \csname the\scrjura@env@type Clause\endcsname
- \refstepcounter{Clause}%
- \else
- \begingroup
- \let\@elt\@stpelt
- \cl@Clause
- \endgroup
-% \end{macrocode}
-% \changes{v0.9f}{2016/02/24}{\cs{protect}\cs{\@nameuse} instead of
-% \cs{csname}\dots\cs{endcsname}}
-% \begin{macrocode}
- \protected@edef\theClause{%
- \protect\@nameuse{\scrjura@env@type @Clauseformat}{\contract@number}%
- }%
- \protected@edef\@currentlabel{\theClause}%
- \fi
- \stepcounter{@AbsClause}%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname if@skiphyperref\endcsname\relax
- \else
- \expandafter\let\csname if@scrjura@skiphyperref\expandafter\endcsname
- \csname if@skiphyperref\endcsname
- \fi
- \if@scrjura@skiphyperref\else
- \hyper@refstepcounter{@AbsClause}%
- \typeout{absolute Nummer: \the@AbsClause^^JLabel: `\@currentHref'}%
- \fi
-% \end{macrocode}
-% For simplification we use the code of clauses for sub-clauses.
-% \begin{macrocode}
- \let\theSubClause\theClause
-% \end{macrocode}
-% Unless for dummy clauses, the heading is printed, the toc entry is done
-% and also the running head.
-% \changes{v0.7}{2013/04/28}{distance behind the number is part of the number}
-% \changes{v0.9i}{2017/02/23}{usage of \cs{ext@toc}}
-% \begin{macrocode}
- \ifcontract@dummy\else
- \begingroup
- \if@juratitlepagebreak\else\interlinepenalty\@M\fi
- \contract@paragraph@font{\theClause
- \ifx\contract@title\relax\else\enskip\fi}%
- \contract@title
- \ifx\contract@entry\relax\else
- \expandafter\addxcontentsline\expandafter{\ext@toc}%
- {cpar}[\theClause]\contract@entry
- \addxcontentsline{cpa}{cpar}[\theClause]\contract@entry
- \fi
- \ifx\contract@head\relax\else
- \expandafter\Clausemark\expandafter{%
- \expandafter\theSubClause\expandafter\enskip\contract@head}%
- \fi
- \par
- \endgroup\nobreak\vskip\contract@postskip
-% \end{macrocode}
-% Last but not least paragraph numbering is initialized.
-% \begin{macrocode}
- \scrjura@afterheading
- \fi
-}
-%</body>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\contract@subparagraph}
-% \changes{v0.6a}{2012/10/08}{fehlendes \cs{par} ergänzt}%^^A
-% \changes{v0.7}{2013/04/18}{Zähler \texttt{contractAbsoluteClause} wird
-% erhöht}%^^A
-% \changes{v0.7}{2013/04/28}{Abstand nach der Nummer als Bestandteil der
-% Nummer setzen}%^^A
-% \changes{v0.9i}{2017/02/23}{Verwendung von \cs{ext@toc}}%^^A
-% Das entspricht bis auf wenige Kleinigkeiten, die Unterparagraphen betreffen,
-% |\contract@paragraph|
-% \begin{macrocode}
-%<*body>
-\newcommand*{\contract@subparagraph}[1]{%
- \stepcounter{\scrjura@env@type AbsoluteClause}%
- \ManualPar\parnumbertrue
- \let\contract@title\relax
- \let\contract@entry\relax
- \let\contract@head\relax
- \let\contract@number\relax
- \contract@dummyfalse
- \ifx\relax#1\relax\else\setkeys{contract}{#1}\fi
- \ifcontract@dummy\else
- \par
- \@afterindentfalse
- \vskip\contract@preskip
- \fi
- \ifx\contract@number\relax
- \let\p@SubClause\@empty
- \let\theSubClause\thecontractSubClause
- \refstepcounter{SubClause}%
- \else
- \begingroup
- \let\@elt\@stpelt
- \cl@SubClause
- \endgroup
- \protected@edef\theSubClause{\theClause\contract@number}%
- \protected@edef\@currentlabel{\theSubClause}%
- \fi
- \stepcounter{@AbsClause}%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname if@skiphyperref\endcsname\relax
- \else
- \expandafter\let\csname if@scrjura@skiphyperref\expandafter\endcsname
- \csname if@skiphyperref\endcsname
- \fi
- \if@scrjura@skiphyperref\else
- \hyper@refstepcounter{@AbsClause}%
- \typeout{absolute Nummer: \the@AbsClause^^JLabel: `\@currentHref'}%
- \fi
- \ifcontract@dummy\else
- \begingroup
- \if@juratitlepagebreak\else\interlinepenalty\@M\fi
- \contract@paragraph@font{\theSubClause
- \ifx\contract@title\relax\else\enskip\fi}%
- \contract@title
- \ifx\contract@entry\relax\else
- \expandafter\addxcontentsline\expandafter{\ext@toc}%
- {cpar}[\theSubClause]\contract@entry
- \addxcontentsline{cpa}{cpar}[\theSubClause]\contract@entry
- \fi
- \ifx\contract@head\relax\else
- \expandafter\Clausemark\expandafter{%
- \expandafter\theSubClause\expandafter\enskip\contract@head}%
- \fi
- \par
- \endgroup
- \nobreak\vskip\contract@postskip
- \scrjura@afterheading
- \fi
-}
-%</body>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\AutoPar,\ManualPar}
-% Switching between automatic or manual paragraph numbers for all
-% \pkg*{scrjura} environments.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\AutoPar}{%
- \expandafter\let\expandafter\scrjura@everypar
- \csname \scrjura@env@type @everypar\endcsname
-}
-\newcommand*{\ManualPar}{%
- \let\scrjura@everypar\relax
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macro}{\scrjura@afterheading,\jura@afterheading}
-% \changes{v0.7b}{2014/11/03}{\cs{jura@afterheading} renamed}
-% \changes{v0.7b}{2014/11/03}{no argument}
-% \changes{v3.27}{2019/02/25}{\cs{CheckCommand} for \cs{@afterheading}}
-% Similar to \cs{afterheading} but with automatic paragraph numbers.
-% \begin{description}
-% \item[ToDo:] Test if this can be done using \LaTeX{} hooks, depending on the
-% \LaTeX{} release.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\CheckCommand*{\@afterheading}{%
- \@nobreaktrue
- \everypar{%
- \if@nobreak
- \@nobreakfalse
- \clubpenalty \@M
- \if@afterindent \else
- {\setbox\z@\lastbox}%
- \fi
- \else
- \clubpenalty \@clubpenalty
- \everypar{}%
- \fi}%
-}
-\newcommand*{\scrjura@afterheading}{%
- \@nobreaktrue
- \everypar{%
- \if@nobreak
- \@nobreakfalse
- \clubpenalty \@M
- \if@afterindent \else
- {\setbox\z@\lastbox}%
- \fi
- \else
- \clubpenalty \@clubpenalty
- \everypar{%
- \scrjura@everypar
- }%
- \fi
- \scrjura@everypar
- }%
- \AutoPar
-}
-% \end{macrocode}
-% \begin{macro}{\scrjura@everypar,\jura@everypar}
-% \changes{v0.7b}{2014/11/03}{\cs{jura@everypar} renamed}
-% The macro to be used at the very beginning of every paragraph to add the
-% number. To be used only inside \pkg*{scrjura} environments, so empty outside.
-% \begin{macrocode}
-\newcommand*{\scrjura@everypar}{}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@doendpe}
-% \LaTeX{} used this macro, to reset all paragraph actions at the end of
-% environments. To avoid unwanted switching-off of the paragraph number it
-% will be reinitialized.
-% \begin{macro}{\scrjura@doendpe}
-% \begin{macro}{\IncludeInRelease}
-% \changes{v0.9e}{2015/11/03}{used temporary}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed into \cs{Ifstr}}
-% \begin{macro}{\@gobble@IncludeInRelease}
-% \changes{v0.9e}{2015/11/03}{used temporary}
-% \begin{macro}{\EndIncludeInRelease}
-% \changes{v0.9e}{2015/11/03}{used temporary}
-% From \LaTeX{} 2015/01/01 a different definition of \cs{@doendpe} is used. So
-% we also have to use different versions depending on the release. We do so
-% with some tricks. Maybe this should be replaced by usage of
-% \cs{IfLTXAtLeastTF} from already loaded \pkg*{scrbase}.
-% \begin{macrocode}
-\providecommand*{\IncludeInRelease}[3]{%
- \PackageInfo{scrjura}{temporary definition of \string\IncludeInRelease}%
- \Ifstr{#1}{0000/00/00}{%
- \let\IncludeInRelease\@undefined
- \def\EndIncludeInRelease{\let\EndIncludeInRelease\@undefined}%
- }{%
- \let\EndIncludeInRelease\relax
- \long\def\@gobble@IncludeInRelease##1\EndIncludeInRelease{%
- \let\@gobble@IncludeInRelease\@undefined
- }%
- \expandafter\@gobble@IncludeInRelease
- }%
-}
-\IncludeInRelease{2015/01/01}{\@doendpe}{clubpenalty fix}
-\CheckCommand*\@doendpe{\@endpetrue
- \def\par{\@restorepar
- \clubpenalty\@clubpenalty
- \everypar{}\par\@endpefalse}\everypar
- {{\setbox\z@\lastbox}%
- \everypar{}\@endpefalse}}
-\newcommand*{\scrjura@doendpe}{%
- \@endpetrue
- \def\par{%
- \@restorepar
- \clubpenalty\@clubpenalty
- \everypar{%
- \csname scrjura@everypar\endcsname
- }%
- \par\@endpefalse
- }%
- \everypar{%
- {\setbox\z@\lastbox}\everypar{%
- \csname scrjura@everypar\endcsname
- }%
- \@endpefalse
- }%
-}
-\EndIncludeInRelease
-\IncludeInRelease{0000/00/00}{\@doendpe}{clubpenalty fix}
-\CheckCommand*\@doendpe{\@endpetrue
- \def\par{\@restorepar\everypar{}\par\@endpefalse}\everypar
- {{\setbox\z@\lastbox}\everypar{}\@endpefalse}}
-\newcommand*{\scrjura@doendpe}{%
- \@endpetrue
- \def\par{%
- \@restorepar\everypar{%
- \csname scrjura@everypar\endcsname
- }%
- \par\@endpefalse
- }%
- \everypar{%
- {\setbox\z@\lastbox}\everypar{%
- \csname scrjura@everypar\endcsname
- }%
- \@endpefalse
- }%
-}
-\EndIncludeInRelease
-%</body>
-% \end{macrocode}
-% \end{macro}%^^A \EndIncludeInRelease
-% \end{macro}%^^A \@gobble@IncludeInRelease
-% \end{macro}%^^A \IncludeInRelease
-% \end{macro}%^^A \scrjura@doendpe
-% \end{macro}%^^A \@doendpe
-% \end{macro}%^^A \scrjura@everypar
-%
-% \subsection{Entry to table of contents}
-% \begin{macro}{\l@cpar}
-% Toc entry of contract clauses.
-% \changes{v3.27}{2019/02/25}{usage of \pkg*{tocbasic}}
-% This is done using \pkg*{tocbasic}. The definition has to be part of the
-% initialization of the package, otherwise package options wouldn't be able to
-% change the setting.
-% \begin{macrocode}
-%<*init>
-\DeclareTOCStyleEntry[%
- indent=1.5em,
- numwidth=2em,
- level=\maxdimen
-]{default}{cpar}
-%</init>
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Numbering of paragraphs and sentences}
-%
-% \begin{macro}{\scrjura@separator,\jura@separator}
-% \changes{v0.7b}{2014/11/03}{\cs{jura@separator} renamed}
-% Used to make it possible to remove white spaces at the beginning or end.
-% \begin{macrocode}
-%<*body>
-\DeclareRobustCommand*{\scrjura@separator}[1]{#1}
-%</body>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\scrjura@usetype,\jura@usetype}
-% \changes{v0.5d}{2010/04/28}{new}
-% \changes{v0.7b}{2014/11/03}{\cs{jura@usetype} renamed}
-% By default it is robust but does only call \cs{scrjura@@usetype} with the
-% only argument.
-% \begin{macro}{\scrjura@@usetype,\jura@@usetype}
-% \changes{v0.5d}{2010/04/28}{new}
-% \changes{v0.7b}{2014/11/03}{\cs{jura@@usetype} renamed}
-% This second command is not robust and can easily be redefined. But by
-% default it also does nothing but eating the argument.
-% \begin{macrocode}
-%<*body>
-\DeclareRobustCommand*{\scrjura@usetype}[1]{\scrjura@@usetype{#1}}
-\newcommand*{\scrjura@@usetype}[1]{}
-%</body>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\contract@everypar}
-% The \cs{scrjura@everpar} used by contracts.
-% \begin{macro}{\ifparnumber,\parnumbertrue,\parnumberfalse}
-% \changes{v0.6}{2011/09/29}{moved the definition into the definition of the
-% option}
-% \begin{counter}{par}
-% \begin{command}{\thepar,\theHpar}
-% \begin{command}{\parformat}
-% \changes{v0.7}{2013/06/07}{new font element \fnt{parnumber}}
-% \begin{command}{\parformatseparation}
-% \changes{v0.9f}{2016/02/06}{new}
-% \begin{macro}{\p@par}
-% \changes{v0.5d}{2010/04/28}{added \cs{jura@usetype} with argument
-% \cs{jura@env@type}}
-% \begin{command}{\withoutparnumber}
-% \changes{v3.25}{2017/12/19}{new}
-% The boolean defines if paragraph numbers have to be used. If they are
-% deactivated also manual paragraph numbers are deactivated and the paragraphs
-% are not counted. Otherwise the paragraphs are numbered using \cs{thepar}. It
-% is important to reset the paragraph counter with every clause and
-% sub-clause. And for labels the parent object the clause has to be used.
-% \begin{macrocode}
-%<*body>
-\newcounter{par}
-\renewcommand*{\thepar}{\arabic{par}}
-\newcommand*{\theHpar}{\theH@AbsClause-\Roman{par}}
-\newcommand*{\parformat}{(\thepar)}
-\newcommand*{\parformatseparation}{\nobreakspace}
-\newkomafont{parnumber}{}
-\renewcommand*\p@par{{\scrjura@usetype{\scrjura@env@type}\theSubClause\scrjura@separator{\nobreakspace}}}
-\@addtoreset{par}{Clause}
-\@addtoreset{par}{SubClause}
-\newcommand*{\withoutparnumber}{}
-%</body>
-% \end{macrocode}
-% \end{command}
-% \end{macro}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{counter}
-% \end{macro}
-% \changes{v0.5c}{2010/04/26}{first argument of \cs{newmaxpar} and second
-% argument of \cs{getmaxpar} is \meta{contract} not \meta{contractpars}}
-% \changes{v0.5c}{2010/04/26}{\cs{contract@Clauseformat} expands while writing
-% to its own argument}
-% \changes{v0.7}{2013/04/18}{using counter \cnt{contractAbsoluteClause}}
-% \changes{v0.7}{2013/05/23}{initializing sentence number for manually
-% numbered paragraphs to 0 instead of 1, because first action of
-% \cs{Sentence} is increasing the number}
-% \changes{v0.7}{2013/05/23}{recognize paragraph number of \cs{thisparnumber}}
-% \changes{v0.7}{2013/06/06}{if paragraph numbers are not completely numerical
-% always set the number}
-% \changes{v0.7b}{2014/11/03}{more flexible replacement of
-% \cnt{contractAbsoluteClause}}
-% \changes{v0.9f}{2016/02/06}{\cs{nobreakspace} replaced by
-% \cs{parformatseparation}}
-% \changes{v0.9g}{2016/03/25}{writing to \file{aux}-file \cs{if@filesw}}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\contract@everypar}{%
- \ifparnumber
- \ifx\scrjura@special@par\relax
- \ifx\scrjura@special@reset@par\relax\else
- \global\let\thepar\scrjura@special@reset@par
- \global\let\scrjura@special@reset@par\relax
- \fi
- \refstepcounter{par}%
- \refstepcounter{sentence}%
- \else
- \ifx\scrjura@special@reset@par\relax
- \global\let\scrjura@special@reset@par\thepar
- \fi
- \global\let\thepar\scrjura@special@par
- \global\let\scrjura@special@par\relax
- \setcounter{sentence}{0}\refstepcounter{sentence}%
- \fi
- \begingroup
- \if@filesw
- \protected@write\@auxout{%
- \expandafter\let\csname \scrjura@env@type @Clauseformat\endcsname
- \@firstofone
- }{%
- \string\newmaxpar{\scrjura@env@type}%
- {\csname the\scrjura@env@type
- AbsoluteClause\endcsname}%
- {\thepar}%
- }%
- \fi
- \getmaxpar\@tempa{\scrjura@env@type}%
- {\csname the\scrjura@env@type AbsoluteClause\endcsname}%
- \typeout{Stored max is \@tempa}%
- \def\reserved@a##1\@nnil{\def\@tempa{##1}}%
- \afterassignment\reserved@a\@tempcnta=0\@tempa\relax\@nnil
- \ifnum \@tempcnta>\@ne
- {\usekomafont{parnumber}{\parformat\parformatseparation}}%
- \else
- \def\reserved@a{\relax}%
- \ifx\@tempa\reserved@a
- \withoutparnumber
- \else
- {\usekomafont{parnumber}{\parformat\parformatseparation}}%
- \fi
- \fi
- \endgroup
- \else
- \begingroup\withoutparnumber\endgroup
- \setcounter{sentence}{-1}\refstepcounter{sentence}%
- \fi
-}
-%</body>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\thisparnumber}
-% \changes{v0.7}{2013/05/23}{new}
-% \begin{macro}{\scrjura@special@par,\scrjura@special@reset@par}
-% \changes{v0.7}{2013/05/23}{new}
-% You can use this for manual paragraph numbering. But the number has to be
-% fully expandable!
-% \begin{macrocode}
-%<*body>
-\newcommand*{\thisparnumber}[1]{%
- \def\scrjura@special@par{#1}%
-}
-\newcommand*{\scrjura@special@par}{}
-\let\scrjura@special@par\relax
-\newcommand*{\scrjura@special@reset@par}{}
-\let\scrjura@special@reset@par\relax
-%</body>
-% \end{macrocode}
-% \end{macro}%^^A \scrjura@special@par
-% \end{command}%^^A\thisparnumber
-%
-%
-% \subsection{Referencing}
-%
-% \begin{command}{\refL}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\ref@L}
-% Similar to \cs{ref} but always the long form.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\refL}{\kernel@ifstar {\ref@L*}{\ref@L{}}}
-\newcommand*{\ref@L}[2]{%
- \begingroup
- \def\parcite@format{0}%
- \let\sentencecite@format\parcite@format
- \ref#1{#2}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\refS}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\ref@S}
-% Similar to \cs{ref} but always the short form.
-% \begin{macrocode}
-\newcommand*{\refS}{\kernel@ifstar {\ref@S*}{\ref@S{}}}
-\newcommand*{\ref@S}[2]{%
- \begingroup
- \def\parcite@format{1}%
- \let\sentencecite@format\parcite@format
- \ref#1{#2}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\refN}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\ref@N}
-% Similar to \cs{ref} but always the numerical form.
-% \begin{macrocode}
-\newcommand*{\refN}{\kernel@ifstar {\ref@N*}{\ref@N{}}}
-\newcommand*{\ref@N}[2]{%
- \begingroup
- \def\parcite@format{2}%
- \let\sentencecite@format\parcite@format
- \ref#1{#2}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\refClause}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\ref@Clause}
-% Reference only the clause of a clause, paragraph or sentence. For better
-% compatibility with \pkg{hyperref} there is also a star version if
-% \pkg{hyperref} is used. Without \pkg{hyperref} the star version is nonsense.
-% \begin{macrocode}
-\newcommand*{\refClause}{%
- \kernel@ifstar {\ref@Clause*}{\ref@Clause{}}
-}
-\newcommand*{\ref@Clause}[2]{%
- \expandafter\ifx\csname r@#2\endcsname\relax
- \ref#1{#2}%
- \else
- \begingroup
-% \end{macrocode}
-% Copy all parts of the reference but the first one to \cs{@tempb}.
-% \begin{macrocode}
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\def
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\@tempb
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter{%
- \expandafter\expandafter\expandafter\@gobble\csname r@#2\endcsname}%
-% \end{macrocode}
-% Copy the first part of the reference to \cs{@tempa}.
-% \begin{macrocode}
- \def\@tempc##1##2\@nil{##1}%
- \let\scrjura@separator\@gobble
- \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc
- \csname r@#2\endcsname\noexpand\@nil}%
-% \end{macrocode}
-% Copy the first part of \cs{@tempa} to \cs{@tempb}.
-% \begin{macrocode}
- \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc
- \@tempa\@nil}%
- \let\@@protect\protect
- \let\protect\noexpand
- \expandafter\edef\csname r@#2\endcsname{{\@tempa}\@tempb}%
- \let\protect\@@protect
- \ref#1{#2}%
- \endgroup
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\refClauseN}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\ref@ClauseN}
-% Reference only the clause number of a clause, a paragraph or a sentence.
-% For improved compatibility with \pkg{hyperref} there is also a star version
-% if \pkg{hyperref} is used. Without \pkg{hyperref} the star version is
-% nonsense.
-% \begin{macrocode}
-\newcommand*{\refClauseN}{%
- \kernel@ifstar {\ref@ClauseN*}{\ref@ClauseN{}}
-}
-\newcommand*{\ref@ClauseN}[2]{%
- \begingroup
- \let\Clauseformat\relax
- \ref@Clause{#1}{#2}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\refPar}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\ref@Par}
-% References only the paragraph of a paragraph or sentence.
-% For improved compatibility with \pkg{hyperref} there is also a star version
-% if \pkg{hyperref} is used. Without \pkg{hyperref} the star version is
-% nonsense.
-% \begin{macrocode}
-\newcommand*{\refPar}{%
- \kernel@ifstar {\ref@Par*}{\ref@Par{}}
-}
-\newcommand*{\ref@Par}[2]{%
- \expandafter\ifx\csname r@#2\endcsname\relax
- \ref#1{#2}%
- \else
- \begingroup
-% \end{macrocode}
-% Copy all parts of the reference but the first one to \cs{@tempb}.
-% \begin{macrocode}
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\def
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\@tempb
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter{%
- \expandafter\expandafter\expandafter\@gobble\csname r@#2\endcsname}%
-% \end{macrocode}
-% Copy the first part of the reference to \cs{@tempa}.
-% \begin{macrocode}
- \def\@tempc##1##2\@nil{##1}%
- \let\scrjura@separator\@gobble
- \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc
- \csname r@#2\endcsname\noexpand\@nil}%
-% \end{macrocode}
-% Copy the second part of \cs{@tempa} to \cs{@tempa} ablegen.
-% \begin{macrocode}
- \def\@tempc##1##2##3\@nil{##2}%
- \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc
- \@tempa{%
- \protect\G@refundefinedtrue
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference `#2' on page \thepage \space
- with undefined par number}%
- }\noexpand\@nil}%
- \let\@@protect\protect
- \let\protect\noexpand
- \expandafter\edef\csname r@#2\endcsname{{\@tempa}\@tempb}%
- \let\protect\@@protect
- \ref#1{#2}%
- \endgroup
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\refParL}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\ref@ParX}
-% The same but long.
-% \begin{macrocode}
-\newcommand*{\refParL}{%
- \kernel@ifstar {\ref@ParX0*}{\ref@ParX0{}}
-}
-\newcommand*{\ref@ParX}[3]{%
- \begingroup
- \def\parcite@format{#1}%
- \let\sentencecite@format\parcite@format
- \ref@Par{#2}{#3}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\refParS}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% The same but short.
-% \begin{macrocode}
-\newcommand*{\refParS}{%
- \kernel@ifstar {\ref@ParX1*}{\ref@ParX1{}}
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\refParN}
-% \begin{macro}{\ref@ParN}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\ref@@ParN}
-% The same but numerical.
-% \begin{macrocode}
-\newcommand*{\refParN}{%
- \kernel@ifstar {\ref@ParN2*}{\ref@ParN2{}}
-}
-\newcommand*{\ref@ParN}[2]{%
- \kernel@ifnextchar [%]
- {\ref@@ParN{#1}{#2}}%
- {\ref@ParX{#1}{#2}}%
-}
-\newcommand*{\ref@@ParN}{}
-\def\ref@@ParN#1#2[#3]#4{%
- \begingroup
- \renewcommand*{\parnumericformat}[1]{%
- \csname @#3\endcsname{\number ##1\relax}%
- }%
- \ref@ParX{#1}{#2}{#4}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\refSentence}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\ref@Sentence}
-% Reference only the sentence of a sentence.
-% For improved compatibility with \pkg{hyperref} there is also a star version
-% if \pkg{hyperref} is used. Without \pkg{hyperref} the star version is
-% nonsense.
-% \begin{macrocode}
-\newcommand*{\refSentence}{%
- \kernel@ifstar {\ref@Sentence*}{\ref@Sentence{}}
-}
-\newcommand*{\ref@Sentence}[2]{%
- \expandafter\ifx\csname r@#2\endcsname\relax
- \ref#1{#2}%
- \else
- \begingroup
-% \end{macrocode}
-% Copy all parts of the reference to \cs{@tempb}.
-% \begin{macrocode}
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\def
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\@tempb
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter{%
- \expandafter\expandafter\expandafter\@gobble\csname r@#2\endcsname}%
-% \end{macrocode}
-% Copy the first part of the reference to \cs{@tempa}.
-% \begin{macrocode}
- \def\@tempc##1##2\@nil{##1}%
- \let\scrjura@separator\@gobble
- \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc
- \csname r@#2\endcsname\noexpand\@nil}%
-% \end{macrocode}
-% Copy the third part of \cs{@tempa} to \cs{@tempa}.
-% \begin{macrocode}
- \def\@tempc##1##2##3##4\@nil{##3}%
- \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc
- \@tempa{}{%
- \protect\G@refundefinedtrue
- \nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference `#2' on page \thepage \space
- with undefined sentence number}%
- }\noexpand\@nil}%
- \let\@@protect\protect
- \let\protect\noexpand
- \expandafter\edef\csname r@#2\endcsname{{\@tempa}\@tempb}%
- \let\protect\@@protect
- \ref#1{#2}%
- \endgroup
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\refSentenceL}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\ref@SentenceX}
-% The same but long.
-% \begin{macrocode}
-\newcommand*{\refSentenceL}{%
- \kernel@ifstar {\ref@SentenceX0*}{\ref@SentenceX0{}}
-}
-\newcommand*{\ref@SentenceX}[3]{%
- \begingroup
- \def\parcite@format{#1}%
- \let\sentencecite@format\parcite@format
- \ref@Sentence{#2}{#3}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\refSentenceS}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% The same but short.
-% \begin{macrocode}
-\newcommand*{\refSentenceS}{%
- \kernel@ifstar {\ref@SentenceX1*}{\ref@SentenceX1{}}
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\refSentenceN}
-% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% The same but numeric.
-% \begin{macrocode}
-\newcommand*{\refSentenceN}{%
- \kernel@ifstar {\ref@SentenceX2*}{\ref@SentenceX2{}}
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macro}{\contract@sentence}
-% \changes{v0.7a}{2014/01/28}{using \cs{textsuperscript}}
-% \changes{v0.7a}{2014/01/28}{\cs{nobreak}\cs{hskip}\cs{z@} added to allow
-% hyphenation of the first word after the sentence mark}
-% Numbering of sentences.
-% \begin{counter}{sentence}
-% \begin{command}{\thesentence,\theHsentence}
-% \begin{macro}{\p@sentence}
-% \changes{v3.27}{2019/10/09}{adaption for \LaTeX{} 2019-10-01}
-% The counter is used for numbering the sentences. It is important to add the
-% paragraph as parent object to labels. The original method to make it
-% possible to use \cs{thesentence} as an argument of \cs{p@sentence} does not
-% work any longer using \LaTeX{} 2019-10-01 or newer. It would result in an
-% error message. So the code has to be adapted to the new definition of
-% \cs{refstepcounter} in \LaTeX{} 2019-10-01. From this version it uses
-% \cs{labelformat}. Don't ask me, what I think about the fact, that every new
-% versions of \LaTeX{} can break existing packages and package authors have to
-% find out such incompatibilities on their own.
-% \begin{macrocode}
-%<*body>
-\newcounter{sentence}[par]
-\renewcommand*{\thesentence}{\arabic{sentence}}
-\newcommand*{\theHsentence}{\theHpar-\arabic{sentence}}
-\scr@ifundefinedorrelax{labelformat}{%
- \renewcommand*{\p@sentence}{\expandafter\p@@sentence}
- \newcommand*{\p@@sentence}[1]{\p@par{{\par@cite{\thepar}}%
- \scrjura@separator{\nobreakspace}}{\sentence@cite{#1}}}%
-}{%
- \labelformat{sentence}{\p@par{{\par@cite{\thepar}}%
- \scrjura@separator{\nobreakspace}}{\sentence@cite{#1}}}%
-}
-\newcommand*{\contract@sentence}{%
-% \end{macrocode}
-% \changes{v0.9e}{2015/11/04}{first start the paragraph then print the number}
-% \changes{v3.26}{2018/07/20}{new font element \fnt{sentencenumber}}
-% \changes{v3.26}{2018/07/20}{new formatting \cs{sentencenumberformat}}
-% For the numbering it is important not to increase the paragraph number at
-% the very beginning, because the paragraph already does so. To make this
-% work, the paragraph has to start before we print the number. But immediately
-% after a \env{minipage}, a list or a \cs{parbox} we should behave as not
-% being at the beginning of a paragraph.
-% \begin{macrocode}
- \ifvmode
- \if@endpe
- \refstepcounter{sentence}%
- \else
- \leavevmode
- \fi
- \else
- \refstepcounter{sentence}%
- \fi
- {\usekomafont{sentencenumber}{\sentencenumberformat}}%
- \nobreak\hskip\z@
-}
-% \end{macrocode}
-% \begin{fontelement}{sentencenumber}
-% \begin{command}{\sentencenumberformat}
-% \changes{v3.26}{2018/07/20}{new}
-% Formatting an font can be changed using font element \fnt{sentencenumber}
-% and command \cs{sentencenumberformat}. The last has the preset
-% \cs{textsuperscript}.
-% \begin{macrocode}
-\newkomafont{sentencenumber}{}
-\newcommand*{\sentencenumberformat}{\textsuperscript{\thesentence}}
-%</body>
-% \end{macrocode}
-% \end{command}
-% \end{fontelement}
-% \end{macro}
-% \end{command}
-% \end{counter}
-% \end{macro}
-%
-% \begin{macro}{\par@cite}
-% \begin{command}{\parciteformat}
-% \changes{v0.5d}{2010/04/28}{argument moved}
-% Reference style for paragraphs.
-% \begin{macrocode}
-%<*body>
-\DeclareRobustCommand*{\par@cite}[1]{\parciteformat{#1}}
-\newcommand*{\parciteformat}[1]{%
- \ifcase \parcite@format
- \expandafter\parlongformat
- \or
- \expandafter\parshortformat
- \or
- \expandafter\parnumericformat
- \else
- \unskip\expandafter\@gobble
- \fi
- {#1}%
-}
-% \end{macrocode}
-% \end{command}
-% \end{macro}
-%
-% \begin{macro}{\sentence@cite}
-% \begin{command}{\sentenceciteformat}
-% \changes{v0.5d}{2010/04/28}{argument moved}
-% Reference style for sentences. Preset is \cs{@arabic}.
-% \begin{macrocode}
-\DeclareRobustCommand*{\sentence@cite}[1]{\sentenceciteformat{#1}}
-\newcommand*{\sentenceciteformat}[1]{%
- \ifcase \sentencecite@format
- \expandafter\sentencelongformat
- \or
- \expandafter\sentenceshortformat
- \or
- \expandafter\sentencenumericformat
- \else
- \unskip\expandafter\@gobble
- \fi
- {#1}%
-}
-% \end{macrocode}
-% \end{command}
-% \end{macro}
-%
-% \begin{command}{\parlongformat,\parshortformat,\parnumericformat,
-% \sentencelongformat,\sentenceshortformat,
-% \sentencenumericformat}
-% The six formattings.
-% \begin{macrocode}
-\newcommand*{\parlongformat}[1]{\parname~#1}
-\newcommand*{\parshortformat}[1]{\parshortname~#1}
-\newcommand*{\parnumericformat}[1]{\@Roman{\number #1\relax}}
-\newcommand*{\sentencelongformat}[1]{\sentencename~#1}
-\newcommand*{\sentenceshortformat}[1]{\sentenceshortname~#1}
-\newcommand*{\sentencenumericformat}[1]{\@arabic{\number #1\relax}.}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-% \subsection{Language dependent names}
-%
-% \begin{command}{\parname,\parshortname,\sentencename,\sentenceshortname}
-% \begin{macro}{\scrjura@lang@error}
-% \changes{v0.7}{2013/09/19}{Usage of \cs{PackageError} instead of
-% \cs{PackageErrorNoLine}}
-% \changes{v3.24}{2017/05/29}{adaption for language name bug in
-% \pkg{babel}~3.10}
-% The names of paragraphs and sentences and their short versions. The English
-% names are donated by ``m.eik''.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\parname}{Paragraph}
-\AtBeginDocument{%
- \providecaptionname{german,ngerman,austrian,naustrian}\parname{Absatz}%
- \providecaptionname{german,ngerman,austrian,naustrian}\parshortname{Abs.}%
- \providecaptionname{german,ngerman,austrian,naustrian}\sentencename{Satz}%
- \providecaptionname{german,ngerman,austrian,naustrian}\sentenceshortname{S.}%
- \providecaptionname{english,american,british,canadian,%
- USenglish,UKenglish,usenglish,ukenglish}\parname{paragraph}%
- \providecaptionname{english,american,british,canadian,%
- USenglish,UKenglish,usenglish,ukenglish}\parshortname{par.}%
- \providecaptionname{english,american,british,canadian,%
- USenglish,UKenglish,usenglish,ukenglish}\sentencename{sentence}%
- \providecaptionname{english,american,british,canadian,%
- USenglish,UKenglish,usenglish,ukenglish}\sentenceshortname{sent.}%
-}
-\providecommand*{\parname}{\scrjura@lang@error{\parname}}
-\providecommand*{\parshortname}{\scrjura@lang@error{\parshortname}}
-\providecommand*{\sentencename}{\scrjura@lang@error{\sentencename}}
-\providecommand*{\sentenceshortname}{\scrjura@lang@error{\sentenceshortname}}
-\newcommand*{\scrjura@lang@error}[1]{%
- \PackageError{scrjura}{%
- current language not supported%
- }{%
- Currently scrjura only supports languages `german', `ngerman',
- `austrian',\MessageBreak
- `naustrian', `english', `american', `british', `canadian',
- `USenglish',\MessageBreak
- `UKenglish', `usenglish`, and `ukenglish'.\MessageBreak
- It seems, that you are using another language (maybe `\languagename') or
- that\MessageBreak
- your language selection isn't compatible to package `babel'.\MessageBreak
- Because of this you have to define `\string#1' by yourself!\MessageBreak
- It would be nice if you'll send your definitions to the author.%
- }%
- \textbf{??}%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \subsection{Using values from last \LaTeX{} run}
-%
-% \begin{command}{\newmaxpar}
-% \changes{v0.6b}{2013/04/16}{\cs{\#1@Clauseformat} expands to its argument}
-% \begin{command}{\getmaxpar}
-% \changes{v0.6}{2011/09/30}{argument no 3 is expanded using
-% \cs{protected@edef}}
-% \changes{v0.5c}{2010/04/26}{\cs{protected@edef} replaced by \cs{edef}}
-% \changes{v0.5c}{2010/04/26}{\cs{\#2@Clauseformat} expands to its argument}
-% Two helper macros, to save a counter in a \file{aux}-file and get the value
-% back or another value of it is not in the \file{aux}-file.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\newmaxpar}[3]{%
- \begingroup
- \expandafter\let\csname #1@Clauseformat\endcsname\@firstofone
- \protected@edef\@tempa{#2}\@onelevel@sanitize\@tempa
- \expandafter\xdef\csname max@#1@\@tempa\endcsname{#3}%
- \endgroup
-}
-\newcommand*{\getmaxpar}[3]{%
- \begingroup
- \expandafter\let\csname #2@Clauseformat\endcsname\@firstofone
- \protected@edef\@tempa{#3}%
- \@onelevel@sanitize\@tempa
- \expandafter\ifx \csname max@#2@\@tempa\endcsname\relax
- \edef\@tempa{\endgroup\edef\noexpand#1{\expandafter\the\value{par}}}%
- \else
- \edef\@tempa{\endgroup
- \edef\noexpand#1{\csname max@#2@\@tempa\endcsname}}%
- \fi
- \@tempa
-}
-% \end{macrocode}
-% \changes{v0.7b}{2014/11/10}{added fallback code to \file{aux}-file}
-% \changes{v0.9g}{2015/03/25}{write to \file{aux}-file \cs{if@filesw}}
-% Because some users remove \pkg*{scrjura} from their documents without
-% deleting the \file{aux}-file, we add a fallback definition of \cs{newmaxpar}
-% to the \file{aux}-file. This avoids error messages because of undefined
-% \cs{newmaxpar}.
-% \begin{macrocode}
-\AtBeginDocument{%
- \if@filesw
- \immediate\write\@auxout{%
- \string\providecommand*\string\newmaxpar[3]{}
- }%
- \fi
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-% \iffalse
-%</package>
-% \fi
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-addressfiles.dtx b/macros/latex/contrib/koma-script/source/scrkernel-addressfiles.dtx
deleted file mode 100644
index 8cdaa70be6..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-addressfiles.dtx
+++ /dev/null
@@ -1,164 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-addressfiles.dtx
-% Copyright (c) Markus Kohm, 2006-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-addressfiles.dtx 3697 2022-02-11 09:48:02Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-11 10:48:02 +0100 (Fr, 11. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3697 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-addressfiles.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (circular letters)]%
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-addressfiles.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2006/03/22}{first version by splitting of \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/11}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/11}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-addressfiles.dtx}
-% \title{Circular Letters and Address Files as Part of
-% \href{https://komascript.de}{\KOMAScript} Class \cls*{scrlttr2} and
-% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrletter}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \filename{} is used to generate \cls*{scrlttr2} and \pkg*{scrletter}. It
-% provides features for handling address files with well defined address
-% data. This can be used to print circular letters from one master document.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation of the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of the Address File Feature}
-%
-% \begin{macrocode}
-%<*letter>
-% \end{macrocode}
-%
-% \subsection{Options}
-% We do not have any options for this feature
-%
-%
-% \subsection{Macros and commands for address files}
-%
-% \begin{command}{\adrentry}
-% \changes{v2.8q}{2002/05/19}{\cs{adrentry} uses new \cs{addrentry}}
-% \changes{v3.36}{2022/02/11}{deprecated}
-% \begin{command}{\addrentry}
-% \changes{v2.8n}{2001/09/06}{added}
-% The basic feature of \cs{addrentry} is to read nine arguments. The first
-% argument is interpreted as family name, the second as first name. The first
-% name is optional, the family name should be given. Alternatively the first
-% argument can be a company name or similar (and the second can be
-% empty). The third argument should be the postal address. Then a command with
-% the name of the ninth argument is defines, containing name and address as
-% expected by \cls*{scrlttr2}'s or \pkg*{scrletter}'s \env{letter}
-% environment. To be able to do so, only character sequence characters should
-% be used for argument number 9. For more information about the recommended
-% meaning of the other arguments, see one of the \KOMAScript{} manuals.
-% \cs{adrentry} is the former version of \cs{addrentry}. It does only have eight
-% argument. So it sets an empty argument number 8. This implementation does
-% read only seven arguments immediately. The last argument is read by
-% \cs{addrentry}.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\adrentry}[7]{%
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrletter}{%
- command `\string\adrentry' is deprecated.\MessageBreak
- You should use `\string\addrentry' with additional\MessageBreak
- empty 8th argument}%
- \addrentry{#1}{#2}{#3}{#4}{#5}{#6}{#7}{}}
-\newcommand*{\addrentry}[9]{\def\@tempa{#1}\ifx \@tempa\@empty \else
- \def\@tempa{#2}\ifx \@tempa\@empty
- \expandafter\def\csname #9\endcsname{#1\\#3}%
- \else
- \expandafter\def\csname #9\endcsname{#2 #1\\#3}%
- \fi \fi}
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-% \begin{command}{\adrchar}
-% \changes{v2.8q}{2002/05/19}{\cs{adrchar} used new \cs{addrchar}}
-% \changes{v3.36}{2022/02/11}{deprecated}
-% \begin{command}{\addrchar}
-% \changes{v2.8n}{2001/09/06}{added}
-% Address files should be organized in alphabetic order. To be able to
-% generate dictionaries or lists of the addresses, it is useful mark the
-% beginning of a new letter. We have \cs{addrchar} to do so. The argument is
-% the new letter, but ignored by the default implementation. The default of
-% deprecated \cs{adrchar} is to use \cs{addrchar}.
-% \begin{macrocode}
-\newcommand*{\adrchar}{%
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrletter}{%
- command `\string\adrchar' is deprecated.\MessageBreak
- You should use `\string\addrchar'}
- \addrchar}
-\newcommand*{\addrchar}[1]{}
-%</body>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-%
-% \begin{macrocode}
-%</letter>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-basics.dtx b/macros/latex/contrib/koma-script/source/scrkernel-basics.dtx
deleted file mode 100644
index 6c9a8c0302..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-basics.dtx
+++ /dev/null
@@ -1,5341 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-basics.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-basics.dtx 3773 2022-03-29 06:27:55Z kohm $
-%<prepare>%%% (run: prepare)
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<load>%%% (run: load)
-%<package&prepare>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\def\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-29 08:27:55 +0200 (Tue, 29 Mar 2022) $
- \def\filerevision$#1: #2 ${\def\filerevision{r#2}}
- \filerevision$Revision: 3773 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-basics.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script
- }
-\reserved@a
-%</dtx>
-%<*dtx|(package&prepare)>
-%<package>\ProvidesPackage{%
-%<package&base> scrbase%
-%<package&koma> scrkbase%
-%<package>}[%
-%!KOMAScriptVersion
- package
-%<*dtx>
- source
-%</dtx>
- (%
-%<base> KOMA-Script-independent
-%<koma> KOMA-Script-dependent
- basics and keyval usage)]
-%</dtx|(package&prepare)>
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2002}
- \generate{\usepreamble\defaultpreamble
- \file{scrbase.sty}{%
- \from{scrkernel-version.dtx}{package,scrbase}%
- \from{scrkernel-basics.dtx}{package,prepare,base}%
- \from{scrkernel-basics.dtx}{package,option,base}%
- \from{scrkernel-language.dtx}{package,option,base}%
- \from{scrkernel-basics.dtx}{package,body,base}%
- \from{scrkernel-language.dtx}{package,body,base}%
- \from{scrlogo.dtx}{logo}%
- }%
- }
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{hvlogos}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-basics.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v1.0}{2002/07/06}{starting implementation}
-% \changes{v3.12}{203/03/05}{usage of \cs{@tempa}, \cs{@tempb}, \cs{@tempc}
-% eliminated}
-% \changes{v3.36}{2022/02/16}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/21}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-basics.dtx}
-% \title{Basic Funktionality Used by Almost all
-% \href{https://komascript.de}{\KOMAScript} Classes and Packages}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% New versions of \KOMAScript{} make increasing use of the \pkg{keyval}
-% package. The \pkg{keyval} package is part of the \pkg{graphics} package
-% and as such must be included on all \TeX{} systems with \LaTeX{}. However,
-% it does not meet the requirements of \KOMAScript{} in some
-% respects. Therefore, extensions are made here which can be used by
-% \KOMAScript classes and \KOMAScript packages.
-%
-% In addition, more and more parts of \KOMAScript{} are used by more than
-% one package or by packages and classes. These basic things have therefore
-% been split into two packages, \pkg*{scrbase} (for things that can also be
-% used by other classes and packages) and \pkg*{scrkbase} (for things that
-% are reserved for \pkg*{scrkbase}). This makes the packages and classes
-% themselves smaller and they can still be used independently. Of course you
-% can also use this package without the rest of \KOMAScript{}.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation of package \pkg*{scrbase} and the
-% commands implemented in \file{scrkernel-basics.dtx} in the \KOMAScript{}
-% manual, either the German \file{scrguide} or the English \file{scrguien}.
-%
-%
-% \subsection{Functions not yet in the Manual}
-%
-% Some user commands are not documented in the \KOMAScript{} manuals, e.g.,
-% because they are not stable enough to be used by average users or more or
-% less for internal usage only. Some are only not documented in the
-% \KOMAScript{} manual, because nobody has done it yet.
-%
-% \DescribeCommand\IfLTXAtLeastTF
-% \marginpar{\raggedleft\tiny Added: 2021-01-31}%
-% This is the same like \cs{IfFormatAtLeast} of \LaTeX{} from 2020/10/01, but
-% works also with older \LaTeX{} kernels.
-%
-% \DescribeCommand\Ifislengthprimitive
-% \marginpar{\raggedleft\tiny Added: 2015/10/19\\Renamed: 2022/02/17}%
-% \cs{Ifislengthprimitive}\marg{macro}\marg{then code}\marg{else code}
-% expands the \meta{macro} and tests if the result can be used as a length
-% primitive. If this is the case the \meta{then code} is executed, otherwise
-% the \meta{else code}. Note, that this command can be false negative,
-% because, i.e., with \LuaLaTeX{} there can be primitives, that are like length,
-% but that are not known by \cs{Ifislengthprimitive}.
-%
-% \DescribeCommand\Ifisdefchar
-% \marginpar{\raggedleft\tiny Added: 2015/10/19\\Renamed: 2022/02/17}%
-% \cs{Ifislengthprimitive}\marg{macro}\marg{then code}\marg{else code}
-% expands the \meta{macro} and tests if the result is a \cs{char}. If this is
-% the case the \meta{then code} is executed, otherwise the \meta{else code}.
-% Note, that this command can be false positive, if the \cs{char} value is
-% incorrect.
-%
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of \pkg*{scrbase} and \pkg*{scrkbase}}
-%
-% \subsection{Loading \pkg*{scrkbase}}
-% Who ever loads ths package, always wants the same version of the already
-% used \KOMAScript version.
-% \begin{macrocode}
-%<*load>
-\RequirePackage{scrkbase}[\KOMAScriptVersion]
-%</load>
-% \end{macrocode}
-%
-%
-% \subsection{\eTeX{} test}
-% \changes{v3.02c}{2009/02/19}{error message without \eTeX}
-%
-% \begin{macrocode}
-%<*prepare>
-%<*base>
-\begingroup
- \def\reserved@b{}%
- \def\reserved@a#1{%
- \PackageError{scrbase}{seems you are not running e-TeX#1}{%
- Since 2004 the LaTeX team recommends to use e-TeX.\MessageBreak
- KOMA-Script since version 2.95 uses several e-TeX features.\MessageBreak
- At actual systems `latex' should already use e-TeX.\MessageBreak
- At deprecated systems it may be called `elatex'.\MessageBreak
- Use either unsupported KOMA-Script up to version 2.9u or\MessageBreak
- ask you administrator for LaTeX using e-TeX#1.\MessageBreak
- Not using e-TeX#1 is a fatal error!\MessageBreak
- Processing cannot be continued!}%
- \endgroup
- \batchmode \errmessage{}\csname @@end\endcsname\end\relax
- \csname endinput\endcsname
- }%
- \expandafter\ifx\csname eTeXversion\endcsname\relax\else
- \ifnum\eTeXversion <2
- \def\reserved@b{ V 2}%
- \else
- \let\reserved@a\endgroup
- \fi
- \fi
-\expandafter\reserved@a\expandafter{\reserved@b}
-%</base>
-% \end{macrocode}
-%
-%
-% \subsection{The \KOMAScript-only package loads the universal package}
-%
-% Once again the same version is wanted.
-% \begin{macrocode}
-%<koma>\RequirePackage{scrbase}[\KOMAScriptVersion]
-% \end{macrocode}
-%
-% \subsection{Package \pkg*{scrlfile}}
-%
-% We need to react on the loading other packages like \pkg{polyglossia}. For
-% this we use \pkg*{scrlfile}. But we can use any version.
-%
-% \begin{macrocode}
-%<base>\RequirePackage{scrlfile}
-% \end{macrocode}
-%
-% \subsection{Package \pkg*{keyval}}
-%
-% The \KOMAScript{} key handling bases on package \pkg{keyval}.
-% \begin{macrocode}
-%<base>\RequirePackage{keyval}
-% \end{macrocode}
-%
-%
-% \subsection{Using protected kernel macros}
-% Some package like \pkg{amsgen} redefine internal \LaTeX{} kernel macros, but
-% break them for other purposes than the own. So I have to make them work
-% again. The \KOMAScript{} classes have less problems with this, because most
-% of these packages cannot be loaded before a class. So the classes can simply
-% copy the original macro, before it is redefined. But I do not know, when a
-% package is loaded. So I have to implement the whole macro again with another
-% name (and can only hope, that such packages do not damage them also).
-%
-% \begin{macro}{\kernel@ifstar}
-% \changes{v3.20}{2016/04/12}{added}
-% I hope, the \LaTeX{} kernel will define this in future and other packages do
-% not redefine like they do with \cs{@ifstar}. So I use \cs{providecommand} to
-% not redefine the kernel macro, if it does exist.
-% \begin{macrocode}
-%<base>\providecommand*\kernel@ifstar[1]{\kernel@ifnextchar*{\@firstoftwo{#1}}}
-% \end{macrocode}
-% \end{macro}^^A \kernel@ifstar
-%
-%
-% \subsection{Improved \LaTeX{} kernel commands}
-% The \LaTeX{} kernel already provides some useful commands, but some can be
-% improved.
-%
-% \begin{command}{\rloop}
-% \changes{v3.30}{2020/03/07}{added}
-% The \cs{loop} \dots \cs{repeat} of the \LaTeX{} kernel cannot be used inside
-% a \cs{loop} \dots \cs{repeat} without extra code for preserving
-% \cs{iterate}. So here is a re-entrant version that is also long. This
-% version can be used even inside a \cs{loop} \dots \cs{repeat}. However you
-% should not use \cs{loop} \dots \cs{repeat} inside \cs{rloop} \dots
-% \cs{repeat}.
-% \begin{macrocode}
-%<*base>
-\newcommand{\rloop}[1]{}
-\long\def\rloop#1\repeat{%
- \ifdefined\iterate
- \edef\iterate{\unexpanded{#1\relax\expandafter\iterate\fi\def\iterate}%
- {\unexpanded\expandafter{\iterate}}}%
- \else
- \def\iterate{#1\relax\expandafter\iterate\fi\let\iterate\relax}%
- \fi
- \iterate
-}
-%</base>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\IfLTXAtLeastTF}
-% \changes{v3.33}{2021/01/21}{new}
-% 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.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\IfLTXAtLeastTF}{\@ifl@t@r\fmtversion}
-\ifcsname IfFormatAtLeastTF\endcsname
- \let\IfLTXAtLeastTF\IfFormatAtLeastTF
-\fi
-\@onlypreamble\IfLTXAtLeastTF
-%</base>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{Testing macros}
-%
-% \begin{macro}{\scr@ifundefinedorrelax}
-% \changes{v2.95c}{2006/08/12}{added}
-% \changes{v2.97b}{2007/03/08}{broken logic fixed}
-% \changes{v2.97c}{2007/04/18}{broken functionality fixed}
-% \changes{v2.97c}{2007/04/18}{\cs{scr@ifundefined} renamed}
-% \changes{v3.02c}{2009/02/19}{special treatment of \eTeX{} removed}
-% This macro is like \cs{@ifundefined}, but does not define the test macro
-% \cs{relax} if it was undefined before. Note: With up-to-date \LaTeX{} this
-% is the same with the original \cs{@ifundefined}.
-% \begin{macrocode}
-%<*base>
-\newcommand{\scr@ifundefinedorrelax}[1]{%
- \ifcsname #1\endcsname
- \expandafter\ifx\csname #1\endcsname\relax
- \expandafter\expandafter\expandafter\@firstoftwo
- \else
- \expandafter\expandafter\expandafter\@secondoftwo
- \fi
- \else
- \expandafter\@firstoftwo
- \fi
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@ifundefinedorrelax
-%
-%
-% \subsection{Extending messages}
-%
-% \begin{command}{\PackageErrorNoLine}
-% \changes{v3.12}{2013/09/19}{added}
-% \changes{v3.28}{2019/11/23}{nonsense command removed}
-% Falk correctly stated, that \cs{PackageError} already does not show a line
-% number. So we do not need this command.
-% \end{command}
-%
-%
-% \subsection{Definition of the \KOMAScript{} \pkg*{keyval} basis}
-%
-% \KOMAScript{} could use \pkg{keyval} keys with the same set of keywords
-% ``\texttt{KOMA}'' to make it possible, that packages can redefine keys of
-% classes and other packages. However this would be dangerous and can easily
-% break. So we split the set of keywords in an family of keywords and family
-% member of keywords and define commands to process the keywords either of a
-% member or a whole family.
-%
-% \begin{command}{\DefineFamily,\DefineFamilyMember,\DefineFamilyKey}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
-% \begin{macro}{\scr@if@family}
-% \changes{v3.00}{2008/04/30}{added}
-% \begin{macro}{\scr@if@familymember}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.27}{2019/07/19}{the empty member exists by default}
-% \begin{macro}{\scr@define@family@key}
-% \changes{v3.00}{2008/04/30}{added}
-% \begin{macro}{\scr@define@family@key@nodefault}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.18a}{2015/07/03}{missing \% added}
-% Family, member of a family and \pkg{keyval} key for a member of a
-% family. The default of the member of a family is always the file name of a
-% class or package (while reading the file).
-% \begin{macrocode}
-%<*base>
-\newcommand*{\DefineFamily}[1]{%
- \scr@ifundefinedorrelax{#1@key@familylist}{%
- \@namedef{#1@key@familylist}{}%
- }{}%
-}
-\newcommand*{\scr@if@family}[2]{%
- \scr@ifundefinedorrelax{#1@key@familylist}{%
- \PackageError{scrbase}{%
- unknown family `#1'%
- }{%
- You've tried to #2 for family `#1'.\MessageBreak
- This my be done only for previous defined families.\MessageBreak
- You should call `\string\DefineFamily{#1}' first.%
- }%
- }%
-}
-\newcommand*{\DefineFamilyMember}[2][.\@currname.\@currext]{%
- \scr@if@family{#2}{define a family member}{%
- \edef\reserved@a{%
- \noexpand\in@{#2#1,}{\csname #2@key@familylist\endcsname}}%
- \reserved@a
- \ifin@\else
- \expandafter\edef\csname #2@key@familylist\endcsname{%
- \@nameuse{#2@key@familylist}#2#1,}%
- \fi
- }%
-}
-\newcommand*{\scr@if@familymember}[3]{%
- \scr@if@family{#2}{#3}{%
- \IfArgIsEmpty{#1}{%
- \@firstofone
- }{%
- \edef\reserved@a{%
- \noexpand\in@{#2#1,}{\csname #2@key@familylist\endcsname}}%
- \reserved@a
- \ifin@
- \expandafter\@firstofone
- \else
- \PackageError{scrbase}{%
- unknown member `#1' at family `#2'%
- }{%
- You've tried to #3 for member `#1' of family `#2'.\MessageBreak
- This my be done only for previous defined family members.\MessageBreak
- You should call `\string\DefineFamilyMember[{#1}]{#2}' first.%
- }%
- \expandafter\@gobble
- \fi
- }%
- }%
-}
-\newcommand*{\DefineFamilyKey}[3][.\@currname.\@currext]{%
- \kernel@ifnextchar[%]
- {%
- \edef\reserved@a{#1}%
- \expandafter\scr@define@family@key
- \expandafter{\reserved@a}{#2}{#3}%
- }{%
- \edef\reserved@a{#1}%
- \expandafter\scr@define@family@key@nodefault
- \expandafter{\reserved@a}{#2}{#3}%
- }%
-}
-\newcommand{\scr@define@family@key}{}
-\long\def\scr@define@family@key#1#2#3[#4]#5{%
- \scr@if@familymember{#1}{#2}{define a key}{%
- \define@key{#2#1}{#3}[{#4}]{%
- \def\FamilyOfKey{#2}\def\FamilyMemberOfKey{#1}%
- \FamilyKeyStateUnknown
- #5%
- \def\FamilyOfKey{#2}\def\FamilyMemberOfKey{#1}%
- }%
- }%
-}
-\newcommand{\scr@define@family@key@nodefault}[4]{%
- \scr@if@familymember{#1}{#2}{define a key}{%
- \define@key{#2#1}{#3}{%
- \def\FamilyOfKey{#2}\def\FamilyMemberOfKey{#1}%
- \FamilyKeyStateUnknown
- #4%
- \def\FamilyOfKey{#2}\def\FamilyMemberOfKey{#1}%
- }%
- \@namedef{KV@#2#1@#3@default}{%
- \def\FamilyOfKey{#2}\def\FamilyMemberOfKey{#1}%
- \FamilyKeyStateNeedValue
- }%
- }%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@define@family@key@nodefault
-% \end{macro}^^A \scr@define@family@key
-% \end{macro}^^A \scr@if@familymember
-% \end{macro}^^A \scr@if@family
-% \end{command}^^A \DefineFamily,\DefineFamilyMember,\DefineFamilyKey
-%
-%
-% \begin{command}{\RelaxFamilyKey}
-% \changes{v3.15}{2014/12/03}{added}
-% Sometimes it is useful to be able to \emph{un-define} a key. This will not
-% un-define all helper macros but only the key and a default value will become
-% \cs{relax}.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\RelaxFamilyKey}[3][.\@currname.\@currext]{%
- \scr@ifundefinedorrelax{KV@#2#1@#3}{}{%
- \expandafter\let\csname KV@#2#1@#3\endcsname\relax
- }%
- \scr@ifundefinedorrelax{KV@#2#1@#3@default}{}{%
- \expandafter\let\csname KV@#2#1@#3@default\endcsname\relax
- }%
-}
-%</base>
-% \end{macrocode}
-% \end{command}^^A \RelaxFamilyKey
-%
-% \begin{command}{\FamilyKeyState,\FamilyKeyStateProcessed,\FamilyKeyStateUnknown,
-% \FamilyKeyStateUnknownValue,\FamilyKeyStateNeedValue}
-% \changes{v3.12}{2013/03/04}{added}
-% \cs{FamilyKeyState} is the state of processing a key. The initial state is
-% \cs{FamilyKeyStateUnknown}, so the state is indeed unknown. If a key has
-% been processed by the definition code and everything is OK, you should run
-% \cs{FamilyKeyStateProcessed}. This will set \cs{FamilyKeyState} also to
-% \cs{FamilyKeyStateProcessed} to indicate, the key has been processed
-% successfully. If the value assigned to the key is unknown, you should run
-% \cs{FamilyKeyStateUnknownValue}. And if the value is needed but no value has
-% been assigned, \cs{FamilyKeyStateNeedValue} is the correct choice. Note:
-% \cs{FamilyKeyState} is valid only immediately after processing a key.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyKeyState}{}
-\newcommand*{\FamilyKeyStateUnknown}{%
- \let\FamilyKeyState\FamilyKeyStateUnknown
-}
-\newcommand*{\FamilyKeyStateUnknownValue}{%
- \let\FamilyKeyState\FamilyKeyStateUnknownValue
-}
-\newcommand*{\FamilyKeyStateNeedValue}{%
- \let\FamilyKeyState\FamilyKeyStateNeedValue
-}
-\newcommand*{\FamilyKeyStateProcessed}{%
- \let\FamilyKeyState\FamilyKeyStateProcessed
-}
-\let\FamilyKeyState\FamilyKeyStateUnknown
-%</base>
-% \end{macrocode}
-% \end{command}^^A \FamilyKeyState … \FamilyKeyStateNeedValue
-%
-% \begin{command}{\FamilyOfKey,\FamilyMemberOfKey}
-% \changes{v3.12}{2013/03/04}{added}
-% While processing a key, this is the family and the member of family.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyOfKey}{}
-\newcommand*{\FamilyMemberOfKey}{}
-%</base>
-% \end{macrocode}
-% \end{command}^^A \FamilyOfKey,\FamilyMemberOfKey
-%
-% \begin{macro}{\KOMA@key}
-% \changes{v2.97c}{2007/04/19}{optional argument added}
-% \changes{v3.17}{2015/02/24}{rudimentary value storage}
-% \pkg{keyval} keys of \KOMAScript{} are defined with \cs{KOMAkey} to setup
-% the family to ``\texttt{KOMA}'' automatically. Additionally the value
-% storage is initialized.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@key}[1][.\@currname.\@currext]{%
- \DefineFamilyMember[{#1}]{KOMA}%
- \@ifundefined{scr@kav@KOMA#1}{\@namedef{scr@kav@KOMA#1}{}}{}%
- \DefineFamilyKey[{#1}]{KOMA}%
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\KOMA@kav@add}
-% \changes{v3.17}{2015/02/24}{added}
-% This macro stores a \texttt{\meta{key}=\meta{value}} pair in a internal
-% list. The first argument is the family member, the second the \meta{key} and
-% the third the \meta{value}.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@kav@add}[3]{%
- \@ifundefined{scr@kav@KOMA#1}{%
- \KOMA@internal@error\KOMA@kav@add{#1}%
- }{%
- \expandafter\l@addto@macro\csname scr@kav@KOMA#1\endcsname{\do{{#2}{#3}}}%
- }%
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\KOMA@kav@xadd}
-% \changes{v3.17}{2015/02/24}{added}
-% This macro stores a \texttt{\meta{key}=\meta{value}} pair in a internal
-% list after expanding both, the \meta{key} and the \meta{value}. The first
-% argument is the family member, the second the \meta{key} and the third the
-% \meta{value}.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@kav@xadd}[3]{%
- \@ifundefined{scr@kav@KOMA#1}{%
- \KOMA@internal@error\KOMA@kav@xadd{#1}%
- }{%
- \protected@edef\reserved@a{{#2}{#3}}%
- \expandafter\l@addto@macro\csname scr@kav@KOMA#1\expandafter\endcsname
- \expandafter{\expandafter\do\expandafter{\reserved@a}}%
- }%
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\KOMA@kav@remove}
-% \changes{v3.17}{2015/02/24}{added}
-% This macro removes a \texttt{\meta{key}=\meta{value}} pair from the internal
-% list. The first argument is the family member, the second the \meta{key} and
-% the third the \meta{value}.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@kav@remove}[3]{%
- \@ifundefined{scr@kav@KOMA#1}{%
- \KOMA@internal@error\KOMA@kav@remove{#1}%
- }{%
- \begingroup
- \def\reserved@a{\endgroup\@namedef{scr@kav@KOMA#1}{}}%
- \edef\reserved@b{\detokenize{{#2}{#3}}}%
- \def\do##1{%
- \edef\reserved@c{\detokenize{##1}}%
- \ifx\reserved@b\reserved@c\else
- \l@addto@macro\reserved@a{%
- \expandafter\l@addto@macro\csname scr@kav@KOMA#1\endcsname{%
- \do{##1}%
- }%
- }%
- \fi
- }%
- \@nameuse{scr@kav@KOMA#1}%
- \reserved@a
- }%
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\KOMA@kav@removekey}
-% \changes{v3.17}{2015/02/24}{added}
-% This macro removes all \texttt{\meta{key}=\meta{value}} pairs of a given
-% \meta{key} from the internal list. The first argument is the family member,
-% the second the \meta{key}.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@kav@removekey}[2]{%
- \@ifundefined{scr@kav@KOMA#1}{%
- \KOMA@internal@error\KOMA@kav@removekey{#1}%
- }{%
- \begingroup
- \def\reserved@a{\endgroup\@namedef{scr@kav@KOMA#1}{}}%
- \edef\reserved@b{\detokenize{#2}}%
- \def\reserved@d##1##2{\edef\reserved@c{\detokenize{##1}}}%
- \def\do##1{%
- \reserved@d##1\relax
- \ifx\reserved@b\reserved@c\else
- \l@addto@macro\reserved@a{%
- \expandafter\l@addto@macro\csname scr@kav@KOMA#1\endcsname{%
- \do{##1}%
- }%
- }%
- \fi
- }%
- \@nameuse{scr@kav@KOMA#1}%
- \reserved@a
- }%
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\KOMA@kav@replacevalue,\KOMA@kav@xreplacevalue}
-% \changes{v3.17}{2015/02/25}{added}
-% If \cs{FamilyKeyState} is \cs{FamilyKeyStateProcessed},
-% these macros replace a \texttt{\meta{key}=\meta{value}} pair in the internal list.
-% The first argument is the family member, the second the \meta{key} and the
-% third is the new \meta{value}. \cs{KOMA@kav@xreplacevalue} expands both, the
-% \meta{key} and the \meta{value}.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@kav@replacevalue}[3]{%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \@ifundefined{scr@kav@KOMA#1}{%
- \KOMA@internal@error\KOMA@kav@replacevalue{#1}%
- }{%
- \KOMA@kav@removekey{#1}{#2}%
- \KOMA@kav@add{#1}{#2}{#3}%
- }%
- \fi
-}
-\newcommand*{\KOMA@kav@xreplacevalue}[3]{%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \@ifundefined{scr@kav@KOMA#1}{%
- \KOMA@internal@error\KOMA@kav@replacevalue{#1}%
- }{%
- \KOMA@kav@removekey{#1}{#2}%
- \KOMA@kav@xadd{#1}{#2}{#3}%
- }%
- \fi
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\KOMA@kav@replacebool}
-% \changes{v3.17}{2015/02/24}{added}
-% If \cs{FamilyKeyState} is \cs{FamilyKeyStateProcessed},
-% this macro replaces the value of a if key in the internal list.
-% The first argument is the family member, the second the \meta{key} and the
-% third is the boolean switch (\cs{if\dots} statement) representing the new value.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@kav@replacebool}[3]{%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \@ifundefined{scr@kav@KOMA#1}{%
- \KOMA@internal@error\KOMA@kav@replacebool{#1}%
- }{%
- \KOMA@kav@remove{#1}{#2}{false}%
- \KOMA@kav@remove{#1}{#2}{true}%
- \expandafter\ifx\csname if#3\expandafter\endcsname
- \csname iftrue\endcsname
- \KOMA@kav@xadd{#1}{#2}{true}%
- \else
- \KOMA@kav@xadd{#1}{#2}{false}%
- \fi
- }%
- \fi
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\KOMA@kav@defall}
-% \changes{v3.17}{2015/02/24}{added}
-% This macro defines a macro/command with the \texttt{\meta{key}=\meta{value}}
-% list of all stored pairs. The first argument is the macro/command to be
-% defined with the list. The second is the family member.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@kav@defall}[2]{%
- \@ifundefined{scr@kav@KOMA#2}{%
- \KOMA@internal@error\KOMA@kav@defall{#1}%
- }{%
- \begingroup
- \let\reserved@a\@empty
- \def\reserved@b##1##2{\l@addto@macro\reserved@a{,{##1=##2}}}%
- \def\do##1{\reserved@b##1}%
- \@nameuse{scr@kav@KOMA#2}%
- \ifx\reserved@a\@empty
- \def\reserved@b{\endgroup\let#1\@empty}%
- \else
- \edef\reserved@b{%
- \unexpanded{\endgroup\def#1}{%
- \unexpanded
- \expandafter\expandafter\expandafter{%
- \expandafter\@gobble\reserved@a}}}%
- \fi
- \reserved@b
- }%
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\KOMA@kav@defone}
-% \changes{v3.17}{2015/02/25}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% This macro defines a macro/command with all stored values of a \meta{key}
-% from the internal list of \texttt{\meta{key}=\meta{value}} pairs.
-% The first argument is the macro/command to be defined. The second is the
-% family member and the third is the \meta{key}.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@kav@defone}[3]{%
- \@ifundefined{scr@kav@KOMA#2}{%
- \KOMA@internal@error\KOMA@kav@defall{#1}%
- }{%
- \begingroup
- \let\reserved@a\@empty
- \def\reserved@b##1##2{%
- \Ifstr{##1}{#3}{\l@addto@macro\reserved@a{,{##2}}}{}%
- }%
- \def\do##1{\reserved@b##1}%
- \@nameuse{scr@kav@KOMA#2}%
- \ifx\reserved@a\@empty
- \def\reserved@b{\endgroup\let#1\@empty}%
- \else
- \edef\reserved@b{%
- \unexpanded{\endgroup\def#1}{%
- \unexpanded
- \expandafter\expandafter\expandafter{%
- \expandafter\@gobble\reserved@a}}}%
- \fi
- \reserved@b
- }%
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\KOMA@internal@error}
-% \changes{v3.17}{2015/02/24}{added}
-% General internal error message with the recommendation to report a bug.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@internal@error}[2]{%
- \PackageError{scrkbase}{internal error using \string#1{#2}}{%
- You've found an internal error either in KOMA-Script or a third
- party\MessageBreak
- definition, that uses KOMA-Script internal macros.\MessageBreak
- Please send a bug report with a minimal but complete example,
- that\MessageBreak
- shows this error, to komascript at gmx dot info or report it
- at\MessageBreak
- <http://www.komascript.de/forum/20> (you need an account to do so).%
- }%
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Options}
-%
-% From version 2.97c \KOMAScript{} processes all options in the order they
-% have been set and no longer in the order they have been defined. This is
-% much more intuitive for users. Packages first process the global options
-% then the local options.
-%
-% \begin{macro}{\@globaloptionslist}
-% \changes{v2.96}{2006/11/26}{added}
-% \changes{v2.96}{2006/11/26}{process class options}
-% \changes{v3.20}{2016/02/06}{delay decisions}
-% The lost of global options is sometimes needed. But because \pkg{xkeyval}
-% has the opinion it should remove all options with equal char from the list
-% of class options, we define out own macro with a copy of the class
-% options. Until \KOMAScript{} 3.19a the copy has been done here. But if
-% \pkg*{scrbase} is loaded before \cs{documentclass} this is too early. From
-% \KOMAScript{} 3.20 the assignment has been moved to
-% \cs{FamilyProcessOptions}. And from \KOMAScript{} 3.33 the normal class
-% option list is only used if the raw option list is not available.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\@globaloptionslist}{}
-%</base>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\scr@removeunused,\scr@optiontest,\scr@pti@ntest}
-% \changes{v2.97c}{2007/04/18}{added}
-% \changes{v3.12}{2013/03/04}{removed}
-% \end{macro}^^A \scr@removeunused,\scr@optiontest,\scr@pti@ntest
-%
-% \begin{command}{\FamilyProcessOptions}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.11a}{2012/06/11}{classes do not report errors for unknown values}
-% \changes{v3.12}{2013/03/04}{error handling}
-% \changes{v3.33}{2021/03/02}{new version using raw options lists of \LaTeX{}
-% 2021/05/01}
-% Note: Wrong values should not result in errors or warnings and only seldom
-% in information. The best is to signal all kind of errors via
-% \cs{FamilyKeyState}. Only values, that cannot be handled by any family
-% member have to be reported. This is done inside \cs{FamilyProcessOptions}
-% depending on \cs{FamilyKeyState} of each member.
-% Note also: This command is not re-entrant. So it cannot be used while
-% processing another option.
-% Note also: We use 2021/05/01 instead of the official \LaTeX{} release date,
-% to detect a \LaTeX{} kernel version with raw option lists, because there
-% were relevant earlier \LaTeX{} developer releases with that date.
-% \begin{macrocode}
-%<*base>
-\IncludeInRelease{2021/05/01}{\FamilyProcessOptions}%
- {Usage of raw or classic option list}
-\newcommand*{\FamilyProcessOptions}[2][.\@currname.\@currext]{%
-% \end{macrocode}
-% Before processing of the options we have to execute an initialise several
-% hooks:
-% \begin{macrocode}
- \ifx\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions
- \PackageError{scrbase}{nested \string\FamilyProcessOptions\space
- detected\MessageBreak}{%
- \string\FamilyProcessOptions\space has been used while processing or
- setting options.\MessageBreak
- This is currently not allowed. You should contact the author of the
- causing\MessageBreak
- code.\MessageBreak
- This error is fatal. You should not continue.%
- }%
- \fi
- \scr@ifundefinedorrelax{scr@before@process@options@#2@hook}{}{%
- \@nameuse{scr@before@process@options@#2@hook}%
- }%
- \scr@ifundefinedorrelax{scr@before@process@options@#2#1@hook}{}{%
- \@nameuse{scr@before@process@options@#2#1@hook}%
- \expandafter\let\csname scr@before@process@options@#2#1@hook\endcsname
- \relax
- }%
- \scr@ifundefinedorrelax{scr@after@options@#2@hook}{%
- \@namedef{scr@after@options@#2@hook}{%
- \@namedef{scr@after@options@#2@hook}{}%
- }%
- }{%
- \expandafter\edef\csname scr@after@options@#2@hook\endcsname{%
- \noexpand\@namedef{scr@after@options@#2@hook}{%
- \unexpanded\expandafter\expandafter\expandafter
- {\csname scr@after@options@#2@hook\endcsname}%
- }%
- }%
- }%
- \ifx\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate
- \@namedef{scr@after@options@#2@hook@topmost}{%
- \@namedef{scr@after@options@#2@hook@topmost}{}%
- }%
- \expandafter\l@addto@macro\csname scr@after@options@#2@hook\endcsname{%
- \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate
- \@nameuse{scr@after@options@#2@hook@topmost}%
- }%
- \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions
- \fi
- \let\ds@\@empty
-% \end{macrocode}
-% Here we set up \cs{@curroptions} to the raw options of the current class or
-% package or empty if the options are not defined.
-% \begin{macrocode}
- \@ifundefined{@raw@opt@\@currname.\@currext}{%
- \let\@curroptions\@empty
- }{%
- \expandafter\let\expandafter\@curroptions
- \csname @raw@opt@\@currname.\@currext\endcsname
- }%
-% \end{macrocode}
-% If this is not a class, we first have to process all raw class options.
-% \changes{v3.33}{2021/03/12}{switched to fast test like \LaTeX{} 2021/06/01}
-% \changes{v3.34}{2021/05/30}{use \cs{@raw@classoptionslist} only, if defined}
-% Note, if \pkg*{scrbase} or a depending package is loaded before the class,
-% \cs{@raw@classoptionslist} should not be processed.
-% \begin{macrocode}
- \ifx\@currext\@clsextension\else
- \@ifundefined{@raw@classoptionslist}{}{%
- \@for\CurrentOption:=\@raw@classoptionslist\do{%
- \scr@trim@spaces\CurrentOption
- \ifx\CurrentOption\@empty\else
- \@ifundefined{ds@\CurrentOption}{%
- \scr@ifprocess@curroption{#1}{#2}{%
- \@expandtwoargs\@removeelement{%
- \expandafter\@remove@eq@value\CurrentOption=\@nil}%
- \@unusedoptionlist\@unusedoptionlist
- }{}%
- }{%
- \@use@ption
- \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
- }%
- \fi
- }%
- }%
- \fi
-% \end{macrocode}
-% \changes{v3.34}{2021/06/05}{extra test because of \LaTeX{} raw option issue}
-% Afterwards we have to process the current options. Unfortunately there is an
-% issue with the raw option list of the \LaTeX{} kernel, that could result in
-% \cs{CurrentOption} in the option list instead of the one step expansion of
-% \cs{CurrentOption} (see
-% \url{https://sourceforge.net/p/koma-script/tickets/10/}). This would result
-% in an infinite loop using the usual loop:
-% \begin{macrocode}
-%<*dontusethis>
- \@for\CurrentOption:=\@curroptions\do{%
- \scr@trim@spaces\CurrentOption
- \@ifundefined{ds@\CurrentOption}{%
- \@use@ption
- \scr@ifprocess@curroption{#1}{#2}{}\default@ds
- }\@use@ption
- }%
-%</dontusethis>
-% \end{macrocode}
-% So for a little more rosbustnes we do an extra test.
-% \begin{macrocode}
- \@for\reserved@a:=\@curroptions\do{%
- \scr@trim@spaces\reserved@a
- \def\reserved@b{\CurrentOption}%
- \ifx\reserved@a\reserved@b
- \PackageError{scrbase}{%
- \string\CurrentOption\space loop detected\MessageBreak
- Perhaps someone uses:\MessageBreak\space\space
- \ifx\@currext\@clsextension
- \string\PassOptionsToClass
- \else
- \string\PassOptionsToPackage
- \fi
- {\string\CurrentOption}{…}.\MessageBreak
- With LaTeX 2020/10/01 or 2021/06/01 this results in
- \string\CurrentOption\MessageBreak
- in the raw option list and therefore is not allowed.\MessageBreak
- Please ask the class or package author to use:\MessageBreak\space\space
- \string\expandafter
- \ifx\@currext\@clsextension
- \string\PassOptionsToClass
- \else
- \string\PassOptionsToPackage
- \fi
- \MessageBreak\space\space\space
- \string\expandafter{\string\CurrentOption}{…}\MessageBreak
- instead or update LaTeX (if possible)%
- }%
- \let\CurrentOption\@empty
- \else
- \let\CurrentOption\reserved@a
- \fi
- \@ifundefined{ds@\CurrentOption}{%
- \@use@ption
- \scr@ifprocess@curroption{#1}{#2}{}\default@ds
- }\@use@ption
- }%
-% \end{macrocode}
-% Clear all the definitions for declared options and the current option. Then
-% reset the marker macro, initiate emptying the unprocessed options list of
-% the current file and execute the exit hook.
-% \begin{macrocode}
- \@for\CurrentOption:=\@declaredoptions\do{%
- \expandafter\let\csname ds@\CurrentOption\endcsname\relax}%
- \let\CurrentOption\@empty
- \let\@fileswith@pti@ns\@@fileswith@pti@ns
- \AtEndOfPackage{\expandafter\let
- \csname unprocessedoptions-\@currname.\@currext\endcsname
- \relax}%
- \@nameuse{scr@after@options@#2@hook}%
-}
-\EndIncludeInRelease
-% \end{macrocode}
-% And here the old version for old \LaTeX{} kernel version:
-% \begin{macrocode}
-\IncludeInRelease{0000/00/00}{\FamilyProcessOptions}%
- {Usage of raw or classic option list}
-\newcommand*{\FamilyProcessOptions}[2][.\@currname.\@currext]{%
- \ifx\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions
- \PackageError{scrbase}{nested \string\FamilyProcessOptions\space
- detected\MessageBreak}{%
- \string\FamilyProcessOptions\space has been used while processing or
- setting options.\MessageBreak
- This is currently not allowed. You should contact the author of the
- causing\MessageBreak
- code.\MessageBreak
- This error is fatal. You should not continue.%
- }%
- \fi
-% \end{macrocode}
-% \changes{v3.18}{2015/06/17}{new hooks before processing the options}
-% From version 3.18 we execute two hooks. The first one is valid for all
-% classes and packages of a family. This is multi-time hook, not deleting
-% itself. The second one is valid only one time for one member.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{scr@before@process@options@#2@hook}{}{%
- \@nameuse{scr@before@process@options@#2@hook}%
- }%
- \scr@ifundefinedorrelax{scr@before@process@options@#2#1@hook}{}{%
- \@nameuse{scr@before@process@options@#2#1@hook}%
- \expandafter\let\csname scr@before@process@options@#2#1@hook\endcsname
- \relax
- }%
-% \end{macrocode}
-% \changes{v3.23}{2017/02/16}{fix: the after hook uses the family instead of
-% the member}
-% Initialization of \cs{AtEndOfFamilyOptions} inclusive hook.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{scr@after@options@#2@hook}{%
- \@namedef{scr@after@options@#2@hook}{%
-% \end{macrocode}
-% The first hook action is to delete the hook.
-% \begin{macrocode}
- \@namedef{scr@after@options@#2@hook}{}%
- }%
- }{%
- \expandafter\edef\csname scr@after@options@#2@hook\endcsname{%
-% \end{macrocode}
-% The first action in the hook is to reactivate the current hook.
-% \begin{macrocode}
- \noexpand\@namedef{scr@after@options@#2@hook}{%
- \unexpanded\expandafter\expandafter\expandafter
- {\csname scr@after@options@#2@hook\endcsname}%
- }%
- }%
- }%
-% \end{macrocode}
-% \changes{v3.23}{2017/02/16}{new hook added for \cs{AtEndOfFamilyOptions*}}
-% From version 3.23 there is one more hook before \cs{AtEndOfFamilyOptions*}
-% to be initialized and executed. We can detect the topmost level comparing
-% the definition of \cs{AtEndOfFamilyOptions}. This is faster than by the
-% definition of the hook itself (we have to do so in \cs{FamilyOptions}).
-% \begin{macrocode}
- \ifx\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate
- \@namedef{scr@after@options@#2@hook@topmost}{%
-% \end{macrocode}
-% The hook definitions also contains the hook deletion. This is important for
-% recursive calls, to distinguish lower levels from the topmost level.
-% \begin{macrocode}
- \@namedef{scr@after@options@#2@hook@topmost}{}%
- }%
-% \end{macrocode}
-% The top hook is added to the hook of the (topmost) level, while resetting
-% the definition of \cs{AtEndOfFamilyOptions}.
-% \begin{macrocode}
- \expandafter\l@addto@macro\csname scr@after@options@#2@hook\endcsname{%
- \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate
- \@nameuse{scr@after@options@#2@hook@topmost}%
- }%
-% \end{macrocode}
-% Don't forget to change the command to fill one of the hooks from immediate
-% execution to adding code to the corresponding hook.
-% \begin{macrocode}
- \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions
- \fi
-% \end{macrocode}
-% Continue the adaption of code from \cs{ProcessOptions}.
-% \begin{macrocode}
- \let\ds@\@empty
- \edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
- \ifx\@currext\@clsextension\else
-% \end{macrocode}
-% Within classes the current option list is same like the global option
-% list. So classes are not allowed to process the global option list
-% additionally to the local one. But packages do process the global option
-% list, but do not report errors or warnings about these options.
-% \changes{v3.18}{2015/06/17}{handling of not defined \cs{@globaloptionslist}}
-% \changes{v3.20}{2016/02/06}{\cs{@globaloptionslist} assignment always}
-% \begin{macrocode}
- \let\@globaloptionslist\@classoptionslist
- \scr@ifundefinedorrelax{XKV@classoptionslist}{%
-%<trace> \PackageInfo{scrbase}{Using \string\@classoptionslist}%
- }{%
- \ifx\XKV@classoptionslist\@empty
-%<trace> \PackageInfo{scrbase}{Using \string\@classoptionslist}%
- \else
-%<trace> \PackageInfo{scrbase}{Using \string\XKV@classoptionslist}%
- \let\@globaloptionslist\XKV@classoptionslist
- \fi
- }%
- \scr@ifundefinedorrelax{@globaloptionslist}{}{%
- \@for\CurrentOption:=\@globaloptionslist\do{%
-% \end{macrocode}
-% The options are processed in the order they have been set into the global
-% option list. But only these options are processed, that are not empty and
-% that are known by the current package. So these are only classic options not
-% \pkg{keyval} options.
-% \begin{macrocode}
- \ifx\CurrentOption\@empty\else
- \@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}%
- \ifin@
- \@use@ption
- \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
- \else
-% \end{macrocode}
-% But if they are not classic options, they could be \pkg{keyval} options. In
-% this case we test, if member (\texttt{\#1}) of family (\texttt{\#2}) has
-% such an option. If this is the case, the options is executed once with
-% member and once again with member. In case of an unknown key or value
-% nothing else happens.
-% \begin{macrocode}
- \scr@ifprocess@curroption{#1}{#2}{%
- \@expandtwoargs\@removeelement\CurrentOption
- \@unusedoptionlist\@unusedoptionlist
- }{}%
- \fi
- \fi
- }%
- }%
- \fi
-% \end{macrocode}
-% Now, processing local options of classes and packages follows. In this case
-% unknown options (keys) or values of packages immediately can result in error
-% messages. But in classes they are only added to the list of unused global
-% options.
-% \begin{macrocode}
- \@for\CurrentOption:=\@curroptions\do{%
-% \end{macrocode}
-% \changes{v3.26}{2018/10/22}{options are not fully expanded for the tests}
-% \changes{v3.26}{2018/10/22}{\cs{@use@ption} is not used for
-% \texttt{\meta{key}\quotechar=\meta{value}} options}
-% From \KOMAScript~3.26 the options are not fully expanded to test, if it is a
-% classic option. The essential expansion already has been done. So removing
-% the full expansion avoids errors because of missing
-% \cs{endcsname}. Additionally using \cs{@use@option} hat been removed for all
-% \texttt{\meta{key}=\meta{value}} options, because this would result in the
-% same error because of the |\csname ds@\CurrentOption\endcsname|, that is
-% used inside \cs{@use@option}. Instead of \cs{@use@option} we just remove the
-% option from the list of unused options.
-% \begin{macrocode}
- \edef\reserved@a{\expandafter\detokenize\expandafter{\CurrentOption}}%
- \scr@ifundefinedorrelax{ds@\reserved@a}{%
- \@expandtwoargs\@removeelement\CurrentOption
- \@unusedoptionlist\@unusedoptionlist
- \scr@ifprocess@curroption{#1}{#2}{}\default@ds
- }\@use@ption
- }%
-% \end{macrocode}
-% Almost at the end we delete the options code of all declared options. This
-% is the same as with the \LaTeX{} kernel command
-% \cs{ProcessOptions*}. Additionally at the end of the package (not
-% \pkg*{tocbasic} but the package, that is using the command) all unprocessed
-% options are processed.
-% \changes{v3.33}{2021/02/15}{prepared for \LaTeX{} 2020/10/01}
-% \begin{macrocode}
- \@for\CurrentOption:=\@declaredoptions\do{%
- \expandafter\let\csname ds@\CurrentOption\endcsname\relax}%
- \let\CurrentOption\@empty
- \let\@fileswith@pti@ns\@@fileswith@pti@ns
- \IfLTXAtLeastTF{2020/10/01}{%
- \AtEndOfPackage{\expandafter\let
- \csname unprocessedoptions-\@currname.\@currext\endcsname
- \relax}%
- }{%
- \AtEndOfPackage{\let\@unprocessedoptions\relax}%
- }%
-% \end{macrocode}
-% Last but not least the hook has to be executed and (self-)deleted.
-% \changes{v3.23}{2017/02/16}{fix using family instead of member}
-% \begin{macrocode}
- \@nameuse{scr@after@options@#2@hook}%
-}
-\EndIncludeInRelease
-\@onlypreamble\FamilyProcessOptions
-% \end{macrocode}
-% \begin{command}{\BeforeFamilyProcessOptions}
-% \changes{v3.18}{2015/06/17}{added}
-% Add code to the hook used immediately before executing the options via
-% \cs{FamilyProcessOptions}. Neither the family nor the member need to
-% exist. So you are able to already add code to the hook before the class or
-% package has been loaded.
-% \begin{macrocode}
-\newcommand*{\BeforeFamilyProcessOptions}[3][.\@currname.\@currext]{%
- \scr@ifundefinedorrelax{scr@before@process@options@#2#1@hook}{%
- \@namedef{scr@before@process@options@#2#1@hook}{#3}%
- }{%
- \expandafter\g@addto@macro
- \csname scr@before@process@options@#2#1@hook\endcsname{#3}%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \BeforeFamilyProcessOptions
-% \begin{command}{\AtEndOfFamilyOptions}
-% \changes{v3.12}{2013/03/04}{added}
-% \changes{v3.23}{2017/02/16}{star variant added}
-% Inside the code of an option you can delay execution of code till the end of
-% the current \cs{FamilyProcessOptions}, \cs{FamilyExecuteOptions},
-% \cs{FamilyOptions} or \cs{FamilyOption}. The only argument is the code. The
-% argument is delegated to \cs{l@addto@macro} (instead of reading it
-% directly). The non-star variant delays only till the end of the current
-% level. The star-variant delays till the end of all levels.
-% \begin{macro}{\scr@AtEndOfFamilyOptions}
-% \changes{v3.12}{2013/05/29}{added}
-% \begin{macro}{\scr@@AtEndOfFamilyOptions,\scr@AtEndOfFamilyOptions@immediate}
-% \changes{v3.23}{2017/02/16}{added}
-% \begin{macrocode}
-\newcommand*{\scr@AtEndOfFamilyOptions}{%
- \kernel@ifstar {\scr@@AtEndOfFamilyOptions{@topmost}}%
- {\scr@@AtEndOfFamilyOptions\@empty}%
-}
-\newcommand*{\scr@@AtEndOfFamilyOptions}[1]{%
- \expandafter
- \l@addto@macro\csname scr@after@options@\FamilyOfKey @hook#1\endcsname
-}
-\newcommand*{\scr@AtEndOfFamilyOptions@immediate}{%
- \kernel@ifstar {\@firstofone}{\@firstofone}%
-}
-\newcommand*{\AtEndOfFamilyOptions}{}
-\let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate
-% \end{macrocode}
-% \end{macro}^^A \scr@@AtEndOfFamilyOptions,\scr@AtEndOfFamilyOptions@immediate
-% \end{macro}^^A \scr@AtEndOfFamilyOptions
-% \end{command}^^A \AtEndOfFamilyOptions
-% \begin{macro}{\scr@ifprocess@curroption}
-% \changes{v3.13}{2014/01/04}{brackets around \cs{CurrentOption} inside \cs{setkeys}}
-% This macro executes the current \pkg{keyval} option for member
-% \texttt{\#1} of family \texttt{\#2}. If the option does not know the value,
-% the forth argument is used. Otherwise it is ignored. Note, before the member
-% option the family option is executed. If this is successful the member does
-% not need to know the option.
-% \begin{macrocode}
-\newcommand*\scr@ifprocess@curroption[2]{%
-% \end{macrocode}
-% \changes{v3.26}{2018/10/22}{using \cs{scr@sp@def} instead of \cs{def} for
-% splitting the key}
-% Because white spaces are not always and forever removed from the option
-% list, here \cs{scr@sp@def} is used to eliminate unwanted white spaces before
-% the key, before and after the equal sign and at the end of the value.
-% \begin{macrocode}
- \def\reserved@a##1=##2\@nil{\scr@sp@def\reserved@a{##1}}%
- \expandafter\reserved@a\CurrentOption=\@nil
- \scr@ifundefinedorrelax{KV@#2@\reserved@a}{%
- \scr@ifundefinedorrelax{KV@#2#1@\reserved@a}{%
- \let\FamilyKeyState\OptionNotUsed
- }{%
- \protected@edef\reserved@b{\noexpand\setkeys{#2#1}{{\CurrentOption}}%
- \noexpand\def\noexpand\CurrentOption{\CurrentOption}}%
- \reserved@b
- \ifx\FamilyKeyState\FamilyKeyStateUnknown
- \PackageInfo{scrbase}{Unknown processing state.\MessageBreak
- Processing option `\CurrentOption'\MessageBreak
- of member `#1' of family\MessageBreak
- `#2' doesn't set\MessageBreak
- a valid state. This will be interpreted\MessageBreak
- as \string\FamilyKeyStateProcessed
- }%
- \FamilyKeyStateProcessed
- \fi
- }{%
- \let\FamilyKeyState\OptionNotUsed
- }%
- }{%
- \protected@edef\reserved@b{\noexpand\setkeys{#2}{{\CurrentOption}}%
- \noexpand\def\noexpand\CurrentOption{\CurrentOption}}%
- \reserved@b
- \ifx\FamilyKeyState\FamilyKeyStateUnknown
- \PackageInfo{scrbase}{Unknown processing state.\MessageBreak
- Processing option `\CurrentOption'\MessageBreak
- of family `#2'\MessageBreak
- doesn't set a valid state.\MessageBreak
- This will be interpreted\MessageBreak
- as \string\FamilyKeyStateProcessed
- }%
- \FamilyKeyStateProcessed
- \fi
- \def\reserved@a##1=##2\@nil{\scr@sp@def\reserved@a{##1}}%
- \expandafter\reserved@a\CurrentOption=\@nil
- \scr@ifundefinedorrelax{KV@#2#1@\reserved@a}{}{%
- \protected@edef\reserved@b{\noexpand\setkeys{#2#1}{{\CurrentOption}}%
- \noexpand\def\noexpand\CurrentOption{\CurrentOption}}%
- \ifx\FamilyKeyState\FamiliyKeyStateProcessed
- \reserved@b
- \FamilyKeyStateProcessed
- \else
- \reserved@b
- \ifx\FamilyKeyState\FamilyKeyStateUnknown
- \PackageInfo{scrbase}{Unknown processing state.\MessageBreak
- Processing option `\CurrentOption'\MessageBreak
- of member `#1' of family\MessageBreak
- `#2' doesn't set\MessageBreak
- a valid state. This will be interpreted\MessageBreak
- as \string\FamilyKeyStateProcessed
- }%
- \FamilyKeyStateProcessed
- \fi
- \fi
- }%
- }%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\scr@sp@d,\scr@sp@b,\scr@sp@c,\scr@sp@def}
-% \changes{v3.26}{2018/08/29}{moved from \file{tocbasic.dtx} to
-% \file{scrkernel-basics.dtx} and renamed}
-% \changes{v3.26b}{2019/01/17}{\cs{long}}
-% The helper macro \cs{scr@sp@def} defines a macro (\texttt{\#1}) to contain a
-% token list (\texttt{\#2}) and removes tailing spaces at the beginning an the
-% end. The original definition was from \pkg{keyval}. The other macros are
-% helpers to realize \cs{scr@sp@def}.
-% \begin{macrocode}
-\def\@tempa#1{%
- \long\def\scr@sp@def##1##2{%
- \futurelet\scr@sp@tempa\scr@sp@d##2\@nil\@nil#1\@nil\relax##1}%
- \def\scr@sp@d{%
- \ifx\scr@sp@tempa\@sptoken
- \expandafter\scr@sp@b
- \else
- \expandafter\scr@sp@b\expandafter#1%
- \fi}%
- \long\def\scr@sp@b#1##1 \@nil{\scr@sp@c##1}%
-}
-\@tempa{ }
-\long\def\scr@sp@c#1\@nil#2\relax#3{\@temptokena{#1}\edef#3{\the\@temptokena}}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@sp@d,\scr@sp@b,\scr@sp@c,\scr@sp@def
-% \end{macro}^^A \scr@process@curroption
-% \end{command}^^A \FamilyProcessOptions
-%
-% \begin{command}{\KOMAProcessOptions}
-% \changes{v2.97c}{2007/04/18}{added}
-% \changes{v3.00}{2008/04/30}{no optional argument}
-% This command executes all options, not only classic declared by
-% \cs{DeclareOption} or \cs{DeclareOption*}, but also \pkg{keyval} options in
-% the order these options have been used (not declared). For packages first
-% the global options, than the local options. For classes global and local
-% options are the same and only local options are processed. This is similar
-% to the \LaTeX{} kernel command \cs{ProcessOptions*} (with the difference of
-% processing \pkg{keyval} options too). Family options are always executed
-% before member options.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMAProcessOptions}{\FamilyProcessOptions{KOMA}}
-\@onlypreamble\KOMAProcessOptions
-%</koma>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macro}{\scr@trim@spaces}
-% \changes{v3.12}{2013/11/06}{added}
-% \changes{v3.26}{2018/08/29}{moved from \file{scrkernel-language.dtx} to
-% \file{scrkernel-basics.dtx}}
-% \changes{v3.33}{2021/03/02}{moved to preparation section}
-% Helper macro to remove white spaces from the beginning or the end. This is
-% useful for list processing with \cs{@for} to remove spaces before or after
-% commas. The argument is a macro with the string to be trimmed and the result
-% is stored again in this macro.
-% \begin{macrocode}
-%<*base>
-\newcommand\scr@trim@spaces[1]{%
- \expandafter\scr@sp@def\expandafter#1\expandafter{#1}%
-}
-%</base>
-%</prepare>
-% \end{macrocode}
-% \end{macro}^^A \scr@trim@space
-%
-%
-% \begin{option}{internalonly}
-% \changes{v2.96}{2006/11/26}{added}
-% \changes{v2.97c}{2007/06/20}{no argument needed}
-% \changes{v3.27a}{2019/11/04}{\cs{FamilyKeyStateProcessed} added}
-% \changes{v3.27a}{2019/11/04}{defined only inside the package}
-% \changes{v3.27a}{2019/11/04}{defined temporary inside the classes}
-% \changes{v3.28}{2019/11/18}{deprecated}
-% \begin{macro}{\dont@let@as@internal@defined}
-% \changes{v2.96}{2006/11/26}{added}
-% \changes{v3.28}{2019/11/18}{removed}
-% \end{macro}
-% \begin{macrocode}
-%<*option>
-%<*base>
-\DefineFamily{KOMA}
-\DefineFamilyMember{KOMA}
-\DefineFamilyKey{KOMA}{internalonly}[\relax]{%
- \PackageInfo{scrbase}{Ignoring deprecated option `internalonly'}%
- \FamilyKeyStateProcessed
-}
-\AtEndOfPackage{%
- \RelaxFamilyKey[.scrbase.sty]{KOMA}{internalonly}%
-}
-%</base>
-% \end{macrocode}
-% If \pkg*{scrbase} has been loaded before the class, the option will be
-% reported as unused, despite it already has been processed. We could solve
-% this using a dummy option inside the classes. However, because the option is
-% deprecated the following code should never been used.
-% \begin{macrocode}
-%</option>
-%<*load&class&neveruse>
-\KOMA@key{internalonly}[\relax]{%
- \FamilyKeyStateProcessed
-}
-\AtEndOfClass{\RelaxFamilyKey[.\KOMAClassFileName]{KOMA}{internalonly}}%
-%</load&class&neveruse>
-%<*option>
-% \end{macrocode}
-% \end{option}
-%
-%
-% \changes{v2.96}{2006/08/20}{processing options}
-% \changes{v2.97c}{2007/04/18}{using \cs{KOMAProcessOptions} for processing options}
-% \begin{macrocode}
-%<koma>\KOMAProcessOptions\relax
-%<base>\FamilyProcessOptions{KOMA}\relax
-%</option>
-%<*body>
-% \end{macrocode}
-%
-%
-% \subsection{Some additional math missing from \eTeX}
-%
-% \begin{command}{\XdivY}
-% \changes{v3.05a}{2010/03/10}{added}
-% \meta{X} divided by \meta{Y} and rounded to the lower integer.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\XdivY}[2]{%
- \numexpr ( #1 + #2 / 2 ) / #2 - 1\relax
-}
-%</base>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\XmodY}
-% \changes{v3.05a}{2010/03/10}{added}
-% \meta{X} modulo \meta{Y} (rest of integer division \meta{X} divided by \meta{Y}).
-% \begin{macrocode}
-%<*base>
-\newcommand*{\XmodY}[2]{%
- \numexpr #1 - #2 * \XdivY{#1}{#2}\relax
-}
-%</base>
-% \end{macrocode}
-% \end{command}
-%
-% \subsection{Often needed commands and macros}
-%
-% \begin{macro}{\scr@ForEachTrimmedListElement}
-% \changes{v3.27}{2019/04/16}{new (internal)}
-% Executes \cs{\#2\{\meta{element}\}} for each \meta{element} of the comma
-% separated list \#1. Spaces before for after \meta{element} are eliminated
-% and empty elements are ignored.
-% \begin{macrocode}
-%<*base>
-\newcommand{\scr@ForEachTrimmedListElement}[2]{%
- \begingroup
- \def\reserved@a{\endgroup}%
- \@for \reserved@b:=#1 \do {%
- \scr@trim@spaces\reserved@b
- \ifx\reserved@b\@empty\else
- \edef\reserved@a{%
- \unexpanded\expandafter{\reserved@a#2}%
- {\unexpanded\expandafter{\reserved@b}}%
- }%
- \fi
- }%
- \reserved@a
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@ForEachTrimmedListElement
-%
-% \begin{macro}{\@atdocumenttrue,\@atdocumentfalse,\if@atdocument}
-% \changes{v2.95}{2002/12/05}{added}
-% The boolean switch becomes true while |\begin{document}|. \KOMAScript{} uses
-% it for commands and macros, which are different in the document preamble and
-% the document body.
-% \begin{macrocode}
-%<*base>
-\newif\if@atdocument
-\AtBeginDocument{\@atdocumenttrue}
-\@onlypreamble\@atdocumentrue
-\@onlypreamble\@atdocumentfalse
-%</base>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\let@as@internal@defined}
-% \changes{v2.95}{2002/08/19}{added}
-% \changes{v2.95c}{2006/08/12}{warning while redefining}
-% \changes{v2.96}{2006/11/26}{making user commands from internal macros can
-% be banned for single macros}
-% \changes{v2.97c}{2007/06/20}{making user commands from internal macros can
-% generally banned}
-% \changes{v3.10}{2010/10/26}{\cs{ignorespaces} at \cs{document} patch added}
-% \changes{v3.13a}{2014/08/13}{unwanted white spaces removed}
-% \changes{v3.28}{2019/11/18}{removed}
-% \end{macro}
-%
-% \begin{command}{\ifundefined,\ifundefinedorrelax,\Ifundefinedorrelax}
-% \changes{v2.95}{2002/08/21}{added}
-% \changes{v2.95c}{2006/08/12}{using an internal macro to define it}
-% \changes{v2.97c}{2007/06/20}{\cs{ifundefinedorrelax} replaces \cs{ifundefined}}
-% \changes{v3.28}{2019/11/18}{\cs{ifundefinedorrelax} renamed to
-% \cs{Ifundefinedorrelax}}
-% \changes{v3.29}{2020/01/17}{fix of missing backslash}
-% Same as \cs{scr@ifundefinedorrelax} but at user level.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\Ifundefinedorrelax}{\scr@ifundefinedorrelax}%
-%</base>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\ifnotundefined,\Ifnotundefined}
-% \changes{v2.95}{2002/08/21}{added}
-% \changes{v2.95c}{2006/08/12}{using \eTeX{} if possible}
-% \changes{v3.02c}{2009/02/19}{\eTeX{} is mandatory}
-% \changes{v3.28}{2019/11/18}{\cs{ifnotundefined} renamed to \cs{Ifnotundefined}}
-% This is the opposite to \cs{Ifundefinedorrelax}. Sometimes it is useful.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifnotundefined}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifnotundefined'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifnotundefined' by `\string\Ifnotundefined'%
- }%
- \Ifnotundefined
-}
-\newcommand{\Ifnotundefined}[1]{%
- \ifcsname #1\endcsname
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
-}
-%</base>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\ifstr,\Ifstr}
-% \changes{v2.95}{2004/07/20}{\meta{if code} and \meta{then code} delegated
-% after the command execution}
-% \changes{v3.04b}{2010/01/29}{\cs{edef} replaced by \cs{protected@edef}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr} (but still
-% available as deprecated command)}
-% This command compares two fully expanded token lists. So an alternative name
-% would be \cs{Ifxequal}.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifstr}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifstr'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifstr' by `\string\Ifstr'%
- }%
- \Ifstr
-}
-\newcommand\Ifstr[2]{%
- \begingroup\protected@edef\reserved@a{#1}\protected@edef\reserved@b{#2}%
- \ifx\reserved@a\reserved@b
- \endgroup\expandafter\@firstoftwo
- \else
- \endgroup\expandafter\@secondoftwo
- \fi
-}
-%</base>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\ifstrstart,\Ifstrstart}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart} (but
-% still available as deprecated command)}
-% If the expansion of the first argument starts with expansion of the second
-% one use the third argument, otherwise the fourth.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifstrstart}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifstrstart'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifstrstart' by `\string\Ifstrstart'%
- }%
- \Ifstrstart
-}
-\newcommand*{\Ifstrstart}[2]{%
- \begingroup
- \edef\reserved@a{\noexpand\@ifstrstart{#1}{#2}}%
- \reserved@a{\aftergroup\@firstoftwo}{\aftergroup\@secondoftwo}%
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\@ifstrstart}
-% \changes{v3.12}{2013/11/05}{added}
-% Helper.
-% \begin{macrocode}
-\newcommand*{\@ifstrstart}[2]{%
- \def\reserved@a ##1#2##2\@nil{%
- \if\relax\detokenize{##1}\relax
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }%
- \reserved@a#1#2\@nil
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \@ifstrstart
-% \end{command}^^A \ifstrstart,\Ifstrstart
-%
-% \begin{command}{\IfArgIsEmpty}
-% \changes{v3.19}{2015/08/29}{added}
-% \changes{v3.27}{2019/03/11}{\cs{long}}
-% \changes{v3.27}{2019/07/19}{needed already to process options}
-% If the first argument is absolutely empty execute the second one, otherwise
-% the third one.
-%</body>
-%<*prepare>
-%<*base>
-% \begin{macrocode}
-\newcommand{\IfArgIsEmpty}[1]{%
- \if\relax\detokenize{#1}\relax
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
-}
-% \end{macrocode}
-%</base>
-%</prepare>
-%<*body>
-% \end{command}^^A \IfArgIsEmpty
-%
-%
-% \begin{command}{\ifislengthprimitive,\Ifislengthprimitive}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.36}{2022/02/17}{\cs{ifislengthprimitive} renamed to
-% \cs{Ifislengthprimitive} (but still defined as deprecated)}
-% If the first argument expands to a primitive, that can be used as a length,
-% execute the second argument, otherwise the third one.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifislengthprimitive}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifislengthprimitive'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifislengthprimitive' by `\string\Ifislengthprimitive'%
- }%
- \Ifislengthprimitive
-}
-\newcommand*{\Ifislengthprimitive}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifislengthprimitive#1\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifislengthprimitive}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Helper macro to test against several length like \TeX{} primitives.
-% \begin{macrocode}
-\newcommand*{\scr@ifislengthprimitive}[1]{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifislengthprimitive
- }{%
- \def\reserved@c{\aftergroup\scr@secondoftwoAfterNil}%
- \@for\reserved@a:=\baselineskip,\dp,\hsize,\ht,\lineskip,%
- \parindent,\parskip,\pdfpageheight,\pdfpagewidth,%
- \wd,\vsize \do {%
- \expandafter\Ifstr\expandafter{\expandafter\string\reserved@a}{%
- \meaning #1%
- }{%
- \def\reserved@c{\aftergroup\scr@TestDimenAssignTillNil}%
- }%
- }%
- \reserved@c
- }%
- \endgroup
- #1%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@ifislengthprimitive
-% \end{command}^^A \ifislengthprimitive,\Ifislengthprimitive
-%
-%
-% \begin{command}{\ifisdimen,\Ifisdimen}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.20}{2015/10/19}{re-implemented}
-% \changes{v3.28}{2019/11/19}{\cs{ifisdimen} renamed to \cs{Ifisdimen} (but
-% still defined as deprecated command)}
-% If the first argument expands to a \cs{dimen} register (and nothing else),
-% execute the second argument, otherwise the third one.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifisdimen}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifisdimen'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifisdimen' by `\string\Ifisdimen'%
- }%
- \Ifisdimen
-}
-\newcommand*{\Ifisdimen}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisdimen#1\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifisdimen}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% Helper macro, that tests a macro recursive to expand to a \cs{dimen} register.
-% \begin{macrocode}
-\newcommand*{\scr@ifisdimen}[1]{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifisdimen
- }{%
- \Ifstrstart{\meaning #1}{\string\dimen}{%
- \aftergroup\scr@TestDimenAssignTillNil
- }{%
- \aftergroup\scr@secondoftwoAfterNil
- }%
- }%
- \endgroup
- #1%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@ifisdimen
-% \begin{macro}{\scr@TestDimenAssignTillNil}
-% \changes{v3.20}{2015/10/19}{added}
-% Argument \texttt{\#1} delimited by \cs{@nil} is assigned to a temporary
-% length. If this uses the argument completely, the argument \texttt{\#2} behind
-% \cs{@nil} will executed, otherwise argument \texttt{\#3}. In any case
-% \texttt{\#1} will removed from the input totally.
-% \begin{macrocode}
-\newcommand*\scr@TestDimenAssignTillNil{}
-\def\scr@TestDimenAssignTillNil#1\@nil{%
- \begingroup
- \afterassignment\scr@AfterEndGroupIfArgIsRelaxTillNnil
- \@tempdima=#1\relax\@nnil
-}
-% \end{macrocode}
-% \begin{macro}{\scr@IfAfterEndgroupArgIsRelaxTillNnil,\scr@IfArgIsRelaxAfterRelaxTillNnil}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% The helper macros read an argument delimited by \cs{@nnil}. If this
-% arguments consists of a number of \cs{relax} only, the second argument (first
-% behind \cs{@nnil}) will be execute, otherwise the third (second behind \cs{@nnil}).
-% \begin{macrocode}
-\newcommand*\scr@AfterEndGroupIfArgIsRelaxTillNnil{}
-\def\scr@AfterEndGroupIfArgIsRelaxTillNnil#1\@nnil{%
- \endgroup
- \Ifstr{\detokenize{#1}}{\detokenize{\relax}}{\@firstoftwo}{%
- \Ifstrstart{\detokenize{#1}}{\detokenize{\relax}}{%
- \scr@IfArgIsRelaxAfterRelaxTillNnil #1\@nnil
- }{\@secondoftwo}%
- }%
-}
-\newcommand*\scr@IfArgIsRelaxAfterRelaxTillNnil{}
-\def\scr@IfArgIsRelaxAfterRelaxTillNnil \relax#1\@nnil{%
- \Ifstr{\detokenize{#1}}{\detokenize{\relax}}{\@firstoftwo}{%
- \Ifstrstart{\detokenize{#1}}{\detokenize{\relax}}{%
- \scr@IfArgIsRelaxAfterRelaxTillNnil #1\@nnil
- }{\@secondoftwo}%
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@IfArgIsRelaxTillNnil,\scr@IfArgIsRelaxAfterRelaxTillNnil
-% \end{macro}^^A \scr@TestSkipAssignTillNil
-% \begin{macro}{\scr@@secondoftwoAfterNil,\scr@secondoftwoAfterNil}
-% \changes{v3.20}{2015/10/19}{added}
-% The helper macros reads arguments \texttt{\#1} delimited by \cs{@nil} and
-% executes \texttt{\#3}. We have to take care for the case of an empty first
-% argument, which would make \cs{@nil} to be the argument. Because of this we
-% need two helpers.
-% \begin{macrocode}
-\newcommand*{\scr@secondoftwoAfterNil}{\scr@@secondoftwoAfterNil\@empty}
-\newcommand*{\scr@@secondoftwoAfterNil}{}
-\def\scr@@secondoftwoAfterNil#1\@nil{\@secondoftwo}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@@secondoftwoAfterNil,\scr@secondoftwoAfterNil
-% \end{command}^^A \ifisdimen,\Ifisdimen
-%
-% \begin{command}{\ifisskip,\Ifisskip}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.18a}{2015/07/07}{\cs{baselineskip} and \cs{parskip} are skips}
-% \changes{v3.20}{2015/10/19}{\cs{baselineskip} and \cs{parskip} are not skips}
-% \changes{v3.20}{2015/10/19}{re-implemented}
-% \changes{v3.28}{2019/11/19}{\cs{ifisskip} renamed to \cs{Ifisskip}}
-% If the first argument expands to a \cs{skip} register (and nothing else),
-% execute the second argument, otherwise the third one.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifisskip}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifisskip'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifisskip' by `\string\Ifisskip'%
- }%
- \Ifisskip
-}
-\newcommand*{\Ifisskip}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisskip#1\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifisskip}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% Helper macro, that tests a macro recursive to expand to a \cs{skip} register.
-% \begin{macrocode}
-\newcommand*{\scr@ifisskip}[1]{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifisskip
- }{%
- \Ifstrstart{\meaning #1}{\string\skip}{%
- \aftergroup\scr@TestSkipAssignTillNil
- }{%
- \aftergroup\scr@secondoftwoAfterNil
- }%
- }%
- \endgroup
- #1%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@ifisskip
-% \begin{macro}{\scr@TestSkipAssignTillNil}
-% \changes{v3.20}{2015/10/19}{added}
-% Argument \texttt{\#1} delimited by \cs{@nil} is assigned to a temporary
-% \cs{skip}. If this uses the argument completely, the argument \texttt{\#2} behind
-% \cs{@nil} will executed, otherwise argument \texttt{\#3}. In any case
-% \texttt{\#1} will removed from the input totally.
-% \begin{macrocode}
-\newcommand*\scr@TestSkipAssignTillNil{}
-\def\scr@TestSkipAssignTillNil#1\@nil{%
- \begingroup
- \afterassignment\scr@AfterEndGroupIfArgIsRelaxTillNnil
- \@tempskipa=#1\relax\@nnil
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@TestSkipAssignTillNil
-% \end{command}^^A \ifiskip,\Ifisskip
-%
-% \begin{command}{\ifiscount,\Ifiscount}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.20}{2015/10/19}{re-implemented}
-% \changes{v3.28}{2019/11/19}{\cs{ifiscount} renamed to \cs{Ifiscount}}
-% If the first argument expands to a \cs{count} register (and nothing else),
-% execute the second argument, otherwise the third one.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifiscount}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifiscount'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifiscount' by `\string\Ifiscount'%
- }%
- \Ifiscount
-}
-\newcommand*{\Ifiscount}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifiscount#1\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifiscount}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% Helper macro, that tests a macro recursive to expand to a \cs{count} register.
-% \begin{macrocode}
-\newcommand*{\scr@ifiscount}[1]{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifiscount
- }{%
- \Ifstrstart{\meaning #1}{\string\count}{%
- \aftergroup\scr@TestCountAssignTillNil
- }{%
- \aftergroup\scr@secondoftwoAfterNil
- }%
- }%
- \endgroup
- #1%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@ifiscount
-% \begin{macro}{\scr@TestSkipCountTillNil}
-% \changes{v3.20}{2015/10/19}{added}
-% Argument \texttt{\#1} delimited by \cs{@nil} is assigned to a temporary
-% counter. If this uses the argument completely, the argument \texttt{\#2} behind
-% \cs{@nil} will executed, otherwise argument \texttt{\#3}. In any case
-% \texttt{\#1} will removed from the input totally.
-% \begin{macrocode}
-\newcommand*\scr@TestCountAssignTillNil{}
-\def\scr@TestCountAssignTillNil#1\@nil{%
- \begingroup
- \afterassignment\scr@AfterEndGroupIfArgIsRelaxTillNnil
- \@tempcnta=#1\relax\@nnil
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@TestCountAssignTillNil
-% \end{command}^^A \ifiscount,\Ifiscount
-%
-%
-% \begin{command}{\ifisdimexpr,\Ifisdimexpr}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.20}{2015/10/19}{re-implemented}
-% \changes{v3.28}{2019/11/19}{\cs{ifisdimexpr} renamed to \cs{Ifisdimexpr}}
-% If the first argument expands to a \cs{dimexpr},
-% execute the second argument, otherwise the third one. There is an important
-% difference to \cs{Ifisdimen}: If the argument begins with \cs{dimexpr} but
-% is not a valid \emph{dimension expression} \cs{Ifisdimexpr} detects a
-% \cs{dimexpr}, but using this expression later will result in an error.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifisdimexpr}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifisdimexpr'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifisdimexpr' by `\string\Ifisdimexpr'%
- }%
- \Ifisdimexpr
-}
-\newcommand*{\Ifisdimexpr}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisdimexpr#1\relax\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifisdimexpr}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% Helper macro, that tests a macro recursive to expand to a \cs{dimexpr}.
-% \begin{macrocode}
-\newcommand*{\scr@ifisdimexpr}[1]{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifisdimexpr
- }{%
- \Ifstrstart{\meaning #1}{\string\dimexpr}{%
- \aftergroup\scr@TestDimenAssignTillNil
- }{%
- \aftergroup\scr@secondoftwoAfterNil
- }%
- }%
- \endgroup
- #1%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@ifisdimexpr
-% \end{command}^^A \ifisdimexpr,\Ifisdimexpr
-%
-%
-% \begin{command}{\ifisglueexpr,\Ifisglueexpr}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.20}{2015/10/19}{re-implemented}
-% \changes{v3.28}{2019/11/19}{\cs{ifisglueexpr} renamed to \cs{Ifisglueexpr}}
-% If the first argument expands to a \cs{glueexpr},
-% execute the second argument, otherwise the third one. There is an important
-% difference to \cs{Ifisskip}: If the argument begins with \cs{glueexpr} but
-% is not a valid \emph{glue expression} \cs{Ifisglueexpr} detects a
-% \cs{göueexpr}, but using this expression later will result in an error.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifisglueexpr}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifisglueexpr'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifisglueexpr' by `\string\Ifisglueexpr'%
- }%
- \Ifisglueexpr
-}
-\newcommand*{\Ifisglueexpr}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisglueexpr#1\relax\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifisglueexpr}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% Helper macro, that tests a macro recursive to expand to a \cs{glueexpr}.
-% \begin{macrocode}
-\newcommand*{\scr@ifisglueexpr}[1]{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifisglueexpr
- }{%
- \Ifstrstart{\meaning #1}{\string\glueexpr}{%
- \aftergroup\scr@TestSkipAssignTillNil
- }{%
- \aftergroup\scr@secondoftwoAfterNil
- }%
- }%
- \endgroup
- #1%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@ifisglueexpr
-% \end{command}^^A \ifisglueexpr,\Ifisglueexpr
-%
-%
-% \begin{command}{\ifisnumexpr,\Ifisnumexpr}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.20}{2015/10/19}{re-implemented}
-% \changes{v3.28}{2019/11/19}{\cs{ifisnumexpr} renamed to \cs{Ifisnumexpr}}
-% If the first argument expands to a \cs{numexpr},
-% execute the second argument, otherwise the third one. There is an important
-% difference to \cs{Ifiscount}: If the argument begins with \cs{numexpr} but
-% is not a valid \emph{numerical expression} \cs{Ifisnumexpr} detects a
-% \cs{numexpr}, but using this expression later will result in an error.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifisnumexpr}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifisnumexpr'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifisnumexpr' by `\string\Ifisnumexpr'%
- }%
- \Ifisnumexpr
-}
-\newcommand*{\Ifisnumexpr}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisnumexpr#1\relax\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifisnumexpr}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% Helper macro, that tests a macro recursive to expand to a \cs{numexpr}.
-% \begin{macrocode}
-\newcommand*{\scr@ifisnumexpr}[1]{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifisnumexpr
- }{%
- \Ifstrstart{\meaning #1}{\string\numexpr}{%
- \aftergroup\scr@TestCountAssignTillNil
- }{%
- \aftergroup\scr@secondoftwoAfterNil
- }%
- }%
- \endgroup
- #1%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@ifisnumexpr
-% \end{command}^^A \ifisnumexpr,\Ifisnumexpr
-%
-%
-% \begin{command}{\ifisdefchar,\Ifisdefchar}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.36}{2022/02/17}{\cs{ifisdefchar} renamed to \cs{Ifisdefchar}}
-% If the first argument expands to a value defined using \cs{chardef},
-% execute the second argument, otherwise the third one. Note: If the expanded
-% argument begins with \verb|\char"| but is not a valid \emph{character value}
-% \cs{Ifisdefchar} detects a valid value, but using this value later will
-% result in an error.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifisdefchar}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifisdefchar'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifisdefchar' by `\string\Ifisdefchar'%
- }%
- \Ifisdefchar
-}
-\newcommand*{\Ifisdefchar}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisdefchar#1\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifisdefchar}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% Helper macro, that tests a macro recursive to expand to a \cs{char}.
-% \begin{macrocode}
-\newcommand*{\scr@ifisdefchar}[1]{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifisdefchar
- }{%
- \Ifstrstart{\meaning #1}{\string\char\string"}{%
- \aftergroup\scr@TestCountAssignTillNil
- }{%
- \aftergroup\scr@secondoftwoAfterNil
- }%
- }%
- \endgroup
- #1%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@ifisdefchar
-% \end{command}^^A \ifisdefchar,\Ifisdefchar
-%
-%
-% \begin{command}{\ifiscounter,\Ifiscounter}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.28}{2019/11/19}{\cs{ifiscounter} renamed to \cs{Ifiscounter}}
-% If the first argument expands to a \LaTeX{} counter, execute the second
-% argument, otherwise the third one.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifiscounter}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifiscounter'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifiscounter' by `\string\Ifiscounter'%
- }%
- \Ifiscounter
-}
-\newcommand*{\Ifiscounter}[1]{%
- \begingroup
- \scr@ifundefinedorrelax{c@#1}{%
- \aftergroup\@secondoftwo
- }{%
- \aftergroup\@firstoftwo
- }%
- \endgroup
-}
-%</base>
-% \end{macrocode}
-% \end{command}^^A \ifiscounter,\Ifiscounter
-%
-%
-% \begin{command}{\ifisinteger,\Ifisinteger}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.12a}{2014/01/24}{white space removed}
-% \changes{v3.20}{2015/10/19}{re-implemented}
-% \changes{v3.28}{2019/11/19}{\cs{ifisinteger} renamed to \cs{Ifisinteger}}
-% If the first argument expands to a (positive or negative) integer, execute
-% the second argument, otherwise the third one.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifisinteger}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifisinteger'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifisinteger' by `\string\Ifisinteger'%
- }%
- \Ifisinteger
-}
-\newcommand*{\Ifisinteger}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisinteger#1\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifisinteger}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% Helper macro to test recursive to a algebraic sign or a number without sign.
-% \begin{macrocode}
-\def\scr@ifisinteger#1{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifisinteger\aftergroup#1%
- }{%
- \Ifstrstart{\meaning #1}{\detokenize{the character}}{%
- \if #1-\aftergroup\scr@ifisinteger
- \else
- \if #1+\aftergroup\scr@ifisinteger
- \else
- \ifnum 0=0\if #10\else\if #11\else\if #12\else\if #13\else
- \if #14\else\if #15\else\if #16\else\if #17\else
- \if #18\else\if #19\else 1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \relax
- \aftergroup\scr@TestCountAssignTillNil
- \aftergroup#1%
- \else
- \aftergroup\scr@secondoftwoAfterNil
- \aftergroup#1%
- \fi
- \fi
- \fi
- }{%
- \Ifstrstart{\meaning #1}{\string\char\string"}{%
- \aftergroup\scr@TestCountAssignTillNil
- }{%
- \def\reserved@c{%
- \aftergroup\scr@secondoftwoAfterNil
- }%
- \@for\reserved@a:=\abovedisplayskip,\abovedisplayshortskip,%
- \adjdemerits,%
- \baselineskip,\belowdisplayskip,%
- \belowdisplayshortskip,\binoppenalty,\boxmaxdepth,%
- \brokenpenalty,%
- \clubpenalty,\count,%
- \dimen,\dimexpr,\doublehyphendemerits,\dp,%
- \emergenystretch,\exhyphenpenalty,%
- \finalhyphendemerits,%
- \glueexpr,%
- \hbadness,\hfuzz,\hsize,\ht,\hyphenpenalty,%
- \lastskip,\lastpenalty,\linepenalty,%
- \lineskip,\lineskiplimit,%
- \maxdepth,\numexpr,%
- \overfullrule,%
- \parfillskip,\parindent,\parskip,%
- \pdfpageheight,\pdfpagewidth,%
- \predisplaypenalty,\pretolerance,%
- \relpenalty,\widowpenalty,%
- \skip,\splitmaxdepth,\splittopskip,%
- \tolerance,\topskip,%
- \wd,\vbadness,\vfuzz,\vsize
- \do {%
- \expandafter\Ifstr\expandafter{\expandafter\string\reserved@a}{%
- \meaning #1%
- }{%
- \def\reserved@c{\aftergroup\scr@TestCountAssignTillNil}%
- }%
- }%
- \reserved@c
- }%
- \aftergroup#1%
- }%
- }%
- \endgroup
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@ifisinteger
-% \end{command}^^A \ifisinteger,\Ifisinteger
-%
-%
-% \begin{macro}{\scr@ifrelax@to@nnil}
-% \changes{v3.12}{2013/11/05}{added}
-% Helper macro to be used after an assignment. If everything until the first
-% \cs{@nnil} is exactly one \cs{relax}, the second argument (first after the
-% \cs{@nnil}) will be executed, otherwise the third argument (second after the
-% \cs{@nnil}).
-% \begin{macrocode}
-%<*base>
-\newcommand*{\scr@ifrelax@to@nnil}{}
-\def\scr@ifrelax@to@nnil#1\@nnil{%
- \begingroup
- \def\reserved@a{#1}\def\reserved@b{\relax}%
- \ifx\reserved@a\reserved@b
- \aftergroup\@firstoftwo
- \else
- \aftergroup\@secondoftwo
- \fi
- \endgroup
-}
-%</base>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\ifisdimension,\Ifisdimension}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.12a}{2014/01/24}{white space removed}
-% \changes{v3.20}{2015/10/20}{re-implemented}
-% \changes{v3.28}{2019/11/19}{\cs{ifisdimension} renamed to \cs{Ifisdimension}}
-% If the step by step expansion of the first argument results in a (positive
-% or negative) length, the second argument will be executed, otherwise the
-% third one.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifisdimension}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifisdimension'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifisdimension' by `\string\Ifisdimension'%
- }%
- \Ifisdimension
-}
-\newcommand*{\Ifisdimension}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisdimension#1\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifisdimension}
-% \changes{v3.20}{2015/10/20}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% \changes{v3.28}{2019/11/23}{arithmetic plus sign fixed}
-% To make this command absolutely correct without false positive and false
-% negative results, it would be very complicated. Instead we use a heuristic:
-% If the argument consists of a arbitrary number of arithmetic signs followed
-% by at most one dot, comma or digit or followed by something, that is a valid
-% lengths primitive, we try an assignment. Invalid assignments can result in
-% errors. This is not the best solution but makes things a lot easier.
-% \begin{macrocode}
-\newcommand*{\scr@ifisdimension}[1]{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifisdimension\aftergroup#1%
- }{%
- \Ifstrstart{\meaning #1}{\detokenize{the character}}{%
- \if #1-\aftergroup\scr@ifisdimension
- \else
- \if #1+\aftergroup\scr@ifisdimension
- \else
- \if #1.%
- \aftergroup\scr@TestDimensionAssignTillNil
- \aftergroup#1%
- \else
- \if #1,%
- \aftergroup\scr@TestDimensionAssignTillNil
- \aftergroup#1%
- \else
- \ifnum 0=0\if #10\else\if #11\else\if #12\else\if #13\else
- \if #14\else\if #15\else\if #16\else\if #17\else
- \if #18\else\if #19\else 1\fi\fi
- \fi\fi\fi\fi
- \fi\fi\fi\fi
- \relax
- \aftergroup\scr@TestDimensionAssignTillNil
- \aftergroup#1%
- \else
- \aftergroup\scr@secondoftwoAfterNil
- \aftergroup#1%
- \fi
- \fi
- \fi
- \fi
- \fi
- }{%
- \Ifstrstart{\meaning #1}{\string\char\string"}{%
- \aftergroup\scr@TestDimensionAssignTillNil
- }{%
- \def\reserved@c{%
- \aftergroup\scr@secondoftwoAfterNil
- \aftergroup\@empty
- }%
- \@for\reserved@a:=\abovedisplayskip,\abovedisplayshortskip,%
- \adjdemerits,%
- \baselineskip,\belowdisplayskip,%
- \belowdisplayshortskip,\binoppenalty,\boxmaxdepth,%
- \brokenpenalty,%
- \clubpenalty,\count,%
- \dimen,\dimexpr,\doublehyphendemerits,\dp,%
- \emergenystretch,\exhyphenpenalty,%
- \finalhyphendemerits,%
- \glueexpr,%
- \hbadness,\hfuzz,\hsize,\ht,\hyphenpenalty,%
- \lastskip,\lastpenalty,\linepenalty,%
- \lineskip,\lineskiplimit,%
- \maxdepth,\numexpr,%
- \overfullrule,%
- \parfillskip,\parindent,\parskip,%
- \pdfpageheight,\pdfpagewidth,%
- \predisplaypenalty,\pretolerance,%
- \relpenalty,\widowpenalty,%
- \skip,\splitmaxdepth,\splittopskip,%
- \tolerance,\topskip,%
- \wd,\vbadness,\vfuzz,\vsize
- \do {%
- \expandafter\Ifstr\expandafter{\expandafter\string\reserved@a}{%
- \meaning #1%
- }{%
- \def\reserved@c{\aftergroup\scr@TestDimensionAssignTillNil}%
- }%
- }%
- \reserved@c
- }%
- \aftergroup#1%
- }%
- }%
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\scr@TestDimenionAssignTillNil}
-% \changes{v3.20}{2015/10/19}{added}
-% Argument \texttt{\#1} delimited by \cs{@nil} is assigned to a temporary
-% length. If this uses the argument completely, the argument \texttt{\#2} behind
-% \cs{@nil} will executed, otherwise argument \texttt{\#3}. In any case
-% \texttt{\#1} will removed from the input totally. The difference to
-% \cs{scr@TestDimenAssignTillNil} is the \texttt{pt} test.
-% \begin{macrocode}
-\newcommand*\scr@TestDimensionAssignTillNil{}
-\def\scr@TestDimensionAssignTillNil#1\@nil{%
- \begingroup
- \afterassignment\scr@AfterEndGroupIfArgIsRelaxTillptNnil
- \@tempdima=#1pt\@nnil
-}
-% \end{macrocode}
-% \begin{macro}{\scr@IfArgIsRelaxAfterRelaxTillptNnil,\scr@IfAfterEndgroupArgIsRelaxTillptNnil}
-% \changes{v3.20}{2015/10/19}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% Die Hilfsmakros lesen ein durch \cs{@nnil} begrenztes Argument. Falls dieses
-% Argument nur aus einer Folge von \cs{relax} besteht, wird das erste Argument
-% nach \cs{@nnil} ausgeführt, sonst das zweite.
-% \begin{macrocode}
-\newcommand*\scr@AfterEndGroupIfArgIsRelaxTillptNnil{}
-\def\scr@AfterEndGroupIfArgIsRelaxTillptNnil#1\@nnil{%
- \endgroup
- \Ifstr{\detokenize{#1}}{\detokenize{pt}}{\@firstoftwo}{%
- \Ifstrstart{\detokenize{#1}}{\detokenize{\relax}}{%
- \scr@IfArgIsRelaxAfterRelaxTillptNnil #1\@nnil
- }{\@secondoftwo}%
- }%
-}
-\newcommand*\scr@IfArgIsRelaxAfterRelaxTillptNnil{}
-\def\scr@IfArgIsRelaxAfterRelaxTillptNnil \relax#1pt\@nnil{%
- \Ifstr{\detokenize{#1}}{\detokenize{pt}}{\@firstoftwo}{%
- \Ifstrstart{\detokenize{#1}}{\detokenize{\relax}}{%
- \scr@IfArgIsRelaxAfterRelaxTillptNnil #1\@nnil
- }{\@secondoftwo}%
- }%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@IfArgIsRelaxAfterRelaxTillptNnil,\scr@IfAfterEndgroupArgIsRelaxTillptNnil
-% \end{macro}^^A \scr@DimensionSkipAssignTillNil
-% \end{macro}^^A \scr@ifisdimension
-% \end{command}^^A \ifisdimension,\Ifisdimension
-%
-%
-% \begin{command}{\ifisglue}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.12a}{2014/01/24}{white space removed}
-% \changes{v3.20}{2015/10/21}{re-implemented}
-% \changes{v3.28}{2019/11/19}{\cs{ifisglue} renamed to \cs{Ifisglue}}
-% If the step-by-step expansion of the first argument results in a (positive
-% or negativ) length with glue, the second argument is executed, otherwise the
-% third one.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifisglue}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifisglue'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifisglue' by `\string\Ifisglue'%
- }%
- \Ifisglue
-}
-\newcommand*{\Ifisglue}[1]{%
- \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisglue#1\@nil}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifisglue}
-% \changes{v3.20}{2015/10/21}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}}
-% \changes{v3.28}{2019/11/23}{arithmetic plus sign fixed}
-% \changes{v3.28}{2019/11/23}{in plus case \cs{ifisdimension} replaced by
-% \cs{ifisglue}}
-% To make this command absolutely correct without false positive and false
-% negative results, it would be very complicated. Instead we use a heuristic:
-% If the argument consists of a arbitrary number of arithmetic signs followed
-% by at most one dot, comma or digit or followed by something, that is a valid
-% primitive for skips, we try an assignment. Invalid assignments can result in
-% errors. This is not the best solution but makes things a lot easier.
-% \begin{macrocode}
-\newcommand*{\scr@ifisglue}[1]{%
- \begingroup
- \Ifstrstart{\meaning #1}{\detokenize{macro:}}{%
- \aftergroup\expandafter\aftergroup\scr@ifisglue\aftergroup#1%
- }{%
- \Ifstrstart{\meaning #1}{\detokenize{the character}}{%
- \if #1-\aftergroup\scr@ifisglue
- \else
- \if #1+\aftergroup\scr@ifisglue
- \else
- \if #1.%
- \aftergroup\scr@TestGlueAssignTillNil
- \aftergroup#1%
- \else
- \if #1,%
- \aftergroup\scr@TestGlueAssignTillNil
- \aftergroup#1%
- \else
- \ifnum 0=0\if #10\else\if #11\else\if #12\else\if #13\else
- \if #14\else\if #15\else\if #16\else\if #17\else
- \if #18\else\if #19\else 1\fi\fi
- \fi\fi\fi\fi
- \fi\fi\fi\fi
- \relax
- \aftergroup\scr@TestGlueAssignTillNil
- \aftergroup#1%
- \else
- \aftergroup\scr@secondoftwoAfterNil
- \aftergroup#1%
- \fi
- \fi
- \fi
- \fi
- \fi
- }{%
- \Ifstrstart{\meaning #1}{\string\char\string"}{%
- \aftergroup\scr@TestGlueAssignTillNil
- }{%
- \def\reserved@c{%
- \aftergroup\scr@secondoftwoAfterNil
- \aftergroup\@empty
- }%
- \@for\reserved@a:=\abovedisplayskip,\abovedisplayshortskip,%
- \adjdemerits,%
- \baselineskip,\belowdisplayskip,%
- \belowdisplayshortskip,\binoppenalty,\boxmaxdepth,%
- \brokenpenalty,%
- \clubpenalty,\count,%
- \dimen,\dimexpr,\doublehyphendemerits,\dp,%
- \emergenystretch,\exhyphenpenalty,%
- \finalhyphendemerits,%
- \glueexpr,%
- \hbadness,\hfuzz,\hsize,\ht,\hyphenpenalty,%
- \lastskip,\lastpenalty,\linepenalty,%
- \lineskip,\lineskiplimit,%
- \maxdepth,\numexpr,%
- \overfullrule,%
- \parfillskip,\parindent,\parskip,%
- \pdfpageheight,\pdfpagewidth,%
- \predisplaypenalty,\pretolerance,%
- \relpenalty,\widowpenalty,%
- \skip,\splitmaxdepth,\splittopskip,%
- \tolerance,\topskip,%
- \wd,\vbadness,\vfuzz,\vsize
- \do {%
- \expandafter\Ifstr\expandafter{\expandafter\string\reserved@a}{%
- \meaning #1%
- }{%
- \def\reserved@c{\aftergroup\scr@TestGlueAssignTillNil}%
- }%
- }%
- \reserved@c
- }%
- \aftergroup#1%
- }%
- }%
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\scr@TestGlueAssignTillNil}
-% \changes{v3.20}{2015/10/21}{added}
-% Argument \texttt{\#1} delimited by \cs{@nil} is assigned to a temporary
-% \cs{skip}. If this uses the argument completely, the argument \texttt{\#2} behind
-% \cs{@nil} will executed, otherwise argument \texttt{\#3}. In any case
-% \texttt{\#1} will removed from the input totally. The difference to
-% \cs{scr@TestSkipAssignTillNil} is the \texttt{pt} test.
-% \begin{macrocode}
-\newcommand*\scr@TestGlueAssignTillNil{}
-\def\scr@TestGlueAssignTillNil#1\@nil{%
- \begingroup
- \afterassignment\scr@AfterEndGroupIfArgIsRelaxTillptNnil
- \@tempskipa=#1pt\@nnil
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@TestGlueAssignTillNil
-% \end{macro}^^A \scr@ifisglue
-% \end{command}^^A \ifisglue,\Ifisglue
-%
-%
-% \begin{command}{\ifnumber,\Ifnumber}
-% \changes{v3.12}{2013/10/30}{using \cs{aftergroup} instead of
-% \cs{endgroup}\cs{expandafter}}
-% \changes{v3.12a}{2014/01/24}{white space removed}
-% \changes{v3.27}{2019/08/26}{empty arguments fixed}
-% \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}}
-% If the first argument is a positive integer, the second argument is
-% executed, otherwise the third.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifnumber}{%
-% \end{macrocode}
-% Note: We must not output the warning if package \pkg{babelbib} has been
-% loaded, because the package defines the same command but only, if it has not
-% been defined already. Unfortunately and against all conventions, it even
-% defines internal macros of \pkg*{scrbase} with prefix \cs{scr@}. This is
-% very dangerous and would result in errors, if \pkg{babelbib} is loaded
-% before \pkg*{scrbase}. Maybe I will remove this special treatment of
-% \pkg{babelbib} after switching over to \pkg{biblatex} for the \KOMAScript{}
-% manuals.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{ver@babelbib.sty}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifnumber'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifnumber' by `\string\Ifnumber'%
- }%
- }{}%
- \Ifnumber
-}
-\newcommand\Ifnumber[1]{%
- \begingroup\@tempswafalse\let\scr@next\scr@test@number
- \IfArgIsEmpty{#1}{}{\expandafter\scr@next#1\scr@next}%
- \if@tempswa
- \aftergroup\@firstoftwo
- \else
- \aftergroup\@secondoftwo
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\test@number,\scr@test@number}
-% \changes{v3.36}{2022/02/17}{\cs{test@number} renamed to \cs{scr@test@number}}
-% For the real test scan the first argument token by token.
-% \begin{macrocode}
-\newcommand*{\scr@test@number}[1]{%
- \ifx \scr@next#1%
- \let\scr@next\relax
- \else
- \@tempcnta=\expandafter\expandafter\expandafter\number
- \expandafter`#1\relax
- \ifnum \@tempcnta>47
- \ifnum \@tempcnta<58
- \@tempswatrue
- \else\@tempswafalse\fi
- \else\@tempswafalse\fi
-% \end{macrocode}
-% Remove the rest, if a non-digit has been found.
-% \begin{macrocode}
- \if@tempswa\else\let\scr@next\gobble@till@scr@next\fi
- \fi
- \scr@next
-}
-% \end{macrocode}
-% \begin{macro}{\gobble@tillscr@@next}
-% Use a delimited \emph{empty} macro.
-% \begin{macrocode}
-\newcommand*{\gobble@till@scr@next}{}
-\def\gobble@till@scr@next#1\scr@next{}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \gobble@tillscr@next
-% \end{macro}^^A \test@number, \scr@test@number
-% \end{command}^^A \ifnumber,\Ifnumber
-%
-% \begin{command}{\ifintnumber,\Ifintnumber}
-% \changes{v3.12}{2013/10/30}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifintnumber} renamed to
-% \cs{Ifintnumber}}
-% If the first argument is a positive or negative integer, execute the second
-% argument, otherwise the third one. There are multiple arithmetic signs allowed.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifintnumber}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifintnumber'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifintnumber' by `\string\Ifintnumber'%
- }%
- \Ifintnumber
-}
-\newcommand\Ifintnumber[1]{%
- \begingroup\@tempswafalse\let\scr@next\scr@test@sign
- \expandafter\scr@next#1\scr@next
- \if@tempswa
- \aftergroup\@firstoftwo
- \else
- \aftergroup\@secondoftwo
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\scr@test@sign}
-% \changes{v3.12}{2013/10/30}{added}
-% \begin{macrocode}
-\newcommand*{\scr@test@sign}[1]{%
- \ifx \scr@next#1
- \let\scr@next\relax
- \else
- \if #1-%
- \else
- \ifx #1+%
- \else
- \def\scr@next{\let\scr@next\scr@test@number\scr@next #1}%
- \fi
- \fi
- \fi
- \scr@next
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@test@sign
-% \end{command}^^A \ifintnumber,\Ifintnumber
-%
-% \begin{command}{\ifdimen,\Ifdimen}
-% \changes{v3.28}{2019/11/18}{renamed to \cs{Ifdimen}}
-% If the first argument is a dimension number, the second argument will be
-% executed, otherwise the third.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ifdimen}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifdimen'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifdimen' by `\string\Ifdimen'%
- }%
- \Ifdimen
-}
-\newcommand{\Ifdimen}[1]{%
- \begingroup\@tempswatrue\let\scr@next\scr@test@posdimen
- \expandafter\scr@test@dimen#1\scr@next
- \if@tempswa
- \endgroup\expandafter\@firstoftwo
- \else
- \endgroup\expandafter\@secondoftwo
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\test@dimen,\scr@test@dimen}
-% \changes{v3.36}{2022/02/17}{\cs{test@dimen} renamed to \cs{scr@test@dimen}}
-% We have to remove the arithmetic signs.
-% \begin{macrocode}
-\newcommand*{\scr@test@dimen}[1]{%
- \ifx -#1\else\ifx +#1\else
- \def\scr@next{\let\scr@next\scr@test@posdimen\scr@next#1}\fi\fi
- \scr@next
-}
-% \end{macrocode}
-% \begin{macro}{\test@posdimen,\scr@test@posdimen}
-% \changes{v3.36}{2022/02/17}{\cs{test@posdimen} renamed to \cs{scr@test@posdimen}}
-% Is the rest a dimension. Despite this is not correct, we allow more than one
-% decimal point or decimal comma. Should this be changed?
-% \begin{macrocode}
-\newcommand*{\scr@test@posdimen}[1]{%
- \ifx \scr@next#1%
- \@tempswafalse\let\scr@next\relax
- \else
- \if .#1\else\if ,#1\else
- \@tempcnta=%
- \expandafter\expandafter\expandafter\number\expandafter`#1\relax
- \ifnum \@tempcnta>47
- \ifnum \@tempcnta<58
- \else\def\scr@next{\scr@test@dimunt#1}\fi
- \else\def\scr@next{\scr@test@dimunt#1}\fi
- \fi\fi
- \fi
- \scr@next
-}
-% \end{macrocode}
-% \begin{macro}{\test@dimunt,\test@trueunt,\scr@test@dimunt,\scr@test@trueunt}
-% Last but not least the unit has to be tested. We have standard units and
-% true units. So we first cut of a ``\texttt{true}''.
-% \begin{macrocode}
-\newcommand*{\scr@test@dimunt}{}
-\def\scr@test@dimunt#1\scr@next{%
- \expandafter\scr@test@trueunt#1truetrue\scr@test@trueunt
-}
-\newcommand*{\scr@test@trueunt}{}
-\def\scr@test@trueunt#1true#2true#3\scr@test@trueunt{%
- \edef\reserved@a{#1}%
- \ifx\reserved@a\@empty\scr@test@@dimunt{#2}\else\scr@test@@dimunt{#1}\fi
-}
-% \end{macrocode}
-% \begin{macro}{\test@@ifdimunt,\scr@test@@dimunt}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Currently we know eleven or twelve units. Unit \texttt{px} is only valid
-% with PDF output.
-% \begin{macrocode}
-\newcommand*\scr@test@@dimunt[1]{%
- \@tempswafalse
- \Ifstr{#1}{pt}{\@tempswatrue}{%
- \Ifstr{#1}{pc}{\@tempswatrue}{%
- \Ifstr{#1}{in}{\@tempswatrue}{%
- \Ifstr{#1}{bp}{\@tempswatrue}{%
- \Ifstr{#1}{cm}{\@tempswatrue}{%
- \Ifstr{#1}{mm}{\@tempswatrue}{%
- \Ifstr{#1}{dd}{\@tempswatrue}{%
- \Ifstr{#1}{cc}{\@tempswatrue}{%
- \Ifstr{#1}{sp}{\@tempswatrue}{%
- \Ifstr{#1}{ex}{\@tempswatrue}{%
- \Ifstr{#1}{em}{\@tempswatrue}{%
- \scr@ifpdfoutput{%
- \Ifstr{#1}{px}{\@tempswatrue}{}%
- }{}%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \test@@ifdimunt,\scr@test@@dimunt
-% \end{macro}^^A \test@dimunt,\test@trueunt,\scr@test@dimunt,\scr@test@trueunt
-% \end{macro}^^A \scr@test@posdimen
-% \end{macro}^^A \scr@test@dimen
-% \end{command}^^A \ifdimen,\Ifdimen
-%
-%
-% \begin{command}{\ifpdftex}
-% \changes{v2.95}{2002/08/19}{added}
-% \changes{v3.28}{2019/11/18}{removed}
-% \end{command}
-% \begin{macro}{\scr@ifpdftex}
-% \changes{v2.95}{2002/08/19}{added}
-% \changes{v3.30}{2020/03/06}{\cs{ifnotundefined} replaced by \cs{Ifnotundefined}}
-% If \pdfTeX{} is used, execute the first argument, otherwise the
-% second. Note, we do not read the arguments but delegate them to
-% \cs{Ifnotundefined}.
-% \begin{macrocode}
-%<*base>
-\newcommand{\scr@ifpdftex}{\Ifnotundefined{pdftexversion}}
-%</base>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\scr@ifluatex}
-% \changes{v3.21}{2016/05/27}{added}
-% \changes{v3.30}{2020/03/06}{\cs{ifnotundefined} replaced by \cs{Ifnotundefined}}
-% If \LuaTeX{} is used, execute the first argument, otherwise the
-% second. Note, we do not read the arguments but delegate them to
-% \cs{Ifnotundefined}.
-% \begin{macrocode}
-%<*base>
-\newcommand{\scr@ifluatex}{\Ifnotundefined{luatexversion}}
-%</base>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\scr@ifpdforluatex}
-% \changes{v3.21}{2016/05/27}{added}
-% If either \LuaTeX{} or \pdfTeX{} is used, execute the first argument,
-% otherwise the second. Note, we do not read the arguments but delegate them
-% to \cs{@firstoftwo} and \cs{@secondoftwo}.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\scr@ifpdforluatex}{%
- \scr@ifpdftex{\@firstoftwo}{\scr@ifluatex{\@firstoftwo}{\@secondoftwo}}%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\ifvtex,\ifVTeX}
-% \changes{v2.95}{2002/08/19}{added}
-% \changes{v2.97c}{2007/06/20}{\cs{ifvtex} renamed to \cs{ifVTeX}}
-% \changes{v3.28}{2019/11/18}{removed}
-% \end{command}
-% \begin{macro}{\scr@ifvtex,\scr@ifVTeX}
-% \changes{v2.95}{2002/08/19}{added}
-% \changes{v2.97c}{2007/06/20}{\cs{scr@ifvtex} renamed to \cs{scr@ifVTeX}}
-% \changes{v3.30}{2020/03/06}{\cs{ifnotundefined} replaced by \cs{Ifnotundefined}}
-% If \VTeX{} is used, execute the first argument, otherwise the
-% second. Note, we do not read the arguments but delegate them to
-% \cs{Ifnotundefined}.
-% \begin{macrocode}
-%<*base>
-\newcommand{\scr@ifVTeX}{\Ifnotundefined{VTeXversion}}
-%</base>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\ifpdfoutput,\Ifpdfoutput}
-% \changes{v2.7g}{2001/04/17}{added}
-% \changes{v2.8q}{2001/10/19}{\cs{pdfoutput} does not become \cs{relax} if it
-% was undefined before}
-% \changes{v2.8q}{2001/10/19}{\cs{ifpdfoutput} is only defined if new}
-% \changes{v2.8q}{2001/10/19}{usage of \cs{scr@ifpdfoutput}}
-% \changes{v3.28}{2019/11/18}{\cs{ifpdfoutput} renamed to \cs{Ifpdfoutput}}
-% \begin{macro}{\scr@ifpdfoutput}
-% \changes{v2.8q}{2001/10/19}{added}
-% \changes{v2.8q}{2001/11/13}{full functional}
-% \changes{v2.95}{2002/08/21}{knowing \VTeX}
-% \changes{v2.95}{2004/07/20}{expandable}
-% \changes{v3.21}{2016/05/27}{works for \LuaTeX{} after version 0.85}
-% If the output (currently) produces a PDF, the first argument is executed,
-% otherwise the second one. This macro is used inside the implementation of
-% option \opt{pagesize}, so we cannot remove it or declare it as deprecated.
-% \begin{macrocode}
-%<*base>
-\newcommand{\scr@ifpdfoutput}{%
- \scr@ifundefinedorrelax{pdfoutput}{%
- \scr@ifundefinedorrelax{outputmode}{%
- \scr@ifundefinedorrelax{OpMode}{%
- \expandafter\@secondoftwo%
- }{%
- \ifnum\OpMode=1
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }%
- }{%
- \ifnum\outputmode>0
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }%
- }{%
- \ifnum\pdfoutput>0
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }%
-}%
-\providecommand*{\ifpdfoutput}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifpdfoutput'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifpdfoutput' by `\string\Ifpdfoutput'%
- }%
- \Ifpdfoutput
-}
-\newcommand*{\Ifpdfoutput}{\scr@ifpdfoutput}
-%</base>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\ifpsoutput,\Ifpsoutput}
-% \changes{v2.95}{2002/08/21}{added}
-% \changes{v3.28}{2019/11/18}{renamed to \cs{Ifpsoutput}}
-% \begin{macro}{\scr@ifpsoutput}
-% \changes{v2.95}{2002/08/21}{added}
-% \changes{v2.95}{2004/07/20}{expandable}
-% \changes{v3.30}{2020/03/06}{\cs{ifnotundefined} replaced by \cs{Ifnotundefined}}
-% If the output is (currently) expected to be PS some time, the first argument
-% is executed, otherwise the second one. This macro is used inside the
-% implementation of option \opt{pagesize}, so we cannot remove it or declare
-% it as deprecated.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\scr@ifpsoutput}{%
- \Ifnotundefined{if@dvips}{%
- \if@dvips
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }{%
- \Ifnotundefined{OpMode}{%
- \ifnum\OpMode=2
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }{%
- \expandafter\@secondoftwo
- }%
- }%
-}
-\providecommand*{\ifpsoutput}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifpsoutput'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifpsoutput' by `\string\Ifpsoutput'%
- }%
- \Ifpsoutput
-}
-\newcommand*{\Ifpsoutput}{\scr@ifpsoutput}
-%</base>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\ifdvioutput,\Ifdvioutput}
-% \changes{v2.95}{2002/08/21}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifdvioutput} renamed to \cs{Ifdvioutput}}
-% \begin{macro}{\scr@ifdvioutput}
-% \changes{v2.95}{2002/08/21}{added}
-% \changes{v2.95}{2004/07/20}{expandable}
-% \changes{v3.23}{2017/02/14}{works for \LuaTeX{} after version 0.85}
-% If the output (currently) produces a DVI, the first argument is executed,
-% otherwise the second one. This macro is used inside the implementation of
-% option \opt{pagesize}, so we cannot remove it or declare it as deprecated.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\scr@ifdvioutput}{%
- \scr@ifundefinedorrelax{pdfoutput}{%
- \scr@ifundefinedorrelax{outputmode}{%
- \scr@ifundefinedorrelax{OpMode}{%
- \expandafter\@firstoftwo
- }{%
- \ifnum\OpMode=0
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }%
- }{%
- \ifnum\outputmode>0
- \expandafter\@secondoftwo
- \else
- \expandafter\@firstoftwo
- \fi
- }%
- }{%
- \ifnum\pdfoutput=0
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }%
-}
-\providecommand*{\ifdvioutput}{%
- \PackageWarning{scrbase}{Usage of deprecated command
- `\string\ifdvioutput'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifdvioutput' by `\string\Ifdvioutput'%
- }%
- \Ifdvioutput
-}
-\newcommand*{\Ifdvioutput}{\scr@ifdvioutput}
-%</base>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{macro}{\scr@smashdp}
-% \changes{v2.97c}{2007/09/17}{added}
-% \changes{v3.02a}{2009/01/23}{using own definition instead of \cs{smash}}
-% \changes{v3.36}{2022/02/18}{as robust as \cs{smash}}
-% Generate a box and output it with height and width but no depth. Note: Using
-% internal macros \cs{finsm@sh}, \cs{mathsm@sh} and \cs{makesm@ash} from the
-% \LaTeX{} kernel is a very ugly hack and dangerous. Using \cs{smash} itself
-% would be problematic, because \pkg{amsmath} redefines it and the new
-% definition is not fully compatible. But maybe a better definition could be
-% found depending on, whether \pkg{amsmath} has been loaded or not.
-% \begin{macrocode}
-%<*base>
-\DeclareRobustCommand{\scr@smashdp}[1]{%
- \relax
- \begingroup
- \def\finsm@sh{\dp\z@\z@ \leavevmode\box\z@}%
- \ifmmode
- \expandafter\mathpalette\expandafter\mathsm@sh
- \else
- \expandafter\makesm@sh
- \fi
- {#1}%
- \endgroup
-}
-%</base>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\IfRTL}
-% \changes{v3.24}{2017/05/04}{added}
-% \changes{v3.36}{2022/02/18}{white space removed}
-% If we are in the right-to-left mode of a package like \pkg{bidi} the first
-% argument will be used otherwise the second one.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\IfRTL}{%
- \scr@ifundefinedorrelax{if@RTL}{\@secondoftwo}{%
- \expandafter\ifx\csname if@RTL\expandafter\endcsname
- \csname iftrue\endcsname
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }%
-}
-%</base>
-% \end{macrocode}
-% \end{command}^^A \IfRTL
-% \begin{command}{\IfLTR}
-% \changes{v3.24}{2017/05/04}{added}
-% \changes{v3.36}{2022/02/18}{white space removed}
-% If we are not in the right-to-left mode of a package like \pkg{bidi} any
-% kind of left-to-right mode is assumed and the first argument is used,
-% otherwise the second one.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\IfLTR}{%
- \scr@ifundefinedorrelax{if@RTL}{\@firstoftwo}{%
- \expandafter\ifx\csname if@RTL\expandafter\endcsname
- \csname iftrue\endcsname
- \expandafter\@secondoftwo
- \else
- \expandafter\@firstoftwo
- \fi
- }%
-}
-%</base>
-% \end{macrocode}
-% \end{command}^^A \IfLTR
-%
-% \begin{command}{\PackageInfoNoLine}
-% \changes{v2.97d}{2007/10/03}{added}
-% Like \cs{PackageInfo} but without output of line number at the end.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\PackageInfoNoLine}[2]{%
- \PackageInfo{#1}{#2\@gobble}%
-}
-%</base>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\ClassInfoNoLine}
-% \changes{v2.98c}{2008/02/15}{added}
-% Like \cs{ClassInfo} but without output of line number at the end.
-% \begin{macrocode}
-%<*base>
-\providecommand*{\ClassInfoNoLine}[2]{%
- \ClassInfo{#1}{#2\@gobble}%
-}
-%</base>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macro}{\@removefromreset}
-% \changes{v3.15}{2014/11/21}{added}%
-% For \LaTeX{} releases before 2018/04/01 and without using a package like
-% \pkg{remreset} or \pkg{chngcntr} we still need \cs{@removefromreset}.
-% \begin{macrocode}
-%<*base>
-\providecommand*\@removefromreset[2]{%
- {%
- \expandafter\let\csname c@#1\endcsname\@removefromreset
- \def\@elt##1{%
- \expandafter\ifx\csname c@##1\endcsname\@removefromreset
- \else\noexpand\@elt{##1}\fi
- }%
- \expandafter\xdef\csname cl@#2\endcsname{\csname cl@#2\endcsname}%
- }%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\IfActiveMkBoth}
-% \changes{v3.26}{2018/09/03}{added}
-% \begin{macro}{\if@scrActiveMkBoth}
-% \changes{v3.26}{2018/09/03}{added}
-% \changes{v3.27}{2019/07/26}{handling for \cs{marks}}
-% This command test, whether or not \cs{@mkboth} does change a mark or not.
-% \begin{macrocode}
-%<*base>
-\newif\ifscr@ActiveMkBoth
-\def\scr@ActiveMkBothfalse{\global\let\ifscr@ActiveMkBoth\iffalse}
-\def\scr@ActiveMkBothtrue {\global\let\ifscr@ActiveMkBoth\iftrue}
-\newcommand*{\IfActiveMkBoth}{%
- \begingroup
- \def\markboth##1##2{\scr@ActiveMkBothtrue}%
- \def\markright##1{\scr@ActiveMkBothtrue}%
- \def\markleft##1{\scr@ActiveMkBothtrue}%
- \def\markboth##1{\scr@ActiveMkBothtrue}%
- \def\markdouble##1{\scr@ActiveMkBothtrue}%
- \def\mark##1{\scr@ActiveMkBothtrue}%
- \def\marks##1##2{\scr@ActiveMkBothtrue}%
- \scr@ActiveMkBothfalse
- \setbox\@tempboxa\vbox{\@mkboth{}{}}%
- \endgroup
- \ifscr@ActiveMkBoth
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \if@scrActiveMkBoth
-% \end{command}^^A \IfActiveMkBoth
-%
-%
-% \subsection{Definition of the \KOMAScript{} \pkg*{keyval} main handling}
-%
-% \begin{command}{\FamilyExecuteOptions}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.04b}{2010/01/29}{\cs{edef} replaced by \cs{protected@edef}}
-% \changes{v3.04b}{2010/02/02}{prevent overwriting of \cs{scr@key@atlist} and
-% \cs{scr@key@name} in \cs{setkeys}}
-% \changes{v3.12}{2013/03/04}{re-implemented}
-% \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.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}}
-% Similar to \cs{ExecuteOptions} but with \pkg{keyval} options. The command
-% also is re-entrant. Note: The hooks are local to every usage.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyExecuteOptions}[2][.\@currname.\@currext]{%
- \@FamilyExecuteOptions[{#1}]{#2}%
-}
-\newcommand{\@FamilyExecuteOptions}[3][.\@currname.\@currext]{%
- \scr@ifundefinedorrelax{scr@after@options@#2@hook}{%
- \@namedef{scr@after@options@#2@hook}{%
- \@namedef{scr@after@options@#2@hook}{}%
- }%
- }{%
- \expandafter\edef\csname scr@after@options@#2@hook\endcsname{%
- \noexpand\@namedef{scr@after@options@#2@hook}{%
- \unexpanded\expandafter\expandafter\expandafter
- {\csname scr@after@options@#2@hook\endcsname}%
- }%
- }%
- }%
- \@for\scr@key@atlist:=#3\do{%
- \expandafter\scr@key@split@name@value\scr@key@atlist==\@nil
- \ifx\scr@key@name\@empty\else
- \ifx\scr@key@name\space\else
- \scr@ifundefinedorrelax{KV@#2@\scr@key@name}{%
- \scr@ifundefinedorrelax{KV@#2#1@\scr@key@name}{%
-% \end{macrocode}
-% \changes{v3.20}{2015/11/18}{special treatment of \opt{@else@} option}
-% Neither family nor member option found. But maybe special option
-% \opt{@else@} exists. In this case the current option is set as value of
-% \opt{@else@}.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{KV@#2#1@@else@}{%
- \PackageError{scrbase}{%
- unknown option
- `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
- }{%
- Member `#1' of family `#2'\MessageBreak
- cannot handle option `\scr@key@name'.\MessageBreak
- So it cannot be set%
- \ifx\scr@key@value\@empty\else
- \space to value
- `\expandafter\detokenize\expandafter{\scr@key@value}'%
- \fi.%
- }%
- }{%
- \scr@execute@elseoption{#2#1}%
-% \end{macrocode}
-% In difference to other options, for \opt{@else@} all states different from
-% \cs{FamilyKeyStateProcessed} have to be reported as error of the
-% current/original option.
-% \begin{macrocode}
- \ifx\FamilyKeyState\FamilyKeyStateProcessed\else
- \PackageError{scrbase}{%
- unknown option
- \ifx\FamilyKeyState\FamilyKeyStateUnknownValue
- value at
- \fi
- `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
- }{%
- Member `#1' of family `#2'\MessageBreak
- cannot handle option `\scr@key@name'.\MessageBreak
- So it cannot be set%
- \ifx\scr@key@value\@empty\else
- \space to value
- `\expandafter\detokenize\expandafter{\scr@key@value}'%
- \fi.%
- }%
- \fi
- }%
- }{%
- \scr@execute@option{#2#1}%
- }%
- }{%
- \scr@execute@option{#2}%
- \Ifstr{#1}{}{}{%
-% \end{macrocode}
-% \changes{v3.20}{2015/11/18}{member option test after execution of family
-% option fixed}
-% If a family option has been found and executed an existing member option
-% still has to be executed. If no member option exists, also an existing
-% \opt{@else@} option of the member has to been used. But in this case, the
-% states different from \cs{FamilyKeyStateProcessed} are not errors.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{KV@#2#1@\scr@key@name}{%
- \scr@ifundefinedorrelax{KV@#2#1@@else@}{}{%
- \scr@execute@elseoption{#2#1}%
- }%
- }{%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \scr@execute@option{#2#1}%
- \FamilyKeyStateProcessed
- \else
- \scr@execute@option{#2#1}%
- \fi
- }%
- }%
- }%
- \scr@show@key@state@error
- \fi
- \fi
- }%
- \@nameuse{scr@after@options@#2@hook}%
-}
-%</base>
-% \end{macrocode}
-% \begin{macro}{\scr@show@key@state@error}
-% \changes{v3.12}{2013/03/04}{added}
-% \changes{v3.27}{2019/10/02}{improved error message}
-% Show depending on \cs{FamilyKeyState} a error message. All information to
-% the error has to be set to \cs{FamilyMemberOfKey} (member or \cs{@empty}),
-% \cs{FamilyOfKey} (family or \cs{@empty}), \cs{scr@key@atlest} (option as it
-% was in the option list), \cs{scr@key@name} (\meta{key} of the option), and
-% \cs{scr@key@value} (\meta{value} of the option). Note: \cs{scr@key@atlist}
-% and \cs{scr@key@value} can contain macros and will be output using
-% \cs{detokenize}.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\scr@show@key@state@error}{%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed\else
- \PackageError{scrbase}{%
- unknown option
- \ifx\FamilyKeyState\FamilyKeyStateUnknownValue
- value at
- \fi
- `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
- }{%
- Option
- `\expandafter\detokenize\expandafter{\scr@key@name}'\MessageBreak
- \ifx\FamilyMemberOfKey\@empty\else
- of member `\FamilyMemberOfKey'\MessageBreak
- \fi
- \ifx\FamilyOfKey\@empty\else
- of family `\FamilyOfKey'\MessageBreak
- \fi
- \ifx\FamilyKeyState\FamilyKeyStateNeedValue
- expects a value, but has been used without any value.%
- \else
- cannot handle value\MessageBreak
- `\expandafter\detokenize\expandafter{\scr@key@value}',%
- \MessageBreak
- \ifx\FamilyKeyState\FamilyKeyStateUnknownValue
- because this is an unsupported value.%
- \else
- because \FamilyKeyState.
- \fi
- \fi
- }%
- \fi
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@show@key@state@error
-% \end{macro}^^A \@FamilyExecuteOptions
-% \end{command}^^A \FamilyExecuteOptions
-%
-% \begin{command}{\KOMAExecuteOptions}
-% \changes{v2.97c}{2007/04/19}{added}
-% \changes{v3.00}{2008/04/30}{no optional argument}
-% \changes{v3.12}{2013/03/04}{can be used after the document preamble}
-% Executes a \meta{list of options} (\texttt{\#3}) of a \meta{member} (optional
-% \texttt{\#1}) of a \meta{family} (\texttt{\#2}). The default for the
-% \meta{member} is \file{.\cs{@currname}.\cs{@currext}}. Note: If
-% \cs{KOMAExcuteOptions} is not used while loading a class or package, the
-% optional first argument is not optional, but has to be set correctly! And
-% because filenames can be changed, it is recommended to \emph{always} use the
-% optional argument to set a definite \meta{member}.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMAExecuteOptions}[1][.\@currname.\@currext]{%
- \FamilyExecuteOptions[#1]{KOMA}%
-}
-%</koma>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\FamilyOptions}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.12}{2013/03/02}{re-implemented}
-% \changes{v3.12}{2013/03/02}{\cs{scr@after@options@\#1@hook}}
-% \changes{v3.14}{2014/10/17}{second argument is \cs{long}}
-% \begin{macro}{\@FamilyOptions}
-% \changes{v3.14}[2014/10/17]{added}
-% \changes{v3.27}{2019/10/02}{improved error message}
-% \begin{macro}{\Family@Options}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.12}{2013/03/04}{removed}
-% \end{macro}^^A \Family@Options
-% Used to set the options of a family. The first argument (\texttt{\#1}) is
-% the \meta{family} and the second (\texttt{\#2}) a \meta{list of options}. If
-% a \meta{key} or a \meta{value} to a \meta{key} in the \meta{list of options}
-% does not exist, an error is reported. The command itself is re-entrant, so
-% it can be used inside the definition of an option. But in this case the hook
-% is local to the local usage of the command.
-% \begin{macrocode}
-%<*base>
-\newcommand{\FamilyOptions}[1]{\@FamilyOptions{#1}}
-\newcommand{\@FamilyOptions}[2]{%
- \scr@ifundefinedorrelax{scr@after@options@#1@hook}{%
- \@namedef{scr@after@options@#1@hook}{%
- \@namedef{scr@after@options@#1@hook}{}%
- }%
- }{%
- \expandafter\edef\csname scr@after@options@#1@hook\endcsname{%
- \noexpand\@namedef{scr@after@options@#1@hook}{%
- \unexpanded\expandafter\expandafter\expandafter
- {\csname scr@after@options@#1@hook\endcsname}%
- }%
- }%
- }%
-% \end{macrocode}
-% \changes{v3.23}{2017/02/16}{\cs{AtEndOfFamilyOptions*} hook added}
-% From version 3.23 the new hook before \cs{AtEndOfFamilyOptions*} has to be
-% initialized. First step is a kind of pre-initialization: The hook is
-% defined empty, if it does not already exist. So if the hook exists empty we
-% can now recognize the top level of using \cs{FamilyOptions}.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{scr@after@options@#1@hook@topmost}{%
- \@namedef{scr@after@options@#1@hook@topmost}{}%
- }{}%
-% \end{macrocode}
-% Now, if we recognize the top level, because of an empty hook, the execution
-% of the hook to the normal level hook (which is the top level hook in this
-% case) is added. Additionally the self destruction code is added to the very
-% beginning of the hook. Because of the self destruction hook the hook itself
-% it no longer empty. So deeper levels distinguish from the top level. Because
-% the hook is not empty any longer.
-% \begin{macrocode}
- \expandafter\ifx\csname scr@after@options@#1@hook@topmost\endcsname\@empty
- \expandafter\l@addto@macro\csname scr@after@options@#1@hook\endcsname{%
- \@nameuse{scr@after@options@#1@hook@topmost}%
- }%
- \@namedef{scr@after@options@#1@hook@topmost}{%
- \@namedef{scr@after@options@#1@hook@topmost}{}%
- }%
- \fi
-% \end{macrocode}
-% \begin{description}
-% \item[Note:] We do not use \pkg{xkeyval} and its \cs{setkeys+}, because this
-% would not execute the options in the order of the options but in the order
-% of the families, which is not intuitive and therefore not what we want.
-% \end{description}
-% We use a loop over all \meta{option}s in the \meta{list of options} to
-% split each \meta{option} into \meta{key} and \meta{value}.
-% \begin{macrocode}
- \@for\scr@key@atlist:=#2\do{%
-% \end{macrocode}
-% \changes{v3.08}{2010/11/05}{empty options in the list are ignored}
-% Despite they do not make any sense empty \emph{options} are allowed and
-% ignored. This would at first mean two consecutive commas.
-% \begin{macrocode}
- \ifx\scr@key@atlist\@empty\else
-% \end{macrocode}
-% But there also can be white spaces between the commas.
-% \begin{macrocode}
- \ifx\scr@key@atlist\space\else
- \expandafter\scr@key@split@name@value\scr@key@atlist==\@nil
-% \end{macrocode}
-% The third possibility would be a single equal sign. But in my opinion this
-% would be a mistake and therefore an error. So now, we have an \opt{option}
-% splitted into a \meta{key} and a \meta{value} (which can be empty).
-% \changes{v3.12}{2013/03/04}{storing the overall state}
-% Now, we are storing the overall state by emptying the error storage. If the
-% error storage is \cs{relax} it is not needed any longer. Both, \cs{relax}
-% and \cs{@empty} means no error. All other cases the error storage contains
-% all the errors to be reported.
-% \begin{macrocode}
- \let\scr@key@run@errors\@empty
-% \end{macrocode}
-% \changes{v3.04b}{2010/01/29}{\cs{edef} replaced by \cs{protected@edef}}
-% \changes{v3.09a}{2011/06/07}{less number of expansions by improved usage of
-% \cs{unexpanded}}
-% Next a loop over the members is used, to detect members, that have the
-% \meta{key}. In this case the member option is executed. Note: The execution
-% of an option must not change any of the internal macros with the \meta{key},
-% \meta{value}, \meta{option} or \meta{list of options}
-% information. Additionally the states and the resulting messages have to been
-% collected. Here it is useful to have \cs{\meta{family}@key@familylist}, a
-% list of family + member and not only of members.
-% \changes{v3.27}{2019/07/19}{family options are executed first}
-% \begin{macrocode}
- \scr@key@found@false
- \edef\reserved@a{#1,\csname #1@key@familylist\endcsname}%
- \@for\reserved@a:=\reserved@a\do{%
- \scr@ifundefinedorrelax{KV@\reserved@a @\scr@key@name}{%
-% \end{macrocode}
-% \changes{v3.27}{2019/07/19}{treatment of \opt{@else@} options}
-% If a family member does not have the current option, there still may be a
-% \opt{@else@} option. In this case the \opt{@else@} option gets the current
-% \meta{option} as value and is executed. But this changes the error storage
-% only, if it was successful. In this case, the error storage has to become
-% empty. But the \opt{@else@} must not be executed here, if the current member
-% is the empty one, which represents the family itself. This will be done
-% later and only, if no one of the members have had the option itself or a
-% \opt{@else@} option. So the family \opt{@else@} option is only used, if the
-% option has not been successfully processed by any member in any kind.
-% \begin{macrocode}
- \Ifstr{\reserved@a}{#1}{}{%
- \scr@ifundefinedorrelax{KV@\reserved@a @@else@}{}{%
- \expandafter\scr@execute@elseoption\expandafter{\reserved@a}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \scr@key@found@true
- \let\scr@key@run@errors\relax
- \fi
- }%
- }%
- }{%
-% \end{macrocode}
-% If the option has been found for a member, it is executed and the error
-% storage is updated.
-% \begin{macrocode}
- \expandafter\scr@execute@option\expandafter{\reserved@a}%
- \scr@key@found@true
- \ifx\scr@key@run@errors\relax\else
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \let\scr@key@run@errors\relax
- \else
- \ifx\FamilyKeyState\FamilyKeyStateUnknownValue
- \edef\scr@key@run@errors{%
- \unexpanded\expandafter{\scr@key@run@errors}%
- \noexpand\MessageBreak
- \space\space- `\FamilyMemberOfKey': unkown value
- `\expandafter\detokenize\expandafter{\scr@key@value}'%
- }%
- \else
- \ifx\FamilyKeyState\FamilyKeyStateNeedValue
- \edef\scr@key@run@errors{%
- \unexpanded\expandafter{\scr@key@run@errors}%
- \noexpand\MessageBreak
- \space\space- `\FamilyMemberOfKey': value expected
- }%
- \else
- \edef\scr@key@run@errors{%
- \unexpanded\expandafter{\scr@key@run@errors}%
- \noexpand\MessageBreak
- \space\space- `\FamilyMemberOfKey': \FamilyKeyState
- }%
- \fi
- \fi
- \fi
- \fi
- }%
- }%
- \ifscr@key@found@
- \ifx\scr@key@run@errors\relax\else
- \ifx\scr@key@run@errors\@empty\else
-% \end{macrocode}
-% \changes{v3.28}{2019/11/23}{error messages and info fixed}
-% Now, an existing \opt{@else@} option has to be used and either an error or
-% info has to be shown.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{KV@#1@@else@}{%
- \PackageError{scrbase}{%
- unknown option
- `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
- }{%
- The members of family `#1' cannot set option
- `\scr@key@name'
- \ifx\scr@key@value\@empty\else
- \MessageBreak
- to value
- `\expandafter\detokenize\expandafter{\scr@key@value}'%
- \fi.\MessageBreak
- Here's what each member says:
- \scr@key@run@errors
- }%
- }{%
- \scr@execute@elseoption{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \PackageInfo{scrbase}{%
- option
- `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
- \MessageBreak
- processed by `@else@' option of family\MessageBreak
- `#1', after the members said:
- \scr@key@run@errors\MessageBreak
- o\expandafter\@gobble
- }%
- \let\scr@key@run@errors\relax
- \else
- \PackageError{scrbase}{%
- unknown option
- \ifx\FamilyKeyState\FamilyKeyStateUnknownValue
- value at
- \fi
- `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
- }{%
- The members of family `#1' cannot set option
- `\scr@key@name'
- \ifx\scr@key@value\@empty\else
- \MessageBreak
- to value
- `\expandafter\detokenize\expandafter{\scr@key@value}'%
- \fi.\MessageBreak
- Here's what each member says:
- \scr@key@run@errors
- }%
- \fi
- }%
- \fi
- \fi
- \else
- \scr@ifundefinedorrelax{KV@#1@@else@}{%
- \PackageError{scrbase}{%
- unknown option
- `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
- }{%
- No one of the members of family `#1'\MessageBreak
- can handle option `\scr@key@name'.\MessageBreak
- So it cannot be set%
- \ifx\scr@key@value\@empty\else
- \space to value
- `\expandafter\detokenize\expandafter{\scr@key@value}'%
- \fi.%
- }%
- }{%
- \scr@execute@elseoption{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \else
- \PackageError{scrbase}{%
- unknown option
- \ifx\FamilyKeyState\FamilyKeyStateUnknownValue
- value at
- \fi
- `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
- }{%
- No one of the members of family `#1'\MessageBreak
- can handle option `\scr@key@name'.\MessageBreak
- So it cannot be set%
- \ifx\scr@key@value\@empty\else
- \space to value
- `\expandafter\detokenize\expandafter{\scr@key@value}'%
- \fi.%
- }%
- \fi
- }%
- \fi
- \fi
- \fi
- }%
- \@nameuse{scr@after@options@#1@hook}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@execute@option}
-% \changes{v3.12}{2013/03/04}{added}
-% \changes{v3.13}{2014/06/30}{missing \cs{expandafter} in \cs{PackageInfo} added}
-% \changes{v3.13a}{2014/08/13}{white spaces removed}
-% \changes{v3.23}{2017/02/16}{it does not help to save the
-% \cs{AtEndOfFamilyOptions} hook}
-% A split \opt{option} is executed, without changing any relevant macros (but
-% \cs{reserved@a}). The first argument is the complete set in \pkg{keyval} syntax.
-% \begin{macrocode}
-\newcommand*{\scr@execute@option}[1]{%
- \protected@edef\reserved@a{%
- \noexpand\let\noexpand\KV@err\noexpand\scr@KV@err
- \noexpand\setkeys{#1}{%
- \unexpanded\expandafter{\scr@key@atlist}}%
- \noexpand\def\noexpand\scr@key@atlist{%
- \unexpanded\expandafter{\scr@key@atlist}}%
- \noexpand\def\noexpand\scr@key@name{%
- \unexpanded\expandafter{\scr@key@name}}%
- \noexpand\def\noexpand\scr@key@value{%
- \unexpanded\expandafter{\scr@key@value}}%
- \ifx\scr@key@run@errors\relax
- \noexpand\let\noexpand\scr@key@run@errors\relax
- \else
- \noexpand\def\noexpand\scr@key@run@errors{%
- \unexpanded\expandafter{\scr@key@run@errors}}%
- \fi
- \ifx\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate
- \noexpand\let\noexpand\AtEndOfFamilyOptions
- \noexpand\scr@AtEndOfFamilyOptions@immediate
- \fi
- }%
- \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions
- \reserved@a
- \ifx\FamilyKeyState\FamilyKeyStateUnknown
- \PackageInfo{scrbase}{Unknown processing state.\MessageBreak
- Processing option
- `\expandafter\detokenize\expandafter{\scr@key@atlist}'\MessageBreak
- \ifx\FamilyMemberOfKey\@empty\else
- of member `\FamilyMemberOfKey'\MessageBreak
- \fi
- of family `\FamilyOfKey'\MessageBreak
- doesn't set a valid state.\MessageBreak
- This will be interpreted\MessageBreak
- as \string\FamilyKeyStateProcessed
- }%
- \FamilyKeyStateProcessed
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\scr@KV@err}
-% \changes{v3.12a}{2013/03/04}{missing internal command added}
-% We just have to signal, that the option needs a value, that is missing.
-% \begin{macrocode}
-\newcommand*{\scr@KV@err}[1]{%
- \FamilyKeyStateNeedValue
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@KV@err
-% \begin{macro}{\scr@key@run@errors}
-% \changes{v3.12}{2013/03/04}{added}
-% Needed by \cs{FamilyOptions} to collect the error messages, but report the
-% error only, if no member has successfully processed the option. We define it
-% here to make the re-definition in the previous code does work without error.
-% \begin{macrocode}
-\newcommand*{\scr@key@run@errors}{}
-% \end{macrocode}
-% \end{macro}^^A \scr@key@run@errors}
-% \end{macro}^^A \scr@execute@option
-% \begin{macro}{\scr@execute@elseoption}
-% \changes{v3.20}{2015/11/18}{added}
-% \changes{v3.25}{2017/11/16}{group added}
-% \changes{v3.25}{2017/11/16}{\cs{scr@key@name@else} and
-% \cs{scr@key@value@else} added}
-% \changes{v3.27}{2019/03/10}{missing percent added to avoid spaces}
-% If a special option \opt{@else@} has been defined, it is executed by
-% \cs{FamilyExecuteOptions} if and only if no other suitable option has been
-% found. This is done by \cs{scr@execute@elseoption}. The argument and
-% resulting state are exactly the same as with \cs{scr@execute@option}. It
-% also have to do the same, but it does not call the option, but the
-% \opt{@else@} option. The option itself is used as \meta{value} of the
-% \opt{@else@} option. So temporary \cs{scr@key@atlist}, \cs{scr@key@name} and
-% \cs{scr@key@value} have to be changed, before calling
-% \cs{scr@execute@option}. To avoid once again splitting the \meta{value} into
-% an internal \meta{key} and \meta{value} the original \cs{scr@key@name} and
-% \cs{scr@key@value} are copied to \cs{scr@key@name@else} and
-% \cs{scr@key@value@else}. These can be used inside the code of the
-% \opt{@else@} option.
-% \begin{macrocode}
-\newcommand*{\scr@execute@elseoption}[1]{%
- \begingroup
- \protected@edef\reserved@a{%
- \unexpanded{%
- \endgroup
- \let\scr@key@name@else\scr@key@name
- \let\scr@key@value@else\scr@key@value
- \def\scr@key@name{@else@}%
- }%
- \noexpand\def\noexpand\scr@key@value{%
- \unexpanded\expandafter{\scr@key@atlist}}%
- \noexpand\def\noexpand\scr@key@atlist{%
- @else@={\unexpanded\expandafter{\scr@key@atlist}}}%
- \noexpand\scr@execute@option{#1}%
- \noexpand\def\noexpand\scr@key@atlist{%
- \unexpanded\expandafter{\scr@key@atlist}}%
- \noexpand\def\noexpand\scr@key@name{%
- \unexpanded\expandafter{\scr@key@name}}%
- \noexpand\def\noexpand\scr@key@value{%
- \unexpanded\expandafter{\scr@key@value}}%
- \scr@ifundefinedorrelax{scr@key@name@else}{%
- \unexpanded{\let\scr@key@name@else\relax}%
- }{%
- \noexpand\def\noexpand\scr@key@name@else{%
- \unexpanded\expandafter{\scr@key@name@else}%
- }%
- }%
- \scr@ifundefinedorrelax{scr@key@value@else}{%
- \unexpanded{\let\scr@key@value@else\relax}%
- }{%
- \noexpand\def\noexpand\scr@key@value@else{%
- \unexpanded\expandafter{\scr@key@value@else}%
- }%
- }%
- }\reserved@a
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@execute@elseoption
-% \begin{macro}{\KOMA@key@foundtrue,\KOMA@key@foundfalse,\ifKOMA@key@found,
-% \scr@key@found@true,\scr@key@found@false,\ifscr@key@found@}
-% \changes{v2.97c}{2007/04/19}{added}
-% \changes{v3.00}{2008/04/30}{\cs{ifKOMA@key@found} renamed to \cs{ifscr@key@found}}
-% \begin{macro}{\KOMA@key@at@list,\scr@key@atlist}
-% \changes{v2.97c}{2007/04/19}{added}
-% \changes{v3.00}{2008/04/30}{\cs{KOMA@key@atlist} renamed to \cs{scr@key@atlist}}
-% \begin{macro}{\KOMA@key@name,\scr@key@name}
-% \changes{v2.97c}{2007/04/19}{added}
-% \changes{v3.00}{2008/04/30}{\cs{KOMA@key@name} renamed to \cs{scr@key@name}}
-% \begin{macro}{\KOMA@key@value,\scr@key@value}
-% \changes{v2.97c}{2007/04/19}{added}
-% \changes{v3.00}{2008/04/30}{\cs{KOMA@key@value} renamed to \cs{scr@key@value}}
-% \begin{macro}{\KOMA@key@split@name@value,\scr@key@split@name@value}
-% \changes{v2.97c}{2007/04/19}{added}
-% \changes{v2.97e}{2007/11/10}{using \cs{KV@@sp@def} to remove white spaces}
-% \changes{v3.00}{2008/04/30}{\cs{KOMA@key@split@name@value} renamed to
-% \cs{scr@key@split@name@value}}
-% \changes{v3.13}{2014/10/17}{\cs{long}}
-% \changes{v3.26}{2018/08/29}{using \cs{scr@sp@def} instead of \cs{KV@@sp@def}}
-% \begin{macrocode}
-\newif\ifscr@key@found@
-\newcommand*{\scr@key@atlist}{}
-\newcommand*{\scr@key@name}{}
-\newcommand*{\scr@key@value}{}
-\newcommand*{\scr@key@split@name@value}{}
-\long\def\scr@key@split@name@value#1=#2=#3\@nil{%
- \scr@sp@def\scr@key@name{#1}%
- \scr@sp@def\scr@key@value{#2}%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \scr@key@split@name@value
-% \end{macro}^^A \scr@key@value
-% \end{macro}^^A \scr@key@name
-% \end{macro}^^A \scr@key@atlist
-% \end{macro}^^A \@FamilyOptions
-% \end{macro}^^A \ifscr@key@found@
-% \end{command}^^A \FamilyOptions
-%
-% \begin{command}{\FamilyOption}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.26b}{2019/01/09}{handling of typical user mistakes}
-% \begin{macro}{\@FamilyOptions}
-% \changes{v3.14}[2014/10/17]{added}
-% \changes{v3.26}{2018/08/29}{using \cs{scr@sp@def} instead of \cs{KV@@sp@def}}
-% \begin{macro}{\Family@Option}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.12}{2013/03/04}{removed}
-% \end{macro}^^A \Family@Option
-% \changes{v3.04b}{2010/01/29}{\cs{edef} replaced by \cs{protected@edef}}
-% In opposite to \cs{FamilyOptions} this command sets only one \meta{option}
-% (\texttt{\#2}) of a \meta{family} (\texttt{\#1}). But you can set it to a
-% \meta{list of values} (\texttt{\#3}). The values are set in the order of the
-% \meta{list of values}.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyOption}[2]{%
- \begingroup
- \def\reserved@a##1,##2\@nil{\IfArgIsEmpty{##2}{}{\@tempswatrue}}%
- \@tempswafalse\expandafter\reserved@a#2,\@nil
- \if@tempswa
- \PackageError{scrbase}{%
- syntax error in key `\detokenize{#2}'%
- }{%
- You've used `\string\...Option' to set the key
- `\detokenize{#2}'\MessageBreak
- to new value(s), but `,' is not allowed in the key of
- an option\MessageBreak
- (and `\string\...Option' does not use `,' to separate several
- keys).\MessageBreak
- Maybe you've meant \string\...Options\space instead of
- \string\...Option.\MessageBreak
- If you'll continue, I'll give it a try, but you should expect
- further\MessageBreak
- and even strange error messages.%
- }%
- \else
- \def\reserved@a##1=##2\@nil{%
- \IfArgIsEmpty{##2}{}{\@tempswatrue\def\reserved@a{=}}}%
- \expandafter\reserved@a#2=\@nil
- \if@tempswa
- \PackageError{scrbase}{%
- syntax error in key `\detokenize{#2}'%
- }{%
- You've used `\string\...Option' to set the key
- `\detokenize{#2}'\MessageBreak
- to new value(s), but `=' is not allowed in the key of
- an option\MessageBreak
- (and `\string\...Option' does not use `=' to separate key and
- value).\MessageBreak
- Maybe you've meant \string\...Options\space instead of
- \string\...Option.\MessageBreak
- If you'll continue, I'll give it a try, but you should expect
- further\MessageBreak
- and even strange error messages.%
- }%
- \fi
- \fi
- \endgroup
- \@FamilyOption{#1}{#2}%
-}
-\newcommand{\@FamilyOption}[3]{%
- \expandafter\scr@sp@def\expandafter\scr@key@name\expandafter{#2}%
-% \end{macrocode}
-% The most simply solution is to walk through the \meta{list of values} and
-% generate a \meta{list of options} for \cs{FamilyOptions}.
-% \begin{macrocode}
- \let\reserved@a\@empty
- \@for\reserved@b:=#3\do{%
-% \end{macrocode}
-% \changes{v3.08}{2010/11/05}{allow empty values}
-% Empty elements in the \meta{list of values} are ignored. Note: This is not
-% really the correct solution but several users expect it. So for a real empty
-% value you need to use |{}|.
-% \begin{macrocode}
- \ifx\reserved@b\@empty\else
-% \end{macrocode}
-% \changes{v3.12}{2012/03/04}{ignore white space values}
-% The same for white space values.
-% \begin{macrocode}
- \ifx\reserved@b\space\else
- \edef\reserved@a{\unexpanded\expandafter{\reserved@a},%
- \scr@key@name=\unexpanded\expandafter{\reserved@b}}%
- \fi
- \fi
- }%
- \def\reserved@b{\FamilyOptions{#1}}%
- \expandafter\reserved@b\expandafter{\reserved@a}%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\KOMAoptions}
-% \changes{v2.96}{2006/08/20}{hook after options added}
-% \changes{v2.97c}{2007/04/19}{process options of all members}
-% \changes{v3.12}{2013/03/04}{using hooks of \cs{FamilyOptions}}
-% Nice little shortcut.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMAoptions}{\FamilyOptions{KOMA}}
-%</koma>
-% \end{macrocode}
-% \begin{macro}{\KOMA@options}
-% \changes{v2.97c}{2007/04/19}{added}
-% \changes{v3.12}{2013/03/04}{removed}
-% \end{macro}^^A \KOMA@options
-% \end{command}^^A \KOMAoptions
-%
-% \begin{command}{\KOMAoptionsOf}
-% \changes{v3.17}{2015/02/25}{added}
-% Ask for the currently set options of a supporting \KOMAScript{} class or
-% package. The optional first argument (\texttt{\#1}) is a command or macro,
-% that will be execute with the list of options as an argument. The second
-% argument (\texttt{\#2}) is the filename of a \KOMAScript{} class or package
-% (with extension). Without optional argument, the \meta{list of options} are
-% be printed.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMAoptionsOf}[2][\@firstofone]{%
- \scr@ifundefinedorrelax{scr@kav@KOMA.#2}{%
- \PackageError{scrkbase}{\string\KOMAoptionsOf\space not supported}{%
- #2 is not the name of a KOMA-Script package or\MessageBreak
- KOMA-Script class, that supports \string\KOMAoptionsOf.}%
- }{%
- \begingroup
- \def\reserved@a{#1}%
- \KOMA@kav@defall\reserved@b{.#2}%
- \expandafter\expandafter\expandafter\endgroup
- \expandafter\reserved@a\expandafter{\reserved@b}%
- }%
-}
-%</koma>
-% \end{macrocode}
-% \end{command}^^A \KOMAoptionsOf
-%
-% \begin{command}{\KOMAoptionOf}
-% \changes{v3.17}{2015/02/26}{added}
-% Ask for the current values of one option of a supporting \KOMAScript{} class
-% or package. Again the optional first argument (\texttt{\#1}) is a command or
-% macro, that will be execute with the list of values as an argument. The second
-% argument (\texttt{\#2}) is the filename of a \KOMAScript{} class or package
-% (with extension). The third argument (\texttt{\#3}) is the name of an
-% option of the class resp. package. Without optional argument, the \meta{list of
-% values} are be printed.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMAoptionOf}[3][\@firstofone]{%
- \scr@ifundefinedorrelax{scr@kav@KOMA.#2}{%
- \PackageError{scrkbase}{\string\KOMAoptionOf\space not supported}{%
- #2 is not the name of a KOMA-Script package or\MessageBreak
- KOMA-Script class, that supports \string\KOMAoptionOf.}%
- }{%
- \begingroup
- \def\reserved@a{#1}%
- \KOMA@kav@defone\reserved@b{.#2}{#3}%
- \ifx\reserved@b\@empty
- \PackageWarning{scrkbase}{option `#3' for `#2' unset}%
- \endgroup
- \else
- \expandafter\expandafter\expandafter\endgroup
- \expandafter\reserved@a\expandafter{\reserved@b}%
- \fi
- }%
-}
-%</koma>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macro}{\post@kopt@hook}
-% \changes{v3.12}{2013/03/04}{removed}
-% \end{macro}^^A \post@kopt@hook
-% \begin{command}{\AfterKOMAoptions}
-% \changes{v3.12}{2013/03/04}{using \cs{AtEndOfFamilyOptions}}
-% \changes{v3.23}{2017/02/16}{\cs{newcommand} instead of \cs{let}}
-% An option can process code after executing all options of the current
-% \cs{KOMAoptions}.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\AfterKOMAoptions}{\AtEndOfFamilyOptions}
-%</koma>
-% \end{macrocode}
-% \end{command}^^A \AfterKOMAoptions
-%
-% \begin{macro}{\l@addto@macro}
-% \changes{v2.8p}{2001/09/22}{added}
-% \changes{v2.95}{2006/06/02}{changed to handle macros with arguments same
-% like \cs{g@addto@macro}}
-% \changes{v3.12}{2013/04/20}{removed non-\eTeX{} implementation}
-% \changes{v3.12}{2013/04/20}{warn, if \cs{l@addto@macro} is already defined
-% different from our definition}
-% \changes{v3.23}{2017/02/16}{moved to \texttt{prepare}}
-% We need a local variant of \cs{g@addto@macro}.
-% \begin{macrocode}
-%</body>
-%<*base&prepare>
-\@ifundefined{l@addto@macro}{}{%
- \begingroup
- \long\def\reserved@a#1#2{%
- \edef#1{\unexpanded\expandafter{#1#2}}%
- }%
- \ifx\reserved@a\l@addto@macro\else
- \PackageWarning{scrbase}{%
- Someone also uses macro name \string\l@addto@macro.\MessageBreak
- When KOMA-Script author decided to use macro name\MessageBreak
- \string\l@addto@macro\space first, there was no other
- free\MessageBreak
- LaTeX package using this macro name.\MessageBreak
- In the meantime other package authers decided to use\MessageBreak
- same macro name, but unfortunatly not all of those\MessageBreak
- are compatible with KOMA-Script's definition, e.g.,\MessageBreak
- while adding definitions with arguments to macros.\MessageBreak
- Because of such potentially incompatible definitions,\MessageBreak
- KOMA-Script will redefine the command now.\MessageBreak
- Please ask the author of the other package to\MessageBreak
- rename his macro, if a problem results in the\MessageBreak
- redefinition%
- }%
- \fi
- \endgroup
-}
-\long\def\l@addto@macro#1#2{%
- \edef#1{\unexpanded\expandafter{#1#2}}%
-}%
-%</base&prepare>
-%<*body>
-% \end{macrocode}
-% \end{macro}^^A \l@addto@macro
-%
-% \begin{macro}{\l@addto@macro@a}
-% \changes{v3.20}{2015/11/20}{added}
-% I also need a version for macros with exactly one argument. Note: This macro
-% is dangerous. Sometimes it does not work correctly, so there is not an will
-% not be an official documentation.
-% \begin{macrocode}
-%<*base>
-\begingroup
- \catcode`\^^A=\catcode`\#
- \@makeother\#
- \gdef\l@addto@macro@a^^A1{%
- \begingroup
- \@makeother\#
- \def\l@addto@macro@a@cmd{^^A1}%
- \l@addto@macro@a@
- }
- \gdef\l@addto@macro@a@^^A1{%
- \def\l@addto@macro@a@add{^^A1}%
- \l@addto@macro@a@@
- }
-\endgroup
-\begingroup
- \@makeother\#
- \gdef\l@addto@macro@a@@{%
- \@makeother\#
- \edef\reserved@a{%
- \detokenize{\endgroup\def}%
- \detokenize\expandafter{\l@addto@macro@a@cmd#1}%
- {%
- \expandafter\detokenize%
- \expandafter\expandafter\expandafter{\l@addto@macro@a@cmd{#1}}%
- \expandafter\detokenize\expandafter{\l@addto@macro@a@add}%
- }%
- }%
- \expandafter\scantokens\expandafter{\reserved@a}%
- }%
-\endgroup
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \l@addto@macro@a
-%
-% \begin{macro}{\l@preto@macro}
-% \changes{v3.20}{2015/11/25}{added}
-% Similar to \cs{l@addto@macro} but adds code at the very beginning instead of
-% appending it a the end.
-% \begin{macrocode}
-%<*base>
-\newcommand\l@preto@macro[2]{%
- \edef#1{\unexpanded{#2}\unexpanded\expandafter{#1}}%
-}%
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \l@preto@macro
-%
-% \begin{macro}{\l@preto@macro@a}
-% \changes{v3.20}{2015/11/25}{added}
-% I also need a version for macros with exactly one argument. Note: This macro
-% is dangerous. Sometimes it does not work correctly, so there is not an will
-% not be an official documentation.
-% \begin{macrocode}
-%<*base>
-\begingroup
- \catcode`\^^A=\catcode`\#
- \@makeother\#
- \gdef\l@preto@macro@a^^A1{%
- \begingroup
- \@makeother\#
- \def\l@preto@macro@a@cmd{^^A1}%
- \l@preto@macro@a@
- }
- \gdef\l@preto@macro@a@^^A1{%
- \def\l@preto@macro@a@add{^^A1}%
- \l@preto@macro@a@@
- }
-\endgroup
-\begingroup
- \@makeother\#
- \gdef\l@preto@macro@a@@{%
- \@makeother\#
- \edef\reserved@a{%
- \detokenize{\endgroup\def}%
- \detokenize\expandafter{\l@preto@macro@a@cmd#1}%
- {%
- \expandafter\detokenize\expandafter{\l@preto@macro@a@add}%
- \expandafter\detokenize%
- \expandafter\expandafter\expandafter{\l@preto@macro@a@cmd{#1}}%
- }%
- }%
- \expandafter\scantokens\expandafter{\reserved@a}%
- }%
-\endgroup
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \l@preto@macro@a
-%
-% \begin{command}{\KOMAoption}
-% \changes{v2.98c}{2008/03/12}{added}
-% \changes{v3.12}{2013/03/04}{using \cs{FamilyOption}}
-% Simple little shortcut.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMAoption}{\FamilyOption{KOMA}}
-%</koma>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\FamilyUnknownKeyValue}
-% \changes{v3.10}{2011/09/12}{no error while processing global options}
-% \changes{v3.11a}{2012/05/28}{prevent remove from list of unused global
-% options globally}
-% \changes{v3.14}{2014/10/17}{\cs{long}}
-% \changes{v3.30}{2020/02/25}{spurious space in warning message removed}
-% Used to report an error because of unknown values. Arguments are
-% \marg{family}\marg{key}\marg{valid values}.
-% \begin{macrocode}
-%<*base>
-\newcommand{\FamilyUnknownKeyValue}[4]{%
- \FamilyKeyStateUnknownValue
- \ifx\FamilyElseValues\@empty\else
- \PackageWarning{scrbase}{non empty \string\FamilyElseValue
- ignored.\MessageBreak
- Setting this command to a non empty\MessageBreak
- value for option `#2' of\MessageBreak
- family `#1' is deprecated,\MessageBreak
- but has been found%
- }%
- \fi
-}
-%</base>
-% \end{macrocode}
-% \begin{command}{\FamilyElseValues}
-% \changes{v3.00}{2008/05/02}{added}
-% \changes{v3.12}{2013/03/04}{deprecated and not used internally}
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyElseValues}{}
-%</base>
-% \end{macrocode}
-% \end{command}^^A \FamilyUnknownKeyValue
-% \end{command}^^A \FamilyElseValue
-%
-% \begin{command}{\FamilyBoolKey}
-% \changes{v3.00}{2008/04/30}{added}
-% Defining a new boolean key:
-% \begin{quote}
-% \cs{FamilyBoolKey}\oarg{member}\marg{family}\marg{key}\marg{switch}
-% \end{quote}
-% The default \meta{member} is (once again)
-% \file{.\cs{@currname}.\cs{@currext}} and it is recommended to always use it!
-% \cs{if\meta{switch}} is automatically defined, if it was undefined. In this
-% case the initial value is \opt{false}. The default for using the \meta{key}
-% without argument would be \opt{true}. For other allowed values see
-% \cs{FamilySetBool}.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyBoolKey}[4][.\@currname.\@currext]{%
- \@ifundefined{if#4}{%
- \expandafter\newif\csname if#4\endcsname
- }{}%
- \DefineFamilyKey[{#1}]{#2}{#3}[true]{\FamilySetBool{#2}{#3}{#4}{##1}}%
-}
-% \end{macrocode}
-% \begin{command}{\FamilySetBool}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.11a}{2012/05/25}{error message fixed}
-% \changes{v3.27}{2019/07/08}{empty argument is \texttt{true}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Setting a boolean key:
-% \begin{quote}
-% \cs{FamilySetBool}\marg{family}\marg{key}\marg{switch}\marg{value}
-% \end{quote}
-% The \meta{family} and the \meta{key} are used for reporting unknown values using
-% \cs{FamilyUnknownKeyValue}. The \meta{switch} is used to use either
-% \cs{\meta{switch}true} or \cs{\meta{switch}false}. It is ignored, if these
-% are not defined, so have to take care, that \cs{if\meta{switch}} already has
-% been defined, e.g., using \cs{FamilyBoolKey}. The \meta{value} can either be
-% \opt{true}, \opt{on} or \opt{yes} for \cs{\meta{switch}true} or
-% \opt{false}, \opt{off} or \opt{no} for \cs{\meta{switch}false}.
-% \begin{macrocode}
-\newcommand*{\FamilySetBool}[4]{%
- \Ifstr{#4}{}{\@nameuse{#3true}\FamilyKeyStateProcessed}{%
- \Ifstr{#4}{true}{\@nameuse{#3true}\FamilyKeyStateProcessed}{%
- \Ifstr{#4}{on}{\@nameuse{#3true}\FamilyKeyStateProcessed}{%
- \Ifstr{#4}{yes}{\@nameuse{#3true}\FamilyKeyStateProcessed}{%
- \Ifstr{#4}{false}{\@nameuse{#3false}\FamilyKeyStateProcessed}{%
- \Ifstr{#4}{off}{\@nameuse{#3false}\FamilyKeyStateProcessed}{%
- \Ifstr{#4}{no}{\@nameuse{#3false}\FamilyKeyStateProcessed}{%
- \FamilyUnknownKeyValue{#1}{#2}{#4}{%
- `true', `on', `yes', `false', `off', `no'%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- \let\FamilyElseValues\@empty
-}
-%</base>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-% \begin{command}{\FamilyInverseBoolKey,\FamilySetInverseBool}
-% \changes{3.27}{2019/07/08}{added}
-% These are similar to \cs{FamilyBoolKey} and \cs{FamilySetBoolKey} but use
-% inverse logic (true sets false and false sets true).
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyInverseBoolKey}[4][.\@currname.\@currext]{%
- \@ifundefined{if#4}{%
- \expandafter\newif\csname if#4\endcsname
- \@nameuse{#4true}%
- }{}%
- \DefineFamilyKey[{#1}]{#2}{#3}[true]{\FamilySetInverseBool{#2}{#3}{#4}{##1}}%
-}
-\newcommand*{\FamilySetInverseBool}[4]{%
- \FamilySetBool{#1}{#2}{#3}{#4}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \expandafter\ifx\csname if#3\expandafter\endcsname\csname iftrue\endcsname
- \@nameuse{#3false}%
- \else
- \@nameuse{#3true}%
- \fi
- \fi
-}
-%</base>
-% \end{macrocode}
-% \end{command}^^A \FamilyInverseBoolKey,\FamilySetInverseBool
-%
-% \begin{macro}{\KOMA@unknown@keyval}
-% Version of \cs{FamilyUnknownKeyValue} with static family |KOMA|.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@unknown@keyval}{\FamilyUnknownKeyValue{KOMA}}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\KOMA@ifkey}
-% \changes{v3.02c}{2009/02/04}{defines the member if needed}
-% \changes{v3.17}{2015/03/02}{replaces the value in the storage}
-% This is an extended version of \cs{FamilyBoolKey} with static family
-% |KOMA|. So the syntax is:
-% \begin{quote}
-% \cs{KOMA@ifkey}\oarg{member}\marg{key}\marg{switch}
-% \end{quote}
-% The default \meta{member} is (once again)
-% \file{.\cs{@currname}.\cs{@currext}} and it is recommended to always use it!
-% \cs{if\meta{switch}} is automatically defined, if it was undefined. The
-% default for using the \meta{key} without argument would be \opt{true}. Note:
-% \meta{member} and \meta{key} are always fully expanded. Depending on a
-% already existing \cs{if\meta{key}} either \opt{\meta{key}=true} or
-% \opt{\meta{key}=false} is added to the value storage. If \cs{if\meta{key}}
-% was not defined, the initialized value is \opt{false}.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@ifkey}[2][.\@currname.\@currext]{%
- \begingroup\edef\reserved@a{\noexpand\KOMA@@ifkey{#1}{#2}}%
- \expandafter\endgroup\reserved@a
-}
-\newcommand*{\KOMA@@ifkey}[3]{%
- \@ifundefined{if#3}{%
- \expandafter\newif\csname if#3\endcsname
- }{}%
- \KOMA@key[{#1}]{#2}[true]{%
- \KOMA@set@ifkey{#2}{#3}{##1}%
- \KOMA@kav@replacebool{#1}{#2}{#3}%
- }%
- \csname if#3\endcsname
- \KOMA@kav@xadd{#1}{#2}{true}%
- \else
- \KOMA@kav@xadd{#1}{#2}{false}%
- \fi
-}
-%</koma>
-% \end{macrocode}
-% \begin{macro}{\KOMA@set@ifkey}
-% Simple a shortcut for |\FamilySetBool{KOMA}|. So the syntax is:
-% \begin{quote}
-% \cs{KOMA@set@ifkey}\marg{key}\marg{switch}\marg{value}
-% \end{quote}
-% But all arguments are delegated.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@set@ifkey}{\FamilySetBool{KOMA}}
-%</koma>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{command}{\FamilyCounterKey}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.15}{2014/12/03}{optional default value}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% Defining a \meta{key} that sets a \LaTeX{} counter to a \meta{value}.
-% \begin{quote}
-% \cs{FamilyCounterKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{\LaTeX{} counter}
-% \end{quote}
-% \meta{default} and the \meta{value} of the option has to be (almost) any
-% kind of value, that can be assigned to a \LaTeX{} counter. The
-% \meta{counter} is automatically defined, if it was undefined. In this case
-% the initial value is 0.
-% \begin{macro}{\Family@@Counter@@Key,\Family@Counter@Key}
-% \changes{v3.15}{2014/12/03}{added}
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyCounterKey}[3][.\@currname.\@currext]{%
- \kernel@ifnextchar [%]
- {\Family@@Counter@@Key{#1}{#2}{#3}}%
- {\Family@Counter@Key{#1}{#2}{#3}}%
-}
-\newcommand*{\Family@@Counter@@Key}{}
-\def\Family@@Counter@@Key#1#2#3[#4]#5{%
- \@ifundefined{c@#5}{\newcounter{#5}}{}%
- \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetCounter{#2}{#3}{#5}{##1}}%
-}
-\newcommand*{\Family@Counter@Key}[4]{%
- \@ifundefined{c@#4}{\newcounter{#4}}{}%
- \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetCounter{#2}{#3}{#4}{##1}}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{command}{\FamilySetCounter}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.18a}{2015/07/06}{using \cs{FamilyKeyStateProcessed}}
-% \changes{v3.23}{2017/02/23}{white space replaced by \cs{relax}}
-% Set the value of a \meta{key} defined by \cs{FamilyCounterKey}:
-% \begin{quote}
-% \cs{FamilySetCounter}\marg{family}\marg{key}\marg{counter}\marg{value}
-% \end{quote}
-% Note: Before assigning the \meta{value} to the \meta{counter} tests are
-% done, if the \meta{value} can be used to be assigned to a \LaTeX{}
-% counter. If this fails a unknown value is reported.
-% \begin{macrocode}
-\newcommand*{\FamilySetCounter}[4]{%
- \begingroup
- \protected@edef\reserved@a{#4}%
- \def\reserved@b{\endgroup\value{#3}=#4\relax\FamilyKeyStateProcessed}%
- \expandafter\Ifiscount\expandafter{\reserved@a}{}{%
- \expandafter\Ifisdimen\expandafter{\reserved@a}{}{%
- \expandafter\Ifisskip\expandafter{\reserved@a}{}{%
- \expandafter\Ifisnumexpr\expandafter{\reserved@a}{}{%
- \expandafter\Ifisdimexpr\expandafter{\reserved@a}{}{%
- \expandafter\Ifisinteger\expandafter{\reserved@a}{}{%
- \expandafter\Ifiscounter\expandafter{\reserved@a}{%
- \def\reserved@b{%
- \endgroup\value{#3}=\value{#4}\FamilyKeyStateProcessed
- }%
- }{%
- \def\reserved@b{%
- \endgroup
- \FamilyUnknownKeyValue{#1}{#2}{#4}{%
- integer numbers, counters, lengths, skips, dimens
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- \reserved@b
-}
-%</base>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-% \begin{command}{\FamilyCounterMacroKey}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.15}{2014/12/03}{support for optional default}
-% Similar to \cs{FamilyCounterKey}, but it does not use a \LaTeX{} counter to
-% store the value but a macro (or command):
-% \begin{quote}
-% \cs{FamilyCounterMacroKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{macro}
-% \end{quote}
-% The \meta{value} will be assigned to a counter (\cnt{page}) locally and the
-% \meta{macro} is defined using the value of the counter. The \meta{macro}
-% is automatically set to \cs{z@} if it was not already defined. If it was
-% defined, the user is responsible for that it has to be a number.
-% \begin{macro}{\Family@@Counter@@Macro@@Key,\Family@Counter@Macro@Key}
-% \changes{v3.15}{2014/12/03}{added}
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyCounterMacroKey}[3][.\@currname.\@currext]{%
- \kernel@ifnextchar [%]
- {\Family@@Counter@@Macro@@Key{#1}{#2}{#3}}%
- {\Family@Counter@Macro@Key{#1}{#2}{#3}}%
-}
-\newcommand*{\Family@@Counter@@Macro@@Key}{}
-\def\Family@@Counter@@Macro@@Key#1#2#3[#4]#5{%
- \ifdefined#4\else\let#4\z@\fi
- \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetCounterMacro{#2}{#3}{#5}{##1}}%
-}
-\newcommand*{\Family@Counter@Macro@Key}[4]{%
- \ifdefined#4\else\let#4\z@\fi
- \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetCounterMacro{#2}{#3}{#4}{##1}}%
-}
-% \end{macrocode}
-% \end{macro}^^A \Family@@Counter@@Macro@@Key,\Family@Counter@Macro@Key
-% \begin{command}{\FamilySetCounterMacro}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.15}{2014/12/17}{\cs{aftergroup} before \cs{FamilyKeyStateProcessed}}
-% \changes{v3.18a}{2015/07/06}{fixed usage of \cs{FamilyKeyStateProcessed}}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% Similar to \cs{FamilySetCounter} but using a macro (or command) instead of a
-% \LaTeX{} counter:
-% \begin{quote}
-% \cs{FamilySetCounterMacro}\marg{family}\marg{key}\marg{macro}\marg{value}
-% \end{quote}
-% Note, that the \meta{value} is locally assigned to a counter (\cnt{page})
-% before defining the \meta{macro} using the value of the counter.
-% \begin{macrocode}
-\newcommand*{\FamilySetCounterMacro}[4]{%
- \begingroup
- \FamilySetCounter{#1}{#2}{page}{#4}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \edef\reserved@a{%
- \unexpanded{\endgroup\def#3}%
- {\the\value{page}}%
- \noexpand\FamilyKeyStateProcessed
- }%
- \else
- \def\reserved@a{%
- \endgroup
- \FamilyUnknownKeyValue{#1}{#2}{#4}{%
- integer numbers, counters, lengths, skips, dimens
- }%
- }%
- \fi
- \reserved@a
-}
-%</base>
-% \end{macrocode}
-% \end{command}^^A \FamilySetCounterMacro
-% \end{command}^^A \FamilyCounterMacroKey
-%
-% \begin{command}{\FamilyLengthKey}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.15}{2014/12/03}{optional default value}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% Defining a \meta{key} that sets a \LaTeX{} length to a \meta{value}.
-% \begin{quote}
-% \cs{FamilyLengthKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{\LaTeX{} length}
-% \end{quote}
-% \meta{default} and the \meta{value} of the option has to be (almost) any
-% kind of value, that can be assigned to a \LaTeX{} length, a \TeX{} dimension
-% or a \TeX{} skip. The \meta{\LaTeX{} length} is automatically defined, if it
-% was undefined. In this case the initial value is 0.
-% \begin{macro}{\Family@@Length@@Key,\Family@Length@Key}
-% \changes{v3.15}{2014/12/03}{added}
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyLengthKey}[3][.\@currname.\@currext]{%
- \kernel@ifnextchar [%]
- {\Family@@Length@@Key{#1}{#2}{#3}}%
- {\Family@Length@Key{#1}{#2}{#3}}%
-}
-\newcommand*{\Family@@Length@@Key}{}
-\def\Family@@Length@@Key#1#2#3[#4]#5{%
- \ifdefined#5\else\newlength{#5}\fi
- \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetLength{#2}{#3}{#5}{##1}}%
-}
-\newcommand*{\Family@Length@Key}[4]{%
- \ifdefined#4\else\newlength{#4}\fi
- \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetLength{#2}{#3}{#4}{##1}}%
-}
-% \end{macrocode}
-% \begin{command}{\FamilySetLength}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.15}{2015/01/02}{\cs{ifglueexpr} added}
-% \changes{v3.18a}{2015/07/06}{usage of \cs{FamilyKeyStateProcessed} fixed}
-% \changes{v3.20}{2016/04/27}{expansion before testing}
-% Set the value of a \meta{key} defined by \cs{FamilyLengthKey}:
-% \begin{quote}
-% \cs{FamilySetLength}\marg{family}\marg{key}\marg{\LaTeX{} length}\marg{value}
-% \end{quote}
-% Note: Before assigning the \meta{value} to the \meta{\LaTeX{} length} it is
-% fully expanded and tests are done, if the \meta{value} can be used to be
-% assigned to a \LaTeX{} length. If this fails a unknown value is reported. If
-% the expansion or the assignment fails a \TeX{} error happens.
-% \begin{macrocode}
-\newcommand*{\FamilySetLength}[4]{%
- \begingroup
- \protected@edef\reserved@a{#4}%
-% \end{macrocode}
-% Together with \cs{@defaultsunits} (see below) following code, could be used:
-% \begin{macrocode}
-%<*neveruse>
- \expandafter\Ifiscount\expandafter{\reserved@a}{%
- \aftergroup\@firstoftwo
- }{%
-%</neveruse>
-% \end{macrocode}
-% But currently we don't use it!
-% \begin{macrocode}
- \expandafter\Ifisdimen\expandafter{\reserved@a}{%
- \aftergroup\@firstoftwo
- }{%
- \expandafter\Ifisskip\expandafter{\reserved@a}{%
- \aftergroup\@firstoftwo
- }{%
-% \end{macrocode}
-% Together with \cs{@defaultsunits} (see below) following code, could be used:
-% \begin{macrocode}
-%<*neveruse>
- \expandafter\Ifisnumexpr\expandafter{\reserved@a}{%
- \aftergroup\@firstoftwo
- }{%
-%</neveruse>
-% \end{macrocode}
-% But currently we don't use it!
-% \begin{macrocode}
- \expandafter\Ifisdimexpr\expandafter{\reserved@a}{%
- \aftergroup\@firstoftwo
- }{%
- \expandafter\Ifisglueexpr\expandafter{\reserved@a}{%
- \aftergroup\@firstoftwo
- }{%
- \expandafter\Ifisglue\expandafter{\reserved@a}{%
- \aftergroup\@firstoftwo
- }{%
- \aftergroup\@secondoftwo
- }%
- }%
- }%
-%<*neveruse>
- }%
-%</neveruse>
- }%
- }%
-%<*neveruse>
- }%
-%</neveruse>
- \endgroup
-% \end{macrocode}
-% \begin{description}
-% \item[ToDo:] Maybe something like:
-% \begin{macrocode}
-%<*neveruse>
- {\@defaultunits#3=#4pt\relax\@nnil\FamilyKeyStateProcessed}
-%</neveruse>
-% \end{macrocode}
-% would be nice. But there are reasons I've decided not to use
-% this. Unfortunately I cannot remember the reason (and because of this I've
-% added the code as \texttt{neveruse}). So the simple assignment is used
-% instead:
-% \end{description}
-% \begin{macrocode}
- {#3=#4\FamilyKeyStateProcessed}%
- {%
- \FamilyUnknownKeyValue{#1}{#2}{#4}{%
- length values,
-%<*neveruse>
- counters,
-%</neveruse>
- lengths, skips, dimens
- }%
- }%
-}
-%</base>
-% \end{macrocode}
-% \end{command}^^A \FamilySetLength
-% \end{macro}^^A \Family@@Leng{\FamilyLengthKey}th@@Key,\Family@Length@Key
-% \end{command}^^A FamilyLengthKey
-%
-% \begin{command}{\FamilyLengthMacroKey}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.15}{2014/12/03}{support for optional default}
-% \begin{command}{\FamilySetLengthMacro}
-% \changes{v3.12}{2013/11/05}{added}
-% \changes{v3.14a}{2014/11/24}{fix: \cs{@tempskipa} instead of \cs{@temskipa}}
-% \changes{v3.15}{2014/12/17}{\cs{aftergroup} before
-% \cs{FamilyKeyStateProcessed}}
-% \changes{v3.15}{2015/01/02}{\cs{ifglueexpr} added}
-% \changes{v3.18a}{2015/07/06}{usage of \cs{FamilyKeyStateProcessed} fixed}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \changes{v3.20}{2016/04/27}{using \cs{FamilySetLength}}
-% Similar to \cs{FamilyLengthKey}, but it does not use a \LaTeX{} counter to
-% store the value but a macro (or command):
-% \begin{quote}
-% \cs{FamilyLength MacroKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{macro}
-% \end{quote}
-% The \meta{value} will be assigned to a length (\len{@tempskipa}) locally and
-% the \meta{macro} is defined using the value of the length. The \meta{macro}
-% is automatically set to \cs{z@} if it was not already defined. If it was
-% defined, the user is responsible for that it has to be a valid length. Usage
-% of \cs{dimexpr} is recommended for such a definition.
-% \begin{macro}{\Family@@Length@@Macro@@Key,\Family@Length@Macro@Key}
-% \changes{v3.15}{2014/12/03}{added}
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyLengthMacroKey}[3][.\@currname.\@currext]{%
- \kernel@ifnextchar [%]
- {\Family@@Length@@Macro@@Key{#1}{#2}{#3}}%
- {\Family@Length@Macro@Key{#1}{#2}{#3}}%
-}
-\newcommand*{\Family@@Length@@Macro@@Key}{}
-\def\Family@@Length@@Macro@@Key#1#2#3[#4]#5{%
- \ifdefined#5\else\let#5\z@\fi
- \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetLengthMacro{#2}{#3}{#5}{##1}}%
-}
-\newcommand*{\Family@Length@Macro@Key}[4]{%
- \ifdefined#4\else\let#4\z@\fi
- \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetLengthMacro{#2}{#3}{#4}{##1}}%
-}
-\newcommand*{\FamilySetLengthMacro}[4]{%
- \begingroup
- \FamilySetLength{#1}{#2}{\@tempskipa}{#4}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \edef\reserved@a{%
- \unexpanded{\endgroup\def#3}%
- {\the\@tempskipa}%
- \noexpand\FamilyKeyStateProcessed
- }%
- \else
- \def\reserved@a{%
- \endgroup
- \FamilyUnknownKeyValue{#1}{#2}{#4}{%
- length values, counters, lengths, skips, dimens
- }%
- }%
- \fi
- \reserved@a
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \Family@@Length@@Macro@@Key,\Family@Length@Macro@Key
-% \end{command}^^A \FamilySetLengthMacro
-% \end{command}^^A \FamilyLengthMacroKey
-%
-%
-% \begin{command}{\FamilyUseLengthMacroKey,\FamilySetUseLengthMacro}
-% \changes{v3.20}{2016/04/27}{added}
-% These are almost the same like \cs{FamilyLengthMacroKey} and
-% \cs{FamilySetLengthMacro}. But there is one important difference: Instead of
-% setting the \meta{macro} to the value of the temporary length, that has been
-% used for a test assignment, the \meta{macro} is defined as \meta{value}. So
-% later changes valid for the expansion and value of \meta{value} will indeed
-% change the value of \meta{macro}, when it is used.
-% \begin{macro}{\Family@@UseLength@@Macro@@Key,\Family@USeLength@Macro@Key}
-% \changes{v3.20}{2016/04/27}{added}
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyUseLengthMacroKey}[3][.\@currname.\@currext]{%
- \kernel@ifnextchar [%]
- {\Family@@UseLength@@Macro@@Key{#1}{#2}{#3}}%
- {\Family@UseLength@Macro@Key{#1}{#2}{#3}}%
-}
-\newcommand*{\Family@@UseLength@@Macro@@Key}{}
-\def\Family@@UseLength@@Macro@@Key#1#2#3[#4]#5{%
- \ifdefined#5\else\let#5\z@\fi
- \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{%
- \FamilySetUseLengthMacro{#2}{#3}{#5}{##1}%
- }%
-}
-\newcommand*{\Family@UseLength@Macro@Key}[4]{%
- \ifdefined#4\else\let#4\z@\fi
- \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetUseLengthMacro{#2}{#3}{#4}{##1}}%
-}
-\newcommand*{\FamilySetUseLengthMacro}[4]{%
- \begingroup
- \FamilySetLength{#1}{#2}{\@tempskipa}{#4}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \def\reserved@a{%
- \endgroup\def#3{#4}%
- \FamilyKeyStateProcessed
- }%
- \else
- \def\reserved@a{%
- \endgroup
- \FamilyUnknownKeyValue{#1}{#2}{#4}{%
- length values, counters, lengths, skips, dimens
- }%
- }%
- \fi
- \reserved@a
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \Family@@UseLength@@Macro@@Key,\Family@USeLength@Macro@Key
-% \end{command}^^A \FamilyUseLengthMacroKey,\FamilySetUseLengthMacro
-%
-%
-% \begin{command}{\FamilyNumericalKey}
-% \changes{v3.00}{2008/04/30}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% This is a mapping of symbolic values to numerical values:
-% \begin{quote}
-% \cs{FamilyNumericalKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{macro}\marg{mapping list}
-% \end{quote}
-% The \meta{mapping list} is:
-% \begin{quote}
-% \texttt{\marg{symbol$_1$}\marg{value$_1$},\marg{symbol$_2$}\marg{value$_2$}\dots}
-% \end{quote}
-% There is no need for \meta{value$_n$} and \meta{value$_m$} to be mutual
-% exclusive. So several symbols can be mapped to the same value.
-% \begin{macro}{\Family@Numerical@Key}
-% \changes{v3.00}{2008/05/28}{added}
-% \changes{v3.08b}{2011/03/31}{fixed: missing argument to \cs{ifundefined}}
-% The internal macro is used to handle the optional \meta{default} (because
-% currently we are not using \pkg{xparse}).
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyNumericalKey}[3][.\@currname.\@currext]{%
- \kernel@ifnextchar [%]
- {\Family@Numerical@Key{#1}{#2}{#3}}{\Family@Numerical@Key{#1}{#2}{#3}[]}%
-}
-\newcommand*{\Family@Numerical@Key}{}
-\def\Family@Numerical@Key#1#2#3[#4]#5#6{%
- \@ifundefined{#5}{\@namedef{#5}{0}}{}%
- \ifx\relax#4\relax
- \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetNumerical{#2}{#3}{#5}{#6}{##1}}%
- \else
- \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{%
- \FamilySetNumerical{#2}{#3}{#5}{#6}{##1}}%
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{command}{\FamilySetNumerical}
-% \changes{v3.11a}{2012/05/28}{call of \cs{FamilyUnknownKeyValue} outside of
-% local group}
-% \changes{v3.25}{2017/12/04}{handling of completely empty list elements}
-% Set the value of \meta{key} defined by \cs{FamilyNumericalKey}:
-% \begin{quote}
-% \cs{FamilySetNumerical}\marg{family}\marg{key}\marg{macro}\marg{mapping list}\marg{value}
-% \end{quote}
-% \begin{macrocode}
-\newcommand*{\FamilySetNumerical}[5]{%
- \begingroup
- \edef\@searched{#5}%
- \let\reserved@a=\@empty
- \let\reserved@b=\@empty
- \@tempswafalse
- \@for\@valuelist:=#4\do{%
- \ifx\@valuelist\@empty\else
- \if@tempswa\else
- \edef\reserved@c{\expandafter\@firstoftwo\@valuelist}%
- \edef\reserved@a{\reserved@a\reserved@b`\reserved@c'}%
- \edef\reserved@b{, }%
- \ifx\reserved@c\@searched
- \@tempswatrue
- \edef\reserved@a{\expandafter\@secondoftwo\@valuelist}%
- \fi
- \fi
- \fi
- }%
- \if@tempswa
- \edef\reserved@a{\endgroup
- \noexpand\@namedef{#3}{\reserved@a}%
- \noexpand\FamilyKeyStateProcessed
- }%
- \else
- \edef\reserved@a{\endgroup
- \noexpand\FamilyUnknownKeyValue{#1}{#2}{#5}{\reserved@a}%
- }%
- \fi
- \reserved@a
- \let\FamilyElseValues\@empty
-}
-%</base>
-% \end{macrocode}
-% \end{command}^^A \FamilySetNumerical
-% \end{command}^^A \FamilyNumericalKey
-%
-% \begin{macro}{\KOMA@ncmdkey}
-% \changes{v3.02c}{2009/02/04}{defining the member (if needed)}
-% \changes{v3.17}{2015/03/16}{re-implemented with value storage and optional default}
-% \begin{macro}{\KOMA@@@ncmdkey,\KOMA@@ncmdkey}
-% \changes{v3.17}{2015/03/16}{added}
-% Like \cs{FamilyNumericalKey} with two important differences:
-% \begin{itemize}
-% \item The family is not an argument but always |KOMA|.
-% \item The values will in the internal value storage is replaced (on success).
-% \end{itemize}
-% Important: Don't forget to add the default to the internal value storage,
-% e.g., using \cs{KOMA@kav@add}.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@ncmdkey}[2][.\@currname.\@currext]{%
- \begingroup\edef\reserved@a{\noexpand\KOMA@@ncmdkey{#1}{#2}}%
- \expandafter\endgroup\reserved@a
-}
-\newcommand*{\KOMA@@ncmdkey}[2]{%
- \kernel@ifnextchar [%]
- {\KOMA@@@ncmdkey{#1}{#2}}{\KOMA@@@ncmdkey{#1}{#2}[]}
-}
-\newcommand*{\KOMA@@@ncmdkey}{}
-\def\KOMA@@@ncmdkey#1#2[#3]#4#5{%
- \@ifundefined{#4}{\@namedef{#4}{0}}{}%
- \ifx\relax#3\relax
- \KOMA@key[{#1}]{#2}{%
- \KOMA@set@ncmdkey{#2}{#4}{#5}{##1}%
- \KOMA@kav@replacevalue{#1}{#2}{##1}%
- }%
- \else
- \KOMA@key[{#1}]{#2}[{#3}]{%
- \KOMA@set@ncmdkey{#2}{#4}{#5}{##1}%
- \KOMA@kav@replacevalue{#1}{#2}{##1}%
- }%
- \fi
-}
-%</koma>
-% \end{macrocode}
-% \begin{macro}{\KOMA@set@ncmdkey}
-% The corresponding set command similar to \cs{FamilySetNumerical} but again
-% the family is not an argument but always |KOMA|.
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@set@ncmdkey}{\FamilySetNumerical{KOMA}}
-%</koma>
-% \end{macrocode}
-% \end{macro}^^A \KOMA@set@ncmdkey
-% \end{macro}^^A \KOMA@@@ncmdkey,\KOMA@@ncmdkey
-% \end{macro}^^A \KOMA@ncmdkey
-%
-%
-% \begin{command}{\FamilyStringKey}
-% \changes{v3.08}{2010/11/05}{added}
-% \changes{v3.08b}{2011/03/31}{\cs{Family@String@Key} and
-% \cs{Family@@String@@Key} switched}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% Defining a \meta{key} that defines a \meta{macro} to be a \meta{value}.
-% \begin{quote}
-% \cs{FamilyStringKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{macro}
-% \end{quote}
-% \meta{default} and the \meta{value} of the option should be a string (but
-% currently every value is accepted). The definition is done using
-% \cs{def}. So it doesn't matter whether the \meta{macro} is already defined.
-% \begin{macro}{\Family@String@Key,\Family@@String@@Key}
-% \changes{v3.08}{2010/11/05}{added}
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyStringKey}[3][.\@currname.\@currext]{%
- \kernel@ifnextchar [%]
- {\Family@@String@@Key{#1}{#2}{#3}}{\Family@String@Key{#1}{#2}{#3}}%
-}
-\newcommand*{\Family@@String@@Key}{}
-\long\def\Family@@String@@Key#1#2#3[#4]#5{%
- \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\def#5{##1}}%
-}
-\newcommand{\Family@String@Key}[4]{%
- \DefineFamilyKey[{#1}]{#2}{#3}{\def#4{##1}\FamilyKeyStateProcessed}%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \Family@String@Key,\Family@@String@@Key
-% \end{command}^^A \FamilyStringKey
-%
-%
-% \begin{command}{\FamilyCSKey}
-% \changes{v3.25}{2017/12/08}{added}
-% This is similar to \cs{FamilyStringKey} but instead of a \meta{macro} a
-% \meta{command sequence} is used:
-% \begin{quote}
-% \cs{FamilyCSKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{command sequence}
-% \end{quote}
-% Because of this, \cs{@namedef} instead of \cs{def} is used to define the
-% corresponding \cs{\meta{command sequence}}.
-% \begin{macro}{\Family@CS@Key}
-% \changes{v3.25}{2017/12/08}{added}
-% \begin{macro}{\Family@@CS@@Key}
-% \changes{v3.25}{2017/12/08}{added}
-% \changes{v3.26}{2018/11/06}{fix: don't overwrite \cs{Family@@String@@Key}}
-% \begin{macrocode}
-%<*base>
-\newcommand*{\FamilyCSKey}[3][.\@currname.\@currext]{%
- \kernel@ifnextchar [%]
- {\Family@@CS@@Key{#1}{#2}{#3}}{\Family@CS@Key{#1}{#2}{#3}}%
-}
-\newcommand*{\Family@@CS@@Key}{}
-\long\def\Family@@CS@@Key#1#2#3[#4]#5{%
- \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\@namedef{#5}{##1}}%
-}
-\newcommand{\Family@CS@Key}[4]{%
- \DefineFamilyKey[{#1}]{#2}{#3}{\@namedef{#4}{##1}\FamilyKeyStateProcessed}%
-}
-%</base>
-% \end{macrocode}
-% \end{macro}^^A \Family@@CS@@Key
-% \end{macro}^^A \Family@CS@Key
-% \end{command}^^A \FamilyCSKey
-%
-%
-% \begin{macro}{\KOMA@DeclareDeprecatedOption}
-% \changes{v3.01a}{2008/11/20}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% Used to define a deprecated \meta{classic option} by an up-to-date
-% \meta{\pkg*{keyval} option}.
-% \begin{quote}
-% \cs{KOMA@DeclareDeprecatedOption}\oarg{package name}\marg{classic
-% option}\marg{\pkg*{keyval} option}
-% \end{quote}
-% If the \meta{package name} is omitted, \cs{KOMAClassName} is used to report
-% a class warning instead of a package warning.
-% \begin{macro}{\KOMA@@DeclareDeprecatedOption,\KOMA@@@DeclareDeprecatedOption}
-% \changes{v3.01a}{2008/11/20}{added}
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@DeclareDeprecatedOption}{%
- \kernel@ifnextchar [%]
- {\KOMA@@DeclareDeprecatedOption}%
- {\KOMA@@@DeclareDeprecatedOption{\ClassWarningNoLine{\KOMAClassName}}}%
-}
-\newcommand*{\KOMA@@DeclareDeprecatedOption}[1][]{%
- \KOMA@@@DeclareDeprecatedOption{\PackageWarningNoLine{#1}}%
-}
-\newcommand*{\KOMA@@@DeclareDeprecatedOption}[3]{%
- \DeclareOption{#2}{\KOMA@UseDeprecatedOption{#1}{#2}{#3}}%
-}
-% \end{macrocode}
-% \begin{macro}{\KOMA@UseDeprecatedOption}
-% \changes{v3.01a}{2008/11/20}{added}
-% \changes{v3.12}{2013/03/04}{test to use \opt{version\quotechar=first}}
-% \changes{v3.12a}{2014/01/22}{test fixed}
-% \changes{v3.22}{2016/07/29}{added several \cs{detokenize}}
-% One more helper:
-% \begin{quote}
-% \cs{KOMA@UseDeprecatedOption}\marg{warning command}\marg{classic
-% option}\marg{\pkg*{keyval} option}
-% \end{quote}
-% Note: \meta{warning command} should either be
-% |\ClassWarningNoLine{\KOMAClassName}| or
-% \cs{PackageWarningNoLine}\marg{package name}. But you could also use
-% \cs{ClassInfoNoLine} or \cs{PackageInfoNoLine}.
-% \begin{macrocode}
-\newcommand*{\KOMA@UseDeprecatedOption}[3]{%
- \begingroup
- \scr@ifundefinedorrelax{KV@KOMA.\@currname.\@currext @version}{%
- \edef\reserved@a{\noexpand\endgroup
- \noexpand#1{%
- You've used obsolete option `\detokenize{#2}'.\noexpand\MessageBreak
- Usage of this option is deprecated.\noexpand\MessageBreak
- You should simply replace `\detokenize{#2}'\noexpand\MessageBreak
- by `\detokenize{#3}'%
- }%
- \noexpand\KOMAExecuteOptions{#3}%
- \noexpand\def\noexpand\CurrentOption{\CurrentOption}%
- }%
- }{%
- \edef\reserved@a{\noexpand\endgroup
- \noexpand#1{%
- You've used obsolete option `\detokenize{#2}'.\noexpand\MessageBreak
- Usage of this option indicates an old document\noexpand\MessageBreak
- and changes compatibility level using\noexpand\MessageBreak
- `\detokenize{#3},version=first,\noexpand\MessageBreak
- enabledeprecatedfontcommands' that may result\noexpand\MessageBreak
- in further warnings.\noexpand\MessageBreak
- If you don't want this, you should simply\noexpand\MessageBreak
- replace option `\detokenize{#2}' by `\detokenize{#3}'%
- }%
- \noexpand\KOMAExecuteOptions{%
- #3,version=first}%
- \noexpand\ExecuteOptions{enabledeprecatedfontcommands}%
- \noexpand\def\noexpand\CurrentOption{\CurrentOption}%
- }%
- }%
- \reserved@a
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}^^A \KOMA@UseDeprecatedOption
-% \end{macro}^^A \KOMA@@DeclareDeprecatedOption,\KOMA@@@DeclareDeprecatedOption
-% \end{macro}^^A \KOMA@DeclareDeprecatedOption
-%
-%
-% \begin{macro}{\KOMA@DeclareStandardOption}
-% \changes{v3.01a}{2008/11/21}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% This is similar to \cs{KOMA@DeclareDeprecatedOption} but is used for
-% standard options, which means options known by the standard classes.
-% \begin{quote}
-% \cs{KOMA@DeclareStandardOption}\oarg{package name}\marg{classic
-% option}\marg{\pkg*{keyval} option}
-% \end{quote}
-% For compatibility these options are not reported as deprecated, but an info
-% is added to the \file{log} file about the usage and how it could be replaced
-% by a \pkg*{keyval} option.
-% \begin{macro}{\KOMA@@DeclareStandardOption,\KOMA@@@DeclareStandardOption,
-% \KOMA@UseStandardOption}
-% \changes{v3.01a}{2008/11/21}{added}
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@DeclareStandardOption}{%
- \kernel@ifnextchar [%]
- {\KOMA@@DeclareStandardOption}%
- {\KOMA@@@DeclareStandardOption{\ClassInfoNoLine{\KOMAClassName}}}%
-}
-\newcommand*{\KOMA@@DeclareStandardOption}[1][]{%
- \KOMA@@@DeclareStandardOption{\PackageInfoNoLine{#1}}%
-}
-\newcommand*{\KOMA@@@DeclareStandardOption}[3]{%
- \DeclareOption{#2}{\KOMA@UseStandardOption{#1}{#2}{#3}}%
-}
-\newcommand*{\KOMA@UseStandardOption}[3]{%
- \begingroup
- \edef\reserved@a{\noexpand\endgroup
- \noexpand#1{%
- You've used standard option `#2'.\noexpand\MessageBreak
- This is correct!\noexpand\MessageBreak
- Internally I'm using `#3'.\noexpand\MessageBreak
- If you'd like to set the option with \string\KOMAoptions,%
- \noexpand\MessageBreak
- you'd have to use `#3' there\noexpand\MessageBreak
- instead of `#2', too%
- }%
- \noexpand\KOMAExecuteOptions{#3}%
- \noexpand\def\noexpand\CurrentOption{\CurrentOption}%
- }%
- \reserved@a
-}
-%</koma>
-% \end{macrocode}
-% \begin{macro}{\scr@sr@co}
-% \changes{v2.96}{2006/08/20}{added}
-% \changes{v3.12a}{2014/01/22}{removed}
-% \end{macro}^^A \scr@sr@co
-% \end{macro}^^A \KOMA@@@DeclareStandardOption … \KOMA@UseStandardOption
-% \end{macro}^^A \KOMA@DeclareStandardOption
-%
-%
-% \begin{macro}{\KOMA@DeclareObsoleteOption}
-% \changes{v2.96}{2006/08/20}{\cs{CurrentOption} protected}
-% \changes{v3.12}{2013/03/04}{removed}
-% \begin{macro}{\KOMA@@DeclareObsoleteOption,\KOMA@@@DeclareObsoleteOption,
-% \KOMA@iv@DeclareObsoleteOption,\KOMA@UseObsoleteOption}
-% \changes{v2.98c}{2008/02/18}{added}
-% \changes{v3.12}{2013/03/04}{removed}
-% \end{macro}^^A \KOMA@@DeclareObsoleteOption … \KOMA@UseObsoleteOption
-% \end{macro}^^A \KOMA@DeclareObsoleteOption
-%
-%
-% \begin{macro}{\KOMA@newobsoletecommand,\KOMA@newdeprecatedcommand}
-% \changes{v3.12}{2013/03/04}{\cs{KOMA@newobsoletecommand} renamed to
-% \cs{KOMA@newdeprecatedcommand}}
-% Defines a deprecated command or \meta{macro}, represented by a
-% \meta{\pkg*{keyval} option}:
-% \begin{quote}
-% \cs{KOMA@newdeprecatedcommand}\oarg{warning
-% command}\marg{macro}\marg{\pkg*{keyval} option}
-% \end{quote}
-% Note: This can be used only for macros and commands, that behave as a
-% selector. Macros or commands with arguments are not supported.
-% \begin{macro}{\KOMA@UseDeprecatedCommand,\KOMA@UseDeprecatedCommand}
-% \changes{v2.97c}{2007/04/19}{added}
-% \changes{v3.12}{2013/03/04}{\cs{KOMA@UseObsoleteCommand} renamed to
-% \cs{KOMA@UseDeprecatedCommand}}
-% \begin{macrocode}
-%<*koma>
-\newcommand*{\KOMA@newdeprecatedcommand}[3][\@gobbletwo]{%
- \newcommand*{#2}{\KOMA@UseDeprecatedCommand{#1}{\string#2}{#3}}%
-}
-\newcommand*{\KOMA@UseDeprecatedCommand}[3]{%
- #1{%
- scrkbase%
- }{%
- You've used deprecated command `#2'.\MessageBreak
- \protect\KOMAoptions{#3} will be used instead.\MessageBreak
- You should also replace `#2' by `\protect\KOMAoptions{#3}'%
- }%
- \KOMAoptions{#3}%
-}
-%</koma>
-% \end{macrocode}
-% \end{macro}^^A \KOMA@UseDeprecatedCommand
-% \end{macro}^^A \KOMA@newdeprecatedcommand
-%
-%
-% \subsection{Do hook mechanism}
-% \label{sec:dohook}
-%
-% \changes{v3.27}{2019/02/02}{Do hook mechanism added}
-% From \KOMAScript~v3.27 there is a new general hook mechanism called ``do
-% hook mechanism''. This mechanism is mentioned to provide extended hooks for
-% package authors. All hooks newly implemented in \KOMAScript{} \emph{should}
-% use this new mechanism.
-%
-%
-% \begin{command}{\ForDoHook}
-% \changes{v3.27}{2019/02/05}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \changes{v3.30}{2020/03/07}{\cs{loop}\dots\cs{repeat} inside group}
-% \changes{v3.30}{2020/03/07}{using \cs{rloop} instead of \cs{loop}}
-% Arguments:
-% \begin{description}
-% \item[\meta{specificator}:]
-% \meta{string} or \meta{string}\texttt{/}\meta{specificator}
-% \item[\meta{code}:] \LaTeX{} code
-% \end{description}
-% Executes \meta{code} for earch level of a do-hook. This is a helper command
-% normally not interesting for users or package authors. However, I define it
-% in the user context to be consistent with the other do-hook commands. Note,
-% there will be two arguments appended to the \meta{code}. The first one is
-% the name of the hook, the second one the hook argument.
-% See \cs{ExecuteDoHook} as an example.
-% \begin{macrocode}
-%<*base>
-\newcommand*{\ForDoHook}[2]{%
- \Ifstr{#1}{}{%
- \PackageError{scrbase}{empty do-hook specificator}{%
- You've tried to use an empty do-hook specificator,\MessageBreak
- but do-hook specificators must not be empty.%
- }%
- }{%
- \begingroup
- \def\scr@hookrun{\endgroup}%
- \let\scr@hookname\relax
- \edef\scr@hookargument{#1}%
- \rloop
- \scr@hooksplit@specificator\scr@hookname\scr@hookargument
- \scr@hookargument
- \edef\scr@hookrun{%
- \unexpanded\expandafter{\scr@hookrun}%
- \unexpanded{#2}{\scr@hookname}{\scr@hookargument}%
- }%
- \ifx\scr@hookargument\@empty\else
- \repeat
- \scr@hookrun
- }%
-}
-% \end{macrocode}
-% \begin{command}{\SplitDoHook}
-% \changes{v3.27}{2019/02/04}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Arguments:
-% \begin{description}
-% \item[\meta{specificator}:]
-% \meta{string} or \meta{string}\texttt{/}\meta{specificator}
-% \item[\meta{prefix command}:] \LaTeX{} macro
-% \item[\meta{postfix command}:] \LaTeX{} macro
-% \end{description}
-% Splits of the \emph{last} element of the \meta{specificator}. The
-% \meta{postfix command} is defined to be that last element, the \meta{prefix
-% command} is defined to be the rest.
-% \begin{macrocode}
-\newcommand*{\SplitDoHook}[3]{%
- \Ifstr{#1}{}{%
- \PackageWarning{scrbase}{empty do-hook specificator}%
- \let#2\@empty\let#3\@empty
- }{%
- \let#2\relax
- \edef\reserved@a{%
- \unexpanded{\scr@hooksplit@specificator{#2}{#3}}{#1}%
- }\reserved@a
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@hooksplit@specificator}
-% \changes{v3.27}{2019/02/02}{added}
-% Split of the first string of the specificator argument, append it to
-% \cs{scr@hookname} and store the rest in \cs{scr@hookargument}. The argument
-% must not be empty!
-% \begin{macro}{\scr@@hooksplit@specificator}
-% \changes{v3.27}{2019/02/02}{added}
-% \begin{macrocode}
-\newcommand*{\scr@hooksplit@specificator}[3]{%
- \expandafter\scr@@hooksplit@specificator\expandafter#1\expandafter#2#3/\@nil
-}
-\newcommand*{\scr@@hooksplit@specificator}{}
-\def\scr@@hooksplit@specificator#1#2#3/#4\@nil{%
- \scr@ifundefinedorrelax{scr@hookname}{\def#1{#3}}{%
- \edef#1{#1/#3}%
- }%
- \def#2{#4}%
- \ifx#2\@empty\else \scr@@hookargument#2#4\@nil\fi
-}
-\newcommand*{\scr@@hookargument}{}
-\def\scr@@hookargument#1#2/\@nil{\def#1{#2}}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{command}
-% \end{command}
-%
-% \begin{command}{\ExecuteDoHook}
-% \changes{v3.27}{2019/02/02}{added}
-% Arguments:
-% \begin{description}
-% \item[\meta{specificator}:]
-% \meta{string} or \meta{string}\texttt{/}\meta{specificator}
-% \end{description}
-% Each string of the \meta{specificator} defines a hook subgroup. The
-% execution is done in a loop, first all hook elements of the first
-% \meta{string} of the \meta{specificator} are executed with the rest of the
-% \meta{specificator} as an argument. Then the hook elements of the
-% composition of the first and the second \meta{string} are executed again
-% with the rest of the \meta{specificator} as an agument and so on until the
-% hook elements of the whole \meta{specificator} has been executed with an
-% empty argument. So every hook element has to expect an argument that is
-% itself a \meta{specificator}. At each loop level the one-time hooks
-% are executed after the permanent hooks.
-% \begin{macrocode}
-\newcommand*{\ExecuteDoHook}[1]{%
- \@ifundefined{scr@execute@dohook}{%
- \def\scr@execute@dohook##1##2{%
- \def\scr@hook@do####1{####1{##2}}%
- \@nameuse{scr@dohook@##1}%
- \@nameuse{scr@otdohook@##1}%
- \expandafter\global\expandafter\let
- \csname scr@otdohook@##1\endcsname\@empty
- \let\scr@hook@do\relax
- }%
- \ForDoHook{#1}{\scr@execute@dohook}%
- \let\scr@execute@dohook\relax
- }{%
- \PackageWarning{scrbase}{cascaded do-hook detected.\MessageBreak
- It seems, that the do-hook `\detokenize{#1}'\MessageBreak
- is be executed, while another do-hook is active.\MessageBreak
- This is not allowed and therefore ignored%
- }%
- }%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\AddtoDoHook}
-% \changes{v3.27}{2019/02/02}{added}
-% Arguments:
-% \begin{description}
-% \item[\meta{specificator}:]
-% \meta{string} or \meta{string}\texttt{/}\meta{specificator}
-% \item[\meta{element}:]
-% a \LaTeX command, that expects exactly one argument.
-% \end{description}
-% For the \meta{specificator} see \cs{ExecuteDoHook}. Here you can add an
-% \meta{element} to a hook defined by the \meta{specificator}. Adding a hook
-% is local to the current group.
-% \begin{macrocode}
-\newcommand*{\AddtoDoHook}[2]{%
- \Ifstr{#1}{}{%
- \PackageError{scrbase}{empty hook specificator}{%
- As hook specificators can never be empty, the first argument\MessageBreak
- of \string\AddtoDoHook\space must expand to an not empty string.%
- }%
- }{%
- \scr@ifundefinedorrelax{scr@dohook@#1}{\@namedef{scr@dohook@#1}{}}{}%
- \expandafter\l@addto@macro\csname scr@dohook@#1\endcsname{%
- \scr@hook@do{#2}%
- }%
- }%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\AddtoOneTimeDoHook}
-% \changes{v3.27}{2019/02/02}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Arguments:
-% \begin{description}
-% \item[\meta{specificator}:]
-% \meta{string} or \meta{string}\texttt{/}\meta{specificator}
-% \item[\meta{element}:]
-% a \LaTeX command, that expects exactly one argument.
-% \end{description}
-% This is almost the same as \cs{AddtoDoHook} but a hook added by this command
-% is executed only once.
-% \begin{macrocode}
-\newcommand*{\AddtoOneTimeDoHook}[2]{%
- \Ifstr{#1}{}{%
- \PackageError{scrbase}{empty hook specificator}{%
- As hook specificators can never be empty, the first argument\MessageBreak
- of \string\AddtoDoHook\space must expand to an not empty string.%
- }%
- }{%
- \scr@ifundefinedorrelax{scr@otdohook@#1}{\@namedef{scr@otdohook@#1}{}}{}%
- \expandafter\l@addto@macro\csname scr@otdohook@#1\endcsname{%
- \scr@hook@do{#2}%
- }%
- }%
-}
-%</base>
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-bibliography.dtx b/macros/latex/contrib/koma-script/source/scrkernel-bibliography.dtx
deleted file mode 100644
index a2c58a9e4e..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-bibliography.dtx
+++ /dev/null
@@ -1,746 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-bibliography.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-bibliography.dtx 3773 2022-03-29 06:27:55Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-29 08:27:55 +0200 (Tue, 29 Mar 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3773 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-bibliography.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (bibliography)]%
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{hvlogos}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-bibliography.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v2.95}{2002/06/30}{new by splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/21}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/21}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-bibliography.dtx}
-% \title{Bibliography and References with
-% \href{https://komascript.de}{\KOMAScript} Classes and Packages}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \file{scrkernel-bibliography.dtx} provides the usual functionality for the
-% bibliography or references. In comparison with the standard classes
-% several additions are available. Nevertheless it is fully compatible with
-% the known features of the standard classes.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation of the commands implemented in
-% \file{scrkernel-bibliography.dtx} in the \KOMAScript{} manual, either the
-% German \file{scrguide} or the English \file{scrguien}.
-%
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of Bibliography or References}
-%
-% Bibliography or references are not available with the \KOMAScript{} letter
-% class.
-% \begin{macrocode}
-%<*!letter>
-% \end{macrocode}
-%
-%
-% \subsection{Bibliography styles}
-%
-% \KOMAScript{} provides styles for the bibliography or references. This is
-% similar to the redefinition of \cs{@openbib@code} and \cs{newblock} with the
-% standard classes, but much more configurable.
-%
-% \begin{command}{\newbibstyle}
-% \changes{v2.98c}{2008/02/15}{added}
-% \changes{v3.17}{2015/03/12}{using internal storage of options \opt{bibliography}}
-% Defining new bibliography style:
-% \begin{quote}
-% \cs{newbibstyle}\oarg{parent style}\marg{style name}\marg{style code}
-% \end{quote}
-% The command defines an internal command \cs{scr@bibstyle@\meta{style name}},
-% that can be used to activate a bibliography style. If the \meta{parent
-% style} is given, the code of the \meta{parent style} is executed before the
-% \meta{style code}.
-% \begin{macro}{\@openbib@code}
-% \changes{v2.3g}{1996/01/14}{added}
-% \changes{v2.98c}{2008/02/15}{earlier definition}
-% Typically the \meta{style code} redefines the macro \cs{@openbib@code} and
-% \cs{newblock}.
-% The \cs{@openbib@code} is executed at the very beginning of a
-% bibliography. Originally it has been used to implement the standard option
-% \opt{openbib}. \KOMAScript{} uses it for compatibility for all bibliography
-% styles.
-% \begin{command}{\newblock}
-% \changes{v2.3g}{1996/01/14}{initialization changed}
-% \changes{v2.98c}{2008/02/15}{earlier definition}
-% The command \cs{newblock} is used inside bibliography entries to mark a
-% \emph{new block}. Usually such new blocks are inserted after the author and
-% after the title. But the user or \BibTeX{} style is free to use it different.
-% Both are initialized empty (before the code of a parent
-% style is executed.
-% \begin{macro}{\bib@beginhook,\bib@endhook}
-% \changes{v2.98c}{2008/02/15}{added}
-% Also \cs{bib@beginhook} and \cs{bib@endhook} are initialized empty. So
-% activation of a new bibliography style always removes the hook
-% code. Redefining an already existing style is not supported and results in
-% an error.
-% \begin{macrocode}
-%<*option>
-\newcommand{\newbibstyle}[3][]{%
- \scr@ifundefinedorrelax{scr@bibstyle@#2}{%
- \scr@ifundefinedorrelax{scr@bibstyle@#1}{%
- \ClassError{\KOMAClassName}{%
- parent bibliography style `#1' does not exist}{%
- You've told me to define the new bibliography style `#2'\MessageBreak
- to be a child of bibliography style `#1', but bibliography
- style\MessageBreak
- `#1' does not exist.\MessageBreak
- You have to remove the parent declaration or use an existing parent!
- See the KOMA-Script manual for more information.%
- }%
- }{%
- \@namedef{scr@bibstyle@#2}{%
- \let\@openbib@code\@empty
- \let\newblock\@empty
- \let\bib@beginhook\@empty
- \let\bib@endhook\@empty
-% \end{macrocode}
-% \begin{macro}{\scr@current@bibstyle}
-% \changes{v3.17}{2015/03/12}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \changes{v3.36}{2022/02/21}{add expanded name to list}
-% To be able to change the current value of option \opt{bibliography} we need
-% to know the current style and save it in \cs{scr@current@bibstyle}. We also
-% have to correct the value in the storage by activating a style.
-% \begin{macrocode}
- \@ifundefined{scr@current@bibstyle}{}{%
- \Ifstr{\scr@current@bibstyle}{}{}{%
- \edef\reserved@a{%
- \noexpand\KOMA@kav@remove{.\KOMAClassFileName}{bibliography}%
- {\scr@current@bibstyle}%
- }\reserved@a
- }%
- }%
- \def\scr@current@bibstyle{#2}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
- \KOMA@kav@xadd{.\KOMAClassFileName}{bibliography}{#2}%
- \csname scr@bibstyle@#1\endcsname
- #3%
- }%
- \ifx\scr@bibstylelist\@empty
- \edef\scr@bibstylelist{`#2'}%
- \else
- \edef\scr@bibstylelist{\scr@bibstylelist, `#2'}%
- \fi
- }%
- }{%
- \ClassError{\KOMAClassName}{bibliography style `#2' already exists}{%
- You've told me to define the new bibliography style `#2',\MessageBreak
- but this style already exists.\MessageBreak
- You have to use another bibliography style name.\MessageBreak
- See the KOMA-Script manual for more information.%
- }%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@bibstyle@}
-% \changes{v2.98c}{2008/02/15}{added}
-% Dummy of the empty parent style.
-% \begin{macrocode}
-\newcommand*{\scr@bibstyle@}{}
-% \end{macrocode}
-% \end{macro}^^A \scr@bibstyle@
-% The hook macros are reserved.
-% \begin{macrocode}
-\newcommand*{\bib@beginhook}{}
-\newcommand*{\bib@endhook}{}
-% \end{macrocode}
-% \end{macro}^^A \bib@beginhook,\bib@endhook
-% \begin{macro}{\scr@bibstylelist}
-% \changes{v2.98c}{2008/02/15}{added}
-% \changes{v3.36}{2022/02/21}{\cs{@gobble} removed}
-% \cs{scr@bibstylelist} is a printable comma-separated list of all known
-% styles. Single quotes are used to quote the single styles. It is designated
-% to be used in messages.
-% \begin{macrocode}
-\newcommand*{\scr@bibstylelist}{}
-% \end{macrocode}
-% And also \cs{@openbib@code} and \cs{newblock} are reserved.
-% \begin{macrocode}
-\newcommand*{\@openbib@code}{}
-\newcommand*{\newblock}{}
-% \end{macrocode}
-% \end{macro}^^A \scr@bibstylelist
-% \begin{macro}{\scr@bibstyle@openstyle,\scr@bibstyle@oldstyle}
-% \changes{v2.98c}{2008/02/15}{added}
-% The bibliography style \texttt{openstyle} corresponds to standard option
-% \opt{openbib}. The \cs{newblock} starts a new paragraph.
-% Style \texttt{oldstyle} is the default style where \cs{newblock} inserts a
-% small horizontal distance only.
-% \begin{macrocode}
-\newbibstyle{openstyle}{%
- \renewcommand*{\@openbib@code}{%
- \advance\leftmargin\bibindent
- \itemindent -\bibindent
- \listparindent \itemindent
- \parsep \z@
- }%
- \renewcommand*{\newblock}{\par}%
-}
-\newbibstyle{oldstyle}{%
- \renewcommand*{\newblock}{\hskip .11em\@plus.33em\@minus.07em}%
-}
-\scr@bibstyle@oldstyle
-% \end{macrocode}
-% \end{macro}^^A \scr@bibstyle@openstyle,\scr@bibstyle@oldstyle
-% \end{command}^^A \newblock
-% \end{macro}^^A \@openbib@code
-% \end{command}^^A \newbibstyle
-%
-%
-% \subsection{Bibliography heading}
-%
-% \begin{macro}{\bib@heading}
-% \changes{v2.3h}{1995/01/21}{added}
-% \changes{v2.6c}{2000/06/10}{printing preamble}
-% \changes{v2.7b}{2001/01/05}{using \cs{setchapterpreamble}}
-% \changes{v2.7j}{2001/06/27}{printing preamble moved to \env{thebibliography}}
-% \changes{v2.98c}{2008/02/15}{defined ealier}
-% \changes{v3.10}{2011/08/31}{using \cs{MakeMarkcase}}
-% \changes{v3.12}{2012/02/06}{using \cs{ifbib@leveldown}}
-% \changes{v3.13b}{2014/10/10}{running head with \texttt{leveldown} fixed}
-% \changes{v3.25}{2017/10/13}{using always \cs{@mkright} and \cs{@mkdouble}}
-% \changes{v3.25}{2017/10/13}{using \cs{bibliography@heading}}
-% \begin{macro}{\bibliography@heading}
-% \changes{v3.25}{2017/10/13}{added}
-% \changes{v3.26}{2018/09/03}{using \cs{addsecmark} or \cs{subsectionmark}
-% instead of \cs{@mkright}}
-% \cs{bib@heading} runs the more generic \cs{bibliography@heading} with text
-% \cs{refname} resp. \cs{bibname}. This indirect approach has been
-% implemented, to that \pkg{biblatex} can simply call \cs{bibliography} with
-% different texts for multiple bibliographies.
-% \begin{macrocode}
-\newcommand*{\bib@heading}{%
-%<article> \bibliography@heading{\refname}%
-%<book|report> \bibliography@heading{\bibname}%
-}
-\newcommand*{\bibliography@heading}[1]{%
- \ifbib@leveldown
-%<article> \subsection*{#1}%
-%<book|report> \section*{#1}%
-%<book|report> \addsecmark{#1}%
-%<*article>
- \begingroup
- \c@secnumdepth=-\maxdimen
- \subsectionmark{#1}%
- \endgroup
-%</article>
- \else
-%<article> \section*{#1}%
-%<book|report> \chapter*{#1}%
- \@mkdouble{\MakeMarkcase{#1}}%
- \fi
-}%
-% \end{macrocode}
-% \end{macro}^^A \bibliography@heading
-% \end{macro}^^A \bib@heading
-%
-%
-% \subsection{Options}
-%
-% \begin{option}{bibliography}
-% \changes{v2.98c}{2008/02/15}{added}
-% \changes{v3.10}{2011/08/31}{using \cs{MakeMarkcase}}
-% \changes{v3.12}{2013/02/06}{new value \opt{leveldown}}
-% \changes{v3.12}{2013/02/06}{new value \opt{standardlevel}}
-% \changes{v3.12}{2013/03/05}{adapted to changes of \pkg*{scrbase}}
-% \changes{v3.12}{2013/09/28}{using \cs{addxcontentsline} instead of
-% \cs{addcontentsline}}
-% \changes{v3.12}{2013/09/28}{do not write chapter entries to other directories}
-% \changes{v3.17}{2015/03/12}{using internal value storage}
-% \changes{v3.25}{2017/10/13}{using always \cs{@mkright} and \cs{@mkdouble}}
-% \changes{v3.25}{2017/10/13}{redefining \cs{bibliography@heading} instead of
-% \cs{bib@heading}}
-% \KOMAScript provides several configurations for the bibliography or
-% references using a single option.
-% \begin{macro}{\bib@leveldownfalse,\bib@leveldowntrue,\ifbib@leveldown}
-% \changes{v3.12}{2013/02/06}{added}
-% The boolean \cs{ifbib@leveldown} is used to allow the
-% bibliography/references have a lower heading level.
-% \begin{macrocode}
-\newif\ifbib@leveldown
-% \end{macrocode}
-% \end{macro}
-% The supported values for option \opt{bibliography} are:
-% \begin{macrocode}
-\KOMA@key{bibliography}{%
- \scr@ifundefinedorrelax{scr@bibstyle@#1}{%
- \KOMA@set@ncmdkey{bibliography}{@tempa}{%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=notoc}:] (default) don't add the bibliography/references to the
-% table of contents.
-% \end{description}
-% \begin{macrocode}
- {notoc}{0},{nottotoc}{0},{plainheading}{0},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=totoc}:] add the bibliography/references to the table of
-% contents, but do not number it.
-% \end{description}
-% \begin{macrocode}
- {totoc}{1},{toc}{1},{notnumbered}{1},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=numbered}:] number the bibliography/references and so also add
-% it to the table of contents.
-% \end{description}
-% \begin{macrocode}
- {numbered}{2},{totocnumbered}{2},{tocnumbered}{2},{numberedtotoc}{2},%
- {numberedtoc}{2},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=leveldown}:] don't use the top heading level (chapters with
-% \cls*{scrbook} or \cls*{scrreprt}, sections with \cs*{scrartcl}) but one
-% level lower (sections with \cls*{scrbook} or \cls*{scrreprt}, subsection
-% with \cs*{scrartcl}) for the bibliography/references.
-% \end{description}
-% \begin{macrocode}
- {leveldown}{3},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=standardlevel}:] use the top heading level (chapters with
-% \cls*{scrbook} or \cls*{scrreprt}, sections with \cs*{scrartcl}) for the
-% bibliography/references.
-% \end{description}
-% \begin{macrocode}
- {standardlevel}{4}%
- }{#1}%
- \ifcase \@tempa\relax % notoc
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nobibliography}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliography}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliographynumbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{nobibliography}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{notoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{totoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{numbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{notoc}%
- \renewcommand*{\bibliography@heading}[1]{%
- \ifbib@leveldown
-%<article> \subsection*{##1}%
-%<book|report> \section*{##1}%
- \@mkright{\MakeMarkcase{##1}}%
- \else
-%<article> \section*{##1}%
-%<book|report> \chapter*{##1}%
- \@mkdouble{\MakeMarkcase{##1}}%
- \fi
- }%
- \or% totoc
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nobibliography}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliography}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliographynumbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{bibliography}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{notoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{totoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{numbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{totoc}%
- \renewcommand*{\bibliography@heading}[1]{%
-%<*article>
- \ifbib@leveldown
-% \end{macrocode}
-% \changes{v3.23}{2017/02/23}{using \cs{ext@toc}}
-% \changes{v3.25}{2017/10/13}{using \cs{addsubsectiontocentry} instead of
-% \cs{addxcontentsline}}
-% From version 3.23 \cs{ext@toc} of \pkg*{tocbasic} is used instead of hard
-% coded |toc|.
-% \begin{macrocode}
- \subsection*{%
- \addsubsectiontocentry{}{##1}%
- ##1%
- }%
- \@mkright{\MakeMarkcase{##1}}%
- \else
- \addsec{##1}%
- \@mkdouble{\MakeMarkcase{##1}}%
- \fi
-%</article>
-%<*book|report>
- \ifbib@leveldown
- \addsec{##1}%
- \else
- \if@chaptertolists
- \@chaptertolistsfalse\addchap{##1}\@chaptertoliststrue
- \else
- \addchap{##1}%
- \fi
- \@mkdouble{\MakeMarkcase{##1}}%
- \fi
-%</book|report>
- }%
- \or% numbered
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nobibliography}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliography}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliographynumbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{bibliographynumbered}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{notoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{totoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{numbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{numbered}%
- \renewcommand*{\bibliography@heading}[1]{%
-%<*article>
- \ifbib@leveldown
- \subsection{##1}%
- \else
- \section{##1}%
- \@mkdouble{\MakeMarkcase{\sectionmarkformat ##1}}%
- \fi
-%</article>
-%<*book|report>
- \ifbib@leveldown
- \section{##1}%
- \else
- \if@chaptertolists
- \@chaptertolistsfalse\chapter{##1}\@chaptertoliststrue
- \else
- \chapter{##1}
- \fi
- \@mkdouble{\MakeMarkcase{\chaptermarkformat ##1}}%
- \fi
-%</book|report>
- }
- \or% leveldown
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{leveldown}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{standardlevel}%
- \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{leveldown}%
- \bib@leveldowntrue
- \or% standardlevel
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{leveldown}%
- \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{standardlevel}%
- \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{standardlevel}%
- \bib@leveldownfalse
- \fi
- }{%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=\meta{style}}:] all other values are names of styles.
-% \begin{description}
-% \item[ToDo:] Here we should test for valid style names and report an
-% unknown value for unknown styles.
-% \end{description}
-% \end{description}
-% \begin{macrocode}
- \FamilyKeyStateProcessed
- \edef\reserved@a{%
- \noexpand\KOMA@kav@remove{.\KOMAClassFileName}{bibliography}%
- {\scr@current@bibstyle}%
- }\reserved@a
- \csname scr@bibstyle@#1\endcsname
- }%
-}
-% \end{macrocode}
-% \end{option}
-%
-% \begin{option}{openbib}
-% \begin{macro}{\@openbibfalse,\@openbibtrue,\if@openbib}
-% \changes{v2.3g}{1996/01/14}{removed}
-% \end{macro}
-% \changes{v2.3g}{1996/01/14}{re-implemented}
-% \changes{v2.98c}{2008/02/15}{obsolete}
-% \changes{v3.01a}{2008/11/21}{standard instead of obsolete}
-% The standard option \opt{openbib} is mapped to \opt{bibliography=openstyle}.
-% \begin{macrocode}
-\KOMA@DeclareStandardOption{openbib}{bibliography=openstyle}
-% \end{macrocode}
-% \end{option}
-%
-% \begin{option}{bibtotoc}
-% \changes{v2.3h}{1995/01/21}{added}
-% \changes{v2.6b}{2000/05/26}{\cs{@mkboth} added}
-% \changes{v2.6c}{2000/06/10}{\cs{bibpreamble} added}
-% \changes{v2.7}{2001/01/03}{braces fixed}
-% \changes{v2.7j}{2001/06/27}{preamble printing moved to \env{thebibliography}}
-% \changes{v2.98c}{2008/02/15}{obsolete}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{option}{bibtotocnumbered}
-% \changes{v2.3h}{1995/01/21}{added}
-% \changes{v2.6b}{2000/05/26}{\cs{@mkboth} added}
-% \changes{v2.6c}{2000/06/10}{\cs{bibpreamble} added}
-% \changes{v2.7}{2001/01/03}{braces fixed}
-% \changes{v2.7b}{2001/01/05}{using \cs{setchapterpreamble}}
-% \changes{v2.7i}{2001/05/17}{\cs{chapter} instead of \cs{addchap}}
-% \changes{v2.7j}{2001/06/27}{preamble printing moved to \env{thebibliography}}
-% \changes{v2.9p}{2003/07/07}{number in running head}
-% \changes{v2.98c}{2008/02/15}{obsolete}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% Deprecated options \opt{bibtotoc} and \opt{bibtotocnumbered} are mapped to
-% \opt{bibliography=totoc} resp. \opt{bibliography=totocnumbered}.
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{bibtotoc}{bibliography=totoc}
-\KOMA@DeclareDeprecatedOption{bibtotocnumbered}{bibliography=totocnumbered}
-%</option>
-% \end{macrocode}
-% \end{option}^^A bibtotocnumbered
-% \end{option}^^A bibtotoc
-%
-%
-% \subsection{Names}
-%
-% \begin{command}{\refname,\bibname}
-% \changes{v3.36}{2022/02/15}{explicit definition for English languages}
-% Depending on the class either \cs{refname} or \cs{bibname} is used.
-% \begin{macrocode}
-%<*body>
-%<*article>
-\newcommand*\refname{References}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\refname{References}
-%</article>
-%<*book|report>
-\newcommand*\bibname{Bibliography}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\bibname{Bibliography}
-%</book|report>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{Printing the bibliography or references}
-%
-% \begin{command}{\setbibpreamble}
-% \changes{v2.6c}{2000/06/10}{added}
-% \changes{v2.7j}{2001/05/27}{\cs{renewcommand} replaced by \cs{def} for
-% better \pkg{natbib} compatibility}
-% \begin{macro}{\bibpreamble}
-% \changes{v2.6c}{2000/06/10}{neue (intern)}
-% \changes{v2.6d}{2000/07/20}{\cs{let} replaced by \cs{newcommand*}}
-% \changes{v2.8q}{2002/01/10}{\cs{newcommand*} replaced by \cs{let}}
-% \changes{v2.7j}{2001/05/27}{preamble printing moved to \env{thebibliography}}
-% \cs{bibpreamble} should be interpreted as an internal macro. The user
-% command name space has been used for compatibility with \pkg{natbib}
-% only. The official \KOMAScript{} user interface is using
-% \begin{quote}
-% \cs{setbibpreamble}\marg{preamble}
-% \end{quote}
-% Also for compatibility \cs{bibpreamble} is not set by \cs{bib@heading} but
-% inside environment \env{theenvironment}.
-% \begin{macrocode}
-\newcommand*{\bibpreamble}{\relax}
-\let\bibpreamble\relax
-\newcommand{\setbibpreamble}[1]{\def\bibpreamble{#1}}
-% \end{macrocode}
-% \end{macro}^^A \bibpreamble
-% \end{command}^^A \setbibpreamble
-%
-% \begin{length}{bibindent}
-% The indent of entries with option \opt{bibliography=openstyle}. Default is 1.5\,em.
-% \begin{macrocode}
-\newdimen\bibindent
-\bibindent=1.5em
-% \end{macrocode}
-% \end{length}
-%
-% \begin{environment}{thebibliography}
-% \changes{v2.2a}{1995/02/01}{for \cls*{scrartcl} \cs{bibname} replaced by
-% \cs{refname}}
-% \changes{v2.3h}{1995/01/21}{using \cs{bib@heading}}
-% \changes{v2.8q}{2002/01/10}{handling empty preamble}
-% \changes{v2.9o}{2003/03/06}{fix of comparing \cs{bibpreamble} with \cs{@empty}}
-% \changes{v2.98c}{2008/02/15}{new hooks \cs{bib@before@hook} and
-% \cs{bib@after@hook}}
-% This environment is used to print the bibliography or references. Note: This
-% environment is redefined by almost all bibliography packages like
-% \pkg{natbib} or \pkg{biblatex}. No one of these supports all features of
-% \KOMAScript{}. So if such a package is used, users should consult the
-% package manual instead of using a \KOMAScript{} feature.
-% \begin{macrocode}
-\newenvironment{thebibliography}[1]{%
- \if@bib@break@
- \bib@beginhook
- \else
-%<*book|report>
- \ifx\bibpreamble\relax\else\ifx\bibpreamble\@empty\else
- \setchapterpreamble{\bibpreamble}%
- \fi\fi
-%</book|report>
- \bib@heading
-%<*article>
- \ifx\bibpreamble\relax\else\ifx\bibpreamble\@empty\else
- \noindent\bibpreamble\par\nobreak
- \fi\fi
-%</article>
- \bib@beginhook
- \bib@before@hook
- \fi
-% \end{macrocode}
-% \begin{command}{\BreakBibliography}
-% \changes{v2.98c}{2008/02/15}{added}
-% Redefining \cs{BreakBibliography} to work with our definition of
-% \env{thebibliography}.
-% \begin{macrocode}
- \renewcommand{\BreakBibliography}[1]{%
- \@bib@break
- \end{thebibliography}%
- \begingroup ##1\endgroup
- \begin{thebibliography}{#1}
- }%
-% \end{macrocode}
-% \end{command}
-% \begin{macrocode}
-% Start the list for the entries.
- \list{%
- \@biblabel{\@arabic\c@enumiv}%
- }{%
- \settowidth\labelwidth{\@biblabel{#1}}%
- \leftmargin\labelwidth
- \advance\leftmargin\labelsep
- \@openbib@code
- \if@bib@break@
- \edef\@tempa{%
- \noexpand\usecounter{enumiv}%
- \noexpand\setcounter{enumiv}{\the\c@enumiv}%
- }\@tempa
- \no@bib@break
- \else
- \usecounter{enumiv}%
- \fi
- \let\p@enumiv\@empty
- \renewcommand*\theenumiv{\@arabic\c@enumiv}%
- }%
- \sloppy\clubpenalty4000 \widowpenalty4000
- \sfcode`\.=\@m
-}{%
- \if@bib@break@
- \def\@noitemerr{%
- \@latex@warning{%
- \string\BreakBibliography\space at begin of `thebibliography'
- environment\MessageBreak
- or following \string\BreakBibliography}%
- }%
- \else
- \def\@noitemerr{%
- \@latex@warning{%
- Empty `thebibliography' environment or
- \string\BreakBibliography\MessageBreak
- before end of `thebibliography' environment}%
- }%
- \fi
- \endlist
- \if@bib@break@
- \else
- \bib@after@hook
- \let\bib@before@hook\@empty
- \let\bib@after@hook\@empty
- \fi
- \bib@endhook
-}
-% \end{macrocode}
-% \begin{macro}{\if@bib@break@,\no@bib@break,\@bib@break}
-% \changes{v2.98c}{2008/02/15}{added}
-% To be used as global switch.
-% \begin{description}
-% \item[ToDo:] Maybe redefine \cs{@bib@break@true} and \cs{@bib@break@false}.
-% \end{description}
-% \begin{macrocode}
-\newif\if@bib@break@
-\newcommand{\no@bib@break}{\global\let\if@bib@break@\iffalse}
-\newcommand*{\@bib@break}{\global\let\if@bib@break@\iftrue}
-% \end{macrocode}
-% \end{macro}^^A \if@bib@break@,\no@bib@break,\@bib@break
-% \begin{macro}{\bib@before@hook,\bib@after@hook}
-% \changes{v2.98c}{2008/02/15}{added}
-% \begin{macrocode}
-\newcommand*{\bib@before@hook}{}
-\newcommand*{\bib@after@hook}{}
-% \end{macrocode}
-% \end{macro}^^A \bib@before@hook,\bib@after@hook
-% \end{environment}^^A thebibliography
-%
-% \begin{command}{\BreakBibliography}
-% \changes{v2.98c}{2008/02/15}{added}
-% The initial definition is a do nothing but warn, because the command makes
-% sense only inside \env{thebibliography}.
-% \begin{macrocode}
-\newcommand{\BreakBibliography}[1]{%
- \ClassWarning{\KOMAClassName}{%
- You've used \string\BreakBibliography\space either outside of\MessageBreak
- the bibliography or `thebibliography' was redefined\MessageBreak
- incompatible, e.g., using a bibliography package.\MessageBreak
- \string\BreakBibliography\space ignored%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \BreakBibliography
-%
-% \begin{command}{\AfterBibliographyPreamble,\AtEndBibliography}
-% \changes{v2.98c}{2008/02/15}{added}
-% Add code to the two new hooks inside our definition of
-% \env{thebibliography}. So any bibliography package can break this
-% functionality.
-% Note: The hooks are always emptied by selecting a style using
-% \opt{bibliography=\meta{style name}}.
-% \begin{macrocode}
-\newcommand{\AfterBibliographyPreamble}{\g@addto@macro\bib@before@hook}
-\newcommand{\AtEndBibliography}{\g@addto@macro\bib@after@hook}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{macrocode}
-%</!letter>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-compatibility.dtx b/macros/latex/contrib/koma-script/source/scrkernel-compatibility.dtx
deleted file mode 100644
index c56962eaf1..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-compatibility.dtx
+++ /dev/null
@@ -1,675 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-compatibility.dtx
-% Copyright (c) Markus Kohm, 2006-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-compatibility.dtx 3765 2022-03-16 09:25:29Z kohm $
-%<identify>%%% (run: identify)
-%<init>%%% (run: init)
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\def\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-16 10:25:29 +0100 (Mi, 16. Mär 2022) $
- \def\filerevision$#1: #2 ${\def\filerevision{r#2}}
- \filerevision$Revision: 3765 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-compatibility.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (compatibility)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{hvlogos}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-compatibility.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v2.95}{2006/03/16}{new by splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/21}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/21}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-compatibility.dtx}
-% \title{Compatibility with prior Versions of
-% \href{https://komascript.de}{\KOMAScript}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \KOMAScript{} has been designed to be as much compatible with the user
-% interface of the standard classes as possible. Compatibility with internal
-% commands of the standard classes is not possible and therefore sometimes
-% given, but mostly not. Compatibility with the lookalike of the standard
-% classes is not a main purpose of \KOMAScript{}, however with option
-% \opt{emulatestandardclasses} several layout elements can be changed to
-% look similar to the standard classes.
-%
-% Another compatibility topic is compatibility of \KOMAScript{} to prior
-% version of \KOMAScript. Sometimes, \KOMAScript{} has been changed to
-% improve the typography. In most of these cases you can switch back to the
-% results of prior versions with option \opt{version}.
-%
-% All those features are implemented in \file{scrkernel-compatibility.dtx}.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation of the commands implemented in
-% \file{scrkernel-compatibility.dtx} in the \KOMAScript{} manual, either the
-% German \file{scrguide} or the English \file{scrguien}.
-%
-%
-% \MaybeStop{\PrintIndex}
-%
-%
-% \section{Implementation of Compatibility Selection}
-%
-% \subsection{Options for compatibility with the standard classes}
-% There is only one such option, which can only be used while loading a
-% \KOMAScript{} class.
-%
-% \begin{option}{emulatestandardclasses}
-% \changes{v3.12}{2013/11/11}{added}
-% \changes{v3.20}{2016/02/16}{\opt{headings\quotechar=standardclasses} also for
-% \cls*{scrartcl}}
-% Because this option has to change several defaults, it should be used as
-% early as possible. The earliest time is the load time. So it has been
-% defined as a classic option.
-% \begin{macro}{\@scr@emulatestandardclassesfalse,\@scr@emulatestandardclassestrue,
-% \if@scr@emulatestandardclasses}
-% \changes{v3.12}{2013/11/11}{added}
-% We need a boolean switch, but it should be a kind of constant, so the
-% default changing macros are deactivated.
-% \begin{macrocode}
-%<*option&class&!letter>
-\newif\if@scr@emulatestandardclasses
-\let\scr@emulatestandardclassestrue\relax
-\let\scr@emulatestandardclassesfalse\relax
-\DeclareOption{emulatestandardclasses}{%
- \let\if@scr@emulatestandardclasses\iftrue
- \KOMAExecuteOptions{%
- fontsize=10pt,%
-%<article|book|report> headings=standardclasses,%
- cleardoublepage=current
- }%
- \newcommand*{\defaultpapersize}{letter}%
- \AtEndOfClass{%
- \setkomafont{descriptionlabel}{\bfseries}%
- \setkomafont{dictum}{\normalfont\small}%
- \setkomafont{caption}{}%
- \setkomafont{captionlabel}{}%
- \setcapindent{0pt}%
- \RequirePackage[pagestyleset=standard,markcase=upper]{scrlayer-scrpage}%
- \PreventPackageFromLoading{scrpage2}%
- \setkomafont{pagenumber}{\normalfont}%
- \setkomafont{pageheadfoot}{\normalfont}%
- \cfoot[\pagemark]{}%
-%<article|report> \pagestyle{plain}%
- }%
-}
-%</option&class&!letter>
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-%
-% \subsection{Options for compatibility with prior versions of \KOMAScript}
-% There is also a single option to select compatibility with exactly one
-% \KOMAScript{} version. The compatibility changes are limited to feature
-% changes. Bug changes are not affected. So you would never be able to get
-% exactly the result of the given version using this option. However falling
-% back to compatibility with a prior version usually also deactivates other
-% features of the current version.
-%
-% \changes{v3.01b}{2008/12/09}{compatibility definitions in packages only, if
-% not yet defined}
-%
-% \begin{option}{version}
-% \changes{v2.9u}{2005/03/05}{added}
-% \changes{v2.95}{2006/03/16}{can be used while loading only}
-% \begin{macro}{\scr@compatibility}
-% \changes{v2.9u}{2005/03/05}{added}
-% \changes{v3.01a}{2008/11/20}{default is \opt{\quotechar=last}}
-% \begin{macro}{\scr@ta@compatibility}
-% \changes{v3.01b}{2008/12/09}{added}
-% Depending on \opt{version=\meta{version}} \cs{scr@compatibility}
-% resp. \cs{scr@ta@compatibility} will be set to an integer. The mapping from
-% \meta{version} to the integer is done with several macros
-% \cs{scr@v@\meta{version}}.
-% \begin{macrocode}
-%<*init>
-%<class>\newcommand*
-%<package>\providecommand*
- {\scr@compatibility}{\scr@v@last}
-%<typearea>\newcommand*{\scr@ta@compatibility}{\scr@compatibility}
-%</init>
-%<*option>
-\KOMA@key{version}[last]{%
- \scr@ifundefinedorrelax{scr@v@#1}{%
- \def\scr@compatibility{0}%
-%<class> \ClassWarningNoLine{\KOMAClassName}{%
-%<*package>
- \PackageWarningNoLine{%
-%<extend> scrextend%
-%<typearea> typearea%
-%<letter> scrletter%
- }{%
-%</package>
- You have set option `version' to value `#1', but\MessageBreak
- this value of version is not supported.\MessageBreak
- Because of this, version was set to `first'%
- }%
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
-%<package&typearea> typearea.\scr@pkgextension
-%<package&letter> scrletter.\scr@pkgextension
- }{version}{first}%
- }{%
-%<class> \ClassInfoNoLine{\KOMAClassName}{%
-%<*package>
- \PackageInfoNoLine{%
-%<extend> scrextend%
-%<typearea> typearea%
-%<letter> scrletter%
- }{%
-%</package>
- Switching compatibility level to `#1'%
- }%
-%<class|extend|letter> \edef\scr@compatibility{\@nameuse{scr@v@#1}}%
-%<typearea> \edef\scr@ta@compatibility{\@nameuse{scr@v@#1}}%
- \FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
-%<package&typearea> typearea.\scr@pkgextension
-%<package&letter> scrletter.\scr@pkgextension
- }{version}{#1}%
- }%
-}
-%<class>\KOMA@kav@add{.\KOMAClassFileName}{version}{last}
-% \end{macrocode}
-% We do not use \cs{FamilyKeyState} if the option is set to late, but
-% immediately report an error.
-% \begin{macrocode}
-%<class>\AtEndOfClass{%
-%<package>\AtEndOfPackage{%
- \KOMA@key{version}[]{%
-%<class> \ClassError{\KOMAClassName}{%
-%<*package>
- \PackageError{%
-%<extend> scrextend%
-%<typearea> typearea%
-%<letter> scrletter%
- }{%
-%</package>
- Option `version' too late%
- }{%
- Option `version' may be set only while loading the
-%<class> class.\MessageBreak
-%<package> package.\MessageBreak
- But you've tried to set it up later.%
- }%
- \FamilyKeyStateProcessed
- }%
-}
-%</option>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*init>
-% \end{macrocode}
-% \begin{macro}{\scr@v@first}
-% \changes{v2.9u}{2005/03/05}{added}
-% \begin{macro}{\scr@v@2.9}
-% \changes{v2.9u}{2005/03/05}{added}
-% \begin{macro}{\scr@v@2.9t}
-% \changes{v2.9u}{2005/03/05}{added}
-% \begin{macro}{\scr@v@2.95}
-% \changes{v2.95}{2006/03/23}{added}
-% \begin{macro}{\scr@v@2.95a}
-% \changes{v2.96a}{2006/11/27}{added}
-% \begin{macro}{\scr@v@2.95b}
-% \changes{v2.96a}{2006/11/27}{added}
-% \begin{macro}{\scr@v@2.96}
-% \changes{v2.96a}{2006/11/27}{added}
-% \begin{macro}{\scr@v@2.96a}
-% \changes{v2.96a}{2006/11/27}{added}
-% \begin{macro}{\scr@v@2.97}
-% \changes{v2.97}{2007/03/02}{added}
-% \begin{macro}{\scr@v@2.97a}
-% \changes{v2.97a}{2007/03/07}{added}
-% \begin{macro}{\scr@v@2.97b}
-% \changes{v2.97b}{2007/03/25}{added}
-% \begin{macro}{\scr@v@2.97c}
-% \changes{v2.97c}{2007/05/12}{added}
-% \changes{v2.97d}{2007/10/09}{Wert geändert}%^^A
-% \begin{macro}{\scr@v@2.97d}
-% \changes{v2.97d}{2007/10/03}{added}
-% \changes{v2.97d}{2007/10/09}{Wert geändert}%^^A
-% \begin{macro}{\scr@v@2.97e}
-% \changes{v2.97e}{2007/11/27}{added}
-% \begin{macro}{\scr@v@2.98}
-% \changes{v2.98}{2007/12/24}{added}
-% \begin{macro}{\scr@v@2.98a}
-% \changes{v2.98a}{2008/01/08}{added}
-% \begin{macro}{\scr@v@2.98b}
-% \changes{v2.98b}{2008/01/30}{added}
-% \begin{macro}{\scr@v@2.98c}
-% \changes{v2.98c}{2008/02/01}{added}
-% \begin{macro}{\scr@v@3.00}
-% \changes{v3.00}{2008/11/04}{added}
-% \begin{macro}{\scr@v@3.01}
-% \changes{v3.01}{2008/11/14}{added}
-% \begin{macro}{\scr@v@3.01a}
-% \changes{v3.01a}{2008/11/20}{added}
-% \begin{macro}{\scr@v@3.01b}
-% \changes{v3.01b}{2008/11/24}{added}
-% \begin{macro}{\scr@v@3.01c}
-% \changes{v3.01c}{2008/12/09}{added}
-% \begin{macro}{\scr@v@3.02}
-% \changes{v3.02}{2009/01/01}{added}
-% \begin{macro}{\scr@v@3.02b}
-% \changes{v3.02b}{2009/01/24}{added}
-% \begin{macro}{\scr@v@3.02c}
-% \changes{v3.02c}{2009/01/28}{added}
-% \begin{macro}{\scr@v@3.03}
-% \changes{v3.03}{2009/04/01}{added}
-% \begin{macro}{\scr@v@3.03a}
-% \changes{v3.03a}{2009/04/02}{added}
-% \begin{macro}{\scr@v@3.03b}
-% \changes{v3.03b}{2009/04/12}{added}
-% \begin{macro}{\scr@v@3.04}
-% \changes{v3.04}{2009/07/07}{added}
-% \begin{macro}{\scr@v@3.05}
-% \changes{v3.05}{2009/07/08}{added}
-% \begin{macro}{\scr@v@3.04a}
-% \changes{v3.04a}{2009/07/24}{added}
-% \begin{macro}{\scr@v@3.05a}
-% \changes{v3.05a}{2010/03/10}{added}
-% \begin{macro}{\scr@v@3.06}
-% \changes{v3.06}{2010/06/17}{added}
-% \begin{macro}{\scr@v@3.07}
-% \changes{v3.07}{2010/09/14}{added}
-% \begin{macro}{\scr@v@3.08}
-% \changes{v3.08}{2010/10/28}{added}
-% \begin{macro}{\scr@v@3.08a}
-% \changes{v3.08a}{2011/01/25}{added}
-% \begin{macro}{\scr@v@3.08b}
-% \changes{v3.08b}{2011/02/22}{added}
-% \begin{macro}{\scr@v@3.09}
-% \changes{v3.09}{2011/04/02}{added}
-% \begin{macro}{\scr@v@3.09a}
-% \changes{v3.09a}{2011/04/12}{added}
-% \begin{macro}{\scr@v@3.10}
-% \changes{v3.10}{2011/08/30}{added}
-% \begin{macro}{\scr@v@3.10a}
-% \changes{v3.10a}{2012/03/08}{added}
-% \begin{macro}{\scr@v@3.10b}
-% \changes{v3.10b}{2012/03/13}{added}
-% \begin{macro}{\scr@v@3.11}
-% \changes{v3.11}{2012/05/15}{added}
-% \begin{macro}{\scr@v@3.11a}
-% \changes{v3.11a}{2012/05/25}{added}
-% \begin{macro}{\scr@v@3.11b}
-% \changes{v3.11b}{2012/07/29}{added}
-% \begin{macro}{\scr@v@3.12}
-% \changes{v3.12}{2013/03/05}{added}
-% \begin{macro}{\scr@v@3.13}
-% \changes{v3.13}{2014/03/19}{added}
-% \begin{macro}{\scr@v@3.13a}
-% \changes{v3.13a}{2014/08/07}{added}
-% \begin{macro}{\scr@v@3.14}
-% \changes{v3.14}{2014/10/28}{added}
-% \begin{macro}{\scr@v@3.15}
-% \changes{v3.15}{2014/11/20}{added}
-% \begin{macro}{\scr@v@3.16}
-% \changes{v3.16}{2015/02/08}{added}
-% \begin{macro}{\scr@v@3.17}
-% \changes{v3.17}{2015/02/08}{added}
-% \begin{macro}{\scr@v@3.17a}
-% \changes{v3.17a}{2015/05/06}{added}
-% \begin{macro}{\scr@v@3.17c}
-% \changes{v3.17c}{2015/05/13}{added}
-% \begin{macro}{\scr@v@3.18}
-% \changes{v3.18}{2015/05/14}{added}
-% \begin{macro}{\scr@v@3.18a}
-% \changes{v3.18a}{2015/07/03}{added}
-% \begin{macro}{\scr@v@3.19}
-% \changes{v3.19}{2015/07/26}{added}
-% \begin{macro}{\scr@v@3.19a}
-% \changes{v3.19a}{2015/10/03}{added}
-% \begin{macro}{\scr@v@3.20}
-% \changes{v3.20}{2015/10/06}{added}
-% \begin{macro}{\scr@v@3.21}
-% \changes{v3.21}{2016/05/19}{added}
-% \begin{macro}{\scr@v@3.22}
-% \changes{v3.22}{2016/07/29}{added}
-% \begin{macro}{\scr@v@3.23}
-% \changes{v3.23}{2017/02/04}{added}
-% \begin{macro}{\scr@v@3.23}
-% \changes{v3.24}{2017/04/22}{added}
-% \begin{macro}{\scr@v@3.25}
-% \changes{v3.25}{2017/09/07}{added}
-% \begin{macro}{\scr@v@3.26}
-% \changes{v3.26}{2018/03/31}{added}
-% \begin{macro}{\scr@v@3.26a}
-% \changes{v3.26a}{2018/12/30}{added}
-% \begin{macro}{\scr@v@3.26b}
-% \changes{v3.26b}{2018/12/30}{added}
-% \begin{macro}{\scr@v@3.27}
-% \changes{v3.27}{2019/02/02}{added}
-% \begin{macro}{\scr@v@3.27a}
-% \changes{v3.27a}{2019/10/13}{added}
-% \begin{macro}{\scr@v@3.28}
-% \changes{v3.28}{2019/11/20}{added}
-% \begin{macro}{\scr@v@3.29}
-% \changes{v3.29}{2020/01/06}{added}
-% \begin{macro}{\scr@v@3.30}
-% \changes{v3.30}{2020/02/24}{added}
-% \begin{macro}{\scr@v@3.31}
-% \changes{v3.31}{2020/04/26}{added}
-% \begin{macro}{\scr@v@3.32}
-% \changes{v3.32}{2020/08/06}{added}
-% \begin{macro}{\scr@v@3.33}
-% \changes{v3.33}{2021/01/01}{added}
-% \begin{macro}{\scr@v@3.34}
-% \changes{v3.34}{2021/03/22}{added}
-% \begin{macro}{\scr@v@3.35}
-% \changes{v3.35}{2021/10/12}{added}
-% \begin{macro}{\scr@v@3.36}
-% \changes{v3.36}{2021/11/17}{added}
-% \begin{macro}{\scr@v@last}
-% \changes{v2.9u}{2005/03/05}{added}
-% Nun die unterschiedlichen möglichen Werte (|\scr@v@last| ist jeweils die
-% höchste vorhandene Nummer):
-% \begin{macrocode}
-\@namedef{scr@v@first}{0}
-\@namedef{scr@v@2.9}{0}
-\@namedef{scr@v@2.9t}{0}
-\@namedef{scr@v@2.9u}{1}
-\@namedef{scr@v@2.95}{2}
-\@namedef{scr@v@2.95a}{2}
-\@namedef{scr@v@2.95b}{2}
-\@namedef{scr@v@2.96}{2}
-\@namedef{scr@v@2.96a}{3}
-\@namedef{scr@v@2.97}{3}
-\@namedef{scr@v@2.97a}{3}
-\@namedef{scr@v@2.97b}{3}
-\@namedef{scr@v@2.97c}{4}
-\@namedef{scr@v@2.97d}{5}
-\@namedef{scr@v@2.97e}{6}
-\@namedef{scr@v@2.98}{6}
-\@namedef{scr@v@2.98a}{6}
-\@namedef{scr@v@2.98b}{6}
-\@namedef{scr@v@2.98c}{7}
-\@namedef{scr@v@3.00}{8}
-\@namedef{scr@v@3.01}{8}
-\@namedef{scr@v@3.01a}{8}
-\@namedef{scr@v@3.01b}{9}
-\@namedef{scr@v@3.01c}{9}
-\@namedef{scr@v@3.02}{9}
-\@namedef{scr@v@3.02b}{9}
-\@namedef{scr@v@3.02c}{10}
-\@namedef{scr@v@3.03}{10}
-\@namedef{scr@v@3.03a}{10}
-\@namedef{scr@v@3.03b}{10}
-\@namedef{scr@v@3.04}{10}
-\@namedef{scr@v@3.04a}{10}
-\@namedef{scr@v@3.05}{10}
-\@namedef{scr@v@3.05a}{10}
-\@namedef{scr@v@3.06}{10}
-\@namedef{scr@v@3.07}{10}
-\@namedef{scr@v@3.08}{10}
-\@namedef{scr@v@3.08a}{10}
-\@namedef{scr@v@3.08b}{10}
-\@namedef{scr@v@3.09}{10}
-\@namedef{scr@v@3.09a}{10}
-\@namedef{scr@v@3.10}{10}
-\@namedef{scr@v@3.10a}{10}
-\@namedef{scr@v@3.10b}{10}
-\@namedef{scr@v@3.11}{10}
-\@namedef{scr@v@3.11a}{10}
-\@namedef{scr@v@3.11b}{10}
-\@namedef{scr@v@3.12}{11}
-\@namedef{scr@v@3.13}{12}
-\@namedef{scr@v@3.13a}{13}
-\@namedef{scr@v@3.14}{13}
-\@namedef{scr@v@3.15}{14}
-\@namedef{scr@v@3.16}{14}
-\@namedef{scr@v@3.17}{15}
-\@namedef{scr@v@3.17a}{15}
-\@namedef{scr@v@3.17c}{15}
-\@namedef{scr@v@3.18}{15}
-\@namedef{scr@v@3.18a}{15}
-\@namedef{scr@v@3.19}{15}
-\@namedef{scr@v@3.19a}{15}
-\@namedef{scr@v@3.20}{15}
-\@namedef{scr@v@3.21}{15}
-\@namedef{scr@v@3.22}{16}
-\@namedef{scr@v@3.23}{16}
-\@namedef{scr@v@3.24}{16}
-\@namedef{scr@v@3.25}{17}
-\@namedef{scr@v@3.26}{17}
-\@namedef{scr@v@3.26a}{17}
-\@namedef{scr@v@3.26b}{17}
-\@namedef{scr@v@3.27}{17}
-\@namedef{scr@v@3.27a}{17}
-\@namedef{scr@v@3.28}{17}
-\@namedef{scr@v@3.29}{17}
-\@namedef{scr@v@3.30}{17}
-\@namedef{scr@v@3.31}{18}
-\@namedef{scr@v@3.32}{18}
-\@namedef{scr@v@3.33}{18}
-\@namedef{scr@v@3.34}{18}
-\@namedef{scr@v@3.35}{19}
-\@namedef{scr@v@3.36}{20}
-\@namedef{scr@v@last}{20}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{option}
-% \begin{macrocode}
-%</init>
-% \end{macrocode}
-%
-% \begin{macro}{\scr@v@is@lt,\scr@v@is@gt,\scr@v@is@le,\scr@v@is@ge}
-% \changes{v3.17}{2015/03/10}{added}
-% All these macros are to be used as condition for \cs{ifnum} and compare the
-% currently selected version with a given \meta{version}, e.g.:
-% \begin{quote}
-% \cs{expandafter}\cs{ifnum}\cs{scr@v@is@lt}\marg{version} \meta{true code}
-% \cs{else} \meta{false code} \cs{fi}
-% \end{quote}
-% The conditions are:
-% \begin{quote}\raggedright
-% \cs{scr@v@is@lt} --- current version less than \meta{version} \\
-% \cs{scr@v@is@gt} --- current version greater than \meta{version} \\
-% \cs{scr@v@is@le} --- current version less than or equal to \meta{version} \\
-% \cs{scr@v@is@ge} --- current version greater than or equal to \meta{version} \\
-% \end{quote}
-% \begin{macrocode}
-%<*option&(class|extend)>
-\newcommand*{\scr@v@is@lt}[1]{%
- \scr@compatibility<\@nameuse{scr@v@#1}
-}
-\newcommand*{\scr@v@is@gt}[1]{%
- \scr@compatibility>\@nameuse{scr@v@#1}
-}
-\newcommand*{\scr@v@is@le}[1]{%
- \numexpr\scr@compatibility-\@ne\relax<\@nameuse{scr@v@#1}
-}
-\newcommand*{\scr@v@is@ge}[1]{%
- \numexpr\scr@compatibility+\@ne\relax>\@nameuse{scr@v@#1}
-}
-%</option&(class|extend)>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\scr@ta@v@is@lt,\scr@ta@v@is@gt,\scr@ta@v@is@le,\scr@ta@v@is@ge}
-% \changes{v3.17}{2015/03/10}{Neu (intern)}
-% The same conditions are defined for \pkg*{typearea}.
-% \begin{macrocode}
-%<*option&package&typearea>
-\newcommand*{\scr@ta@v@is@lt}[1]{%
- \scr@ta@compatibility<\@nameuse{scr@v@#1}
-}
-\newcommand*{\scr@ta@v@is@gt}[1]{%
- \scr@ta@compatibility>\@nameuse{scr@v@#1}
-}
-\newcommand*{\scr@ta@v@is@le}[1]{%
- \numexpr\scr@ta@compatibility-\@ne <\@nameuse{scr@v@#1}
-}
-\newcommand*{\scr@ta@v@is@ge}[1]{%
- \numexpr\scr@ta@compatibility+\@ne >\@nameuse{scr@v@#1}
-}
-%</option&package&typearea>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Compatibility with early versions of \cls*{scrlttr2}}
-% Early version of \cls*{scrlttr2} have had another macro. Because, there may
-% still be \file{lco} files, that use is, it is also defined if compatibility
-% to version before 2.95 has been selected.
-%
-% \begin{macro}{\@setif}
-% \changes{v2.8q}{2001/10/08}{added}
-% \changes{v2.95}{2006/03/31}{only for version settings before 2.95}
-% The deprecated command has been used to set a boolean switch to true or
-% false using one of the values |true|, |false|, |on|, or |off|.
-% \begin{macrocode}
-%<*class&letter&body>
-\expandafter\ifnum \@nameuse{scr@v@2.95}>\scr@compatibility\relax
- \newcommand*{\@setif}[2][]{%
- \begingroup
- \edef\@tempa{#1}\ifx\@tempa\@empty
- \def\@tempa{\KOMA@set@ifkey{#2}{@#2}}%
- \else
- \def\@tempa{\KOMA@set@ifkey{#2}{#1}}%
- \fi
- \expandafter\endgroup\@tempa
- }%
-\fi
-%</class&letter&body>
-% \end{macrocode}
-% \end{macro}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-floats.dtx b/macros/latex/contrib/koma-script/source/scrkernel-floats.dtx
deleted file mode 100644
index eccacb2b25..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-floats.dtx
+++ /dev/null
@@ -1,1859 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-floats.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-floats.dtx 3773 2022-03-29 06:27:55Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-29 08:27:55 +0200 (Tue, 29 Mar 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3773 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-floats.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (floats)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-floats.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2002/07/01}{new by splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/22}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/22}{implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-floats.dtx}
-% \title{Code for the Foats of the
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% The code for floats in \file{scrkernel-floats.dtx} is older than the
-% generic hook mechanism in the \LaTeX{} kernel. Because of this, it
-% currently does not use the kernel hook mechanism. Mostly it is also older
-% then the \KOMAScript{} package \pkg*{tocbasic} to implement and manage
-% floats. So several code has been adapted several times and maybe a general
-% re-implementation would be a good idea.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-%
-% \MaybeStop{\PrintIndex}
-%
-%
-% \section{Implementation of Floats}
-%
-% All this code is for the classes only and not for the \KOMAScript{} letter
-% class, because letter classes usually do not provide floats. If you need
-% letters with floats, just use \KOMAScript{} class \cls*{scrartcl} with
-% \KOMAScript{} package \pkg*{scrletter}.
-%
-% \begin{macrocode}
-%<*class&!letter>
-% \end{macrocode}
-%
-% \subsection{Some macros and configurations for the options}
-%
-% We need some of the macros an settings already when processing the options.
-%
-% \begin{macro}{\@captionabovefalse,\@captionabovetrue,\if@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}.
-% \begin{macrocode}
-%<*option>
-\newif\if@captionabove\@captionabovefalse
-% \end{macrocode}
-% \end{macro}^^A \if@captionabove
-%
-% \begin{macro}{\@tablecaptionabovefalse,\@tablecaptionabovetrue,\if@tablecaptionabove}
-% \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@tablecaptionabove\@tablecaptionabovefalse
-% \end{macrocode}
-% \end{macro}^^A \if@tablecaptionabove
-%
-% \begin{macro}{\@figurecaptionabovefalse,\@figurecaptionabovetrue,\if@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@figurecaptionabove\@figurecaptionabovefalse
-% \end{macrocode}
-% \end{macro}^^A \if@figurecaptionabove
-%
-% \begin{macro}{\onelinecaptionsfalse,\onelinecaptionstrue,\ifonelinecaptions}
-% \changes{v2.8q}{2001/11/17}{added}
-% \changes{v2.98c}{2008/03/03}{earlier definition}
-% 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
-% \end{macrocode}
-% \end{macro}^^A \ifonelinecaptions
-%
-% \begin{macro}{\scap@pos}
-% \changes{v2.8q}{2001/11/22}{added}
-% \changes{v2.98c}{2008/03/03}{earlier definition}
-% Environment \env{captionbeside} supports several horizontal placements for
-% the caption beside the object:
-% \begin{description}
-% \item[\texttt{i}:] caption inner beside the object, which means left beside
-% on odd pages and right beside on even pages (note: single-sided documents
-% have only odd pages),
-% \item[\texttt{l}:] caption left beside the object,
-% \item[\texttt{o}:] caption outer beside the object, which means right beside
-% on odd pages and left beside on even pages (note: single-sided documents
-% have only odd pages),
-% \item[\texttt{r}:] caption right beside the object.
-% \end{description}
-% The default is right beside.
-% \begin{macrocode}
-\newcommand*{\scap@pos}{r}
-% \end{macrocode}
-% \end{macro}^^A \scap@pos
-%
-% \begin{macro}{\scap@valign}
-% \changes{v2.8q}{2001/11/22}{added}
-% \changes{v2.98c}{2008/03/03}{earlier definition}
-% Environment \env{captionbeside} support different vertical alignments
-% for the object box:
-% \begin{description}
-% \item[\texttt{c}:] centered,
-% \item[\texttt{b}:] bottom,
-% \item[\texttt{t}:] top.
-% \end{description}
-% The default is bottom.
-% \begin{macrocode}
-\newcommand*{\scap@valign}{b}
-% \end{macrocode}
-% \end{macro}^^A \scap@valign
-%
-% \subsection{Options for the captions}
-%
-% \begin{option}{captions}
-% \changes{v2.98c}{2008/02/18}{new \pkg*{keyval} option}
-% \changes{v3.09}{2011/04/02}{new values \opt{heading}, \opt{signature},
-% \opt{figureheading}, \opt{figuresignature}}
-% \changes{v3.17}{2015/03/11}{using \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/11}{using internal value storage}
-% 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
-% used. This makes it difficult to change anything here. However, the
-% currently provides values are:
-% \begin{macrocode}
-\KOMA@key{captions}{%
- \KOMA@set@ncmdkey{captions}{@tempa}{%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=heading}:] change the \cs{caption} default to \cs{captionabove}.
-% \end{description}
-% \begin{macrocode}
- {heading}{0},{above}{0},{top}{0},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=signature}:] change the \cs{caption} default to \cs{captionbelow}.
-% \end{description}
-% \begin{macrocode}
- {signature}{1},{below}{1},{bot}{1},{bottom}{1},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=tableheading}:] change the \cs{caption} default inside
-% \env{table} environments to \cs{captionabove}.
-% \end{description}
-% \begin{macrocode}
- {tableheading}{2},%
- {tableabove}{2},{abovetable}{2},{abovetabular}{2},{topattable}{2},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=tablesignature}:] change the \cs{caption} default inside
-% \env{table} environment to \cs{captionbelow}.
-% \end{description}
-% \begin{macrocode}
- {tablesignature}{3},%
- {tablebelow}{3},{belowtable}{3},{belowtabular}{3},{bottomattable}{3},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=figureheading}:] change the \cs{caption} default inside
-% \env{figure} environments to \cs{captionabove}.
-% \end{description}
-% \begin{macrocode}
- {figureheading}{4},{figureabove}{4},{abovefigure}{4},{topatfigure}{4},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=figuresignature}:] change the \cs{caption} default inside
-% \env{figure} environment to \cs{captionbelow}.
-% \end{description}
-% \begin{macrocode}
- {figuresignature}{5},{figurebelow}{5},{belowfigure}{5},{bottomatfigure}{5},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=oneline}:] special treatment for one line captions.
-% \end{description}
-% \begin{macrocode}
- {oneline}{6},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=oneline}:] no special treatment for one line captions.
-% \end{description}
-% \begin{macrocode}
- {nooneline}{7},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=rightbeside}:] change horizontal \env{captionbeside} placement
-% to right beside (see \cs{scap@pos} above).
-% \end{description}
-% \begin{macrocode}
- {rightbeside}{8},{besideright}{8},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=leftbeside}:] change horizontal \env{captionbeside} placement
-% to left beside (see \cs{scap@pos} above).
-% \end{description}
-% \begin{macrocode}
- {leftbeside}{9},{besideleft}{9},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=innerbeside}:] change horizontal \env{captionbeside} placement
-% to inner beside (see \cs{scap@pos} above).
-% \end{description}
-% \begin{macrocode}
- {innerbeside}{10},{besideinner}{10},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=outerbeside}:] change horizontal \env{captionbeside} placement
-% to outer beside (see \cs{scap@pos} above).
-% \end{description}
-% \begin{macrocode}
- {outerbeside}{11},{besideouter}{11},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=topbeside}:] change vertical \env{captionbeside} alignment
-% to top (see \cs{scap@valign} above).
-% \end{description}
-% \begin{macrocode}
- {topbeside}{12},{besidetop}{12},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=centeredbeside}:] change vertical \env{captionbeside} alignment
-% to centered (see \cs{scap@valign} above).
-% \end{description}
-% \begin{macrocode}
- {centeredbeside}{13},{besidecentered}{13},%
- {middlebeside}{13},{besidemiddle}{13},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=bottombeside}:] change vertical \env{captionbeside} alignment
-% to bottom (see \cs{scap@valign} above).
-% \end{description}
-% \begin{macrocode}
- {bottombeside}{14},{besidebottom}{14}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifcase \@tempa\relax % heading
- \@tablecaptionabovetrue
- \@figurecaptionabovetrue
- \@captionabovetrue
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{heading}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{signature}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{heading}%
- \or % signature
- \@tablecaptionabovefalse
- \@figurecaptionabovefalse
- \@captionabovefalse
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{heading}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{signature}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{signature}%
- \or % tableheading
- \@tablecaptionabovetrue
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{tableheading}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{tablesignature}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{tableheading}%
- \or % tablesignature
- \@tablecaptionabovefalse
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{tableheading}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{tablesignature}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{tablesignature}%
- \or % figureheading
- \@figurecaptionabovetrue
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{figureheading}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{figuresignature}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{figureheading}%
- \or % figuresignature
- \@figurecaptionabovefalse
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{figureheading}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{figuresignature}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{figuresignature}%
- \or % oneline
- \onelinecaptionstrue
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{oneline}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{nooneline}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{oneline}%
- \or % nooneline
- \onelinecaptionsfalse
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{oneline}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{nooneline}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{nooneline}%
- \or % rightbeside
- \renewcommand*{\scap@pos}{r}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{rightbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{leftbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{innerbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{outerbeside}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{rightbeside}%
- \or % leftbeside
- \renewcommand*{\scap@pos}{l}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{rightbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{leftbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{innerbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{outerbeside}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{leftbeside}%
- \or % innerbeside
- \renewcommand*{\scap@pos}{i}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{rightbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{leftbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{innerbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{outerbeside}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{innerbeside}%
- \or % outerbeside
- \renewcommand*{\scap@pos}{o}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{rightbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{leftbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{innerbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{outerbeside}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{outerbeside}%
- \or % topbeside
- \renewcommand*{\scap@valign}{t}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{topbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{centeredbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{bottombeside}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{topbeside}%
- \or % centeredbeside
- \renewcommand*{\scap@valign}{c}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{topbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{centeredbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{bottombeside}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{centeredbeside}%
- \or % bottombeside
- \renewcommand*{\scap@valign}{b}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{topbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{centeredbeside}%
- \KOMA@kav@remove{.\KOMAClassFileName}{captions}{bottombeside}%
- \KOMA@kav@add{.\KOMAClassFileName}{captions}{bottombeside}%
- \fi
- \fi
-}
-\KOMA@kav@add{.\KOMAClassFileName}{captions}{signature}
-\KOMA@kav@add{.\KOMAClassFileName}{captions}{tablesignature}
-\KOMA@kav@add{.\KOMAClassFileName}{captions}{figuresignature}
-\KOMA@kav@add{.\KOMAClassFileName}{captions}{oneline}
-\KOMA@kav@add{.\KOMAClassFileName}{captions}{rightbeside}
-\KOMA@kav@add{.\KOMAClassFileName}{captions}{bottombeside}
-% \end{macrocode}
-% \end{option}^^A captions
-%
-% \begin{option}{tablecaptionabove,tablecaptionbelow}
-% \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}{obsolete}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% Implementation of deprecated options by mapping them to corresponding
-% \pkg*{keyval} options.
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{tablecaptionabove}{captions=tableheading}
-\KOMA@DeclareDeprecatedOption{tablecaptionbelow}{captions=tablesignature}
-% \end{macrocode}
-% \end{option}^^A tablecaptionabove,tablecaptionbelow
-%
-% \begin{option}{origlongtable}
-% \changes{v2.8l}{2001/08/16}{added}
-% If package \pkg{longtable} is loaded, the classes redefine table titles
-% of that package. However, if the option has been set, this is prevented.
-% \begin{macro}{\@komalongtablefalse,\@komalongtabletrue,\if@komalongtable}
-% \changes{v2.8l}{2001/08/16}{added}
-% The wanted behaviour is stored in a boolean.
-% \begin{macrocode}
-\newif\if@komalongtable\@komalongtabletrue
-\DeclareOption{origlongtable}{\@komalongtablefalse}
-% \end{macrocode}
-% \end{macro}^^A \if@komalongtable
-% \end{option}^^A origlongtable
-%
-% \begin{option}{onelinecaption,noonelinecaption}
-% \changes{v2.8q}{2001/11/17}{new option}
-% \changes{v2.98c}{2008/03/03}{obsolete}
-% \changes{v2.98c}{2008/03/03}{extra code for \pkg{caption2} removed}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% Implementation of deprecated options by mapping them to corresponding
-% \pkg*{keyval} options.
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{onelinecaption}{captions=oneline}
-\KOMA@DeclareDeprecatedOption{noonelinecaption}{captions=nooneline}
-%</option>
-% \end{macrocode}
-% \end{option}^^A onelinecaption,noonelinecaption
-%
-%
-% \subsection{Macros and commands for the captions}
-%
-% \changes{v2.2c}{1995/05/25}{support for CJK added}
-% The initial feature for defining captions somehow different from the
-% standard classes was a request of Werner Lember to add support for CJK
-% languages. However not everything is changed. For example the usual lengths
-% of the standard classes are still defined, but interpreted somehow different.
-%
-% \begin{length}{\abovecaptionskip,\belowcaptionskip}
-% The distance above and below a caption. The default for captions below the
-% object is 10\,pt above the caption and 0 below. Note: For captions above
-% the object the lengths are switched: \len{abovecaptionskip} is used
-% \emph{below} the caption and \len{belowcaptionskip} is used \emph{above}
-% the caption then.
-% \begin{macrocode}
-%<*body>
-\newlength{\abovecaptionskip}
-\newlength{\belowcaptionskip}
-\setlength{\abovecaptionskip}{10\p@}
-\setlength{\belowcaptionskip}{0\p@}
-% \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.
-% \begin{macrocode}
-\newcommand*{\captionformat}{:\ }
-% \end{macrocode}
-% \end{command}^^A \captionformat
-% \begin{command}{\captionabove,\captionbelow}
-% \changes{v2.8h}{2001/07/19}{added}
-% \begin{macro}{\scr@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@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@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@caption}{}
-\AtBeginDocument{\let\scr@caption\caption}
-% \end{macrocode}
-% \end{macro}^^A \scr@caption
-% Jetzt ist es möglich durch einfaches Umlegen des Schalters für die
-% korrekte Darstellung zu sorgen:
-% \begin{macrocode}
-\newcommand{\captionabove}{\@captionabovetrue\scr@caption}
-\newcommand{\captionbelow}{\@captionabovefalse\scr@caption}
-% \end{macrocode}
-% \end{command}^^A \captionabove,\captionbelow
-%
-%
-% \begin{environment}{captionbeside}
-% \changes{v2.8q}{2001/11/22}{added}
-% Placing captions above or below the object inside a float is easy. But to
-% place it beside the object an additional environment is needed. This has to
-% collect the object (environment body) into a box and then print it side by
-% side with a second box with the caption. Note: This cannot work with
-% tables of package \pkg{longtable} or \pkg{supertabular} or similar packages.
-% \begin{quote}\raggedright
-% |\begin{captionbeside}|\oarg{list
-% entry}\marg{caption}\oarg{position}\oarg{with}\oarg{offset}|*|\\
-% \dots\\
-% |\end{captionbeside}|
-% \end{quote}
-% Note: The asterisk is optional and changes the meaning of \meta{offset}.
-% \begin{macro}{\scap@caption}
-% \changes{v2.8q}{2001/11/22}{added}
-% The \meta{caption} is locally stored into helper macro \cs{scap@caption}.
-% \begin{macrocode}
-\newcommand*{\scap@caption}{}
-% \end{macrocode}
-% \end{macro}^^A \scap@caption
-% \begin{macro}{\scap@width}
-% \changes{v2.8q}{2001/11/22}{added}
-% The optional \meta{width}, which is the width of the whole environment
-% inclusive caption, is locally stored into helper macro \cs{scap@width}. The
-% default is the while line width.
-% \begin{macrocode}
-\newcommand*{\scap@width}{\linewidth}
-% \end{macrocode}
-% \end{macro}^^A \scap@width
-% \begin{macro}{\scap@move}
-% \changes{v2.8q}{2001/11/22}{added}
-% If \cs{scap@width} is not the line width, the environment is horizontal
-% centered by default. But if \meta{offset} is used, this is used as a
-% distance from the left margin. This is locally stored into helper macro
-% \cs{scap@move}.
-% \begin{macrocode}
-\newcommand*{\scap@move}{\z@}
-% \end{macrocode}
-% \end{macro}^^A \scap@move
-% \begin{macro}{\scap@altfalse,\scap@alttrue,\ifscap@alt}
-% \changes{v2.8q}{2001/11/22}{added}
-% The boolean switch \cs{ifscap@alt} is used to decide if in twoside mode the
-% movement of \cs{scap@move} has to be done from the left or the right margin
-% and to left or to the right.
-% \begin{macrocode}
-\newif\ifscap@alt
-% \end{macrocode}
-% \end{macro}^^A \ifscap@alt
-% \begin{macro}{\scap@currentlabel}
-% \changes{v2.8q}{2001/11/24}{added}
-% Because of using \cs{caption} inside a box and inside an environment, a
-% label after the \env{captionbeside} environment usually would not reference
-% the caption number. To preserve this after the end of the
-% \env{captionbeside} the current label is locally stored into global
-% \cs{scap@currentlabel} and restored after the end of the environment using
-% \cs{aftergroup}. Note: You can have only one \cs{label} inside!.
-% \begin{macrocode}
-\newcommand*{\scap@currentlabel}{}
-% \end{macrocode}
-% \end{macro}^^A \scap@currentlabel
-% \begin{macro}{\@@@captionbeside,\@@captionbeside,\@captionbeside}
-% \changes{v2.8q}{2001/11/22}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@@@captionbeside}
-% \changes{v2.8q}{2001/11/22}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% To handle all the optional arguments and the optional star at the end,
-% several helper macros are needed (because we currently do not use \pkg{xparse}).
-% \begin{macrocode}
-\newcommand*{\@captionbeside}{}
-\long\def\@captionbeside[#1]#2{%
- \kernel@ifnextchar [%]
- {\@@captionbeside[{#1}]{#2}}
- {\c@pti@nb@sid@[{#1}]{#2}}%
-}
-\newcommand*{\@@captionbeside}{}
-\long\def\@@captionbeside[#1]#2[#3]{%
- \def\scap@pos{#3}%
- \kernel@ifnextchar [%]
- {\@@@captionbeside[{#1}]{#2}}
- {\c@pti@nb@sid@[{#1}]{#2}}%
-}
-\newcommand*{\@@@captionbeside}{}
-\long\def\@@@captionbeside[#1]#2[#3]{%
- \def\scap@width{#3}%
- \kernel@ifnextchar [%]
- {\@@@@captionbeside[{#1}]{#2}}
- {\setlength{\@tempdima}{#3}%
- \addtolength{\@tempdima}{-\linewidth}%
- \setlength{\@tempdima}{-.5\@tempdima}%
- \edef\scap@move{\the\@tempdima}%
- \c@pti@nb@sid@[{#1}]{#2}}%
-}
-\newcommand*{\@@@@captionbeside}{}
-\long\def\@@@@captionbeside[#1]#2[#3]{%
- \def\scap@move{#3}%
- \kernel@ifstar
- {\scap@alttrue\c@pti@nb@sid@[{#1}]{#2}}
- {\scap@altfalse\c@pti@nb@sid@[{#1}]{#2}}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@@@@captionbeside
-% \end{macro}^^A \@@@captionbeside … \@captionbeside
-% \begin{macro}{\c@pti@nb@sid@b@x}
-% \changes{v2.8q}{2001/11/22}{added}
-% We also use our own box register to collect the environment body.
-% \begin{macrocode}
-\newbox\c@pti@nb@sid@b@x
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\c@pti@nb@sid@}
-% \changes{v2.8q}{2001/11/22}{added}
-% \changes{v2.98c}{2008/03/11}{vertical alignment fixed}
-% \changes{v3.07a}{2010/11/04}{vertical alignment \texttt{t} and \texttt{b} fixed}
-% This is the real beginning of the environment. After collecting all the
-% arguments into local macros.
-% \begin{macrocode}
-\newcommand{\c@pti@nb@sid@}{}
-\long\def\c@pti@nb@sid@[#1]#2{%
- \def\scap@caption{%
- \if c\scap@valign
- \setlength{\abovecaptionskip}{\z@}%
- \else \if t\scap@valign
- \setlength{\abovecaptionskip}{-\ht\strutbox}%
- \else \if b\scap@valign
- \setlength{\abovecaptionskip}{\z@}%
- \fi
- \fi
- \fi
- \setlength{\belowcaptionskip}{-\dp\strutbox}%
- \captionbelow[{#1}]{#2}%
- }%
- \begin{lrbox}{\c@pti@nb@sid@b@x}%
-}
-% \end{macrocode}
-% \end{macro}^^A \c@pti@nb@sid@
-% Now we can use all of the helper macros to begin the environment. We use
-% \LaTeX{} kernel macro \cs{@dblarg} to define an argument with first
-% optional argument defaults to mandatory second argument.
-% \begin{macrocode}
-\newenvironment*{captionbeside}{%
- \@dblarg\@captionbeside
-}{%
-% \end{macrocode}
-% This was easy (because of using all the helper macros), but the end of the
-% environment isn't. Here we do all the calculations for printing.
-% \changes{v2.9a}{2002/06/27}{\cs{ifthispageodd} replaced by \cs{if@thispageodd}}
-% \changes{v3.28}{2019/11/19}{\cs{ifthispageodd} replaced by \cs{Ifthispageodd}}
-% \begin{macrocode}
- \end{lrbox}%
- \settowidth{\@tempdima}{\usebox\c@pti@nb@sid@b@x}%
- \setlength{\@tempdimb}{\scap@width}%
- \addtolength{\@tempdimb}{-\@tempdima}%
- \addtolength{\@tempdimb}{-\columnsep}%
- \ifdim \@tempdimb<2em
- \ClassWarning{\KOMAClassName}{%
- caption beside will be very, very small.\MessageBreak
- In most cases this will result in overfull and\MessageBreak
- underfull \string\hbox\space messages%
- }%
- \fi
- \onelinecaptionsfalse
- \setcapwidth[r]{\@tempdimb}%
- \let\@tempa\scap@pos
- \setlength{\@tempdimc}{\scap@move}%
- \if i\scap@pos\def\@tempa{l}\fi
- \if o\scap@pos\def\@tempa{r}\fi
- \if@twoside
- \Ifthispageodd{}{%
- \if o\scap@pos\def\@tempa{l}\fi
- \if i\scap@pos\def\@tempa{r}\fi
- \ifscap@alt
- \addtolength{\@tempdimc}{\scap@width}%
- \addtolength{\@tempdimc}{-\linewidth}%
- \setlength{\@tempdimc}{-\@tempdimc}%
- \fi
- }%
- \fi
- \hspace*{\@tempdimc}%
-% \end{macrocode}
-% \changes{v2.9p}{2003/12/10}{\cs{@temdima} replaced by
-% \cs{wd}\cs{c@pti@nb@sid@b@x}, because \cs{@temdima} would be changed}
-% \begin{macrocode}
- \if l\@tempa
- \rlap{%
- \parbox[\scap@valign]{\@tempdimb}{\scap@caption
- \global\let\scap@currentlabel\@currentlabel}%
- \nobreak\hskip\columnsep
- \parbox[\scap@valign]{\wd\c@pti@nb@sid@b@x}{\usebox\c@pti@nb@sid@b@x}%
- }%
- \else
- \rlap{%
- \parbox[\scap@valign]{\wd\c@pti@nb@sid@b@x}{\usebox\c@pti@nb@sid@b@x}%
- \nobreak\hskip\columnsep
- \parbox[\scap@valign]{\@tempdimb}{\scap@caption
- \global\let\scap@currentlabel\@currentlabel}%
- }%
- \fi
- \par
- \aftergroup\let\aftergroup\@currentlabel
- \aftergroup\scap@currentlabel
-}
-% \end{macrocode}
-% \end{environment}^^A captionbeside
-%
-%
-% \begin{fontelement}{caption,captionlabel}
-% We need two font elements for the caption at whole and the label part only.
-% \begin{macro}{\capfont,\caplabelfont}
-% \changes{v2.8c}{2001/06/29}{\cs{normalcolor} added}
-% Originally two user macros has been used to change the fonts. To stay
-% compatible with old \KOMAScript{} and also i.e. with package \pkg{caption},
-% we still define \cs{capfont} and \cs{caplabelfont} as internal storage of
-% the font elements. But already from \KOMAScript{} version 2.8c these should
-% be interpreted as internal macros.
-% \begin{macrocode}
-\newcommand*\capfont{\normalfont\normalcolor}
-\newcommand*\caplabelfont{\normalfont\normalcolor}
-% \end{macrocode}
-% \end{macro}^^A \capfont,\caplabelfont
-% \begin{macro}{\scr@fnt@caption,\scr@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}.
-% \begin{macrocode}
-\newcommand*{\scr@fnt@caption}{\capfont}
-\newcommand*{\scr@fnt@captionlabel}{\caplabelfont}
-% \end{macrocode}
-% \end{macro}^^A \scr@fnt@caption,\scr@fnt@captionlabel
-% \end{fontelement}^^A caption,captionlabel
-%
-% \begin{macro}{\@makecaption}
-% \changes{v2.3a}{1995/07/08}{using \cs{sbox} instead of \cs{setbox}}
-% \changes{v2.3a}{1995/07/08}{using \cs{@minipagefalse}}
-% \changes{v2.3f}{1995/12/09}{using same font switching for long and short captions}
-% \changes{v2.5g}{1999/10/09}{supporting partial hanging captions}
-% \begin{macro}{\dofullc@pfalse,\dofullc@ptrue,\ifdofullc@p}
-% The boolean switch \cs{ifdofullc@p} is true for caption texts, that should
-% be full hanging (behind the label part), which is the default.
-% \begin{macrocode}
-\newif\ifdofullc@p
-\dofullc@ptrue
-% \end{macrocode}
-% \end{macro}^^A \ifdofullc@p
-% \begin{macro}{\if@capbreak}
-% \changes{v2.8j}{2001/07/30}{added}
-% The boolean switch \cs{if@capbreak} is true, if the label should be followed
-% by a line break, which is not the case by default.
-% \begin{macrocode}
-\newif\if@capbreak
-\@capbreakfalse
-% \end{macrocode}
-% \end{macro}^^A \@capbreakfalse
-% \begin{command}{\setcapindent}
-% \begin{macro}{\@@setcaptindent,\@setcapindent}
-% \changes{v2.8j}{2001/07/30}{using \cs{if@capbreak}}
-% \changes{v2.8l}{2001/08/17}{using \cs{edef}\cs{cap@indent} instead of
-% \cs{def}\cs{cap@indent}}
-% \changes{v2.8q}{2001/11/17}{redefined after loading \pkg{caption2}}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \changes{v3.34}{2021/03/22}{special treatment of \pkg{caption2} removed}
-% The user can configure the indent using:
-% \begin{quote}
-% \cs{setcapindent}*\marg{indent}
-% \end{quote}
-% The optional asterisk activates a line break between the label and the
-% text. The \meta{indent} is always an indent of the text from the left. A
-% local dimension assignment is done to report errors here and not at
-% usage of \cs{cap@indent}.
-% \begin{macrocode}
-\newcommand*{\setcapindent}{\kernel@ifstar{\@@setcapindent}{\@setcapindent}}
-\newcommand*{\@setcapindent}[1]{%
- \setlength{\@tempdima}{#1}%
- \ifdim\@tempdima>\hsize
- \addtolength{\@tempdima}{-\hsize}\@capbreaktrue
- \else
- \@capbreakfalse
- \fi
- \edef\cap@indent{\the\@tempdima}%
- \dofullc@pfalse
-}
-\newcommand*{\@@setcapindent}[1]{%
- \setlength{\@tempdima}{#1}%
- \edef\cap@indent{\the\@tempdima}%
- \dofullc@pfalse\@capbreaktrue
-}
-% \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}}
-% \changes{v3.34}{2021/03/22}{special treatment of \pkg{caption2} removed}
-% Alternatively the user can select the full hanging printing.
-% \begin{macrocode}
-\newcommand*{\setcaphanging}{\dofullc@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}
-% \begin{macrocode}
-\newcommand{\@makecaption}[2]{%
- \if@captionabove
- \vskip\belowcaptionskip
- \else
- \vskip\abovecaptionskip
- \fi
- \@@makecaption\@firstofone{#1}{#2}%
- \if@captionabove
- \vskip\abovecaptionskip
- \else
- \vskip\belowcaptionskip
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\cap@width,\cap@left,\cap@right}
-% \changes{v2.8q}{2001/11/17}{added}
-% Multi line captions can printed with a reduced with. If the width is reduced
-% the left an right margin can be changed. The defaults are centering.
-% \begin{macrocode}
-\newcommand*{\cap@width}{\hsize}
-\newcommand*{\cap@left}{\hfill}
-\newcommand*{\cap@right}{\hfill}
-% \end{macrocode}
-% \end{macro}^^A \cap@width,\cap@left,\cap@right
-% \begin{command}{\setcapwidth}
-% \changes{v2.8q}{2001/11/17}{added}
-% \changes{v2.9a}{2002/06/27}{\cs{ifthispageodd} replaced by \cs{if@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}
-% The user command:
-% \begin{quote}
-% \cs{setcapwidth}\oarg{alignment}\marg{width}
-% \end{quote}
-% is one choice to set \cs{cap@width} to \meta{width}. The optional
-% \meta{alignment} (as usual |l|, |r|, |o|, or |i|) also changes \cs{cap@left}
-% and \cs{cap@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@width{\the\@tempdima}}%
- \@tempa
- \begingroup
- \edef\@tempa{#1}%
- \def\@tempb{c}\ifx\@tempa\@tempb
- \endgroup
- \def\cap@margin{\let\cap@left=\hfill\let\cap@right=\hfill}%
- \else
- \def\@tempb{l}\ifx\@tempa\@tempb
- \endgroup
- \def\cap@margin{\let\cap@left=\relax\let\cap@right\hfill}%
- \else
- \def\@tempb{r}\ifx\@tempa\@tempb
- \endgroup
- \def\cap@margin{\let\cap@left=\hfill\let\cap@right=\relax}%
- \else
- \def\@tempb{i}\ifx\@tempa\@tempb
- \endgroup
- \def\cap@margin{%
- \let\cap@left=\relax
- \let\cap@right=\hfill
- \if@twoside
- \Ifthispageodd{}{%
- \let\cap@left=\hfill
- \let\cap@right=\relax
- }%
- \fi
- }%
- \else
- \def\@tempb{o}\ifx\@tempa\@tempb
- \endgroup
- \def\cap@margin{%
- \let\cap@left=\hfill
- \let\cap@right=\relax
- \if@twoside
- \Ifthispageodd{}{%
- \let\cap@left=\relax
- \let\cap@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
-}
-% \end{macrocode}
-% \end{command}^^A \setcapwidth
-% \begin{command}{\setcapdynwidth}
-% \changes{v3.20}{2016/03/31}{added}
-% Ulrike Fischer requested for an alternative, that does not behave like
-% \cs{setlength} and therefore sets the length already at usage of
-% \cs{setcapwidth} but at usage of \cs{cap@width}. This is
-% \cs{setcapdynwidth}. But in this case mistakes can result in errors while
-% usage of \cs{cap@width} too.
-% \begin{macrocode}
-\newcommand*{\setcapdynwidth}[2][]{%
- \def\cap@width{#2}%
- \begingroup
- \edef\@tempa{#1}%
- \def\@tempb{c}\ifx\@tempa\@tempb
- \endgroup
- \def\cap@margin{%
- \ifdim \cap@width<\z@
- \ClassWarning{\KOMAClassName}{%
- caption width less than 0pt not allowed.\MessageBreak
- Setting caption width to 0pt%
- }%
- \let\cap@width\z@
- \fi
- \let\cap@left=\hfill\let\cap@right=\hfill}%
- \else
- \def\@tempb{l}\ifx\@tempa\@tempb
- \endgroup
- \def\cap@margin{%
- \ifdim \cap@width<\z@
- \ClassWarning{\KOMAClassName}{%
- caption width less than 0pt not allowed.\MessageBreak
- Setting caption width to 0pt%
- }%
- \let\cap@width\z@
- \fi
- \let\cap@left=\relax\let\cap@right\hfill}%
- \else
- \def\@tempb{r}\ifx\@tempa\@tempb
- \endgroup
- \def\cap@margin{%
- \ifdim \cap@width<\z@
- \ClassWarning{\KOMAClassName}{%
- caption width less than 0pt not allowed.\MessageBreak
- Setting caption width to 0pt%
- }%
- \let\cap@width\z@
- \fi
- \let\cap@left=\hfill\let\cap@right=\relax}%
- \else
- \def\@tempb{i}\ifx\@tempa\@tempb
- \endgroup
- \def\cap@margin{%
- \ifdim \cap@width<\z@
- \ClassWarning{\KOMAClassName}{%
- caption width less than 0pt not allowed.\MessageBreak
- Setting caption width to 0pt%
- }%
- \let\cap@width\z@
- \fi
- \let\cap@left=\relax
- \let\cap@right=\hfill
- \if@twoside
- \Ifthispageodd{}{%
- \let\cap@left=\hfill
- \let\cap@right=\relax
- }%
- \fi
- }%
- \else
- \def\@tempb{o}\ifx\@tempa\@tempb
- \endgroup
- \def\cap@margin{%
- \ifdim \cap@width<\z@
- \ClassWarning{\KOMAClassName}{%
- caption width less than 0pt not allowed.\MessageBreak
- Setting caption width to 0pt%
- }%
- \let\cap@width\z@
- \fi
- \let\cap@left=\hfill
- \let\cap@right=\relax
- \if@twoside
- \Ifthispageodd{}{%
- \let\cap@left=\relax
- \let\cap@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
-}
-% \end{macrocode}
-% \end{command}^^A \setcapdynwidth
-% \begin{macro}{\cap@margin}
-% \changes{v2.8q}{2001/11/17}{added}
-% \cs{cap@margin} is used to recalculate \cs{cap@left} and \cs{cap@right}
-% inside \cs{@@makecaption}, if the margins has been set using
-% \cs{setcapmargin}. Default is no such action.
-% \begin{macrocode}
-\newcommand*{\cap@margin}{}
-\let\cap@margin=\relax%
-% \end{macrocode}
-% \end{macro}^^A \cap@margin
-% \begin{command}{\setcapmargin}
-% \changes{v2.8q}{2001/11/17}{neu}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\@@setcapmargin,\@setcapmargin}
-% \changes{v2.8q}{2001/11/17}{added}
-% \changes{v2.9a}{2002/06/27}{\cs{ifthispageodd} replaced by \cs{if@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}
-% 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@ifstar{\@setcapmargin}{\@@setcapmargin}}
-\newcommand*{\@setcapmargin}[2][\@tempdimb]{%
- \def\cap@margin{%
- \onelinecaptionsfalse
- \begingroup
- \setlength{\@tempdima}{\hsize}%
- \setlength{\@tempdimb}{#2}%
- \addtolength{\@tempdima}{-\@tempdimb}%
- \setlength{\@tempdimc}{#1}%
- \addtolength{\@tempdima}{-\@tempdimc}%
- \edef\@tempa{\endgroup
- \def\noexpand\cap@width{\the\@tempdima}%
- \noexpand\if@twoside
- \noexpand\Ifthispageodd{%
- \def\noexpand\cap@left{\noexpand\hspace*{\the\@tempdimc}}%
- \def\noexpand\cap@right{\noexpand\hspace*{\the\@tempdimb}}%
- }{%
- \def\noexpand\cap@right{\noexpand\hspace*{\the\@tempdimc}}%
- \def\noexpand\cap@left{\noexpand\hspace*{\the\@tempdimb}}%
- }%
- \noexpand\else
- \def\noexpand\cap@left{\noexpand\hspace*{\the\@tempdimc}}%
- \def\noexpand\cap@right{\noexpand\hspace*{\the\@tempdimb}}%
- \noexpand\fi
- }%
- \@tempa
- }%
-}
-\newcommand*{\@@setcapmargin}[2][\@tempdimb]{%
- \def\cap@margin{%
- \onelinecaptionsfalse
- \begingroup
- \setlength{\@tempdima}{\hsize}%
- \setlength{\@tempdimb}{#2}%
- \addtolength{\@tempdima}{-\@tempdimb}%
- \setlength{\@tempdimc}{#1}%
- \addtolength{\@tempdima}{-\@tempdimc}%
- \edef\@tempa{\endgroup
- \def\noexpand\cap@width{\the\@tempdima}%
- \def\noexpand\cap@left{\noexpand\hspace*{\the\@tempdimc}}%
- \def\noexpand\cap@right{\noexpand\hspace*{\the\@tempdimb}}%
- }%
- \@tempa
- }%
-}
-% \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
-% argument, that has to be either \cs{@gobble} or \cs{@firstofone}. This is
-% used to either set a label or not. This is needed for captions of
-% \pkg{longtable}.
-% \changes{v2.8q}{2002/05/17}{avoid double increase of footnote number}
-% \changes{v2.95}{2004/01/30}{fixing vertical skips also with \pkg{float}}
-% \changes{v2.95a}{2006/07/13}{fixing vertical skips with \pkg{color}}
-% \changes{v2.97c}{2007/06/06}{\cs{unskip}\cs{strut} added to fix vertical
-% positions in some \emph{above} cases}
-% \changes{v3.02a}{2009/01/24}{braces fixed}
-% \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}
-% \begin{macrocode}
-\newcommand{\@@makecaption}[3]{%
-% \end{macrocode}
-% Recalculate the margins.
-% \begin{macrocode}
- \cap@margin
-% \end{macrocode}
-% Test for special treatment of one line captions.
-% \changes{v3.22}{2016/09/01}{local redefinition of \cs{stepcounter} and
-% \cs{refstepcounter} because of \pkg{isodate}}
-% \begin{macrocode}
- \begingroup
- \ifonelinecaptions
- \def\stepcounter##1{\advance\value{##1}\@ne}%
- \let\refstepcounter\stepcounter
- \let\label\@gobble
- \let\@footnotetext=\@gobble
- \let\hypertarget\@gobbletwo
-% \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
-% the user to use a multi-line caption.
-% \begin{macrocode}
- \edef\@xnewline{%
- \unexpanded{\ClassInfo{\KOMAClassName}{%
- Workaround for not recommended usage of \string\\ or\MessageBreak
- \string\newline in caption text
- }%
- \hspace*{\linewidth}\hspace{1sp}%
- }%
- \unexpanded\expandafter{\@xnewline}%
- }%
- \edef\@xcentercr{%
- \unexpanded{\ClassInfo{\KOMAClassName}{%
- Workaround for not recommended usage of \string\\ or\MessageBreak
- \string\newline in caption text
- }%
- \hspace*{\linewidth}\hspace{1sp}%
- }%
- \unexpanded\expandafter{\@xcentercr}%
- }%
- \settowidth{\@tempdima}{\scr@@makesinglelinecaption{#1}{#2}{#3}}%
-% \end{macrocode}
-% \changes{v3.34}{2021/03/22}{fix of maximum line width of single line
-% captions}
-% Until \KOMAScript~3.34 the test here was wrong, because it used
-% \cs{linewidth}, which is still the whole line width not the maximum caption
-% width. From \KOMAScript~3.34 \cs{cap@width} is used.
-% \begin{macrocode}
- \ifdim\@tempdima>\cap@width
- \aftergroup\scr@makemultilinecaption
- \else
- \aftergroup\scr@makesinglelinecaption
- \fi
- \else
- \aftergroup\scr@makemultilinecaption
- \fi
- \endgroup
- {#1}{#2}{#3}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@@makesinglelinecaption,\scr@makesinglelinecaption}
-% \changes{v3.21}{2016/05/31}{added}
-% The output of single line captions. The first argument once again is
-% \cs{@gobble} (to not show a label) or \cs{@firstofone} (to show the
-% label). Argument two and three are the label (without separator, that is
-% added here) and the caption text.
-% \begin{macrocode}
-\newcommand{\scr@makesinglelinecaption}[3]{%
- {%
- \usefontofkomafont{caption}{%
- \hb@xt@\hsize{%
- \cap@left
- \scr@@makesinglelinecaption{#1}{#2}{#3}%
- \cap@right
- }\par\kern\dp\strutbox%
- }%
- }\kern-\dp\strutbox
-}
-\newcommand{\scr@@makesinglelinecaption}[3]{%
- \usekomafont{caption}{\strut\ignorespaces
- #1{{\usekomafont{captionlabel}{#2\captionformat}}}%
- \ignorespaces #3\unskip}%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@@makesinglelinecaption,\scr@makesinglelinecaption
-% \begin{macro}{\scr@makemultilinecaption}
-% \changes{v3.21}{2016/05/31}{added}
-% The output of multi line captions. The arguments are same as above.
-% \begin{macrocode}
-\newcommand{\scr@makemultilinecaption}[3]{%
- {%
- \usefontofkomafont{caption}{%
- \hb@xt@\hsize{%
- \cap@left
- \vbox{\hsize\cap@width\linewidth\hsize
-% \end{macrocode}
-% \changes{v3.25}{2017/11/15}{caption alignment added}
-% First of all we have to use the ragged type depending in the float/caption
-% type. If the float/caption type is unknown we can use the general ragged
-% type only.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{@captype}{%
- \ClassWarning{\KOMAClassName}{%
- `\string\caption' outside float.\MessageBreak
- Seems you are using `\string\caption' outside a
- float.\MessageBreak
- Maybe you are using a package that uses
- `\string\@makecaption'\MessageBreak
- without setting `\string\@captype' before.\MessageBreak
- Because I cannot detect the caption type, I'm using\MessageBreak
- the empty one.%
- }%
- \let\@captype\@empty
- }{}%
- \scr@ifundefinedorrelax{ragged\@captype caption}{\raggedcaption}{%
- \@nameuse{ragged\@captype caption}%
- }%
-% \end{macrocode}
-% Maybe we have to us a full hanging caption.
-% \changes{v3.25}{2017/11/15}{Using \cs{scr@endstrut} instead of \cs{unskip}\cs{strut}}
-% \begin{macrocode}
- \ifdofullc@p
- \@hangfrom{%
- \strut
- \scr@smashdp{%
- #1{%
- \usekomafont{caption}{%
- \usekomafont{captionlabel}{#2\captionformat}%
- }%
- }%
- }%
- }%
- {\usekomafont{caption}{#3\scr@endstrut\par}}%
-% \end{macrocode}
-% Maybe a partial hanging caption with line break after the label.
-% \begin{macrocode}
- \else
- \ifdim\cap@indent<\z@
- \strut
- #1{%
- \usekomafont{caption}{%
- \usekomafont{captionlabel}{#2\captionformat\par}%
- }%
- }%
- \noindent{\usekomafont{caption}{%
- \hspace*{-\cap@indent}#3\scr@endstrut\par
- }}%
-% \end{macrocode}
-% Or a line break after the label with full hanging.
-% \begin{macrocode}
- \else
- \if@capbreak
- \strut
- #1{%
- \usekomafont{caption}{%
- \usekomafont{captionlabel}{#2\captionformat\par}%
- }%
- }%
- \noindent\@hangfrom{\hspace*{\cap@indent}}%
- {\usekomafont{caption}{#3\scr@endstrut\par}}%
-% \end{macrocode}
-% \changes{v3.27a}{2019/10/21}{missing usage of \fnt{caption} added}
-% Or no line break but still with indent.
-% \begin{macrocode}
- \else
- \@hangfrom{\scr@smashdp\strut\hspace*{\cap@indent}}%
- {%
- \hspace{-\cap@indent}%
- \scr@smashdp{%
- #1{\usekomafont{caption}{%
- \usekomafont{captionlabel}{#2\captionformat}%
- }%
- }%
- }%
- {\usekomafont{caption}{#3\scr@endstrut}\par}%
- }%
- \fi
- \fi
- \fi
-% \end{macrocode}
-% Here we could also add the not hanging version without line break:
-% \begin{macrocode}
-%<*neverusethis>
-% #1{{\usekomafont{caption}{%
-% \usekomafont{captionlabel}{#2\captionformat}}}}%
-% {\usekomafont{capion}{\ignorespaces #3\scr@endstrut\par}%
-%</neverusethis>
-% \end{macrocode}
-% But this is not needed, because it is the same like indent of 0.
-% \begin{macrocode}
- }%
- \cap@right
- }\par\kern\dp\strutbox
- }%
- }\kern-\dp\strutbox
-}
-% \end{macrocode}
-% \begin{command}{\setcaptionalignment}
-% \begin{macro}{\@setcaptionalignment}
-% \changes{v3.25}{2017/11/15}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} replaced by \cs{Ifstr}}
-% It is better for users to not define the \cs{raggedcaption} and
-% \cs{ragged\dots caption} commands themselves to avoid mistakes. So we have
-% \begin{quote}
-% \cs{setcaptionalignment}\oarg{float}\marg{alignment}
-% \end{quote}
-% If \meta{float} is used, \cs{ragged\meta{float}caption} will be changed. If
-% \meta{float} is not used, but \cs{@captype} is defined (and not \cs{relax})
-% \cs{ragged\cs{@captype}caption} is defined. If \meta{float} is empty or
-% \cs{captype} is undefined (or \cs{relax}) and \meta{float} is not used,
-% \cs{raggedcaption} will be changed.
-% \begin{macrocode}
-\newcommand*\setcaptionalignment{%
- \kernel@ifnextchar [%]
- {\@setcaptionalignment}
- {%
- \scr@ifundefinedorrelax{@captype}{\@setcaptionalignment}{%
- \edef\reserved@a{\noexpand\@setcaptionalignment[{\@captype}]}\reserved@a
- }%
- }%
-}%
-\newcommand*\@setcaptionalignment[2][]{%
-% \end{macrocode}
-% If \meta{float} is not empty it should be the name of a already defined
-% floating environment. Otherwise we report a warning, but nevertheless define
-% the command.
-% \begin{macrocode}
- \IfArgIsEmpty{#1}{}{%
- \expandafter\ifnum
- \scr@ifundefinedorrelax{#1}{0}{\scr@ifundefinedorrelax{end#1}{0}{1}}=0
- \ClassWarning{\KOMAClassName}{%
- float type `#1' defined not yet,\MessageBreak
- but setting ragged mode for captions of\MessageBreak
- float type `#1'%
- }%
- \fi
- }%
-% \end{macrocode}
-% Depending on \meta{alignment} the command will be changed:
-% \begin{description}
-% \item[\texttt{j}] -- justified (\cs{ragged\dots caption} becomes \cs{relax}).
-% \item[\texttt{l}] -- left aligned (\cs{ragged\dots caption} becomes
-% \cs{raggedright}).
-% \item[\texttt{r}] -- right aligned (\cs{ragged\dots caption} becomes
-% \cs{raggedleft}).
-% \item[\texttt{c}] -- centered (\cs{ragged\dots caption} becomes
-% \cs{centering}.
-% \end{description}
-% Note: If \pkg{ragged2e} has been loaded, \cs{LaTeXraggedright},
-% \cs{LaTeXraggedleft} and \cs{LaTeXcentering} are used and the following
-% additional \meta{alignment}s are supported:
-% \begin{description}
-% \item[\texttt{J}] -- justified (\cs{ragged\dots caption} becomes \cs{justifying}).
-% \item[\texttt{L}] -- left aligned (\cs{ragged\dots caption} becomes
-% \cs{RaggedRight}).
-% \item[\texttt{R}] -- right aligned (\cs{ragged\dots caption} becomes
-% \cs{RaggedLeft}).
-% \item[\texttt{C}] -- centered (\cs{ragged\dots caption} becomes
-% \cs{Centering}.
-% \end{description}
-% Without \pkg{ragged2e} the upper case letters are same like lower case
-% letters, but additionally warn. Note: The implementation does also work, if
-% \pkg*{scrlayer-scrpage} has defined \cs{LaTeXraggedright} etc.
-% \begin{macrocode}
- \def\reserved@a{#2}%
- \Ifstr{\reserved@a}{j}{%
- \expandafter\let\csname ragged#1caption\endcsname\@empty
- }{%
- \Ifstr{\reserved@a}{l}{%
- \scr@ifundefinedorrelax{LaTeXraggedright}{%
- \expandafter\let\csname ragged#1caption\endcsname\raggedright
- }{%
- \expandafter\let\csname ragged#1caption\endcsname\LaTeXraggedright
- }%
- }{%
- \Ifstr{\reserved@a}{r}{%
- \scr@ifundefinedorrelax{LaTeXraggedleft}{%
- \expandafter\let\csname ragged#1caption\endcsname\raggedleft
- }{%
- \expandafter\let\csname ragged#1caption\endcsname\LaTeXraggedleft
- }%
- }{%
- \Ifstr{\reserved@a}{c}{%
- \scr@ifundefinedorrelax{LaTeXcentering}{%
- \expandafter\let\csname ragged#1caption\endcsname\centering
- }{%
- \expandafter\let\csname ragged#1caption\endcsname\LaTeXcentering
- }%
- }{%
- \Ifstr{\reserved@a}{J}{%
- \scr@ifundefinedorrelax{justifying}{%
- \scr@caption@raggede@warning{J}{\justifying}%
- \expandafter\let\csname ragged#1caption\endcsname\@empty
- }{%
- \expandafter\let\csname ragged#1caption\endcsname\justifying
- }%
- }{%
- \Ifstr{\reserved@a}{L}{%
- \scr@ifundefinedorrelax{RaggedRight}{%
- \scr@caption@raggede@warning{L}{\RaggedRight}%
- \expandafter\let\csname ragged#1caption\endcsname\raggedright
- }{%
- \expandafter\let\csname ragged#1caption\endcsname\RaggedRight
- }%
- }{%
- \Ifstr{\reserved@a}{R}{%
- \scr@ifundefinedorrelax{RaggedLeft}{%
- \scr@caption@raggede@warning{R}{\RaggedLeft}%
- \expandafter\let\csname ragged#1caption\endcsname\raggedleft
- }{%
- \expandafter\let\csname ragged#1caption\endcsname\RaggedLeft
- }%
- }{%
- \Ifstr{\reserved@a}{C}{%
- \scr@ifundefinedorrelax{Centering}{%
- \scr@caption@raggede@warning{C}{\Centering}%
- \expandafter\let\csname ragged#1caption\endcsname\centering
- }{%
- \expandafter\let\csname ragged#1caption\endcsname\Centering
- }%
- }{%
- \Ifstr{\reserved@a}{}{%
- \expandafter\let\csname ragged#1caption\endcsname\relax
- }{%
- \ClassError{\KOMAClassName}{unknown alignment char `#2'}{%
- \string\setcaptionalignment\space supports
- only:\MessageBreak
- \space\space c - centered captions,\MessageBreak
- \space\space j - justified captions,\MessageBreak
- \space\space l - left align captions,\MessageBreak
- \space\space r - right aligned captions,\MessageBreak
- \space\space C - centered captions with
- `ragged2e',\MessageBreak
- \space\space J - justified captions with
- `ragged2e',\MessageBreak
- \space\space L - left align captions with
- `ragged2e',\MessageBreak
- \space\space R - right aligned captions with
- `ragged2e',\MessageBreak
- or an empty argument to remove special
- alignment.\MessageBreak
- If you'd continue, I'd not change the alignment.%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@caption@raggede@warning}
-% \changes{v3.25}{2017/11/15}{added}
-% The warning used above.
-% \begin{macrocode}
-\newcommand*{\scr@caption@raggede@warning}[2]{%
- \begingroup
- \lowercase{\def\reserved@a{#1}}%
- \ClassWarning{\KOMAClassName}{%
- `\string#2' undefined!\MessageBreak
- To avoid replacing caption alignment `#1' by `\reserved@a'\MessageBreak
- you should load package `ragged2e' before using\MessageBreak
- `\string\setcaptionalignment'%
- }%
- \endgroup
-}
-% \end{macrocode}
-% \begin{command}{\raggedcaption}
-% \changes{v3.25}{2017/11/15}{added}
-% The default alignment is standard alignment (empty means no change).
-% \begin{macrocode}
-\newcommand*\raggedcaption{}
-% \end{macrocode}
-% \end{command}^^A \raggedcaption
-% \end{macro}^^A \scr@caption@raggede@warning
-% \end{macro}^^A \@setcaptionalignment
-% \end{command}^^A \setcaptionalignment
-% \end{macro}^^A \scr@makemultilinecaption
-% \end{macro}^^A \@@makecaption
-% \end{macro}^^A \@makecaption
-%
-% \subsection{Special treatment of \texorpdfstring{\pkg*{longtable}}{`longtable'} captions}
-%
-% \begin{macro}{\LT@makecaption}
-% \changes{v2.8j}{2001/07/30}{added}
-% \changes{v2.8k}{2001/08/15}{do nothing if \pkg{caption2} has been loaded or
-% option \opt{origlongtable} has been used}
-% \changes{v2.8q}{2001/11/18}{width and alignment by \KOMAScript{}}
-% \changes{v2.8q}{2001/11/18}{using \cs{AfterPackage}}
-% \changes{v2.9s}{2004/08/24}{vertical skips fixed by moving \cs{vskip}}
-% \changes{v3.34}{2021/03/22}{special treatment of \pkg{caption2} removed}
-% \begin{macro}{\LT@array,\LT@caption}
-% \changes{v2.8q}{2001/11/18}{added}
-% \begin{macro}{\scr@caption@before@longtable@warning}
-% \changes{v2.98c}{2008/03/03}{added}
-% The code for \pkg{longtable} has to be delayed until loading the package.
-% \begin{macrocode}
-\newcommand*{\scr@caption@before@longtable@warning}[1]{%
- \ClassWarning{\KOMAClassName}{%
- you've loaded package `#1' before package\MessageBreak
- `longtable'!\MessageBreak
- Because of this package `#1' isn't able to\MessageBreak
- control `\string\caption' at longtables. \space After loading
- \MessageBreak
- package `#1' KOMA-Script also doesn't control\MessageBreak
- `\string\caption'.\MessageBreak
- I think, you should load package `caption' after\MessageBreak
- package `longtable'%
- }%
-}
-\AfterPackage{longtable}{%
- \if@komalongtable
- \renewcommand{\LT@makecaption}[3]{%
- \noalign{%
- \if@captionabove
- \vskip\belowcaptionskip
- \else
- \vskip\abovecaptionskip
- \fi
- }%
- \LT@mcol\LT@cols c{%
- \hbox to\z@{\hss\parbox[t]\linewidth{%
-% \end{macrocode}
-% \changes{v3.25}{2017/11/15}{\cs{@captype} set to \texttt{table}}
-% To make \cs{raggedtablecaption} available, \cs{@captype} has to be defined.
-% \begin{macrocode}
- \def\@captype{table}%
- \@@makecaption{#1}{#2}{#3}%
- \endgraf
- \if@captionabove
- \vskip\abovecaptionskip
- \else
- \vskip\belowcaptionskip
- \fi
- }%
- \hss
- }%
- }%
- }%
- \newcommand*{\scr@LT@array}{}%
- \let\scr@LT@array=\LT@array
- \renewcommand*{\LT@array}{%
- \let\scr@caption=\LT@caption
- \def\captionabove{\noalign{\global\@captionabovetrue}%
- \scr@caption}%
- \def\captionbelow{\noalign{\global\@captionabovefalse}%
- \scr@caption}%
- \if@tablecaptionabove
- \let\LT@caption=\captionabove
- \else
- \let\LT@caption=\captionbelow
- \fi
- \scr@LT@array
- }%
- \ClassInfo{\KOMAClassName}{%
- longtable captions redefined%
- }%
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@caption@before@longtable@warning
-% \end{macro}^^A \LT@array,\LT@caption
-% \end{macro}^^A \LT@makecaption
-%
-% \subsection{Special treatment of the \texorpdfstring{\pkg*{float}}{`float'} package}
-%
-% \begin{macro}{\fs@komaabove,\fs@komabelow,\floatc@komascript}
-% \changes{v2.8j}{2001/07/30}{added}
-% We define two float style for package \pkg{float}: \texttt{komaabove} and
-% \texttt{komabelow}. However this is done independent of loading \pkg{float},
-% because maybe someone else also uses those styles (but I don't think so).
-% Note: Internal macros of \pkg{float} has to be used for the definitions.
-% \begin{macrocode}
-\newcommand*{\fs@komaabove}{%
- \let\@fs@capt\floatc@komascript
- \let\@fs@pre\@empty
- \def\@fs@mid{\vskip\abovecaptionskip}%
- \let\@fs@post\@empty
- \let\@fs@iftopcapt\iftrue}
-\newcommand*{\fs@komabelow}{%
- \let\@fs@capt\floatc@komascript
- \let\@fs@pre\@empty
- \def\@fs@mid{\vskip\abovecaptionskip}%
- \let\@fs@post\@empty
- \let\@fs@iftopcapt\iffalse}
-\newcommand{\floatc@komascript}{\@@makecaption\@firstofone}
-% \end{macrocode}
-% \end{macro}^^A \fs@komabove,\fs@komabelow,\floatc@komascript
-%
-%
-% \subsection{Where to place floats}
-%
-% \begin{counter}{topnumber}
-% \begin{command}{\topfraction}
-% \begin{counter}{bottomnumber}
-% \begin{command}{\bottomfraction}
-% \begin{counter}{totalnumber}
-% \begin{command}{\textfraction}
-% \begin{command}{\floatpagefraction}
-% \begin{counter}{dbltopnumber}
-% \begin{command}{\dbltopfraction}
-% \begin{command}{\dblfloatpagefraction}
-% These are constants used by the \LaTeX{} kernel to decide where to place a
-% float. See the kernel documentation for more information.
-% \begin{macrocode}
-\setcounter{topnumber}{2}
-\renewcommand*\topfraction{.7}
-\setcounter{bottomnumber}{1}
-\renewcommand*\bottomfraction{.3}
-\setcounter{totalnumber}{3}
-\renewcommand*\textfraction{.2}
-\renewcommand*\floatpagefraction{.5}
-\setcounter{dbltopnumber}{2}
-\renewcommand*\dbltopfraction{.7}
-\renewcommand*\dblfloatpagefraction{.5}
-% \end{macrocode}
-% \end{command}
-% \end{command}
-% \end{counter}
-% \end{command}
-% \end{command}
-% \end{counter}
-% \end{command}
-% \end{counter}
-% \end{command}
-% \end{counter}
-%
-%
-% \subsection{Caption without float}
-%
-% \begin{command}{\captionof}
-% \changes{v3.05}{2009/07/08}{added}
-% \changes{v3.09}{2011/03/21}{using internal \cs{scr@caption}}
-% \changes{v3.09a}{2011/04/13}{handling of
-% \opt{captions\quotechar=tableheading} and \opt{captions\quotechar=figureheading}}
-% \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@caption}
-\newcommand*{\captionaboveof}{\@captionabovetrue\captionof}
-\newcommand*{\captionbelowof}{\@captionabovefalse\captionof}
-\BeforePackage{capt-of}{\let\captionof\relax}
-% \end{macrocode}
-% \end{command}^^A \captionaboveof,\captionbelowof
-% \end{command}^^A \captionof
-%
-% \begin{environment}{captionofbeside}
-% \changes{v3.10}{2011/09/02}{added}
-% The analogue environment to \cs{captionbeside} to be used outside
-% floats.
-% \begin{description}
-% \item[ToDo:] Wouldn't it be a good idea to test for already defined
-% \cs{@captype} inside \env{captionbeside} and then expect an additional first
-% argument \meta{float}? In this case user could simply us \env{captionbeside}
-% the same way as \env{captionofbeside}.
-% \end{description}
-% \begin{macrocode}
-\newenvironment{captionofbeside}[1]{%
- \def\@captype{#1}%
- \captionbeside
-}{%
- \endcaptionbeside
-}
-% \end{macrocode}
-% \end{environment}
-%
-%
-% \subsection{Names}
-%
-% \begin{command}{\figurename,\tablename}
-% \changes{v3.36}{2022/02/15}{explicit definition for English languages}
-% The names to be used for the float labels.
-% \begin{macrocode}
-\newcommand*\figurename{Figure}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\figurename{Figure}
-\newcommand*\tablename{Table}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\tablename{Table}
-% \end{macrocode}
-% \end{command}^^A \figurename,\tablename
-%
-%
-% \subsection{Defining the \env{figure} environment}
-%
-% \begin{environment}{figure*,figure-,figure}
-% \changes{v2.2c}{1995/05/25}{initial CJK support}
-% \changes{v2.8h}{2001/07/19}{\cs{caption} is \cs{captionbelow}}
-% \changes{v3.25}{2017/10/10}{re-implemented using \pkg*{tocbasic}}
-% \changes{v3.36}{2022/02/22}{define additional non-float}
-% \begin{counter}{figure}
-% \changes{v3.25}{2017/10/10}{implicit by \cs{DeclareNewTOC}}
-% \end{counter}
-% We do the main job using \cs{DeclareNewTOC}:
-% \begin{macrocode}
-\DeclareNewTOC[%
- type=figure,
- float,
- nonfloat,
-%<book|report> counterwithin=chapter,
-% \end{macrocode}
-% \begin{macro}{\fps@figure}
-% Default placement (by \cs{DeclareNewTOC}) \textbf{t}op, \textbf{b}ottom,
-% \textbf{p}age.
-% \begin{macrocode}
- floatpos=tbp,
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ftype@figure}
-% Numerical float type 1 (by \cs{DeclareNewTOC}).
-% \begin{macrocode}
- floattype=1,
-% \end{macrocode}
-% \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}}
-% \begin{macrocode}
- tocentryindent=1.5em,
- tocentrynumwidth=2.3em,
- atbegin=\def\caption{%
- \if@figurecaptionabove\expandafter\captionabove
- \else\expandafter\captionbelow\fi
- }
-% \end{macrocode}
-% \begin{macro}{\ext@figure}
-% Extension to be used (by \cs{DeclareNewTOC})
-% \begin{macrocode}
-]{lof}
-% \end{macrocode}
-% \end{macro}
-% \begin{command}{\thefigure}
-% \changes{v2.97e}{2007/11/23}{using chapter number in main-matter only}
-% \changes{v3.27}{2019/06/26}{\cs{relax} replaced by percent}
-% \changes{v3.35}{2021/10/12}{use chapter number only of greater than zero}
-% \changes{v3.35}{2021/10/12}{redefine \cs{thefigure} only if compatibility is
-% less or equal 2.97d resp. less than 3.35}
-% \begin{macrocode}
-%<*book|report>
-\expandafter\ifnum\scr@v@is@le{2.97d}%
- \renewcommand*\thefigure{\thechapter.\@arabic\c@figure}
-\fi
-%</book|report>
-%<*article>
-\expandafter\ifnum\scr@v@is@lt{3.35}%
- \renewcommand*\thefigure{\@arabic\c@figure}
-\fi
-%</article>
-% \end{macrocode}
-% \end{command}
-% \begin{macro}{\fnum@figure}
-% \begin{command}{\figureformat}
-% \changes{v2.3c}{1995/08/06}{added}
-% The print format of the number (by \cs{DeclareNewTOC}).
-% \end{command}
-% \end{macro}
-% \end{environment}
-%
-%
-% \subsection{Defining the \env{table} environment}
-%
-% Note: This is almost the same as defining the \env{figure} environment. So
-% read the previous section first.
-%
-% \begin{environment}{table*,table-,table}
-% \changes{v2.2c}{1995/05/25}{initial CJK support}
-% \changes{v2.8h}{2001/07/19}{\cs{caption} is \cs{captionbelow}}
-% \changes{v3.25}{2017/10/10}{re-implemented using \pkg*{tocbasic}}
-% \changes{v3.36}{2022/02/22}{define additional non-float}
-% \begin{counter}{table}
-% \changes{v3.25}{2017/10/10}{implicit by \cs{DeclareNewTOC}}
-% \end{counter}
-% We do the main job using \cs{DeclareNewTOC}:
-% \begin{macrocode}
-\DeclareNewTOC[%
- type=table,
- float,
- nonfloat,
-%<book|report> counterwithin=chapter,
-% \end{macrocode}
-% \begin{macro}{\fps@table}
-% Default placement (by \cs{DeclareNewTOC}) \textbf{t}op, \textbf{b}ottom,
-% \textbf{p}age.
-% \begin{macrocode}
- floatpos=tbp,
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ftype@table}
-% Numerical float type 2 (by \cs{DeclareNewTOC}).
-% \begin{macrocode}
- floattype=2,
-% \end{macrocode}
-% \end{macro}
-% \changes{v3.20}{2016/04/07}{internal redefinition of \cs{caption}}
-% \begin{macrocode}
- tocentryindent=1.5em,
- tocentrynumwidth=2.3em,
- atbegin=\def\caption{%
- \if@tablecaptionabove\expandafter\captionabove
- \else\expandafter\captionbelow\fi
- }
-% \end{macrocode}
-% \begin{macro}{\ext@table}
-% Extension to be used (by \cs{DeclareNewTOC})
-% \begin{macrocode}
-]{lot}
-% \end{macrocode}
-% \end{macro}
-% \begin{command}{\thetable}
-% \changes{v2.97e}{2007/11/23}{using chapter number in main-matter only}
-% \changes{v3.27}{2019/06/26}{\cs{relax} replaced by percent}
-% \changes{v3.35}{2021/10/12}{use chapter number only of greater than zero}
-% \changes{v3.35}{2021/10/12}{redefine \cs{thefigure} only if compatibility is
-% less or equal 2.97d resp. less than 3.35}
-% \begin{macrocode}
-%<*book|report>
-\expandafter\ifnum\scr@v@is@le{2.97d}%
- \renewcommand*\thetable{\thechapter.\@arabic\c@table}
-\fi
-%</book|report>
-%<*article>
-\expandafter\ifnum\scr@v@is@lt{3.35}%
- \renewcommand*\thetable{\@arabic\c@table}
-\fi
-%</article>
-%</body>
-% \end{macrocode}
-% \end{command}
-% \begin{macro}{\fnum@table}
-% \begin{command}{\tableformat}
-% \changes{v2.3c}{1995/08/06}{added}
-% The print format of the number (by \cs{DeclareNewTOC}).
-% \end{command}
-% \end{macro}
-% \end{environment}
-%
-% \begin{macrocode}
-%</class&!letter>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-fonts.dtx b/macros/latex/contrib/koma-script/source/scrkernel-fonts.dtx
deleted file mode 100644
index 1fb7cf7601..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-fonts.dtx
+++ /dev/null
@@ -1,2028 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-fonts.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-fonts.dtx 3723 2022-02-23 14:53:44Z kohm $
-%<identify>%%% (run: identify)
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<10pt>%%% (run: 10pt)
-%<11pt>%%% (run: 11pt)
-%<11pt>%%% (run: 12pt)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-23 15:53:44 +0100 (Mi, 23. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3723 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-fonts.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (font size)]
- }%
-\reserved@a
-% \changes{v3.09}{2011/02/23}{new package \pkg*{scrfontsizes}}
-%</dtx>
-%<*package&generator&identify>
-%<package&generator&identify>\ProvidesPackage{scrfontsizes}[%
-%!KOMAScriptVersion
-%<package&generator&identify> package (font size file generator)]
-%</package&generator&identify>
-%<*dtx>
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{hvlogos}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-fonts.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-%
-% \changes{v2.95}{2002/06/25}{new by splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/22}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/22}{implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-fonts.dtx}
-% \title{Code for the Foats of the
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \file{scrkernel-fonts.dtx} mainly implements the font selection of
-% \KOMAScript{}. This is not only the selection of the font sizes but also
-% the implementation of font elements. Additionally it provides package
-% \pkg*{scrfontsizes} to generate new font size files.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}. The user documentation of alpha package \pkg*{scrfontsizes}
-% is still missing.
-%
-%
-% \MaybeStop{\PrintIndex}
-%
-%
-% \section{Implementation of \KOMAScript{} Font Features}
-%
-% \subsection{Options of the font size files generator package}
-%
-% From version 3.09 there exist package \pkg*{scrfontsizes}, which is currently
-% very rudimentary. However it can used to generate font size files that can
-% be modified by the user afterwards. Currently it does not provide any options.
-%
-% \begin{macrocode}
-%<*generator&option>
-\ProcessOptions\relax
-%</generator&option>
-% \end{macrocode}
-%
-% \subsection{Font size options of the \KOMAScript{} classes}
-%
-% \begin{option}{10pt,11pt,12pt}
-% These options do not exist as explicit options but are handled by
-% \cs{DeclareOption*} via \cs{@pt@scan}.
-% \end{option}
-%
-% \begin{macro}{\@ptsize}
-% \changes{v2.96}{2006/08/11}{\cs{@ptsize} different temporary meaning}
-% \changes{v3.27}{2019/03/25}{\cs{providecommand} instead of \cs{newcommand}}
-% The main meaning of \cs{@ptsize} is the base font size minus 10\,pt, or in
-% other words: base font size = \cs{@ptsize} + 10\,pt. But, until the final
-% font size has been set, we use it for the default size. \cs{providecommand}
-% is used to define it, so a wrapper class can define a different default size
-% before loading the final class.
-% \begin{macrocode}
-%<*class&option>
-\providecommand*\@ptsize{%
-%<!letter> 11%
-%<letter> 12%
-}
-%</class&option>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@pt@scan}
-% \changes{v2.6}{2000/01/04}{added}
-% \begin{macro}{\@pt@@scan}
-% \changes{v2.6}{2000/01/04}{added}
-% \changes{v2.97c}{2007/05/12}{\cs{KOMA@UseObsolete} replaced by
-% \cs{KOMA@UseObsoleteOption}}
-% \changes{v2.98c}{2008/03/22}{Usage of \cs{KOMA@UseObsoleteOption} fixed}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}}
-% \changes{v3.12}{2013/03/04}{other font size options than \opt{10pt},
-% \opt{11pt}, \opt{12pt} are deprecated}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}}
-% This macro scans the current option and recognizes classic font size
-% options. It is used with \cs{DeclareOption*}.
-% \begin{macrocode}
-%<*class&option>
-\newcommand*{\@pt@scan}{%
- \expandafter\@pt@@scan\CurrentOption pt\@pt@@scan%
-}
-\newcommand*{\@pt@@scan}{}
-\def\@pt@@scan #1pt#2\@pt@@scan{%
- \Ifstr{#2}{pt}{%
- \Ifnumber{#1}{%
- \Ifstr{#1}{10}{%
- \KOMA@UseStandardOption{\PackageInfoNoLine{\KOMAClassName}}%
- {#1#2}{fontsize=#1#2}%
- }{%
- \Ifstr{#1}{11}{%
- \KOMA@UseStandardOption{\PackageInfoNoLine{\KOMAClassName}}%
- {#1#2}{fontsize=#1#2}%
- }{%
- \Ifstr{#1}{12}{%
- \KOMA@UseStandardOption{\PackageInfoNoLine{\KOMAClassName}}%
- {#1#2}{fontsize=#1#2}%
- }{%
- \KOMA@UseDeprecatedOption{\PackageWarningNoLine{\KOMAClassName}}%
- {#1#2}{fontsize=#1#2}%
- }%
- }%
- }
- }{\@headlines}%
- }{\@headlines}%
-}
-%</class&option>
-% \end{macrocode}
-% \end{macro}^^A \@pt@@scan
-% \end{macro}^^A \@pt@scan
-%
-% \begin{macro}{\@fontsizefilebase}
-% \changes{v2.96}{2006/08/11}{added}
-% \changes{v3.00}{2008/05/01}{definition earlier because of \pkg*{scrextend}}
-% This is the prefix for the \KOMAScript{} font size files. Wrapper classes
-% are allowed to change it to use their own font size files.
-% \begin{macrocode}
-%<*option&(class|extend)>
-\providecommand*{\@fontsizefilebase}{scrsize}
-% \end{macrocode}
-% \end{macro}
-%
-% \changes{v3.17}{2015/03/10}{die Schriftgröße wird in der internen
-% Optionenliste gespeichert}
-% \begin{option}{fontsize}
-% \changes{v2.96}{2006/08/11}{Funktion komplett geändert}
-% \changes{v2.98c}{2008/03/26}{lädt nach Möglichkeit die zugehörige
-% Schriftgrößendatei}
-% \changes{v3.12}{2013/03/05}{Status wird mit \cs{FamilyKeyStateProcessed}
-% gesetzt.}
-% Hier nun die Option, die tatsächlich verwendet wird. Es sei darauf
-% hingewiesen, dass damit auch Schriftgrößen wie \texttt{10.3pt} denkbar
-% wären.
-% \begin{macrocode}
-\KOMA@key{fontsize}{%
-%<*!extend>
- \scr@ifundefinedorrelax{changefontsizes}{%
- \@defaultunits\@tempdima#1pt\relax\@nnil
- \edef\@ptsize{#1}%
- }{%
-%</!extend>
- \expandafter\@defaultunits\expandafter\@tempdima#1 pt\relax\@nnil
- \edef\@tempa{#1}%
- \setlength{\@tempdimb}{\@tempdima}%
- \edef\@tempb{\strip@pt\@tempdimb}%
- \addtolength{\@tempdimb}{-10\p@}%
- \edef\@ptsize{\strip@pt\@tempdimb}%
- \edef\@tempa{%
- \noexpand\makeatletter
- \noexpand\InputIfFileExists{\@fontsizefilebase\@tempa.clo}{%
-%<!extend> \noexpand\ClassInfo{\KOMAClassName}{%
-%<extend> \noexpand\PackageInfo{scrextend}{%
- File `\@fontsizefilebase\@tempa.clo' used to setup font sizes}%
- }{%
- \noexpand\InputIfFileExists{\@fontsizefilebase\@tempb pt.clo}{%
-%<!extend> \noexpand\ClassInfo{\KOMAClassName}{%
-%<extend> \noexpand\PackageInfo{scrextend}{%
- File `\@fontsizefilebase\@tempb pt.clo' used instead of%
- \noexpand\MessageBreak
- file `\@fontsizefilebase\@tempa.clo' to setup font sizes}%
- }{%
- \noexpand\changefontsizes{#1}%
- }%
- }%
- \noexpand\catcode`\noexpand\@=\the\catcode`\@
- }%
-%<extend> \scr@ifundefinedorrelax{changefontsizes}{%
-%<extend> \expandafter\AtEndOfPackage\expandafter{\@tempa}%
-%<extend> }{%
- \@tempa
- }%
- \FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.%
-%<class> \KOMAClassFileName
-%<extend> scrextend.\scr@pkgextension
- }{fontsize}{#1}%
-}
-%</option&(class|extend)>
-% \end{macrocode}
-% \end{option}
-%
-%
-% \subsection{Packages required by the font size file generator package}
-%
-% \pkg*{scrfontsizes} needs command \cs{changefontsizes}. This can either be
-% provided by a \KOMAScript{} class or package \pkg*{scrextend}.
-% \begin{macrocode}
-%<*generator&body>
-\@ifundefined{changefontsizes}{\RequirePackage{scrextend}}{}
-%</generator&body>
-% \end{macrocode}
-%
-%
-% \subsection{The font size files}
-%
-% \changes{v2.6}{2000/01/04}{reading font size files works independent from size}
-% \changes{v2.98c}{2008/03/26}{using my own \file{scrsize\dots.clo} files}
-%
-% We need at least the font size files for the three base sizes 10\,pt, 11\,pt
-% and 12\,pt. From version 2.98c \KOMAScript{} prefers to use its own files,
-% because these can be loaded without problems after |\begin{document}| and
-% after another font size file has already been loaded. Nevertheless the base
-% sizes are more or less from the standard classes.
-%
-% \begin{macrocode}
-%<*10pt|11pt|12pt>
-\ProvidesFile{%
-%<10pt> scrsize10pt.clo%
-%<11pt> scrsize11pt.clo%
-%<12pt> scrsize12pt.clo%
-}[\KOMAScriptVersion\space font size class option %
-%<10pt> (10pt)%
-%<11pt> (11pt)%
-%<12pt> (12pt)%
-]
-% \end{macrocode}
-%
-% \begin{command}{\normalsize,\small,\footnotesize,\scriptsize,\tiny,\large,
-% \Large,\LARGE,\huge,\Huge}
-% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files}
-% \begin{macrocode}
-\def\normalsize{%
-%<*10pt>
- \@setfontsize\normalsize\@xpt\@xiipt
- \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
-%</10pt>
-%<*11pt>
- \@setfontsize\normalsize\@xipt{13.6}%
- \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
-%</11pt>
-%<*12pt>
- \@setfontsize\normalsize\@xiipt{14.5}%
- \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
-%</12pt>
- \belowdisplayskip \abovedisplayskip
- \let\@listi\@listI
-}
-\def\small{%
-%<*10pt>
- \@setfontsize\small\@ixpt{11}%
- \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus2\p@
- \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
- \def\@listi{\leftmargin\leftmargini
- \topsep 4\p@ \@plus2\p@ \@minus2\p@
- \parsep 2\p@ \@plus\p@ \@minus\p@
- \itemsep \parsep}%
-%</10pt>
-%<*11pt>
- \@setfontsize\small\@xpt\@xiipt
- \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
- \def\@listi{\leftmargin\leftmargini
- \topsep 6\p@ \@plus2\p@ \@minus2\p@
- \parsep 3\p@ \@plus2\p@ \@minus\p@
- \itemsep \parsep}%
-%</11pt>
-%<*12pt>
- \@setfontsize\small\@xipt{13.6}%
- \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
- \def\@listi{\leftmargin\leftmargini
- \topsep 9\p@ \@plus3\p@ \@minus5\p@
- \parsep 4.5\p@ \@plus2\p@ \@minus\p@
- \itemsep \parsep}%
-%</12pt>
- \belowdisplayskip \abovedisplayskip
-}
-\def\footnotesize{%
-%<*10pt>
- \@setfontsize\footnotesize\@viiipt{9.5}%
- \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus\p@
- \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
- \def\@listi{\leftmargin\leftmargini
- \topsep 3\p@ \@plus\p@ \@minus\p@
- \parsep 2\p@ \@plus\p@ \@minus\p@
- \itemsep \parsep}%
-%</10pt>
-%<*11pt>
- \@setfontsize\footnotesize\@ixpt{11}%
- \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@
- \abovedisplayshortskip \z@ \@plus\p@
- \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
- \def\@listi{\leftmargin\leftmargini
- \topsep 4\p@ \@plus2\p@ \@minus2\p@
- \parsep 2\p@ \@plus\p@ \@minus\p@
- \itemsep \parsep}%
-%</11pt>
-%<*12pt>
- \@setfontsize\footnotesize\@xpt\@xiipt
- \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
- \abovedisplayshortskip \z@ \@plus3\p@
- \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
- \def\@listi{\leftmargin\leftmargini
- \topsep 6\p@ \@plus2\p@ \@minus2\p@
- \parsep 3\p@ \@plus2\p@ \@minus\p@
- \itemsep \parsep}%
-%</12pt>
- \belowdisplayskip \abovedisplayskip
-}
-%<*10pt>
-\def\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
-\def\tiny{\@setfontsize\tiny\@vpt\@vipt}
-\def\large{\@setfontsize\large\@xiipt{14}}
-\def\Large{\@setfontsize\Large\@xivpt{18}}
-\def\LARGE{\@setfontsize\LARGE\@xviipt{22}}
-\def\huge{\@setfontsize\huge\@xxpt{25}}
-\def\Huge{\@setfontsize\Huge\@xxvpt{30}}
-%</10pt>
-%<*11pt>
-\def\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
-\def\tiny{\@setfontsize\tiny\@vipt\@viipt}
-\def\large{\@setfontsize\large\@xiipt{14}}
-\def\Large{\@setfontsize\Large\@xivpt{18}}
-\def\LARGE{\@setfontsize\LARGE\@xviipt{22}}
-\def\huge{\@setfontsize\huge\@xxpt{25}}
-\def\Huge{\@setfontsize\Huge\@xxvpt{30}}
-%</11pt>
-%<*12pt>
-\def\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
-\def\tiny{\@setfontsize\tiny\@vipt\@viipt}
-\def\large{\@setfontsize\large\@xivpt{18}}
-\def\Large{\@setfontsize\Large\@xviipt{22}}
-\def\LARGE{\@setfontsize\LARGE\@xxpt{25}}
-\def\huge{\@setfontsize\huge\@xxvpt{30}}
-\let\Huge=\huge
-%</12pt>
-\normalsize
-% \end{macrocode}
-% \end{command}
-%
-% \begin{length}{\footnotesep,\footins,\floatsep,\textfloatsep,\intextsep,
-% \dblfloatsep,\sbltextfloatsep,\partopsep}
-% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files}
-% \begin{ilength}{\@fptop,\@fpsep,\@fpbot,\@dblfptop,\@dblfpsep,\@dblfpbot}
-% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files}
-% The values are same as with the standard classes.
-% \begin{macrocode}
-%<*10pt>
-\setlength\footnotesep {6.65\p@}
-\setlength{\skip\footins} {9\p@ \@plus 4\p@ \@minus 2\p@}
-\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\textfloatsep {20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\partopsep {2\p@ \@plus 1\p@ \@minus 1\p@}
-\setlength\@fptop {0\p@ \@plus 1fil}
-\setlength\@fpsep {8\p@ \@plus 2fil}
-\setlength\@fpbot {0\p@ \@plus 1fil}
-\setlength\@dblfptop {0\p@ \@plus 1fil}
-\setlength\@dblfpsep {8\p@ \@plus 2fil}
-\setlength\@dblfpbot {0\p@ \@plus 1fil}
-%</10pt>
-%<*11pt>
-\setlength\footnotesep {7.7\p@}
-\setlength{\skip\footins} {10\p@ \@plus 4\p@ \@minus 2\p@}
-\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\textfloatsep {20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\partopsep {3\p@ \@plus 1\p@ \@minus 1\p@}
-\setlength\@fptop {0\p@ \@plus 1fil}
-\setlength\@fpsep {8\p@ \@plus 2fil}
-\setlength\@fpbot {0\p@ \@plus 1fil}
-\setlength\@dblfptop {0\p@ \@plus 1fil}
-\setlength\@dblfpsep {8\p@ \@plus 2fil}
-\setlength\@dblfpbot {0\p@ \@plus 1fil}
-%</11pt>
-%<*12pt>
-\setlength\footnotesep {8.4\p@}
-\setlength{\skip\footins} {10.8\p@ \@plus 4\p@ \@minus 2\p@}
-\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\textfloatsep {20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\intextsep {14\p@ \@plus 4\p@ \@minus 4\p@}
-\setlength\dblfloatsep {14\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
-\setlength\partopsep {3\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\@fptop {0\p@ \@plus 1fil}
-\setlength\@fpsep {10\p@ \@plus 2fil}
-\setlength\@fpbot {0\p@ \@plus 1fil}
-\setlength\@dblfptop {0\p@ \@plus 1fil}
-\setlength\@dblfpsep {10\p@ \@plus 2fil}
-\setlength\@dblfpbot {0\p@ \@plus 1fil}
-%</12pt>
-% \end{macrocode}
-% \begin{macro}{\@listi,\@listii,\@listiii,\@listiv,\@listv,\@listvi}
-% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files}
-% The definitions are the same as with the standard classes.
-% \begin{macrocode}
-\def\@listi{\leftmargin\leftmargini
-%<*10pt>
- \parsep 4\p@ \@plus2\p@ \@minus\p@
- \topsep 8\p@ \@plus2\p@ \@minus4\p@
- \itemsep4\p@ \@plus2\p@ \@minus\p@}
-%</10pt>
-%<*11pt>
- \parsep 4.5\p@ \@plus2\p@ \@minus\p@
- \topsep 9\p@ \@plus3\p@ \@minus5\p@
- \itemsep4.5\p@ \@plus2\p@ \@minus\p@}
-%</11pt>
-%<*12pt>
- \parsep 5\p@ \@plus2.5\p@ \@minus\p@
- \topsep 10\p@ \@plus4\p@ \@minus6\p@
- \itemsep5\p@ \@plus2.5\p@ \@minus\p@}
-%</12pt>
-\let\@listI\@listi
-\def\@listii {\leftmargin\leftmarginii
- \labelwidth\leftmarginii
- \advance\labelwidth-\labelsep
-%<*10pt>
- \topsep 4\p@ \@plus2\p@ \@minus\p@
- \parsep 2\p@ \@plus\p@ \@minus\p@
-%</10pt>
-%<*11pt>
- \topsep 4.5\p@ \@plus2\p@ \@minus\p@
- \parsep 2\p@ \@plus\p@ \@minus\p@
-%</11pt>
-%<*12pt>
- \topsep 5\p@ \@plus2.5\p@ \@minus\p@
- \parsep 2.5\p@ \@plus\p@ \@minus\p@
-%</12pt>
- \itemsep \parsep}
-\def\@listiii{\leftmargin\leftmarginiii
- \labelwidth\leftmarginiii
- \advance\labelwidth-\labelsep
-%<10pt> \topsep 2\p@ \@plus\p@\@minus\p@
-%<11pt> \topsep 2\p@ \@plus\p@\@minus\p@
-%<12pt> \topsep 2.5\p@\@plus\p@\@minus\p@
- \parsep \z@
- \partopsep \p@ \@plus\z@ \@minus\p@
- \itemsep \topsep}
-\def\@listiv {\leftmargin\leftmarginiv
- \labelwidth\leftmarginiv
- \advance\labelwidth-\labelsep}
-\def\@listv {\leftmargin\leftmarginv
- \labelwidth\leftmarginv
- \advance\labelwidth-\labelsep}
-\def\@listvi {\leftmargin\leftmarginvi
- \labelwidth\leftmarginvi
- \advance\labelwidth-\labelsep}
-%</10pt|11pt|12pt>
-% \end{macrocode}
-% \end{macro}^^A \@listi … \@listvi
-% \end{ilength}^^A \@fptop … \@dblfpbot
-% \end{length}^^A \footnotesep … \partopsep
-%
-% \begin{command}{\changefontsizes}
-% \changes{v2.96}{2006/08/11}{added}
-% \changes{v3.08b}{2011/02/22}{three \cs{def} replaced by \cs{edef}}
-% \changes{v3.17}{2015/02/23}{define if undefined only}
-% \changes{v3.17}{2015/02/23}{indirect definition for Falk}
-% \begin{macro}{\simple@changefontsizes}
-% \changes{v3.17}{2015/02/23}{added}
-% \changes{v3.17}{2015/03/25}{\cs{par@updaterelative} added}
-% Fallback calculation of font size settings relative to known 10\,pt values:
-% \begin{quote}
-% \cs{changefontsizes}\oarg{baseline skip}\marg{font size}
-% \end{quote}
-% If the \meta{baseline skip} is given, it is used as \len{baselineskip} for
-% \cs{normalsize} and all other baseline skips are relative to it. If it is
-% not give, it is also calculated.
-% \begin{macro}{\scr@setlength}
-% \changes{v3.12}{2013/10/08}{added}
-% Command
-% \begin{quote}
-% \cs{scr@setlength}\marg{\LaTeX length}\marg{base dimension}\marg{plus
-% dimension}\marg{minus dimension}
-% \end{quote}
-% sets \meta{\LaTeX length} to \meta{base dimension} \texttt{plus} \meta{plus
-% dimension} \texttt{minus} \meta{minus dimension}. Minimum value for
-% \meta{plus dimension} and \meta{minus dimension} is 1\,pt.
-% \begin{macrocode}
-%<*body&(class|extend)>
-\newcommand*\scr@setlength[4]{%
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{#1}{#2 \@plus#3 \@minus#4}%
- \else
- \ifdim #2<\ifdim #2=\z@ \z@ \else \p@\fi
- \ifdim #3<\ifdim #3=\z@ \z@ \else \p@\fi
- \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi
- \setlength{#1}{\p@ \@plus\p@ \@minus\p@}%
- \else
- \setlength{#1}{\p@ \@plus\p@ \@minus#4}%
- \fi
- \else
- \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi
- \setlength{#1}{\p@ \@plus#3 \@minus\p@}%
- \else
- \setlength{#1}{\p@ \@plus#3 \@minus#4}%
- \fi
- \fi
- \else
- \ifdim #3<\ifdim #3=\z@ \z@ \else \p@\fi
- \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi
- \setlength{#1}{#2 \@plus\p@ \@minus\p@}%
- \else
- \setlength{#1}{#2 \@plus\p@ \@minus#4}%
- \fi
- \else
- \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi
- \setlength{#1}{#2 \@plus#3 \@minus\p@}%
- \else
- \setlength{#1}{#2 \@plus#3 \@minus#4}%
- \fi
- \fi
- \fi
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \changes{v3.17}{2015/03/10}{\eTeX{} warning removed}
-% \begin{macrocode}
-\providecommand*{\simple@changefontsizes}[2][1.2\@tempdima]{%
- \KOMA@kav@removekey{.%
-%<class> \KOMAClassFileName
-%<extend> scrextend.\scr@pkgextension
- }{fontsize}%
- \@defaultunits\@tempdima#2pt\relax\@nnil
- \setlength{\@tempdimc}{\@tempdima}%
- \addtolength{\@tempdimc}{-10\p@}%
- \edef\@ptsize{\strip@pt\@tempdimc}%
- \@defaultunits\@tempdimb#1pt\relax\@nnil
- \setlength{\@tempdimc}{\dimexpr (100\@tempdimb / \@tempdima * \p@)}%
- \edef\@tempb{\the\@tempdimc}%
- \setlength{\@tempdimc}{\@tempdima}%
- \def\@tempa##1##2##3##4##5\@nnil{\def##1{##2.##3##4}}%
- \expandafter\@tempa\expandafter\@tempb\@tempb\@nnil%
-% \end{macrocode}
-% Now, \len{@temdimc} is the wanted basic font size in pt. \cs{@tempb} is the
-% factor of the baseline skip rounded to two decimals. \len{@tempdima} is also
-% the basic font size and \len{@tempdimb} the \len{baselineskip}. But
-% \len{@tempdima} and \len{tempdimb} will change in further calculations
-% depending on the wanted font size command.
-%
-% Calculation and definition of \cs{normalsize}:
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{\abovedisplayskip}{%
- \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
- \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
- \setlength{\belowdisplayshortskip}{%
- .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
- \else
- \scr@setlength{\abovedisplayskip}%
- {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}%
- \scr@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}%
- \scr@setlength{\belowdisplayshortskip}%
- {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}%
- \fi
- \setlength{\belowdisplayskip}{\abovedisplayskip}%
- \edef\normalsize{%
- \noexpand\@setfontsize\noexpand\normalsize
- {\the\@tempdima}{\the\@tempdimb}%
- \abovedisplayskip \the\abovedisplayskip
- \abovedisplayshortskip \the\abovedisplayshortskip
- \belowdisplayskip \the\belowdisplayskip
- \belowdisplayshortskip \the\belowdisplayshortskip
- \let\noexpand\@listi\noexpand\@listI
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{small}:
-% \begin{macrocode}
- \setlength{\@tempdima}{0.9125\@tempdimc}%
- \setlength{\@tempdimb}{\@tempb\@tempdima}%
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{\abovedisplayskip}{%
- \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
- \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
- \setlength{\belowdisplayshortskip}{%
- .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
- \else
- \scr@setlength{\abovedisplayskip}%
- {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}%
- \scr@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}%
- \scr@setlength{\belowdisplayshortskip}%
- {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}%
- \fi
- \setlength{\belowdisplayskip}{\abovedisplayskip}%
- \edef\small{%
- \noexpand\@setfontsize\noexpand\small
- {\the\@tempdima}{\the\@tempdimb}%
- \abovedisplayskip \the\abovedisplayskip
- \abovedisplayshortskip \the\abovedisplayshortskip
- \belowdisplayskip \the\belowdisplayskip
- \belowdisplayshortskip \the\belowdisplayshortskip
- \let\noexpand\@listi\noexpand\@listi@small
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{footnotesize}:
-% \begin{macrocode}
- \setlength{\@tempdima}{.83334\@tempdimc}%
- \setlength{\@tempdimb}{\@tempb\@tempdima}%
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{\abovedisplayskip}{%
- \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
- \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
- \setlength{\belowdisplayshortskip}{%
- .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
- \else
- \scr@setlength{\abovedisplayskip}%
- {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}%
- \scr@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}%
- \scr@setlength{\belowdisplayshortskip}%
- {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}%
- \fi
- \setlength{\belowdisplayskip}{\abovedisplayskip}%
- \edef\footnotesize{%
- \noexpand\@setfontsize\noexpand\footnotesize
- {\the\@tempdima}{\the\@tempdimb}%
- \abovedisplayskip \the\abovedisplayskip
- \abovedisplayshortskip \the\abovedisplayshortskip
- \belowdisplayskip \the\belowdisplayskip
- \belowdisplayshortskip \the\belowdisplayshortskip
- \let\noexpand\@listi\noexpand\@listi@footnotesize
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{scriptsize}:
-% \begin{macrocode}
- \setlength{\@tempdima}{.66667\@tempdimc}%
- \setlength{\@tempdimb}{\@tempb\@tempdima}%
- \edef\scriptsize{%
- \noexpand\@setfontsize\noexpand\scriptsize
- {\the\@tempdima}{\the\@tempdimb}%
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{tiny}:
-% \begin{macrocode}
- \setlength{\@tempdima}{.5\@tempdimc}%
- \setlength{\@tempdimb}{\@tempb\@tempdima}%
- \edef\tiny{%
- \noexpand\@setfontsize\noexpand\tiny
- {\the\@tempdima}{\the\@tempdimb}%
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{large}:
-% \begin{macrocode}
- \setlength{\@tempdima}{1.2\@tempdimc}%
- \setlength{\@tempdimb}{\@tempb\@tempdima}%
- \edef\large{%
- \noexpand\@setfontsize\noexpand\large
- {\the\@tempdima}{\the\@tempdimb}%
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{Large}:
-% \begin{macrocode}
- \setlength{\@tempdima}{1.44\@tempdimc}%
- \setlength{\@tempdimb}{\@tempb\@tempdima}%
- \edef\Large{%
- \noexpand\@setfontsize\noexpand\Large
- {\the\@tempdima}{\the\@tempdimb}%
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{LARGE}:
-% \begin{macrocode}
- \setlength{\@tempdima}{1.728\@tempdimc}%
- \setlength{\@tempdimb}{\@tempb\@tempdima}%
- \edef\LARGE{%
- \noexpand\@setfontsize\noexpand\LARGE
- {\the\@tempdima}{\the\@tempdimb}%
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{huge}:
-% \begin{macrocode}
- \setlength{\@tempdima}{2.074\@tempdimc}%
- \setlength{\@tempdimb}{\@tempb\@tempdima}%
- \edef\huge{%
- \noexpand\@setfontsize\noexpand\huge
- {\the\@tempdima}{\the\@tempdimb}%
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{Huge}:
-% \begin{macrocode}
- \setlength{\@tempdima}{2.488\@tempdimc}%
- \setlength{\@tempdimb}{\@tempb\@tempdima}%
- \edef\Huge{%
- \noexpand\@setfontsize\noexpand\Huge
- {\the\@tempdima}{\the\@tempdimb}%
- }%
-% \end{macrocode}
-% Activation of \cs{normalsize} and calculation of additional font size
-% depending sized.
-% \begin{macrocode}
- \normalsize
-%<!extend> \expandafter\ifnum\scr@v@is@ge{3.17}\@nameuse{par@updaterelative}\fi
-% \end{macrocode}
-% After the activation of \cs{normalsize} above, we can use \cs{f@size} and
-% \cs{f@baselineskip}. We cannot use \cs{baselineskip}, because this would be
-% influenced by \cs{baselinestretch}.
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{\footnotesep}{.7\@tempdimc}%
- \setlength{\skip\footins}{.9\@tempdimc \@plus .3333\@tempdimc \@minus
- .6\@tempdimc}%
- \setlength{\floatsep}{\@tempdimc \@plus .1667\@tempdimc \@minus
- .3333\@tempdimc}%
- \setlength{\textfloatsep}{1.6667\@tempdimc \@plus .1667\@tempdimc \@minus
- .3333\@tempdimc}%
- \setlength{\intextsep}{\@tempb\@tempdimc \@plus .3333\@tempdimc \@minus
- .3333\@tempdimc}%
- \setlength{\dblfloatsep}{\@tempb\@tempdimc \@plus .1667\@tempdimc \@minus
- .3333\@tempdimc}%
- \setlength{\dbltextfloatsep}{\textfloatsep}%
- \setlength{\@fptop}{0\p@ \@plus 1fil}%
- \setlength{\@fpsep}{.8333\@tempdimc \@plus 2fil}%
- \setlength{\@fpbot}{\@fptop}%
- \setlength{\@dblfptop}{0\p@ \@plus 1fil}%
- \setlength{\@dblfpsep}{.8333\@tempdimc \@plus 2fil}%
- \setlength{\@dblfpbot}{\@fptop}%
- \fi
-% \end{macrocode}
-% Calculation and definition of \cs{@listi} and \cs{@listI}:
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{\topsep}{.8333\@tempdimc \@plus .3333\@tempdimc \@minus
- .5\@tempdimc}%
- \setlength{\parsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}%
- \else
- \setlength{\@tempdimb}{\f@baselineskip}%
- \scr@setlength{\parsep}%
- {.3333\@tempdimb}{.1667\@tempdimb}{.0833\@tempdimb}%
- \scr@setlength{\topsep}%
- {.6667\@tempdimb}{.1667\@tempdimb}{.3333\@tempdimb}%
- \fi
- \@tempswafalse
- \begingroup
- \def\@list@extra{\aftergroup\@tempswatrue}%
- \csname @listi\endcsname
- \endgroup
- \edef\@listi{\leftmargin\leftmargini
- \topsep \the\topsep
- \parsep \the\parsep
- \itemsep \parsep
- \if@tempswa\noexpand\@list@extra\fi
- }%
- \let\@listI\@listi
-% \end{macrocode}
-% Calculation and definition of \cs{@listi@small}:
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{\topsep}{.75\@tempdimc \@plus .25\@tempdimc \@minus
- .41667\@tempdimc}%
- \setlength{\parsep}{.375\@tempdimc \@plus .16667\@tempdimc \@minus \p@}%
- \else
- \scr@setlength{\parsep}%
- {.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}%
- \scr@setlength{\topsep}%
- {.3333\@tempdimb}{.1667\@tempdimb}{.1667\@tempdimb}%
- \fi
- \@tempswafalse
- \begingroup
- \def\@list@extra{\aftergroup\@tempswatrue}%
- \csname @listi\endcsname
- \endgroup
- \edef\@listi@small{\leftmargin\leftmargini
- \topsep \the\topsep
- \parsep \the\parsep
- \itemsep \parsep
- \if@tempswa\noexpand\@list@extra\fi
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{@listi@footnotesize}:
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{\topsep}{.5\@tempdimc \@plus .16667\@tempdimc \@minus
- .16667\@tempdimc}%
- \setlength{\parsep}{.25\@tempdimc \@plus .16667\@tempdimc \@minus \p@}%
- \else
- \scr@setlength{\parsep}%
- {.125\@tempdimb}{.0625\@tempdimb}{.0625\@tempdimb}%
- \scr@setlength{\topsep}%
- {.25\@tempdimb}{.125\@tempdimb}{.125\@tempdimb}%
- \fi
- \@tempswafalse
- \begingroup
- \def\@list@extra{\aftergroup\@tempswatrue}%
- \csname @listi\endcsname
- \endgroup
- \edef\@listi@footnotesize{\leftmargin\leftmargini
- \topsep \the\topsep
- \parsep \the\parsep
- \itemsep \parsep
- \if@tempswa\noexpand\@list@extra\fi
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{@listii}:
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{\topsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}%
- \setlength{\parsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}%
- \else
- \scr@setlength{\parsep}%
- {.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}%
- \scr@setlength{\topsep}%
- {.3333\@tempdimb}{.1667\@tempdimb}{.0833\@tempdimb}%
- \fi
- \@tempswafalse
- \begingroup
- \def\@list@extra{\aftergroup\@tempswatrue}%
- \csname @listii\endcsname
- \endgroup
- \edef\@listii{\leftmargin\leftmarginii
- \labelwidth=\dimexpr \leftmargin-\labelsep
- \topsep \the\topsep
- \parsep \the\parsep
- \itemsep \parsep
- \if@tempswa\noexpand\@list@extra\fi
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{@listiii}:
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{\topsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}%
- \else
- \scr@setlength{\topsep}%
- {.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}%
- \fi
- \setlength{\partopsep}{\z@ \@plus\z@ \@minus\p@}%
- \@tempswafalse
- \begingroup
- \def\@list@extra{\aftergroup\@tempswatrue}%
- \csname @listiii\endcsname
- \endgroup
- \edef\@listiii{\leftmargin\leftmarginiii
- \labelwidth=\dimexpr \leftmargin-\labelsep
- \topsep \the\topsep
- \parsep \z@
- \partopsep \the\partopsep
- \itemsep \topsep
- \if@tempswa\noexpand\@list@extra\fi
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{@listiv}:
-% \begin{macrocode}
- \@tempswafalse
- \begingroup
- \def\@list@extra{\aftergroup\@tempswatrue}%
- \csname @listiv\endcsname
- \endgroup
- \edef\@listiv{\leftmargin\leftmarginiv
- \labelwidth=\dimexpr \leftmargin-\labelsep\relax
- \if@tempswa\noexpand\@list@extra\fi
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{@listv}:
-% \begin{macrocode}
- \@tempswafalse
- \begingroup
- \def\@list@extra{\aftergroup\@tempswatrue}%
- \csname @listv\endcsname
- \endgroup
- \edef\@listv{\leftmargin\leftmarginv
- \labelwidth=\dimexpr \leftmargin-\labelsep\relax
- \if@tempswa\noexpand\@list@extra\fi
- }%
-% \end{macrocode}
-% Calculation and definition of \cs{@listvi}:
-% \begin{macrocode}
- \@tempswafalse
- \begingroup
- \def\@list@extra{\aftergroup\@tempswatrue}%
- \csname @listvi\endcsname
- \endgroup
- \edef\@listvi{\leftmargin\leftmarginvi
- \labelwidth=\dimexpr \leftmargin-\labelsep\relax
- \if@tempswa\noexpand\@list@extra\fi
- }%
- \@listi
-% \end{macrocode}
-% \changes{v2.97c}{2007/07/04}{setting \cs{intextsep}}
-% \changes{v2.97c}{2007/07/04}{setting \cs{dblfloatsep}}
-% \changes{v2.97c}{2007/07/04}{setting \cs{partopsep}}
-% \changes{v3.12}{2013/10/08}{calculation of some lengths changed}
-% Calculation and setting of \len{intextsep}, \len{dblfloatsep},
-% \len{partopsep}, \len{footnotesep}, \cs{skip}\len{footins}, \len{footsep},
-% \len{textfloatsep}, \len{@fptop}, \len{@fpsep}, \len{@fpbot},
-% \len{@dblfptop}, \len{@dblfpsep}, \len{@dblfpbot}. Setting of \len{topsep}
-% and \len{parsep} is not needed because part of \cs{@listi}.
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.12}\relax
- \setlength{\@tempdimb}{\@tempb\@tempdima}%
- \setlength{\@tempdima}{\dimexpr \@tempdimb-\@tempdimc}%
- \setlength\intextsep{\@tempdimb \@plus.2\@tempdima \@minus.2\@tempdima}%
- \setlength\dblfloatsep\intextsep
- \setlength\partopsep{.2\@tempdimc \@plus.1\@tempdimc \@minus.1\@tempdimc}%
- \else
- \setlength{\@tempdimb}{\f@baselineskip}%
- \setlength{\footnotesep}{.555\@tempdimb}%
- \scr@setlength{\skip\footins}%
- {.75\@tempdimb}{.3333\@tempdimb}{.1667\@tempdimb}%
- \scr@setlength{\floatsep}%
- {\@tempdimb}{.1667\@tempdimb}{.1667\@tempdimb}%
- \scr@setlength{\textfloatsep}%
- {1.6667\@tempdimb}{.1667\@tempdimb}{.3333\@tempdimb}%
- \setlength{\intextsep}{\floatsep}%
- \setlength{\dblfloatsep}{\floatsep}%
- \setlength{\dbltextfloatsep}{\textfloatsep}%
- \setlength{\@fptop}{\z@ \@plus 1fil}%
- \setlength{\@fpsep}{.6667\@tempdimb \@plus 2fil}%
- \setlength{\@fpbot}{\@fptop}%
- \setlength{\@dblfptop}{\@fptop}%
- \setlength{\@dblfpsep}{\@fpsep}%
- \setlength{\@dblfpbot}{\@fptop}%
- \scr@setlength{\partopsep}{.2\@tempdimb}{.1\@tempdimb}{.1\@tempdimb}%
- \fi
-}
-\scr@ifundefinedorrelax{changefontsizes}{%
- \let\changefontsizes\simple@changefontsizes
-}{%
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package&extend> \PackageWarning{scrextend}{%
- \string\changefontsizes\space already defined.\MessageBreak
- I hope, the definition is compatible,\MessageBreak
- because I do not change it%
- }%
-}
-%</body&(class|extend)>
-% \end{macrocode}
-% \end{macro}^^A \simple@changefontsizes
-% \end{command}^^A \changefontsizes
-%
-%
-% \begin{command}{\generatefontfile}
-% \changes{v3.09}{2011/02/23}{added}
-% \changes{v3.17}{2015/03/26}{\cs{par@updaterelative} added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% The main command of the generator:
-% \begin{quote}
-% \cs{generatefontfile}\marg{base name}\oarg{baseline skip}\marg{font size}
-% \end{quote}
-% It writes a font size file ``\meta{base name}\meta{font
-% size}.clo''. \meta{base name} ``\texttt{scrbase}'' is protected and results
-% in an error message.
-% \begin{macrocode}
-%<*generator&body>
-\newcommand*{\generatefontfile}[1]{%
- \Ifstr{#1}{scrsize}{%
- \ClassError{\KOMAClassName}{%
- Font file name `scrsize' not allowed%
- }{%
- Font files with name `scrsize<fontsize>.clo' are reserved for
- KOMA-Script.\MessageBreak
- You should use another prefix and rename \string\@fontsizefilebase\space
- either before\MessageBreak
- loading a KOMA-Script class using one of \string\documentclass,
- \string\LoadClass,\MessageBreak
- or \string\LoadClassWithOptions\space or before loading package
- `scrextend' using another\MessageBreak
- class.}%
- \@@@generatefontfile
- }{%
-% \end{macrocode}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
-% Test for optional argument and use proper helper.
-% \begin{macrocode}
- \kernel@ifnextchar [{\@generatefontfile{#1}}{\@@generatefontfile{#1}}%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\@generatefontfile,\@@generatefontfile}
-% \changes{v3.09}{2011/02/23}{added}
-% The helper macros are needed, because we are not using \pkg{xparse} currently.
-% \begin{macrocode}
-\newcommand*{\@generatefontfile}{}
-\def\@generatefontfile#1[#2]#3{%
- \begingroup
- \@ifundefined{setparsizes}{\setlength{\parskip}{0pt}}%
- {\setparsizes{0pt}{0pt}{0pt}}%
- \changefontsizes[{#2}]{#3}%
- \generate@fontfile{#1}{#3}%
- \endgroup
-}
-\newcommand\@@generatefontfile[2]{%
- \begingroup
- \@ifundefined{setparsizes}{\setlength{\parskip}{0pt}}%
- {\setparsizes{0pt}{0pt}{0pt}}%
- \changefontsizes{#2}%
- \generate@fontfile{#1}{#2}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}^^A \@generatefontfile,\@@generatefontfile
-% \begin{macro}{\@@@generatefontfile}
-% \changes{v3.09}{2011/02/23}{added}
-% Dummy used in error case to eat an optional and a mandatory argument.
-% \begin{macrocode}
-\newcommand*{\@@@generatefontfile}[2][]{}
-% \end{macrocode}
-% \end{macro}^^A \@@@generatefontfile
-% \begin{macro}{\@fontfile}
-% \changes{v3.09}{2011/02/23}{added}
-% Because \cs{generatefontfile} is allowed in the document preamble only, when
-% the main aux file is not yet opened, we can use \cs{@mainaux} as temporary
-% file handle.
-% \begin{macrocode}
-\newcommand*{\@fontfile}{}
-\let\@fontfile\@mainaux
-% \end{macrocode}
-% \begin{macro}{\generate@fontfile}
-% \changes{v3.09}{2011/02/23}{added}
-% \changes{v3.16a}{2015/02/11}{\cs{footnotesize} fixed}
-% Output of the font size file using the current font setting. It has to be
-% used inside a local group!
-% \begin{macrocode}
-\newcommand*{\generate@fontfile}[2]{%
- \def\@ind{\space\space}%
- \immediate\openout\@fontfile #1#2.clo
- \immediate\write\@fontfile{\@percentchar^^J%
- \@percentchar\space This is file `#1#2.clo', generated with^^J%
- \@percentchar\space scrfontsizes
- \csname ver@scrfontsizes.\scr@pkgextension\endcsname,^^J%
- \@percentchar\space Copyright (c) Markus Kohm.^^J%
- \@percentchar^^J%
- \string\ProvidesFile{#1#2.clo}[%
- \the\year/\ifnum\month<10 0\fi\the\month/\ifnum\day<10 0\fi\the\day%
- \space generated font size class option (#2)]}%
- \immediate\write\@fontfile{%
- \string\def\string\normalsize{\@percentchar^^J%
- \@ind\string\@setfontsize\string\normalsize{\f@size}{\f@baselineskip}%
- \@percentchar^^J%
- \@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J%
- \@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J%
- \@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J%
- \@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J%
- \@ind\string\let\string\@listi\string\@listI^^J%
- }\@percentchar%
- }%
- \begingroup\small\@listi
- \immediate\write\@fontfile{%
- \string\def\string\small{\@percentchar^^J%
- \@ind\string\@setfontsize\string\small{\f@size}{\f@baselineskip}%
- \@percentchar^^J%
- \@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J%
- \@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J%
- \@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J%
- \@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J%
- \@ind\string\def\string\@listi{\@percentchar^^J%
- \@ind\@ind\string\leftmargin\string\leftmargini^^J%
- \@ind\@ind\string\topsep \the\topsep^^J%
- \@ind\@ind\string\parsep \the\parsep^^J%
- \@ind\@ind\string\itemsep \string\parsep^^J%
- \@ind}\@percentchar^^J%
- }\@percentchar%
- }%
- \endgroup
- \begingroup\footnotesize\@listi
- \immediate\write\@fontfile{%
- \string\def\string\footnotesize{\@percentchar^^J%
- \@ind\string\@setfontsize\string\footnotesize{\f@size}{\f@baselineskip}%
- \@percentchar^^J%
- \@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J%
- \@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J%
- \@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J%
- \@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J%
- \@ind\string\def\string\@listi{\@percentchar^^J%
- \@ind\@ind\string\leftmargin\string\leftmargini^^J%
- \@ind\@ind\string\topsep \the\topsep^^J%
- \@ind\@ind\string\parsep \the\parsep^^J%
- \@ind\@ind\string\itemsep \string\parsep^^J%
- \@ind}\@percentchar^^J%
- }\@percentchar%
- }%
- \endgroup
- \begingroup\scriptsize
- \immediate\write\@fontfile{%
- \string\def\string\scriptsize{%
- \string\@setfontsize\string\scriptsize{\f@size}{\f@baselineskip}%
- }\@percentchar%
- }%
- \endgroup
- \begingroup\tiny
- \immediate\write\@fontfile{%
- \string\def\string\tiny{%
- \string\@setfontsize\string\tiny{\f@size}{\f@baselineskip}%
- }\@percentchar%
- }%
- \endgroup
- \begingroup\large
- \immediate\write\@fontfile{%
- \string\def\string\large{%
- \string\@setfontsize\string\large{\f@size}{\f@baselineskip}%
- }\@percentchar%
- }%
- \endgroup
- \begingroup\Large
- \immediate\write\@fontfile{%
- \string\def\string\Large{%
- \string\@setfontsize\string\Large{\f@size}{\f@baselineskip}%
- }\@percentchar%
- }%
- \endgroup
- \begingroup\LARGE
- \immediate\write\@fontfile{%
- \string\def\string\LARGE{%
- \string\@setfontsize\string\LARGE{\f@size}{\f@baselineskip}%
- }\@percentchar%
- }%
- \endgroup
- \begingroup\huge
- \immediate\write\@fontfile{%
- \string\def\string\huge{%
- \string\@setfontsize\string\huge{\f@size}{\f@baselineskip}%
- }\@percentchar%
- }%
- \endgroup
- \begingroup\Huge
- \immediate\write\@fontfile{%
- \string\def\string\Huge{%
- \string\@setfontsize\string\Huge{\f@size}{\f@baselineskip}%
- }\@percentchar%
- }%
- \endgroup
- \immediate\write\@fontfile{\string\normalsize}%
- \immediate\write\@fontfile{%
- \string\setlength{\string\footnotesep}{\the\footnotesep}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\skip\string\footins}{\the\skip\footins}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\floatsep}{\the\floatsep}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\textfloatsep}{\the\textfloatsep}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\intextsep}{\the\intextsep}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\dblfloatsep}{\the\dblfloatsep}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\dbltextfloatsep}{\the\dbltextfloatsep}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\@fptop}{\the\@fptop}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\@fpsep}{\the\@fpsep}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\@fpbot}{\the\@fpbot}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\@dblfptop}{\the\@dblfptop}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\@dblfpsep}{\the\@dblfpsep}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\@dblfpbot}{\the\@dblfpbot}\@percentchar
- }%
- \immediate\write\@fontfile{%
- \string\setlength{\string\partopsep}{\the\partopsep}\@percentchar
- }%
- \begingroup
- \@listi
- \immediate\write\@fontfile{%
- \string\def\string\@listi{\@percentchar^^J%
- \@ind\string\leftmargin\string\leftmargini^^J%
- \@ind\string\topsep \the\topsep^^J%
- \@ind\string\parsep \the\parsep^^J%
- \@ind\string\itemsep \string\parsep^^J%
- }\@percentchar
- }%
- \endgroup
- \immediate\write\@fontfile{%
- \string\let\string\@listI\string\@listi
- }%
- \begingroup
- \@listii
- \immediate\write\@fontfile{%
- \string\def\string\@listii{\@percentchar^^J%
- \@ind\string\leftmargin\string\leftmarginii^^J%
- \@ind\string\labelwidth\string\leftmarginii^^J%
- \@ind\string\advance\string\labelwidth-\string\labelsep^^J%
- \@ind\string\topsep \the\topsep^^J%
- \@ind\string\parsep \the\parsep^^J%
- \@ind\string\itemsep \string\parsep^^J%
- }\@percentchar
- }%
- \endgroup
- \begingroup
- \@listiii
- \immediate\write\@fontfile{%
- \string\def\string\@listiii{\@percentchar^^J%
- \@ind\string\leftmargin\string\leftmarginiii^^J%
- \@ind\string\labelwidth\string\leftmarginiii^^J%
- \@ind\string\advance\string\labelwidth-\string\labelsep^^J%
- \@ind\string\topsep \the\topsep^^J%
- \@ind\string\parsep \the\parsep^^J%
- \@ind\string\partopsep \the\partopsep^^J%
- \@ind\string\itemsep \string\topsep^^J%
- }\@percentchar
- }%
- \endgroup
- \begingroup
- \@listiv
- \immediate\write\@fontfile{%
- \string\def\string\@listiv{\@percentchar^^J%
- \@ind\string\leftmargin\string\leftmarginiv^^J%
- \@ind\string\labelwidth\string\leftmarginiv^^J%
- \@ind\string\advance\string\labelwidth-\string\labelsep^^J%
- }\@percentchar
- }%
- \endgroup
- \begingroup
- \@listv
- \immediate\write\@fontfile{%
- \string\def\string\@listv{\@percentchar^^J%
- \@ind\string\leftmargin\string\leftmarginv^^J%
- \@ind\string\labelwidth\string\leftmarginv^^J%
- \@ind\string\advance\string\labelwidth-\string\labelsep^^J%
- }\@percentchar
- }%
- \endgroup
- \begingroup
- \@listvi
- \immediate\write\@fontfile{%
- \string\def\string\@listvi{\@percentchar^^J%
- \@ind\string\leftmargin\string\leftmarginvi^^J%
- \@ind\string\labelwidth\string\leftmarginvi^^J%
- \@ind\string\advance\string\labelwidth-\string\labelsep^^J%
- }\@percentchar
- }%
- \endgroup
- \immediate\write\@fontfile{%
- \string\@ifundefined{@list@extra}{}{\@percentchar^^J%
- \string\expandafter\string\ifnum\string\scr@v@is@ge{3.17}%
- \string\par@updaterelative\string\fi^^J%
- \@ind\string\l@addto@macro{\string\@listi}{\string\@list@extra}%
- \@percentchar^^J%
- \@ind\string\let\string\@listI=\string\@listi^^J%
- \@ind\string\l@addto@macro{\string\@listii}{\string\@list@extra}%
- \@percentchar^^J%
- \@ind\string\l@addto@macro{\string\@listiii}{\string\@list@extra}%
- \@percentchar^^J%
- \@ind\string\l@addto@macro{\string\footnotesize}{\string\protect
- \string\add@extra@listi{ftns}}\@percentchar^^J%
- \@ind\string\l@addto@macro{\string\small}{\string\protect
- \string\add@extra@listi{sml}}\@percentchar^^J%
- }\@percentchar^^J%
- \string\@listi^^J%
- \string\endinput^^J%
- \@percentchar^^J%
- \@percentchar\space End of file `#1#2.clo'.
- }
- \immediate\closeout\@fontfile
-}
-\@onlypreamble\generatefontfile
-%</generator&body>
-% \end{macrocode}
-% \end{macro}^^A \generate@fontfile
-% \end{macro}^^A \@fontfile
-% \end{command}^^A \generatefontfile
-%
-% Now, we want to initially load the font size file into the class. First we
-% have to convert the \cs{@ptsize} to a length. Note, \cs{@ptsize} can already
-% have a unit or the unit is \texttt{pt}. The original value is stored in
-% \cs{@tempa} to be able to use a font size files with the original
-% unit. \cs{@tempb} is the size in \texttt{pt} without the \texttt{pt} to be
-% able to use a standard font size file. After this, \cs{@ptsize} is reduced
-% by 10\,pt and the unit is cut off.
-% \begin{macrocode}
-%<*class&body>
-\expandafter\@defaultunits\expandafter\@tempdima\@ptsize pt\relax\@nnil
-\edef\@tempa{\@ptsize}%
-\setlength{\@tempdimb}{\@tempdima}%
-\edef\@tempb{\strip@pt\@tempdimb}%
-\addtolength{\@tempdimb}{-10\p@}%
-\edef\@ptsize{\strip@pt\@tempdimb}%
-% \end{macrocode}
-% Now, let's try to input a file
-% ``\file{\cs{fontsizefilebase}\cs{@tempa}.clo}''. This is a file with the
-% original unit.
-% \begin{macrocode}
-\InputIfFileExists{\@fontsizefilebase\@tempa.clo}{%
- \ClassInfo{\KOMAClassName}{%
- File `\@fontsizefilebase\@tempa.clo' used to setup font sizes}%
- \KOMA@kav@removekey{.\KOMAClassFileName}{fontsize}%
- \KOMA@kav@xadd{.\KOMAClassFileName}{fontsize}{\@tempa}%
-}{%
-% \end{macrocode}
-% If this is not successful, try
-% ``\file{\cs{fontsizefilebase}\cs{@tempb}pt.clo}''.
-% \begin{macrocode}
- \InputIfFileExists{\@fontsizefilebase\@tempb pt.clo}{%
- \ClassInfo{\KOMAClassName}{%
- File `\@fontsizefilebase\@tempb pt.clo' used instead of\MessageBreak
- file `\@fontsizefilebase\@tempa.clo' to setup font sizes}%
- \KOMA@kav@removekey{.\KOMAClassFileName}{fontsize}%
- \KOMA@kav@xadd{.\KOMAClassFileName}{fontsize}{\@tempb pt}%
- }{%
-% \end{macrocode}
-% If this is still not successful try a font size file of the standard
-% classes.
-% \begin{macrocode}
-%<*book>
- \InputIfFileExists{bk\@tempb.clo}{%
- \ClassInfo{\KOMAClassName}{%
- File `bk\@tempb.clo' used to setup font sizes}%
- \KOMA@kav@removekey{.\KOMAClassFileName}{fontsize}%
- \KOMA@kav@xadd{.\KOMAClassFileName}{fontsize}{\@tempb}%
- }{%
-%</book>
- \InputIfFileExists{size\@tempb.clo}{%
- \ClassInfo{\KOMAClassName}{%
- File `size\@tempb.clo' used to setup font sizes}%
- \KOMA@kav@removekey{.\KOMAClassFileName}{fontsize}%
- \KOMA@kav@xadd{.\KOMAClassFileName}{fontsize}{\@tempb}%
- }{%
-% \end{macrocode}
-% If this is still not successful, use the fallback calculation.
-% \begin{macrocode}
- \edef\@tempa{%
- \noexpand\changefontsizes{\@tempa}%
- \noexpand\KOMA@kav@xadd{.\KOMAClassFileName}{fontsize}{\@tempa}%
- }\@tempa
- }%
-%<book> }%
- }%
-}
-%</class&body>
-% \end{macrocode}
-%
-%
-% \subsection{Deprecated old font selection commands}
-%
-% \begin{option}{enabledeprecatedfontcommands}
-% \changes{v3.20}{2015/10/14}{added}
-% \changes{v3.20}{2015/10/14}{deprecated}
-% This option is deprecated by specification already when it has been defined
-% first, because it is used to define deprecated old font selection commands,
-% that should not be used any longer. So the usage of this options always
-% results in a warning. It can be used at load time only.
-% \begin{macro}{\scr@defineobsoletefonts}
-% \changes{v3.20}{2015/10/14}{added}
-% \changes{v3.20}{2015/10/14}{deprecated}
-% Depending on this command
-% \begin{itemize}
-% \item[0] an internal error message,
-% \item[1] a warning,
-% \item[2] an info message,
-% \item[3] no message
-% \end{itemize}
-% is added to the usage of any deprecated font command. Values less than 0
-% result in not defining the commands anyhow.
-% \begin{macrocode}
-%<*class&option>
-\DeclareOption{enabledeprecatedfontcommands}{%
- \ClassWarningNoLine{\KOMAClassName}{%
- deprecated option `enabledeprecatedfontcommands'.\MessageBreak
- Note, that this option was already depreacted when\MessageBreak
- it has been defined. Support for old font commands\MessageBreak
- has been removed from KOMA-Script more than one\MessageBreak
- decade ago. It is not recommended to use them any\MessageBreak
- longer. Therefore usage of this class option also\MessageBreak
- is not recommended%
- }%
- \let\scr@defineobsoletefonts\@ne
-}
-\scr@ifundefinedorrelax{scr@defineobsoletefonts}{%
- \let\scr@defineobsoletefonts\z@
-}{}
-\BeforePackage{tex4ht}{%
- \let\scr@defineobsoletefonts\thr@@
-}
-%</class&option>
-% \end{macrocode}
-% \end{macro}^^A \scr@degineobsoletefonts
-% \end{option}^^A enabledeprecatedfontscommands
-%
-% \begin{macro}{\scr@DeclareOldFontCommand}
-% \changes{v3.12}{2013/10/31}{added}
-% \changes{v3.20}{2015/10/14}{deprecated escalation}
-% The command is similar to \cs{DeclareOldFontCommand} but adds a warning,
-% info, error to the commands.
-% \begin{macrocode}
-%<*class&body>
-\newcommand*{\scr@DeclareOldFontCommand}[3]{%
- \ifnum\scr@defineobsoletefonts<\z@\else
- \ifnum\scr@defineobsoletefonts>\tw@
- \DeclareOldFontCommand{#1}{#2}{#3}%
- \else
- \DeclareOldFontCommand{#1}{%
- \scr@ErrorWarningInfo{#1}{#2}#2%
- }{%
- \scr@ErrorWarningInfo{#1}{#3}#3%
- }%
- \fi
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ErrorWarningInfo}
-% \changes{v3.20}{2015/10/14}{added}
-% \changes{v3.22}{2016/09/28}{message fixed}
-% \begin{macrocode}
-\DeclareRobustCommand*{\scr@ErrorWarningInfo}[2]{%
-% \end{macrocode}
-% \cs{scr@defineobsoletefonts} = 0 means an error message:
-% \begin{macrocode}
- \ifnum \scr@defineobsoletefonts=\z@
- \ClassError{\KOMAClassName}{undefined old font command `\string#1'}{%
- You should note that since 1994 LaTeX2e provides a new font selection
- scheme\MessageBreak
- called NFSS2 with several new, combinable font commands.
- KOMA-Script\MessageBreak
- classes had defined the old font commands like `\string#1'
- only for compatibility\MessageBreak
- with old LaTeX 2.09 document styles of Script 2.0. Nevertheless,
- these\MessageBreak
- commands are deprecated and undocumented at least since 2003. Since
- 2013\MessageBreak
- KOMA-Script classes warned about soon removement of these deprecated
- commands.\MessageBreak
- Now, after two decades of LaTeX2e and NFSS2, these commands will not
- work any\MessageBreak
- more. If loading a package results in this error message, you should
- contact\MessageBreak
- the author of that package and ask him to replace the deprecated font
- command\MessageBreak
- `\string#1', e.g., by `\detokenize{#2}`. Otherwise you should
- reconfigure\MessageBreak
- or replace the package. If you have used the old font command
- `\string#1' yourself,\MessageBreak
- you should replace it, e.g., by `\detokenize{#2}'.\MessageBreak
- To make it work for now, you can use the already also deprecated class
- option\MessageBreak
- `enabledeprecatedfontcommands'.%
- }%
- \else
- \ifcase \scr@defineobsoletefonts
-% \end{macrocode}
-% \cs{scr@defineobsoletefonts} = 0 means a warning:
-% \begin{macrocode}
- \or
- \expandafter\ClassWarning
-% \end{macrocode}
-% \cs{scr@defineobsoletefonts} = 0 means an info message:
-% \begin{macrocode}
- \or
- \expandafter\ClassInfo
-% \end{macrocode}
-% All other values mean no message:
-% \begin{macrocode}
- \else
- \expandafter\@gobbletwo
- \fi
- {\KOMAClassName}{deprecated old font command `\string#1' used.\MessageBreak
- You should note, that since 1994 LaTeX2e provides a\MessageBreak
- new font selection scheme called NFSS2 with several\MessageBreak
- new, combinable font commands. New KOMA-Script classes\MessageBreak
- defined the old font commands like `\string#1' only for\MessageBreak
- compatibility with LaTeX 2.09 document styles of\MessageBreak
- Script 2.0. These commands are deprecated and\MessageBreak
- undocumented at least since 2003. Since 2013,\MessageBreak
- KOMA-Script classes warned about soon removement of\MessageBreak
- these deprecated commands. Now, after two decades of\MessageBreak
- LaTeX2e, NFSS2, and KOMA-Script these commands will\MessageBreak
- not work any longer. If loading a package results in\MessageBreak
- this message you should contact the author of that\MessageBreak
- package and ask him to replace the depracted font\MessageBreak
- command `\string#1', e.g., by `\detokenize{#2}'.\MessageBreak
- Otherwise you should reconfigure or replace the\MessageBreak
- package. If you have used the old font command\MessageBreak
- `\string #1' yourself you should replace it, e.g., by\MessageBreak
- `\detokenize{#2}'%
- }%
- \fi
-}
-%</class&body>
-% \end{macrocode}
-% \end{macro}^^A \scr@OldFontErrorWarningInfo
-% \end{macro}^^A \scr@DeclareOldFontCommand
-%
-% \begin{command}{\rm,\sf,\tt,\bf,\it,\sl,\sc}
-% \changes{v3.12}{2013/10/13}{deprecated}
-% \begin{command}{\sfb}
-% \changes{v2.2c}{1995/05/25}{not in math mode}
-% \changes{v2.3a}{1995/07/08}{independent from compatibility mode}
-% \changes{v3.12}{2013/10/13}{deprecated}
-% The old font selection commands from \LaTeX~2.09. They are not supported any
-% more. The same for the \pkg*{Script 2.0} command \cs{sfb}.
-% \begin{macrocode}
-%<*class&body>
-\scr@DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
-\scr@DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
-\scr@DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
-\scr@DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
-\scr@DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
-\scr@DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
-\scr@DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
-\scr@DeclareOldFontCommand{\sfb}{\normalfont\sffamily\bfseries}{%
- \@nomath\sfb}
-%</class&body>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-% \begin{command}{\cal,\mit}
-% \changes{v2.3}{1995/06/25}{here instead in the \LaTeX{} kernel}
-% \changes{v2.3g}{1996/01/14}{not needed braces removed}
-% \begin{macrocode}
-%<*class&body>
-\DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
-\DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
-%</class&body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{Font elements}
-%
-%
-% \begin{command}{\IfExistskomafont}
-% \changes{v3.15}{2014/11/21}{added}
-% Command
-% \begin{quote}
-% \cs{IfExistskomafont}\marg{font element}\marg{then code}\marg{else code}
-% \end{quote}
-% executes \meta{then code} if the font element \meta{font element} exists
-% either as a real font element or an alias. Otherwise \meta{else code} is used.
-% \begin{macrocode}
-%<*scrkbase&body>
-\newcommand*{\IfExistskomafont}[1]{%
- \scr@ifundefinedorrelax{scr@fnt@#1}{%
- \scr@ifundefinedorrelax{scr@fnt@instead@#1}{\@secondoftwo}{\@firstoftwo}%
- }{%
- \@firstoftwo
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \IfExistskomafont
-%
-% \begin{command}{\IfIsAliaskomafont}
-% \changes{v3.25}{2017/12/08}{added}
-% Command
-% \begin{quote}
-% \cs{IfIsAliaskomafont}\marg{font element}\marg{then code}\marg{else code}
-% \end{quote}
-% executes \meta{then code} if the font element \meta{font element} is an alias.
-% Otherwise \meta{else code} is used.
-% \begin{macrocode}
-\newcommand*{\IfIsAliaskomafont}[1]{%
- \scr@ifundefinedorrelax{scr@fnt@#1}{%
- \scr@ifundefinedorrelax{scr@fnt@instead@#1}{\@secondoftwo}{\@firstoftwo}%
- }{%
- \@secondoftwo
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \IfIsAliaskomafont
-%
-% \begin{command}{\setkomafont}
-% \changes{v2.8o}{2001/09/14}{added}
-% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}}
-% Command
-% \begin{quote}
-% \cs{setkomafont}\marg{element}\marg{font settings}
-% \end{quote}
-% sets the \meta{font settings} of font element \meta{element}. Setting of an
-% unknown font element results in an error. Setting of an alias font element
-% results in an info an the setting of the real element. Note: \meta{font
-% settings} should be only font selection commands.
-% \begin{macrocode}
-\newcommand*{\setkomafont}[2]{%
- \@ifundefined{scr@fnt@#1}{%
- \@ifundefined{scr@fnt@instead@#1}{%
- \PackageError{scrkbase}{%
- font of element `#1' can't be set}{%
- You've told me to redefine the font selection of the
- element,\MessageBreak%
- but either no such element is known by
- KOMA-Script\MessageBreak%
- or the element does not use a special font selection%
- }%
- }{%
- \PackageInfo{scrkbase}{%
- You've told me to redefine the font selection of the\MessageBreak
- element `#1' that is an alias of element\MessageBreak
- `\csname scr@fnt@instead@#1\endcsname'%
- }%
- \expandafter\setkomafont\expandafter{%
- \csname scr@fnt@instead@#1\endcsname}{#2}%
- }%
- }{%
- \expandafter\expandafter\expandafter\def\csname scr@fnt@#1\endcsname{#2}%
- }%
- \@ifundefined{scr@fnt@wrn@#1}{}{%
- \PackageWarning{scrkbase}{%
- \csname scr@fnt@wrn@#1\endcsname{#1}%
- }%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \setkomafont
-%
-% \begin{command}{\addtokomafont}
-% \changes{v2.8p}{2001/09/22}{added}
-% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}}
-% Command
-% \begin{quote}
-% \cs{addtokomafont}\marg{element}\marg{font settings}
-% \end{quote}
-% adds the \meta{font settings} to the settings of font element
-% \meta{element}. Setting of an unknown font element results in an
-% error. Setting of an alias font element results in an info an the setting of
-% the real element.
-% \begin{macrocode}
-\newcommand*{\addtokomafont}[2]{%
- \@ifundefined{scr@fnt@#1}{%
- \@ifundefined{scr@fnt@instead@#1}{%
- \PackageError{scrkbase}{%
- font of element `#1' can't be extended%
- }{%
- You've told me to extend the font selection of the
- element,\MessageBreak
- but either no such element is known by
- KOMA-Script\MessageBreak
- or the element does not use a special font selection%
- }%
- }{%
- \PackageInfo{scrkbase}{%
- You've told me to extend the font selection of the\MessageBreak
- element `#1' that is an alias of element\MessageBreak
- `\csname scr@fnt@instead@#1\endcsname'%
- }%
- \expandafter\addtokomafont\expandafter{%
- \csname scr@fnt@instead@#1\endcsname}{#2}%
- }%
- }{%
- \expandafter\expandafter\expandafter\l@addto@macro
- \csname scr@fnt@#1\endcsname{#2}%
- }%
- \@ifundefined{scr@fnt@wrn@#1}{}{%
- \PackageWarning{scrkbase}{%
- \csname scr@fnt@wrn@#1\endcsname{#1}%
- }%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \addtokomafont
-%
-% \begin{command}{\usekomafont}
-% \changes{v2.8p}{2001/09/28}{added}
-% \changes{v2.96}{2006/08/18}{alias usage fixed}
-% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}}
-% Command
-% \begin{quote}
-% \cs{usekomafont}\marg{element}
-% \end{quote}
-% activates the font settings of the font \meta{element}.
-% \begin{macrocode}
-\newcommand*{\usekomafont}[1]{%
- \@ifundefined{scr@fnt@#1}{%
- \@ifundefined{scr@fnt@instead@#1}{%
- \PackageError{scrkbase}{%
- font of element `#1' can't be used%
- }{%
- You've told me to use the font selection of the
- element,\MessageBreak
- but either no such element is known by
- KOMA-Script\MessageBreak
- or the element does not use a special font selection%
- }%
- }{%
- \PackageInfo{scrkbase}{%
- You've told me to use the font selection of the
- element\MessageBreak
- `#1' that is an alias of element `\csname
- scr@fnt@instead@#1\endcsname'\MessageBreak
- }%
- \expandafter\expandafter\expandafter\usekomafont
- \expandafter\expandafter\expandafter{%
- \csname scr@fnt@instead@#1\endcsname}%
- }%
- }{%
- \@nameuse{scr@fnt@#1}%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \usekomafont
-%
-%
-% \begin{command}{\usesizeofkomafont}
-% \changes{v3.12}{2013/03/30}{new}
-% \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.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.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.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.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}
-% Sometimes not the whole font but only single elements of a font is
-% wanted.
-% \begin{macrocode}
-\newcommand*{\usesizeofkomafont}[1]{%
- \begingroup
- \scr@prepareforkomafont
- \sbox\@tempboxa{%
- \usekomafont{#1}{%
- \selectfont
- \global\let\g@scr@f@size\f@size
- \global\let\g@scr@f@baselineskip\f@baselineskip
- \global\let\g@scr@f@linespread\f@linespread
- }%
- }%
- \endgroup
- \linespread{\g@scr@f@linespread}%
- \fontsize{\g@scr@f@size}{\g@scr@f@baselineskip}%
- \selectfont
-}
-\newcommand*{\usefamilyofkomafont}{\use@ofkomafont{family}}
-\newcommand*{\useseriesofkomafont}{\use@ofkomafont{series}}
-\newcommand*{\useshapeofkomafont}{\use@ofkomafont{shape}}
-\newcommand*{\useencodingofkomafont}{\use@ofkomafont{encoding}}
-\newcommand*{\usefontofkomafont}[1]{%
- \begingroup
- \scr@prepareforkomafont
- \sbox\@tempboxa{%
- \usekomafont{#1}{%
- \selectfont
- \global\let\g@scr@f@encoding\f@encoding
- \global\let\g@scr@f@family\f@family
- \global\let\g@scr@f@series\f@series
- \global\let\g@scr@f@shape\f@shape
- \global\let\g@scr@f@size\f@size
- \global\let\g@scr@f@baselineskip\f@baselineskip
- \global\let\g@scr@f@linespread\f@linespread
- }%
- }%
- \endgroup
- \linespread{\g@scr@f@linespread}%
- \fontsize{\g@scr@f@size}{\g@scr@f@baselineskip}%
- \usefont{\g@scr@f@encoding}{\g@scr@f@family}{\g@scr@f@series}{\g@scr@f@shape}%
-}%
-% \end{macrocode}
-% \begin{macro}{\use@ofkomafont}
-% \changes{v3.12}{2013/03/30}{new (internal)}
-% \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}
-% Helper macro for all commands above despite the first and the last one.
-% \begin{macrocode}
-\newcommand*{\use@ofkomafont}[2]{%
- \begingroup
- \scr@prepareforkomafont
- \sbox\@tempboxa{%
- \usekomafont{#2}{%
- \selectfont
- \global\expandafter\let\csname g@scr@f@#1\expandafter\endcsname
- \csname f@#1\endcsname
- }%
- }%
- \endgroup
- \@nameuse{font#1}{\csname g@scr@f@#1\endcsname}%
- \selectfont
-}
-% \end{macrocode}
-% \begin{macro}{\g@scr@usefont}
-% \changes{v3.17}{2015/04/03}{added}
-% \changes{v3.24}{2017/05/06}{removed}
-% \end{macro}^^A \g@scr@usefont
-% \begin{macro}{\g@scr@f@encoding,\g@scr@f@family,\g@scr@f@series,\g@scr@f@shape,
-% \g@scr@f@size,\g@scr@f@baselineskip,\g@scr@f@linespread}
-% \changes{v3.24}{2017/05/06}{added}
-% \begin{macrocode}
-\newcommand*{\g@scr@f@encoding}{}\let\g@scr@f@encoding\f@encoding
-\newcommand*{\g@scr@f@family}{}\let\g@scr@f@family\f@family
-\newcommand*{\g@scr@f@series}{}\let\g@scr@f@series\f@series
-\newcommand*{\g@scr@f@shape}{}\let\g@scr@f@shape\f@shape
-\newcommand*{\g@scr@f@size}{}\let\g@scr@f@size\f@size
-\newcommand*{\g@scr@f@baselineskip}{}\let\g@scr@f@baselineskip\f@baselineskip
-\newcommand*{\g@scr@f@linespread}{}\let\g@scr@f@linespread\f@linespread
-% \end{macrocode}
-% \end{macro}^^A \g@scr@f@encoding … \g@scr@f@linespread
-% \begin{macro}{\scr@komafontrelaxlist}
-% \changes{v3.17}{2015/04/03}{added}
-% \changes{v3.24}{2017/05/05}{\cs{uppercase} and \cs{lowercase} removed}
-% \changes{v3.24}{2017/05/05}{\cs{MakeUppercase} and \cs{MakeLowercase} moved to
-% \cs{scr@komafontonearglist}}
-% A \cs{do} list of all macros, that should become \cs{relax} in the previous
-% commands.
-% \begin{macrocode}
-\newcommand*{\scr@komafontrelaxlist}{%
- \do\normalcolor
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@komafontrelaxlist
-% \begin{macro}{\scr@komafontgobblelist}
-% \changes{v3.19}{2015/08/20}{added}
-% Like \cs{scr@komafontrelaxlist} but with \cs{@gobble} instead of \cs{relax}.
-% \begin{macrocode}
-\newcommand*{\scr@komafontgobblelist}{%
- \do\color
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@komafontgobblelist
-% \begin{macro}{\scr@komafontonearglist}
-% \changes{v3.24}{2017/05/05}{added}
-% Like \cs{scr@komafontgobblelist} but with \cs{@firstofone} instead of
-% \cs{@gobble}.
-% \begin{macrocode}
-\newcommand*{\scr@komafontonearglist}{%
- \do\MakeUppercase \do\MakeLowercase
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@komafontonearglist
-% \begin{macro}{\scr@prepareforkomafont}
-% \changes{v3.17}{2015/04/03}{added}
-% \changes{v3.19}{2015/08/20}{using \cs{scr@komafontgobblelist}}
-% \changes{v3.24}{2017/05/05}{using \cs{scr@komafontonearglist}}
-% Process all the \cs{do} lists. Note: Should be encapsulated into a local group.
-% \begin{macrocode}
-\newcommand*{\scr@prepareforkomafont}{%
- \long\def\do##1{\let##1\relax}\scr@komafontrelaxlist
- \long\def\do##1{\let##1\@gobble}\scr@komafontgobblelist
- \long\def\do##1{\let##1\@firstofone}\scr@komafontonearglist
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@prepareforkomafont
-% \begin{command}{\addtokomafontrelaxlist}
-% \changes{v3.17}{2015/04/03}{added}
-% Adds exactly one macro/command to \cs{scr@komafontrelaxlist}.
-% \begin{macrocode}
-\newcommand*{\addtokomafontrelaxlist}[1]{%
- \l@addto@macro\scr@komafontrelaxlist{\do#1}%
-}
-% \end{macrocode}
-% \end{command}^^A \addtokomafontrelaxlist
-% \begin{command}{\addtokomafontgobblelist}
-% \changes{v3.19}{2015/08/20}{added}
-% Adds exactly one macro/command to \cs{scr@komafontgobblelist}.
-% \begin{macrocode}
-\newcommand*{\addtokomafontgobblelist}[1]{%
- \l@addto@macro\scr@komafontgobblelist{\do#1}%
-}
-% \end{macrocode}
-% \end{command}^^A \addtokomafontgobblelist
-% \begin{command}{\addtokomafontonearglist}
-% \changes{v3.24}{2017/05/05}{added}
-% Adds exactly one macro/command to \cs{scr@komafontonearglist}.
-% \begin{macrocode}
-\newcommand*{\addtokomafontonearglist}[1]{%
- \l@addto@macro\scr@komafontonearglist{\do#1}%
-}
-% \end{macrocode}
-% \end{command}^^A \addtokonafontonearglist
-% \end{macro}^^A \use@ofkomafont
-% \end{command}^^A \usefontofkomafont
-% \end{command}^^A \useencodingofkomafont
-% \end{command}^^A \useshapeofkomafont
-% \end{command}^^A \usefamilyofkomafont,\useseriesofkomafont
-% \end{command}^^A \usesizeofkomafont
-%
-%
-% \begin{command}{\newkomafont}
-% \changes{v2.95}{2004/07/21}{added}
-% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}}
-% \changes{v3.11c}{2013/02/18}{the warning needs an argument}
-% \changes{v3.25}{2017/12/08}{warn if already exists as an alias}
-% Command
-% \begin{quote}
-% \cs{newkomafont}\oarg{warning}\marg{element}\marg{font settings}
-% \end{quote}
-% defines a new font \meta{element} with the given \meta{font settings} as
-% default. The optional \meta{warning} is shown whenever the font setting of
-% the element is changed, but not when the element is used. Internally a macro
-% \cs{@\meta{element}font} is defined with the \meta{font settings}. An
-% additional macro \cs{scr@fnt@\meta{element}} is defined to just execute
-% \cs{@meta{element}font}. But you also can define \cs{scr@fnt@\meta{element}}
-% to use another internal font storage macro. So several elements can share
-% the same font settings.
-% \begin{macrocode}
-\newcommand*{\newkomafont}[3][\relax]{%
- \scr@ifundefinedorrelax{scr@fnt@instead@#2}{}{%
- \PackageWarning{scrkbase}{%
- Making stand-alone element `#2' from\MessageBreak
- alias to `\@nameuse{scr@fnt@instead@#2}'
- }%
- \expandafter\let\csname scr@fnt@instead@#2\endcsname\relax
- }%
- \expandafter\newcommand\expandafter*\csname @#2font\endcsname{#3}%
- \expandafter\expandafter\expandafter\newcommand
- \expandafter\expandafter\expandafter*%
- \expandafter\csname scr@fnt@#2\expandafter\endcsname\expandafter{%
- \csname @#2font\endcsname%
- }%
- \ifx\relax#1\relax\else
- \expandafter\newcommand\expandafter*\csname scr@fnt@wrn@#2\endcsname[1]{#1}%
- \fi
-}
-% \end{macrocode}
-% \begin{command}{\aliaskomafont}
-% \changes{v2.95}{2004/07/21}{added}
-% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}}
-% \changes{v3.25}{2017/12/08}{warning if element is already defined}
-% Another possibility to share fonts is to define an
-% alias by defining \cs{scr@fnt@instead@\meta{element}} with the name of
-% another element. This can be done using
-% \begin{quote}
-% \cs{aliaskomafont}\marg{alias}\marg{element}
-% \end{quote}
-% It defines \marg{alias} to be an alias of \meta{element}.
-% \begin{macrocode}
-\newcommand*{\aliaskomafont}[2]{%
- \scr@ifundefinedorrelax{scr@fnt@#1}{}{%
- \PackageWarning{scrkbase}{%
- Redefining stand alone element `#1' as\MessageBreak
- alias to `#2'%
- }
- \expandafter\let\csname scr@fnt@#1\endcsname\relax
- }%
- \scr@ifundefinedorrelax{scr@fnt@wrn@#1}{}{%
- \expandafter\let\csname scr@fnt@wrn@#1\encsname\relax
- }
- \expandafter\newcommand\expandafter*\csname scr@fnt@instead@#1\endcsname{%
- #2%
- }%
-}
-%</scrkbase&body>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-footnotes.dtx b/macros/latex/contrib/koma-script/source/scrkernel-footnotes.dtx
deleted file mode 100644
index 4866277af2..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-footnotes.dtx
+++ /dev/null
@@ -1,635 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-footnotes.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-footnotes.dtx 3711 2022-02-16 09:57:02Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-16 10:57:02 +0100 (Mi, 16. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3711 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-footnotes.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (footnotes)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-footnotes.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v2.95}{2002/07/01}{new by splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/16}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/16}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-footnotes.dtx}
-% \title{Index Code of the
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% The code for footnotes with \KOMAScript{} classes in
-% \file{scrkernel-footnotes.dtx} is somehow different from the code of the
-% standard classes. It provides several options and other configuration
-% possibilities. The initial change bases on a comment in the documented
-% \LaTeX{} kernel, \file{source2e.pdf}. But this was long ago and almost
-% everything has been changed meanwhile.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of Footnotes}
-%
-% \subsection{Options}
-%
-% \begin{option}{footnotes}
-% \changes{v2.98c}{2008/02/01}{new value \opt{multiple}}
-% \changes{v3.10}{2011/09/13}{\cs{let} replaced by \cs{def} fixes the using as
-% a class option}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
-% \changes{v3.17}{2015/03/11}{internal value storage}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Multiple footnotes mean, that there are more than one footnote at the same
-% place in the text. Usually this would result in a sequence of numbers (or
-% other footnote signes) not seperated anyhow. So you would not be able, e.g.,
-% if 12 means footnote number 1 and footnote number 2 or footnote number 12. A
-% better solution is to add automatic separation characters between such
-% footnote marks. The functionality has been made similar and compatible with
-% \pkg{footmisc} version 5.x. So it should be compatible with that
-% package. Even switching on and off should also work in case of using the
-% package.
-% \begin{macrocode}
-%<*option>
-\KOMA@key{footnotes}{%
- \ifx\@footnotemark\scr@saved@footnotemark
- \else
- \ifx\@footnotemark\scr@footnotemark
- \else
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrextend}{%
- Change of `\string\@footnotemark' detected!\MessageBreak
- Use of `footnotes=#1' may break\MessageBreak
- another package!\MessageBreak
- Maybe you should remove the usage of\MessageBreak
- option `footnotes=#1'}%
- \fi
- \fi
- \Ifstr{#1}{multiple}{%
- \let\@footnotemark\scr@footnotemark
- \def\FN@mf@prepare{\scr@mf@prepare}%
- \def\scr@footmisc@options{multiple}%
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{footnotes}{multiple}%
- }{%
- \Ifstr{#1}{nomultiple}{%
- \let\@footnotemark\scr@saved@footnotemark
- \let\FN@mf@prepare\relax
- \let\scr@footmisc@options\@empty
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{footnotes}{nomultiple}%
- }{%
- \KOMA@unknown@keyval{footnotes}{#1}{`multiple' and `nomultiple'}%
- }%
- }%
-}
-\AtBeginDocument{%
- \ifx\@footnotemark\scr@saved@footnotemark
- \KOMA@kav@removekey{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{footnotes}%
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{footnotes}{nomultiple}%
- \else\ifx\@footnotemark\scr@footnotemark
- \KOMA@kav@removekey{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{footnotes}%
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{footnotes}{multiple}%
- \fi\fi
-}
-% \end{macrocode}
-% \begin{macro}{\scr@footmisc@options}
-% \changes{v2.98c}{2008/02/14}{added}
-% For better compatibility \opt{footnotes=multiple} will be passed as
-% \opt{multiple} to package \pkg{footmisc} using a \KOMAScript-internal macro.
-% \begin{macrocode}
-\newcommand*{\scr@footmisc@options}{}
-\PassOptionsToPackage{\noexpand\scr@footmisc@options}{footmisc}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\scr@saved@footnotemark,\scr@footnotemark}
-% \changes{v2.98c}{2008/02/01}{added}
-% \begin{macrocode}
-\newcommand*{\scr@saved@footnotemark}{%
- \leavevmode
- \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
- \@makefnmark
- \ifhmode\spacefactor\@x@sf\fi
- \relax}
-\expandafter\CheckCommand\expandafter*\expandafter\@footnotemark
-\expandafter{\scr@saved@footnotemark}
-\newcommand*{\scr@footnotemark}{%
- \leavevmode
- \ifhmode\edef\@x@sf{\the\spacefactor}\FN@mf@check\nobreak\fi
- \@makefnmark
- \csname FN@mf@prepare\endcsname
- \ifhmode\spacefactor\@x@sf\fi
- \relax}
-%</option>
-% \end{macrocode}
-% \end{macro}^^A \scr@saved@footnotemark,\scr@footnotemark
-% \end{option}^^A footnotes
-%
-%
-% \subsection{Commands and macros for footnotes}
-%
-% \begin{command}{\footnoterule}
-% \changes{v2.3a}{1995/07/08}{using \cs{@width}}
-% \changes{v2.8q}{2002/02/06}{\cs{raggedbottom} changed}
-% \changes{v2.95}{2002/01/07}{\texttt{.05fil} instead of \texttt{.005fil}}
-% \changes{v3.06}{2010/04/03}{using new length macros}
-% \changes{v3.07}{2010/09/14}{using new font element \fnt{footnoterule}}
-% \changes{v3.19}{2015/08/24}{not with \pkg*{scrextend}}
-% In case of \cs{raggedbottom} the footnote rule is moved downwards. Note,
-% that this does not work, if there is a bottom placed float. The indication
-% of using \cs{raggedbottom} is, \cs{@textbottom} is not \cs{relax}. This can
-% fail, but nevertheless is an improvement.
-% \begin{macrocode}
-%<*body>
-%<*class>
-\renewcommand*\footnoterule{%
- \normalsize\ftn@rule@test@values
- \kern-\dimexpr 2.6\p@+\ftn@rule@height\relax
- \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi
- {\usekomafont{footnoterule}{%
- \hrule \@height\ftn@rule@height \@width\ftn@rule@width}}%
- \kern 2.6\p@}
-% \end{macrocode}
-% \begin{macro}{\ftn@rule@test@values}
-% \changes{v3.06}{2010/04/03}{added}
-% Plausibility test for the lengths of the rule.
-% \begin{macrocode}
-\newcommand*{\ftn@rule@test@values}{%
- \ifdim\ftn@rule@height <\z@
- \ClassWarning{\KOMAClassName}{%
- You might get into trouble, because the\MessageBreak
- height of the footnote rule has a value\MessageBreak
- less than 0%
- }%
- \else
- \ifdim\ftn@rule@height >\dimexpr\skip\footins -2.6\p@\relax
- \ClassWarning{\KOMAClassName}{%
- You might get into trouble, because the\MessageBreak
- height of the footnote rule has a value\MessageBreak
- greater than \the\dimexpr\skip\footins -2.6\p@\relax
- }%
- \fi
- \fi
- \ifdim\ftn@rule@width <\z@
- \ClassWarning{\KOMAClassName}{%
- You might get into trouble, because the width\MessageBreak
- or length of the footnote rule has a value\MessageBreak
- less than 0pt%
- }%
- \else
- \ifdim\ftn@rule@width >\columnwidth
- \ClassWarning{\KOMAClassName}{%
- You might get into trouble, because the width\MessageBreak
- or length of the footnote rule has a value\MessageBreak
- greater than \string\columnwidth
- }%
- \fi
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \ftn@rule@test@values
-% \begin{fontelement}{footnoterule}
-% \changes{v3.07}{2010/09/14}{added}
-% \changes{v3.19}{2015/08/24}{not with \pkg*{scrextend}}
-% To be able to change the color of the rule, we are using a font element. The
-% default is empty.
-% \begin{macrocode}
-\newkomafont{footnoterule}{}
-% \end{macrocode}
-% \end{fontelement}
-% \begin{macro}{\ftn@rule@width}
-% \changes{v3.06}{2010/04/03}{added}
-% \changes{v3.19}{2015/08/24}{not with \pkg*{scrextend}}
-% The length of the footnote rule.
-% \begin{macrocode}
-\newcommand*{\ftn@rule@width}{.4\columnwidth}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ftn@rule@height}
-% \changes{v3.06}{2010/04/03}{added}
-% \changes{v3.19}{2015/08/24}{not with \pkg*{scrextend}}
-% The height of the footnote rule (depth is always 0).
-% \begin{macrocode}
-\newcommand*{\ftn@rule@height}{.4\p@}
-% \end{macrocode}
-% \end{macro}
-% \begin{command}{\setfootnoterule}
-% \changes{v3.06}{2010/04/03}{added}
-% \changes{v3.19}{2015/08/24}{not with \pkg*{scrextend}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} replaced by \cs{IfArgIsEmpty}}
-% The first optional argument (\texttt{\#1}) it the height of the line. If it
-% is missing, the height is not changed. The first mandatory argument
-% (\texttt{\#2}) is the length of the line.
-% \begin{macrocode}
-\newcommand*{\setfootnoterule}[2][]{%
- \IfArgIsEmpty{#1}{}{%
- \renewcommand*{\ftn@rule@height}{#1}%
- }%
- \IfArgIsEmpty{#2}{}{%
- \renewcommand*{\ftn@rule@width}{#2}%
- }%
- \ftn@rule@test@values
-}
-%</class>
-% \end{macrocode}
-% \end{command}^^A \setfootnoterule
-% \end{command}^^A \footnoterule
-%
-% \begin{counter}{footnote}
-% The footnote counter is reset with every \cs{chapter}. So the numbering is
-% per chapter.
-% \begin{macrocode}
-%<book|report>\@addtoreset{footnote}{chapter}
-% \end{macrocode}
-% \end{counter}
-%
-% \begin{command}{\deffootnote}
-% \changes{v2.4l}{1997/02/06}{added}
-% \changes{v2.95}{2002/07/09}{paragraph indent fixed}
-% \changes{v2.9l}{2003/01/28}{\cs{edef}\cs{@tempa} replaced}
-% \changes{v2.9q}{2004/01/31}{\cs{ftn@font} does not support an argument
-% because of compatibility with \pkg{footnote}}
-% \changes{v3.22}{2017/01/03}{completely new implementation}
-% \changes{v3.23}{2017/03/27}{using \cs{raggedfootnote}}
-% \changes{v3.36}{2022/02/16}{hooks added}
-% This command defines the formatting of footnotes. The arguments are:
-% \begin{description}
-% \item[\oarg{first indent}:] the indent of the text of the first line of the
-% footnote,
-% \item[\marg{indent}:] the indent from the second line of the footnote,
-% \item[\marg{paragraph indent}:] the indent of the first line of a paragraph
-% if the footnote has more than one paragraph.
-% \item[\marg{mark code}:] the code of the footnote mark in the footnote (for
-% the mark in the text see \cs{deffootnotemark}).
-% \end{description}
-% The \meta{mark code} is additionally encapsulated in a \cs{hbox} of
-% with \meta{first indent}. If \meta{first indent} is not given it is set to
-% \meta{indent}.
-% \begin{macrocode}
-\newcommand\deffootnote[4][]{%
- \expandafter\ifnum\scr@v@is@ge{3.22}\relax
- \long\def\@makefntext##1{%
- \ExecuteDoHook{footnote/text/begin}%
- \raggedfootnote
- \leftskip #2
- \l@addto@macro\@trivlist{%
- \ifnum\@listdepth=\@ne\advance\leftmargin #2\relax\fi
- }%
- \parindent #3\noindent
- \IfArgIsEmpty{#1}{}{%
- \hskip \dimexpr #1-#2\relax
- }%
- \ftn@font\hbox to \z@{\hss\@@makefnmark}##1%
- \ExecuteDoHook{footnote/text/end}%
- }%
- \else
-%<class> \ClassInfo{\KOMAClassName}{%
-%<package> \PackageInfo{scrextend}{%
- Using old \string\@makefntext\space due to compatibility
- level\MessageBreak
- less than 3.22}%
- \long\def\@makefntext##1{%
- \setlength{\@tempdimc}{#3}%
- \def\@tempa{#1}\ifx\@tempa\@empty
- \@setpar{\@@par
- \@tempdima = \hsize
- \addtolength{\@tempdima}{-#2}%
- \parshape \@ne #2 \@tempdima}%
- \else
- \addtolength{\@tempdimc}{#2}%
- \addtolength{\@tempdimc}{-#1}%
- \@setpar{\@@par
- \@tempdima = \hsize
- \addtolength{\@tempdima}{-#1}%
- \@tempdimb = \hsize
- \addtolength{\@tempdimb}{-#2}%
- \parshape \tw@ #1 \@tempdima #2 \@tempdimb
- }%
- \fi
- \par
- \parindent\@tempdimc\noindent
- \ftn@font\hbox to \z@{\hss\@@makefnmark}##1%
- }%
- \fi
-% \end{macrocode}
-% \begin{macro}{\@@makefnmark}
-% \changes{v2.4l}{1997/02/06}{added}
-% Used to set the mark at the beginning of the footnote. Here we add the font
-% element.
-% \begin{macrocode}
- \def\@@makefnmark{\hbox{\ftnm@font{#4}}}%
-% \end{macrocode}
-% \end{macro}^^A \@@makefnmark
-% \begin{macrocode}
-}
-% \end{macrocode}
-% \end{command}^^A \deffootnote
-%
-% \begin{macro}{\raggedfootnote}
-% \changes{v3.23}{2017/03/27}{added}
-% Falk requested a new feature: Being able to change the
-% alignment/justification of the footnote text. The default is to change
-% nothing.
-% \begin{macrocode}
-\newcommand*{\raggedfootnote}{}
-% \end{macrocode}
-% \end{macro}^^A \raggedfootnote
-%
-% \begin{fontelement}{footnotelabel,footnotetext,footnote}
-% \begin{fontelement}{footnotenumber}
-% \changes{v3.36}{2022/02/16}{real alias of \fnt{footnotelabel}}
-% \begin{macro}{\ftn@font,\scr@fnt@footnote,\ftnm@font,\scr@fnt@footnotelabel}
-% \changes{v2.8q}{2001/11/16}{added}
-% There are two new font elements with two aliases. They are not defined using
-% \cs{newkomafont}, because they have to use not the default font commands but
-% another one compatible with \pkg{footnote}.
-% \begin{macrocode}
-\newcommand*{\ftn@font}{\normalfont}
-\newcommand*{\scr@fnt@footnote}{\ftn@font}
-\newcommand*{\ftnm@font}{}
-\aliaskomafont{footnotenumber}{footnotelabel}
-\newcommand*{\scr@fnt@footnotelabel}{\ftnm@font}
-\aliaskomafont{footnotetext}{footnote}
-% \end{macrocode}
-% \end{macro}^^A \fnt@font,\scr@fnt@footnote … \scr@fnt@footnotelabel
-% \end{fontelement}^^A footnotenumber
-% \end{fontelement}^^A footnotelabel,footnotetext,footnote
-%
-% \begin{command}{\deffootnotemark}
-% \changes{v2.4l}{1997/02/06}{added}
-% The definition of the footnote mark in the text can also changed. The
-% default is the usual definition extended by the font element.
-% \begin{macrocode}
-\newcommand*\deffootnotemark[1]{%
- \def\@makefnmark{\hbox{\ftntm@font{#1}}}%
-}
-% \end{macrocode}
-% \begin{fontelement}{footnotereference}
-% \begin{fontelement}{footnotemark,footnoteref}
-% \changes{v3.36}{2022/02/16}{real alias of \fnt{footnotereference}}
-% \begin{macro}{\ftntm@font,\scr@fnt@footnotereference}
-% \changes{v2.8q}{2001/11/16}{added}
-% The font element of the footnote mark in the text and two aliases.
-% \begin{macrocode}
-\newcommand*{\ftntm@font}{}
-\newcommand*{\scr@fnt@footnotereference}{\ftntm@font}
-\aliaskomafont{footnoteref}{footnotereference}
-\aliaskomafont{footnotemark}{footnotereference}
-% \end{macrocode}
-% \end{macro}^^A \ftntm@font,\scr@fnt@footnotereference
-% \end{fontelement}^^A footnotemark,footnoteref
-% \end{fontelement}^^A footnotereference
-% \begin{macro}{\FN@mf@check}
-% \changes{v2.98c}{2008/02/01}{added}
-% Detect multiple footnotes by \cs{lastkern} and add the separator.
-% \begin{macrocode}
-%<package>\providecommand*{\FN@mf@check}{%
-%<class>\newcommand*{\FN@mf@check}{%
- \ifdim\lastkern=\multiplefootnotemarker\relax
- \edef\@x@sf{\the\spacefactor}%
- \unkern\multiplefootnoteseparator
- \spacefactor\@x@sf\relax
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \FN@mf@check
-% \begin{macro}{\scr@mf@prepare}
-% \changes{v2.98c}{2008/02/01}{added}
-% Add the kern to detect multiple footnotes without change of the resulting kern.
-% \begin{macrocode}
-\newcommand*{\scr@mf@prepare}{%
- \kern-\multiplefootnotemarker
- \kern\multiplefootnotemarker\relax
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@mf@prepare
-% \begin{macro}{\F@mf@prepare}
-% \changes{v2.98c}{2008/02/14}{added}
-% \changes{v3.25a}{2018/04/17}{explicit definition}
-% To stay compatible with \pkg{footmisc} we define this too (but \cs{relax}
-% and only if not defined before).
-% \begin{macrocode}
-\@ifundefined{FN@mf@prepare}{\let\FN@mf@prepare\relax}{}
-% \end{macrocode}
-% \end{macro}^^A \F@mf@prepare
-% \begin{macro}{\@footnotetext}
-% \changes{v3.01a}{2008/11/22}{long}
-% \begin{macro}{\scr@saved@footnotetext}
-% \changes{v2.98c}{2008/02/01}{added}
-% \changes{v3.01a}{2008/11/22}{long}
-% We have to add the multiple footnote preparation to the definition of
-% \cs{@footnotetext}.
-% \begin{macrocode}
-\newcommand{\scr@saved@footnotetext}{}
-\let\scr@saved@footnotetext\@footnotetext
-\renewcommand{\@footnotetext}[1]{%
- \scr@saved@footnotetext{#1}%
- \csname FN@mf@prepare\endcsname
-}
-% \end{macrocode}
-% And \pkg{footmisc} should not warn because of a not expected definition of
-% \cs{@footnotemark}.
-% \begin{macrocode}
-\BeforePackage{footmisc}{%
- \ifx\@footnotemark\scr@footnotemark
- \let\@footnotemark\scr@saved@footnotemark
- \fi
- \let\@footnotetext\scr@saved@footnotetext
-}
-% \end{macrocode}
-% \changes{v3.10}{2011/09/12}{\pkg{setspace} workaround}
-% \pkg{setspace} also needs a workaround, because it redefines
-% \cs{@footnotemark} without respect of other definitions. So we use out
-% definition instead and add a \texttt{footnote/text/begin} do-hook.
-% \begin{macrocode}
-\BeforePackage{setspace}{%
- \let\@footnotetext\scr@saved@footnotetext
-}
-\AfterPackage{setspace}{%
- \let\scr@saved@footnotetext\@footnotetext
- \renewcommand{\@footnotetext}[1]{%
- \scr@saved@footnotetext{#1}%
- \csname FN@mf@prepare\endcsname
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@saved@footnotetext
-% \end{macro}^^A \@footnotetext
-% \end{command}^^A \deffootnotemark
-%
-% \begin{command}{\multiplefootnoteseparator}
-% \changes{v2.98c}{2008/02/01}{added}
-% The multiple footnote separation marker with all formatting needed.
-% \begin{macrocode}
-\newcommand*{\multiplefootnoteseparator}{%
- \begingroup\let\thefootnotemark\multfootsep\@makefnmark\endgroup
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\multfootsep}
-% \changes{v2.98c}{2008/02/01}{added}
-% The \pkg{footmisc} compatible separation without formatting.
-% \begin{macrocode}
-%<class>\newcommand*{\multfootsep}{,}
-%<package>\providecommand*{\multfootsep}{,}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\multiplefootnotemarker}
-% \changes{v2.98c}{2008/02/01}{added}
-% \changes{v3.19}{2015/08/24}{\pkg*{scrextend} uses \cs{providecommand}}
-% The kerning of the marker also \pkg{footmisc} compatible.
-% \begin{macrocode}
-%<class>\newcommand*{\multiplefootnotemarker}{3sp}
-%<package>\providecommand*{\multiplefootnotemarker}{3sp}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\thefootnotemark}
-% \changes{v2.4l}{1997/02/06}{added}
-% User level command using \cs{@thefnmark}.
-% \begin{macrocode}
-%<class>\newcommand*{\thefootnotemark}{\@thefnmark}
-%<package>\providecommand*{\thefootnotemark}{\@thefnmark}
-% \end{macrocode}
-% \end{command}
-%
-% \changes{v2.4l}{1997/02/06}{initialization using \cs{deffootnotemark}}
-% \begin{macro}{\@makefnmark}
-% \changes{v3.10}{2011/09/27}{\pkg*{scrextend} redefines \cs{@makefnmark}
-% to use \cs{thefootnotemark}}
-% \begin{macrocode}
-%<*class>
-\deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}}
-%</class>
-%<*package>
-\def\reserved@a{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}
-\ifx\reserved@a\@makefnmark
-%</package>
-\deffootnotemark{\textsuperscript{\thefootnotemark}}
-%<*package>
-\else
- \IfFileExists{etoolbox.\@pkgextension}{%
- \PackageInfo{scrextend}{%
- unexpected definition of `\string\@makefnmark'.\MessageBreak
- Trying to patch it%
- }%
- \RequirePackage{etoolbox}%
- \patchcmd{\@makefnmark}{\@thefnmark}{\thefootnotemark}{%
- \PackageInfo{scrextend}{patch seems to be successfull}%
- }{%
- \PackageWarning{scrextend}{%
- patching `\string\@makefnmark' failed.\MessageBreak
- Using hard coded redefinition%
- }%
- \deffootnotemark{\textsuperscript{\thefootnotemark}}%
- }%
- }{%
- \PackageWarning{scrextend}{%
- unexpected definition of `\string\@makefnmark'.\MessageBreak
- Using hard coded redefintion%
- }%
- \deffootnotemark{\textsuperscript{\thefootnotemark}}%
- }%
-\fi
-%</package>
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Referencing footnote labels}
-%
-% \begin{command}{\footref}
-% \changes{v2.98c}{2008/02/01}{added}
-% \changes{v3.33}{2021/02/24}{using \cs{providecommand} because of
-% \LaTeX{} 2021-05-01}
-% \KOMAScript{} 3 provides this command for more more than 13 longer than
-% the \LaTeX{} kernel. It is compatible with \pkg{footmisc} but has also been
-% published for free in the Usenet.
-% \begin{macrocode}
-\providecommand*{\footref}[1]{%
- \begingroup
- \unrestored@protected@xdef\@thefnmark{\ref{#1}}%
- \endgroup
- \@footnotemark
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-index.dtx b/macros/latex/contrib/koma-script/source/scrkernel-index.dtx
deleted file mode 100644
index 34972167b6..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-index.dtx
+++ /dev/null
@@ -1,379 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-index.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-index.dtx 3706 2022-02-15 09:36:50Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-15 10:36:50 +0100 (Di, 15. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3706 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-index.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (index)]%
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-index.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2002/07/01}{new by splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/15}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/15}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-index.dtx}
-% \title{Index Code of the
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% The index code of the \KOMAScript{} classes in \file{scrkernel-index.dtx}
-% is somehow different from the code of the standard classes. It provides
-% several options and other configuration possibilities.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of the Index}
-%
-% The letter class \cls*{scrlttr2} does not provide an index. All other
-% classes do.
-%
-% \begin{macrocode}
-%<*!letter>
-% \end{macrocode}
-%
-%
-% \subsection{Options}
-%
-% \begin{option}{index}
-% \changes{v2.98c}{2008/03/04}{added}
-% \changes{v3.17}{2015/03/12}{internal value storage}
-% \changes{v3.18}{2015/06/15}{new value \opt{numbered}}
-% \changes{v3.18}{2015/06/15}{new value \opt{leveldown}}
-% \changes{v3.18}{2015/06/15}{new value \opt{standardlevel}}
-% \changes{v2.7a}{2001/01/04}{improved link generation with \cls*{scrbook} or
-% \cls*{scrreprt} and \pkg{hyperref}}
-% \changes{v2.98c}{2008/03/04}{redefining \cs{idx@@heading} instead of
-% \cs{idx@@heading}}
-% \changes{v3.18}{2015/06/15}{new value \opt{leveldown}}
-% The option allow several values for several features:
-% \begin{labeling}{\opt{=standardlevel}:}
-% \item[\opt{=default}:] use not numbered heading without ToC entry, but
-% without affecting the heading level;
-% \item[\opt{=totoc}:] use not numbered heading with ToC entry, but
-% without affecting the heading level;
-% \item[\opt{=numbered}:] use numbered heading (with ToC entry), but
-% without affecting the heading level;
-% \item[\opt{=leveldown}:] use a subheading (e.g. \cs{subsection} instead
-% of \cs{section} in \cls*{scrartcl}), without affecting numbered or not and
-% ToC entry or not;
-% \item[\opt{=standardlevel}:] don't use a subheading, without affecting
-% numbered or not and ToC entry or not.
-% \end{labeling}
-% To do so, the option redefines \cs{idx@heading}.
-% \begin{macro}{\idx@@heading}
-% \changes{v2.98c}{2008/03/04}{added}
-% \changes{v3.18}{2015/06/15}{using \opt{leveldown}}
-% This is the macro to print the heading of the index (nothing else). It has
-% one mandatory argument: the text to be used as heading. There will be one
-% additional code level above this: \cs{idx@heading}, that will be defined in
-% the \texttt{body} run. \cs{idx@heading} has to be defined before, so it can
-% be redefined by the \opt{index} option. In opposite to the standard classes
-% we want to use \cs{chapter} in two column mode. This can be done, because of
-% significant changes of \cs{chapter} definition. Note: If someone uses the
-% standard classes hack of package \pkg*{scrhack} or even another headings
-% package like \pkg*{titlesec} this could fail. But this is not my problem,
-% because usage of such packages and hacks is not recommended at all.
-% \begin{macrocode}
-%<*option>
-\newcommand*{\idx@@heading}{%
- \ifidx@leveldown
-%<article> \expandafter\subsection
-%<book|report> \expandafter\section
- \else
-%<article> \expandafter\section
-%<book|report> \expandafter\chapter
- \fi*%
-}
-% \end{macrocode}
-% \begin{macro}{\idx@leveldowntrue,\idx@leveldownfalse,\ifidx@leveldown}
-% \changes{v3.18}{2015/06/15}{added}
-% The boolean switch \cs{ididx@leveldown} is needed to distinguish the heading
-% level to be used (option values \opt{leveldown} and \opt{standardlevel}).
-% \begin{macrocode}
-\newif\ifidx@leveldown
-\KOMA@key{index}{%
- \KOMA@set@ncmdkey{index}{@tempa}{%
- {notoc}{0},{nottotoc}{0},{default}{0},{plainheading}{0},%
- {totoc}{1},{toc}{1},{notnumbered}{1},%
- {numbered}{2},{totocnumbered}{2},{numberedtotoc}{2},{tocnumbered}{2},%
- {numberedtoc}{2},%
- {leveldown}{3},%
- {standardlevel}{4}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifcase \@tempa\relax
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{noindex}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indexnumbered}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{index}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{notoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{numbered}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{toc}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{noindex}%
- \KOMA@kav@add{.\KOMAClassFileName}{index}{notoc}%
- \renewcommand*{\idx@@heading}{%
- \ifidx@leveldown
-%<article> \expandafter\subsection
-%<book|report> \expandafter\section
- \else
-%<article> \expandafter\section
-%<book|report> \expandafter\chapter
- \fi*%
- }%
- \or
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{noindex}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indexnumbered}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{index}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{notoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{numbered}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{toc}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{index}%
- \KOMA@kav@add{.\KOMAClassFileName}{index}{toc}%
- \renewcommand*{\idx@@heading}{%
- \ifidx@leveldown
-%<article> \expandafter\subsection\expandafter*
-%<book|report> \expandafter\addsec
- \else
-%<article> \expandafter\addsec
-%<book|report> \expandafter\addchap
- \fi
- }%
- \or
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{noindex}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indexnumbered}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{index}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{notoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{numbered}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{toc}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{indexnumbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{index}{numbered}%
- \renewcommand*{\idx@@heading}{%
- \ifidx@leveldown
-%<article> \expandafter\subsection
-%<book|report> \expandafter\section
- \else
-%<article> \expandafter\section
-%<book|report> \expandafter\chapter
- \fi
- }%
- \or
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{leveldown}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{standardlevel}%
- \KOMA@kav@add{.\KOMAClassFileName}{index}{leveldown}%
- \idx@leveldowntrue
- \or
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{leveldown}%
- \KOMA@kav@remove{.\KOMAClassFileName}{index}{standardlevel}%
- \KOMA@kav@add{.\KOMAClassFileName}{index}{standardlevel}%
- \idx@leveldownfalse
- \fi
- \fi
-}
-\KOMA@kav@add{.\KOMAClassFileName}{toc}{noindex}
-\KOMA@kav@add{.\KOMAClassFileName}{index}{notoc}
-\KOMA@kav@add{.\KOMAClassFileName}{index}{standardlevel}
-% \end{macrocode}
-% \end{macro}^^A \ifidx@leveldown …
-% \end{macro}^^A \idx@@heading
-% \end{option}^^A index
-%
-% \begin{option}{idxtotoc}
-% \changes{v2.3h}{1995/01/21}{new}
-% \changes{v2.98c}{2008/03/04}{obsolete}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{idxtotoc}{index=totoc}
-%</option>
-% \end{macrocode}
-% \end{option}
-%
-%
-% \subsection{User commands and macros}
-%
-% \begin{command}{\setindexpreamble}
-% \changes{v2.6c}{2000/06/10}{added}
-% \changes{v2.6d}{2000/07/20}{\cs{let} replaced by \cs{newcommand*}}
-% \changes{v2.95}{2002/07/01}{\cs{let} and \cs{def}}
-% \begin{macro}{\index@preamble}
-% \changes{v2.6c}{2000/06/10}{added}
-% The index preamble is placed between the heading an the index itself. The
-% user can define it using \cs{setindexpreamble}. \cs{index@preamble} is the
-% storage. Note: \cs{setindexpreamble} does read the argument itself. This
-% makes it easier to patch the user level command. But because of this it has
-% to long.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\index@preamble}{}
-\let\index@preamble=\relax
-\newcommand{\setindexpreamble}[1]{\def\index@preamble{#1}}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{macro}{\idx@heading}
-% \changes{v2.3h}{1995/01/21}{added}
-% \changes{v2.4c}{1996/04/04}{handling of running heads fixed}
-% \changes{v2.4g}{1996/11/04}{two-columned index with \cls*{scrartcl} fixed}
-% \changes{v2.6c}{2000/06/10}{support for index preamble after heading}
-% \changes{v2.7j}{2001/05/27}{output of preamble moved to \env{theindex}}
-% \changes{v2.9l}{2003/01/19}{\cs{if@twoside} replaced by \cs{if@openright}}
-% \changes{v2.98c}{2008/03/04}{using \cs{idx@@heading}}
-% \changes{v3.10}{2011/08/31}{using \cs{MakeMarkcase}}
-% \changes{v3.10a}{2012/03/08}{brackets from previous change fixed}
-% \changes{v3.12}{2013/09/24}{never make an index entry to the other ToC but
-% the table of contents}
-% \changes{v3.25}{2017/10/13}{using \cs{@mkright} and \cs{@mkdouble}}
-% \changes{v3.26}{2018/09/03}{usage of \cs{addsecmark} or \cs{subsectionmark}
-% instead of \cs{@mkright}}
-% Macro to make the index heading and preamble.
-% \begin{macrocode}
-\newcommand*{\idx@heading}{%
-%<report|book> \if@openright\cleardoublepage\else\clearpage\fi%
- \twocolumn[%
-%<report|book> \@chaptertolistsfalse
- \idx@@heading{\indexname}]%
- \ifidx@leveldown
-%<report|book> \addsecmark{\indexname}%
-%<*article>
- \begingroup
- \c@secnumdepth=-\maxdimen
- \subsectionmark{\indexname}%
- \endgroup
-%</article>
- \else
- \@mkdouble{\MakeMarkcase{\indexname}}%
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{environment}{theindex}
-% \changes{v2.8d}{2001/07/05}{\cs{indexpagestyle} instead of \pstyle{plain}}
-% \changes{v2.3h}{1995/01/21}{using \cs{idx@heading}}
-% \changes{v2.7j}{2001/05/27}{output of preamble added}
-% \changes{v3.19}{2015/08/25}{using \cs{indexpagestyle} only if not empty}
-% This definition is similar to the definition of the standard classes. As
-% addition it supports a preamble text, a variable heading, and resets the
-% paragraph end line fill.
-% \begin{macrocode}
-\newenvironment{theindex}{%
- \if@twocolumn
- \@restonecolfalse
- \else
- \@restonecoltrue
- \fi
- \columnseprule \z@
- \columnsep 35\p@
-%<book|report> \setchapterpreamble{\index@preamble}%
- \idx@heading
-%<article> \index@preamble\par\nobreak
- \ifx\indexpagestyle\@empty\else\thispagestyle{\indexpagestyle}\fi
- \parindent\z@
- \setlength{\parskip}{\z@ \@plus .3\p@}%
- \setlength{\parfillskip}{\z@ \@plus 1fil}%
- \let\item\@idxitem
-}{%
- \if@restonecol\onecolumn\else\clearpage\fi
-}
-% \end{macrocode}
-% \begin{macro}{\@idxitem}
-% A new index entry
-% \begin{command}{\subitem,\subsubitem}
-% \changes{v2.3g}{1996/01/14}{using \cs{@idxitem} saves memory}
-% sub-entry, sub-sub-entry,
-% \begin{command}{\indexspace}
-% or (vertical) distance.
-% \begin{macrocode}
-\newcommand*\@idxitem{\par\hangindent 40\p@}
-% \begin{macrocode}
-\newcommand*\subitem{\@idxitem \hspace*{20\p@}}
-\newcommand*\subsubitem{\@idxitem \hspace*{30\p@}}
-\newcommand*\indexspace{%
- \par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax
-}
-% \end{macrocode}
-% \end{command}^^A \indexspace
-% \end{command}^^A \subitem,\subsubitem
-% \end{macro}^^A \@idxitem
-% \end{environment}^^A theindex
-%
-%
-% \subsection{Language dependent terms}
-%
-% \begin{command}{\indexname}
-% \changes{v3.36}{2022/02/15}{explicit definition for English languages}
-% The name of the index (used by \cs{idx@heading}).
-% \begin{macrocode}
-\newcommand*\indexname{Index}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\indexname{Index}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{macrocode}
-%</!letter>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
-
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-language.dtx b/macros/latex/contrib/koma-script/source/scrkernel-language.dtx
deleted file mode 100644
index aef328c819..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-language.dtx
+++ /dev/null
@@ -1,1790 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-language.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-language.dtx 3724 2022-02-25 10:28:44Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-25 11:28:44 +0100 (Fr, 25. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3724 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-language.dtx}
- [\filedate\space\filerevision\space
- KOMA-Script (language)]%
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-language.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2002/07/01}{new by splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/25}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/25}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-language.dtx}
-% \title{Easy Changing of Language-Depending Terms with
-% \href{https://komascript.de}{\KOMAScript} \pkg*{scrbase}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% Changing or defining language-depending terms is meanwhile easy, if
-% \pkg{babel} has been loaded. But before it has been loaded or if another
-% language package is used, it is not as easy as it should be. \KOMAScript{}
-% provides several commands to make it easy.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-%
-% \subsection{Commands and macros for language depending terms}
-%
-% These commands and macros provide very basic features and therefore has been
-% moved to \pkg*{scrbase} with \KOMAScript~3.00.
-%
-% \begin{macrocode}
-%<*package&base&body>
-% \end{macrocode}
-%
-% \begin{command}{\defcaptionname*,\defcaptionname}
-% \changes{3.12}{2013/07/29}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% With
-% \begin{quote}
-% \cs{defcaptionname}\marg{language list}\marg{name command}\marg{term}
-% \end{quote}
-% you can define \meta{name command} for all languages given in the
-% comma-separated \meta{language list} to be \meta{term}. Note: \meta{name
-% command} has to be a command without arguments. For commands with arguments
-% you have to use the mechanisms of, e.g., \pkg{babel} directly. If the
-% \meta{name command} is already defined in \cs{extras\meta{language}}, the
-% new definition will also be added to this macro. Otherwise it will be added
-% to \cs{captions\meta{language}}. The star variant \cs{defcaptionname*}
-% always used \cs{extras\meta{language}}.
-% \begin{macrocode}
-\newcommand*{\defcaptionname}{%
- \kernel@ifstar\scr@def@scaptionname\scr@def@captionname
-}
-% \end{macrocode}
-% \begin{macro}{\scr@def@scaptionname}
-% \changes{v3.12}{2013/07/30}{added}
-% Because we are not using \pkg{xparse} we need an extra macro for the star
-% variant. The arguments are the same as for \cs{defcaptionname}.
-% \begin{macrocode}
-\newcommand*{\scr@def@scaptionname}[3]{%
-% \end{macrocode}
-% Because several language packages define \cs{captions\meta{language}} in
-% |\begin{document}|, we also delay the definition, if the command is used in
-% the document preamble.
-% \begin{macrocode}
- \if@atdocument
- \expandafter\@firstofone
- \else
- \scr@ifactivelanguageisoneof{#1}{\def#2{#3}}{}%
- \expandafter\AtBeginDocument
- \fi
- {%
-% \end{macrocode}
-% Do a local loop over all languages in the \meta{language list}.
-% \changes{v3.26}{2018/08/29}{decreased number of \cs{expandafter}}
-% \begin{macrocode}
- \begingroup
- \let\reserved@b\endgroup
- \edef\scr@reserved@a{#1}%
- \@onelevel@sanitize\scr@reserved@a
- \@for\scr@reserved@a:=\scr@reserved@a\do{%
-% \end{macrocode}
-% Inside the loop add definition of \meta{name command} to \meta{term} to
-% \cs{extras\meta{language}}.
-% \begin{macrocode}
- \scr@trim@spaces\scr@reserved@a
- \ifx\scr@reserved@a\@empty
- \PackageWarning{scrbase}{empty language at \string\defcaptionname}%
- \else
- \expandafter\ifx\csname extras\scr@reserved@a\endcsname\relax
- \expandafter\expandafter\expandafter\gdef
- \else
- \expandafter\expandafter\expandafter\g@addto@macro
- \fi
- \csname extras\scr@reserved@a\endcsname{%
- \def#2{#3}%
- }%
-% \end{macrocode}
-% The redefinition of \cs{reserved@b} to not only close the group but also
-% activate the new term if \meta{language} (\cs{reserved@a}) is the current
-% language:
-% \begin{macrocode}
- \scr@def@activateactivelanguageaftergroup{#2}{#3}%
- \fi
- }%
- \reserved@b
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@def@activateactivelanguageaftergroup}
-% \changes{v3.12}{2013/07/30}{added}
-% \changes{v3.27}{2019/07/10}{immediate activation from within document
-% preamble}
-% If the language in \cs{reserved@a} is the current language in
-% \cs{languagename} or if the language number of the language in
-% \cs{reserved@a} is the current language number \cs{language}, the definition
-% of \texttt{\#1} as \texttt{\#2} is added to \cs{reserved@b}.
-% \begin{macrocode}
-\newcommand*{\scr@def@activateactivelanguageaftergroup}[2]{%
- \@onelevel@sanitize\languagename
- \@tempswafalse
-%<trace> \typeout{comparing `\languagename' and `\scr@reserved@a'}%
- \ifx\languagename\scr@reserved@a
- \@tempswatrue
- \else
-% \end{macrocode}
-% \changes{v3.20}{2016/01/05}{special treatment of \pkg{polyglossia}}
-% With \pkg{polyglossia} all German languages are language
-% \texttt{german}. The distinction of German, Swiss and Austrian is done with
-% two boolean switches \cs{if@austrian@locale} and
-% \cs{if@swiss@local}. Additionally the distinction of old and current German
-% is done with boolean switch \cs{if@german@oldspelling}. We cannot use the
-% switches directly, because of the special handling of such switches and
-% because they are only defined with \pkg{polyglossia}. So we compare them
-% with \cs{iffalse} or \cs{iftrue} instead.
-% \begin{macrocode}
- \edef\scr@reserved@b{\detokenize{german}}%
- \ifx\languagename\scr@reserved@b
- \edef\scr@reserved@b{%
- \expandafter\ifx\csname if@german@oldspelling\expandafter\endcsname
- \csname iffalse\endcsname n\fi
- \expandafter\ifx\csname if@austrian@locale\expandafter\endcsname
- \csname iftrue\endcsname austrian\else
- \expandafter\ifx\csname if@swiss@locale\expandafter\endcsname
- \csname iftrue\endcsname swiss\else german\fi\fi
- }%
-%<trace> \typeout{comparing also `\scr@reserved@a' and `\scr@reserved@b'}%
- \@onelevel@sanitize\scr@reserved@b
- \ifx\scr@reserved@a\scr@reserved@b \@tempswatrue\fi
- \fi
- \if@tempswa\else
- \ifcsname l@\scr@reserved@a\endcsname
- \expandafter\ifnum\csname l@\scr@reserved@a\endcsname=\language
- \@tempswatrue
- \fi
- \fi
- \fi
- \fi
- \if@tempswa
- \def\reserved@b{\endgroup
- \PackageInfo{scrbase}{activating \languagename\space \string#1}%
- \def#1{#2}%
- }%
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ifactivelanguageisoneof}
-% \changes{v3.27}{2019/07/10}{added}
-% \begin{quote}
-% \cs{scr@ifactivelanguageisoneof}\marg{language list}\meta{then
-% code}\meta{else code}
-% \end{quote}
-% If the current language is one of the comma-separated \meta{language list},
-% the \meta{then code} is executed otherwise \meta{else code}.
-% \begin{macrocode}
-\newcommand*{\scr@ifactivelanguageisoneof}[1]{%
- \begingroup
- \@tempswafalse
- \@onelevel@sanitize\languagename
- \edef\reserved@a{#1}%
- \@for \reserved@a:=\reserved@a\do{%
- \scr@trim@spaces\reserved@a
- \@onelevel@sanitize\reserved@a
- \ifx\languagename\reserved@a
- \@tempswatrue
- \else
- \edef\reserved@b{\detokenize{german}}%
- \ifx\languagename\reserved@b
- \edef\reserved@b{%
- \expandafter\ifx\csname if@german@oldspelling\expandafter\endcsname
- \csname iffalse\endcsname n\fi
- \expandafter\ifx \csname if@austrian@locale\expandafter\endcsname
- \csname iftrue\endcsname austrian\else
- \expandafter\ifx\csname if@swiss@locale\expandafter\endcsname
- \csname iftrue\endcsname swiss\else german\fi\fi
- }%
- \@onelevel@sanitize\reserved@b
- \ifx\reserved@a\reserved@b \@tempswatrue\fi
- \fi
- \if@tempswa\else
- \ifcsname l@\reserved@a\endcsname
- \expandafter\ifnum \csname l@\reserved@a\endcsname=\language
- \@tempswatrue
- \fi
- \fi
- \fi
- \fi
- }%
- \if@tempswa
- \aftergroup\@firstoftwo
- \else
- \aftergroup\@secondoftwo
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@ifactivelanguageisoneof
-% \end{macro}^^A \scr@def@activateactivelanguageaftergroup
-% \end{macro}^^A \scr@def@scaptionname
-% \begin{macro}{\scr@def@captionname}
-% \changes{v3.12}{2013/07/30}{added}
-% \changes{v3.27}{2019/07/10}{immediate activation from within document
-% preamble}
-% The non-star variant of \cs{defcaptionname} with the same arguments.
-% \begin{macrocode}
-\newcommand*{\scr@def@captionname}[3]{%
-% \end{macrocode}
-% Because several language packages define \cs{captions\meta{language}} in
-% |\begin{document}|, we also delay the definition, if the command is used in
-% the document preamble.
-% \begin{macrocode}
- \if@atdocument
- \expandafter\@firstofone
- \else
- \scr@ifactivelanguageisoneof{#1}{\def#2{#3}}{}%
- \expandafter\AtBeginDocument
- \fi
- {%
-% \end{macrocode}
-% Do a local loop over all languages in the \meta{language list}.
-% \changes{v3.26}{2018/08/29}{decreased number of \cs{expandafter}}
-% \begin{macrocode}
- \begingroup
- \let\reserved@b\endgroup
- \edef\scr@reserved@a{#1}%
- \@onelevel@sanitize\scr@reserved@a
- \@for\scr@reserved@a:=\scr@reserved@a\do{%
- \scr@trim@spaces\scr@reserved@a
- \ifx\scr@reserved@a\@empty
- \PackageWarning{scrbase}{empty language at \string\defcaptionname}%
- \else
-% \end{macrocode}
-% Test, if \meta{name command} is already defined in \cs{extras\meta{language}}.
-% \begin{macrocode}
- \@tempswafalse
- \begingroup
- \@tempswafalse
- \ifcsname extras\scr@reserved@a\endcsname
- \let#2\relax
-% \end{macrocode}
-% \changes{v3.27}{2019/05/27}{\pkg{biblatex} workaround}
-% Unfortunately, \pkg{biblatex} adds \cs{abx@extras@\meta{language}} to
-% \cs{extras\meta{language}} if only \meta{language} is an redundant language
-% (see \cs{DeclareRedundantLanguages} in the \pkg{biblatex} manual) and
-% \cs{extras\meta{language}} is defined. But in this case
-% \cs{abx@extras@\meta{language}} is not defined. So calling
-% \cs{extras\meta{language}} would result in an error. As a workaround for
-% this issue, make sure, that \cs{abx@extras@\meta{language}} is defined here
-% locally.
-% \begin{macrocode}
- \expandafter\providecommand\expandafter*%
- \csname abx@extras@\scr@reserved@a\endcsname{}%
- \csname extras\scr@reserved@a\endcsname
- \ifx #2\relax \else \aftergroup\@tempswatrue \fi
- \fi
- \endgroup
-% \end{macrocode}
-% If \meta{name command} is already defined in \cs{extras\meta{language}}
-% \begin{macrocode}
- \if@tempswa
-% \end{macrocode}
-% once again define it in \cs{extras\meta{language}}.
-% \begin{macrocode}
- \expandafter\g@addto@macro\csname extras\scr@reserved@a\endcsname{%
- \def#2{#3}%
- }%
- \else
-% \end{macrocode}
-% Otherwise define it in \cs{caption\meta{language}}.
-% \begin{macrocode}
- \expandafter\ifx\csname captions\scr@reserved@a\endcsname\relax
- \expandafter\expandafter\expandafter\gdef
- \else
- \expandafter\expandafter\expandafter\g@addto@macro
- \fi
- \csname captions\scr@reserved@a\endcsname{%
- \def#2{#3}%
- }%
- \fi
-% \end{macrocode}
-% The redefinition of \cs{reserved@b} to not only close the group but also
-% activate the new term if \meta{language} (\cs{reserved@a}) is the current
-% language:
-% \begin{macrocode}
- \scr@def@activateactivelanguageaftergroup{#2}{#3}%
- \fi
- }%
- \reserved@b
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@def@captionname
-% \end{command}^^A \defcaptionname
-%
-% \changes{v3.20}{2016/01/05}{new special treatment of \pkg{polyglossia}}%
-% With \pkg{polyglossia} the languages \texttt{austrian}, \texttt{swiss},
-% \texttt{ngerman}, \texttt{naustrian}, and \texttt{nswiss} are all mixed up
-% to \cs{captionsgerman}. To avoid activation of the language term of the
-% wrong dialect, \cs{init@extra@german} can be changed. Surely this is more or
-% less a hack. But \pkg{polyglossia} seems to not provide a better interface
-% for class and package authors.
-% \begin{macrocode}
-\AfterPackage*{polyglossia}{%
- \scr@ifundefinedorrelax{init@extras@german}{%
- \AfterFile{gloss-german.ldf}%
- }{%
- \@firstofone
- }%
- {%
- \providecommand*\captionsngerman{}%
- \providecommand*\captionsaustrian{}%
- \providecommand*\captionsnaustrian{}%
- \providecommand*\captionsswiss{}%
- \providecommand*\captionsnswiss{}%
- \csgappto{init@extras@german}{%
- \if@austrian@locale
- \csuse{captions\if@german@oldspelling\else n\fi austrian}%
- \else
- \if@swiss@locale
- \csuse{captions\if@german@oldspelling\else n\fi swiss}%
- \else
- \if@german@oldspelling\else \csuse{captionsngerman}\fi
- \fi
- \fi
- }%
- }%
-}
-% \end{macrocode}
-%
-%
-% \begin{command}{\providecaptionname}
-% \changes{v2.8q}{2001/11/08}{added}
-% \changes{v2.9r}{2004/06/16}{immediate activation for current language}
-% \changes{v2.95}{2006/03/10}{sanitizing language test}
-% \changes{v3.00}{2008/05/02}{moved to \pkg*{scrbase}}
-% \changes{v3.01b}{2008/12/07}{missing make undefined}
-% \changes{v3.02c}{2009/02/17}{undefined test improved}
-% \changes{v3.12}{2013/07/30}{re-implemented similar to \cs{defcaptionname}}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% This is very similar to \cs{defcaptionname}, but nothing is done if a
-% \meta{language} in the \meta{language list} is unknown or \meta{name
-% command} is already defined for the \meta{language}. With this limitation
-% \cs{providecaptionname} adds \meta{name command} to
-% \cs{captions\meta{language}} always, but the star variant
-% \cs{providecaptionname*} uses \cs{extras\meta{language}}.
-% \begin{macrocode}
-\newcommand*{\providecaptionname}{%
- \kernel@ifstar\scr@provide@scaptionname\scr@provide@captionname
-}
-% \end{macrocode}
-% \begin{macro}{\scr@provide@scaptionname}
-% \changes{v3.12}{2013/07/30}{added}
-% \changes{v3.26}{2018/08/29}{decreased number of \cs{expandafter}}
-% \changes{v3.27}{2019/07/10}{immediate activation from within document
-% preamble}
-% The star variant of \cs{providecaptionname} with the same arguments.
-% \begin{macrocode}
-\newcommand*{\scr@provide@scaptionname}[3]{%
- \if@atdocument
- \expandafter\@firstofone
- \else
- \scr@ifactivelanguageisoneof{#1}{\providecommand*{#2}{#3}}{}%
- \expandafter\AtBeginDocument
- \fi
- {%
- \begingroup
- \let\reserved@b\endgroup
- \edef\scr@reserved@a{#1}%
- \@onelevel@sanitize\scr@reserved@a
- \@for\scr@reserved@a:=\scr@reserved@a\do{%
- \scr@trim@spaces\scr@reserved@a
- \ifx\scr@reserved@a\@empty
- \PackageWarning{scrbase}{empty language at
- \string\providecaptionname}%
- \else
-% \end{macrocode}
-% In opposite to \cs{defcaptionname} add \meta{name command} to
-% \cs{extras\meta{language}} only, if \cs{extras\meta{language}} already
-% exists, but not yet defines \meta{name command}.
-% \begin{macrocode}
- \begingroup
- \let#2\relax
-% \end{macrocode}
-% \changes{v3.27}{2019/05/27}{\pkg{biblatex} workaround}
-% Unfortunately, \pkg{biblatex} adds \cs{abx@extras@\meta{language}} to
-% \cs{extras\meta{language}} if only \meta{language} is an redundant language
-% (see \cs{DeclareRedundantLanguages} in the \pkg{biblatex} manual) and
-% \cs{extras\meta{language}} is defined. But in this case
-% \cs{abx@extras@\meta{language}} is not defined. So calling
-% \cs{extras\meta{language}} would result in an error. As a workaround for
-% this issue, make sure, that \cs{abx@extras@\meta{language}} is defined here
-% locally.
-% \begin{macrocode}
- \expandafter\providecommand\expandafter*%
- \csname abx@extras@\scr@reserved@a\endcsname{}%
-% \end{macrocode}
-% \changes{v3.30}{2020/04/13}{\cs{renewcommand} workaround}
-% Unfortunately some users use \cs{renewcommand} to change a name even if the
-% language has not been loaded and the command has not been defined. This
-% would result in an error message. So a this point we let \cs{renewcommand}
-% be \cs{providecommand}, because we know that currently the command is
-% \cs{relax}.
-% \begin{macrocode}
- \let\renewcommand\providecommand
- \csname extras\scr@reserved@a\endcsname
- \csname captions\scr@reserved@a\endcsname
- \ifx #2\relax \aftergroup\@firstofone
- \else
-%<*trace>
- \PackageInfo{scrbase}{letting \scr@reserved@a\space
- \expandafter\string#2\MessageBreak
- unchanged}%
-%</trace>
- \aftergroup\@gobble
- \fi
- \endgroup
- {%
- \expandafter\ifx\csname extras\scr@reserved@a\endcsname\relax
-%<*trace>
- \PackageInfo{scrbase}{letting
- \expandafter\string\csname extras\scr@reserved@a\endcsname\space
- unused}%
-%</trace>
- \expandafter\expandafter\expandafter\@gobbletwo
- \else
- \expandafter\expandafter\expandafter\g@addto@macro
- \fi
- \csname extras\scr@reserved@a\endcsname{%
- \def#2{#3}%
- }%
- \scr@def@activateactivelanguageaftergroup{#2}{#3}%
- }%
- \fi
- }%
- \reserved@b
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@provide@scaptionname
-% \begin{macro}{\scr@provide@captionname}
-% \changes{v3.12}{2013/07/30}{added}
-% \changes{v3.26}{2018/08/29}{decreased number of \cs{expandafter}}
-% \changes{v3.27}{2019/07/10}{immediate activation from within document
-% preamble}
-% The non-star variant of \cs{providecaptionname} with the same arguments.
-% \begin{macrocode}
-\newcommand*{\scr@provide@captionname}[3]{%
- \if@atdocument
- \expandafter\@firstofone
- \else
- \scr@ifactivelanguageisoneof{#1}{\providecommand*{#2}{#3}}{}%
- \expandafter\AtBeginDocument
- \fi
- {%
- \begingroup
- \let\reserved@b\endgroup
- \edef\scr@reserved@a{#1}%
- \@onelevel@sanitize\scr@reserved@a
- \@for\scr@reserved@a:=\scr@reserved@a\do{%
- \scr@trim@spaces\scr@reserved@a
- \ifx\scr@reserved@a\@empty
- \PackageWarning{scrbase}{empty language at
- \string\providecaptionname}%
- \else
-% \end{macrocode}
-% In opposite to \cs{defcaptionname} add \meta{name command} to
-% \cs{captions\meta{language}} only, if \cs{captions\meta{language}} already
-% exists, but neither \cs{extras\meta{language}} nor
-% \cs{captions\meta{language}} defines \meta{name command}.
-% \begin{macrocode}
- \begingroup
- \let#2\relax
-% \end{macrocode}
-% \changes{v3.27}{2019/05/27}{\pkg{biblatex} workaround}
-% Unfortunately, \pkg{biblatex} adds \cs{abx@extras@\meta{language}} to
-% \cs{extras\meta{language}} if only \meta{language} is an redundant language
-% (see \cs{DeclareRedundantLanguages} in the \pkg{biblatex} manual) and
-% \cs{extras\meta{language}} is defined. But in this case
-% \cs{abx@extras@\meta{language}} is not defined. So calling
-% \cs{extras\meta{language}} would result in an error. As a workaround for
-% this issue, make sure, that \cs{abx@extras@\meta{language}} is defined here
-% locally.
-% \changes{v3.30}{2020/04/13}{\cs{renewcommand} workaround}
-% Unfortunately some users use \cs{renewcommand} to change a name even if the
-% language has not been loaded and the command has not been defined. This
-% would result in an error message. So a this point we let \cs{renewcommand}
-% be \cs{providecommand}, because we know that currently the command is
-% \cs{relax}.
-% \begin{macrocode}
- \let\renewcommand\providecommand
- \expandafter\providecommand\expandafter*%
- \csname abx@extras@\scr@reserved@a\endcsname{}%
- \csname captions\scr@reserved@a\endcsname
- \csname extras\scr@reserved@a\endcsname
- \ifx #2\relax \aftergroup\@firstofone
- \else
-%<*trace>
- \PackageInfo{scrbase}{letting \scr@reserved@a
- \expandafter\string#2\MessageBreak
- unchanged}%
-%</trace>
- \aftergroup\@gobble
- \fi
- \endgroup
- {%
- \expandafter\ifx\csname captions\scr@reserved@a\endcsname\relax
-%<*trace>
- \PackageInfo{scrbase}{letting
- \expandafter\string\csname extras\scr@reserved@a\endcsname\space
- unused}%
-%</trace>
- \expandafter\expandafter\expandafter\@gobbletwo
- \else
- \expandafter\expandafter\expandafter\g@addto@macro
- \fi
- \csname captions\scr@reserved@a\endcsname{%
- \def#2{#3}%
- }%
- \scr@def@activateactivelanguageaftergroup{#2}{#3}%
- }%
- \fi
- }%
- \reserved@b
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@provide@captionname
-% \end{command}^^A \providecaptionname
-%
-%
-% \begin{command}{\newcaptionname}
-% \changes{v2.8q}{2001/11/08}{added}
-% \changes{v2.9r}{2004/06/16}{immediate activation for current language}
-% \changes{v2.95}{2006/03/10}{sanitizing language test}
-% \changes{v3.00}{2008/05/02}{moved to \pkg*{scrbase}}
-% \changes{v3.01b}{2008/12/07}{missing make undefined}
-% \changes{v3.02c}{2009/02/17}{undefined test improved}
-% \changes{v3.12}{2013/07/30}{re-implemented similar to \cs{defcaptionname}}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% This is very similar to \cs{defcaptionname}, but if \meta{language} exists
-% and already defines \meta{language name} an error is reported. If the
-% \meta{language} exists but does not define the \meta{language name}, the
-% definition will be added. If the \meta{language} does not exist, it will be
-% defined. With this limitation \cs{newcaptionname} adds \meta{name command}
-% to \cs{captions\meta{language}} always, but the star variant
-% \cs{newcaptionname*} uses \cs{extras\meta{language}}.
-% \begin{macrocode}
-\newcommand*{\newcaptionname}{%
- \kernel@ifstar\scr@new@scaptionname\scr@new@captionname
-}
-% \end{macrocode}
-% \begin{macro}{\scr@new@scaptionname}
-% \changes{v3.12}{2013/07/30}{added}
-% \changes{v3.26}{2018/08/29}{decreased number of \cs{expandafter}}
-% \changes{v3.27}{2019/07/10}{immediate activation from within document
-% preamble}
-% The star variant of \cs{newcaptionname} with the same arguments.
-% \begin{macrocode}
-\newcommand*{\scr@new@scaptionname}[3]{%
- \if@atdocument
- \expandafter\@firstofone
- \else
- \scr@ifactivelanguageisoneof{#1}{\providecommand*{#2}{#3}}{}%
- \expandafter\AtBeginDocument
- \fi
- {%
- \begingroup
- \let\reserved@b\endgroup
- \edef\scr@reserved@a{#1}%
- \@onelevel@sanitize\scr@reserved@a
- \@for\scr@reserved@a:=\scr@reserved@a\do{%
- \scr@trim@spaces\scr@reserved@a
- \ifx\scr@reserved@a\@empty
- \PackageWarning{scrbase}{empty language at \string\newcaptionname}%
- \else
-% \end{macrocode}
-% In opposite to \cs{defcaptionname} the \meta{language name} has to be
-% undefined.
-% \begin{macrocode}
- \begingroup
- \let#2\relax
-% \end{macrocode}
-% \changes{v3.27}{2019/05/27}{\pkg{biblatex} workaround}
-% Unfortunately, \pkg{biblatex} adds \cs{abx@extras@\meta{language}} to
-% \cs{extras\meta{language}} if only \meta{language} is an redundant language
-% (see \cs{DeclareRedundantLanguages} in the \pkg{biblatex} manual) and
-% \cs{extras\meta{language}} is defined. But in this case
-% \cs{abx@extras@\meta{language}} is not defined. So calling
-% \cs{extras\meta{language}} would result in an error. As a workaround for
-% this issue, make sure, that \cs{abx@extras@\meta{language}} is defined here
-% locally.
-% \changes{v3.30}{2020/04/13}{\cs{renewcommand} workaround}
-% Unfortunately some users use \cs{renewcommand} to change a name even if the
-% language has not been loaded and the command has not been defined. This
-% would result in an error message. So a this point we let \cs{renewcommand}
-% be \cs{providecommand}, because we know that currently the command is
-% \cs{relax}.
-% \begin{macrocode}
- \let\renewcommand\providecommand
- \expandafter\providecommand\expandafter*%
- \csname abx@extras@\scr@reserved@a\endcsname{}%
- \csname captions\scr@reserved@a\endcsname
- \csname extras\scr@reserved@a\endcsname
- \ifx #2\relax
- \else
- \PackageError{scrbase}{%
- `\string#2' already defined\MessageBreak
- for language `\scr@reserved@a'%
- }{%
- You've told me to define `\string#2' for language
- `\scr@reserved@a',\MessageBreak
- but is has already been defined.\MessageBreak
- Nevertheless, if you'll continue it will be redefined.%
- }%
- \fi
- \endgroup
- \expandafter\ifx\csname extras\scr@reserved@a\endcsname\relax
- \expandafter\expandafter\expandafter\gdef
- \else
- \expandafter\expandafter\expandafter\g@addto@macro
- \fi
- \csname extras\scr@reserved@a\endcsname{%
- \def#2{#3}%
- }%
- \scr@def@activateactivelanguageaftergroup{#2}{#3}%
- \fi
- }%
- \reserved@b
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@new@scaptionname
-% \begin{macro}{\scr@new@captionname}
-% \changes{v3.12}{2013/07/30}{added}
-% \changes{v3.26}{2018/08/29}{decreased number of \cs{expandafter}}
-% \changes{v3.27}{2019/07/10}{immediate activation from within document
-% preamble}
-% The non-star variant of \cs{newcaptionname} with the same arguments.
-% \begin{macrocode}
-\newcommand*{\scr@new@captionname}[3]{%
- \if@atdocument
- \expandafter\@firstofone
- \else
- \scr@ifactivelanguageisoneof{#1}{\providecommand*{#2}{#3}}{}%
- \expandafter\AtBeginDocument
- \fi
- {%
- \begingroup
- \let\reserved@b\endgroup
- \edef\scr@reserved@a{#1}%
- \@onelevel@sanitize\scr@reserved@a
- \@for\scr@reserved@a:=\scr@reserved@a\do{%
- \scr@trim@spaces\scr@reserved@a
- \ifx\scr@reserved@a\@empty
- \PackageWarning{scrbase}{empty language at \string\newcaptionname}%
- \else
-% \end{macrocode}
-% In opposite to \cs{defcaptionname} the \meta{language name} has to be
-% undefined.
-% \begin{macrocode}
- \begingroup
- \let#2\relax
-% \end{macrocode}
-% \changes{v3.27}{2019/05/27}{\pkg{biblatex} workaround}
-% Unfortunately, \pkg{biblatex} adds \cs{abx@extras@\meta{language}} to
-% \cs{extras\meta{language}} if only \meta{language} is an redundant language
-% (see \cs{DeclareRedundantLanguages} in the \pkg{biblatex} manual) and
-% \cs{extras\meta{language}} is defined. But in this case
-% \cs{abx@extras@\meta{language}} is not defined. So calling
-% \cs{extras\meta{language}} would result in an error. As a workaround for
-% this issue, make sure, that \cs{abx@extras@\meta{language}} is defined here
-% locally.
-% \changes{v3.30}{2020/04/13}{\cs{renewcommand} workaround}
-% Unfortunately some users use \cs{renewcommand} to change a name even if the
-% language has not been loaded and the command has not been defined. This
-% would result in an error message. So a this point we let \cs{renewcommand}
-% be \cs{providecommand}, because we know that currently the command is
-% \cs{relax}.
-% \begin{macrocode}
- \let\renewcommand\providecommand
- \expandafter\providecommand\expandafter*%
- \csname abx@extras@\scr@reserved@a\endcsname{}%
- \csname captions\scr@reserved@a\endcsname
- \csname extras\scr@reserved@a\endcsname
- \ifx #2\relax
- \else
- \PackageError{scrbase}{%
- `\string#2' already defined\MessageBreak
- for language `\scr@reserved@a'%
- }{%
- You've told me to define `\string#2' for language
- `\scr@reserved@a',\MessageBreak
- but is has already been defined.\MessageBreak
- Nevertheless, if you'll continue it will be redefined.%
- }%
- \fi
- \endgroup
- \expandafter\ifx\csname captions\scr@reserved@a\endcsname\relax
- \expandafter\expandafter\expandafter\gdef
- \else
- \expandafter\expandafter\expandafter\g@addto@macro
- \fi
- \csname captions\scr@reserved@a\endcsname{%
- \def#2{#3}%
- }%
- \scr@def@activateactivelanguageaftergroup{#2}{#3}%
- \fi
- }%
- \reserved@b
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@new@captionname
-% \end{command}^^A \newcaptionname
-%
-% \begin{command}{\renewcaptionname}
-% \changes{v2.8q}{2001/11/08}{added}
-% \changes{v2.9r}{2004/06/16}{immediate activation for current language}
-% \changes{v2.95}{2006/03/10}{sanitizing language test}
-% \changes{v3.00}{2008/05/02}{moved to \pkg*{scrbase}}
-% \changes{v3.01b}{2008/12/07}{missing make undefined}
-% \changes{v3.02c}{2009/02/17}{undefined test improved}
-% \changes{v3.12}{2013/07/30}{re-implemented similar to \cs{defcaptionname}}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% This is very similar to \cs{defcaptionname}, but if the \meta{language} does
-% not exist or does not already define \meta{language name} an error is reported.
-% So for a \meta{language} that exists and defines \meta{language name}, If the
-% \meta{name command} is already defined in \cs{extras\meta{language}},
-% \cs{renewcaptioname} adds the changed definition to this macro. Otherwise it
-% will be added to \cs{captions\meta{language}}. The star variant
-% \cs{renewcaptionname*} always used \cs{extras\meta{language}}.
-% \begin{macrocode}
-\newcommand*{\renewcaptionname}{%
- \kernel@ifstar\scr@renew@scaptionname\scr@renew@captionname
-}
-% \end{macrocode}
-% \begin{macro}{\scr@renew@scaptionname}
-% \changes{v3.12}{2013/07/30}{added}
-% \changes{v3.26}{2018/08/29}{decreased number of \cs{expandafter}}
-% \changes{v3.27}{2019/07/10}{immediate activation from within document
-% preamble}
-% \changes{v3.27a}{2019/10/13}{immediate activation only for already defined terms}
-% The star variant of \cs{renewcaptionname} with the same arguments.
-% \begin{macrocode}
-\newcommand*{\scr@renew@scaptionname}[3]{%
- \if@atdocument
- \expandafter\@firstofone
- \else
- \scr@ifactivelanguageisoneof{#1}{\ifdefined#2\renewcommand*{#2}{#3}\fi}{}%
- \expandafter\AtBeginDocument
- \fi
- {%
- \begingroup
- \let\reserved@b\endgroup
- \edef\scr@reserved@a{#1}%
- \@onelevel@sanitize\scr@reserved@a
- \@for\scr@reserved@a:=\scr@reserved@a\do{%
- \scr@trim@spaces\scr@reserved@a
- \ifx\scr@reserved@a\@empty
- \PackageWarning{scrbase}{empty language at \string\renewcaptionname}%
- \else
-% \end{macrocode}
-% In opposite to \cs{defcaptionname} \meta{language name} has to be defined.
-% \begin{macrocode}
- \begingroup
- \let#2\relax
-% \end{macrocode}
-% \changes{v3.27}{2019/05/27}{\pkg{biblatex} workaround}
-% Unfortunately, \pkg{biblatex} adds \cs{abx@extras@\meta{language}} to
-% \cs{extras\meta{language}} if only \meta{language} is an redundant language
-% (see \cs{DeclareRedundantLanguages} in the \pkg{biblatex} manual) and
-% \cs{extras\meta{language}} is defined. But in this case
-% \cs{abx@extras@\meta{language}} is not defined. So calling
-% \cs{extras\meta{language}} would result in an error. As a workaround for
-% this issue, make sure, that \cs{abx@extras@\meta{language}} is defined here
-% locally.
-% \changes{v3.30}{2020/04/13}{\cs{renewcommand} workaround}
-% Unfortunately some users use \cs{renewcommand} to change a name even if the
-% language has not been loaded and the command has not been defined. This
-% would result in an error message. So a this point we let \cs{renewcommand}
-% be \cs{providecommand}, because we know that currently the command is
-% \cs{relax}.
-% \begin{macrocode}
- \let\renewcommand\providecommand
- \expandafter\providecommand\expandafter*%
- \csname abx@extras@\scr@reserved@a\endcsname{}%
- \csname captions\scr@reserved@a\endcsname
- \csname extras\scr@reserved@a\endcsname
- \ifx #2\relax
- \PackageError{scrbase}{%
- `\string#2' not defined at language `\scr@reserved@a'%
- }{%
- You've told me to redefine `\string#2' at language
- `\scr@reserved@a',\MessageBreak
- but is hasn't been defined before.\MessageBreak
- Nevertheless, if you'll continue I'll define it at
- `\expandafter\string\csname extras\scr@reserved@a\endcsname'%
- }%
- \fi
- \endgroup
- \expandafter\ifx\csname extras\scr@reserved@a\endcsname\relax
- \expandafter\expandafter\expandafter\gdef
- \else
- \expandafter\expandafter\expandafter\g@addto@macro
- \fi
- \csname extras\scr@reserved@a\endcsname{%
- \def#2{#3}%
- }%
- \scr@def@activateactivelanguageaftergroup{#2}{#3}%
- \fi
- }%
- \reserved@b
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@renew@scaptionname
-% \begin{macro}{\scr@renew@captionname}
-% \changes{v3.12}{2013/07/30}{added}
-% \changes{v3.26}{2018/08/29}{decreased number of \cs{expandafter}}
-% \changes{v3.27}{2019/07/10}{immediate activation from within document
-% preamble}
-% \changes{v3.27a}{2019/10/13}{immediate activation only for already existing
-% terms}
-% The non-star variant of \cs{renewcaptionname} with the same arguments.
-% \begin{macrocode}
-\newcommand*{\scr@renew@captionname}[3]{%
- \if@atdocument
- \expandafter\@firstofone
- \else
- \scr@ifactivelanguageisoneof{#1}{\ifdefined#2\renewcommand*{#2}{#3}\fi}{}%
- \expandafter\AtBeginDocument
- \fi
- {%
- \begingroup
- \let\reserved@b\endgroup
- \edef\scr@reserved@a{#1}%
- \@onelevel@sanitize\scr@reserved@a
- \@for\scr@reserved@a:=\scr@reserved@a\do{%
- \scr@trim@spaces\scr@reserved@a
- \ifx\scr@reserved@a\@empty
- \PackageWarning{scrbase}{empty language at \string\renewcaptionname}%
- \else
-% \end{macrocode}
-% In opposite to \cs{defcaptionname} \meta{language name} has to exist.
-% \begin{macrocode}
- \begingroup
- \let#2\relax
-% \end{macrocode}
-% \changes{v3.27}{2019/05/27}{\pkg{biblatex} workaround}
-% Unfortunately, \pkg{biblatex} adds \cs{abx@extras@\meta{language}} to
-% \cs{extras\meta{language}} if only \meta{language} is an redundant language
-% (see \cs{DeclareRedundantLanguages} in the \pkg{biblatex} manual) and
-% \cs{extras\meta{language}} is defined. But in this case
-% \cs{abx@extras@\meta{language}} is not defined. So calling
-% \cs{extras\meta{language}} would result in an error. As a workaround for
-% this issue, make sure, that \cs{abx@extras@\meta{language}} is defined here
-% locally.
-% \changes{v3.30}{2020/04/13}{\cs{renewcommand} workaround}
-% Unfortunately some users use \cs{renewcommand} to change a name even if the
-% language has not been loaded and the command has not been defined. This
-% would result in an error message. So a this point we let \cs{renewcommand}
-% be \cs{providecommand}, because we know that currently the command is
-% \cs{relax}.
-% \begin{macrocode}
- \let\renewcommand\providecommand
- \expandafter\providecommand\expandafter*%
- \csname abx@extras@\scr@reserved@a\endcsname{}%
- \csname extras\scr@reserved@a\endcsname
- \ifx #2\relax
- \csname captions\scr@reserved@a\endcsname
- \ifx #2\relax
- \PackageError{scrbase}{%
- `\string#2' not defined at language `\scr@reserved@a'%
- }{%
- You've told me to redefine `\string#2' at language
- `\scr@reserved@a',\MessageBreak
- but it hasn't been defined before.\MessageBreak
- Nevertheless, if you'll continue I'll define it at
- `\expandafter\string
- \csname captions\scr@reserved@a\endcsname'%
- }%
- \fi
- \expandafter\ifx\csname captions\scr@reserved@a\endcsname\relax
- \expandafter\expandafter\expandafter\gdef
- \else
- \expandafter\expandafter\expandafter\g@addto@macro
- \fi
- \csname captions\scr@reserved@a\endcsname{\def#2{#3}}%
- \else
- \expandafter\ifx\csname extras\scr@reserved@a\endcsname\relax
- \expandafter\expandafter\expandafter\gdef
- \else
- \expandafter\expandafter\expandafter\g@addto@macro
- \fi
- \csname extras\scr@reserved@a\endcsname{\def#2{#3}}%
- \fi
- \endgroup
- \scr@def@activateactivelanguageaftergroup{#2}{#3}%
- \fi
- }%
- \reserved@b
- }%
-}
-%</package&base&body>
-% \end{macrocode}
-% \end{macro}^^A \scr@renew@captionname
-% \end{command}^^A \renewcaptionname
-%
-%
-% \subsection{Numerical or textual date within letters}
-% For letters \KOMAScript{} provides the option to use either a
-% symbolic/texual date or a numerical date.
-%
-% \begin{option}{numericaldate}
-% \changes{v2.8q}{2001/10/07}{added}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by
-% \cs{PackageInfoNoLine}}
-% \changes{v3.17}{2015/03/10}{using internal value storage}
-% \changes{v3.36}{2022/02/25}{initial storage value fixed}
-% The option allows to switch between the original textual date usually
-% provided by \pkg{babel} (or another language package) and a numerical date.
-% \begin{macro}{\@orgdatefalse,\@orgdatetrue,\if@orgdate}
-% The decission is stored in a boolean switch. For compatibility with
-% \cls[https://www.ctan.org/pkg/koma-script-obsolete]{scrlettr} we are still
-% using \cs{if@orgdate} with inverse meaning.
-% \begin{macrocode}
-%<*letter&option>
-\newif\if@orgdate\@orgdatetrue
-% \end{macrocode}
-% \end{macro}^^A \@orgdatefalse,\@orgdatetrue,\if@orgdate
-% Currently a \cs{KOMA@inverseifkey} does not exist. So we need somemore code
-% to define the option.
-% \begin{macrocode}
-\KOMA@key{numericaldate}[true]{%
- \if@orgdate\@orgdatefalse\else\@orgdatetrue\fi
- \KOMA@set@ifkey{numericaldate}{@orgdate}{#1}%
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package&letter> scrletter.\scr@pkgextension
- }{numericaldate}{@orgdate}%
- \if@orgdate\@orgdatefalse\else\@orgdatetrue\fi
-}
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package&letter> scrletter.\scr@pkgextension
-}{numericaldate}{true}
-% \end{macrocode}
-% \begin{option}{scrdate,orgdate}
-% \changes{v3.01a}{2008/11/21}{deprecated}
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{scrdate}{numericaldate=true}
-\KOMA@DeclareDeprecatedOption{orgdate}{numericaldate=false}
-%</letter&option>
-% \end{macrocode}
-% \end{option}^^A scrdate,orgdate
-% \end{option}^^A numericaldate
-%
-%
-% \begin{macro}{\g@addnumerical@date}
-% We need to redefine the already existing textual date of a language package
-% by a numerical one.
-% \begin{macrocode}
-%<*letter&body>
-\newcommand*{\g@addnumerical@date}[2]{%
- \@ifundefined{date#1}{%
-%<class> \ClassInfo{scrlttr2%
-%<package> \PackageInfo{scrletter%
- }{%
- no date found for language `#1'\MessageBreak
- --> skipped%
- }%
- }{%
- \expandafter\g@addto@macro\csname date#1\endcsname{%
- \let\sym@date=\today%
- \def\num@date{#2}%
- \def\today{\if@orgdate\sym@date\else\num@date\fi}%
- }%
- }%
-}
-%</letter&body>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Language dependent terms and dates in letters}
-%
-% There are also a lot of additional language dependent terms in
-% letters. Several languages are supported.
-%
-% \begin{command}{\captionsenglish,\dateenglish}
-% \begin{command}{\captionsUSenglish,\dateUSenglish}
-% \begin{command}{\captionsamerican,\dateamerican}
-% \changes{v2.4c}{1997/11/25}{american defined identical to USenglish}
-% \begin{command}{\captionsbritish,\datebritish}
-% \changes{v2.4c}{1997/11/25}{british defined identical to english}
-% \begin{command}{\captionsUKenglish,\dateUKenglish}
-% \changes{v2.4c}{1997/11/25}{UKenglish defined identical to english}
-% \begin{command}{\captionsaustralian,\dateaustralian}
-% \changes{v3.13}{2014/03/19}{australian defined identical to english}
-% \changes{v3.27}{2019/06/09}{fixed}
-% \begin{command}{\captionsnewzealand,\datenewzealand}
-% \changes{v3.13}{2014/03/19}{newzealand defined identical to english}
-% \begin{command}{\captionscanadian,\datecanadian}
-% \changes{v3.13}{2014/03/19}{canadian defined identical to english}
-% \begin{command}{\captionsukenglish,\dateukenglish}
-% \changes{v3.24}{2017/05/29}{ukenglish defined identical to UKenglish}
-% \begin{command}{\captionsusenglish,\dateusenglish}
-% \changes{v3.24}{2017/05/29}{usenglish defined identical to USenglish}
-% \begin{command}{\captionsgerman,\dategerman}
-% \begin{command}{\captionsngerman,\datengerman}
-% \changes{v2.5}{1999/09/08}{ngerman added identical togerman}
-% \begin{command}{\captionsaustrian,\dateaustrian}
-% \begin{command}{\captionsnaustrian,\datenaustrian}
-% \changes{v3.09}{2011/03/10}{naustrian added identical toaustrian}
-% \begin{command}{\captionsfrench,\datefrench}
-% \begin{command}{\captionsitalian,\dateitalian}
-% \changes{v2.3e}{1996/05/31}{added}
-% \begin{command}{\captionsspanish,\datespanish}
-% \changes{v2.4c}{1997/11/25}{added}
-% \begin{command}{\captionscroation,\datecroatian}
-% \changes{v2.8q}{2001/05/10}{added}
-% \begin{command}{\captionsdutch,\datedutch}
-% \changes{v2.8q}{2002/02/01}{added}
-% \begin{command}{\captionsfinnish,\datefinnish}
-% \changes{v2.9u}{2005/02/07}{added}
-% \changes{v3.01c}{2008/12/29}{activation fixed}
-% \begin{command}{\captionsnorsk,\datenorsk}
-% \changes{v3.02}{2009/01/01}{added}
-% \begin{command}{\captionsswedish,\dateswedish}
-% \changes{v3.08}{2011/01/20}{added (Benjamin Hell)}
-% \begin{command}{\captionspolish,\datepolish}
-% \changes{v3.13}{2014/02/01}{added (Blandyna Bogdol)}
-% \begin{command}{\captionsczech,\dateczech}
-% \changes{v3.13}{2014/02/10}{added (Elke Schubert)}
-% \begin{command}{\dateslovak}
-% \changes{v3.13}{2014/02/28}{added (Elke Schubert)}
-% Because of problems with early versions of the code, we use
-% \cs{AtBeginDocument} and \cs{providecaptionname} to define the terms and
-% dates as late as possible. So users can define them in the document preamble
-% differently. A list of all languages (but not the dialects) can be found in
-% \autoref{tab:letterlanguages}.
-% \begin{table}
-% \begin{minipage}{\textwidth}
-% \centering
-% \begin{tabular}{ll}
-% Language & Contributor \\\hline\\[-1.6ex]
-% German & Frank Neukam, Markus Kohm \\
-% English & Frank Neukam, Michael Dewey, Markus Kohm \\
-% Finnish & Hannu Väisänen \\
-% French & Frank Neukam, Henk Jongbloets \\
-% Dutch & Henk Jongbloets \\
-% Italian & Simone Naldi \\
-% Croatian & Branka Lon\v{c}arevi\'{c} \\
-% Norsk & Sveinung Heggen \\
-% Polish & Blandyna Bogdol \\
-% Swedish & Benjamin Hell\\
-% Spanish & Ralph J.\ Hangleiter, Alejandro L\'opez-Valencia\\
-% Czech & Elke Schubert\\
-% (Slovak)\footnotemark & Elke Schubert\\
-% \end{tabular}%
-% \stepcounter{mpfootnote}\renewcommand*{\thempfootnote}{\arabic{mpfootnote}}%
-% \footnotetext{Note: Slovak is only partially supported: The date
-% exists but the language terms are still missing.}
-% \caption{List of supported languages (but not the dialects) and the
-% contributors}
-% \label{tab:letterlanguages}
-% \end{minipage}
-% \end{table}
-% English is a special case. We try to define it always also as a fallback.
-% \begin{macrocode}
-%<*letter&body>
-\AtBeginDocument{%
- \@ifundefined{captionsenglish}{\let\captionsenglish\@empty}{}%
- \@ifundefined{dateenglish}{\def\dateenglish{%
-%</letter&body>
-% \end{macrocode}
-% Defining the textual English \cs{today} it the only thing, that has do be
-% done for all classes and also the \pkg*{scrletter} package.
-% \begin{macrocode}
-%<*(letter|class)&body>
- \def\today{\ifcase\month\or
- 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}%
-%</(letter|class)&body>
-%<*letter&body>
- }%
- }{}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\yourrefname{Your ref.}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\yourmailname{Your letter of}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\myrefname{Our ref.}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\customername{Customer no.}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\invoicename{Invoice no.}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\subjectname{Subject}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\ccname{cc}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\enclname{encl}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\headtoname{To}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\headfromname{From}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\datename{Date}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\pagename{Page}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\phonename{Phone}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\mobilephonename{Mobile phone}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\faxname{Fax}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\emailname{Email}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\wwwname{Url}%
- \providecaptionname{american,australian,british,canadian,%
- english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\bankname{Bank account}%
- \g@addnumerical@date{american}{\number\month/\number\day/\number\year}%
- \g@addnumerical@date{australian}{\number\day/\number\month/\number\year}%
- \g@addnumerical@date{british}{\number\day/\number\month/\number\year}%
- \g@addnumerical@date{canadian}{\number\year/\number\month/\number\day}%
- \g@addnumerical@date{english}{\number\day/\number\month/\number\year}%
- \g@addnumerical@date{newzealand}{\number\day/\number\month/\number\year}%
- \g@addnumerical@date{UKenglish}{\number\day/\number\month/\number\year}%
- \g@addnumerical@date{ukenglish}{\number\day/\number\month/\number\year}%
- \g@addnumerical@date{USenglish}{\number\month/\number\day/\number\year}%
- \g@addnumerical@date{usenglish}{\number\month/\number\day/\number\year}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\yourrefname{Ihr Zeichen}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\yourmailname{Ihr Schreiben vom}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\myrefname{Unser Zeichen}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\customername{Kundennummer}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\invoicename{Rechnungsnummer}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\subjectname{Betrifft}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\ccname{Kopien an}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\enclname{Anlage}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\headtoname{An}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\headfromname{Von}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\datename{Datum}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\pagename{Seite}%
- \providecaptionname{german}\phonename{Telephon}%
- \providecaptionname{ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\phonename{Telefon}%
- \providecaptionname{german}\mobilephonename{Mobiltelephon}%
- \providecaptionname{ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\mobilephonename{Mobiltelefon}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\faxname{Fax}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\emailname{E-Mail}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\wwwname{URL}%
- \providecaptionname{german,ngerman,austrian,naustrian,%
- swissgerman,nswissgerman}\bankname{Bankverbindung}%
- \g@addnumerical@date{german}{\number\day.\,\number\month.\,\number\year}%
- \g@addnumerical@date{ngerman}{\number\day.\,\number\month.\,\number\year}%
- \g@addnumerical@date{austrian}{\number\day.\,\number\month.\,\number\year}%
- \g@addnumerical@date{naustrian}{\number\day.\,\number\month.\,\number\year}%
- \g@addnumerical@date{swissgerman}{\number\day.\,\number\month.\,\number\year}%
- \g@addnumerical@date{nswissgerman}{%
- \number\day.\,\number\month.\,\number\year}%
- \providecaptionname{%
- acadian,canadien,francais,french}\yourrefname{Vos r\'ef\'erences}%
- \providecaptionname{%
- acadian,canadien,francais,french}\yourmailname{Votre lettre du}%
- \providecaptionname{%
- acadian,canadien,francais,french}\myrefname{Nos r\'ef\'erences}%
- \providecaptionname{%
- acadian,canadien,francais,french}\customername{Num\'ero de client}%
- \providecaptionname{%
- acadian,canadien,francais,french}\invoicename{Num\'ero de facture}%
- \providecaptionname{%
- acadian,canadien,francais,french}\subjectname{Concernant}%
- \providecaptionname{%
- acadian,canadien,francais,french}\ccname{Copie \`a}%
- \providecaptionname{%
- acadian,canadien,francais,french}\enclname{Annexes}%
- \providecaptionname{%
- acadian,canadien,francais,french}\headtoname{A}%
- \providecaptionname{%
- acadian,canadien,francais,french}\headfromname{De}%
- \providecaptionname{%
- acadian,canadien,francais,french}\datename{Date}%
- \providecaptionname{%
- acadian,canadien,francais,french}\pagename{Page}%
- \providecaptionname{%
- acadian,canadien,francais,french}\phonename{T\'el\'ephone}%
- \providecaptionname{%
- acadian,canadien,francais,french}\mobilephonename{Portable}%
- \providecaptionname{%
- acadian,canadien,francais,french}\faxname{T\'el\'efax}%
- \providecaptionname{%
- acadian,canadien,francais,french}\emailname{E-mail}%
- \providecaptionname{%
- acadian,canadien,francais,french}\wwwname{URL}%
- \providecaptionname{%
- acadian,canadien,francais,french}\bankname{Compte en banque}%
- \g@addnumerical@date{acadian}{\number\day.\,\number\month.\,\number\year}%
- \g@addnumerical@date{canadien}{\number\year/\number\month/\number\day}%
- \g@addnumerical@date{francais}{\number\day.\,\number\month.\,\number\year}%
- \g@addnumerical@date{french}{\number\day.\,\number\month.\,\number\year}%
- \providecaptionname{italian}\yourrefname{Vs./Rif.}% or Vostro Riferimento
- \providecaptionname{italian}\yourmailname{Vs.~lettera del}% or Vostra
- % lettera del
- \providecaptionname{italian}\myrefname{Ns./Rif.}% or Nostro Riferimento
- \providecaptionname{italian}\customername{Nr.~cliente}% or Cliente num.
- \providecaptionname{italian}\invoicename{Nr.~fattura}% or Fattura num.
- \providecaptionname{italian}\subjectname{Oggetto}%
- \providecaptionname{italian}\ccname{Per conoscenza}% or Copia a
- \providecaptionname{italian}\enclname{Allegato}% or (plural) Allegati
- \providecaptionname{italian}\headtoname{A}%
- \providecaptionname{italian}\headfromname{Da}%
- \providecaptionname{italian}\datename{Data}%
- \providecaptionname{italian}\pagename{Pagina}%
- \providecaptionname{italian}\phonename{Telefono}%
- \providecaptionname{italian}\mobilephonename{Telefonino}%
- \providecaptionname{italian}\faxname{Fax}%
- \providecaptionname{italian}\emailname{Email}%
- \providecaptionname{italian}\wwwname{Sito Web}%
- \providecaptionname{italian}\bankname{Conto bancario}%
- \g@addnumerical@date{italian}{\number\day.\,\number\month.\,\number\year}%
- \providecaptionname{spanish}\yourrefname{Su ref.}%
- \providecaptionname{spanish}\yourmailname{Su carta de}%
- \providecaptionname{spanish}\myrefname{Nuestra ref.}%
- \providecaptionname{spanish}\customername{No. de cliente}%
- \providecaptionname{spanish}\invoicename{No. de factura}%
- \providecaptionname{spanish}\subjectname{Asunto}%
- \providecaptionname{spanish}\ccname{Copias}%
- \providecaptionname{spanish}\enclname{Adjunto}%
- \providecaptionname{spanish}\headtoname{A}%
- \providecaptionname{spanish}\headfromname{De}%
- \providecaptionname{spanish}\datename{Fecha}%
- \providecaptionname{spanish}\pagename{P\'agina}%
- \providecaptionname{spanish}\phonename{Tel\'efono}%
- \providecaptionname{spanish}\mobilephonename{M\'ovil}%
- \providecaptionname{spanish}\faxname{Fax}%
- \providecaptionname{spanish}\emailname{Email}% or Correo electr\'onico
- \providecaptionname{spanish}\wwwname{URL}% or P\`agina web
- \providecaptionname{spanish}\bankname{Cuenta bancaria}%
- \g@addnumerical@date{spanish}{\number\day.\,\number\month.\,\number\year}%
- \providecaptionname{croatian}\yourrefname{Va\v{s} znak}%
- \providecaptionname{croatian}\yourmailname{Va\v{s}e pismo od}%
- \providecaptionname{croatian}\myrefname{Na\v{s} znak}%
- \providecaptionname{croatian}\customername{Broj kupca}%
- \providecaptionname{croatian}\invoicename{Broj fakture}%
- \providecaptionname{croatian}\subjectname{Predmet}%
- \providecaptionname{croatian}\ccname{Kopija}%
- \providecaptionname{croatian}\enclname{Privitak}%
- \providecaptionname{croatian}\headtoname{Prima}%
- \providecaptionname{croatian}\headfromname{\v{S}alje}%
- \providecaptionname{croatian}\datename{Nadnevak}%
- \providecaptionname{croatian}\pagename{Stranica}%
- \providecaptionname{croatian}\phonename{Telefon}%
- \providecaptionname{croatian}\mobilphonename{Mobitel}%
- \providecaptionname{croatian}\faxname{Fax}%
- \providecaptionname{croatian}\emailname{E-Mail}%
- \providecaptionname{croatian}\wwwname{URL}%
- \providecaptionname{croatian}\bankname{Bankovna veza}%
- \g@addnumerical@date{croatian}{\number\day.\,\number\month.\,\number\year.}%
- \providecaptionname{dutch}\yourrefname{Uw kenmerk}%
- \providecaptionname{dutch}\yourmailname{Uw brief van}%
- \providecaptionname{dutch}\myrefname{Ons kenmerk}%
- \providecaptionname{dutch}\customername{Klant No.}%
- \providecaptionname{dutch}\invoicename{Rekening No.}%
- \providecaptionname{dutch}\subjectname{Onderwerp}%
- \providecaptionname{dutch}\ccname{Kopie aan}%
- \providecaptionname{dutch}\enclname{Bijlage(n)}%
- \providecaptionname{dutch}\headtoname{Aan}%
- \providecaptionname{dutch}\headfromname{Van}%
- \providecaptionname{dutch}\datename{Datum}%
- \providecaptionname{dutch}\pagename{Pagina}%
- \providecaptionname{dutch}\phonename{Telefoon}%
- \providecaptionname{dutch}\mobilephonename{Mobieltje}%
- \providecaptionname{dutch}\faxname{Fax}%
- \providecaptionname{dutch}\emailname{E--mail}%
- \providecaptionname{dutch}\wwwname{URL}%
- \providecaptionname{dutch}\bankname{Bankrekening}%
- \g@addnumerical@date{dutch}{\number\day.\,\number\month.\,\number\year}%
- \providecaptionname{finnish}\yourrefname{Viitteenne}%
- \providecaptionname{finnish}\yourmailname{Kirjeenne}%
- \providecaptionname{finnish}\myrefname{Viitteemme}%
- \providecaptionname{finnish}\customername{Asiakasnumero}%
- \providecaptionname{finnish}\invoicename{Laskun numero}%
- \providecaptionname{finnish}\subjectname{Asia}%
- \providecaptionname{finnish}\ccname{Jakelu}%
- \providecaptionname{finnish}\enclname{Liitteet}%
- \providecaptionname{finnish}\headtoname{Vastaanottaja}%
- \providecaptionname{finnish}\headfromname{L\"ahett\"aj\"a}%
- \providecaptionname{finnish}\datename{P\"aiv\"a}%
- \providecaptionname{finnish}\pagename{Sivu}%
- \providecaptionname{finnish}\phonename{Puhelin}%
- \providecaptionname{finnish}\mobilephonename{Matkapuhelin}%
- \providecaptionname{finnish}\faxname{Faksi}%
- \providecaptionname{finnish}\emailname{S\"ahk\"oposti}%
- \providecaptionname{finnish}\wwwname{URL}%
- \providecaptionname{finnish}\bankname{Pankkitilin numero}%
- \g@addnumerical@date{finnish}{\number\day.\number\month.\number\year}%
- \providecaptionname{norsk}\yourrefname{Deres ref.}%
- \providecaptionname{norsk}\yourmailname{Deres brev av:}%
- \providecaptionname{norsk}\myrefname{V\aa{}r ref:}%
- \providecaptionname{norsk}\customername{Kundenummer}%
- \providecaptionname{norsk}\invoicename{Fakturanummer}%
- \providecaptionname{norsk}\subjectname{Emne}%
- \providecaptionname{norsk}\ccname{Kopi til}%
- \providecaptionname{norsk}\enclname{Vedlegg}%
- \providecaptionname{norsk}\headtoname{Til}%
- \providecaptionname{norsk}\headfromname{Fra}%
- \providecaptionname{norsk}\datename{Dato}%
- \providecaptionname{norsk}\pagename{Side}%
- \providecaptionname{norsk}\phonename{Telefon}%
- \providecaptionname{norsk}\mobilephonename{Mobiltelefon}%
- \providecaptionname{norsk}\faxname{Telefaks}%
- \providecaptionname{norsk}\emailname{E-post}%
- \providecaptionname{norsk}\wwwname{Url}%
- \providecaptionname{norsk}\bankname{Bankkontonummer}%
- \g@addnumerical@date{norsk}{\number\day.\number\month.\number\year}%
- \providecaptionname{swedish}\yourrefname{Er ref}%
- \providecaptionname{swedish}\yourmailname{Ert brev av}%
- \providecaptionname{swedish}\myrefname{V\aa{}r ref}%
- \providecaptionname{swedish}\customername{Kundnummer}%
- \providecaptionname{swedish}\invoicename{Fakturanummer}%
- \providecaptionname{swedish}\subjectname{\"Amne}%
-% \end{macrocode}
-% ``Kopia'' or ``Kopia till''? Both would be possible. Because of using the
-% long form in German, we use it in Swedish too.
-% \begin{macrocode}
- \providecaptionname{swedish}\ccname{Kopia till}%
-% \end{macrocode}
-% ``Bilaga'' would be singular. For several enclosures we need
-% ``Bilagor''. We've decided to use the plural.
-% \begin{macrocode}
- \providecaptionname{swedish}\enclname{Bilagor}% Singular: Bilaga
- \providecaptionname{swedish}\headtoname{Till}%
- \providecaptionname{swedish}\headfromname{Fr\aa{}n}%
- \providecaptionname{swedish}\datename{Datum}%
- \providecaptionname{swedish}\pagename{Sida}%
- \providecaptionname{swedish}\phonename{Telefon}%
- \providecaptionname{swedish}\mobilephonename{Mobiltelefon}%
- \providecaptionname{swedish}\faxname{Telefax}%
- \providecaptionname{swedish}\emailname{E-post}%
- \providecaptionname{swedish}\wwwname{Hemsida}%
-% \end{macrocode}
-% There are two usual terms for banking account, either ``Bankgiro'' or
-% ``PlusGiro''. It's hard to say which one is more usual.
-% \begin{macrocode}
- \providecaptionname{swedish}\bankname{Bankgiro}% PlusGiro
-% \end{macrocode}
-% We use the traditional date ``18/1 2011'' instead of the also common ISO
-% date.
-% \begin{macrocode}
- \g@addnumerical@date{swedish}{\number\day/\number\month~\number\year}%
- \providecaptionname{polish}\yourrefname{Wasz znak}%
- \providecaptionname{polish}\yourmailname{Wasze pismo z dnia}%
- \providecaptionname{polish}\myrefname{Nasz znak}%
- \providecaptionname{polish}\customername{Numer klienta}%
- \providecaptionname{polish}\invoicename{Numer rachunku}%
- \providecaptionname{polish}\subjectname{Dotyczy}%
- \providecaptionname{polish}\ccname{Rozdzielnik}%
- \providecaptionname{polish}\enclname{Za\l\aob{}czniki}%
- \providecaptionname{polish}\headtoname{Do}%
- \providecaptionname{polish}\headfromname{Od}%
- \providecaptionname{polish}\datename{Data}%
- \providecaptionname{polish}\pagename{Strona}%
- \providecaptionname{polish}\phonename{Telefon}%
- \providecaptionname{polish}\mobilephonename{Numer mobilny}%
- \providecaptionname{polish}\faxname{Fax}%
- \providecaptionname{polish}\emailname{E-mail}%
- \providecaptionname{polish}\wwwname{URL}%
- \providecaptionname{polish}\bankname{Konto}%
- \g@addnumerical@date{polish}{\number\day.\,\number\month.\,\number\year}%
- \providecaptionname{czech}\yourrefname{Va\v{s}e zna\v{c}ka}%
- \providecaptionname{czech}\yourmailname{V\'{a}\v{s} dopis ze dne}%
- \providecaptionname{czech}\myrefname{Na\v{s}e zna\v{c}ka}%
- \providecaptionname{czech}\customername{Z\'akaznick\'e \v{c}\'{\i}slo}%
- \providecaptionname{czech}\invoicename{Fakura\v{c}n\'{\i} \v{c}\'{\i}slo}%
- \providecaptionname{czech}\subjectname{Pr\v{e}dm\v{e}t}%
- \providecaptionname{czech}\ccname{Kopie}%
- \providecaptionname{czech}\enclname{P\v{r}\'{\i}loha}%
- \providecaptionname{czech}\headtoname{Komu}%
- \providecaptionname{czech}\headfromname{Od}%
- \providecaptionname{czech}\datename{Datum}%
- \providecaptionname{czech}\pagename{Strana}%
- \providecaptionname{czech}\phonename{Telefon}%
- \providecaptionname{czech}\mobilephonename{Mobil}%
- \providecaptionname{czech}\faxname{Fax}%
- \providecaptionname{czech}\emailname{E-Mail}%
- \providecaptionname{czech}\wwwname{URL}%
- \providecaptionname{czech}\bankname{Bankovn\'{\i} spojen\'{\i}}%
- \g@addnumerical@date{czech}{\number\day.\,\number\month.\,\number\year}%
- \providecaptionname{slovak}\yourrefname{Va\v{s}a zna\v{c}ka}%
- \providecaptionname{slovak}\yourmailname{V\'{a}\v{s} list zo d\v{n}a}%
- \providecaptionname{slovak}\myrefname{Na\v{s}a zna\v{c}ka}%
- \providecaptionname{slovak}\customername{Z\'akazn\'{\i}cke \v{c}\'{\i}slo}%
- \providecaptionname{slovak}\invoicename{\'{C}\'{\i}slo fakt\'ury}%
- \providecaptionname{slovak}\subjectname{Predmet}%
- \providecaptionname{slovak}\ccname{K\'{o}pia pre koho}%
- \providecaptionname{slovak}\enclname{Pr\'{\i}loha}%
- \providecaptionname{slovak}\headtoname{Komu}%
- \providecaptionname{slovak}\headfromname{Od}%
- \providecaptionname{slovak}\datename{D\'{a}tum}%
- \providecaptionname{slovak}\pagename{Strana}%
- \providecaptionname{slovak}\phonename{Telef\'{o}n}%
- \providecaptionname{slovak}\mobilephonename{Mobil}%
- \providecaptionname{slovak}\faxname{Fax}%
- \providecaptionname{slovak}\emailname{E-Mail}%
- \providecaptionname{slovak}\wwwname{URL}%
- \providecaptionname{slovak}\bankname{Bankov\'{e} spojenie}%
- \g@addnumerical@date{slovak}{\number\day.\,\number\month.\,\number\year}%
-% \end{macrocode}
-% Last but not least the activation has to be done.
-% \changes{v2.2c}{1995/03/20}{missing \texttt{\quotechar=} added after
-% \cs{language}}
-% \changes{v2.5b}{2000/01/20}{language reactivation by \cs{languagename} if
-% possible}
-% \changes{v2.5e}{2000/07/14}{workaround for language \texttt{nohyphenation}}
-% First of all we activate English as fallback.
-% \begin{macrocode}
- \captionsenglish
- \dateenglish
-% \end{macrocode}
-% \changes{v2.9i}{2002/09/04}{workaround for \file{hyphen.cfg} bug of
-% \pkg{babel}}
-% \changes{v2.97c}{2007/08/10}{warning message changed}
-% \changes{v3.18a}{2015/07/03}{execution \cs{extras\dots}}
-% \changes{v3.18a}{2015/07/03}{using \cs{@nameuse}}
-% If the \file{hyphen.cfg} of \pkg{babel} is used, but \pkg{babel} has not
-% been loaded, \cs{languagename} can be incorrect (depending on the
-% \pkg{babel} version used to generate the \LaTeX{} format). In this case
-% |\selectlanguage{\languagename}| would fail. So we need a workaround.
-% \begin{macrocode}
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname date\languagename\endcsname\relax
-%<class> \ClassWarningNoLine{scrlttr2%
-%<package> \PackageWarningNoLine{scrletter%
- }{%
- \string\language\space is \the\language, \string\languagename\space is
- `\languagename'\MessageBreak
- but \expandafter\string\csname
- date\languagename\endcsname\space not defined!\MessageBreak
- This seems to be a bug at you're `hyphen.cfg'.\MessageBreak
- Undefining macro \string\languagename\space to avoid errors%
- }%
- \let\languagename=\undefined
- \fi
- \ifx\languagename\undefined
-%<class> \ClassWarningNoLine{scrlttr2%
-%<package> \PackageWarningNoLine{scrletter%
- }{\string\languagename\space not
- defined, using \string\language.\MessageBreak
- This may result in use of wrong language!\MessageBreak
- You should use a compatible language
- package\MessageBreak
- (e.g. `Babel', `german', `ngerman', ...)}%
- \ifx\l@american\undefined\else\ifnum\language=\l@american
- \@nameuse{captionsamerican}%
- \@nameuse{extrasamerican}%
- \@nameuse{dateamerican}%
- \fi\fi
- \ifx\l@australian\undefined\else\ifnum\language=\l@australian
- \@nameuse{captionsaustralian}%
- \@nameuse{extrasaustralian}%
- \@nameuse{dateaustralian}%
- \fi\fi
- \ifx\l@british\undefined\else\ifnum\language=\l@british
- \@nameuse{captionsbritish}%
- \@nameuse{extrasbritish}%
- \@nameuse{datebritish}%
- \fi\fi
- \ifx\l@canadian\undefined\else\ifnum\language=\l@canadian
- \@nameuse{captionscanadian}%
- \@nameuse{extrascanadian}%
- \@nameuse{datecanadian}%
- \fi\fi
- \ifx\l@newzealand\undefined\else\ifnum\language=\l@newzealand
- \@nameuse{captionsnewzealand}%
- \@nameuse{extrasnewzealand}%
- \@nameuse{datenewzealand}%
- \fi\fi
- \ifx\l@UKenglish\undefined\else\ifnum\language=\l@UKenglish
- \@nameuse{captionsUKenglish}%
- \@nameuse{extrasUKenglish}%
- \@nameuse{dateUKenglish}%
- \fi\fi
- \ifx\l@ukenglish\undefined\else\ifnum\language=\l@ukenglish
- \@nameuse{captionsukenglish}%
- \@nameuse{extrasukenglish}%
- \@nameuse{dateukenglish}%
- \fi\fi
- \ifx\l@USenglish\undefined\else\ifnum\language=\l@USenglish
- \@nameuse{captionsUSenglish}%
- \@nameuse{extrasUSenglish}%
- \@nameuse{dateUSenglish}%
- \fi\fi
- \ifx\l@usenglish\undefined\else\ifnum\language=\l@usenglish
- \@nameuse{captionsusenglish}%
- \@nameuse{extrasusenglish}%
- \@nameuse{dateusenglish}%
- \fi\fi
- \ifx\l@austrian\undefined\else\ifnum\language=\l@austrian
- \@nameuse{captionsaustrian}%
- \@nameuse{extrasaustrian}%
- \@nameuse{dateaustrian}%
- \fi\fi
- \ifx\l@naustrian\undefined\else\ifnum\language=\l@naustrian
- \@nameuse{captionsnaustrian}%
- \@nameuse{extrasnaustrian}%
- \@nameuse{datenaustrian}%
- \fi\fi
- \ifx\l@german\undefined\else\ifnum\language=\l@german
- \@nameuse{captionsgerman}%
- \@nameuse{extrasgerman}%
- \@nameuse{dategerman}%
- \fi\fi
- \ifx\l@ngerman\undefined\else\ifnum\language=\l@ngerman
- \@nameuse{captionsngerman}%
- \@nameuse{extrasngerman}%
- \@nameuse{datengerman}%
- \fi\fi
- \ifx\l@swissgerman\undefined\else\ifnum\language=\l@swissgerman
- \@nameuse{captionsswissgerman}%
- \@nameuse{extrasswissgerman}%
- \@nameuse{dateswissgerman}%
- \fi\fi
- \ifx\l@nswissgerman\undefined\else\ifnum\language=\l@nswissgerman
- \@nameuse{captionsnswissgerman}%
- \@nameuse{extrasnswissgerman}%
- \@nameuse{datenswissgerman}%
- \fi\fi
- \ifx\l@acadian\undefined\else\ifnum\language=\l@acadian
- \@nameuse{captionsacadian}%
- \@nameuse{extrasacadian}%
- \@nameuse{dateacadian}%
- \fi\fi
- \ifx\l@canadien\undefined\else\ifnum\language=\l@canadien
- \@nameuse{captionscanadien}%
- \@nameuse{extrascanadien}%
- \@nameuse{datecanadien}%
- \fi\fi
- \ifx\l@francais\undefined\else\ifnum\language=\l@francais
- \@nameuse{captionsfrancais}%
- \@nameuse{extrasfrancais}%
- \@nameuse{datefrancais}%
- \fi\fi
- \ifx\l@french\undefined\else\ifnum\language=\l@french
- \@nameuse{captionsfrench}%
- \@nameuse{extrasfrench}%
- \@nameuse{datefrench}%
- \fi\fi
- \ifx\l@italian\undefined\else\ifnum\language=\l@italian
- \@nameuse{captionsitalian}%
- \@nameuse{extrasitalian}%
- \@nameuse{dateitalian}%
- \fi\fi
- \ifx\l@spanish\undefined\else\ifnum\language=\l@spanish
- \@nameuse{captionsspanish}%
- \@nameuse{extrasspanish}%
- \@nameuse{datespanish}%
- \fi\fi
- \ifx\l@croatian\undefined\else\ifnum\language=\l@croatian
- \@nameuse{captionscroatian}%
- \@nameuse{extrascroatian}%
- \@nameuse{datecroatian}%
- \fi\fi
- \ifx\l@dutch\undefined\else\ifnum\language=\l@dutch
- \@nameuse{captionsdutch}%
- \@nameuse{extrasdutch}%
- \@nameuse{datedutch}%
- \fi\fi
- \ifx\l@finnish\undefined\else\ifnum\language=\l@finnish
- \@nameuse{captionsfinnish}%
- \@nameuse{extrasfinnish}%
- \@nameuse{datefinnish}%
- \fi\fi
- \ifx\l@norsk\undefined\else\ifnum\language=\l@norsk
- \@nameuse{captionsnorsk}%
- \@nameuse{extrasnorsk}%
- \@nameuse{datenorsk}%
- \fi\fi
- \ifx\l@swedish\undefined\else\ifnum\language=\l@swedish
- \@nameuse{captionsswedish}%
- \@nameuse{extrasswedish}%
- \@nameuse{dateswedish}%
- \fi\fi
- \ifx\l@polish\undefined\else\ifnum\language=\l@polish
- \@nameuse{captionspolish}%
- \@nameuse{extraspolish}%
- \@nameuse{datepolish}%
- \fi\fi
- \ifx\l@czech\undefined\else\ifnum\language=\l@czech
- \@nameuse{captionsczech}%
- \@nameuse{extrasczech}%
- \@nameuse{dateczech}%
- \fi\fi
- \ifx\l@slovak\undefined\else\ifnum\language=\l@slovak
- \@nameuse{captionsslovak}%
- \@nameuse{extrasslovak}%
- \@nameuse{dateslovak}%
- \fi\fi
- \else
- \edef\@tempa{nohyphenation}%
- \ifx\languagename\@tempa
-%<class> \ClassWarningNoLine{scrlttr2%
-%<package> \PackageWarningNoLine{scrletter%
- }{%
- You've selected language `\languagename'.\MessageBreak
- Maybe your LaTeX format contains Babel extension\MessageBreak
- but you have not selected a language using\MessageBreak
- Babel package.\MessageBreak
- Please select another language!\MessageBreak
- Only as a workaround english captions and date\MessageBreak
- will be used%
- }%
- \else
-%<class> \ClassInfo{scrlttr2%
-%<package> \PackageInfo{scrletter%
- }{%
- trying to activate captions and date\MessageBreak
- of language `\languagename'%
- }%
-% \end{macrocode}
-% \changes{v3.12}{2012/12/28}{workaround for changed \file{hyphen.cfg} in
-% \pkg{babel}}
-% Unfortunately the workaround does not work any longer after a change of
-% \file{hyphen.cfg} in \pkg{babel}. So we need another workaround.
-% \begin{macrocode}
- \csname date\languagename\endcsname
- \csname captions\languagename\endcsname
-%<class> \ClassInfo{scrlttr2%
-%<package> \PackageInfo{scrletter%
- }{%
- used language is `\languagename'.\MessageBreak
- Supported languages are: `english', `UKenglish',\MessageBreak
- `ukenglish', `british', `american', `USenglish',\MessageBreak
- `usenglish', `australian`,`canadian', `newzealand',\MessageBreak
- `german', `ngerman', `austrian', `naustrian',\MessageBreak
- `swissgerman', `nswissgermsn',\MessageBreak
- `acadian', `canadien', `francais', `french', \MessageBreak
- `dutch', `italian', `spanish', `polish',\MessageBreak
- `croatian', `finnish', `norsk', `swedish',\MessageBreak
- `czech', `slovak'%
- }%
- \fi
- \fi
-}
-%</letter&body>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-%
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx b/macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx
deleted file mode 100644
index fb9d791ef0..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx
+++ /dev/null
@@ -1,1719 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-letterclassoptions.dtx
-% Copyright (c) Markus Kohm, 2006-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 3730 2022-02-26 14:38:06Z kohm $
-%<option>%%% (run: option)
-%<head>%%% (run: head)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-26 15:38:06 +0100 (Sa, 26. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3730 $
-\endgroup
-\ProvidesFile{scrkernel-letterclassoptions.dtx}
- [\filedate\space \filerevision\space
- KOMA-Script source (letter configuration options)]
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-letterclassoptions.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2006/03/22}{new by splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/26}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/26}{\cs{@setplength} replaced by \cs{setplength}}
-% \changes{v3.36}{2022/02/26}{\cs{@addtoplength} replaced by \cs{addtoplength}}
-% \changes{v3.36}{2022/02/26}{\cs{@newplength} replaced by \cs{newplength}}
-% \changes{v3.36}{2022/02/26}{whole implementation documentation in English}
-%
-%
-% \GetFileInfo{scrkernel-letterclassoptions.dtx}
-% \title{Handling and Implementation of Letter Configuration Options of
-% \href{https://komascript.de}{\KOMAScript} Letter Class and Package}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% The \KOMAScript{} letter class \cls*{scrlttt2} and the \KOMAScript{}
-% letter package \pkg*{scrletter} has something special: the letter
-% configuration option files formerly known as letter class option
-% files. These are used to setup either layouts or user configurations. Both
-% the implementation of these files and the handling of them can be found in
-% \file{scrkernel-letterclassoptions.dtx}.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands and files implemented here
-% in the \KOMAScript{} manual, either the German \file{scrguide} or the
-% English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of the Handling of Letter Configuration Options}
-%
-% We need this feature only with letter classes and packages.
-%
-% \begin{macrocode}
-%<*(class|package)&letter>
-% \end{macrocode}
-%
-%
-% \subsection{Options for the letter configuration option files}
-%
-% \begin{macro}{\lco@test}
-% \changes{v2.95}{2006/03/22}{added}
-% \changes{v2.97c}{2007/09/12}{modified for new option handling}
-% \changes{v3.36}{2022/02/26}{deprecated}
-% The \KOMAScript{} letter class \cls*{scrlttr2} allows to load a letter
-% configuration option file by classic class options to \cs{documentclass},
-% \cs{LoadClass} or \cs{PassOptionsToClass}. This is done inside via the
-% general \cs{DeclareOption*}, that is used for several other deprecated (and
-% some standard) options too. \cs{lco@test} simply tests, if
-% \file{\CurrentOption.lco} does exist and in this case load it a the end of
-% the class. Note: The \KOMAScript{} letter package \pkg*{scrletter} does not
-% support loading of letter configuration option files via global or package
-% option. Moreover, from \KOMAScript{} v3.36 loading via class option is also
-% deprecated for \cls*{scrlttr2}.
-% \begin{macrocode}
-%<*class&option>
-\newcommand*{\lco@test}{%
- \IfFileExists{\CurrentOption.lco}{%
- \ClassWarningNoLine{\KOMAClassName}{%
- loading of LCO via class option
- `\CurrentOption'.\MessageBreak
- Note: Loading a LCO via class option is deprecated.\MessageBreak
- \space\space\space\space\space\space
- You should use
- `\string\LoadLetterOption\string{\CurrentOption\string}'\MessageBreak
- instead%
- }%
- \expandafter\AtEndOfClass\expandafter{%
- \expandafter\LoadLetterOption\expandafter{\CurrentOption}%
- }%
- \expandafter\def\expandafter\scr@pti@nerr@r\expandafter{%
- \expandafter\def\expandafter\scr@pti@nerr@r\expandafter{%
- \scr@pti@nerr@r
- }%
- }%
- }{}%
-}
-%</class&option>
-% \end{macrocode}
-% \end{macro}
-%
-% \file{DIN.lco} is the default and therefore loaded first at the end of the
-% class or package.
-% \begin{macrocode}
-%<*option>
-%<class>\AtEndOfClass
-%<package>\AtEndOfPackage
- {\LoadLetterOption{DIN}}
-%</option>
-% \end{macrocode}
-%
-%
-% \subsection{Makros für Letter-Class-Options}
-%
-% \begin{command}{\LoadLetterOption}
-% \changes{v2.8q}{2001/10/08}{added}
-% \changes{v3.14}{2014/10/04}{ignoring white spaced}
-% \changes{v3.26}{2018/08/29}{\cs{KV@@sp@def} replaced by \cs{scr@sp@def}}
-% Command
-% \begin{quote}
-% \cs{LoadLetterOption}\marg{letter configuration option}
-% \end{quote}
-% loads \file{\meta{letter configuration option}.lco}. The \cs{catcode} of
-% ``|@|'' is changed to letter for loading the file. But because \file{lco}
-% files can load other \file{lco} files using \cs{LoadLetterOption} this has
-% to be reset only for the outer \cs{LoadLetterOption}.
-% \begin{description}
-% \item[ToDo:] can't we do this more simply just using either some
-% \cs{expandafter} magic or an internal stack?
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\LoadLetterOption}[1]{%
- \@ifundefined{@restore@catcode@level}%
- {\let\@restore@catcode@level=\z@}{}%
- \ifnum\@restore@catcode@level =\z@
- \ifnum\catcode`\@=11
- \let\@restore@catcode\relax
- \else
- \@tempcnta=\catcode`\@
- \edef\@restore@catcode{%
- \noexpand\catcode`\noexpand\@=\the\@tempcnta}%
- \makeatletter
- \fi
- \fi
- \@tempcnta=\@restore@catcode@level\relax
- \advance\@tempcnta by \@ne\relax
- \edef\@restore@catcode@level{\the\@tempcnta}%
- \scr@sp@def\reserved@a{#1}%
- \edef\reserved@a{%
- \noexpand\edef\noexpand\scr@currentlco{\reserved@a}%
- \noexpand\InputIfFileExists{\reserved@a.lco}{%
-%<class> \noexpand\ClassInfo{scrlttr2%
-%<package> \noexpand\PackageInfo{scrletter%
- }{Letter-Class-Option `#1' loaded}%
- }{%
-%<class> \noexpand\ClassError{scrlttr2%
-%<package> \noexpand\PackageError{scrletter%
- }{%
- Letter-Class-Option file `#1.lco' not found%
- }{%
- You've told me to load the Letter-Class-Option `#1'. So I have
- to load\noexpand\MessageBreak
- the file `#1.lco'. But the file isn't available.}%
- }%
- \scr@ifundefinedorrelax{scr@currentlco}{%
- \unexpanded{\let\scr@currentlco\relax}%
- }{%
- \noexpand\def\noexpand\scr@currentlco{\scr@currentlco}%
- }%
- }%
-% \end{macrocode}
-% \changes{v3.18}{2015/06/03}{manage \cs{RequirePackage} and \cs{usepackage}
-% inside \texttt{lco}-files after \cs{begin\{document\}}}
-% \changes{v3.28}{2019/11/24}{\cs{usepackage} typo fixed}
-% \begin{description}
-% \item[ToDo:] I don't think, that the following really works. So maybe it
-% should simple be removed to get the usual error message using
-% \cs{RequirePackage} or \cs{usepackage} inside a document.
-% \end{description}
-% \begin{macrocode}
- \if@atdocument
- \edef\reserved@a{%
- \unexpanded\expandafter{\reserved@a}%
- \ifx\RequirePackage\@notprerr
- \unexpanded{\let\RequirePackage\@notprerr}%
- \else
- \noexpand\def\noexpand\RequirePackage{%
- \unexpanded\expandafter{\RequirePackage}%
- }%
- \fi
- \ifx\usepackage\@notprerr
- \unexpanded{\let\usepackage\@notprerr}%
- \else
- \noexpand\def\noexpand\usepackage{%
- \unexpanded\expandafter{\usepackage}%
- }%
- \fi
- }%
- \let\RequirePackage\lco@RequirePackage
- \let\usepackage\lco@RequirePackage
- \expandafter\reserved@a
- \else \expandafter\reserved@a
- \fi
- \@tempcnta=\@restore@catcode@level\relax
- \advance\@tempcnta by \m@ne\relax
- \edef\@restore@catcode@level{\the\@tempcnta}%
- \ifnum\@tempcnta =\z@
- \@restore@catcode
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\lco@RequirePackage}
-% \changes{v3.18}{2015/06/03}{added}
-% \changes{v3.26}{2018/08/29}{\cs{KV@@sp@def} replaced by
-% \cs{scr@trim@spaces}}
-% \begin{description}
-% \item[ToDo:] See the note above.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\lco@RequirePackage}[2][]{%
- \begingroup
- \@for\reserved@a:=#2\do{%
- \scr@trim@spaces\reserved@a
- \scr@ifundefinedorrelax{ver@\reserved@a.\scr@pkgextension}{%
-%<class> \ClassError{\KOMAClassName}{%
-%<package> \PackageError{scrletter}{%
- lco-file `\scr@currentlco' can be used only in preamble%
- }{%
- The lco-file `\scr@currentlco' uses \string\RequirePackage\space or
- \string\usepackage\space to load\MessageBreak
- package `\reserved@a'. This means you have to either load
- `\reserved@a'\MessageBreak
- or lco-file `\scr@currentlco' in the document preamble.
- }%
- }{}%
- }%
- \endgroup
- \scr@gobbleopt
-}
-% \end{macrocode}
-% \end{macro}^^A \lco@RequirePackage
-% \end{command}^^A \LoadLetterOption
-%
-% \begin{command}{\LoadLetterOptions}
-% \changes{v3.14}{2014/10/04}{added}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added}
-% \changes{v3.26}{2018/08/29}{special treatment of space entries not needed
-% any more}
-% Similar to \cs{LoadLetterOption} but with \meta{list of letter configuration
-% options} instead of a single \meta{letter configuration option}.
-% \begin{macrocode}
-\newcommand*{\LoadLetterOptions}[1]{%
- \begingroup
- \def\reserved@a{\endgroup}%
- \@for\reserved@b:=#1\do{%
- \scr@trim@spaces\reserved@b
- \ifx\reserved@b\@empty\else
- \edef\reserved@a{\expandafter\unexpanded\expandafter{\reserved@a
- \LoadLetterOption}{\reserved@b}\relax}%
- \fi
- }%
- \reserved@a
-}
-% \end{macrocode}
-% \end{command}^^A \LoadLetterOptions
-%
-% \begin{command}{\LetterOptionNeedsPapersize}
-% \changes{v2.8q}{2001/10/17}{added}
-% With
-% \begin{quote}
-% \cs{LetterOptionNeedsPapersize}\marg{letter configuration
-% option}\marg{paper size}
-% \end{quote}
-% inside a \meta{letter configuration option} file we can define a \meta{paper
-% size} to be used. This does not change the paper size, but adds a test to
-% \cs{opening}, that warns if another paper size is used.
-% \begin{macro}{\@PapersizeWarning}
-% \changes{v2.8q}{2002/03/25}{added}
-% \changes{v3.12}{2013/11/05}{differences of +/- 1\,mm are tolerated}
-% \changes{v3.23}{2017/02/22}{using \cs{PaperNameToSize}}
-% \begin{macro}{\@@PapersizeWarning,\LOPNP@size,\LOPNP@option}
-% \changes{v2.8q}{2002/03/25}{added}
-% \begin{macrocode}
-\newcommand*{\LOPNP@option}{}
-\newcommand*{\LOPNP@size}{}
-\newcommand*{\@PapersizeWarning}{%
- \begingroup%
- \edef\@tempc{\noexpand\@tempswafalse
- \noexpand\ifdim\paperwidth<\the\dimexpr\paperwidth-.1mm\relax
- \relax
- \noexpand\else
- \noexpand\ifdim\paperwidth>\the\dimexpr\paperwidth+.1mm\relax
- \relax
- \noexpand\else
- \noexpand\ifdim\paperheight<\the\dimexpr\paperheight-.1mm\relax
- \relax
- \noexpand\else
- \noexpand\ifdim\paperheight>\the\dimexpr\paperheight+.1mm\relax
- \relax
- \noexpand\else
- \noexpand\@tempswatrue
- \noexpand\fi
- \noexpand\fi
- \noexpand\fi
- \noexpand\fi
- \noexpand\@@PapersizeWarning
- }%
- \def\@tempb{letter}\ifx\LOPNP@size\@tempb%
- \setlength{\paperheight}{11in}\setlength{\paperwidth}{8.5in}%
- \else\def\@tempb{legal}\ifx\LOPNP@size\@tempb%
- \setlength{\paperheight}{14in}\setlength{\paperwidth}{8.5in}%
- \else\def\@tempb{executive}\ifx\LOPNP@size\@tempb%
- \setlength{\paperheight}{10.5in}\setlength{\paperwidth}{7.25in}%
- \else%
- \PaperNameToSize[letter]{\LOPNP@size}%
- \fi
- \fi
- \fi
- \@tempc
- \endgroup%
-}
-%<class>\AfterPackage*{typearea}{%
-\ProvideUnknownPaperSizeError{letter}{%
-%<class> \ClassError{scrlttr2}{%
-%<package> \PackageError{scrletter}{%
- papersize `\LOPNP@size' undefined}{%
- You've told me to check for paper size
- `\LOPNP@size'\MessageBreak
- at letter option file `\LOPNP@option.lco',\MessageBreak
- but this paper size is not supported.\MessageBreak
- See the KOMA-Script manual for informations about known
- paper sizes.}%
-}
-%<class>}
-\newcommand*{\@@PapersizeWarning}{%
- \if@tempswa\else%
-%<class> \ClassWarningNoLine{scrlttr2%
-%<package> \PackageWarningNoLine{scrletter%
- }{%
- Letter option file `\LOPNP@option.lco'\MessageBreak
- needs paper size `\LOPNP@size'.\MessageBreak
- Current paper size is not `\LOPNP@size'!\MessageBreak
- \scr@ifundefinedorrelax{KOMAClassName}{%
- You should load package `typearea' either\MessageBreak
- with option `paper=\LOPNP@size,paper=portrait' or
- additionally\MessageBreak
- }{%
- You should add `paper=\LOPNP@size,paper=portrait' at the\MessageBreak
- option list of `\string\documentclass' or\MessageBreak
- }%
- add `\string\KOMAoptions{paper=\LOPNP@size,paper=portrait}'\MessageBreak
- before starting this letter!\MessageBreak
- Maybe you know what you are doing,\MessageBreak
- so I do not change this myself}%
- \fi
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macrocode}
-\newcommand*{\LetterOptionNeedsPapersize}[2]{%
- \edef\LOPNP@size{#2}\edef\LOPNP@option{#1}%
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macrocode}
-%</(class|package)&letter>
-% \end{macrocode}
-%
-% \section{Implementation of the Letter Configuration Option Files}
-%
-% Most of the predefined letter configuration option files define a letter
-% layout, e.g, depending on a norm. The main thing in this case is to setup
-% pseudo-lengths. Sometimes additionally macros or commands are (re-)defined.
-%
-% \begin{macrocode}
-%<*lco>
-% \end{macrocode}
-%
-% \subsection{The file header}
-%
-% The head has to identify the file:
-% \changes{v3.04}{2009/04/21}{\file{NF.lco} by Jean-Marie Pacquet added}
-% \changes{v3.04}{2009/06/26}{\file{USletter2w.lco} with contribution of
-% Engelbert Buxbaum and Richard Ar\`es}
-% \changes{v3.04}{2009/06/29}{\file{UScommercial9DW-lco} for paper formats
-% letter or legal and envelopes with format no.\,9 with two windows}
-% \changes{v3.04}{2009/06/30}{\file{UScommercial9} for paper formats
-% letter or legal and envelopes with format commercial No.\,9 with one
-% window based on \url{http://www.envelopesuperstore.com/}}
-% \changes{v3.04}{2009/06/26}{long existing \file{visualize.lco} added}
-% \changes{v3.17}{2015/02/17}{\file{DIN5008A.lco} and \file{DIN5008B.lco} added}
-% \begin{macrocode}
-%<*head>
-\ProvidesFile{%
-%<visualize> visualize%
-%<DIN> DIN%
-%<5008> 5008%
-%<A> A%
-%<B> B%
-%<DINmoretext> DINmtext%
-%<SN> SN%
-%<SNold> SNold%
-%<SwissLeft> SNleft%
-%<KOMAold> KOMAold%
-%<NF> NF%
-%<USletter2w> USletter2w
-%<UScommercial9> UScommercial9
-%<UScommercial9DW> UScommercial9DW
- .lco}[\KOMAScriptVersion\space letter-class-option]
-% \end{macrocode}
-%
-% Some of the \file{LCO} files need others:
-% \begin{macrocode}
-%<*5008>
-\LoadLetterOption{%
-%<A> DINmtext%
-%<B> DIN%
-}
-%</5008>
-% \end{macrocode}
-%
-% \begin{command}{\LCOWarningNoLine,\LCOWarning}
-% \changes{v2.95}{2006/03/24}{added}
-% These are similar to \cs{PackageWarningNoLine} and \cs{PackageWarning} but
-% for \file{lco} files.
-% \begin{macrocode}
-%<*!5008>
-\providecommand*\LCOWarningNoLine[2]{%
- \LCOWarning{#1}{#2\@gobble}%
-}
-\providecommand*\LCOWarning[2]{%
- \GenericWarning{%
- (#1)\@spaces\@spaces\@spaces\@spaces\@spaces\@spaces\@spaces\@spaces
- }{%
- Letter configuration option #1 Warning: #2%
- }%
-}
-%</!5008>
-%</head>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{Main part of layout option files}
-%
-% The dimensions of some of the options has been researched by others:
-% \begin{center}
-% \begin{tabular}{ll}
-% \texttt{lco} file & source \\\hline\\[-1.6ex]
-% DIN & me \\
-% DINmtext & me \\
-% DIN5008A & me \\
-% DIN5008B & me \\
-% KOMAold & me \\
-% SNleft & Roger Luethi \\
-% SN & Roger Luethi \\
-% NF & Jean-Marie Pacquet \\
-% USletter2w & Engelbert Buxbaum \\
-% UScommercial9 & me \\
-% UScommercial9DW & me \\
-% \end{tabular}
-% \end{center}
-%
-% Test for the correct class or package:
-% \begin{macrocode}
-%<*body&!visualize>
-%<*!5008>
-\@ifundefined{scr@fromname@var}{%
- \LCOWarningNoLine{%
-%<DIN> DIN%
-%<DINmoretext> DINmtext%
-%<SN> SN%
-%<SNold> SNold%
-%<SwissLeft> SNleft%
-%<KOMAold> KOMAold%
-%<NF> NF%
-%<USletter2w> USletter2w%
-%<UScommercial9> UScommercial9%
-%<UScommercial9DW> UScommercial9DW%
- }{%
- This letter configuration option file was made only\MessageBreak
- to be used with KOMA-Script letter class\MessageBreak
- `scrlttr2' or letter package `scrletter'.\MessageBreak
- Use with other classes and without that package\MessageBreak
- can result in a lot of errors%
- }%
-}{}
-% \end{macrocode}
-%
-% Make sure, the correct paper size has been used:
-% \begin{macrocode}
-\LetterOptionNeedsPapersize{%
-%<DIN> DIN%
-%<DINmoretext> DINmtext%
-%<SN> SN%
-%<SNold> SNold%
-%<SwissLeft> SNleft%
-%<KOMAold> KOMAold%
-%<NF> NF%
-%<USletter2w> USletter2w%
-%<UScommercial9> UScommercial9%
-%<UScommercial9DW> UScommercial9DW%
-%<*DIN|DINmoretext|SN|SNold|SwissLeft|KOMAold|NF>
-}{a4}
-%</DIN|DINmoretext|SN|SNold|SwissLeft|KOMAold|NF>
-%<*USletter2w|UScommercial9|UScommercial9DW>
-}{letter}
-%</USletter2w|UScommercial9|UScommercial9DW>
-% \end{macrocode}
-%
-% And now the dimensions and variables:
-% \begin{variable}{fromzipcode}
-% \changes{v3.03}{2009/03/04}{change of output name added}
-% \begin{macrocode}
-%<!KOMAold>\setkomavar*{fromzipcode}{%
-%<DIN|DINmoretext> D}
-%<SwissLeft|SN> CH}
-%<NF> F}
-%<USletter2w|UScommercial9|UScommercial9DW> US}
-% \end{macrocode}
-% \end{variable}
-% \begin{pseudolength}{foldmarkhpos,tfoldmarkvpos,mfoldmarkvpos,bfoldmarkvpos,
-% lforlmarkhpos}
-% \changes{v2.97e}{2007/11/20}{several new fold marks to setup}
-% \begin{macrocode}
-\setplength{foldmarkhpos}{3.5mm}
-\setplength{tfoldmarkvpos}{%
-%<DIN|SwissLeft|SN> 105mm}
-%<DINmoretext> 87mm}
-%<KOMAold> 103.5mm}
-%<NF> 99mm}
-%<USletter2w|UScommercial9|UScommercial9DW> 3.75in}
-\setplength{mfoldmarkvpos}{\z@}
-\setplength{bfoldmarkvpos}{%
-%<DIN|SwissLeft|SN> 210mm}
-%<DINmoretext> 192mm}
-%<KOMAold> 202.5mm}
-%<NF> 198mm}
-%<USletter2w> 7.4in}
-%<UScommercial9|UScommercial9DW> 7.375in}
-\setplength{lfoldmarkhpos}{\z@}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{toaddrvpos,toaddrhpos,toaddrwidth,toaddrheight,
-% backaddrheight,specialmainindent,specialmailrightindent}
-% \changes{v3.03}{2009/06/25}{the documentation says, the back-address is part
-% of the address field}
-% \begin{macrocode}
-\setplength{toaddrvpos}{%
-%<DIN|SN> 45mm}
-%<DINmoretext> 27mm}
-%<SwissLeft> 35.5mm}
-%<KOMAold> 49mm}
-%<NF> 35mm}
-%<USletter2w> 1.8in}
-%<UScommercial9|UScommercial9DW> 2.1875in}
-\setplength{toaddrhpos}{%
-%<DIN|DINmoretext|SwissLeft> 20mm}
-%<SN> -8mm}
-%<KOMAold> 1in}
-%<KOMAold>\addtoplength{toaddrhpos}{\oddsidemargin}
-%<NF> -10mm}
-%<USletter2w> .73in}
-%<UScommercial9> 0.6875in}
-%<UScommercial9DW> .5625in}
-\setplength{toaddrwidth}{%
-%<DIN|DINmoretext> 85mm}
-%<SN> 90mm}
-%<SwissLeft|NF> 100mm}
-%<KOMAold> 70mm}
-%<USletter2w> 3.11in}
-%<UScommercial9> 4.5in}
-%<UScommercial9DW> 3.625in}
-\setplength{toaddrheight}{%
-%<DIN|DINmoretext|SN|SwissLeft|KOMAold|NF> 45mm}
-%<USletter2w> 1.17in}
-%<UScommercial9|UScommercial9DW> 1.125in}
-%</!5008>
-\setplength{toaddrindent}{%
-%<DIN|DINmoretext|SN|SwissLeft|KOMAold|USletter2w|UScommercial9|UScommercial9DW> \z@}
-%<5008> 5mm}
-%<NF> 10mm}
-%<*!5008>
-\setplength{backaddrheight}{%
-%<DIN|DINmoretext|SN|SwissLeft|KOMAold|NF> 5mm}
-%<USletter2w|UScommercial9|UScommercial9DW> \z@}
-%<USletter2w|UScommercial9|UScommercial9DW>\KOMAoptions{backaddress=false}
-\setplength{specialmailindent}{\fill}
-\setplength{specialmailrightindent}{1em}
-%</!5008>
-%<*5008>
-\setplength{specialmailindent}{\useplength{toaddrindent}}
-\setplength{specialmailrightindent}{\z@}
-%</5008>
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{locvpos,locwidth,lochpos}
-% \begin{macrocode}
-%<*5008>
-\setplength{locvpos}{%
- \dimexpr\useplength{toaddrvpos}+\useplength{backaddrheight}}
-%</5008>
-\setplength{locwidth}{%
-%<DIN|DINmoretext|SN|SwissLeft|KOMAold|NF|USletter2w|UScommercial9|UScommercial9DW> \z@}
-%<5008> 75mm}
-%<5008>\setplength{lochpos}{10mm}
-%<*!5008>
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{firstheadvpos,firstheadhpos,firstheadwidth}
-% \begin{macrocode}
-\setplength{firstheadvpos}{%
-%<DIN|DINmoretext|SN|SwissLeft> 8mm}
-%<KOMAold> 6mm}
-%<NF> 15mm}
-%<USletter2w> .36in}
-%<UScommercial9|UScommercial9DW> .4375in}
-%</!5008>
-%<*5008>
-\setplength{firstheadhpos}{%
- \dimexpr \useplength{toaddrhpos}+\useplength{toaddrindent}}
-%</5008>
-\setplength{firstheadwidth}{%
-%<KOMAold> \textwidth}
-%<NF> 170mm}
-%<*DIN|DINmoretext|SN|SwissLeft|UScommercial9>
- \paperwidth}
-\ifdim \useplength{toaddrhpos}>\z@
- \addtoplength[-2]{firstheadwidth}{\useplength{toaddrhpos}}
-\else
- \addtoplength[2]{firstheadwidth}{\useplength{toaddrhpos}}
-\fi
-%</DIN|DINmoretext|SN|SwissLeft|UScommercial9>
-%<5008> \dimexpr 125mm-\useplength{firstheadhpos}}
-%<*USletter2w>
- \paperwidth}
-\addtoplength[-]{firstheadwidth}{.68in}
-%</USletter2w>
-%<*UScommercial9DW>
- \paperwidth}
-\addtoplength[-]{firstheadwidth}{.25in}
-%</UScommercial9DW>
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{firstfootwidth,firstfootvpos}
-% \changes{v2.9u}{2005/03/05}{optional the footer is placed 16\,mm above the
-% lower paper edge}
-% \begin{macrocode}
-%<!5008>\setplength{firstfootwidth}{\useplength{firstheadwidth}}
-%<*5008>
-\setplength{firstfoothpos}{%
- \dimexpr\useplength{toaddrhpos}+\useplength{toaddrindent}}%
-\setplength{firstfootwidth}{%
- \dimexpr \paperwidth-\useplength{toaddrhpos}-\useplength{firstfoothpos}}%
-%</5008>
-%<KOMAold>\setplength{firstfootvpos}{\paperheight}
-%<KOMAold>\addtoplength{firstfootvpos}{-2cm}
-%<!KOMAold&!NF>\ifnum \scr@compatibility >\@nameuse{scr@v@2.9t}\relax
-%<!KOMAold&!NF> \setplength{firstfootvpos}{\paperheight}
-%<!KOMAold&!NF> \addtoplength{firstfootvpos}{-16mm}
-%<!KOMAold&!NF>\else
-%<!KOMAold&!NF> \setplength{firstfootvpos}{1in}
-%<!KOMAold&!NF> \addtoplength{firstfootvpos}{\topmargin}
-%<!KOMAold&!NF> \addtoplength{firstfootvpos}{\headheight}
-%<!KOMAold&!NF> \addtoplength{firstfootvpos}{\headsep}
-%<!KOMAold&!NF> \addtoplength{firstfootvpos}{\textheight}
-%<!KOMAold&!NF> \addtoplength{firstfootvpos}{\footskip}
-%<!KOMAold&!NF>\fi
-%<NF>\setplength{firstfootvpos}{266.679mm}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{refvpos,refaftervskip,refwidth}
-% \begin{macrocode}
-%<!(5008&B)>\setplength{refvpos}{%
-%<DIN|SN> 98.5mm}
-%<DINmoretext> 80.5mm}
-%<5008&A> 79.4mm}
-%<SwissLeft> 89mm}
-%<KOMAold> 89.5mm}
-%<NF> \useplength{tfoldmarkvpos}}
-%<USletter2w> 3.1in}
-%<UScommercial9|UScommercial9DW> 3.4375in}
-\setplength{refaftervskip}{%
-%<!KOMAold&!5008> \baselineskip}
-%<KOMAold> 2\baselineskip}
-%<5008> 8.46mm}
-%<*!5008>
-% \end{macrocode}
-% The width of the reference line is somehow special, because setting of
-% option \opt{refline=wide} or \opt{refline=narrow} should be possible after
-% loading a \file{lco} file. So we use the initial special value 0 and
-% calculate it inside \cs{opening} if it is still 0.
-% \begin{macrocode}
-\setplength{refwidth}{0pt}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{sigindent,sigbeforevskip}
-% \begin{macrocode}
-\setplength{sigindent}{0mm}
-\setplength{sigbeforevskip}{2\baselineskip}
-%<DIN|DINmoretext|SN|SwissLeft>\let\raggedsignature=\centering
-%<KOMAold|NF|USletter2w|UScommercial9|UScommercial9DW>\let\raggedsignature=\raggedright
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{macro}{\scr@default@firsthead@fromaddress@hook}
-% \changes{v3.13b}{2014/04/02}{added}
-% \changes{v3.27}{2019/04/02}{removed}
-% \end{macro}
-%
-% \begin{command}{\yourref,\yourmail,\myref,\customer,\invoice,\defaultfields,
-% \toname,\toaddress,\branch,\signature,\fromsig,\name,
-% \fromname,\location,\fromlocation,\backaddress,
-% \frombackaddress,\telephone,\telephonenum,\specialmail,
-% \title,\subject,\place,\fromplace,\ccnameseparator,
-% \enclnameseparator,\foldmarkson,\foldmarksoff,\addrfieldon,
-% \addrfieldoff,\subjecton,\subjectoff,\subjectafteron,
-% \subjectafteroff}
-% \begin{macro}{\@title,\@subject}
-% \begin{variable}{refitemi,refitemii,refitemiii,branch}
-% We have also to do the compatibility commands and variables for
-% \file{KOMAold.lco}.
-% \begin{macrocode}
-%<*KOMAold>
-\def\yourref{\setkomavar{yourref}}
-\def\yourmail{\setkomavar{yourmail}}
-\def\myref{\setkomavar{myref}}
-\def\customer{\setkomavar{customer}}
-\def\invoice{\setkomavar{invoice}}
-\@ifundefined{scr@refitemi@var}{\newkomavar{refitemi}}{}
-\def\refitemi{\setkomavar{refitemi}}
-\def\refitemnamei{\setkomavar*{refitemi}}
-\@ifundefined{scr@refitemii@var}{\newkomavar{refitemii}}{}
-\def\refitemii{\setkomavar{refitemii}}
-\def\refitemnameii{\setkomavar*{refitemii}}
-\@ifundefined{scr@refitemiii@var}{\newkomavar{refitemiii}}{}
-\def\refitemiii{\setkomavar{refitemiii}}
-\def\refitemnameiii{\setkomavar*{refitemiii}}
-\l@addto@macro{\defaultreffields}{%
- \addtoreffields{refitemi}%
- \addtoreffields{refitemii}%
- \addtoreffields{refitemiii}%
- }
-\addtoreffields{refitemi}%
-\addtoreffields{refitemii}%
-\addtoreffields{refitemiii}%
-\def\toname{\usekomavar{toname}}
-\def\toaddress{\usekomavar{toaddress}}
-\@ifundefined{scr@branch@var}{\newkomavar{branch}}{}
-\def\branch{\setkomavar{branch}}
-\def\frombranch{\usekomavar{branch}}
-\def\signature{\setkomavar{signature}}
-\def\fromsig{\usekomavar{signature}}
-\def\name{\setkomavar{fromname}}
-\def\fromname{\usekomavar{fromname}}
-\def\address{\setkomavar{fromaddress}}
-\def\fromaddress{\usekomavar{fromaddress}}
-\def\location{\setkomavar{location}}
-\def\fromlocation{\usekomavar{location}}
-\def\backaddress{\setkomavar{backaddress}}
-% \end{macrocode}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% Note: This is dangerous if someone uses a new \KOMAScript{} but copies the
-% wrong code.
-% \begin{macrocode}
-\def\@tempa{%
- \Ifkomavarempty{fromname}{}{%
- \strut\ignorespaces\usekomavar{fromname}%
- \Ifkomavarempty{fromaddress}{}{\\}}%
- \Ifkomavarempty{fromaddress}{}{%
- \strut\ignorespaces\usekomavar{fromaddress}}%
-}
-\ifx\@tempa\scr@backaddress@var%
- \setkomavar{backaddress}{}
-\else
- \def\@tempa{%
- \ifkomavarempty{fromname}{}{%
- \strut\ignorespaces\usekomavar{fromname}%
- \ifkomavarempty{fromaddress}{}{\\}}%
- \ifkomavarempty{fromaddress}{}{%
- \strut\ignorespaces\usekomavar{fromaddress}}%
- }
- \ifx\@tempa\scr@backaddress@var%
- \setkomavar{backaddress}{}
- \fi
-\fi
-\def\frombackaddress{\usekomavar{backaddress}}
-\def\telephone{\setkomavar{fromphone}}
-\def\telephonenum{\usekomavar{fromphone}}
-\def\specialmail{\setkomavar{specialmail}}
-\def\@specialmail{\usekomavar{specialmail}}
-\def\title{\setkomavar{title}}
-\def\@title{\usekomavar{title}}
-\def\subject{\setkomavar{subject}}
-\def\@subject{\usekomavar{subject}}
-\def\place{\setkomavar{place}}
-\def\fromplace{\usekomavar{place}}
-\let\ccnameseparator=\scr@ccseparator@var
-\setkomavar{ccseparator}{\ccnameseparator}
-\let\enclnameseparator=\scr@enclseparator@var
-\setkomavar{enclseparator}{\enclnameseparator}
-\setkomafont{fromname}{\scshape}
-\def\foldmarkson{\@ObsoleteCommand{\foldmarkson}{foldmarks=on}}
-\def\foldmarksoff{\@ObsoleteCommand{\foldmarksoff}{foldmarks=off}}
-\def\addrfieldon{\@ObsoleteCommand{\addrfieldon}{addrfield=on}}
-\def\addrfieldoff{\@ObsoleteCommand{\addrfieldoff}{addrfield=off}}
-\def\subjecton{\@ObsoleteCommand{\subjecton}{subject=titled}}
-\def\subjectoff{\@ObsoleteCommand{\subjectoff}{subject=untitled}}
-\def\subjectafteron{%
- \@ObsoleteCommand{\subjectafteron}{subject=afteropening}}
-\def\subjectafteroff{%
- \@ObsoleteCommand{\subjectafteroff}{subject=beforeopening}}
-%</KOMAold>
-% \end{macrocode}
-% \end{variable}
-% \end{macro}
-% \end{command}
-%
-%
-% \begin{pseudolength}{specialmailheight}
-% \begin{macro}{\@PapersizeWarning}
-% For \file{DIN5008a.lco} and \file{DIN5008b.lco} we need additional settings:
-% \changes{v3.30}{2020/02/25}{white spaces and end of warning removed}
-% \begin{macrocode}
-%</!5008>
-%<*5008>
-\newplength{specialmailheight}
-\setplength{specialmailheight}{12.7mm}
-\areaset[5mm]{165mm}{233mm}
-\KOMAoptions{%
- fromalign=locationleft,
- addrfield=topaligned,
- refline=narrow,
- parskip=full
-}
-\l@addto@macro\@PapersizeWarning{%
- \begingroup
- \@tempswafalse
- \ifdim\oddsidemargin<\dimexpr 25mm-1in-1pt\relax\@tempswatrue\else
- \ifdim\oddsidemargin>\dimexpr 25mm-1in+1pt\relax\@tempswatrue\fi\fi
- \ifdim\textwidth<\dimexpr \paperwidth-45mm-1pt\relax\@tempswatrue\else
- \ifdim\textwidth>\dimexpr \paperwidth-45mm+1pt\relax\@tempswatrue\fi\fi
- \if@tempswa
- \LCOWarning{DIN5008%
-%<A> A%
-%<B> B%
- }{%
- DIN5008 orders exact margins and text\MessageBreak
- width. Without following these values,\MessageBreak
- your document does not conform DIN5008.\MessageBreak
- You should use, e.g.,\MessageBreak
- \space\string\areaset[5mm]{%
- \the\dimexpr \paperwidth-45mm\relax}{%
- \the\dimexpr 1.414\dimexpr \paperwidth-45mm\relax\relax}\MessageBreak
- to follow the norm%
- }%
- \fi
- \ifdim \dimexpr\parskip\relax=\dimexpr\baselineskip\relax\else
- \LCOWarning{DIN5008%
-%<A> A%
-%<B> B%
- }{%
- DIN5008 orders paragraph separation by\MessageBreak
- exactly one line. Without this, your\MessageBreak
- document does not conform DIN5008.\MessageBreak
- You shoud use, e.g.,\MessageBreak
- \space\string\KOMAoption{parskip}{full}\MessageBreak
- to follow the norm%
- }%
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{pseudolength}
-% \begin{macro}{\backaddr@format}
-% \changes{v3.25}{2017/11/15}{using \cs{scr@endstrut} instead of
-% \cs{unskip}\cs{strut}}
-% Multi line back address without underline.
-% \begin{macrocode}
-\renewcommand{\backaddr@format}[1]{\hspace*{\useplength{toaddrindent}}%
- \parbox[t][\useplength{backaddrheight}][t]%
- {\dimexpr\useplength{toaddrwidth}-\useplength{toaddrindent}}%
- {\strut\ignorespaces #1\ifhmode\scr@endstrut\fi}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\specialmail@format}
-% \changes{v3.25}{2017/11/15}{using \cs{scr@endstrut} instead of
-% \cs{unskip}\cs{strut}}
-% Multi line special sending.
-% \begin{macrocode}
-\renewcommand{\specialmail@format}[1]{%
- \parbox[t][\useplength{specialmailheight}][t]%
- {\dimexpr\useplength{toaddrwidth}
- -\useplength{specialmailindent}
- -\useplength{specialmailrightindent}}%
- {\strut\ignorespaces #1\ifhmode\scr@endstrut\fi}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{fontelement}{specialmail,backaddress,addressee,fromname,fromaddress,refvalue}
-% Some font settings.
-% \begin{macrocode}
-\setkomafont{specialmail}{\sffamily\fontsize{10pt}{12pt}\selectfont}
-\setkomafont{backaddress}{\sffamily\fontsize{8pt}{10pt}\selectfont}
-\setkomafont{addressee}{\sffamily\fontsize{10pt}{12pt}\selectfont}
-\setkomafont{fromname}{\sffamily\fontsize{10pt}{12pt}\selectfont}
-\setkomafont{fromaddress}{\sffamily\fontsize{10pt}{12pt}\selectfont}
-\setkomafont{refvalue}{\sffamily\fontsize{10pt}{12pt}\selectfont}
-\let\raggedsignature\raggedright
-%</5008>
-%</body&!visualize>
-% \end{macrocode}
-% \end{fontelement}
-%
-%
-% \subsection{Visualizing several fields of a letter}
-%
-% These macros are using be \file{visualize.lco} only.
-%
-% It needs \pkg{eso-pic}.
-% \changes{v3.18}{2015/06/03}{loading \textsf{eso-pic} always}
-% \begin{macrocode}
-%<*visualize&body>
-\RequirePackage{eso-pic}
-% \end{macrocode}
-%
-% \begin{command}{\showfields}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added}
-% Command
-% \begin{quote}
-% \cs{showfields}\marg{field list}
-% \end{quote}
-% is used to visualize fields of the note paper. The \meta{field list} is a
-% comma-separated list of field names. Unknown fields do not result in errors
-% but warnings only. The visualization is done in the background using
-% \pkg{eso-pic}. A visualized field cannot be un-visualized.
-% \begin{macrocode}
-\newcommand*{\showfields}[1]{%
- \AtBeginLetter{%
- \begingroup
- \@for \@tempa:=#1\do{%
- \scr@trim@spaces\@tempa
- \ifx\@tempa\@empty\else
- \@ifundefined{showfield@\@tempa}{%
- \LCOWarning{visualize}{Unknown field `\@tempa' ignored}%
- }{%
- \edef\@tempa{%
- \noexpand\AddToShipoutPicture*{%
- \noexpand\AtPageUpperLeft{%
- \noexpand\usekomafont{field}%
- \noexpand\@nameuse{showfield@\@tempa}%
- }%
- }%
- }\@tempa
- }%
- \fi
- }%
- \endgroup
- }%
-}
-% \end{macrocode}
-% \begin{fontelement}{field}
-% The element is used to change the color. Changing the font doesn't make sense.
-% \begin{macrocode}
-\newkomafont{field}{\normalcolor}
-% \end{macrocode}
-% \end{fontelement}
-% \end{command}
-%
-% \begin{command}{\showfield}
-% A single field is visualized using:
-% \begin{quote}
-% \cs{showfield}\marg{field name}
-% \end{quote}
-% This uses a macro \cs{showfield@\meta{field name}}. Usually fields are
-% rectangles. Such fields can be visualized always the same way using four
-% parameters: \meta{offset from left}, \meta{offset from top}, \meta{width},
-% \meta{height}. A negative \meta{height} means a minimum of -\meta{height}
-% but maybe more.
-%
-% \begin{macro}{\showfield@by@frame}
-% To show a field by a frame
-% \begin{quote}
-% \cs{showfield@by@frame}\marg{offset from left}\marg{offset from top}%
-% \marg{width}\marg{height}
-% \end{quote}
-% is used. If \meta{height} is negative, arrows of length -\meta{height} are
-% used and the frame bottom is omitted.
-% \begin{macrocode}
-\newcommand*{\showfield@by@frame}[4]{%
- \thinlines
- \ifdim #4<\z@
- \put(\LenToUnit{#1},-\LenToUnit{#2}){\line(1,0){\LenToUnit{#3}}}%
- \setlength{\@tempdima}{\dimexpr #1+#3\relax}%
- \setlength{\@tempdimb}{#4}
- \put(\LenToUnit{#1},-\LenToUnit{#2}){%
- \vector(0,-1){\LenToUnit{-\@tempdimb}}}%
- \put(\LenToUnit\@tempdima,-\LenToUnit{#2}){%
- \vector(0,-1){\LenToUnit{-\@tempdimb}}}%
- \else
- \put(\LenToUnit{#1},-\LenToUnit{#2}){\line(1,0){\LenToUnit{#3}}}%
- \put(\LenToUnit{#1},-\LenToUnit{#2}){\line(0,-1){\LenToUnit{#4}}}%
- \setlength{\@tempdima}{\dimexpr #1+#3\relax}%
- \setlength{\@tempdimb}{\dimexpr #2+#4\relax}%
- \put(\LenToUnit\@tempdima,\LenToUnit{-\@tempdimb}){%
- \line(-1,0){\LenToUnit{#3}}}%
- \put(\LenToUnit\@tempdima,\LenToUnit{-\@tempdimb}){%
- \line(0,1){\LenToUnit{#4}}}%
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\showfield@by@edges}
-% To show a field by edge markers
-% \begin{quote}
-% \cs{showfield@by@edges}\marg{offset from left}\marg{offset from top}%
-% \marg{width}\marg{height}
-% \end{quote}
-% is used. If \meta{height} is negative the bottom markers are omitted.
-% \begin{macrocode}
-\newcommand*{\showfield@by@edges}[4]{%
- \thinlines
- \setlength{\@tempdima}{\dimexpr #1+#3\relax}%
- \put(\LenToUnit{#1},-\LenToUnit{#2}){\line(1,0){\LenToUnit{\edgesize}}}%
- \put(\LenToUnit{#1},-\LenToUnit{#2}){\line(0,-1){\LenToUnit{\edgesize}}}%
- \put(\LenToUnit{\@tempdima},-\LenToUnit{#2}){\line(-1,0){\LenToUnit{\edgesize}}}%
- \put(\LenToUnit{\@tempdima},-\LenToUnit{#2}){\line(0,-1){\LenToUnit{\edgesize}}}%
- \ifdim #4<\z@\else
- \setlength{\@tempdimb}{\dimexpr #2+#4\relax}%
- \put(\LenToUnit{#1},-\LenToUnit{\@tempdimb}){\line(1,0){\LenToUnit{\edgesize}}}%
- \put(\LenToUnit{#1},-\LenToUnit{\@tempdimb}){\line(0,1){\LenToUnit{\edgesize}}}%
- \put(\LenToUnit{\@tempdima},-\LenToUnit{\@tempdimb}){\line(-1,0){\LenToUnit{\edgesize}}}%
- \put(\LenToUnit{\@tempdima},-\LenToUnit{\@tempdimb}){\line(0,1){\LenToUnit{\edgesize}}}%
- \fi
-}
-% \end{macrocode}
-% \begin{command}{\edgesize}
-% The size of the edges is 1\,ex by default.
-% \begin{macrocode}
-\newcommand*{\edgesize}{1ex}
-% \end{macrocode}
-% \end{command}
-% \end{macro}
-%
-% \begin{macro}{\showfield@by@rule}
-% To show a field by a filled frame (without frame border)
-% \begin{quote}
-% \cs{showfield@by@rune}\marg{offset from left}\marg{offset from top}%
-% \marg{width}\marg{height}
-% \end{quote}
-% is used. The absolute value of \meta{height} is used.
-% \begin{macrocode}
-\newcommand*{\showfield@by@rule}[4]{%
- \ifdim #4<\z@
- \put(\LenToUnit{#1},-\LenToUnit{#2}){\rule[#4]{#3}{-#4}}%
- \else
- \put(\LenToUnit{#1},-\LenToUnit{#2}){\rule[-#4]{#3}{#4}}%
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\showfield}
-% The default is to use a frame.
-% \begin{macrocode}
-\newcommand*{\showfield}{}
-\let\showfield\showfield@by@frame
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\setshowstyle}
-% But the default can changed using
-% \begin{quote}
-% \cs{setshowstyle}\marg{style}
-% \end{quote}
-% A warning (no error!) is reported if \cs{showfield@by@\meta{style}} does not
-% exist. In this case \meta{style} is \texttt{frame} again.
-% \begin{macrocode}
-\newcommand*{\setshowstyle}[1]{%
- \@ifundefined{showfield@by@#1}{%
- \LCOWarning{visualize}{Unknown show type `#1'.\MessageBreak
- You should simply set one of the supported\MessageBreak
- show types `frame', `edges', `rule'.\MessageBreak
- Style `frame' will be used instead}%
- \let\showfield\showfield@by@frame
- }{%
- \expandafter\let\expandafter\showfield\csname showfield@by@#1\endcsname
- }%
-}
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-% Currently following fields are available:
-% \begin{macro}{\showfield@test}
-% \texttt{test} is a test field with coordinates:
-% $(1\,\mathrm{cm},1\,\mathrm{cm})\times(10\,\mathrm{cm},15\,\mathrm{cm})$
-% \begin{macrocode}
-\newcommand*{\showfield@test}{%
- \showfield{1cm}{1cm}{10cm}{15cm}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\showfield@head}
-% \changes{v3.05}{2009/11/09}{using \plen{firstheadhpos}}
-% \texttt{head} is the header of the note paper.
-% \begin{macrocode}
-\newcommand*{\showfield@head}{%
- \ifdim\useplength{firstheadhpos}<\paperwidth
- \ifdim \useplength{firstheadhpos}>-\paperwidth
- \ifdim \useplength{firstheadhpos}<\z@
- \setlength\@tempskipa{\paperwidth}%
- \addtolengthplength{\@tempskipa}{firstheadhpos}%
- \addtolengthplength[-]{\@tempskipa}{firstheadwidth}%
- \else
- \setlength{\@tempskipa}{\useplength{firstheadhpos}}%
- \fi
- \else
- \setlength\@tempskipa{\oddsidemargin}%
- \addtolength\@tempskipa{1in}%
- \fi
- \else
- \setlength\@tempskipa{.5\paperwidth}%
- \addtolengthplength[-.5]{\@tempskipa}{firstheadwidth}%
- \fi
- \showfield{\@tempskipa}%
- {\useplength{firstheadvpos}}%
- {\useplength{firstheadwidth}}%
- {-\headheight}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\showfield@foot}
-% \changes{v3.05}{2009/11/09}{using \plen{firstfoothpos}}
-% \texttt{foot} is the footer of the note paper.
-% \begin{macrocode}
-\newcommand*{\showfield@foot}{%
- \ifdim\useplength{firstfoothpos}<\paperwidth
- \ifdim \useplength{firstfoothpos}>-\paperwidth
- \ifdim \useplength{firstfoothpos}<\z@
- \setlength\@tempskipa{\paperwidth}%
- \addtolengthplength{\@tempskipa}{firstfoothpos}%
- \addtolengthplength[-]{\@tempskipa}{firstfootwidth}%
- \else
- \setlength{\@tempskipa}{\useplength{firstfoothpos}}%
- \fi
- \else
- \setlength\@tempskipa{\oddsidemargin}%
- \addtolength\@tempskipa{1in}%
- \fi
- \else
- \setlength\@tempskipa{.5\paperwidth}%
- \addtolengthplength[-.5]{\@tempskipa}{firstfootwidth}%
- \fi
- \showfield{\@tempskipa}%
- {\useplength{firstfootvpos}}%
- {\useplength{firstfootwidth}}%
- {-\baselineskip}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\showfield@address}
-% \changes{v3.07a}{2011/01/10}{implementation adapted for change in
-% \cls*{scrlttr2} 3.03b}
-% \texttt{address} is the address field of the addressee.
-% \begin{macrocode}
-\newcommand*{\showfield@address}{%
- \setlengthtoplength{\@tempskipa}{toaddrhpos}%
- \ifdim \@tempskipa<\z@
- \addtolength{\@tempskipa}{\paperwidth}%
- \addtolengthplength[-]{\@tempskipa}{toaddrwidth}%
- \fi
- \showfield{\@tempskipa}{\useplength{toaddrvpos}}%
- {\useplength{toaddrwidth}}%
- {\dimexpr\useplength{toaddrheight}\relax}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\showfield@location}
-% \changes{v3.07a}{2011/01/10}{implementation adapted for change in
-% \cls*{scrlttr2} 3.03b}
-% \texttt{location} is the field with extra information about the sender.
-% \begin{macrocode}
-\newcommand*{\showfield@location}{%
- \begingroup
- \ifdim \useplength{locwidth}=\z@%
- \setplength{locwidth}{\paperwidth}%
- \ifdim \useplength{toaddrhpos}>\z@
- \addtoplength[-2]{locwidth}{\useplength{toaddrhpos}}%
- \else
- \addtoplength[2]{locwidth}{\useplength{toaddrhpos}}%
- \fi
- \addtoplength[-1]{locwidth}{\useplength{toaddrwidth}}%
- \if@bigloc%
- \setplength[.66667]{locwidth}{\useplength{locwidth}}%
- \else%
- \setplength[.5]{locwidth}{\useplength{locwidth}}%
- \fi%
- \fi%
- \ifdim \useplength{lochpos}=\z@%
- \setplength{lochpos}{\useplength{toaddrhpos}}%
- \fi
- \ifdim \useplength{locvpos}=\z@%
- \setplength{locvpos}{\useplength{toaddrvpos}}%
- \fi
- \ifdim \useplength{locheight}=\z@%
- \setplength{locheight}{\useplength{toaddrheight}}%
- \fi
- \setlengthtoplength[-]{\@tempskipa}{lochpos}%
- \ifdim \@tempskipa<\z@
- \addtolength{\@tempskipa}{\paperwidth}%
- \else
- \addtolengthplength{\@tempskipa}{locwidth}%
- \fi
- \addtolengthplength[-]{\@tempskipa}{locwidth}%
- \showfield{\@tempskipa}{\useplength{locvpos}}%
- {\useplength{locwidth}}{\useplength{locheight}}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\showfield@refline}
-% \texttt{refline} is the reference line.
-% \begin{macrocode}
-\newcommand*{\showfield@refline}{%
- \begingroup
- \ifdim\useplength{refwidth}=\z@
- \if@refwide
- \setplength{refwidth}{\paperwidth}%
- \ifdim \useplength{toaddrhpos}>\z@
- \setplength{refhpos}{\useplength{toaddrhpos}}%
- \else
- \setplength[-]{refhpos}{\useplength{toaddrhpos}}%
- \fi
- \addtoplength[-2]{refwidth}{\useplength{refhpos}}%
- \else
- \setplength{refwidth}{\textwidth}%
- \setplength{refhpos}{\oddsidemargin}%
- \addtoplength{refhpos}{1in}%
- \fi
- \else\ifdim\useplength{refhpos}=\z@
- \begingroup
- \setlength\@tempdima{\textwidth}%
- \addtolengthplength[-]{\@tempdima}{refwidth}%
- \setlength\@tempdimb{\oddsidemargin}%
- \addtolength\@tempdimb{1in}%
- \setlength{\@tempdimc}{\paperwidth}%
- \addtolength{\@tempdimc}{-\textwidth}%
- \divide\@tempdimb by 32768\relax
- \divide\@tempdimc by 32768\relax
- \ifdim\@tempdimc=\z@\else
- \multiply\@tempdima by\@tempdimb
- \divide\@tempdima by\@tempdimc
- \fi
- \edef\@tempa{\noexpand\endgroup
- \noexpand\setplength{refhpos}{\the\@tempdima}}%
- \@tempa
- \fi\fi
- \showfield{\useplength{refhpos}}{\useplength{refvpos}}%
- {\useplength{refwidth}}{-1.5\baselineskip}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\showenvelope}
-% \begin{macro}{\@showenvelope}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@showenvelope,\@@@showenvelope}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \changes{v3.18}{2015/06/03}{always loading \pkg{graphicx}}
-% We can also visualize an envelope. Here are several parameters needed.
-% \begin{quote}
-% \cs{showenvelope}\marg{width}\marg{height}\marg{hoffset}\marg{voffset}%
-% \marg{commands}
-% \end{quote}
-% The envelope is shown in portrait format at the current page. Package
-% \pkg{graphicx} is used. The \meta{hoffset} is the horizontal distance of the
-% note paper from the left and right edge of the envelope. The \meta{voffset}
-% is the same for the top and bottom edge. The \meta{commands} is extra code
-% to show the some elements.
-% \begin{macrocode}
-\RequirePackage{graphicx}
-\newcommand*{\showenvelope}{}
-\newcommand*{\@@showenvelope}{}
-\newcommand*{\@@@showenvelope}{}
-\def\showenvelope(#1,#2){%
- \kernel@ifnextchar (%)
- {\@showenvelope({#1},{#2})}%
- {\@@@showenvelope({#1},{#2})}%
-}
-\def\@@@showenvelope(#1,#2){%
- \begingroup
- \def\@tempa{\endgroup}%
- \ifdim \paperwidth>#1\relax
- \LCOWarning{visualize}{%
- \string\paperwidth\space > envelope width not supported}%
- \else
- \ifdim \paperheight>#2\relax
- \ifdim .5\paperheight>#2\relax
- \expandafter\ifdim \useplength{tfoldmarkvpos}>#2\relax
- \LCOWarning{visualize}{%
- tfoldmarkvpos > envelope height not supported}%
- \else
- \def\@tempa{\endgroup
- \@showenvelope({#1},{#2})%
- ({\dimexpr (#1-\paperwidth)/2\relax},%
- {\dimexpr (#2-\expandafter\dimexpr
- \useplength{tfoldmarkvpos}\relax)%
- /2\relax})%
- }%
- \fi
- \else
- \def\@tempa{\endgroup
- \@showenvelope({#1},{#2})%
- ({\dimexpr (#1-\paperwidth)/2\relax},%
- {\dimexpr (#2-.5\paperheight)/2\relax})%
- }%
- \fi
- \else
- \def\@tempa{\endgroup
- \@showenvelope({#1},{#2})%
- ({\dimexpr (#1-\paperwidth)/2\relax},%
- {\dimexpr (#2-\paperheight)/2\relax})%
- }%
- \fi
- \fi
- \@tempa
-}
-\def\@showenvelope(#1,#2)(#3,#4){%
- \kernel@ifnextchar [%]
- {\@@showenvelope({#1},{#2})({#3},{#4})}%
- {\@@showenvelope({#1},{#2})({#3},{#4})[]}%
-}
-\def\@@showenvelope(#1,#2)(#3,#4)[#5]{%
-% \end{macrocode}
-% \begin{macrocode}
- \newpage
- \vspace*{\fill}
- \rotatebox{90}{%
- \begin{picture}(0,0)
- \begin{picture}(\LenToUnit{#1},\LenToUnit{#2})(0,\LenToUnit{#2})
- \newcommand*{\PlusHOffset}[1]{%
- \dimexpr \expandafter\dimexpr ##1\relax + #3\relax
- }%
- \newcommand*{\MinusHOffset}[1]{%
- \dimexpr \expandafter\dimexpr ##1\relax - #3\relax
- }%
- \newcommand*{\PlusVOffset}[1]{%
- \dimexpr \expandafter\dimexpr ##1\relax + #4\relax
- }%
- \newcommand*{\MinusVOffset}[1]{%
- \dimexpr \expandafter\dimexpr ##1\relax - #4\relax
- }%
- \newcommand{\AtEnvelopeUpperLeft}[1]{%
- \put(\LenToUnit{\PlusHOffset\z@},\LenToUnit{\MinusVOffset{#2}}){##1}%
- }%
- \newcommand{\AtEnvelopeLowerLeft}[1]{%
- \put(\LenToUnit{\PlusHOffset\z@},\LenToUnit{\PlusVOffset\z@}){##1}%
- }%
- \newcommand{\AtEnvelopeUpperRight}[1]{%
- \put(\LenToUnit{\MinusHOffset{#1}},\LenToUnit{\MinusVOffset{#2}}){##1}%
- }%
- \newcommand{\AtEnvelopeLowerRight}[1]{%
- \put(\LenToUnit{\MinusHOffset{#1}},\LenToUnit{\PlusVOffset\z@}){##1}%
- }%
- \newcommand*{\measuredIFrame}{}%
- \def\measuredIFrame(##1,##2)(##3,##4){%
- \put(\LenToUnit{##1},\LenToUnit{##2}){%
- \measuredFrameLB({##3},{##4})%
- }%
- \put(\LenToUnit{\MinusHOffset\z@},%
- \LenToUnit{\dimexpr ##2-.5mm\relax}){%
- \measureLineHB{\PlusHOffset{##1}}%
- }%
- \put(\LenToUnit{\dimexpr ##1+##3\relax},%
- \LenToUnit{\dimexpr ##2-.5mm\relax}){%
- \measureLineHB{\dimexpr #1-%
- \PlusHOffset{\dimexpr ##1+##3\relax}\relax}%
- }%
- \put(\LenToUnit{\dimexpr ##1-.5mm\relax},%
- \LenToUnit{\dimexpr ##2+##4\relax}){%
- \measureLineVL{\PlusVOffset{\dimexpr -##2-##4\relax}}%
- }%
- \put(\LenToUnit{\dimexpr ##1-.5mm\relax},%
- \LenToUnit{\PlusVOffset{-#2}}){%
- \measureLineVL{\dimexpr #2-%
- \PlusVOffset{\dimexpr -##2\relax}\relax}%
- }%
- }%
- \put(0,0){%
- \thicklines
- \usekomafont{envelope}%
- \measuredFrameLB({#1},{#2})%
- }%
- \AtEnvelopeLowerLeft{%
- \usekomafont{letter}%
- \dashbox{\LenToUnit{1mm}}%
- (\LenToUnit{\MinusHOffset{\MinusHOffset{#1}}},%
- \LenToUnit{\MinusVOffset{\MinusVOffset{#2}}}){}%
- }%
- \expandafter\ifdim \useplength{toaddrhpos}<\z@
- \AtEnvelopeUpperLeft{%
- \thicklines
- \usekomafont{envelope}%
- \measuredIFrame(\expandafter\dimexpr \useplength{toaddrhpos}+
- \MinusHOffset{\MinusHOffset{#1}}\relax,%
- -\dimexpr %
- \expandafter\dimexpr\useplength{toaddrvpos}\relax
- +
- \expandafter
- \dimexpr\useplength{toaddrheight}\relax
- \relax)%
- (\useplength{toaddrwidth},\useplength{toaddrheight})%
- }%
- \else
- \AtEnvelopeUpperLeft{%
- \thicklines
- \usekomafont{envelope}%
- \measuredIFrame(\useplength{toaddrhpos},%
- -\dimexpr %
- \expandafter\dimexpr\useplength{toaddrvpos}\relax
- +
- \expandafter
- \dimexpr\useplength{toaddrheight}\relax
- \relax)%
- (\useplength{toaddrwidth},\useplength{toaddrheight})%
- }%
- \fi
- \AtEnvelopeUpperLeft{#5}%
- \end{picture}
- \end{picture}
- }%
- \newpage
-}
-% \end{macrocode}
-% \begin{fontelement}{envelope}
-% Used to change the color of the envelope frame (font changes do not make sense).
-% \begin{macrocode}
-\newkomafont{envelope}{\normalcolor}
-% \end{macrocode}
-% \end{fontelement}
-% \begin{fontelement}{letter}
-% Used to change the color of the dashed note paper inside the envelope (font
-% changes do not make sende).
-% \begin{macrocode}
-\newkomafont{letter}{\normalcolor}
-% \end{macrocode}
-% \end{fontelement}
-% \begin{command}{\unmeasuredFrame}
-% Show a frame without measuring.
-% \begin{macrocode}
-\newcommand*{\unmeasuredFrame}{}
-\def\unmeasuredFrame(#1,#2){%
- \put(0,0){\line(1,0){\LenToUnit{#1}}}%
- \put(\LenToUnit{#1},0){\line(0,1){\LenToUnit{#2}}}%
- \put(\LenToUnit{#1},\LenToUnit{#2}){\line(-1,0){\LenToUnit{#1}}}%
- \put(0,\LenToUnit{#2}){\line(0,-1){\LenToUnit{#2}}}%
-}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\measuredFrameLB,\measuredFrameLT,\measuredFrameRB,
-% \measuredFrameRT}
-% Show the measuring of a frame.
-% \begin{macrocode}
-\newcommand*{\measuredFrameLB}{}
-\def\measuredFrameLB(#1,#2){%
- \unmeasuredFrame({#1},{#2})%
- \put(\LenToUnit{-.5mm},0){\measureLineVL{#2}}%
- \put(0,\LenToUnit{-.5mm}){\measureLineHB{#1}}%
-}
-\newcommand*{\measuredFrameLT}{}
-\def\measuredFrameLT(#1,#2){%
- \unmeasuredFrame({#1},{#2})%
- \put(\LenToUnit{-.5mm},0){\measureLineVL{#2}}%
- \put(0,\LenToUnit{\expandafter\dimexpr #2+.5mm\relax}){\measureLineHT{#1}}%
-}
-\newcommand*{\measuredFrameRB}{}
-\def\measuredFrameRB(#1,#2){%
- \unmeasuredFrame({#1},{#2})%
- \put(\LenToUnit{\expandafter\dimexpr #1+.5mm\relax},0){\measureLineVR{#2}}%
- \put(0,\LenToUnit{-.5mm}){\measureLineHB{#1}}%
-}
-\newcommand*{\measuredFrameRT}{}
-\def\measuredFrameRT(#1,#2){%
- \unmeasuredFrame({#1},{#2})%
- \put(\LenToUnit{\expandafter\dimexpr #1+.5mm\relax},0){\measureLineVR{#2}}%
- \put(0,\LenToUnit{\expandafter\dimexpr #2+.5mm\relax}){\measureLineHT{#1}}%
-}
-% \end{macrocode}
-% \end{command}
-% \end{macro}
-% \end{macro}
-% \end{command}
-% \begin{command}{\measureLineV}
-% Vertical measuring without text.
-% \begin{macrocode}
-\newcommand*{\measureLineV}[1]{%
- \begin{picture}(0,0)
- \thinlines
- \usekomafont{measure}%
- \put(0,0){\vector(0,1){\LenToUnit{#1}}}%
- \put(0,\LenToUnit{#1}){\vector(0,-1){\LenToUnit{#1}}}%
- \end{picture}
-}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\measureLineVL,\measureLineVR}
-% Vertical measuring with text left or right of the line.
-% \begin{macrocode}
-\newcommand*{\measureLineVL}[1]{%
- \begin{picture}(0,0)
- \usekomafont{measure}%
- \put(0,0){\measureLineV{#1}}%
- \put(0,0){\makebox(0,\LenToUnit{#1})[r]{\ValPerUnit{#1}}}%
- \end{picture}
-}
-\newcommand*{\measureLineVR}[1]{%
- \begin{picture}(0,0)
- \usekomafont{measure}%
- \put(0,0){\measureLineV{#1}}%
- \put(0,0){\makebox(0,\LenToUnit{#1})[l]{\ValPerUnit{#1}}}%
- \end{picture}
-}
-% \end{macrocode}
-% \begin{command}{\ValPerUnit,\unitfactor}
-% Shows a length in \len{unitlength} with a accuracy of 1/\cs{unitfactor}.
-% \begin{macrocode}
-\newcommand*{\ValPerUnit}[1]{%
- \begingroup
- \setlength{\@tempdima}{%
- \dimexpr #1/(\unitlength/\unitfactor)*\p@/\unitfactor\relax
- }%
- \strip@pt\@tempdima
- \endgroup
-}
-\newcommand*{\unitfactor}{1}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\measureLineH}
-% Horizontal measuring without text.
-% \begin{macrocode}
-\newcommand*{\measureLineH}[1]{%
- \begin{picture}(0,0)
- \usekomafont{measure}%
- \put(0,0){\vector(1,0){\LenToUnit{#1}}}%
- \put(\LenToUnit{#1},0){\vector(-1,0){\LenToUnit{#1}}}%
- \end{picture}
-}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\measureLineHB,\measureLineHT}
-% Horizontal measuring with text below or above.
-% \begin{macrocode}
-\newcommand*{\measureLineHB}[1]{%
- \begin{picture}(0,0)
- \usekomafont{measure}%
- \put(0,0){\measureLineH{#1}}%
- \put(0,\LenToUnit{\dimexpr -\ht\strutbox-.5mm\relax}){%
- \makebox(\LenToUnit{#1},\LenToUnit{\baselineskip})[c]{\ValPerUnit{#1}}}%
- \end{picture}
-}
-\newcommand*{\measureLineHT}[1]{%
- \begin{picture}(0,0)
- \usekomafont{measure}%
- \put(0,0){\measureLineH{#1}}%
- \put(0,0){%
- \makebox(\LenToUnit{#1},\LenToUnit{\baselineskip})[c]{\ValPerUnit{#1}}}%
- \end{picture}
-}
-% \end{macrocode}
-% \end{command}
-% \begin{fontelement}{measure}
-% Used to change the color of a measuring line (font changes doe not make sense).
-% \begin{macrocode}
-\newkomafont{measure}{\normalcolor}
-% \end{macrocode}
-% \end{fontelement}
-% \end{command}
-%
-% \begin{command}{\showISOenvelope}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Show a DIN/ISO C4, C5, DL=C5/6, or C6/5 envelope, depending on the argument.
-% \begin{macrocode}
-\newcommand*{\showISOenvelope}[1]{%
- \Ifstr{#1}{C4}{%
- \showenvelope(324mm,229mm)%
- }{%
- \Ifstr{#1}{C5}{%
- \showenvelope(229mm,162mm)%
- }{%
- \Ifstr{#1}{C5/6}{%
- \showenvelope(220mm,110mm)%
- }{%
- \Ifstr{#1}{DL}{%
- \showenvelope(220mm,110mm)%
- }{%
- \Ifstr{#1}{C6/5}{%
- \showenvelope(229mm,114mm)%
- }{%
- \Ifstr{#1}{C6}{%
- \showenvelope(162mm,114mm)%
- }{%
- \LCOWarning{visualize}{envelope size `ISO #1' unsupported}%
- }%
- }%
- }%
- }%
- }%
- }%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\showUScommercial}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Show a US commercial no. 9 or 10 envelope, depending on the argument.
-% \begin{macrocode}
-\newcommand*{\showUScommercial}[1]{%
- \Ifstr{#1}{9}{%
- \showenvelope(8.875in,3.875in)%
- }{%
- \Ifstr{#1}{10}{%
- \showenvelope(9.5in,4.125in)%
- }{%
- \LCOWarning{visualize}{envelope size `US commercial #1' unsupported}%
- }%
- }%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\showUScheck}
-% Show a US check envelope.
-% \begin{macrocode}
-\newcommand*{\showUScheck}{%
- \showenvelope(8.625in,3.625in)%
-}
-%</visualize&body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{command}{\showUSletterCixDW}
-% Show a Us commercial no. 9 envelope with two windows (this is defined in
-% \file{UScommercial9DW.lco} not in \file{visualize.lco}).
-% The sender window is $3\frac{1}{2}\,\mathrm{in}\times\frac{7}{8}\,\mathrm{in}$,
-% $\frac{5}{16}\,\mathrm{in}$ from the left and $2\frac{1}{2}\,\mathrm{in}$
-% from the bottom.
-% \begin{macrocode}
-%<*!visualize&UScommercial9DW&body>
-\newcommand*{\showUSletterCixDW}{%
- \showUScommercial9[{%
- \thicklines
- \usekomafont{envelope}%
- \measuredIFrame({\dimexpr (\paperwidth-
- \expandafter\dimexpr \useplength{firstheadwidth}\relax%
- )/2\relax},%
- -\expandafter\dimexpr\useplength{firstheadvpos}\relax)%
- (3.5in,.875in)%
- }]%
-}
-%</!visualize&UScommercial9DW&body>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macrocode}
-%</lco>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-listsandtabulars.dtx b/macros/latex/contrib/koma-script/source/scrkernel-listsandtabulars.dtx
deleted file mode 100644
index 646532522f..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-listsandtabulars.dtx
+++ /dev/null
@@ -1,491 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-listsandtabulars.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-listsandtabulars.dtx 3708 2022-02-15 15:24:12Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-15 16:24:12 +0100 (Di, 15. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3708 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-listsandtabulars.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (lists and tabulars)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{hvlogos}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-listsandtabulars.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2002/07/01}{first version after splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/15}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/15}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-listsandtabulars.dtx}
-% \title{Code of Lists, Tabulars and Similar Objects of the
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \file{scrkernel-listandtabulars.dtx} provides mainly code for all kind of
-% lists namely \env{itemize}, \env{enumerate}, \env{description},
-% \env{labeling}, \env{quote}, \env{quotation} and \env{addmargin} for all
-% \KOMAScript{} classes. And because the code for \env{tabbing} and
-% \env{tabular} is only some lines, it is added here too.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of Lists}
-%
-% \subsection{Options}
-%
-% The environments do not depend on options.
-%
-% \subsection{List margins}
-%
-% \begin{length}{\leftmargini,\leftmarginii,\leftmarginiii,\leftmarginiv,
-% \leftmarginv,\leftmarginvi,\leftmargin}
-% Usually lists can be nested at most six levels (but usually only four are
-% used). So we have to define six different margins depending on the level
-% (roman number added to \cs{leftmargin}):
-% \begin{macrocode}
-%<*body>
-%<*class>
-%<*!letter>
-\if@twocolumn
- \setlength{\leftmargini}{2em}
-\else
-%</!letter>
- \setlength{\leftmargini}{2.5em}
-%<!letter>\fi
-\setlength{\leftmarginii}{2.2em}
-\setlength{\leftmarginiii}{1.87em}
-\setlength{\leftmarginiv}{1.7em}
-%<*!letter>
-\if@twocolumn
- \setlength{\leftmarginv}{.5em}
- \setlength{\leftmarginvi}{.5em}
-\else
-%</!letter>
- \setlength{\leftmarginv}{1em}
- \setlength{\leftmarginvi}{1em}
-%<!letter>\fi
-\setlength{\leftmargin}{\leftmargini}
-% \end{macrocode}
-% \end{length}^^A \leftmargini … \leftmarginvi,\leftmargin
-%
-%
-% \subsection{List labels}
-%
-% \begin{length}{\labelsep,\labelwidth}
-% If a list has a label we need a label width and a horizontal distance after
-% the label.
-% \begin{macrocode}
-\setlength{\labelsep}{.5em}
-\setlength{\labelwidth}{\leftmargini}
-\addtolength{\labelwidth}{-\labelsep}
-% \end{macrocode}
-% \end{length}^^A \labelsep,\labewidth
-%
-%
-% \subsection{List penalties}
-%
-% \begin{macro}{\@beginparpenalty,\@endparpenalty,\@itempenatly}
-% Page breaks at the begin an end of lists or items are better than somewhere
-% else but not much.
-% \begin{macrocode}
-\@beginparpenalty=-\@lowpenalty
-\@endparpenalty =-\@lowpenalty
-\@itempenalty =-\@lowpenalty
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{List items}
-%
-% \begin{command}{\theenumi,\theenumii,\theenumiii,\theenumiv}
-% There are four levels of \env{enumerate} items with their numbers in Arabic,
-% lower case letters, lowercase Roman numbers, uppercase letters.
-% \begin{macrocode}
-\renewcommand*\theenumi{\@arabic\c@enumi}
-\renewcommand*\theenumii{\@alph\c@enumii}
-\renewcommand*\theenumiii{\@roman\c@enumiii}
-\renewcommand*\theenumiv{\@Alph\c@enumiv}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\labelenumi}
-% \begin{command}{\labelenumii}
-% \changes{v2.4m}{1997/02/28}{opening brace removed}
-% \begin{command}{\labelenumiii,\labelenumiv}
-% The printed labels consist of the previously defined numbers followed by a
-% dot or brace.
-% \begin{macrocode}
-\newcommand*\labelenumi{\theenumi.}
-\newcommand*\labelenumii{\theenumii)}
-\newcommand*\labelenumiii{\theenumiii.}
-\newcommand*\labelenumiv{\theenumiv.}
-% \end{macrocode}
-% \end{command}
-% \end{command}
-% \end{command}
-%
-% \begin{macro}{\p@enumii,\p@enumiii,\p@enumiv}
-% References to \env{enumerate} items are prefixed by the parent number and
-% additional separation signs like braces.
-% \begin{macrocode}
-\renewcommand*\p@enumii{\theenumi}
-\renewcommand*\p@enumiii{\p@enumii(\theenumii)}
-\renewcommand*\p@enumiv{\p@enumiii\theenumiii}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\labelitemi,\labelitemii,\labelitemiii,\labelitemiv}
-% \changes{v2.5g}{1999/10/09}{math mode eliminated}
-% \changes{v3.33}{2021/02/15}{Usage of new font element}
-% The characters used for \env{itemize} items. Again four levels are
-% supported. All of them use a own font element.
-% \begin{macrocode}
-\newcommand*\labelitemi{\usekomafont{labelitemi}{\textbullet}}
-\newcommand*\labelitemii{\usekomafont{labelitemii}{\textendash}}
-\newcommand*\labelitemiii{\usekomafont{labelitemiii}{\textasteriskcentered}}
-\newcommand*\labelitemiv{\usekomafont{labelitemiv}{\textperiodcentered}}
-% \end{macrocode}
-% \end{command}^^A \labelitemi … \labelitemiv
-%
-%
-% \subsection{Definition of the environments}
-%
-% \begin{environment}{description}
-% \begin{command}{\descriptionlabel}
-% \changes{v3.36}{2022/02/15}{using \cs{usekomafont\{descriptionlabel\}} instead
-% of \cs{descfont}}
-% This is used to describe a single term. The terms should be short, because
-% line breaks inside the terms are not supported. The term is the optional
-% argument of \cs{item}. It is printed with font of element \fnt{descriptionlabel}.
-% \begin{macrocode}
-\newenvironment{description}{%
- \list{}{\labelwidth\z@ \itemindent-\leftmargin
- \let\makelabel\descriptionlabel}%
-}{%
- \endlist
-}
-\newcommand*{\descriptionlabel}[1]{%
- \hspace{\labelsep}\usekomafont{descriptionlabel}{#1}%
-}
-% \end{macrocode}
-% \end{command}
-% \end{environment}
-%
-% \begin{environment}{labeling}
-% \begin{command}{\labelinglabel}
-% \changes{v3.02}{2009/01/01}{using font elements \fnt{labelinglabel} and
-% \fnt{labelingseparator}}
-% \changes{v3.02c}{2009/01/28}{using font elements \fnt{labelinglabel} and
-% \fnt{labelingseparator} also for the calculation of the width}
-% \changes{v3.03a}{2009/04/02}{fixed argument in the label width calculation}
-% The \env{labeling} environment is an extension of \env{description}. It has
-% an optional separation string (\texttt{\#1}) added behind every label. The
-% width of the labels are the width of the mandatory argument (\texttt{\#2}).
-% \begin{macrocode}
-%</class>
-\newenvironment{labeling}[2][]{%
- \def\sc@septext{#1}%
- \list{}{\settowidth{\labelwidth}{{%
- \usekomafont{labelinglabel}{#2%
- \usekomafont{labelingseparator}{\sc@septext}}%
- }}%
- \leftmargin\labelwidth \advance\leftmargin by \labelsep
- \let\makelabel\labelinglabel
- }%
-}{%
- \endlist
-}
-\newcommand\labelinglabel[1]{%
- \usekomafont{labelinglabel}{#1\hfil
- \usekomafont{labelingseparator}{\sc@septext}}%
-}
-%<*class>
-% \end{macrocode}
-% \end{command}
-% \end{environment}
-%
-% \begin{environment}{verse}
-% \changes{v2.3g}{1996/01/14}{\cs{item} does not wait for \texttt{[]}}
-% The environment for short poems.
-% \begin{macrocode}
-\newenvironment{verse}{%
- \let\\=\@centercr
- \list{}{\itemsep=\z@
- \itemindent=-1.5em
- \listparindent=\itemindent
- \rightmargin=\leftmargin
- \advance\leftmargin by1.5em
- }%
- \item\relax
-}{%
- \endlist
-}
-% \end{macrocode}
-% \end{environment}
-%
-% \begin{environment}{quotation,quote}
-% \changes{v2.3g}{1996/01/14}{\cs{item} does not wait for \texttt{[]}}
-% Two environments for left and right indented text. The difference of both
-% is: \env{quotation} works with paragraph indent (first line is indented),
-% \env{quote} works with paragraph distance.
-% \begin{macrocode}
-\newenvironment{quotation}{%
- \list{}{\listparindent 1em%
- \itemindent \listparindent
- \rightmargin \leftmargin
- \parsep \z@ \@plus\p@
- }%
- \item\relax
-}{%
- \endlist
-}
-\newenvironment{quote}{%
- \list{}{\rightmargin\leftmargin}%
- \item\relax
-}{%
- \endlist
-}
-% \end{macrocode}
-% \end{environment}
-%
-% \begin{environment}{addmargin}
-% \changes{v2.8q}{2001/11/29}{added}
-% \changes{v2.95a}{2006-07-20}{\cs{@listdepth} reset}
-% \begin{environment}{addmargin*}
-% \changes{v2.8q}{2001/11/29}{added}
-% \changes{v2.95a}{2006-07-20}{\cs{@listdepth} reset}
-% \changes{v3.17}{2015/03/23}{improved handling of page breaks at the beginning}
-% \changes{v3.22}{2016/08/02}{page break test for double-sided documents}
-% Both environments are similar to \env{quote} and \env{quotation}, but the
-% indent is not fix. If only the mandatory argument (\texttt{\#2}) is used, it
-% is the left and right indent. If the optional argument (\texttt{\#1}) is
-% also used, it is the left indent with \env{addmargin} resp. the inner indent
-% with \env{addmargin*}. Note, negative indents will extend to the
-% margins. Note, that page breaks inside \env{addmargin*} should be avoided,
-% because they result in wrong margins at the second, fourth, sixth etc. page.
-% \begin{macro}{\@addmargin}
-% \changes{v2.8q}{2001/11/29}{added}
-% \changes{v2.95}{2002/07/01}{\cs{item} does not wait for \texttt{[]}}
-% \changes{v2.9q}{2003/03/24}{unchanged \len{labelsep}}
-% \changes{v2.95a}{2006/07/20}{unchanged \cs{@tmpcnta}}
-% \changes{v3.05b}{2010/04/29}{\len{partopsep} has to be 0 instead of
-% \len{parskip} because of adding \len{topsep}}
-% \changes{v3.17}{2015/03/23}{improved handling of page breaks at the beginning}
-% \changes{v3.28}{2019/11/19}{\cs{ifthispageodd} replaced by \cs{Ifthispageodd}}
-% \begin{macro}{\scr@addmargin@startpage}
-% \changes{v3.12}{2013/10/26}{added}
-% \changes{v3.12}{2013/10/26}{page break test for \env{addmargin*}}
-% \changes{v3.22}{2016/10/21}{unchanged \len{topsep} and \len{partopsep}}
-% \begin{macrocode}
-%</class>
-\newenvironment{addmargin}{%
- \@tempswafalse\@addmargin
-}{%
- \advance\@listdepth\@ne
- \endlist
-}
-\newenvironment{addmargin*}{%
- \@tempswafalse
- \if@twoside\is@thispageodd[]\ifthispagewasodd\else\@tempswatrue\fi
- \edef\scr@addmargin@startpage{\csname tpo@\scr@tpo\endcsname}\fi
- \@addmargin
-}{%
- \if@twoside
- \unskip\nobreak\Ifthispageodd{}{}%
- \expandafter\ifx\csname tpo@\scr@tpo\endcsname\scr@addmargin@startpage\else
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrextend}{%
- page break inside `addmargin*' environment.\MessageBreak
- A `addmargin*' environment starting on page
- \scr@addmargin@startpage\MessageBreak
- ends on page \csname tpo@\scr@tpo\endcsname.\MessageBreak
- This will result in potential wrong margins on\MessageBreak
- every other page.\MessageBreak
- So maybe you should change the `addmargin*'\MessageBreak
- environment, that ends%
- }%
- \fi
- \fi
- \advance\@listdepth\@ne
- \endlist
-}
-\newcommand*{\@addmargin}[2][\@tempa]{%
- \list{}{%
- \if@tempswa
- \def\@tempa{\leftmargin}%
- \setlength{\leftmargin}{#2}%
- \setlength{\rightmargin}{#1}%
- \else
- \def\@tempa{\rightmargin}%
- \setlength{\rightmargin}{#2}%
- \setlength{\leftmargin}{#1}%
- \fi
- \setlength{\listparindent}{\parindent}%
- \setlength{\itemsep}{\parskip}%
- \setlength{\itemindent}{\z@}%
- \setlength{\@tempskipa}{\topsep}%
- \setlength{\topsep}{\z@}%
- \setlength{\parsep}{\parskip}%
- \setlength{\@tempskipb}{\partopsep}%
- \setlength{\partopsep}{\z@}%
- \let\makelabel\@gobble
- \setlength{\labelwidth}{\z@}%
- \advance\@listdepth\m@ne
- }%
- \expandafter\ifnum\scr@v@is@ge{3.22}%
- \setlength{\topsep}{\@tempskipa}%
- \setlength{\partopsep}{\@tempskipb}%
- \fi
- \item\is@thispageodd@setlabel\nobreak\ignorespaces
-}
-%<*class>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{environment}
-% \end{environment}
-%
-%
-% \subsection{Font elements of lists}
-%
-% \begin{fontelement}{descriptionlabel}
-% \changes{v2.8o}{2001/09/14}{added}
-% The font element is defined indirect by some macros to stay compatible with
-% \KOMAScript{} before the design of font elements.
-% \begin{macro}{\descfont}
-% \changes{v3.20}{2016/01/29}{\cs{sffamily} replaced by \cs{@gr@gsffamily}}
-% The font of the item labels of \env{description}. The command \cs{descfont}
-% should not be used by users. Think of it as an internal macro. The user
-% space name is because of compatibility to very old \KOMAScript{} versions.
-% \begin{macrocode}
-\newcommand*\descfont{\@gr@gsffamily\bfseries}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\scr@fnt@descriptionlabel}
-% The font element uses \cs{descfont}.
-% \begin{macrocode}
-\newcommand*{\scr@fnt@descriptionlabel}{\descfont}
-% \end{macrocode}
-% \end{macro}
-% \end{fontelement}
-%
-% \begin{fontelement}{labelitemi,labelitemii,labelitemiii,labelitemiv,itemizelabel}
-% \changes{v3.33}{2021/02/15}{added}
-% \begin{command}{\labelitemfont}
-% \changes{v3.33}{2021/02/15}{added}
-% Due to a change in the LaTeX kernel 2020/02/02 the \env{itemize} items
-% react on font changes. For this the standard classes have been changed to
-% set the item \emph{bullets} using \cs{labelitemfont} which is
-% \cs{normalfont} by default. I've adapted this using also \cs{labelitemfont}
-% for compatibility but only to store the font of font element
-% \fnt{itemizelabel} which is the default of the level depending font
-% elements. \fnt{itemlabelii} differs, because the default \cs{textendash}
-% should be bold.
-% \begin{macrocode}
-\newcommand*{\labelitemfont}{\normalfont}
-\newcommand*\scr@fnt@itemizelabel{\labelitemfont}
-\newkomafont{labelitemi}{\usekomafont{itemizelabel}}
-\newkomafont{labelitemii}{\usekomafont{itemizelabel}\bfseries}
-\newkomafont{labelitemiii}{\usekomafont{itemizelabel}}
-\newkomafont{labelitemiv}{\usekomafont{itemizelabel}}
-%</class>
-% \end{macrocode}
-% \end{command}
-% \end{fontelement}
-%
-% \begin{fontelement}{labelinglabel,labelingseparator}
-% \changes{v3.02}{2009/01/01}{added}
-% The \env{labeling} environment has two font elements, one for the whole
-% label and one for the separator only. The default is no change.
-% \begin{macrocode}
-\newkomafont{labelinglabel}{}
-\newkomafont{labelingseparator}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-%
-% \section{Implementation of Tabulars, Array etc.}
-%
-% All these environments are implemented in the \LaTeX{} kernel already. We
-% only need some configuration parameters.
-%
-% \begin{length}{\arraycolsep,\tabcolsep,\arrayrulewidth,\doublerulewidth,
-% \tabbingsep}
-% These are the distances between columns in \env{array} and \env{tabular},
-% the width of lines/rules independent from \env{array} or \env{tabular} and
-% the distance of double lines/rules (two consecutive \cs{hline}). The last
-% one, \cs{tabbingsep}, is the \cs{'} distance in \env{tabbing} environments.
-% All values are same as in the standard classes.
-% \begin{macrocode}
-%<*class>
-\setlength\arraycolsep{5\p@}
-\setlength\tabcolsep{6\p@}
-\setlength\arrayrulewidth{.4\p@}
-\setlength\doublerulesep{2\p@}
-\setlength\tabbingsep{\labelsep}
-%</class>
-% \end{macrocode}
-% \end{length}^^A \arraycolsep … \tabbingsep
-%
-%
-% \begin{macrocode}
-%</body>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-listsof.dtx b/macros/latex/contrib/koma-script/source/scrkernel-listsof.dtx
deleted file mode 100644
index 21db04d92b..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-listsof.dtx
+++ /dev/null
@@ -1,1240 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-listsof.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-listsof.dtx 3733 2022-03-01 08:20:43Z kohm $
-%<prepare>%%% (run: prepare)
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-01 09:20:43 +0100 (Di, 01. Mär 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3733 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-listsof.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (lists of)]%
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{hvlogos}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-listsof.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2002/06/28}{first version after splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/28}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/28}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-listsof.dtx}
-% \title{Table of Contents, List of Figures, and List of Tables Within
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \LaTeX{} classes provides a number of directories like the table of
-% contents, list of figures, and list of
-% tables. \file{scrkernel-listsof.dtx} provides parts of the implementation
-% of them. But note: Since the \KOMAScript{} classes use \pkg*{tocbasic} for
-% all these tables and lists, most of the code has been moved to
-% \file{tocbasic.dtx} and \file{scrkernel-tocstyle.dtx}.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of the table of contents and similar lists in the
-% \KOMAScript{} classes}
-%
-% Only \cls*{scrartcl}, \cls*{scrbook} and \cls{scrreprt} provide floats and
-% headings. So only these need to provide tables and lists of such
-% elements. Especially the letter class \cls*{scrlttr2} does not need any of
-% this code.
-%
-% \begin{macrocode}
-%<*!letter>
-% \end{macrocode}
-%
-% \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@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
-% numbers.
-% \begin{description}
-% \item[ToDo:] Replace this by any kind of \emph{addto hook command}, maybe
-% even by a generic \LaTeX{} hook.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\g@addto@macro{\numberline@numberpostfix}{\autodot}
-%</body>
-% \end{macrocode}
-% \end{macro}%^^A \numberline@numberpostfix
-%
-% \begin{command}{\numberline}
-% \changes{v3.20}{2016/03/15}{using definition of \pkg*{tocbasic}}
-% Just activate the usage of the \pkg*{tocbasic} definition of
-% \cs{numberline}.
-% \begin{macrocode}
-%<*body>
-\usetocbasicnumberline[%
- \ClassInfo{\KOMAClassName}{Redefining `\string\numberline'}%
-]
-%</body>
-% \end{macrocode}
-% \end{command}%^^A \numberline
-%
-% \changes{v3.06}{2010/06/02}{activating \pkg*{tocbasic} feature
-% \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
-% 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.
-% \begin{macrocode}
-%<*body&(book|report)>
-\doforeachtocfile[float]{%
- \setuptoc{\@currext}{chapteratlist}%
-}
-\AtAddToTocList[float]{%
- \setuptoc{\@currext}{chapteratlist}%
-}
-%</body&(book|report)>
-% \end{macrocode}
-%
-% \begin{macro}{\before@starttoc,\after@starttoc}
-% \changes{v2.8q}{2001/11/14}{added}
-% If either \texttt{tocleft} or \texttt{listsleft} is used, we need to collect
-% additional information about the natural width of the numbers and also have
-% to change the used width of the numbers. So we have two macros, that will be
-% added to the \pkg*{tocbasic} hooks. \cs{before@starttoc} does some internal
-% changes before \cs{@starttoc} to collect and use the
-% information. \cs{after@starttoc} writes the information to the \file{aux}
-% file after \cs{@starttoc}.
-% \begin{macro}{\scr@dottedtocline}
-% \changes{v2.9k}{2003/01/03}{also change the third argument}^^A
-% \begin{macro}{\scr@numberline}
-% \changes{v3.06}{2010/05/18}{removed}^^A
-% \end{macro}
-% \begin{macro}{\last@l@number}
-% The \KOMAScript{} classes themselves use the \pkg*{tocbasic} entry style
-% \texttt{tocline}. However other packages may use the \LaTeX{} kernel command
-% \cs{@dottedtocline}. Currently we support these too. But to do so, we need
-% to locally redefine \cs{@dottedtocline} to change the second and third
-% argument. The second is the \meta{indent} and has always to be 0 (with
-% \texttt{listsleft}). The third is the number width and has to be
-% \cs{last@l@number}. I do not like to redefine \LaTeX{} kernel macros, so
-% maybe the support for list entries, which use \cs{@dottedtocline}, will be
-% removed in future. However, in this case we still would need some of the
-% code or similar code to initialize values and features of \pkg*{tocbasic}.
-% At loading time we only need to \emph{reserve} the macros. The real
-% definition will be done when reading the auxiliary files of the lists or the
-% main \file{aux} file.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\scr@dottedtocline}{}
-\newcommand*{\last@l@number}{}
-% \end{macrocode}
-% \end{macro}^^A \last@l@number
-% \end{macro}^^A \scr@dottedtocline
-% \begin{macro}{\@l@number,\set@l@number}
-% \changes{v2.8q}{2001/11/14}{added}
-% We also need local macros to store the currently maximal number width while
-% reading an auxiliary file. \cs{set@l@number} not only has to update
-% \cs{@l@number} but also to set \len{@temdima} to the real maximum. It is
-% used inside \cs{numberline@box}, which is used inside \cs{numberline}, if
-% the \pkg*{tocbasic} definition of \cs{numberline} is used.
-% \begin{macrocode}
-\newcommand*{\@l@number}{}
-\newcommand*{\set@l@number}[1]{%
- \settowidth{\@tempdima}{#1\enskip}%
- \ifdim\@tempdima >\@l@number
- \xdef\@l@number{\the\@tempdima}%
- \fi%
- \ifdim\@tempdima >\last@l@number \else
- \setlength{\@tempdima}{\last@l@number}%
- \fi%
-}
-% \end{macrocode}
-% \end{macro}^^A \@l@number,\set@l@number
-% \changes{v2.95a}{2006/07/12}{empty case initialization}
-% \changes{v3.06}{2010/05/18}{re-defining \cs{numberline} instead of
-% \cs{numberline@box}}
-% The usage of all these local macros has to be initialized in
-% \cs{before@starttoc}.
-% \begin{macrocode}
-\newcommand*{\before@starttoc}[1]{%
- \let\scr@dottedtocline=\@dottedtoclilne
- \renewcommand*{\@dottedtocline}[3]{%
- \scr@dottedtocline{##1}{\z@}{\last@l@number}}%
- \renewcommand*{\numberline@box}[1]{%
- \set@l@number{##1}\hb@xt@\@tempdima{##1}}%
- \gdef\@l@number{\z@}%
- \@ifundefined{#1@l@number}{%
- \def\last@l@number{2em}%
- }{%
- \expandafter\ifx\csname #1@l@number\endcsname\@empty
- \let\last@l@number\z@
- \else
- \expandafter\let\expandafter\last@l@number
- \expandafter=\csname#1@l@number\endcsname
- \fi
- }%
-% \end{macrocode}
-% \changes{v3.20}{2015/11/26}{initialization of \pkg*{tocbasic} values}
-% We also have to locally change the indent and number width values of the
-% \pkg*{tocbasic} styles.
-% \begin{macrocode}
- \begingroup
- \def\do@endgroup{\endgroup}%
- \def\do##1{%
- \scr@ifundefinedorrelax{scr@tso@##1@numwidth}{}{%
-%<*trace>
- \ClassInfo{\KOMAClassName}{%
- Setting numwidth of `##1' to \last@l@number}%
-%</trace>
- \l@addto@macro\do@endgroup{%
- \@namedef{scr@tso@##1@numwidth}{\last@l@number}%
- }%
- }%
- \scr@ifundefinedorrelax{scr@tso@##1@indent}{}{%
-%<*trace>
- \ClassInfo{\KOMAClassName}{%
- Setting indent of `##1' to \string\z@}%
-%</trace>
- \l@addto@macro\do@endgroup{%
- \@namedef{scr@tso@##1@indent}{\z@}%
- }%
- }%
- }%
- \@nameuse{scr@dte@donumwidth}%
- \do@endgroup
-}
-\newcommand*{\after@starttoc}[1]{%
- \protected@write\@auxout{}{%
- \string\gdef\expandafter\string\csname#1@l@number\endcsname{%
- \@l@number}}%
-}
-% \end{macrocode}
-% Last but not least we have to add the code to the \pkg*{tocbasic} hooks
-% before and after \cs{@starttoc}. Note: This is also used for the table of
-% contents, but in this case \cs{if@dynlist} will be used different.
-% \begin{description}
-% \item[ToDo:] A better suggestion could be to use \meta{category} dependent
-% code here to use \cs{if@dynlist} only for \meta{category} \texttt{float}
-% but \cs{if@tocleft} for \meta{category} \texttt{ToC}. So the support for
-% things like \emph{table of appendix contents} could be benefit.
-% \end{description}
-% \begin{macrocode}
-\g@addto@macro\tocbasic@@before@hook{%
- \if@dynlist\expandafter\before@starttoc\expandafter{\@currext}\fi
-}
-\g@addto@macro\tocbasic@@after@hook{%
- \if@dynlist\expandafter\after@starttoc\expandafter{\@currext}\fi
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@dottedtocline
-%
-%
-% \subsection{The table of contents}
-%
-% \changes{v3.27}{2019/05/11}{init code moved from \file{tocbasic.dtx}}
-% \changes{v3.01}{2008/11/13}{auto-activation of feature \texttt{onecolumn}}
-% Set feature \texttt{onecolumn} for every ToC file.
-% \begin{macrocode}
-%<*prepare&(book|report)>
-\AtAddToTocList[\@currname.\@currext]{\setuptoc{\@currext}{onecolumn}}%
-\AtAddToTocList[ToC]{\setuptoc{\@currext}{onecolumn}}%
-%</prepare&(book|report)>
-% \end{macrocode}
-% Tell the package, what files are used:
-% \changes{v3.27}{2019/05/11}{use category \texttt{ToC} for the table of
-% contents}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}%^^A
-% \begin{macrocode}
-%<*prepare>
-\addtotoclist[ToC]{toc}
-\Ifstr{\ext@toc}{toc}{}{%
- \expandafter\addtotoclist
- \expandafter[\expandafter T\expandafter o\expandafter C\expandafter ]%
- \expandafter{\ext@toc}%
-}
-%</prepare>
-% \end{macrocode}
-%
-% \begin{macro}{\@tocleftfalse,\@tocleftrue,\if@tocleft}
-% \changes{v2.8q}{2001/11/14}{added}
-% \changes{v2.98c}{2008/03/05}{earlier definition}
-% The switch is used to store the information whether to use a flat
-% (\cs{@toclefttrue}) or a graduated (\cs{@tocleftalse}) table of contents.
-% \begin{macrocode}
-%<*option>
-\newif\if@tocleft
-%</option>
-% \end{macrocode}
-% \end{macro}^^A … \if@tocleft
-%
-% \begin{option}{toc}
-% \changes{v2.98c}{2008/03/04}{added}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.12}{2013/08/26}{\cs{KOMA@options} replaced by
-% \cs{KOMAExecuteOptions}}
-% \changes{v3.12a}{2014/01/17}{\cs{KOMAExecuteOptions} replaced by
-% \cs{KOMAoptions}}
-% \changes{v3.18}{2015/06/15}{value \opt{\quotechar=indexnumbered} added}
-% The main features of the table of contents can be configured by this
-% option.
-% \begin{macrocode}
-%<*option>
-\KOMA@key{toc}{%
- \KOMA@set@ncmdkey{toc}{@tempa}{%
-% \end{macrocode}
-% \changes{v3.28}{2019/10/21}{several alias values added}
-% The provided values are (aliases are also available):
-% \begin{description}
-% \item[\opt{=noindex}:] (default) for the index neither add an entry to the
-% table of contents nor number the heading of the index.
-% \end{description}
-% \begin{macrocode}
- {noindex}{0},{noidx}{0},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=index}:] for the index add an entry to the table of contents,
-% but do not number the index.
-% \end{description}
-% \begin{macrocode}
- {index}{1},{idx}{1},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=indexnumbered}:] number the index and therefore also add an
-% entry to the table of contents.
-% \end{description}
-% \begin{macrocode}
- {indexnumbered}{2},{idxnumbered}{2},{numberedindex}{2},{numberedidx}{2},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=nolistof}:] (default) for any list with category/owner
-% \texttt{float} neither add an entry to the table of contents, nor
-% number the heading of the list of the floats.
-% \end{description}
-% \begin{macrocode}
- {nolistof}{3},{nolistsof}{3},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=listof}:] for each list with category/owner \texttt{float} add an
-% entry to the table of contents, but do not number the list of the floats.
-% \end{description}
-% \begin{macrocode}
- {listof}{4},{listsof}{4},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=listofnumbered}:] for each list of category/owner \texttt{float}
-% number the list of floats and therefore add an entry to table of contents.
-% \end{description}
-% \begin{macrocode}
- {listofnumbered}{5},{numberedlistof}{5},%
- {listsofnumbered}{5},{numberedlistsof}{5},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=nobibliography}:] (default) for the bibliography neither add an
-% entry to the table if contents nor number the heading.
-% \end{description}
-% \begin{macrocode}
- {nobibliography}{6},{nobib}{6},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=bibliography}:] for the bibliography add an entry to the table
-% of contents, but do not number the bibliography.
-% \end{description}
-% \begin{macrocode}
- {bibliography}{7},{bib}{7},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=bibliographynumbered}:] number the bibliography and therefore
-% add an entry to the table of contents.
-% \end{description}
-% \begin{macrocode}
- {bibliographynumbered}{8},{bibnumbered}{8},{numberedbibliography}{8},%
- {numberedbib}{8},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=flat}:] use the flat version of the table of contents (all
-% numbers are at one column, all texts in another one).
-% \end{description}
-% \begin{macrocode}
- {flat}{9},{left}{9},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=graduated}:] (default) use a hierarchical indented table of
-% contents similar to the standard classes.
-% \end{description}
-% \begin{macrocode}
- {graduated}{10},{indent}{10},{indented}{10},%
-% \end{macrocode}
-% \changes{v3.12}{2014/09/24}{values \opt{\quotechar=numberline} and
-% \opt{\quotechar=nonumberline} etc. added}
-% \begin{description}
-% \item[\opt{=numberline}:] indent entries without number like entries with
-% number.
-% \end{description}
-% \begin{macrocode}
- {indenttextentries}{11},{indentunnumbered}{11},{numberline}{11},%
-% \end{macrocode}
-% \begin{macrocode}
-% \begin{description}
-% \item[\opt{nonumberline}:] (default) do not indent the first line of an
-% entry without number
-% \end{description}
-% \begin{macrocode}
- {leftaligntextentries}{12},{leftalignunnumbered}{12},{nonumberline}{12},%
-% \end{macrocode}
-% \changes{v3.15}{2015/01/14}{values \opt{\quotechar=chapterentrywithdots},
-% \opt{\quotechar=chapterentrywithoutdot} resp.
-% \opt{\quotechar=sectionentrywithdots},
-% \opt{\quotechar=sectionentrywithoutdot} added}
-% \begin{description}
-% \item[\opt{=chapterentrywithdots}:] classes with \cs{chapter} provide a dot
-% filler also for chapter entries.
-% \end{description}
-% \begin{macrocode}
-%<book|report> {chapterentrywithdots}{13},{chapterentrydotfill}{13},
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=chapterentrywithoutdots}:] (default) classes with \cs{chapter} use
-% a space filler for chapter entries.
-% \end{description}
-% \begin{macrocode}
-%<book|report> {chapterentrywithoutdots}{14},{chapterentryfill}{14}%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=sectionentrywithdots}:] classes without \cs{chapter} use
-% dot filler also for section entries.
-% \end{description}
-% \begin{macrocode}
-%<article> {sectionentrywithdots}{13},{sectionentrydotfill}{13},
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=sectionentrywithoutdots}:] (default) classes without
-% \cs{chapter} use a space filler for section entries.
-% \end{description}
-% \begin{macrocode}
-%<article> {sectionentrywithoutdots}{14},{sectionentryfill}{14}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifcase \@tempa\relax % noindex
- \KOMAoptions{index=notoc}%
- \or % index
- \KOMAoptions{index=totoc}%
- \or % indexnumbered
- \KOMAoptions{index=numbered}%
- \or % listof
- \KOMAoptions{listof=notoc}%
- \or % nolistof
- \KOMAoptions{listof=totoc}%
- \or % listofnumbered
- \KOMAoptions{listof=numbered}%
- \or % nobibliography
- \KOMAoptions{bibliography=nottotoc}%
- \or % bibliography
- \KOMAoptions{bibliography=totoc}%
- \or % bibliographynumbered
- \KOMAoptions{bibliography=totocnumbered}%
- \or % flat
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{flat}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{graduated}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{flat}%
- \@toclefttrue
- \or % graduated
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{flat}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{graduated}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{graduated}%
- \@tocleftfalse
- \or % indenttextentries
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indenttextentries}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{leftaligntextentries}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{indenttextentries}%
- \expandafter\setuptoc\expandafter{\ext@toc}{numberline}%
- \or % leftaligntextentries
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indenttextentries}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{leftaligntextentries}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{leftaligntextentries}%
- \expandafter\unsettoc\expandafter{\ext@toc}{numberline}%
- \or % chapterentrywithdots/sectionentrywithdots
-%<book|report> \KOMAoptions{chapterentrydots=true}%
-%<article> \KOMAoptions{sectionentrydots=true}%
- \or % chapterentrywithoutdots/sectionentrywithoutdots
-%<book|report> \KOMAoptions{chapterentrydots=false}%
-%<article> \KOMAoptions{sectionentrydots=false}%
- \fi
- \fi
-}
-%</option>
-% \end{macrocode}
-% \end{option}
-%
-% \begin{option}{tocleft,tocindent}
-% \changes{v2.8q}{2001/11/14}{added}
-% \changes{v2.98c}{2008/03/05}{obsolet}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macrocode}
-%<*option>
-\KOMA@DeclareDeprecatedOption{tocleft}{toc=flat}
-\KOMA@DeclareDeprecatedOption{tocindent}{toc=graduated}
-%</option>
-% \end{macrocode}
-% \end{option}^^A tocleft,tocindent
-%
-% \begin{command}{\contentsname}
-% \begin{command}{\listoftocname}
-% \changes{v3.00}{2008/07/03}{added to be used by \pkg*{tocbasic}}
-% \changes{v3.27}{2019/05/11}{language dependency added}
-% The name of the table of contents.
-% \begin{macrocode}
-%<*body>
-\newcommand*\contentsname{Contents}
-\newcommand*\listoftocname{\contentsname}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\contentsname{Contents}%
-%</body>
-% \end{macrocode}
-% \end{command}^^A \listoftocname
-% \end{command}^^A \contentsname
-%
-% \begin{counter}{tocdepth}
-% The counter is used to define, down to which level the entries are shown in
-% the table of contents (resp. list of floats, because the same value is used
-% there). Note: We don't use symbolic values here, because usage of symbolic
-% values would add an additional order dependency with the corresponding
-% \cs{DeclareSecionCommand}.
-% \begin{macrocode}
-%<*body>
-%<book|report>\setcounter{tocdepth}{2}
-%<article>\setcounter{tocdepth}{3}
-%</body>
-% \end{macrocode}
-% \end{counter}^^A tocdepth
-%
-% \begin{macro}{\toc@heading}
-% \changes{v2.3h}{1995/01/21}{added for \cls*{scrartcl}}
-% \changes{v2.95}{2002/06/28}{added for \cls*{scrreprt}and \cls*{scrbook}}
-% \changes{v3.00}{2008/07/04}{deprecated}
-% \changes{v3.10}{2011/08/31}{using \cs{MakeMarkcase}}
-% \changes{v3.30}{2020/02/24}{white space at end of warning removed}
-% This has been defined before usage of \pkg*{tocbasic}. Internally it is not
-% used any longer.
-% \begin{macrocode}
-%<*body>
-\newcommand*\toc@heading{%
- \ClassWarning{\KOMAClassName}{%
- usage of deprecated \string\toc@heading!\MessageBreak
- You should use the features of package `tocbasic'\MessageBreak
- instead of \string\toc@heading.\MessageBreak
- Definition of \string\toc@heading\space may be removed from\MessageBreak
- KOMA-Script soon, so it should not be used%
- }%
-%<article> \section*{\contentsname}%
-%<book|report> \chapter*{\contentsname}%
- \@mkboth{\MakeMarkcase{\contentsname}}{\MakeMarkcase{\contentsname}}%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \toc@heading
-%
-% \begin{macro}{\toc@l@number}
-% \changes{v2.8q}{2001/11/14}{added}
-% The number length storage used by \cs{before@starttoc} for \meta{extension}
-% \texttt{toc}. For safety we just \emph{reserve} it.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\toc@l@number}{}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \toc@l@number
-%
-% \begin{command}{\tableofcontents}
-% \changes{v2.3h}{1995/01/21}{using \cs{toc@heading}}
-% \changes{v2.8l}{2001/08/16}{group added an \len{parskip} set to 0}
-% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse} and \cs{@parskip@indent}}
-% \changes{v2.8q}{2001/11/14}{\cs{if@tocleft} changed}
-% \changes{v2.95}{2002/06/28}{\cls*{scrartcl} also uses \cs{if@tocleft}}
-% \changes{v2.95}{2004/11/05}{\cs{@parskipfalse} and \cs{@parskip@indent} replaced}
-% \changes{v3.00}{2008/07/04}{re-implementation using \pkg*{tocbasic}}
-% The table of contents. See the note above about the local change of
-% \cs{if@dynlist}.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\tableofcontents}{%
- \begingroup
- \let\if@dynlist\if@tocleft
- \expandafter\listoftoc\expandafter{\ext@toc}%
- \endgroup
-}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \tableofcontents
-%
-% \begin{command}{\addtocentrydefault}
-% \changes{v3.08}{2010/11/01}{added}
-% \changes{v3.12}{2013/09/24}{using new \pkg*{tocbasic} macro
-% \cs{tocbasic@addxcontentsline}}
-% Instead of making the entries into the table of contents directly with
-% the \LaTeX{} low level command \cs{addcontentsline} we provide a class
-% specific low level user command
-% \begin{quote}
-% \cs{addtocentrydefault}\marg{level name}\marg{formatted number}\marg{entry text}
-% \end{quote}
-% that uses the \pkg*{tocbasic} package author command
-% \cs{tocbasic@addctontentsline}. We cannot use \cs{addxcontentsline} because
-% this will run \cs{add\meta{level name}\meta{toc}entry} if available and
-% \cs{addtocentrydefault} is used by the entry commands
-% \cs{addchaptertocentry}, \cs{addsectiontocentry}. So \cs{addtoentrydefault}
-% is a helper for the callbacks from \cs{addxcontentsline} and needs to use
-% the package author interface instead of the user interface. For not numbered
-% entries the \meta{formatted number} should be empty (not only expand to no
-% output). Note: Entries with empty \meta{entry text} will be omitted.
-% \begin{macrocode}
-%<*body>
-\newcommand{\addtocentrydefault}[3]{%
- \expandafter\tocbasic@addxcontentsline\expandafter{\ext@toc}{#1}{#2}{#3}%
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{The lists of floats (or similar environments)}
-%
-% The list of tables, list of figures and similar lists of environments with
-% category/owner \texttt{float} are very similar to the table of contents. But
-% they use a own set of options and also some commands.
-%
-% \changes{v3.25}{2017/10/10}{extension \texttt{lof} not added explicitely}
-% \changes{v3.25}{2017/10/10}{extension \texttt{lot} not added explicitely}
-% Note: We must not add extensions \texttt{lof} and \texttt{lot} explicitely,
-% because these files will be prepared using \cs{DeclareNewTOC} that also
-% registers the extension.
-%
-% \changes{v3.01}{2008/11/13}{auto-activation of feature \texttt{onecolumn}}
-% Set feature \texttt{onecolumn} for every float list file.
-% \begin{macrocode}
-%<*prepare&(book|report)>
-\AtAddToTocList[float]{\setuptoc{\@currext}{onecolumn}}%
-%</prepare&(book|report)>
-% \end{macrocode}
-%
-% \begin{macro}{\float@@listhead}
-% \changes{v2.98c}{2008/03/05}{added}
-% \changes{v3.01}{2008/11/14}{deprecated}
-% Prints only the heading, nothing else. The heading text is the argument.
-% \begin{macrocode}
-%<*option>
-\newcommand*{\float@@listhead}{%
-%<article> \section*
-%<report|book> \chapter*
-}
-%</option>
-% \end{macrocode}
-% \end{macro}^^A \float@@listhead
-%
-% \begin{macro}{\@dynlistfalse,\@dynlisttrue,\if@dynlist}
-% \changes{v2.8q}{2001/11/14}{added}
-% The switch to select the flat (\cs{@dynlisttrue}) or graduated
-% (\cs{@dynlistfalse)} list type.
-% \begin{macrocode}
-%<*option>
-\newif\if@dynlist
-%</option>
-% \end{macrocode}
-% \end{macro}^^A … \if@dynlist
-%
-% \begin{option}{listof}
-% \changes{v2.98c}{2008/03/05}{added}
-% \changes{v3.06}{2010/06/02}{options for \pkg*{tocbasic} features do not only
-% work for the currently defined lists but all future lists of category
-% \texttt{float}}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.12}{2013/06/26}{\cs{KOMA@options} replaced by
-% \cs{KOMAExecuteOptions}}
-% \changes{v3.12a}{2014/01/17}{\cs{KOMAExecuteOptions} replaced by
-% \cs{KOMAoptions}}
-% The main features of the lists of floats can be configured by this option.
-% \begin{macrocode}
-%<*option>
-\KOMA@key{listof}{%
- \KOMA@set@ncmdkey{listof}{@tempa}{%
-% \end{macrocode}
-% The provided values are (aliases are also available):
-% \begin{description}
-% \item[\opt{=notoc}:] (default) neither number the lists of floats nor add
-% entries to them into the table of contents.
-% \end{description}
-% \begin{macrocode}
- {notoc}{0},{nottotoc}{0},{plainheading}{0},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=totoc}:] do not number the lists of floats but nevertheless add
-% an entry for each of them to the table of contents.
-% \end{description}
-% \begin{macrocode}
- {totoc}{1},{toc}{1},{notnumbered}{1},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=numbered}:] number the lists of floats and therefore also add an
-% for each of them to the table of contents.
-% \end{description}
-% \begin{macrocode}
- {numbered}{2},{totocnumbered}{2},{tocnumbered}{2},{numberedtotoc}{2},%
- {numberedtoc}{2},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=flat}:] use the flat version of the lists of floats (all
-% numbers are at one column, all texts in another one). Usually this only
-% removes the indent and calculates the needed width of the numbers. But,
-% e.g., if chapters are added, it does work over all levels.
-% \end{description}
-% \begin{macrocode}
- {flat}{3},{left}{3},%
-% \item[\opt{=graduated}:] (default) use hierarchical indented lists of
-% floats similar to the standard classes.
-% \end{description}
-% \begin{macrocode}
- {graduated}{4},{indent}{4},{indented}{4},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=leveldown}:] Use for the lists of floats a section hierarchy one
-% level below the standard level.
-% \end{description}
-% \begin{macrocode}
- {leveldown}{5},
-% \end{macrocode}
-% \changes{v3.25}{2017/12/04}{value \opt{\quotechar=standardlevel} added}
-% \begin{description}
-% \item[\opt{=standardlevel}:] (default) Use for the lists of floats the
-% standard hierarchy.
-% \end{description}
-% \begin{macrocode}
- {standardlevel}{6},
-% \end{macrocode}
-% \changes{v3.06}{2010/05/18}{value \opt{\quotechar=entryprefix} added}
-% \begin{description}
-% \item[\opt{=entryprefix}:] Prefix the number of each entry with
-% \cs{listof\meta{toc}entryprefix}. Note: This is more or less senseless and
-% does not work correctly with chapter entries in the lists of floats. It is
-% recommended to reconfigure the entries, e.g., using
-% \cs{DeclareTOCStyleEntry} or redefining \cs{add\meta{level
-% name}\meta{toc}entry} instead. Note: \opt{listof=entryprefix} also
-% activates \opt{listof=flat}.
-% \end{description}
-% \begin{macrocode}
- {entryprefix}{7},
-% \end{macrocode}
-% \changes{v3.12}{2014/09/24}{values \opt{\quotechar=numberline} and
-% \opt{\quotechar=nonumberline} etc. added}
-% \begin{description}
-% \item[\opt{=numberline}:] indent entries without number like entries with
-% number.
-% \end{description}
-% \begin{macrocode}
- {indenttextentries}{8},{indentunnumbered}{8},{numberline}{8},%
-% \end{macrocode}
-% \begin{macrocode}
-% \begin{description}
-% \item[\opt{=nonumberline}:] (default) do not indent the first line of an
-% entry without number
-% \end{description}
-% \begin{macrocode}
- {leftaligntextentries}{9},{leftalignunnumbered}{9},{nonumberline}{9}%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=chapterentry}:] \cls*{scrbook} and \cls*{scrreprt} provides
-% chapter entries into the lists of floats.
-% \end{description}
-% \begin{macrocode}
-%<*book|report>
- ,{chapterentry}{10},{withchapterentry}{10},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=nochaptergap}:] Alternatively the lists of floats can ignore chapters.
-% \end{description}
-% \begin{macrocode}
- {nochaptergap}{11},{ignorechapter}{11},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=chaptergapsmall}:] (default) chapters can add a small
-% vertical distance into the lists of floats.
-% \end{description}
-% \begin{macrocode}
- {chaptergapsmall}{12},{smallchaptergap}{12},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=chaptergapline}:] chapters can add an empty line to the lists of
-% floats.
-% \end{description}
-% \begin{macrocode}
- {chaptergapline}{13},{onelinechaptergap}{13}%
-%</book|report>
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifcase \@tempa\relax % notoc
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nolistof}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listof}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listofnumbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{nolistof}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{notoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{totoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{numbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{notoc}%
- \renewcommand*{\float@@listhead}{%
-%<article> \section*
-%<report|book> \chapter*
- }%
- \doforeachtocfile[float]{%
- \unsettoc{\@currext}{numbered}%
- \unsettoc{\@currext}{totoc}%
- }%
- \AtAddToTocList[float]{%
- \unsettoc{\@currext}{numbered}%
- \unsettoc{\@currext}{totoc}%
- }%
- \or% totoc
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nolistof}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listof}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listofnumbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{listof}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{notoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{totoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{numbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{totoc}%
- \renewcommand*{\float@@listhead}{%
-%<article> \addsec
-%<report|book> \addchap
- }%
- \doforeachtocfile[float]{%
- \unsettoc{\@currext}{numbered}%
- \setuptoc{\@currext}{totoc}%
- }%
- \AtAddToTocList[float]{%
- \unsettoc{\@currext}{numbered}%
- \setuptoc{\@currext}{totoc}%
- }%
- \or% numbered
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nolistof}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listof}%
- \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listofnumbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{toc}{listofnumbered}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{notoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{totoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{numbered}%
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{numbered}%
- \renewcommand*{\float@@listhead}{%
-%<article> \section
-%<report|book> \chapter
- }%
- \doforeachtocfile[float]{%
- \setuptoc{\@currext}{numbered}%
- \setuptoc{\@currext}{totoc}%
- }%
- \AtAddToTocList[float]{%
- \setuptoc{\@currext}{numbered}%
- \setuptoc{\@currext}{totoc}%
- }%
- \or% flat
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{flat}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{graduated}%
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{flat}%
- \@dynlisttrue
- \or% graduated
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{flat}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{graduated}%
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{graduated}%
- \@dynlistfalse
- \or% leveldown
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{standardlevel}%
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{leveldown}%
- \doforeachtocfile[float]{%
- \setuptoc{\@currext}{leveldown}%
- }%
- \AtAddToTocList[float]{%
- \setuptoc{\@currext}{leveldown}%
- }%
- \or% standardlevel
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{leveldown}%
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{standardlevel}%
- \doforeachtocfile[float]{%
- \unsettoc{\@currext}{leveldown}%
- }%
- \AtAddToTocList[float]{%
- \unsettoc{\@currext}{leveldown}%
- }%
- \or% entryprefix
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{entryprefix}%
- \@dynlisttrue
- \doforeachtocfile[float]{%
- \BeforeStartingTOC[\@currext]{%
- \scr@ifundefinedorrelax{listof\@currext entryname}{}{%
- \expandafter\def\expandafter\numberline@prefix
- \expandafter{\csname listof\@currext entryname\endcsname
- \nobreakspace}%
- }%
- }%
- }%
- \AtAddToTocList[float]{%
- \BeforeStartingTOC[\@currext]{%
- \scr@ifundefinedorrelax{listof\@currext entryname}{}{%
- \expandafter\def\expandafter\numberline@prefix
- \expandafter{\csname listof\@currext entryname\endcsname
- \nobreakspace}%
- }%
- }%
- }%
- \or% indenttextentries
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{indenttextentries}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{leftaligntextentries}%
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{indenttextentries}%
- \doforeachtocfile[float]{%
- \setuptoc{\@currext}{numberline}%
- }%
- \AtAddToTocList[float]{%
- \setuptoc{\@currext}{numberline}%
- }
- \or% leftaligntextentries
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{indenttextentries}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{leftaligntextentries}%
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{leftaligntextentries}%
- \doforeachtocfile[float]{%
- \unsettoc{\@currext}{numberline}%
- }%
- \AtAddToTocList[float]{%
- \unsettoc{\@currext}{numberline}%
- }
-%<*book|report>
- \or% chapterentry
- \KOMAoptions{chapteratlists=entry}%
- \or% chaptergap
- \KOMAoptions{chapteratlists=\z@}%
- \or% chaptergapsmall
- \KOMAoptions{chapteratlists=10\p@}%
- \or% chaptergapline
- \KOMAoptions{chapteratlists=\baselineskip}%
-%</book|report>
- \fi
- \fi
-}
-\KOMA@kav@add{.\KOMAClassFileName}{toc}{nolistof}
-\KOMA@kav@add{.\KOMAClassFileName}{listof}{notoc}
-\KOMA@kav@add{.\KOMAClassFileName}{listof}{graduated}
-\KOMA@kav@add{.\KOMAClassFileName}{listof}{leftaligntextentries}
-%</option>
-% \end{macrocode}
-% \end{option}^^A listof
-%
-% \begin{option}{liststotoc}
-% \changes{v2.3h}{1995/01/21}{added}
-% \changes{v2.8b}{2001/06/26}{using \cs{float@headings}}
-% \changes{v2.4a}{1996/03/13}{\cs{listtabelname} relaces by \cs{listtablename}}
-% \changes{v2.8g}{2001/07/18}{\cs{float@headings} renamed to
-% \cs{float@listhead}}
-% \changes{v2.98c}{2008/03/05}{obsolet}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macrocode}
-%<*option>
-\KOMA@DeclareDeprecatedOption{liststotoc}{listof=totoc}
-%</option>
-% \end{macrocode}
-% \end{option}^^A liststotoc
-%
-% \begin{option}{liststotocnumbered}
-% \changes{v2.8q}{2002/04/08}{added}
-% \changes{v2.9p}{2003/07/07}{number also in the running head}
-% \changes{v2.98c}{2008/03/05}{obsolet}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macrocode}
-%<*option>
-\KOMA@DeclareDeprecatedOption{liststotocnumbered}{listof=numbered}
-%</option>
-% \end{macrocode}
-% \end{option}^^A liststotocnumbered
-%
-%
-% \begin{option}{listsleft,listsindent}
-% \changes{v2.8q}{2001/11/14}{added}
-% \changes{v2.98c}{2008/03/05}{obsolet}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macrocode}
-%<*option>
-\KOMA@DeclareDeprecatedOption{listsleft}{listof=flat}
-\KOMA@DeclareDeprecatedOption{listsindent}{listof=graduated}
-%</option>
-% \end{macrocode}
-% \end{option}^^A listsleft,listsindent
-%
-% \begin{option}{chapteratlists}
-% \changes{v2.96a}{2006/12/03}{added}
-% \changes{v2.98c}{2008/03/05}{not with \cls*{scrartcl}}
-% \changes{v3.12a}{2014/01/17}{missing \cs{FamilyKeyStateProcessed} added}
-% \changes{v3.17}{2015/03/12}{internal value storage}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{macro}{\@chaptertolistsfalse,\@chaptertoliststrue,\if@chaptertolists}
-% \changes{v2.96a}{2006/12/03}{added}
-% \changes{v3.12}{2013/09/24}{don't add lists to lists}
-% \begin{macro}{\@chapterlistsgap}
-% \changes{v2.96a}{2006/12/03}{added}
-% We can do several special treatments inside the lists of floats, when a new
-% chapter starts.
-% \begin{macrocode}
-%<*option&(book|report)>
-\newcommand*{\@chapterlistsgap}{10\p@}
-\newif\if@chaptertolists\@chaptertolistsfalse
-\KOMA@key{chapteratlists}[entry]{%
- \FamilyKeyStateProcessed
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{chapterentry}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{chaptergap}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{chaptergapsmall}%
- \KOMA@kav@remove{.\KOMAClassFileName}{listof}{chaptergapline}%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=entry}:] add the chapter heading also to the lists of
-% float. \cs{@chaptertolisttrue} is used and the distance \cs{@chapterlistgap}
-% is set to \len{z@}.
-% \end{description}
-% \begin{macrocode}
- \Ifstr{#1}{entry}{%
- \@chaptertoliststrue\renewcommand*{\@chapterlistsgap}{\z@}%
- \KOMA@kav@replacevalue{.\KOMAClassFileName}{chapteratlists}{entry}%
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{chapterentry}%
- }{%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=\meta{distance}}:] use a vertical \meta{distance}.
-% \end{description}
-% \begin{macrocode}
- \@chaptertolistsfalse\renewcommand*{\@chapterlistsgap}{#1}%
- \KOMA@kav@replacevalue{.\KOMAClassFileName}{chapteratlists}%
- {\@chapterlistsgap}%
- \def\reserved@a{\z@}%
- \ifx\@chapterlistsgap\reserved@a
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{chaptergap}%
- \else
- \def\reserved@a{10\p@}%
- \ifx\@chapterlistsgap\reserved@a
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{chaptergapsmall}%
- \else
- \def\reserved@a{\baselineskip}%
- \ifx\@chapterlistsgap\reserved@a
- \KOMA@kav@add{.\KOMAClassFileName}{listof}{chaptergapline}%
- \fi
- \fi
- \fi
- }%
-}
-\BeforeTOCHead{\@chaptertolistsfalse}
-\KOMA@kav@add{.\KOMAClassFileName}{chapteratlists}{10\p@}%
-\KOMA@kav@add{.\KOMAClassFileName}{listof}{chaptergapsmall}%
-%</option&(book|report)>
-% \end{macrocode}
-% \end{macro}^^A \@chapterlistgap
-% \end{macro}^^A \if@chaptertolists
-% \end{option}^^A chapteratlists
-%
-%
-% \begin{macro}{\float@listhead}
-% \changes{v2.8b}{2001/06/26}{added}
-% \changes{v2.8g}{2001/07/18}{\cs{float@headings} renamed to
-% \cs{float@listhead}}
-% \changes{v2.98c}{2008/03/05}{using \cs{float@@listhead}}
-% \changes{v3.00}{2008/07/04}{deprecated}
-% \changes{v3.10}{2011/08/31}{using\cs{MakeMarkcase}}
-% In 2001 I've designed an interface to allow other package authors to set the
-% headings of lists of floats the same way \KOMAScript{} classes do. Anselm
-% Lingnau accepted this interface (but did not like may macro names, so these
-% were changed in \KOMAScript{} 2.8g). But for \KOMAScript{} 3 I've needed a
-% more powerful interface. So this became deprecated. Unfortunately Anselm is
-% not willing to use the new \pkg*{tocbasic} for \pkg{float}. See
-% \pkg*{scrhack} for a solution and how \pkg{float} could benefit from using
-% \pkg*{tocbasic}.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\float@listhead}[1]{%
- \scr@float@listhead@warning
- \float@@listhead{#1}%
- \@mkboth{\MakeMarkcase{#1}}{\MakeMarkcase{#1}}%
-% \end{macrocode}
-% \changes{v2.8q}{2001/11/14}{support for dynamic number width}
-% This is the best occasion to also add the code for the dynamic number width.
-% \begin{macrocode}
- \if@dynlist%
- \newcommand*{\scr@starttoc}{}%
- \let\scr@starttoc=\@starttoc
- \renewcommand*{\@starttoc}[1]{%
- \before@starttoc{##1}\scr@starttoc{##1}\after@starttoc{##1}%
- }%
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\scr@float@listhead@warning,\scr@float@addtolists@warning}
-% \changes{v3.01}{2008/11/13}{added}
-% \changes{v3.12}{2013/09/25}{text changed}
-% \changes{v3.12a}{2014/03/05}{text corrected}
-% \changes{v3.30}{2020/02/25}{spurious space at end of warning message
-% removed}
-% Here the warning messages, that are used for using the deprecated interface.
-% \begin{macrocode}
-\newcommand*{\scr@float@listhead@warning}{%
- \ClassWarning{\KOMAClassName}{%
- \string\float@listhead\space detected!\MessageBreak
- Implementation of \string\float@listhead\space became\MessageBreak
- deprecated in KOMA-Script v3.01 2008/11/14 and\MessageBreak
- has been replaced by several more flexible\MessageBreak
- features of package `tocbasic`.\MessageBreak
- Maybe implementation of \string\float@listhead\space will\MessageBreak
- be removed from KOMA-Script soon.\MessageBreak
- Loading of package `scrhack' may help to\MessageBreak
- avoid this warning, if you are using a\MessageBreak
- a package that still implements the\MessageBreak
- deprecated \string\float@listhead\space interface%
- }%
-}
-\newcommand*{\scr@float@addtolists@warning}{%
- \ClassWarningNoLine{\KOMAClassName}{%
- \string\float@addtolists\space detected!\MessageBreak
- Implementation of \string\float@addtolist\space became\MessageBreak
- deprecated in KOMA-Script v3.01 2008/11/14 and\MessageBreak
- has been replaced by several more flexible\MessageBreak
- features of package `tocbasic`.\MessageBreak
- Since Version 3.12 support for deprecated\MessageBreak
- \string\float@addtolist\space interface has been\MessageBreak
- restricted to only some of the KOMA-Script\MessageBreak
- features and been removed from others.\MessageBreak
- Loading of package `scrhack' may help to\MessageBreak
- avoid this warning, if you are using a\MessageBreak
- a package that still implements the\MessageBreak
- deprecated \string\float@addtolist\space interface%
- }%
- \global\let\scr@float@addtolists@warning\relax
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \scr@float@listhead@warning,scr@float@addtolists@warning
-% \end{macro}^^A \float@listhead
-%
-% \begin{command}{\listfigurename,\listtablename}
-% \begin{command}{\listoflofname,\listoflotname,
-% \listoflofentryname,\listoflotentryname}
-% \changes{v3.00}{2008/07/03}{neu für Paket \pkg*{tocbasic}}
-% \changes{v3.25}{2017/10/10}{\cs{renewcommand} statt \cs{newcommand}}%^^A
-% The names used by \pkg*{tocbasic}.
-% \begin{macrocode}
-%<*body>
-\renewcommand*\listfigurename{List of Figures}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\listfigurename{List of Figures}
-\renewcommand*\listoflofname{\listfigurename}
-\renewcommand*\listoflofentryname{\figurename}
-\renewcommand*\listtablename{List of Tables}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\listtablename{List of Tables}
-\renewcommand*\listoflotname{\listtablename}
-\renewcommand*\listoflotentryname{\tablename}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \listoflofname … \listoflotentryname
-% \end{command}^^A \listfigurename,\listtablename
-%
-% \begin{command}{\listoffigures}
-% \changes{v2.3h}{1995/01/21}{using \cs{lof@heading}}
-% \changes{v2.4k}{1996/12/13}{\cs{lof@heading} for all classes}
-% \changes{v2.8l}{2001/08/16}{group added an \len{parskip} set to 0}
-% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}}
-% \changes{v2.95}{2004/11/05}{\cs{@parskipfalse} and \cs{@parskip@indent}
-% replaced}
-% \changes{v3.00}{2008/07/04}{using \pkg*{tocbasic}}
-% \changes{v3.23}{2017/03/24}{using \cs{ext@figure} instead of \file{lof}}
-% \changes{v3.25}{2017/10/10}{implicit definition by \cs{DeclareNewTOC}}
-% The list of figures.
-% \end{command}^^A \listoffigures
-%
-% \begin{macro}{\l@figure}
-% \changes{v3.25}{2017/10/10}{implicit definition by \cs{DeclareNewTOC}}
-% Entry command for the list of figures.
-% \end{macro}^^A \l@figure
-%
-% \begin{command}{\listoftables}
-% \changes{v2.3h}{1995/01/21}{using \cs{lot@heading}}
-% \changes{v2.4k}{1996/12/13}{\cs{lot@heading} for all classes}
-% \changes{v2.8l}{2001/08/16}{group added an \len{parskip} set to 0}
-% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}}
-% \changes{v2.95}{2004/11/05}{\cs{@parskipfalse} and \cs{@parskip@indent}
-% replaced}
-% \changes{v3.00}{2008/07/04}{using \pkg*{tocbasic}}
-% \changes{v3.23}{2017/03/24}{using \cs{ext@table} instead of \file{lot}}
-% \changes{v3.25}{2017/10/10}{implicit definition by \cs{DeclareNewTOC}}
-% The list of figures.
-% \end{command}^^A \listoftables
-%
-% \begin{macro}{\l@table}
-% \changes{v3.25}{2017/10/10}{implicit definition by \cs{DeclareNewTOC}}
-% Entry command for the list of tables.
-% \end{macro}^^A \l@table
-%
-% \begin{macrocode}
-%</!letter>
-% \end{macrocode}
-%
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-miscellaneous.dtx b/macros/latex/contrib/koma-script/source/scrkernel-miscellaneous.dtx
deleted file mode 100644
index aeac05df99..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-miscellaneous.dtx
+++ /dev/null
@@ -1,1111 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-miscellaneous.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-miscellaneous.dtx 3743 2022-03-04 16:27:15Z kohm $
-%<init>%%% (run: init)
-%<option>%%% (run: option)
-%<execoption>%%% (run: execoption)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-04 17:27:15 +0100 (Fr, 04. Mär 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3743 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-miscellaneous.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (miscellaneous, maybe everything or nothing)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-miscellaneous.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2002/07/01}{first version after splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/03/01}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/03/01}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-miscellaneous.dtx}
-% \title{All the Code of
-% \href{https://komascript.de}{\KOMAScript} not Fitting into another File}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% Currently \file{scrkernel-miscellaneous.dtx} is a mess of miscellaneous
-% code. There is a big, fat \textbf{ToDo} to change this!
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-%
-% \section{Implementation of Special Requirements of Package \pkg*{scrletter}}
-%
-% The \pkg*{scrletter} depends on some features of the \KOMAScript{}
-% classes. However, a special user request was to make it work with the
-% standard classes too. So we need additional code to detect not using a
-% \KOMAScript{} class and to make this work.
-% \begin{description}
-% \item[ToDo:] Can we move this code into a letter file or use a new file only
-% used for package \pkg*{scrletter}?
-% \end{description}
-% \begin{macrocode}
-%<*package&letter&init>
-\scr@ifundefinedorrelax{KOMAClassName}{%
- \PackageWarningNoLine{scrletter}{%
- Cannot detect any KOMA-Script class.\MessageBreak
- Package `scrletter' is an extension to\MessageBreak
- KOMA-Script classes.\MessageBreak
- Usage with another class is not recommended%
- \@ifclassloaded{article}{}{%
- \@ifclassloaded{report}{}{%
- \@ifclassloaded{book}{}{%
- \MessageBreak and can result in several errors%
- }%
- }%
- }%
- }%
- \RequirePackage{scrextend}%
-% \end{macrocode}
-%
-% \begin{command}{\setparsizes}
-% \changes{v3.23}{2017/02/22}{simple fallback definition}
-% \begin{macro}{\par@updaterelative}
-% \changes{v3.23}{2017/02/22}{empty fallback definition}
-% If \pkg*{scrletter} is not used with a \KOMAScript{} class \cs{setparsizes}
-% would not be available. But it is used in \cs{vb@t@z}, \cs{@addrfield},
-% \cs{@datefield}, \cs{@makelettertitle}, \cs{@subjfield}, \cs{opening},
-% \cs{closing}. Instead of changing the implementation of all these commands
-% and macros, we define a very simple version of \cs{setparsizes}. And in case
-% of using this simple version \cs{par@updaterelative} would become a
-% do-nothing macro. This does work in case of the commands and macros listed
-% above. But maybe it does not work in other cases.
-% \begin{description}
-% \item[ToDo:] Can we move this code into \file{scrkernel-paragraphs.dtx} or
-% use a new file only for package \pkg*{scrletter}?
-% \end{description}
-% \begin{macrocode}
- \providecommand*{\setparsizes}[3]{%
- \setlength{\parindent}{#1}%
- \setlength{\parskip}{#2}%
- \setlength{\parfillskip}{#3}%
- }
- \providecommand*{\par@updaterelative}{}
-% \end{macrocode}
-% \end{macro}^^A \par@updaterelative
-% \end{command}^^A \setparsizes
-% \begin{macrocode}
-}{}
-%</package&letter&init>
-% \end{macrocode}
-%
-% \begin{macro}{\scr@renewforletter,\@renewforletter,\do@renewforletter@list,
-% \do@renewforletter}
-% \changes{v3.20}{2014/04/10}{added}
-% \changes{v3.25}{2017/11/15}{removed}
-% \end{macro}
-%
-%
-% \section{Implementation of the Draft Mode}
-%
-% The \KOMAScript{} classes provide two draft options, the general one and a
-% more specific.
-% \begin{description}
-% \item[ToDo:] Should we move this to \file{scrkernel-paragraphs.dtx}?
-% \end{description}
-%
-% \begin{option}{draft}
-% \changes{v2.95}{2002/12/05}{re-implemented using \pkg{keyval}}
-% \changes{v3.17}{2015/03/12}{using internal value storage}
-% \changes{v3.25}{2017/11/21}{respect option \opt{overfullrule}}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \begin{option}{final}
-% \changes{v2.95}{2002/12/05}{obsolete}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by
-% \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/21}{standard instead of obsolete}
-% \changes{v3.02c}{2008/02/17}{explicit optional argument for \pkg*{scrextend}}
-% In draft mode classes usually show a rule for overfull boxes. Despite this
-% is usually already handled by the class, package \pkg*{scrextend} also
-% provides the option, because of correct setting of the internal value
-% storage also of option \opt{overfullrule}.
-% \begin{macrocode}
-%<*(class|extend)&option>
-\KOMA@key{draft}[true]{%
- \KOMA@set@ifkey{draft}{@tempswa}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \if@tempswa
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{draft}{@tempswa}%
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{overfullrule}{@tempswa}%
- \setlength{\overfullrule}{5pt}%
- \else
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{draft}{@tempswa}%
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{overfullrule}{@tempswa}%
- \setlength{\overfullrule}{\z@}%
- \fi
- \fi
-}
-%<class>\KOMA@kav@add{.\KOMAClassFileName}{draft}{false}
-%<*package&extend>
-\KOMA@kav@xadd{.scrextend.\scr@pkgextension}{draft}{%
- \ifdim\overfullrule>\z@ true\else false\fi
-}
-%</package&extend>
-\KOMA@DeclareStandardOption
-%<package&extend>[scrextend]
-{final}{draft=false}
-% \end{macrocode}
-% \begin{option}{overfullrule}
-% \changes{v3.25}{2017/11/21}{added}
-% Because option \opt{draft} can result in unwanted effects I've added a
-% new option to explicite only change the overfull rule setting. However for
-% \textsf{scrextend} and the \KOMAScript{} classes the result is the same.
-% \begin{macrocode}
-\KOMA@key{overfullrule}[true]{%
- \KOMA@set@ifkey{overfullrule}{@tempswa}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \if@tempswa
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{draft}{@tempswa}%
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{overfullrule}{@tempswa}%
- \setlength{\overfullrule}{5pt}%
- \else
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{draft}{@tempswa}%
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{overfullrule}{@tempswa}%
- \setlength{\overfullrule}{\z@}%
- \fi
- \fi
-}
-%<class>\KOMA@kav@add{.\KOMAClassFileName}{overfullrule}{false}
-%<*package&extend>
-\KOMA@kav@xadd{.scrextend.\scr@pkgextension}{overfullrule}{%
- \ifdim\overfullrule>\z@ true\else false\fi
-}
-%</package&extend>
-%</(class|extend)&option>
-% \end{macrocode}
-% \end{option}^^A overfullrule
-% \end{option}^^A final
-% \end{option}^^A draft
-%
-%
-% \section{Implementations for the Math Mode}
-%
-% \KOMAScript{} does not make something special for the math mode.
-% \begin{description}
-% \item[ToDo:] Should we move this to the special treatment of \pkg{amsmath}
-% in \file{scrkernel-basics.dtx} or move it with the special treatment of
-% \pkg{amsmath} in \file{scrkernel-basics.dtx} to a new file
-% \file{scrkernel-math.dtx}?
-% \end{description}
-%
-% \begin{option}{leqno,fleqno}
-% The \KOMAScript{} classes but \cls*{scrlttr2} do support the standard
-% class options \opt{leqno} and \opt{fleqn}.
-% \begin{macrocode}
-%<*class&!letter&option>
-\DeclareOption{leqno}{\input{leqno.clo}}
-\DeclareOption{fleqn}{\input{fleqn.clo}}
-%</class&!letter&option>
-% \end{macrocode}
-% \end{option}
-%
-% \begin{command}{\theequation}
-% \changes{v2.97e}{2007/11/23}{chapter numbers only in main matter}
-% \changes{v3.27}{2022/03/01}{\cs{relax} replaced by percent because of
-% \pkg*{hyperref}}
-% The \KOMAScript{} classes \cls*{scrbook} and \cls*{scrreprt} have a special
-% treatment for equation numbers. For \cls*{scrreprt} the number just depends
-% on the chapter number. But for \cls*{scrbook} it also depends on the active
-% matter.
-% \begin{description}
-% \item[ToDo:] With \cs{counterwidth} the \cls*{scrreprt} code could be very
-% simple. But currently we still support old \LaTeX{} kernels without
-% \cs{counterwithin}.
-% \item[ToDo:] Should we also add a definition for \cls*{scrartcl} as done for
-% \cls*{article}, though the same definition is already the default of the
-% \LaTeX{} kernel?
-% \end{description}
-% \begin{macrocode}
-%<*(book|report)&body>
-\renewcommand*{\theequation}{%
-%<*book>
- \expandafter\ifnum\scr@v@is@gt{2.97d}%
- \if@mainmatter\thechapter.\fi
- \else
-%</book>
- \thechapter.%
-%<book> \fi
- \@arabic\c@equation
-}
-%</(book|report)&body>
-% \end{macrocode}
-% \end{command}
-%
-% \section{Implementation of Special Handling of Sans-Serif Defaults}
-%
-% TeX.SX user \texttt{egreg} has stated in comment
-% \url{https://tex.stackexchange.com/questions/289853}, that he does not use
-% \KOMAScript{} because of the sans-serif defaults for headings. He like the
-% ugly, bold fat Antiqua more. Moreover, he is not satisfied in being able to
-% change the default using \cs{setkomafont}. So the \KOMAScript{} author has
-% defined an option to do the change of all sans-serif defaults at once. As a
-% joke the name of this options not only references \texttt{egreg} but is
-% cumbersome long.
-% \begin{description}
-% \item[ToDo:] Should we move this option to \file{scrkernel-fonts.dtx}?
-% \item[ToDo:] Should we add a more handy and serious option like
-% \opt{nosfdefaults}?
-% \end{description}
-%
-% \begin{option}{egegdoesnotlikesansseriftitles}
-% \changes{v3.20}{2016/01/29}{added}
-% \changes{v3.20a}{2016/05/19}{also for \cls*{scrlttr2}}
-% \begin{macro}{\@gr@gsffamily}
-% \changes{v3.20}{2016/01/29}{added}
-% \changes{v3.20a}{2016/05/19}{also for \cls*{scrlttr2}}
-% Used to switch on or off all the sans-serif defaults.
-% \begin{macrocode}
-%<*!(package&letter)&option>
-\KOMA@ifkey{egregdoesnotlikesansseriftitles}{@egregdoesnotlikesansseriftitles}
-\newcommand*{\@gr@gsffamily}{%
- \if@egregdoesnotlikesansseriftitles\else\sffamily\fi
-}
-%</!(package&letter)&option>
-% \end{macrocode}
-% \end{macro}^^A \@gr@gsffamily
-% \end{option}^^A egregdoesnotlikesansseriftitles
-%
-%
-% \section{Implementation of the Execution and Processing of Options}
-%
-% After the definition of all options, some defaults have to be executed and
-% all options have to be processed.
-% \begin{description}
-% \item[ToDo:] Can we move the execution of default to the files, where the
-% corresponding options are defined?
-% \item[ToDo:] Can we move the processing of options to
-% \file{scrkernel-basics.dtx} where the command itself is defined?
-% \end{description}
-%
-% \changes{v2.97c}{2007/04/19}{using \cs{KOMAExecuteOptions} instead of
-% \cs{KOMAoptions} and \cs{KOMAProcessOptions} instead of
-% \cs{ProcessOptions}}
-% \changes{v2.97c}{2007/04/19}{options that are implicit defaults are not set
-% explicitly}
-% \changes{v2.97c}{2007/07/18}{removed \opt{twoside} from the default}
-% \changes{v2.98c}{2008/03/10}{\opt{headings\quotechar=big} added to the
-% default}
-% \changes{v3.11c}{2013/03/04}{\opt{headings\quotechar=big} not with
-% \cls*{scrlttr2}}
-% \begin{macrocode}
-%<*execoption>
-%<*class>
-\KOMAExecuteOptions{%
- parskip=false,%
-%<!letter> headings=big%
-}
-%</class>
-\KOMAProcessOptions\relax
-%</execoption>
-% \end{macrocode}
-%
-%
-% \section{Implementation of Temporary Switch to Single Column Mode}
-%
-% Sometimes we need to temporary switch to single column mode, e.g., to print
-% a table of contents or similar. This is not needed for \cls*{scrlttr2} or
-% \pkg*{scrletter}.
-% \begin{description}
-% \item[ToDo:] Should we move this to \file{scrkernel-paragraphs.dtx} or
-% another file? Currently it is used in \file{scrkernel-index.dtx},
-% \file{scrkernel-notepaper.dtx}, and \file{scrkernel-title.dtx} (and also
-% in \file{scrhack.dtx}, which also defines it of needed).
-% \end{description}
-%
-% \begin{macro}{\@restonecolfalse,\@restonecoltrue,\if@restonecol}
-% We need a local switch to be able to restore two column mode after locally
-% switching to one column mode (or visa versa). For \pkg*{scrextend} this is a
-% little bit complicated, because the switch could already exist in the used
-% class.
-% \begin{macrocode}
-%<*!letter&body>
-%<*!extend>
-\newif\if@restonecol
-%</!extend>
-%<*extend>
-\scr@ifundefinedorrelax{if@restonecol}{%
- \expandafter\newif\csname if@restonecol\endcsname
- \@restonecolfalse
-}{}
-%</extend>
-%</!letter&body>
-% \end{macrocode}
-% \end{macro}
-%
-% \section{Implementation of the Dictum}
-%
-% Printing a \emph{dictum} is also not supported by letters.
-% \begin{description}
-% \item[ToDo:] Should we move this to \file{scrkernel-sections.dtx} or to a
-% new file?
-% \end{description}
-%
-% \begin{command}{\dictum}
-% \changes{v2.8q}{2001/20/04}{added}
-% \changes{v2.9l}{2003/01/28}{\cs{edef} replaced by \cs{def} ersetzt}
-% \changes{v2.9q}{2004/04/19}{group added}
-% \begin{command}{\dictumwidth,
-% \raggeddictum,\raggeddictumtext,\raggeddictumauthor}
-% \changes{v2.8q}{2001/20/04}{added}
-% \begin{fontelement}{dictum}
-% \changes{v2.8q}{2001/20/04}{added}
-% \changes{v3.20}{2016/01/29}{\cs{sffamily} replaced by \cs{@gr@gsffamily}}
-% \begin{fontelement}{dictumtext,dictumauthor}
-% \changes{v2.8q}{2001/20/04}{added}
-% \begin{command}{\dictumauthorformat}
-% \changes{v2.8q}{2001/20/04}{added}
-% \begin{command}{\dictumrule}
-% \changes{v3.10}{2011/09/02}{added}
-% The \emph{dictum} consist of a text, the dictum, and an optional
-% author. Text and author are separated by a horizontal rule.
-% \begin{macrocode}
-%<*!letter&body>
-\newcommand{\dictum}[2][]{\par%
- \begingroup
- \raggeddictum\parbox{\dictumwidth}{%
- {\@dictumfont{\raggeddictumtext #2\strut\par}%
- \def\@tempa{#1}\ifx\@tempa\@empty\else%
- {\raggeddictumtext\dictumrule}%
- \raggeddictumauthor\@dictumauthorfont\dictumauthorformat{#1}%
- \strut\par%
- \fi%
- }%
- }\par%
- \endgroup
-}
-\newcommand*{\dictumrule}{\vskip-1ex\hrulefill\par}%
-\newcommand*{\dictumwidth}{.3333\textwidth}
-\newcommand*{\raggeddictum}{\raggedleft}
-\newcommand*{\dictumauthorformat}[1]{(#1)}
-\newcommand*{\raggeddictumtext}{\raggedright}
-\newcommand*{\raggeddictumauthor}{\raggedleft}
-\newkomafont{dictum}{\normalfont\normalcolor\@gr@gsffamily\small}
-\newkomafont{dictumauthor}{\itshape}
-\aliaskomafont{dictumtext}{dictum}
-%</!letter&body>
-% \end{macrocode}
-% \end{command}^^A \dictumrule
-% \end{command}^^A \dictumauthorformat
-% \end{fontelement}^^A dictumtext,dictumauthor
-% \end{fontelement}^^A dictum
-% \end{command}^^A \dictumwidth,\raggeddictum…\raggeddictumauthor
-% \end{command}^^A \dictum
-%
-%
-% \section{Setting Default Lengths of \env{minipage} and Frames}
-%
-% \begin{description}
-% \item[ToDo:] Should we move the default for \len{@mpfootins} to
-% \file{scrkernel-footnotes.dtx}?
-% \item[ToDo:] Do we really need to set initial values to \len{fboxsep} and
-% \len{fboxrule}? The same defaults using |pt| instead of \cs{p@} are already
-% used in the \LaTeX{} kernel. Wouldn't that be enough?
-% \end{description}
-%
-% \begin{length}{@mpfootins}
-% \begin{length}{fboxsep,fboxrule}
-% We are using the same settings like the standard classes.
-% \begin{macrocode}
-%<*class&body>
-\setlength{\skip\@mpfootins}{\skip\footins}
-\setlength\fboxsep{3\p@}
-\setlength\fboxrule{.4\p@}
-%</class&body>
-% \end{macrocode}
-% \end{length}
-% \end{length}
-%
-%
-% \section{Implementation of Detection of Odd and Even Pages}
-%
-% \begin{description}
-% \item[ToDo:] Should this code moved to \file{scrkernel-basics.dtx} or to a
-% new one?
-% \end{description}
-%
-% \begin{command}{\ifthispageodd,\Ifthispageodd}
-% \changes{v2.8q}{2001/11/22}{added}
-% \changes{v3.28}{2019/11/19}{\cs{ifthispageodd} renamed to \cs{Ifthispageodd}}
-% Users often use |\ifodd\value{page}| to test, whether the current page is
-% odd or even. But this is dramatically wrong, because of the asynchronous
-% output of \TeX. So here we define a command
-% \begin{quote}
-% \Ifthispageodd\marg{then code}\marg{else code}
-% \end{quote}
-% that internally uses a label-like mechanism to do the decision. We do not
-% really use \cs{label} and \cs{pageref}, because this would not work with
-% Roman or alphabetic page numbers. So we use a direct write to the \file{aux}
-% file instead.
-%
-% \begin{macro}{\new@tpo@label}
-% \changes{v2.8q}{2001/11/22}{added}
-% \changes{v2.95b}{2006/07/28}{using \cs{@newl@bel}}
-% \changes{v3.20}{2016/03/25}{use after definition in the \file{aux}-file}
-% Definition of a new \textbf{t}rue-\textbf{p}age-\textbf{o}dd label. To be
-% used in the \file{aux} file. A fallback definition is also added to the
-% \file{aux} file, so there wouldn't be an error, e.g., after removing package
-% \pkg*{scrextend} from a document.
-% \begin{macrocode}
-%<*(class|extend)&body>
-\newcommand*{\new@tpo@label}{\@newl@bel{tpo}}
-\AtBeginDocument{%
- \if@filesw
- \immediate\write\@auxout{%
- \string\providecommand*\string\new@tpo@label[2]{}%
- }%
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \new@tpo@label
-%
-% \begin{macro}{\scr@tpo}
-% \changes{v2.8q}{2001/11/22}{added}
-% We need a kind of counter with the actual usage number of
-% \cs{Ifthispageodd}.
-% \begin{macrocode}
-\newcommand*{\scr@tpo}{0}
-% \end{macrocode}
-% \end{macro}^^A \scr@tpo
-%
-% \begin{macro}{\is@thispageodd}
-% \changes{v2.8q}{2001/11/22}{added}
-% \changes{v2.9l}{2003/01/28}{renamed \cs{if@thispageodd}}
-% \changes{v2.95b}{2006/07/28}{using \cs{@newl@bel}}
-% \changes{v3.17}{2015/03/23}{split into two macros}
-% \begin{macro}{\is@thispageodd@setlabel}
-% \changes{v3.17}{2015/03/23}{added}
-% \changes{v3.20}{2016/03/25}{write to \file{aux} file only \cs{if@filesw}}
-% \changes{v3.23}{2017/02/23}{empty macro after usage}
-% The main workers of \cs{Ifthispageodd}. It is used to set
-% \cs{ifthispagewasodd} depending on the information it adds to the \file{aux}
-% file.
-% \begin{description}
-% \item[ToDo:] Why do we use an optional argument here? Are there any
-% circumstances, when the optional argument is not the default
-% \cs{is@thispageodd@setlabel}?
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\is@thispageodd}[1][\is@thispageodd@setlabel]{%
- \@bsphack
- \begingroup
- \@tempcnta=\scr@tpo
- \advance\@tempcnta by\@ne
- \xdef\scr@tpo{\the\@tempcnta}%
- \expandafter\ifx\csname tpo@\scr@tpo\endcsname\relax
- \protect\G@refundefinedtrue
-%<!extend> \ClassWarning{\KOMAClassName}{%
-%<extend> \PackageWarning{scrextend}{%
- odd/even page label number \scr@tpo\space undefined}%
- \edef\@tempa{\the\value{page}}%
- \else
- \edef\@tempa{\csname tpo@\scr@tpo\endcsname}%
- \fi
- \ifodd\number\@tempa
- \aftergroup\thispagewasoddtrue
- \else
- \aftergroup\thispagewasoddfalse
- \fi
- \endgroup
- \edef\is@thispageodd@setlabel{%
- \if@filesw
- \unexpanded{\protected@write\@auxout{\let\arabic\relax}}{%
- \noexpand\string
- \noexpand\new@tpo@label{\scr@tpo}{\noexpand\arabic{page}}}%
- \fi
- \noexpand\def\noexpand\is@thispageodd@setlabel
- {\unexpanded\expandafter{\is@thispageodd@setlabel}}%
- }%
- #1%
- \@esphack
-}
-\newcommand*{\is@thispageodd@setlabel}{}
-% \end{macrocode}
-% \end{macro}^^A \is@thispageodd@setlabel
-% \end{macro}^^A \is@thispageodd
-%
-% \begin{command}{\thispagewasoddfalse,\thispagewasoddtrue,\ifthispagewasodd}
-% \changes{v2.9l}{2003/01/20}{added}
-% Rolf Niepraschks asked for the possibility to check for the last decision,
-% e.g., inside the \meta{then code} or \meta{else code}. So the definition of
-% \cs{Ifthispageodd} has been changed not only to set such a switch, but also
-% use it.
-% \begin{macrocode}
-\newif\ifthispagewasodd
-% \end{macrocode}
-% \end{command}
-%
-% With all these macros the user command is very easy.
-% \changes{v3.31}{2020/04/27}{fixed class and package name in the warning}
-% \changes{v3.32}{2020/08/06}{\cs{KOMAClassName} fixed}
-% \begin{macrocode}
-\providecommand*{\ifthispageodd}{%
-%<class> \ClassWarning{\KOMAClassName}{%
-%<extend> \PackageWarning{scrextend}{%
- Usage of deprecated command
- `\string\ifthispageodd'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifthispageodd' by `\string\Ifthispageodd'%
- }%
- \Ifthispageodd
-}
-\newcommand{\Ifthispageodd}{%
- \is@thispageodd
- \ifthispagewasodd
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
-}
-%</(class|extend)&body>
-% \end{macrocode}
-% \end{command}^^A \ifthispageodd,\Ifthispageodd
-%
-%
-% \section{Implementation of Notes to the Margin}
-%
-% \begin{description}
-% \item[ToDo:] This has been moved newly to
-% \file{scrkernel-miscellaneous.dtx}, but maybe we can find another suitable
-% file?
-% \end{description}
-%
-% \begin{command}{\marginline}
-% \changes{v2.4l}{1997/02/06}{using the optional argument of \cs{marginpar}}
-% \changes{v2.8q}{2001/11/27}{missing brace added}
-% \changes{v3.36}{2022/02/22}{moved from \file{scrkernel-floats.dtx} to
-% \file{scrkernel-miscellaneaous.dtx}}
-% A very often wanted margin note feature is, to print all such notes in the
-% left margin ragged-left and all such notes in the right margin
-% ragged-right. So this is a simple shortcut for \cs{marginpar} with using
-% almost the same argument twice.
-% \begin{macrocode}
-%<*(class|extend)&body>
-\newcommand\marginline[1]{%
- \marginpar[\raggedleft{#1}]{\raggedright #1}%
-}
-%</(class|extend)&body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \section{Implementation of Subscripts}
-%
-% \begin{command}{\textsubscript}
-% \changes{v2.8h}{2001/07/19}{added}
-% \changes{v3.25}{2017/11/15}{define only if un-defined because of \LaTeX{}
-% kernel change}
-% \begin{macro}{\@textsubscript}
-% \changes{v2.8h}{2001/07/19}{added}
-% \changes{v3.10}{2011/09/05}{\cs{providecommand} instead of \cs{newcommand}
-% because of \pkg{fixltx2e}}
-% The \LaTeX{} kernel has \cs{textsuperscript}. But for several years
-% \cs{textsubscript} was missing. For such old \LaTeX{} kernels, we define it
-% similar to \cs{textsuperscript}.
-% \begin{macrocode}
-%<*(class|extend)&body>
-\scr@ifundefinedorrelax{textsubscript}{%
- \DeclareRobustCommand*\textsubscript[1]{%
- \@textsubscript{\selectfont#1}%
- }%
-}{%
- \scr@ifundefinedorrelax{textsubscript }{%
- \DeclareRobustCommand*\textsubscript[1]{%
- \@textsubscript{\selectfont#1}%
- }%
- }{}%
-}
-\providecommand*{\@textsubscript}[1]{%
- {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}%
-}
-%</(class|extend)&body>
-% \end{macrocode}
-% \end{macro}
-% \end{command}^^A \textsubscript
-%
-%
-% \section{Implementation of an Invisible Strut}
-% \label{sec:strut}
-%
-% \begin{description}
-% \item[ToDo:] Maybe \file{scrkernel-basics.dtx} would be a good place for
-% this and maybe is should become a user command and be used at several
-% places, currently \cs{strut} is used.
-% \end{description}
-%
-% \begin{macro}{\scr@endstrut}
-% \changes{v3.25}{2017/11/15}{added}
-% If we simply add \cs{strut} to the end of material which is assumed to be
-% horizontal, white spaces at the end of such material could become relevant,
-% even if the would not without the \cs{strut}. We can avoid this by adding
-% \cs{unskip} before the \cs{strut}. But in this case, the last work before
-% the \cs{strut} will not be hyphenated any more. If we are really in
-% horizontal mode, we can use \cs{nobreak} before the \cs{strut} you once
-% again allow hyphenation.
-% \begin{description}
-% \item[ToDo:] Should the \cs{unskip} also be moved behind \cs{ifhmode}?
-% \end{description}
-% \begin{macrocode}
-%<*(class|letter|extend)&body>
-\providecommand*{\scr@endstrut}{\unskip\ifhmode\nobreak\strut\fi}
-%</(class|letter|extend)&body>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \section{Warnings for Using Incompatible Packages}
-% \label{sec:packagewarning}
-%
-% \begin{description}
-% \item[ToDo:] This should be moved to a new file.
-% \end{description}
-%
-% \changes{v3.12}{2013/07/08}{warnings about several incompatible packages
-% added}
-%
-% \begin{macro}{\scr@package@not@recommended}
-% \changes{v3.12}{2013/07/08}{added}
-% \begin{macro}{\class@shoulddisablepackagewarning@list}
-% \changes{v3.24}{2017/06/25}{added}
-% Loading of several incompatible packages should result in warnings using:
-% \begin{quote}
-% \cs{scr@package@not@recommended}\marg{package}\marg{alternatives}
-% \end{quote}
-% Usually the warning contains information about \meta{alternatives}, but this
-% argument can also be empty. Authors of classes can deactivate the warning,
-% by adding a \meta{package} to the comma separated list
-% \cs{class@shoulddisablepackagewarning@lis}. This has to be done, before
-% loading the \KOMAScript{} class. However doing so is not recommended and the
-% class author is responsible for the drawbacks.
-% \begin{macrocode}
-%<*class&body>
-\newcommand*{\scr@package@not@recommended}[2]{%
- \scr@ifundefinedorrelax{class@shoulddisablepackagewarning@list}{%
- \@firstofone
- }{%
- \edef\reserved@a{%
- \noexpand\in@{#1}{\class@shoulddisablepackagewarning@list}}%
- \reserved@a
- \ifin@\expandafter\@gobble\else\expandafter\@firstofone\fi
- }{%
- \BeforePackage{#1}{%
- \ClassWarning{\KOMAClassName}{%
- Usage of package `#1' together\MessageBreak
- with a KOMA-Script class is not recommended.\MessageBreak
- \if\relax\detokenize{#2}\relax\else
- I'd suggest to use #2.\MessageBreak
- \fi
- Nevertheless, using requested\MessageBreak
- package `#1'%
- }%
- }%
- }%
-}%
-% \end{macrocode}
-% \end{macro}^^A \class@shoulddisablepackagewarning@list
-% Here are the not recommended packages and the alternatives:
-% \begin{description}
-% \item[\pkg{emptypage}:] is not needed, because there are corresponding
-% options and features in \KOMAScript.
-% \begin{macrocode}
-\scr@package@not@recommended{emptypage}{%
- option\MessageBreak
- `cleardoublepage' with one of it's\MessageBreak
- several values}
-% \end{macrocode}
-% \item[\pkg{fancyhdr}:] does not respect font settings of \KOMAScript{} and
-% also breaks some other features.
-% \changes{v3.24}{2017/06/25}{improved \pkg{fancyhdr} warning}
-% \begin{macrocode}
-\scr@package@not@recommended{fancyhdr}{%
- \MessageBreak
- package `scrlayer' or `scrlayer-scrpage', because\MessageBreak
- they support KOMA-Script classes.\MessageBreak
- With `fancyhdr' several features of class `\KOMAClassName'\MessageBreak
- like options `headsepline', `footsepline' or command\MessageBreak
- `\string\MakeMarkcase' and the commands `\string\setkomafont' and\MessageBreak
- `\string\addtokomafont' for the page style elements need\MessageBreak
- explicite user intervention to work}
-% \end{macrocode}
-% \item[\pkg{minitoc}:]
-% \changes{v3.23}{2017/02/04}{\pkg{minitoc} is not recommended}
-% re-defines, e.g., \cs{@sect} and therefore breaks all the extensions of
-% \KOMAScript{} to this command. Currently not all impacts of the package has
-% been explored. Currently there is only a workaround for the \cs{@sect}
-% issue. See \autoref{sec:packageworkarounds} for more information.
-% \begin{macrocode}
-%<*!letter>
-\scr@package@not@recommended{minitoc}{}
-%</!letter>
-% \end{macrocode}
-% \item[\pkg{multitoc}:]
-% \changes{v3.26}{2018/07/18}{\pkg{multitoc} not recommended}
-% At least up to version 2.01 this breaks all additional lists/tables of
-% contents, because the \cs{@starttoc} redefinition does not allow to use
-% another extension but \file{toc}, \file{lof}, or \file{lot}. The package is
-% also not needed, because the \env{multicols} environment can simply be added
-% using \cs{BeforeStartingTOC} and \cs{AfterStartingTOC}.
-% \begin{macrocode}
-%<*!letter>
-\scr@package@not@recommended{multitoc}{%
- package `multicol' and, e.g.:\MessageBreak
- \space\space
- \string\BeforeStartingTOC{\string\begin{multicols}{2}}\MessageBreak
- \space\space
- \string\AfterStartingTOC{\string\end{multicols}}\MessageBreak
- to make all ToCs two-columned.\MessageBreak
- \@ifpackagelater{2018/07/18}{}{%
- Note, package `multitoc' breaks additional\MessageBreak
- ToCs generated by `\string\DeclareNewTOC' or\MessageBreak
- packages like `listings' or `newcaption' and\MessageBreak
- even the standard table of contents,\MessageBreak
- list of figures or list of tables,\MessageBreak
- if you omit the corresponding options `toc',\MessageBreak
- `lof' or `lot'.%
- }%
-}
-%</!letter>
-% \end{macrocode}
-% \item[\pkg{parskip}:] is an emergency fallback package for classes, that
-% do not support paragraph skips themselves.
-% \begin{macrocode}
-\scr@package@not@recommended{parskip}{%
- option\MessageBreak
- `parskip' with one of it's several values}
-% \end{macrocode}
-% \item[\pkg{titleps}:]
-% \changes{v3.16}{2015/01/21}{\pkg{titleps} not recommended}
-% does not respect several font settings and other features of the
-% \KOMAScript{} classes.
-% \begin{macrocode}
-\scr@package@not@recommended{titleps}{%
- package `scrlayer-scrpage'}
-% \end{macrocode}
-% \item[\pkg{titlesec}:]
-% \changes{v3.36}{2022/03/01}{bring back \pkg{titlesec} warning}
-% breaks several \KOMAScript{} features and needs a lot
-% of workarounds to not result in errors. Note, these workarounds have been
-% removed from \KOMAScript{}, because they are very fragile and use internal
-% macros of \pkg{titlesec}.
-% \begin{macrocode}
-%<*!letter>
-\scr@package@not@recommended{titlesec}{%
- KOMA-Script features\MessageBreak
- like \string\setkomafont, \string\RedeclareSectionCommand,
- \string\sectionlinesformat\MessageBreak
- and several others to re-configure section\MessageBreak
- headings}
-%</!letter>
-% \end{macrocode}
-% \item[\pkg{sectsty}:]
-% \changes{v3.27}{2019/07/24}{\pkg{sectsty} up to v2.0.2 is incompatible}
-% uses up to version 2.0.2 internal commands of
-% \KOMAScript{}, that has been removed already 2001 in \KOMAScript{} 2.8e. So
-% it was never compatible with \KOMAScript~3.
-% \begin{macrocode}
-%<*!letter>
-\AfterPackage*{sectsty}{%
- \@ifpackagelater{sectsty}{2002/02/26}{%
- \ClassInfo{\KOMAClassName}{Unknown `sectsty' release.\MessageBreak
- Cross your fingers, that is compatible%
- }%
- }{%
- \ClassWarning{\KOMAClassName}{%
- Incompatible package `sectsty' loaded!\MessageBreak
- Package `sectsty' up to version 2.0.2 is incompatible\MessageBreak
- with KOMA-Script from version 2.8e released in 2001.\MessageBreak
- You should avoid that package and configure the\MessageBreak
- section titles of your document using the KOMA-Script\MessageBreak
- user interface, e.g., \string\chapterlinesformat,\MessageBreak
- \string\RedeclareSectionCommand\space etc. or you should ask\MessageBreak
- the `sectsty' maintainer for a more compatible release.\MessageBreak
- Ignoring this warning could result in several error\MessageBreak
- messages and formatting issues after loading package\MessageBreak
- `sectsty'%
- }%
- }%
-}
-%</!letter>
-% \end{macrocode}
-% \item[\pkg{tocbibind}:]
-% \changes{v3.25}{2017/11/21}{Usage of \pkg{tocbibind} not recommended}
-% \pkg{tocbibind} does several things, that break \KOMAScript, i.e.:
-% \begin{itemize}
-% \item usage of \cs{MakeUppercase} within running heads,
-% \item usage of hard codes \texttt{toc} for the ToC entries,
-% \item hard redefinition of \env{thebibliography},
-% \item hard redefinition of \env{theindex},
-% \item hard redefinition of \cs{tableofcontents},
-% \item hard redefinition of \cs{listoftables},
-% \item hard redefinition of \cs{listoffigures},
-% \item hard redefinition of \cs{@makechapterhead}
-% \end{itemize}
-% \begin{macrocode}
-%<*!letter>
-\scr@package@not@recommended{tocbibind}{%
- options like `listof=totoc'\MessageBreak
- or `bibliography=totoc', or commands like\MessageBreak
- `\string\setuptoc{toc}{totoc}' instead of this package,\MessageBreak
- because it breaks several KOMA-Script features of\MessageBreak
- the list of figures, list of tables, bibliography,\MessageBreak
- index and the running head%
-}
-%</!letter>
-% \end{macrocode}
-% \item[\pkg{tocloft}:]
-% \changes{v3.26}{2018/07/18}{Usage of \textsf{tocloft} not recommended}
-% redefines \cs{tableofcontents}, \cs{listoffigures},
-% \cs{listoftables}, \cs{l@part} \dots{} \cs{l@subparagraph} and breaks
-% \KOMAScript, i.e.:
-% \begin{itemize}
-% \item commands \cs{BeforeTOCHead}, \cs{AfterTOCHead},
-% \cs{BeforeStartingTOC}, \cs{AfterStartingTOC},
-% \item almost all TOC features,
-% \item options \opt{listof=totoc}, \opt{listof=numbered},
-% \item option \opt{listof=flat},
-% \item option \opt{listof=entryprefix},
-% \item all options of \cs{DeclareTOCEntryStyle},
-% \end{itemize}
-% \begin{macrocode}
-%<*!letter>
-\scr@package@not@recommended{tocloft}{%
- options like `listof=entryprefix',\MessageBreak
- commands like `\string\listoflofentryname' or\MessageBreak
- `\string\listoflotentryname',
- and `\string\DeclareTOCStyleEntry' or\MessageBreak
- `\string\RedeclareSectionCommand'
- instead of this package,\MessageBreak
- because it breaks several KOMA-Script features of\MessageBreak
- the list of figures, list of tables and table of\MessageBreak
- contents, i.e., options like `listof=numbered',\MessageBreak
- `listof=flat or `toc=flat', commands like\MessageBreak
- `\string\BeforeTOCHead{...}' and
- `\string\AfterTOCHead{...}',\MessageBreak
- `\string\BeforeStartingTOC{...}' and
- \string\AfterStartingTOC{...}',\MessageBreak
- all features of `\string\DeclareTOCStyleEntry',\MessageBreak
- and the ToC entry features of `\string\DeclareSecionCommand'\MessageBreak
- and `\string\RedeclareSectionCommand' of levels\MessageBreak
- `part',
-%<article> `chapter',
- `section', `subsection',\MessageBreak
- `subsubsection', `paragraph' and `subparagraph'%
-}
-%</!letter>
-%</class&body>
-% \end{macrocode}
-% \end{description}
-% \end{macro}^^A \scr@package@not@recommended
-%
-% \section{Workarounds for Incompatible Packages}
-% \label{sec:packageworkarounds}
-%
-% \begin{description}
-% \item[ToDo:] The code should be moved to the same file as the code of
-% \autoref{sec:packagewarning} or maybe even to \pkg{scrhack}.
-% \end{description}
-%
-% For some packages can be made compatible, patching some internal macros of
-% these packages:
-% \begin{description}
-% \item[\pkg{minitoc}:]
-% \changes{v3.23}{2017/02/04}{\pkg{minitoc} is incompatible}
-% has some serious issues. The first issue is the hard re-definition of
-% \cs{@sect} without respecting the changes the \KOMAScript{} classes
-% already made. Here I'll try a ugly workaround for this, but is can
-% break. So not using the package with a \KOMAScript{} class would be the
-% better choice.
-% \begin{macrocode}
-%<*class&body>
-%<*!letter>
-\BeforePackage{minitoc}{%
- \let\scr@mt@saved@sect\@sect
-}
-\AfterPackage{minitoc}{%
- \def\@tempa#1#2#3#4#5#6[#7]#8{%
- \ifnum #2<1 \relax
- \addtocontents{toc}{\protect\sectbegin}
- \fi
- \stc@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
- }%
- \ifx\@sect\@tempa
-% \end{macrocode}
-% Note: There are several bugs in this definition (e.g. missing
-% \cs{expandafter} and spurious spaced). Nevertheless its the original one
-% from \pkg{minitoc} 61 and 62 and so I have to use it.
-% \begin{macrocode}
- \def\@tempa#1#2#3#4#5#6[#7]#8{
- \expandafter
- \ifx\csname #1\endcsname\section\relax
- \addcontentsline{lof}{xsect}{#7}%
- \addcontentsline{lot}{xsect}{#7}%
- \fi
- \ifx\csname #1\endcsname\starsection\relax
- \addcontentsline{lof}{xsect}{#7}%
- \addcontentsline{lot}{xsect}{#7}%
- \fi
- \ifnum #2>\c@secnumdepth\relax
- \let\@svsec\@empty
- \else
- \refstepcounter{#1}%
- \edef\@svsec{\csname the#1\endcsname\hskip 1em}%
- \fi
- \@tempskipa #5\relax
- \ifdim \@tempskipa>\z@
- \begingroup #6\relax
- \@hangfrom{\hskip #3\relax\@svsec}%
- {\interlinepenalty \@M #8\par}%
- \endgroup
- \csname #1mark\endcsname{#7}%
- \addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth\relax
- \else
- \protect\numberline{\csname the#1\endcsname}%
- \fi
- #7%
- }%
- \else
- \def\@svsechd{#6\hskip #3\relax
- \@svsec #8\csname #1mark\endcsname{#7}%
- \addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth\relax
- \else
- \protect\numberline{\csname the#1\endcsname}
- \fi
- #7}%
- }%
- \fi
- \@xsect{#5}%
- }%
- \ifx\stc@sect\@tempa
- \ClassWarning{\KOMAClassName}{%
- Redefining minitoc's internal command
- `\string\stc@sect'\MessageBreak
- to prevent minitoc to destroy several features\MessageBreak
- of KOMA-Script%
- }%
- \let\stc@sect\scr@mt@saved@sect
- \else
- \ClassInfo{\KOMAClassName}{%
- Deactivating the `minitoc' workaround,\MessageBreak
- because of unexpected definition of\MessageBreak
- `\string\stc@sect'%
- }%
- \let\scr@mt@saved@sect\relax
- \fi
- \else
- \ifx\@sect\scr@mt@saved@sect
- \ClassInfo{\KOMAClassName}{%
- Deactivating the `minitoc' workaround for
- `\string\@sect',\MessageBreak
- because it is not needed%
- }%
- \else
- \ClassInfo{\KOMAClassName}{%
- Deactivating the `minitoc' workaround,\MessageBreak
- because of unexpected definition of\MessageBreak
- `\string\@sect'%
- }%
- \fi
- \let\scr@mt@saved@sect\relax
- \fi
-}
-%</!letter>
-%</class&body>
-% \end{macrocode}
-% \item[\pkg{titlesec}:]
-% \changes{v3.13a}{2014/10/09}{\pkg{titlesec} is hardly incompatible}
-% \changes{v3.27}{2019/07/23}{\pkg{titlesec} does not support
-% KOMA-Script classes}%
-% After several years \textsf{titlesec} still does not really support
-% \KOMAScript{} classes and \KOMAScript{} would still need an ugly hack
-% using internal \texttt{titlesec} macros and deactivating several features
-% of \KOMAScript{} to make the package work. So IMO the better solution is
-% to remove such hacks from the \KOMAScript{} classes. Maybe the
-% \pkg{titlesec} author will support the \KOMAScript{} classes in some
-% future, maybe not. If you really need to \pkg{titlesec} with a
-% \KOMAScript{} class, see the ugly \texttt{standardsection} hack in
-% \pkg*{scrhack}.
-% \end{description}
-%
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-notepaper.dtx b/macros/latex/contrib/koma-script/source/scrkernel-notepaper.dtx
deleted file mode 100644
index 36336f3b24..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-notepaper.dtx
+++ /dev/null
@@ -1,5012 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-notepaper.dtx
-% Copyright (c) Markus Kohm, 2006-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-notepaper.dtx 3742 2022-03-04 16:21:17Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-04 17:21:17 +0100 (Fr, 04. Mär 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3742 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-notepaper.dtx}
- [\filedate\space\filerevision\space
- KOMA-Script source
- (note-paper)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{3}
-\begin{document}
-\DocInput{scrkernel-notepaper.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2006/03/16}{first version after splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/26}{\cs{@newplength} replaced by \cs{newplength}}
-% \changes{v3.36}{2022/02/26}{\cs{@setplength} replaced by \cs{setplength}}
-% \changes{v3.36}{2022/02/26}{\cs{@addtoplength} replaced by \cs{addtoplength}}
-% \changes{v3.36}{2022/03/02}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/03/02}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-notepaper.dtx}
-% \title{Specific Code for Letters and Especially the Notepaper with
-% \href{https://komascript.de}{\KOMAScript}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% The notepaper is something with high interest for letters. \KOMAScript{}
-% provides a wide range of configurations for it. \file{scrkernel-notepaper}
-% implements these features with options, variables and pseudo lengths
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-%
-% \section{Implementation of the Notepaper of Letters}
-%
-% This code is only valid for letters with \cls*{scrlttr2} or
-% \pkg*{scrletter}.
-%
-% \begin{macrocode}
-%<*letter>
-% \end{macrocode}
-%
-%
-% \subsection{Options of the letter head}
-%
-% There are several options for the letter head.
-%
-% \begin{option}{firsthead}
-% \changes{v2.97e}{2007/11/22}{added}
-% \begin{macro}{\@firstheadfalse,\@firstheadtrue,\if@firsthead}
-% \changes{v2.8q}{2002/01/25}{added}
-% Optionally the whole letter head can be switched off (default is on).
-% \begin{macrocode}
-%<*option>
-\KOMA@ifkey{firsthead}{@firsthead}
-\KOMAExecuteOptions{firsthead=true}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{fromalign}
-% \changes{v2.8q}{2002/01/25}{added}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/16}{using internal value storage}
-% \begin{macro}{\@alignfrom}
-% \changes{v2.8q}{2002/01/25}{added}
-% \changes{v2.97e}{2007/11/13}{new values added}
-% The option provides several values for placing the sender of the letter. The
-% decision is saved as numerical value of the macro.
-% \begin{center}
-% \begin{tabular}{lrl}
-% \opt{fromalign} & \cs{@alignfrom} & placement\\\hline
-% \opt{=left} & 0 & left in the head\\
-% \opt{=center} & 1 & centered in the head\\
-% \opt{=right} & 2 & right in the head\\
-% \opt{=locationleft} & 3 & left in the location field\\
-% \opt{=locationright} & 4 & right in the location field\\
-% \opt{=false} & 10000 & \emph{don't touch} \\
-% \end{tabular}
-% \end{center}
-% Initial setting is \emph{don't touch}, which means not to change the content
-% of variable \var{firsthead} of \var{location}.
-% \begin{macrocode}
-\newcommand*{\@alignfrom}{0}
-\KOMA@key{fromalign}{%
- \KOMA@set@ncmdkey{fromalign}{@alignfrom}{%
- {left}{0},%
- {center}{1},{centered}{1},{middle}{1},%
- {right}{2},%
- {locationleft}{3},{leftlocation}{3},%
- {locationright}{4},{rightlocation}{4},{location}{4},%
- {no}{10000},{false}{10000},{off}{10000}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{fromalign}{#1}%
- \ifcase\@alignfrom\or\or\or\@firstheadfalse\or\@firstheadfalse\fi
- \fi
-}
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{fromalign}{left}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{fromrule}
-% \changes{v2.8q}{2002/01/25}{added}
-% \changes{v3.17}{2015/03/16}{using internal value storage}
-% \begin{macro}{\@rulefrom}
-% \changes{v2.8q}{2002/01/25}{added}
-% Should there be a horizontal rule inside the sender of the automatic
-% generated letter head of option \opt{fromalign}?
-% \begin{center}
-% \begin{tabular}{lrl}
-% \opt{fromrule} & \cs{@rulefrom} & rule placement \\\hline
-% \opt{=false} & 0 & nowhere \\
-% \opt{=aftername} & 1 & below the senders name \\
-% \opt{=below} & 2 & below the senders address \\
-% \end{tabular}
-% \end{center}
-% Initial setting is nowhere.
-% \begin{macrocode}
-\KOMA@ncmdkey{fromrule}[below]{@rulefrom}{%
- {false}{0},{no}{0},{off}{0},{aftername}{1},%
- {below}{2},{afteraddress}{2},{true}{2},{yes}{2},{on}{2}%
-}
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{fromrule}{false}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{fromphone}
-% \changes{v2.8q}{2002/01/25}{added}
-% \begin{macro}{\@phonefalse,\@phonetrue,\if@phone}
-% \changes{v2.8q}{2002/01/25}{added}
-% Show the sender's telephone number in the letter head automatically
-% generated by option \opt{fromalign}?
-% \begin{macrocode}
-\KOMA@ifkey{fromphone}{@phone}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{frommobilephone}
-% \changes{v3.12}{2013/05/29}{added}
-% \begin{macro}{\@mobilephonefalse,\@mobilephonetrue,\if@mobilephone}
-% \changes{v3.12}{2013/05/29}{added}
-% Show the sender's mobile telephone number in the letter head automatically
-% generated by option \opt{fromalign}?
-% \begin{macrocode}
-\KOMA@ifkey{frommobilephone}{@mobilephone}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{fromfax}
-% \changes{v2.8q}{2002/01/25}{added}
-% \begin{macro}{\@faxfalse,\@faxtrue,\if@fax}
-% \changes{v2.8q}{2002/01/25}{added}
-% Show the sender's telefax number in the letter head automatically generated
-% by option \opt{fromalign}?
-% \begin{macrocode}
-\KOMA@ifkey{fromfax}{@fax}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{fromemail}
-% \changes{v2.8q}{2002/01/25}{added}
-% \begin{macro}{\@emailfalse,\@emailtrue,\if@email}
-% \changes{v2.8q}{2002/01/25}{added}
-% Show the sender's email address in the letter head automatically generated
-% by option \opt{fromalign}?
-% \begin{macrocode}
-\KOMA@ifkey{fromemail}{@email}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{fromurl}
-% \changes{v2.8q}{2002/01/25}{added}
-% \begin{macro}{\@wwwfalse,\@wwwtrue,\if@www}
-% \changes{v2.8q}{2002/01/25}{added}
-% Show a sender's url (e.g. of the homepage) in the letter head automatically
-% generated by option \opt{fromalign}?
-% \begin{macrocode}
-\KOMA@ifkey{fromurl}{@www}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{fromlogo}
-% \changes{v2.8q}{2002/01/25}{added}
-% \begin{macro}{\@logofalse,\@logotrue,\if@logo}
-% \changes{v2.8q}{2002/01/25}{added}
-% Show a sender's logo in the letter head automatically generated by option
-% \opt{fromalign} (placement also depends on \opt{fromalign})?
-% \begin{macrocode}
-\KOMA@ifkey{fromlogo}{@logo}
-%</option>
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-%
-% \subsection{Options for the addressee and the location field}
-%
-% \begin{option}{addrfield}
-% \changes{v2.8q}{2001/10/09}{added}
-% \changes{v3.03}{2009/03/04}{new values added}
-% \changes{v3.17}{2015/03/16}{using internal value storage}
-% \begin{macro}{\@afieldmode}
-% \changes{v3.03}{2009/03/04}{added}
-% There are several settings for the address field---not only to switch it on
-% and off:
-% \begin{center}
-% \begin{tabular}{lrl}
-% \opt{addrfield} & \cs{@afieldmode} & meaning \\\hline
-% false & 0 & don't show the address
-% field\\
-% true & 1 & show address field
-% centered\\
-% PP & 2 & address field with
-% pospaid\\
-% backgroundimage & 3 & address field with
-% background image\\
-% image & 4 & address field by image\\
-% topaligned & 5 & show address field top
-% aligned\\
-% \end{tabular}
-% \end{center}
-% \begin{macrocode}
-%<*option>
-\newcommand*{\@afieldmode}{\@ne}
-\KOMA@ncmdkey{addrfield}[true]{@afieldmode}{%
- {false}{0},{off}{0},{no}{0},%
- {true}{1},{on}{1},{yes}{1},%
- {PP}{2},{pp}{2},%
- {PPexplicite}{2},{PPExplicite}{2},%
- {ppexplicite}{2},{ppExplicite}{2},%
- {backgroundimage}{3},%
- {PPbackgroundimage}{3},{PPBackgroundImage}{3},{PPBackGroundImage}{3},%
- {ppbackgroundimage}{3},{ppBackgroundImage}{3},{ppBackGroundImage}{3},%
- {image}{4},{Image}{4},%
- {PPimage}{4},{PPImage}{4},%
- {ppimage}{4},{ppImage}{4},%
- {topaligned}{5},{alignedtop}{5}%
-}
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{addrfield}{true}
-% \end{macrocode}
-% \begin{macro}{\@afieldfalse,\@afieldtrue,\if@afield}
-% \changes{v3.03}{2009/03/04}{replaced by \cs{@afieldmode}}
-% \changes{v3.36}{2022/03/02}{removed}
-% \end{macro}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{priority}
-% \changes{v3.03}{2009/03/04}{added}
-% \changes{v3.17}{2015/03/16}{using internal value storage}
-% \changes{v3.36}{2022/03/02}{value \opt{\quotechar=manual} fixed}
-% \begin{macro}{\ltr@priority}
-% \changes{v3.03}{2009/03/04}{added}
-% The international postage convention allows two priorities for
-% letters. Together with no (or manually given) priority we have three of
-% them:
-% \begin{center}
-% \begin{tabular}{lrl}
-% \opt{priority} & \cs{ltr@priority} & meaning \\\hline
-% false & 0 & use variable \var{specialmail}\\
-% B & 1 & set \var{specialmail} to
-% B-Economy\\
-% A & 2 & set \var{specialmail} to
-% A-Priority\\
-% \end{tabular}
-% \end{center}
-% \begin{macrocode}
-\KOMA@ncmdkey{priority}[A]{ltr@priority}{%
- {no}{0},{off}{0},{false}{0},{manual}{0},%
- {B}{1},{b}{1},%
- {economy}{1},{Economy}{1},{ECONOMY}{1},%
- {B-ECONOMY}{1},{B-Economy}{1},{b-economy}{1},%
- {A}{2},{a}{2},%
- {priority}{2},{Priority}{2},{PRIORITY}{2},%
- {A-PRIORITY}{2},{A-Priority}{2},{a-priority}{2}%
-}%
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{priority}{false}
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{backaddress}
-% \changes{v2.8q}{2002/01/22}{added}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.17}{3015/03/16}{using internal value storage}
-% \begin{macro}{\@baddrfalse,\@baddrtrue,\if@baddr}
-% \begin{macro}{\backaddr@format}
-% \changes{v2.96}{2006/07/31}{added}
-% The address field of the addressee can also contain a small sender's address
-% also known as return address.
-% \begin{center}
-% \begin{tabular}{llll}
-% \opt{backaddress} & \cs{if@baddr} & \cs{backaddr@format} & meaning \\\hline
-% \opt{=false} & \cs{iffalse} & unchanged & don't show a
-% return
-% address\\
-% \opt{=true} & \cs{iftrue} & unchanged & show the
-% return address\\
-% \opt{=underlined} & \cs{iftrue} & \cs{underline} & show
-% underlined
-% return
-% address\\
-% \opt{=plain} & \cs{iftrue} & \cs{@firstofone} & show the
-% return
-% address
-% unchanged\\
-% \end{tabular}
-% \end{center}
-% Initial setting is to show a underlined return address.
-% \begin{macrocode}
-\newcommand{\backaddr@format}[1]{}
-\let\backaddr@format\underline
-\newif\if@baddr\@baddrtrue
-\KOMA@key{backaddress}[true]{%
- \begingroup
- \KOMA@set@ncmdkey{backaddress}{@tempa}{%
- {false}{0},{off}{0},{no}{0},%
- {true}{1},{on}{1},{yes}{1},%
- {underlined}{2},%
- {plain}{3}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \aftergroup\FamilyKeyStateProcessed
- \ifcase\@tempa
- \endgroup
- \@baddrfalse
- \or
- \endgroup
- \@baddrtrue
- \or
- \endgroup
- \@baddrtrue
- \let\backaddr@format\underline
- \or
- \endgroup
- \@baddrtrue
- \let\backaddr@format\@firstofone
- \else
- \endgroup
- \fi
- \if@baddr
- \ifx\backaddr@format\underline
- \KOMA@kav@replacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{backaddress}{underlined}%
- \else
- \ifx\backaddr@format\@firstofone
- \KOMA@kav@replacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{backaddress}{plain}%
- \else
- \KOMA@kav@replacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{backaddress}{true}%
- \fi
- \fi
- \else
- \KOMA@kav@replacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{backaddress}{false}%
- \fi
- \else
- \endgroup
- \FamilyKeyStateUnknownValue
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \backaddr@format
-% \end{macro}^^A \if@baddr
-% \end{option}^^A backaddress
-%
-% \begin{option}{locfield}
-% \changes{v2.8q}{2001/10/09}{added}
-% \changes{v2.97c}{2007/03/30}{inverted meaning fixed}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/16}{using internal value storage}
-% \begin{macro}{\@biglocfalse,\@bigloctrue,\if@bigloc}
-% We allow two different automatic settings for the location field right
-% beside the addressee's address field:
-% \begin{center}
-% \begin{tabular}{lll}
-% \opt{locfield} & \cs{if@bigloc} & meaning \\\hline
-% \opt{=wide} & \cs{iftrue} & set \plen{locwidth} to 2/3 of
-% available space\\
-% \opt{=narrow} & \cs{iffalse} & set \plen{locwidth} to 1/2 of
-% available space\\
-% \end{tabular}
-% \end{center}
-% Initial setting is \opt{locfield=narrow}.
-% \begin{macrocode}
-\newif\if@bigloc
-\KOMA@key{locfield}[wide]{%
- \begingroup
- \KOMA@set@ncmdkey{locfield}{@tempa}{{wide}{0},{narrow}{1}}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifcase\@tempa
- \endgroup
- \@bigloctrue
- \KOMA@kav@replacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{locfield}{wide}%
- \else
- \endgroup
- \@biglocfalse
- \KOMA@kav@replacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{locfield}{narrow}%
- \fi
- \else
- \endgroup
- \FamilyKeyStateUnknownValue
- \fi
-}
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{locfield}{narrow}
-% \end{macrocode}
-% \begin{option}{wlocfield,slocfield}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{wlocfield}{locfield=wide}
-\KOMA@DeclareDeprecatedOption{slocfield}{locfield=narrow}
-%</option>
-% \end{macrocode}
-% \end{option}^^A wlocfield,slocfield
-% \end{macro}^^A \if@bigloc
-% \end{option}^^A locfield
-%
-%
-% \subsection{Options of the fold marks}
-%
-% \KOMAScript{} provides a large number of horizontal and vertical fold marks.
-
-% \begin{option}{foldmarks}
-% \changes{v2.8q}{2001/09/10}{added}
-% \changes{v3.00}{2008/06/06}{locally re-definition of \cs{FamilyUnkownKeyVal}
-% instead of \cs{KOMA@unkown@keyval}}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/16}{using internal value storage}
-% \begin{macro}{\@foldfalse,\@foldtrue,\if@fold}
-% \begin{macro}{\@usefolds}
-% \changes{v2.97e}{2007/11/08}{added}
-% Fold marks can be generally switched on and off and it can be selected,
-% which fold marks should be shown, if fold marks has been activated:
-% \begin{center}
-% \begin{tabular}{llll}
-% \opt{foldmarks} & \cs{if@fold} & \cs{@usefolds} & meaning\\\hline
-% \opt{=true} & \cs{iftrue} & \emph{no change} & switch on fold
-% marks\\
-% \opt{=false} & \cs{iffalse} & \emph{no change} & switch off fold
-% marks\\
-% \opt{=\dots T\dots} & \emph{no change} & \texttt{T} \emph{added} & top
-% fold mark
-% enabled\\
-% \opt{=\dots M\dots} & \emph{no change} & \texttt{M} \emph{added} & middle
-% fold mark
-% enabled\\
-% \opt{=\dots B\dots} & \emph{no change} & \texttt{B} \emph{added} & bottom
-% fold mark
-% enabled\\
-% \opt{=\dots P\dots} & \emph{no change} & \texttt{P} \emph{added} & hole
-% punch fold mark
-% enabled\\
-% \opt{=\dots H\dots} & \emph{no change} & \texttt{TMBP} \emph{added} & all
-% horizontal fold
-% marks enabled\\
-% \opt{=\dots L\dots} & \emph{no change} & \texttt{L} \emph{added} & left
-% fold mark
-% enabled\\
-% \opt{=\dots V\dots} & \emph{no change} & \texttt{L} \emph{added} & all
-% vertical fold
-% marks enabled\\
-% \opt{=\dots t\dots} & \emph{no change} & \texttt{T} \emph{removed} & top
-% fold mark
-% disabled\\
-% \opt{=\dots m\dots} & \emph{no change} & \texttt{M} \emph{removed} & middle
-% fold mark
-% disabled\\
-% \opt{=\dots b\dots} & \emph{no change} & \texttt{B} \emph{removed} & bottom
-% fold mark
-% disabled\\
-% \opt{=\dots p\dots} & \emph{no change} & \texttt{P} \emph{removed} & hole
-% punch fold mark
-% disabled\\
-% \opt{=\dots h\dots} & \emph{no change} & \texttt{TMBP} \emph{removed} & all
-% horizontal fold
-% marks disabled\\
-% \opt{=\dots l\dots} & \emph{no change} & \texttt{L} \emph{removed} & left
-% fold mark
-% disabled\\
-% \opt{=\dots v\dots} & \emph{no change} & \texttt{L} \emph{removed} & all
-% vertical fold
-% marks disabled\\
-% \end{tabular}
-% \end{center}
-% Enabling or disabling a fold mark does not enable printing of fold
-% marks. the enabled fold marks are only printed, if fold marks are switched
-% on. The initial state is to switch on the top, middle, bottom, punch hole
-% and left fold mark (in other words: all fold marks).
-% \begin{macrocode}
-%<*option>
-\newif\if@fold\@foldtrue
-\newcommand*{\@usefolds}{TMBPL}
-\KOMA@key{foldmarks}[true]{%
- \begingroup
- \KOMA@set@ifkey\@empty{@fold}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \if@fold\aftergroup\@foldtrue\else\aftergroup\@foldfalse\fi
- \aftergroup\FamilyKeyStateProcessed
- \else
- \aftergroup\FamilyKeyStateProcessed
- \def\sc@nf@ldch@rs##1{%
- \ifx ##1\@nil\else
- \if ##1T\g@addto@macro\@usefolds{##1}\else
- \if ##1M\g@addto@macro\@usefolds{##1}\else
- \if ##1B\g@addto@macro\@usefolds{##1}\else
- \if ##1P\g@addto@macro\@usefolds{##1}\else
- \if ##1L\g@addto@macro\@usefolds{##1}\else
- \if ##1V\g@addto@macro\@usefolds{L}\else
- \if ##1H\g@addto@macro\@usefolds{TMBP}\else
- \if ##1t\scr@removechar\@usefolds{T}\else
- \if ##1m\scr@removechar\@usefolds{M}\else
- \if ##1b\scr@removechar\@usefolds{B}\else
- \if ##1p\scr@removechar\@usefolds{P}\else
- \if ##1l\scr@removechar\@usefolds{L}\else
- \if ##1v%
- \scr@removechar\@usefolds{L}%
- \else
- \if ##1h%
- \scr@removechar\@usefolds{T}%
- \scr@removechar\@usefolds{M}%
- \scr@removechar\@usefolds{B}%
- \else
- \aftergroup\FamilyKeyStateUnknownValue
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \expandafter\sc@nf@ldch@rs
- \fi
- }%
- \expandafter\sc@nf@ldch@rs#1\@nil
- \fi
- \endgroup
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{foldmarks}{\@usefolds}%
- \KOMA@kav@xadd{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{foldmarks}{\if@fold true\else false\fi}%
- \fi
-}
-\KOMA@kav@xadd{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{foldmarks}{\@usefolds}%
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{foldmarks}{true}%
-% \end{macrocode}
-% \begin{macro}{\scr@removechar}
-% \changes{v2.97e}{2007/11/08}{added}
-% Used to remove one char from a character list macro like \cs{@usefolds}.
-% \begin{macrocode}
-\newcommand*{\scr@removechar}[2]{%
- \def\in@@##1#2##2##3\in@@{%
- \ifx\in@##2\else
- \def\in@@####1#2\in@{\gdef#1{##1####1}}%
- \in@@##2##3%
- \fi}%
- \expandafter\in@@#1#2\in@\in@@
-}
-%</option>
-% \end{macrocode}
-% \end{macro}^^A \scr@removechar
-% \end{macro}^^A \@usefolds
-% \end{macro}^^A \if@fold
-% \end{option}^^A foldmarks
-%
-%
-% \subsection{Options of the reference line}
-%
-% \begin{option}{refline}
-% \changes{v2.8n}{2001/09/08}{added}
-% \changes{v2.96a}{2006/12/07}{alternated meaning fixed}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/16}{using internal value storage}
-% \changes{v3.09}{2011/03/07}{values \opt{\quotechar=dateleft},
-% \opt{\quotechar=dateright}, \opt{\quotechar=nodate} added}
-% \changes{v3.27}{2019/05/03}{new value \opt{\quotechar=false} added}
-% \begin{macro}{\@refwidefalse,\@refwidetrue,\if@refwide}
-% \changes{v2.8n}{2001/09/08}{added}
-% \begin{macro}{\@datepos}
-% \changes{v3.09}{2011/03/07}{added}
-% \begin{macro}{\@reflinefalse,\@reflinetrue,\if@refline}
-% \changes{v3.27}{2019/05/03}{added}
-% The reference line support two predefined widths, switching off and
-% three different positions for the date:
-% \begin{center}
-% \begin{tabular}{lllrl}
-% \opt{refline} & \cs{if@refwide} & \cs{if@refline} & \cs{@datepos} &
-% meaning\\\hline
-% \opt{false} & \emph{unchanged}& \cs{iffalse} & \emph{unchanged} &
-% deactivate reference line\\
-% \opt{=wide} & \cs{iftrue} & \cs{iftrue} & \emph{unchanged} &
-% print wide reference line\\
-% \opt{=narrow} & \cs{iffalse} & \cs{iftrue} & \emph{unchanged} &
-% print narrow reference line\\
-% \opt{=nodate}& \emph{unchanged} & \emph{unchanged} & 1 & don't print
-% date in reference line\\
-% \opt{=dateright}& \emph{unchanged} & \emph{unchanged} & 1 & add date
-% rightmost to reference line\\
-% \opt{=dateleft} & \emph{unchanged} & \emph{unchanged} & 2 & add date
-% leftmost to reference line\\
-% \end{tabular}
-% \end{center}
-% \begin{macrocode}
-%<*option>
-\newif\if@refwide
-%<package>\newif\if@refline\@reflinetrue
-\newcommand*{\@datepos}{1}
-\KOMA@key{refline}[wide]{%
- \begingroup
- \KOMA@set@ncmdkey{refline}{@tempa}{{wide}{0},{narrow}{1},%
- {dateleft}{2},{leftdate}{2},%
- {dateright}{3},{rightdate}{3},%
- {nodate}{4}%
-%<package> ,{no}{5},{off}{5},{false}{5}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \aftergroup\FamilyKeyStateProcessed
- \ifcase\@tempa% wide
- \endgroup
- \@refwidetrue
-%<*package>
- \@reflinetrue
- \KOMA@kav@remove{.scrletter.\scr@pkgextension}{refline}{false}%
-%</package>
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{wide}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{narrow}%
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{wide}%
- \or% narrow
- \endgroup
- \@refwidefalse
-%<*package>
- \@reflinetrue
- \KOMA@kav@remove{.scrletter.\scr@pkgextension}{refline}{false}%
-%</package>
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{wide}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{narrow}%
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{narrow}%
- \or% dateleft
- \endgroup
- \def\@datepos{2}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{dateleft}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{dateright}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{nodate}%
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{dateleft}%
- \or% dateright
- \endgroup
- \def\@datepos{1}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{dateleft}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{dateright}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{nodate}%
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{dateright}%
- \or% nodate
- \endgroup
- \def\@datepos{0}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{dateleft}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{dateright}%
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{nodate}%
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{refline}{nodate}%
-%<*package>
- \or% false
- \endgroup
- \@reflinefalse
- \KOMA@kav@remove{.scrletter.\scr@pkgextension}{refline}{wide}%
- \KOMA@kav@remove{.scrletter.\scr@pkgextension}{reline}{narrow}%
- \KOMA@kav@add{.scrletter.\scr@pkgextension}{refline}{false}%
-%</package>
- \fi
- \else
- \endgroup
- \FamilyKeyStateUnknownValue
- \fi
-}
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{refline}{dateright}%
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{refline}{narrow}%
-%</option>
-% \end{macrocode}
-% \end{macro}^^A \@reflinefalse,\@reflinetrue,\if@refline
-% \end{macro}^^A \@datepos
-% \end{macro}^^A \@refwidefalse,\@refwidetrue,\if@refwide
-% \end{option}^^A refline
-%
-%
-% \subsection{Options of the subject}
-%
-% \begin{option}{subject}
-% \changes{v2.8q}{2001/10/09}{added}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/16}{using internal value storage}
-% \begin{macro}{\@subjtrue,\@subjfalse,\if@subj}
-% \begin{macro}{\@subjaftertrue,\@subjafterfalse,\if@subjafter}
-% \begin{macro}{\subject@format}
-% \changes{v2.97c}{2007/07/06}{added}
-% \begin{command}{\raggedsubject}
-% \changes{v2.97c}{2007/07/06}{added}
-% The subject can be printed with or without title before or after the
-% opening. Different alignments and formats are also supported:
-% \begin{center}
-% \begin{tabular}{lllll}
-% \opt{subject} & \cs{if@subj} & \cs{if@subjafter} & \cs{subject@format} &
-% \cs{raggedsubject}\\\hline
-% \opt{=titled} & \cs{iftrue} & \emph{unchanged} & \emph{unchanged} &
-% \emph{unchanged}\\
-% \opt{=untitled} & \cs{iffalse} & \emph{unchanged} & \emph{unchanged} &
-% \emph{unchanged}\\
-% \opt{=afteropening} & \emph{unchanged} & \cs{iftrue} & \emph{unchanged} &
-% \emph{unchanged}\\
-% \opt{=beforeopening} & \emph{unchanged} & \cs{iffalse} & \emph{unchanged} &
-% \emph{unchanged}\\
-% \opt{=underlined} & \emph{unchanged} & \emph{unchanged} & \cs{underline}
-% & \emph{unchanged}\\
-% \opt{=left} & \emph{unchanged} & \emph{unchanged} & \emph{unchanged} &
-% \cs{raggedright} \\
-% \opt{=right} & \emph{unchanged} & \emph{unchanged} & \emph{unchanged} &
-% \cs{raggedleft} \\
-% \opt{=centered} & \emph{unchanged} & \emph{unchanged} & \emph{unchanged} &
-% \cs{centering} \\
-% \end{tabular}
-% \end{center}
-% \begin{macrocode}
-%<*option>
-\newcommand{\subject@format}[1]{#1}
-\newcommand*{\raggedsubject}{}
-\newif\if@subj
-\newif\if@subjafter
-\KOMA@key{subject}{%
- \begingroup
- \KOMA@set@ncmdkey{subject}{@tempa}{%
- {titled}{0},%
- {untitled}{1},%
- {afteropening}{2},%
- {beforeopening}{3},%
- {underlined}{4},%
- {left}{5},%
- {right}{6},%
- {centered}{7}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \aftergroup\FamilyKeyStateProcessed
- \ifcase\@tempa
- \aftergroup\@subjtrue
- \or
- \aftergroup\@subjfalse
- \or
- \aftergroup\@subjaftertrue
- \or
- \aftergroup\@subjafterfalse
- \or
- \aftergroup\let\aftergroup\subject@format\aftergroup\underline
- \or
- \aftergroup\let\aftergroup\raggedsubject\aftergroup\raggedright
- \or
- \aftergroup\let\aftergroup\raggedsubject\aftergroup\raggedleft
- \or
- \aftergroup\let\aftergroup\raggedsubject\aftergroup\centering
- \fi
- \else
- \aftergroup\FamilyKeyStateUnknownValue
- \fi
- \endgroup
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{subject}{\if@subj titled\else untitled\fi}%
- \KOMA@kav@xadd{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{subject}{\if@subjafter after\else before\fi opening}%
- \ifx\subject@format\underline
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{subject}{underlined}%
- \fi
- \ifx\raggedsubject\raggedright
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{subject}{left}%
- \else
- \ifx\raggedsubject\raggedleft
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{subject}{right}%
- \else
- \ifx\raggedsubject\centering
- \KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{subject}{centered}%
- \fi
- \fi
- \fi
- \fi
-}
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{subject}{untitled}%
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{subject}{beforeopening}%
-%</option>
-% \end{macrocode}
-% \end{command}^^A \raggedsubject
-% \end{macro}^^A \subject@format
-% \end{macro}^^A \@subjaftertrue,\@subjafterfalse,\if@subjafter
-% \end{macro}^^A \@subjtrue,\@subjfalse,\if@subj
-% \end{option}^^A subject
-%
-%
-% \subsection{Options of the typing area}
-%
-% \begin{option}{enlargefirstpage}
-% \changes{v2.8o}{2001/09/18}{added}
-% \begin{macro}{\@enlargefpfalse,\@enlargefptrue,\if@enlargefp}
-% \changes{v2.8o}{2001/09/18}{added}
-% Usually the text at the notepaper is placed regarding the general typing
-% area. But if the position of the foot of the note paper is to high, the text
-% area is automatically shorten. Option \opt{firstpageenlarge} also provides
-% the opposite: enlarge the text area of the first page, if the foot of the
-% note paper is placed very low.
-% \begin{macrocode}
-%<*option>
-\KOMA@ifkey{enlargefirstpage}{@enlargefp}
-%</option>
-% \end{macrocode}
-% \end{macro}^^A \if@enlargefp
-% \end{option}^^A enlargefirstpage
-%
-%
-% \subsection{Options of the letter footer}
-%
-% \begin{option}{firstfoot}
-% \changes{v2.97e}{2007/11/22}{added}
-% \begin{macro}{\@firstfootfalse,\@firstfoottrue,\if@firstfoot}
-% \changes{v2.8q}{2002/01/25}{added}
-% Allow to switch of the footer of the note paper.
-% \begin{macrocode}
-%<*option>
-\KOMA@ifkey{firstfoot}{@firstfoot}\@firstfoottrue
-%</option>
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-%
-% \subsection{Options of the head of succeeding pages}
-%
-% \begin{option}{pagenumber}
-% \changes{v2.8q}{2002/01/31}{added}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \begin{macro}{\@pageat}
-% \changes{v2.8q}{2002/01/31}{added}
-% This is irrelevant for the notepaper but selects the position of the page
-% number on succeeding pages using page style \pstyle{headings},
-% \pstyle{myheadings} or \pstyle{plain} resp. \pstyle{letter} or
-% \pstyle{plain.letter}.
-% \begin{center}
-% \begin{tabular}{lrl}
-% \opt{pagenumber} & \cs{@pageat} & meaning\\\hline
-% \opt{=false} & -1 & no page number\\
-% \opt{=topleft} & 0 & in the left of the page head\\
-% \opt{=topmiddle} & 1 & centered in the page head\\
-% \opt{=topright} & 2 & in the right of the page head\\
-% \opt{=botleft} & 3 & in the left of the page foot\\
-% \opt{=botmiddle} & 4 & centered in the page foot\\
-% \opt{=botright} & 5 & in the right of the page foot\\
-% \end{tabular}
-% \end{center}
-% \begin{macrocode}
-%<*option>
-\newcommand*{\@pageat}{4}
-\KOMA@key{pagenumber}{%
- \begingroup
- \KOMA@set@ncmdkey{pagenumber}{@tempa}{%
- {no}{-1},{off}{-1},{false}{-1},%
- {topleft}{0},{headleft}{0},%
- {topmiddle}{1},{topcenter}{1},{topcentered}{1},%
- {headmiddle}{1},{headcenter}{1},{headcentered}{1},%
- {topright}{2},{headright}{2},%
- {botleft}{3},{footleft}{3},%
- {botmiddle}{4},{botcenter}{4},{botcentered}{4},%
- {footmiddle}{4},{footcenter}{4},{footcentered}{4},%
- {botright}{5},{footright}{5},%
- {top}{10},{head}{10},{bot}{11},{foot}{11},%
- {left}{20},{middle}{21},{center}{21},{centered}{21},{right}{22}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \aftergroup\FamilyKeyStateProcessed
- \ifnum\@tempa<10
- \edef\@tempa{\endgroup\edef\noexpand\@pageat{\@tempa}}%
- \else
- \ifnum\@tempa<20
- \@tempcnta\@pageat\relax
- \ifnum\@tempcnta>2
- \advance\@tempcnta by -3
- \fi
- \ifnum\@tempa=11
- \advance\@tempcnta by 3
- \fi
- \edef\@tempa{\endgroup\edef\noexpand\@pageat{\the\@tempcnta}}%
- \else
- \ifnum\@pageat>2
- \edef\@pageat{3}%
- \else
- \edef\@pageat{0}%
- \fi
- \@tempcnta\@tempa
- \advance\@tempcnta by -20
- \advance\@tempcnta by\@pageat
- \edef\@tempa{\endgroup\edef\noexpand\@pageat{\the\@tempcnta}}%
- \fi
- \fi
- \else
- \def\@tempa{\endgroup\FamilyKeyStateUnknownValue}%
- \fi
- \@tempa
- \KOMA@kav@xreplacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{pagenumber}{%
- \ifcase \@pageat
- topleft%
- \or
- topmiddle%
- \or
- topright%
- \or
- botleft%
- \or
- botmiddle%
- \or
- botright%
- \else
- false%
- \fi
- }%
-}
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{pagenumber}{botmiddle}
-%</option>
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-%
-% \subsection{Commands and macros of the letter head}
-%
-% \begin{variable}{firsthead}
-% \changes{v2.8q}{2002/01/28}{\cs{@alignfrom} set to 10000}
-% \changes{v3.08}{2010/10/28}{added}
-% \changes{v3.13b}{2014/10/04}{\emph{hook} for \file{DINmtext.lco} added}
-% \changes{v3.27}{2019/04/02}{\emph{hook} removed}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% The head of the notepaper is not set by the page style but variable
-% \var{firsthead} inside \cs{opening}.
-% \begin{description}
-% \item[ToDo:] Change this at least for \pkg*{scrletter} to make the letter
-% head independent from \cs{opening}. With this \opt{fromalign} could
-% immediately re-define \var{firsthead} and also \cs{@gen@fisthead}
-% could become superfluously.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newkomavar{firsthead}
-\setkomavar{firsthead}{%
- \parbox[b]{\useplength{firstheadwidth}}%
- {\centering\usekomafont{fromaddress}{%
- \Ifkomavarempty{fromname}{}{%
- {\usekomafont{fromname}%
- {\ignorespaces\usekomavar{fromname}}\\[-8pt]}
- {\usekomafont{fromrule}{\rule{\useplength{firstheadwidth}}{.4pt}}}\\
- }%
- \Ifkomavarempty{fromaddress}{}{%
- \ignorespaces\usekomavar{fromaddress}%
- }%
- }%
- }%
-}
-% \end{macrocode}
-% \end{variable}
-% \begin{macro}{\scr@firsthead@postsetvar}
-% \changes{v3.08}{2010/10/28}{added}
-% \changes{v3.17}{2015/03/16}{internal setting of {fromalign\quotechar=false}}
-% After setting the variable \opt{fromalign} has to be set to manual
-% alignment. But this must not be done for the initialization.
-% \begin{macrocode}
-\newcommand*{\scr@firsthead@postsetvar}{%
- \KOMAExecuteOptions[.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- ]{fromalign=no}%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@firsthead@postsetvar
-% \begin{macro}{\@gen@firsthead}
-% \changes{v2.8q}{2002/01/28}{added}
-% \changes{v2.97c}{2007/05/08}{configurable thickness of the line}
-% \changes{v2.97c}{2007/05/08}{configurable font/color of the line}
-% \changes{v3.06a}{2010/07/29}{using font element \fnt{fromrule}}
-% \changes{v3.08}{2010/10/28}{the notepaper head is a variable}
-% \changes{v3.12}{2013/05/29}{using variable \var{frommobilephone}}
-% \begin{macrocode}
-\newcommand*{\@gen@firsthead}{%
-% \end{macrocode}
-% Re-defines the page head of the notepaper, if this has been activated by
-% option \opt{fromalign}.
-% \begin{macrocode}
- \ifcase\@alignfrom
-% \end{macrocode}
-% This is \cs{@alignfrom}=0 context, which means a left aligned sender's
-% address. This is done using a \cs{parbox} over the while text width.
-% \begin{macrocode}
- \setkomavar{firsthead}{%
- \parbox[b]{\textwidth}{\raggedright
-% \end{macrocode}
-% The name with the font element \fnt{fromname}.
-% \begin{macrocode}
- {\usekomafont{fromname}\strut\ignorespaces
- \usekomavar{fromname}%
-% \end{macrocode}
-% If \cs{@rulefrom}=1, a horizontal rule has to follow. The length is either
-% \plen{fromrulewidth} or, if \plen{fromrulewidth} is 0, it is
-% automatically calculated. Here we avoid a rule into the logo.
-% \begin{macrocode}
- {%
- \ifnum\@rulefrom=1\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\textwidth}%
- \if@logo
- \settowidth{\@tempdimb}{\usekomavar{fromlogo}}%
- \addtolength{\@tempdima}{-\@tempdimb}%
- \fi
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}}%
- \fi
- }%
- \\
- }%
-% \end{macrocode}
-% Next the senders' address with all optional fields, depending on the
-% corresponding switches. Once again we need a group because of the font
-% element \fnt{fromaddress} to be used.
-% \begin{macrocode}
- {\usekomafont{fromaddress}\strut\ignorespaces
- \usekomavar{fromaddress}%
- \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi%
- \if@mobilephone
- \\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}%
- \fi%
- \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi%
- \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi%
- \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi%
-% \end{macrocode}
-% If \cs{@rulefrom}=2, the horizontal rule has to be placed here. Once again
-% the length can be calculated automatically for \plen{fromrulewidth}=0.
-% \begin{macrocode}
- \ifnum\@rulefrom=2\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\textwidth}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}}%
- \fi
- \\
- }%
- }%
-% \end{macrocode}
-% This was the \cs{parbox}, but maybe we have to place the logo.
-% \begin{macrocode}
- \if@logo
- \llap{\usekomavar{fromlogo}}%
- \fi
- }%
- \renewcommand*{\@alignfrom}{0}%
- \or
-% \end{macrocode}
-% This is \cs{@alignfrom}=1 context, which means centered sender's
-% address. Here the logo needs special treatment: It is placed in the location
-% field.
-% \begin{macrocode}
- \setkomavar{firsthead}{%
- \parbox[b]{\textwidth}{\centering
- {\usekomafont{fromname}\strut\ignorespaces
- \usekomavar{fromname}%
- {%
- \ifnum\@rulefrom=1\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\textwidth}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}}%
- \fi
- }%
- \\
- }%
- {\usekomafont{fromaddress}\strut\ignorespaces
- \usekomavar{fromaddress}%
- \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi%
- \if@mobilephone
- \\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}%
- \fi%
- \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi%
- \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi%
- \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi%
- \ifnum\@rulefrom=2\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\textwidth}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}}%
- \fi
- \\
- }%
- }%
- }%
- \renewcommand*{\@alignfrom}{1}%
- \or
-% \end{macrocode}
-% This is \cs{@alignfrom}=2 context, which means right aligned sender's
-% address. This is almost the same as left aligned.
-% \begin{macrocode}
- \setkomavar{firsthead}{%
- \if@logo
- \rlap{\usekomavar{fromlogo}}%
- \fi
- \parbox[b]{\textwidth}{\raggedleft
- {\usekomafont{fromname}\strut\ignorespaces
- \usekomavar{fromname}%
- {%
- \ifnum\@rulefrom=1\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\textwidth}%
- \if@logo
- \settowidth{\@tempdimb}{\usekomavar{fromlogo}}%
- \addtolength{\@tempdima}{-\@tempdimb}%
- \fi
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}}%
- \fi
- }%
- \\
- }%
- {\usekomafont{fromaddress}\strut\ignorespaces
- \usekomavar{fromaddress}%
- \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi%
- \if@mobilephone
- \\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}%
- \fi%
- \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi%
- \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi%
- \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi%
- \ifnum\@rulefrom=2\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\textwidth}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}}%
- \fi
- \\
- }%
- }%
- }%
- \renewcommand*{\@alignfrom}{2}%
-% \end{macrocode}
-% All other values of \cs{@alignfrom} do not change anything.
-% \begin{macrocode}
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \@gen@firsthead
-%
-% \begin{command}{\firsthead}
-% \changes{v3.08}{2010/10/28}{deprecated}
-% \begin{macro}{\@firsthead}
-% \changes{v3.08}{2010/10/28}{deprecated}
-% \begin{macrocode}
-%<*class>
-\newcommand*{\@firsthead}{%
- \ClassWarning{scrlttr2}{%
- Deprecated usage of \string\@firsthead.\MessageBreak
- \string\usekomavar{firsthead} should be used\MessageBreak
- instead of \string\@firsthead
- }%
- \usekomavar{firsthead}%
-}
-\newcommand{\firsthead}{%
- \ClassWarning{scrlttr2}{%
- Deprecated usage of \string\firsthead.\MessageBreak
- You should use \string\setkomavar{firsthead}\MessageBreak
- instead of \string\firsthead
- }
- \setkomavar{firsthead}%
-}
-%</class>
-%</body>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \subsection{Fonts of the notepaper}
-%
-% \begin{fontelement}{foldmark}
-% \changes{v2.97c}{2007/05/08}{added}
-% The font or indeed the color of the fold marks.
-% \begin{macrocode}
-%<*body>
-\newkomafont{foldmark}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{fromname}
-% \changes{v2.95}{2006/03/23}{using \cs{newkomafont}}
-% The font of the sender's name in the letter head.
-% \begin{macrocode}
-\newkomafont{fromname}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{fromaddress}
-% \changes{v2.95}{2006/03/23}{using \cs{newkomafont}}
-% The font of the sender's address in the letter head.
-% \begin{macrocode}
-\newkomafont{fromaddress}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{fromrule}
-% \changes{v2.97c}{2007/05/08}{added}
-% The font or indeed the color of the horizontal rule above or below the
-% sender's address.
-% \begin{macrocode}
-\newkomafont{fromrule}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{backaddress}
-% \changes{v2.95}{2006/03/23}{using \cs{newkomafont}}
-% \changes{v3.21}{2016/05/19}{provides option
-% \opt{egregdoesnotlikesansseriftitles}}
-% The font of the return address.
-% \begin{macrocode}
-\newkomafont{backaddress}{\@gr@gsffamily}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{specialmail}
-% \changes{v2.97c}{2007/07/06}{added}
-% The font of the special sending note.
-% \begin{macrocode}
-\newkomafont{specialmail}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{priority}
-% \changes{v3.03}{2009/03/04}{added}
-% The font of the priority note of priority A or B. Here we don't use any lead
-% and sans-serif is a must, so \opt{egregdoesnotlikesansseriftitles} is ignored.
-% \texttt{egregdoesnotlikesansseriftitles} ignorieren.
-% \begin{macrocode}
-\newkomafont{priority}{\fontsize{10pt}{10pt}\sffamily\bfseries}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{prioritykey}
-% \changes{v3.03}{2009/03/04}{added}
-% The font of the letter of priority A or B. It is used after
-% \fnt{priority}. Generally this should be 9\,mm, but this would need a free
-% scalable font. With 24.88\,pt we are only 0.25\,mm to low. This should not
-% be a problem and does also work with Computer Modern. Once again we do not
-% use any lead.
-% \begin{macrocode}
-\newkomafont{prioritykey}{\fontsize{24.88pt}{24.88pt}\selectfont}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{PPlogo}
-% \changes{v3.03}{2009/03/04}{added}
-% The font of the ``\texttt{P.P.}'' logo, with \opt{addrfield=PP}. Once again
-% sans-serif is a must, so \opt{egregdoesnotlikesansseriftitles} is ignored.
-% \begin{macrocode}
-\newkomafont{PPlogo}{\sffamily\bfseries}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{PPdata}
-% \changes{v3.03}{2009/03/04}{added}
-% The font to be used inside the PP head. Once again sans-serif is a must, so
-% \opt{egregdoesnotlikesansseriftitles} is ignored.
-% \begin{macrocode}
-\newkomafont{PPdata}{\sffamily}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{addressee}
-% \changes{v2.97c}{2007/07/06}{added}
-% The font to be used for the whole addressee.
-% \begin{macrocode}
-\newkomafont{addressee}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{toname}
-% \changes{v2.97c}{2007/07/06}{added}
-% The font used only for the name of the addressee in difference to
-% \fnt{addressee}.
-% \begin{macrocode}
-\newkomafont{toname}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{toaddress}
-% \changes{v2.97c}{2007/07/06}{added}
-% The font used only for the address of the addressee in difference to
-% \fnt{addressee}.
-% \begin{macrocode}
-\newkomafont{toaddress}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{refname}
-% \changes{v2.97c}{2007/05/14}{added}
-% \changes{v3.21}{2016/05/19}{support of \opt{egregdoesnotlikesansseriftitles}}
-% The font for the field names of the reference line.
-% \begin{macrocode}
-\newkomafont{refname}{\@gr@gsffamily\scriptsize}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{refvalue}
-% \changes{v2.97c}{2007/05/14}{added}
-% \changes{v2.97d}{2007/10/09}{initial value changed}
-% The font of the field values of the reference line.
-% Support for \opt{egregdoesnotlikesansseriftitles} is not needed on
-% compatibility mode, because the option did not exist in version 2.97.
-% \begin{macrocode}
-%<*class>
-\ifnum\scr@compatibility=\@nameuse{scr@v@2.97}\relax
- \newkomafont{refvalue}{\sffamily\scriptsize}
-\else
-%</class>
- \newkomafont{refvalue}{}
-%<class>\fi
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{placeanddate}
-% \changes{v3.12}{2013/07/31}{added}
-% The font is used for place and date, if not real reference line but only
-% place and date are used.
-% \begin{macrocode}
-\newkomafont{placeanddate}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{lettertitle}
-% \changes{v3.17}{2015/02/21}{replacement of \fnt{letter}}
-% \changes{v3.21}{2016/05/19}{support for \opt{egregdoesnotlikesansseriftitles}}
-% The font of the title of the letter.
-% \begin{macrocode}
-\newkomafont{lettertitle}{\normalcolor\@gr@gsffamily\bfseries}
-% \end{macrocode}
-% \begin{fontelement}{title}
-% \changes{v2.95}{2006/03/23}{using \cs{newkomafont}}
-% \changes{v3.17}{2015/02/21}{only an alias}
-% \changes{v3.17a}{2015/04/26}{alias fixed}
-% \begin{macrocode}
-%<package>\scr@ifundefinedorrelax{scr@fnt@title}{%
- \aliaskomafont{title}{lettertitle}%
-%<package>}{}
-% \end{macrocode}
-% \end{fontelement}
-% \end{fontelement}
-%
-% \begin{fontelement}{lettersubject}
-% \changes{v3.17}{2015/02/21}{replacement of \texttt{subject}}
-% \changes{v3.17a}{2015/04/26}{alias fixed}
-% The font of the subject of the letter.
-% \begin{macrocode}
-\newkomafont{lettersubject}{\normalfont\bfseries}
-% \end{macrocode}
-% \begin{fontelement}{subject}
-% \changes{v2.95}{2006/03/23}{using \cs{newkomafont}}
-% \changes{v3.17}{2015/02/21}{only an alias}
-% \begin{macrocode}
-%<package>\scr@ifundefinedorrelax{scr@fnt@subject}{%
- \aliaskomafont{subject}{lettersubject}%
-%<package>}{}
-%</body>
-% \end{macrocode}
-% \end{fontelement}
-% \end{fontelement}
-%
-% \subsection{Pseudo lengths of the notepaper}
-%
-% \begin{pseudolength}{foldmarkhpos}
-% \changes{v2.8q}{2001/10/06}{added}
-% Distance of the horizontal fold marks to the left edge of the paper.
-% \begin{macrocode}
-%<*body>
-\newplength{foldmarkhpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{foldmarkvpos}
-% \changes{v2.97e}{2007/11/10}{added}
-% Distance of the vertical fold marks to the top edge of the paper.
-% \begin{macrocode}
-\newplength{foldmarkvpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{tfoldmarkvpos}
-% \changes{v2.8q}{2001/10/06}{added}
-% Distance of the top of the horizontal fold marks to the top edge of the
-% paper.
-% \begin{macrocode}
-\newplength{tfoldmarkvpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{mfoldmarkvpos}
-% \changes{v2.97e}{2007/11/08}{added}
-% Distance of the middle horizontal fold mark (which is not the bunch
-% hole fold mark) to the top edge of the paper.
-% \begin{macrocode}
-\newplength{mfoldmarkvpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{bfoldmarkvpos}
-% \changes{v2.8q}{2001/10/06}{added}
-% Distance of the lower horizontal fold mark to the top edge of the paper.
-% \begin{macrocode}
-\newplength{bfoldmarkvpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{lfoldmarkhpos}
-% \changes{v2.97e}{2007/11/10}{added}
-% Distance of the left (and only) vertical fold mark to the left edge of the
-% paper.
-% \begin{macrocode}
-\newplength{lfoldmarkhpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{pfoldmarklength,hfoldmarklength,mfoldmarklength,
-% bfoldmarklength,lfoldmarklength}
-% \changes{v2.97e}{2001/11/10}{added}
-% The lengths of all fold marks.
-% \begin{macrocode}
-\newplength{pfoldmarklength}
-\newplength{tfoldmarklength}
-\newplength{mfoldmarklength}
-\newplength{bfoldmarklength}
-\newplength{lfoldmarklength}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{foldmarkthickness}
-% \changes{v2.97c}{2007/05/08}{added}
-% One length for the thickness/weight of all fold marks.
-% \begin{macrocode}
-\newplength{foldmarkthickness}
-\setplength{foldmarkthickness}{.2pt}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{toaddrvpos}
-% \changes{v2.8q}{2001/10/06}{added}
-% Distance of the address field of the addressee from the top edge of the
-% paper.
-% \begin{macrocode}
-\newplength{toaddrvpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{backaddrheight}
-% \changes{v2.8q}{2001/10/06}{added}
-% Height reserved for the return address inside the address field of the
-% addressee.
-% \begin{macrocode}
-\newplength{backaddrheight}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{toaddrhpos}
-% \changes{v2.8q}{2001/10/06}{added}
-% If positive the distance of the left of the address field of the addressee
-% to the left edge of the paper. Otherwise the (negative) distance of the
-% addressee from the right of the address field of the addressee to the right
-% edge of the paper.
-% \begin{macrocode}
-\newplength{toaddrhpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{specialmailindent}
-% \changes{v2.8q}{2002/03/25}{added}
-% Distance of the special sending note from the left edge of the address field
-% of the addressee.
-% \begin{macrocode}
-\newplength{specialmailindent}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{specialmailrightindent}
-% \changes{v2.8q}{2002/03/25}{added}
-% Distance of the special sending not from the right edge of the address field
-% of the addressee.
-% \begin{macrocode}
-\newplength{specialmailrightindent}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{toaddrindent}
-% \changes{v2.8q}{2001/10/06}{added}
-% Distance of the name and address of the addressee from the left edge of the
-% address field of the addressee. With \opt{addrfield=PP} 0 is interpreted as
-% 8\,mm, because of the international norm. Additionally the value is also
-% used for the distance on the right side. In all other modes 0 is really 0.
-% \begin{macrocode}
-\newplength{toaddrindent}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{PPheadheight}
-% \changes{v3.03}{2009/03/04}{added}
-% The height of the PP head with \opt{addrfield=PP},
-% \opt{addrfield=backgroundimage} or \opt{addrfield=image}. 0 means 20.74\,pt
-% here.
-% \begin{macrocode}
-\newplength{PPheadheight}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{PPheadwidth}
-% \changes{v3.03}{2009/03/04}{added}
-% The width of the PP head with \opt{addrfield=PP}. 0 means 42\,mm here.
-% \begin{macrocode}
-\newplength{PPheadwidth}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{PPdatamatrixvskip}
-% \changes{v3.03}{2009/03/04}{added}
-% Distance between the PP head and the data matrix with \opt{addrfield=PP}. 0
-% means 9\,mm.
-% \begin{macrocode}
-\newplength{PPdatamatrixvskip}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{toaddrwidth}
-% \changes{v2.8q}{2001/10/06}{added}
-% Width of the address field of the addressee.
-% \begin{macrocode}
-\newplength{toaddrwidth}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{toaddrheight}
-% \changes{v2.8q}{2001/10/06}{added}
-% \changes{v3.03b}{2009/06/25}{implemented like documented}
-% Height of the address field inclusive return address.
-% \begin{macrocode}
-\newplength{toaddrheight}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{locvpos}
-% \changes{v2.97e}{2007/11/07}{added}
-% Distance of the location field from the top edge of the paper.
-% \begin{macrocode}
-\newplength{locvpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{locwidth}
-% \changes{v2.8q}{2001/10/06}{added}
-% Width of the location field.
-% \begin{macrocode}
-\newplength{locwidth}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{lochpos}
-% \changes{v2.97e}{2007/11/07}{added}
-% For positive values, the distance of the left of the location field to the
-% left edge of the paper. For negative values the (negative) distance of the
-% right of the location field to the right edge of the paper.
-% \begin{macrocode}
-\newplength{lochpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{locheight}
-% \changes{v2.97e}{2007/11/07}{added}
-% The height of the location field.
-% \begin{macrocode}
-\newplength{locheight}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{refvpos}
-% \changes{v2.8q}{2001/10/06}{added}
-% The distance of the reference line from the top edge of the paper.
-% \begin{macrocode}
-\newplength{refvpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{refheight}
-% \changes{v3.27}{2019/05/03}{new}
-% The height of the reference line, if it is used.
-% \begin{macrocode}
-%<*package&willbe>
-\newplength{refheight}
-%</package&willbe>
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{refwidth}
-% \changes{v2.8q}{2001/10/06}{added}
-% The width of the reference line.
-% \begin{macrocode}
-\newplength{refwidth}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{refhpos}
-% \changes{v2.9l}{2003/01/28}{added}
-% The horizontal position of the reference line.
-% \begin{macrocode}
-\newplength{refhpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{refaftervskip}
-% \changes{v2.8q}{2001/10/09}{added}
-% The vertical distance below the reference line.
-% \begin{macrocode}
-\newplength{refaftervskip}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{sigbeforevskip}
-% \changes{v2.8q}{2001/10/09}{added}
-% The vertical distance between the closing text and the signature text, to be
-% used for the hand-written signature.
-% \begin{macrocode}
-\newplength{sigbeforevskip}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{sigindent}
-% \changes{v2.8q}{2001/10/06}{added}
-% Horizontal indent of the closing text and the signature.
-% \begin{macrocode}
-\newplength{sigindent}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{firstfootvpos}
-% \changes{v2.8q}{2001/10/06}{added}
-% Distance of the letter footer (on the notepaper only) to the top edge of the
-% paper.
-% \begin{macrocode}
-\newplength{firstfootvpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{firstfootwidth}
-% \changes{v2.8q}{2001/10/06}{added}
-% Width of the letter footer (on the notepaper only).
-% \begin{macrocode}
-\newplength{firstfootwidth}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{firstfoothpos}
-% \changes{v3.05}{2009/11/09}{added}
-% Distance of the letter footer (on the notepaper only) to the left edge of
-% the paper. Note: See the \cs{opening} code for information about special
-% value \cs{maxdimen}.
-% \begin{macrocode}
-\newplength{firstfoothpos}
-\setplength{firstfoothpos}{\maxdimen}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{firstheadvspos}
-% \changes{v2.8q}{2001/10/06}{added}
-% Distance of the letter head (on the notepaper only) to the top edge of the
-% paper.
-% \begin{macrocode}
-\newplength{firstheadvpos}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{firstheadwidth}
-% \changes{v2.8q}{2001/10/06}{added}
-% Width of the letter head (on the notepaper only).
-% \begin{macrocode}
-\newplength{firstheadwidth}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{firstheadhpos}
-% \changes{v3.05}{2009/11/09}{added}
-% Distance of the letter head (on the notepaper only) to the left edge of
-% the paper. Note: See the \cs{opening} code for information about special
-% value \cs{maxdimen}.
-% \begin{macrocode}
-\newplength{firstheadhpos}
-\setplength{firstheadhpos}{\maxdimen}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{fromrulewidth}
-% \changes{v2.8q}{2002/01/28}{added}
-% The length of the optional horizontal rule above or below the address of the
-% sender. Value 0 means automatically calculated length.
-% \begin{macrocode}
-\newplength{fromrulewidth}
-\setplength{fromrulewidth}{0pt}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{fromrulethickness}
-% \changes{v2.97c}{2007/05/08}{added}
-% The thickness/weight of the optional horizontal rule above or below the
-% address of the sender.
-% \begin{macrocode}
-\newplength{fromrulethickness}
-\setplength{fromrulethickness}{.4pt}
-%</body>
-% \end{macrocode}
-% \end{pseudolength}
-%
-%
-% \subsection{The footer of the notepaper}
-%
-% \begin{variable}{firstfoot}
-% \changes{v3.08}{2010/10/28}{added}
-% Initially the value of the letter footer of the notepaper is empty. The user
-% manual shows, how to use it.
-% \begin{macrocode}
-%<*body>
-\newkomavar{firstfoot}
-% \end{macrocode}
-% \begin{command}{\firstfoot}
-% \changes{v3.08}{2010/10/28}{deprecated}
-% \begin{macro}{\@firstfoot}
-% \changes{v3.08}{2010/10/28}{deprecated}
-% \begin{macrocode}
-%<*class>
-\newcommand*{\@firstfoot}{%
- \ClassWarning{scrlttr2}{%
- Deprecated usage of \string\@firstfoot.\MessageBreak
- \string\usekomavar{firstfoot} should be used\MessageBreak
- instead of \string\@firstfoot
- }%
- \usekomavar{firstfoot}%
-}
-\newcommand{\firstfoot}{%
- \ClassWarning{scrlttr2}{%
- Deprecated usage of \string\firstfoot.\MessageBreak
- You should use \string\setkomavar{firstfoot}\MessageBreak
- instead of \string\firstfoot
- }
- \setkomavar{firstfoot}%
-}
-%</class>
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@firstfoot
-% \end{command}^^A \firstfoot
-% \end{variable}^^A firstfoot
-%
-%
-% \subsection{Output of the notepaper}
-%
-% \begin{description}
-% \item[Note:] There have been plans to move output of the notepaper to the
-% page style with \pkg*{scrletter}. You can find some experimental code for
-% this already here with tag \texttt{willbe}. But the plans have been
-% dropped, because there was not enough man power to design and implement it
-% all and to keep \KOMAScript{} compatible with \LaTeX{} at the same time.
-% \end{description}
-%
-% \begin{macro}{\scr@notepaper@printallelements}
-% \changes{v3.27}{2019/04/16}{added}
-% This is used by page style \pstyle{notepaper} (see
-% \file{scrkernel-pagestyle.dtx}) to print all elements.
-% \begin{macro}{\scr@notepaper@printelementsoflist}
-% \changes{v3.27}{2019/04/16}{added}
-% And this is used to print a given list of elements.
-% \begin{macro}{\scr@notepaper@printelement}
-% \changes{v3.27}{2019/04/16}{added}
-% Last but not least this prints one given element.
-% \begin{macrocode}
-%<*package&body&willbe>
-\newcommand*{\scr@notepaper@printallelements}{%
- \scr@notepaper@printelementsoflist\scr@notepaper@elements
-}
-\newcommand*{\scr@notepaper@printelementsoflist}[1]{%
- \expandafter\scr@ForEachTrimmedListElement\expandafter{#1}{%
- \scr@notepaper@printelement
- }%
-}
-\newcommand*{\scr@notepaper@printelement}[1]{%
- \@ifundefined{scr@notepaper@element@#1}{%
- \PackageWarning{scrletter}{%
- Unknown note paper element `#1'\MessageBreak
- will be ignored%
- }%
- }{%
- \@nameuse{scr@notepaper@element@#1}%
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@notepaper@printelement
-% \end{macro}^^A \scr@notepaper@printelementsoflist
-% \end{macro}^^A \scr@notepaper@printallelements
-%
-% \begin{macro}{\scr@foldmarks@printallelements}
-% \changes{v3.27}{2019/04/16}{new (internal)}
-% This is used by the page style \pstyle{notepaper} to print all fold marks.
-% \begin{macrocode}
-\newcommand*{\scr@foldmarks@printallelements}{%
- \if@fold
- \ifdim \useplength{pfoldmarklength}=\z@
- \setplength{pfoldmarklength}{4mm}%
- \fi
- \ifdim \useplength{tfoldmarklength}=\z@
- \setplength{tfoldmarklength}{2mm}%
- \fi
- \ifdim \useplength{mfoldmarklength}=\z@
- \setplength{mfoldmarklength}{2mm}%
- \fi
- \ifdim \useplength{bfoldmarklength}=\z@
- \setplength{bfoldmarklength}{2mm}%
- \fi
- \ifdim \useplength{lfoldmarklength}=\z@
- \setplength{lfoldmarklength}{4mm}%
- \fi
- \@hfoldmark{P}%
- \@hfoldmark{T}%
- \@hfoldmark{M}%
- \@hfoldmark{B}%
- \@vfoldmark{L}%
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\scr@notepaper@elements}
-% \changes{v3.27}{2019/03/22}{added}
-% This is a comma-separated list of elements (aka blocks) to be printed on the
-% notepaper. It is used by the page style layer \texttt{notepaper} to set all
-% elements (see \file{scrkernel-pagestyle.dtx}). There are exactly four
-% defaults (but you can add more):
-% \begin{macrocode}
-\newcommand*{\scr@notepaper@elements}{%
- firsthead,addressee,location,firstfoot,refline%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@notepaper@element@firsthead}
-% \changes{v3.27}{2019/03/22}{added}
-% How to print the notepaper element \texttt{firsthead}:
-% \begin{macrocode}
-\newcommand*{\scr@notepaper@element@firsthead}{%
- \if@firsthead
-% \end{macrocode}
-% The calculation of the real horizontal position could be done as part of the
-% layer contents or while selection of the layer or while initialization of
-% the layer. The in-contents code is used, so the layer can be used with
-% different page styles. The position depends on \plen{firstheadhpos} this
-% way:
-% \begin{itemize}
-% \item If \plen{firstheadhpos} is positive but less than the paper width,
-% \plen{firstheadhpos} is the distance if the head from the left edge.
-% \item If \plen{firstheadhpos} is negative but the absolute value is less
-% then the paper width, the absolute value of \plen{firstheadhpos} is the
-% distance from the right edge.
-% \item If \plen{firstheadhpos} is greater than the paper width, the head
-% will be centered.
-% \item If \plen{firstheadhpos} is less than the negative paper width, the
-% head will be left aligned to the text area.
-% \end{itemize}
-% \begin{macrocode}
- \ifdim\useplength{firstheadhpos}<\paperwidth
- \ifdim \useplength{firstheadhpos}>-\paperwidth
- \ifdim \useplength{firstheadhpos}<\z@
- \setlength{\@tempdima}{\dimexpr
- \paperwidth + \useplength{firstheadhpos}
- - \useplength{firstheadwidth}
- \relax}%
- \else
- \setlength{\@tempdima}{\useplength{firstheadhpos}}%
- \fi
- \else
- \setlength{\@tempdima}{\dimexpr\oddsidemargin + 1in\relax}%
- \fi
- \else
- \setlength{\@tempdima}{\dimexpr
- (\paperwidth-\useplength{firstheadwidth})/2
- \relax}%
- \fi
- \put@notepaper@element
- (\@tempdima,\useplength{firstheadvpos})%
- (\useplength{firstheadwidth},%
- \useplength{toaddrvpos}-\useplength{firstheadvpos})%
- {Element `firsthead'}{\usekomavar{firsthead}}\relax
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@notepaper@element@firsthead
-% \begin{macro}{\scr@notepaper@element@firstfoot}
-% \changes{v3.27}{2019/03/22}{added}
-% Element \texttt{firstfoot} is very similar to \texttt{firsthead}. The
-% differences are using of pseudo lengths for the foot instead the head and
-% the calculation of the available height.
-% \begin{macrocode}
-\newcommand*{\scr@notepaper@element@firstfoot}{%
- \if@firstfoot
- \ifdim\useplength{firstfoothpos}<\paperwidth
- \ifdim \useplength{firstfoothpos}>-\paperwidth
- \ifdim \useplength{firstfoothpos}<\z@
- \setlength{\@tempdima}{\dimexpr
- \paperwidth + \useplength{firstfoothpos}
- - \useplength{firstfootwidth}%
- \relax}%
- \else
- \setlength{\@tempdima}{\useplength{firstfoothpos}}%
- \fi
- \else
- \setlength{\@tempdima}{\dimexpr\oddsidemargin + 1in\relax}%
- \fi
- \else
- \setlength{\@tempdima}{\dimexpr
- (\paperwidth-\useplength{firstfootwidth})/2
- \relax}%
- \fi
- \put@notepaper@element
- (\@tempdima,\useplength{firstfootvpos})%
- (\useplength{firstfootwidth},
- \paperheight-\useplength{firstfootvpos})%
- {Element `firstfoot'}{\usekomavar{firstfoot}}\relax
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@notepaper@element@firstfoot
-% \begin{macro}{\scr@notepaper@element@addressee}
-% \changes{v3.27}{2019/03/22}{added}
-% Element \texttt{addressee} is very complex and therefore split into several
-% different sub-elements.
-% \begin{macrocode}
-\newcommand*{\scr@notepaper@element@addressee}{%
- \setlengthtoplength{\@tempdima}{toaddrhpos}%
- \ifdim \@tempdima<\z@
- \addtolength{\@tempdima}{%
- \dimexpr \paperwidth-\useplength{toaddrwidth}\relax
- }%
- \fi
- \put@notepaper@element(\@tempdima,\useplength{toaddrvpos})%
- (\useplength{toaddrwidth},\useplength{toaddrheight})%
- {address field}{%
- \setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative
- \ifcase \@afieldmode\relax
- \or
- \scr@notepaper@subelement@addressee@default
- \or
- \scr@notepaper@subelement@addressee@PP
- \or
- \scr@notepaper@subelement@addressee@PPbackgroundimage
- \or
- \scr@notepaper@subelement@addressee@image
- \else
- \scr@notepaper@subelement@addressee@default
- \fi
- }\relax
-}
-% \end{macrocode}
-% \begin{macro}{\scr@notepaper@subelement@addressee@default}
-% \changes{v3.27}{2019/03/22}{added}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by \cs{Ifkomavarempty}}
-% \changes{v3.30}{2020/03/27}{re-definition of line break moved}
-% The field with the recipience address. This should be used only on the first
-% page of a letter.
-% \begin{macrocode}
-\newcommand*{\scr@notepaper@subelement@addressee@default}{%
- \setbox\@tempboxa\vbox {%
- \hsize=\useplength{toaddrwidth}\linewidth=\hsize
- \color@begingroup
- \if@baddr
- \Ifkomavarempty{backaddress}{}{%
- \backaddr@format{\scriptsize
- {%
- \def\\{\usekomavar{backaddressseparator}\@ogobble}%
- \usekomafont{backaddress}%
- {\usekomavar{backaddress}}%
- }%
- }%
- }%
- \fi
- \color@endgroup
- }%
- \ifdim \dimexpr\ht\@tempboxa+\dp\@tempboxa>\useplength{backaddrheight}\relax
- \PackageWarning{scrletter}{Element `backaddress' to high.\MessageBreak
- The content of `backaddress' could exceed\MessageBreak
- the address field%
- }%
- \fi
- \vbox to \useplength{backaddrheight}{\vss\usebox\@tempboxa}%
- \ifcase \ltr@priority
- \or
- \setkomavar{specialmail}{%
- {\usekomafont{priority}{%
- {\usekomafont{prioritykey}{B}}%
- -ECONOMY}}%
- }%
- \or
- \setkomavar{specialmail}{%
- {\usekomafont{priority}{%
- {\usekomafont{prioritykey}{A}}%
- -PRIORITY}}%
- }%
- \fi
- \Ifkomavarempty{specialmail}{%
- \@tempdima=\z@
- }{%
- \setbox\@tempboxa\vbox{\hsize\useplength{toaddrwidth}%
- \color@begingroup
- \noindent\hspace*{\useplength{specialmailindent}}%
- \specialmail@format{%
- \usekomafont{specialmail}\usekomavar{specialmail}}%
- \hspace*{\useplength{specialmailrightindent}}%
- \color@endgroup
- }%
- \copy\@tempboxa
- \@tempdima=\dimexpr\ht\@tempboxa+\dp\@tempboxa\relax
- }%
- \setbox\@tempboxa\vbox{%
- \hsize\dimexpr \useplength{toaddrwidth}-2\useplength{toaddrindent}\relax
- \color@begingroup
- \raggedright
- \usekomafont{addressee}{%
-%<*package>
- \usekomavar{addressee}\par%
-%</package>
-%<class> {\usekomafont{toname}{\usekomavar{toname}\\}}%
-%<class> {\usekomafont{toaddress}{\usekomavar{toaddress}\par}}%
- }%
- \color@endgroup
- }%
- \ifnum\@afieldmode=\@ne
-% \end{macrocode}
-% In opposite to the class, the package rounds the distance to lines.
-% \begin{macrocode}
- \vskip \dimexpr ((\useplength{toaddrheight}-\useplength{backaddrheight}
- -\@tempdima -\ht\@tempboxa -\dp\@tempboxa
- -\ht\strutbox)/(2*\baselineskip))
- *\baselineskip\relax
- \fi
- \hskip\useplength{toaddrindent}%
- \usebox\@tempboxa
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@notepaper@subelement@addressee@default
-% \begin{macro}{\scr@notepaper@subelement@addressee@PP}
-% \changes{v3.27}{2019/03/22}{added}
-% \begin{macrocode}
-\newcommand*{\scr@notepaper@subelement@addressee@PP}{%
- \ifdim \useplength{toaddrindent}=\z@
- \setplength{toaddrindent}{8mm}%
- \fi
- \ifdim \useplength{PPheadheight}=\z@
- \setplength{PPheadheight}{20.74pt}%
- \fi
- \ifdim \useplength{PPheadwidth}=\z@
- \setplength{PPheadwidth}{42mm}%
- \fi
- \ifdim \useplength{PPdatamatrixvskip}=\z@
- \setplength{PPdatamatrixvskip}{3mm}%
- \fi
- \vskip 2pt\relax
- \hskip \useplength{toaddrindent}\relax
- \fbox{%
- \vbox to \dimexpr \useplength{PPheadheight}-2\fboxsep\relax{%
- \setlength{\parindent}{0pt}%
- \hsize \dimexpr \useplength{PPheadwidth}-2\fboxsep\relax
- \sbox\@tempboxa{%
- {\fontsize{20.74pt}{20.74pt}\selectfont
- \usekomafont{PPlogo}{P.P.}}\hskip 2mm%
- }%
- \dp\@tempboxa\z@
- \setlength{\@tempdima}{\hsize}%
- \addtolength{\@tempdima}{-\wd\@tempboxa}%
- \hbox{\box\@tempboxa
- \vbox to \dimexpr
- \useplength{PPheadheight}-2\fboxsep\relax{%
- \vss\hsize\@tempdima
- \raggedright
- \fontsize{8pt}{9pt}\selectfont\usekomafont{PPdata}%
- \usekomavar*{fromzipcode}\usekomavar{zipcodeseparator}%
- \usekomavar{fromzipcode}\scr@endstrut\\
- \usekomavar{place}\scr@endstrut
- \hfill
- }%
- }%
- \vss
- }%
- }%
- \hskip 1mm
- \mbox{%
- \vbox to \useplength{PPheadheight}{%
- \addtolengthplength[-]{\hsize}{PPheadwidth}%
- \addtolength{\hsize}{-1mm}%
- \addtolengthplength[-2]{\hsize}{toaddrindent}%
- \setlength{\parindent}{0pt}%
- \fontsize{8pt}{9pt}\selectfont\usekomafont{PPdata}%
- \hfill\usekomavar{PPcode}
- \vss
- \ifcase \ltr@priority
- \or
- \usekomafont{priority}{%
- {\usekomafont{prioritykey}{B}}%
- -ECONOMY\hss\vskip-\dp\strutbox
- }%
- \or
- \usekomafont{priority}{%
- {\usekomafont{prioritykey}{A}}%
- -PRIORITY\hss\vskip-\dp\strutbox
- }%
- \fi
- \vss
- }%
- }%
- \vskip 1mm
- \vskip-\ht\strutbox
- \noindent\hskip\useplength{toaddrindent}%
- \hrulefill%
- \hskip\useplength{toaddrindent}%
- \vbox to\z@{\hsize\z@
- \vskip \useplength{PPdatamatrixvskip}\relax
- \llap{\usekomavar{PPdatamatrix}\hskip\useplength{toaddrindent}}%
- \vss
- }%
- \vskip 3mm
- \noindent\hskip\useplength{toaddrindent}%
- \setlength{\@tempdima}{\useplength{toaddrwidth}}%
- \addtolengthplength[-2]{\@tempdima}{toaddrindent}%
- \vbox{\hsize\@tempdima
- \Ifkomavarempty{PPdatamatrix}{}{%
- \addtolength{\hsize}{-2mm}%
- \settowidth\@tempdima{\usekomavar{PPdatamatrix}}%
- \addtolength{\hsize}{-\@tempdima}%
- }%
- \raggedright
- \usekomafont{addressee}{%
-%<*package>
- \usekomavar{addressee}\par%
-%</package>
-%<class> {\usekomafont{toname}{\usekomavar{toname}\\}}%
-%<class> {\usekomafont{toaddress}{\usekomavar{toaddress}\par}}%
- }%
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@notepaper@subelement@addressee@PP
-% \begin{macro}{\scr@notepaper@subelement@addressee@PPimage}
-% \changes{v3.27}{2019/03/22}{added}
-% The PP image.
-% \begin{description}
-% \item[ToDo:] Needs to be tested!
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\scr@notepaper@subelement@addressee@PPimage}{%
- \ifdim \useplength{toaddrindent}=\z@
- \setplength{toaddrindent}{8mm}%
- \fi
- \vskip 1mm
- \noindent\expandafter\hskip\useplength{toaddrindent}%
- \vbox to \useplength{PPheadheight}{%
- \addtolengthplength[-2]{\hsize}{toaddrindent}%
- \setlength{\parindent}{0pt}%
- \usekomavar{addresseeimage}%
- \vss
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@notepaper@subelement@addressee@PPimage
-% \begin{macro}{\scr@notepaper@subelement@addressee@backgroundimage}
-% \changes{v3.27}{2019/03/22}{added}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% \begin{description}
-% \item[ToDo:] Needs to be tested!
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\scr@notepaper@subelement@addressee@backgroundimage}{%
- \vskip 1mm
- \noindent\expandafter\hskip\useplength{toaddrindent}%
- \vbox to \useplength{PPheadheight}{%
- \addtolengthplength[-2]{\hsize}{toaddrindent}%
- \setlength{\parindent}{0pt}%
- \usekomavar{addresseeimage}%
- \vss
- }%
- \vskip 1mm
- \vskip\dp\strutbox
- \vfil%
- \noindent\hskip\useplength{toaddrindent}%
- \setlength{\@tempdima}{\useplength{toaddrwidth}}%
- \addtolengthplength[-2]{\@tempdima}{toaddrindent}%
- \vbox{\hsize\@tempdima
- \Ifkomavarempty{PPdatamatrix}{}{%
- \addtolength{\hsize}{-2mm}%
- \settowidth\@tempdima{\usekomavar{PPdatamatrix}}%
- \addtolength{\hsize}{-\@tempdima}%
- }%
- \raggedright
- \usekomafont{addressee}{%
-%<*package>
- \usekomavar{addressee}\par%
-%</package>
-%<class> {\usekomafont{toname}{\usekomavar{toname}\\}}%
-%<class> {\usekomafont{toaddress}{\usekomavar{toaddress}\par}}%
- }%
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@notepaper@subelement@addressee@backgroundimage
-% \end{macro}^^A \scr@notepaper@element@addressee
-% \begin{macro}{\scr@notepaper@element@location}
-% \changes{v3.27}{2019/03/22}{added}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% The \texttt{location} element depends on several options.
-% \begin{macrocode}
-\newcommand*{\scr@notepaper@element@location}{%
-% \end{macrocode}
-% Depending on the alignment of the sender's address, the location field must
-% not be empty.
-% \begin{macrocode}
- \ifcase\@alignfrom
- \or
- \if@logo
- \Ifkomavarempty{location}{\setkomavar{location}{\null}}{}%
- \fi
- \or
- \or
- \Ifkomavarempty{location}{\setkomavar{location}{\null}}{}%
- \or
- \Ifkomavarempty{location}{\setkomavar{location}{\null}}{}%
- \fi
-% \end{macrocode}
-% Everything else only, if the field is not empty.
-% \begin{macrocode}
- \Ifkomavarempty{location}{}{%
-% \end{macrocode}
-% Calculation of height and vertical position.
-% \begin{macrocode}
- \ifdim \useplength{locheight}=\z@%
- \setplength{locheight}{\useplength{toaddrheight}}%
- \fi
- \ifdim \useplength{locvpos}=\z@%
- \setplength{locvpos}{\useplength{toaddrvpos}}%
- \fi
-% \end{macrocode}
-% Calculation of width and horizontal position.
-% \begin{macrocode}
- \ifdim \useplength{locwidth}=\z@%
- \setplength{locwidth}{\paperwidth}%
- \ifdim \useplength{toaddrhpos}>\z@
- \addtoplength[-2]{locwidth}{\useplength{toaddrhpos}}%
- \else
- \addtoplength[2]{locwidth}{\useplength{toaddrhpos}}%
- \fi
- \addtoplength[-1]{locwidth}{\useplength{toaddrwidth}}%
- \if@bigloc
- \setplength[.66667]{locwidth}{\useplength{locwidth}}%
- \else
- \setplength[.5]{locwidth}{\useplength{locwidth}}%
- \fi
- \fi
- \ifdim \useplength{lochpos}=\z@%
- \setplength{lochpos}{\useplength{toaddrhpos}}%
- \fi
- \ifdim \useplength{lochpos}<\z@
- \setlength{\@tempdima}{-\useplength{lochpos}}%
- \else
- \setlength{\@tempdima}{\dimexpr
- \paperwidth-\useplength{lochpos}-\useplength{locwidth}
- \relax}%
- \fi
- \put@notepaper@element(\@tempdima,\useplength{locvpos})%
- (\useplength{locwidth},\useplength{locheight})%
- {Element `location'}%
- {%
-% \end{macrocode}
-% Depending on the alignment of the sender's address, output of the logo and
-% maybe also the address.
-% \begin{macrocode}
- \ifcase\@alignfrom
- \or
- \if@logo
- \Ifkomavarempty{fromlogo}{\null}{%
- {\raggedleft\noindent\usekomavar{fromlogo}\\
- \vskip\parskip}\noindent}%
- \fi
- \or
- \or
- \if@logo
- \Ifkomavarempty{fromlogo}{}{%
- \raggedleft\usekomavar{fromlogo}\par}%
- \fi
- \raggedright
- {\usekomafont{fromname}\strut\ignorespaces
- \usekomavar{fromname}%
- {%
- \ifnum\@rulefrom=1\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\useplength{locwidth}}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}%
- }%
- \fi
- }%
- \\
- }%
- {\usekomafont{fromaddress}\strut\ignorespaces
- \usekomavar{fromaddress}%
- \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi%
- \if@mobilephone
- \\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}%
- \fi%
- \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi%
- \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi%
- \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi%
- \ifnum\@rulefrom=2\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\useplength{locwidth}}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}}%
- \fi
- \\
- }%
- \or
- \raggedleft
- \if@logo
- \Ifkomavarempty{fromlogo}{}{\usekomavar{fromlogo}\par}%
- \fi
- {\usekomafont{fromname}\strut\ignorespaces
- \usekomavar{fromname}%
- {%
- \ifnum\@rulefrom=1\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\useplength{locwidth}}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}%
- }%
- \fi
- }%
- \\
- }%
- {\usekomafont{fromaddress}\strut\ignorespaces
- \usekomavar{fromaddress}%
- \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi%
- \if@mobilephone%
- \\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}%
- \fi%
- \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi%
- \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi%
- \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi%
- \ifnum\@rulefrom=2\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\useplength{locwidth}}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}}%
- \fi
- \\
- }%
-% \end{macrocode}
-% Last but not least the location information.
-% \begin{macrocode}
- \fi
- \usekomavar{location}%
- }\relax
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@notepaper@element@location
-% \begin{macro}{\scr@notepaper@element@refline}
-% \changes{v3.27}{2019/05/03}{added}
-% This notepaper element replaces the \cs{@datefield} of
-% \cls*{scrlttr2}. In opposite to \cls*{scrlttr2} this element has a
-% dedicated height \texttt{reflineheight}.
-% \begin{description}
-% \item[ToDo:] Needs to be tested.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\scr@notepaper@element@refline}{%
-% \end{macrocode}
-% First of all test, whether or not their has to be set anything.
-% \begin{macrocode}
- \@tempswafalse
- \if@refline
- \let\do@set@reffield\@test@reffield
-%<trace> \let\@tempa\@empty
- \@set@reffields
-% \end{macrocode}
-% Maybe we have to add the date:
-% \begin{macrocode}
- \ifcase \@datepos
- \or
- \if@tempswa\addtoreffields{date}\fi
- \expandafter\let\csname if@refline\expandafter\endcsname
- \csname if@tempswa\endcsname
- \@test@reffield{date}%
- \or
- \if@tempswa
- \edef\expandafter\@set@reffields{%
- \unexpanded{\do@set@reffield{date}}%
- \unexpanded\expandafter{\@set@reffields}%
- }%
- \fi
- \expandafter\let\csname if@refline\expandafter\endcsname
- \csname if@tempswa\endcsname
- \@test@reffield{date}%
- \fi
- \fi
- \if@tempswa
-% \end{macrocode}
-% We have to print something, so let's calculate the position and height.
-% \begin{macrocode}
- \ifdim\useplength{refwidth}=\z@
-%<trace> \typeout{TRACE: refwidth by option}%
- \if@refwide
-%<trace> \typeout{TRACE: refline=wide}%
- \ifdim \useplength{toaddrhpos}>\z@
- \setplength{refhpos}{\useplength{toaddrhpos}}%
- \else
- \setplength[-]{refhpos}{\useplength{toaddrhpos}}%
- \fi
- \setplength{refwidth}{\paperwidth -2\useplength{refhpos}}%
- \else
-%<trace> \typeout{TRACE: refline=narrow}%
- \setplength{refwidth}{\textwidth}%
- \setplength{refhpos}{\oddsidemargin+1in}%
- \fi
- \else
-%<trace> \typeout{TRACE: refwidth by pseudo-length}%
- \ifdim\useplength{refhpos}=\z@
- \setlength{\@tempdima}{\dimexpr
- \textwidth-\useplength{refwidth}
- \relax}%
- \setlength{\@tempdimb}{\dimexpr \oddsidemarin+1in\relax}%
- \setlength{\@tempdimc}{\dimexpr \paperwidth-\textwidth\relax}%
- \divide\@tempdimb by 32768\relax
- \divide\@tempdimc by 32768\relax
- \ifdim\@tempdimc=\z@\else
- \multiply\@tempdima by\@tempdimb
- \divide\@tempdima by\@tempdimc
- \fi
- \setplength{refhpos}{\@tempdima}%
- \fi
- \fi
-%<*trace>
- \typeout{TRACE: Reference line with \@tempa^^J
- \space\space\space\space\space\space
- at refhpos=\the\useplength{refhpos},^^J
- \space\space\space\space\space\space\space\space\space
- refvpos=\the\useplength{refvpos},^^J
- \space\space\space\space\space\space\space\space\space
- refwidth=\the\useplength{refwidth},^^J
- \space\space\space\space\space\space\space\space\space
- refheight=\the\useplength{refheight}}%
-%</trace>
- \put@notepaper@element
- (\useplength{refhpos},\useplength{refvpos})%
- (\useplength{refwidth},\useplength{refheight})%
- {Element `refline'}%
- {%
-% \end{macrocode}
-% Last but not least print it.
-% \begin{macrocode}
- \if@refline
-% \end{macrocode}
-% Print a reference line.
-% \begin{macrocode}
- \let\do@set@reffield\@set@reffield\@tempswafalse\@set@reffields
- \else
-% \end{macrocode}
-% Print only place and date.
-% \begin{macrocode}
- \ifnum \@datepos=1 \hspace*{\fill}\fi
- {%
- \usekomafont{placeanddate}{%
- \Ifkomavarempty{place}{}{%
- \usekomavar{place}\usekomavar{placeseparator}%
- }%
- \usekomavar{date}%
- }%
- }%
- \fi
- }%
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@notepaper@element@refline
-% \end{macro}^^A \scr@notepaper@elements
-% \begin{macro}{\put@notepager@element}
-% \changes{v3.27}{2019/03/22}{added}
-% \begin{macro}{\put@@notepager@@element}
-% \changes{v3.27}{2019/05/03}{added}
-% A helper macro to output one element at a specific
-% position. \texttt{(\#1,\#2)} is the position, \texttt{(\#3,\#4)} the allowed
-% width and height, \texttt{\#5} is the name of the element (used for warning
-% messages only), \texttt{\#6} is the element content. The content is first
-% put into a temporary box of type \texttt{vtop}. Optional code can be
-% executed immediately before testing the total height of this box
-% \cs{@tempboxa} and before using it.
-% \begin{macrocode}
-\newcommand{\put@notepaper@element}{}
-\long\def\put@notepaper@element(#1,#2)(#3,#4)#5#6{%
- \kernel@ifnextchar [%]
- {\put@@notepaper@@element({#1},{#2})({#3},{#4}){#5}{#6}}%
- {\put@@notepaper@@element({#1},{#2})({#3},{#4}){#5}{#6}[]}%
-}
-\newcommand{\put@@notepaper@@element}{}
-\long\def\put@@notepaper@@element(#1,#2)(#3,#4)#5#6[#7]{%
- \put(\LenToUnit{\dimexpr #1\relax},\LenToUnit{-\dimexpr #2\relax}){%
- \setbox\@tempboxa \vtop{%
- \color@begingroup
- \vskip \z@
- \hsize=\dimexpr #3\relax
- \linewidth=\hsize
- \columnwidth=\linewidth
- \textwidth=\columnwidth
- \parfillskip=\z@ \@plus 1fil\relax
- #6
- \color@endgroup
- }%
- #7%
- \ifdim \dimexpr\ht\@tempboxa+\dp\@tempboxa\relax > \dimexpr #4\relax
- \PackageWarning{scrletter}{#5
- \the\dimexpr \ht\@tempboxa+\dp\@tempboxa-(#4)\relax\space
- to high.\MessageBreak
- The content could collide with other page contents\MessageBreak
- or break the page edges. You should reduce the\MessageBreak
- size before usage%
- }%
- \fi
- \usebox\@tempboxa
- }%
-}
-%</package&body&willbe>
-% \end{macrocode}
-% \end{macro}^^A \put@@notepaper@@element
-% \end{macro}^^A \put@notepaper@element
-%
-% \begin{macro}{\move@topt}
-% \changes{v2.8n}{2001/09/07}{added}
-% We will need a helper to place an element relative to the top paper
-% edge. So we have to move from the start of the text area to the start of an
-% absolute position on the paper. This does only work, if the current position
-% is the start of the text area!
-% \begin{macrocode}
-%<*body>
-\newcommand*{\move@topt}{%
- \null\vskip -1in\vskip -\topmargin%
- \vskip -\headheight\vskip -\headsep%
- \vskip -\topskip%
- \ignorespaces%
-}
-% \end{macrocode}
-% \begin{macro}{\move@frompt}
-% \changes{v2.8n}{2001/09/07}{added}
-% And also we need to move back from the absolute paper position to the start
-% of the text area. This does only work, if the absolute paper position is
-% unchanged.
-% \begin{macrocode}
-\newcommand*{\move@frompt}{%
- \vskip 1in\vskip \topmargin%
- \vskip \headheight\vskip \headsep%
- \vskip \topskip%
- \vskip -\baselineskip%
- \ignorespaces%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\move@topl,\move@frompl}
-% \changes{v2.8n}{2001/09/07}{added}
-% We need the same for the horizontal position.
-% \begin{macrocode}
-\newcommand*{\move@topl}{%
- \null\hskip -1in%
- \ifodd\value{page}\hskip -\oddsidemargin\else\hskip -\evensidemargin\fi
- \ignorespaces%
-}
-\newcommand*{\move@frompl}{%
- \hskip 1in%
- \ifodd\value{page}\hskip \oddsidemargin\else\hskip \evensidemargin\fi%
- \ignorespaces%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\vb@t@z}
-% \changes{v2.8n}{2001/09/07}{added}
-% \changes{v2.95}{2006/03/23}{using \cs{setparsizes}}
-% \changes{v2.97e}{2007/11/20}{\cs{long}}
-% This is similar to \cs{smash}.
-% \begin{description}
-% \item[ToDo:] Should we use \cs{smash} inside the definition?
-% \end{description}
-% \begin{macrocode}
-\newcommand{\vb@t@z}[1]{{%
- \setbox\z@\vbox to\z@{\color@begingroup #1\color@endgroup\vss}%
- \setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative
- \setlength{\baselineskip}{\z@}%
- \setlength{\@tempdima}{\ht0}\addtolength{\@tempdima}{\dp0}%
- \box\z@\vskip-\@tempdima%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@foldmarks}
-% \changes{v2.97e}{2007/11/08}{using \plen{mfoldmarkvpos}}
-% \begin{macro}{\@hfoldmark}
-% \changes{v2.97e}{2007/11/08}{added}
-% \begin{macro}{\@foldmark}
-% \changes{v2.8n}{2001/09/07}{added}
-% \changes{v2.95}{2006/06/06}{\cs{vskip} moved into \cs{vb@t@z}}
-% \changes{v2.97c}{2007/05/08}{using \plen{foldmarkthickness}}
-% \changes{v2.97c}{2007/05/08}{using \fnt{foldmark}}
-% \changes{v3.27}{2019/03/29}{different versions for package and class}
-% Used to place all activated fold marks, either a horizontal one or a
-% vertical one.
-% \begin{description}
-% \item[ToDo:] The plans explained in the into of this section would have
-% consequences here too.
-% \end{description}
-% For the still used version the parameters oft a horizontal fold mark are the
-% vertical distance from the top edge an the length. The parameters of a
-% vertical fold mark are the horizontal distance from the left edge and the
-% length.
-% \begin{macrocode}
-%<*class|!willbe>
-\newcommand*{\@foldmark}[2]{%
- \vb@t@z{\setlength{\@tempdima}{#1}%
- \addtolengthplength[-.5]{\@tempdima}{foldmarkthickness}%
- \vskip \@tempdima
- \rlap{\move@topl\hskip\useplength{foldmarkhpos}%
- \usekomafont{foldmark}{%
- \rule{#2}{\useplength{foldmarkthickness}}}}}%
- \ignorespaces
-}
-%</class|!willbe>
-% \end{macrocode}
-% The planned package version uses \cs{put} to set the marks. It has a
-% position, a direction and a length, so it can handle the horizontal and the
-% vertical foldmarks.
-% \begin{macrocode}
-%<*package&willbe>
-\newcommand*{\@foldmark}{}
-\def\@foldmark(#1,#2)(#3,#4)#5{%
- \put(\LenToUnit{#1},-\LenToUnit{#2}){%
- \linethickness{\useplength{foldmarkthickness}}%
- \line(#3,-#4){\LenToUnit{#5}}%
- }%
-}
-%</package&willbe>
-\newcommand*{\@hfoldmark}[1]{%
- \begingroup
- \@expandtwoargs\in@{#1}{\@usefolds}%
- \ifin@
- \lowercase{%
- \edef\@tempa{%
-%<*class|!willbe>
- \noexpand\ifdim \noexpand\useplength{#1foldmarkvpos}=\noexpand\z@
- \noexpand\else
- \noexpand\@foldmark{%
- \noexpand\useplength{#1foldmarkvpos}%
- }{%
- \noexpand\useplength{#1foldmarklength}%
- }%
- \noexpand\fi
-%</class|!willbe>
-% \end{macrocode}
-% \changes{v3.27}{2019/03/29}{different handling of the package version}
-% The planned package version of \cs{@foldmark} has a new direction argument,
-% because it handles horizontal and vertical foldmarks. And if there is not a
-% pseudo-length for the vertical possition of the horizontal fold-mark the
-% possition is half of the paper height. This is for the ``P''-mark.
-% \begin{macrocode}
-%<*package&willbe>
- \Ifplength{#1foldmarkvpos}{%
- \ifdim \useplength{#1foldmarkvpos}=\z@\else
- \noexpand\@foldmark(\noexpand\useplength{foldmarkhpos},%
- \noexpand\useplength{#1foldmarkvpos})%
- (1,0)%
- {%
- \noexpand\useplength{#1foldmarklength}%
- }%
- \fi
- }{%
- \noexpand\@foldmark(\noexpand\useplength{foldmarkhpos},%
- .5\noexpand\paperheight)%
- (1,0)%
- {%
- \noexpand\useplength{#1foldmarklength}%
- }%
- }%
-%</package&willbe>
- }%
- }%
- \@tempa
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\@vfoldmark}
-% \changes{v2.97e}{2007/11/10}{added}
-% The rule is printed completely above the baseline, so the length has to
-% be added to the vertical movement.
-% \begin{macrocode}
-\newcommand*{\@vfoldmark}[1]{%
- \begingroup
- \ifdim \useplength{lfoldmarkhpos}=\z@\else
- \@expandtwoargs\in@{#1}{\@usefolds}%
- \ifin@
-% \end{macrocode}
-% \changes{v3.27}{2019/03/29}{package version uses \cs{@foldmark}}
-% The currently used version does still work using \cs{rule}.
-% \begin{macrocode}
-%<*class|willbe>
- \vb@t@z{%
- \ifdim \useplength{foldmarkvpos}<\z@
- \nobreak\vskip \paperheight\nobreak
- \fi
- \vskip \useplength{foldmarkvpos}%
- \vskip \useplength{foldmarkthickness}%
- \rlap{\move@topl
- \setlength{\@tempdima}{\useplength{lfoldmarkhpos}}%
- \addtolengthplength[-.5]{\@tempdima}{foldmarkthickness}%
- \hskip\@tempdima
- \usekomafont{foldmark}{%
- \rule{\useplength{foldmarkthickness}}%
- {\useplength{lfoldmarklength}}%
- }%
- }%
- }%
- \ignorespaces
-%</class|willbe>
-% \end{macrocode}
-% But the planned package version uses \cs{@foldmark}.
-% \begin{macrocode}
-%<*package&willbe>
- \@foldmark(\useplength{lfoldmarkhpos},\useplength{foldmarkvpos})%
- (0,1)%
- {\useplength{lfoldmarklength}}%
-%</package&willbe>
- \fi
- \fi
- \endgroup
-}
-% \end{macrocode}
-% The main foldmark command is only needed by the current version.
-% \begin{macrocode}
-%<*class|!willbe>
-\newcommand*{\@foldmarks}{%
- \if@fold%
- \typeout{Foldmarks: yes}%
- \move@topt
- \ifdim \useplength{pfoldmarklength}=\z@
- \setplength{pfoldmarklength}{4mm}%
- \fi
- \ifdim \useplength{tfoldmarklength}=\z@
- \setplength{tfoldmarklength}{2mm}%
- \fi
- \ifdim \useplength{mfoldmarklength}=\z@
- \setplength{mfoldmarklength}{2mm}%
- \fi
- \ifdim \useplength{bfoldmarklength}=\z@
- \setplength{bfoldmarklength}{2mm}%
- \fi
- \ifdim \useplength{lfoldmarklength}=\z@
- \setplength{lfoldmarklength}{4mm}%
- \fi
- \begingroup
- \@expandtwoargs\in@{P}{\@usefolds}%
- \ifin@
- \@foldmark{.5\paperheight}{\useplength{pfoldmarklength}}%
- \fi
- \endgroup
- \@hfoldmark{T}%
- \@hfoldmark{M}%
- \@hfoldmark{B}%
- \@vfoldmark{L}%
- \move@frompt
- \else
- \typeout{Foldmarks: no}%
- \fi%
-}
-%</class|!willbe>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@savevbox}
-% \changes{v2.8n}{2001/09/07}{added}
-% \changes{v2.8q}{2001/10/30}{optional argument added}
-% \begin{macro}{\@savevbox@warningfalse,\@savevbox@warningtrue,\if@savevbox@warning}
-% \changes{v2.8q}{2001/10/30}{added}
-% A vertically overfull box while \cs{opening} is hard to find. So we use
-% \begin{quote}
-% \cs{@savevbox}\oarg{print code}\marg{nominal height}\marg{content}%
-% \marg{element name}\marg{height name}\marg{change code}
-% \end{quote}
-% to measure each of these boxes and report a warning with more information.
-% \begin{description}
-% \item[Note:] The \meta{print code} is not used to measure the box, but to
-% print it.
-% \item[Note:] The \meta{content} is used twice: first to measure the box and
-% second to print it. Currently no special treatment is implemented to avoid
-% problems using commands like \cs{label}, \cs{stepcounter} etc. inside
-% \meta{content}.
-% \end{description}
-% \begin{macrocode}
-\newif\if@savevbox@warning\@savevbox@warningtrue
-\newcommand{\@savevbox}[6][]{%
- \begingroup%
- \vbox to #2{#1#3}%
- \if@savevbox@warning\@savevbox@warningfalse%
- \setbox\z@\vbox{\color@begingroup #3\color@endgroup}%
- \setlength{\@tempdima}{#2}%
- \setlength{\@tempdimb}{\ht0}\addtolength{\@tempdimb}{\dp0}%
- \ifdim \@tempdimb>\@tempdima%
- \addtolength{\@tempdimb}{-\@tempdima}%
-%<class> \ClassWarning{scrlttr2}{%
-%<package> \PackageWarning{scrletter}{%
- #4 is \the\@tempdimb\space too high.\MessageBreak
- You have to change `\string#5'\MessageBreak
- or you have to define a smaller\MessageBreak
- #4 using \string#6.\MessageBreak
- Because of this too high #4\MessageBreak
- you've got an overfull \string\vbox\space message%
- }%
- \fi%
- \fi%
- \endgroup%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@firstheadfootfield}
-% \changes{v2.8n}{2001/09/08}{added}
-% \changes{v2.8q}{2001/10/30}{\cs{parfillskip} locally set to 0}
-% \changes{v2.8q}{2001/10/30}{use a box for the foot}
-% \changes{v2.9l}{2003/01/23}{improved positioning}
-% \changes{v2.97e}{2007/11/22}{support for options \opt{firsthead} and
-% \opt{firstfoot}}
-% \changes{v3.05}{2009/11/09}{using pseudo length \plen{firstheadhpos}}
-% \changes{v3.05}{2009/11/09}{using pseudo length \plen{firstfoothpos}}
-% The letter head of the notepaper.
-% \begin{description}
-% \item[ToDo:] \changes{v3.27}{2019/03/22}{planned code enlarges page} The
-% planned code of \pkg*{scrlayer} does not print the page head or foot
-% here. It only enlarges or shrinks the first page.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\@firstheadfootfield}{%
-%<*class|!willbe>
- \if@firsthead
- \typeout{Head of first page}%
- \move@topt\vskip\useplength{firstheadvpos}%
- \vb@t@z{%
- \rlap{\move@topl
-% \end{macrocode}
-% \begin{itemize}
-% \item If \plen{firstheadhpos} is positiv and less than the paper width, it
-% is the distance of the left paper edge to the left edge of the letter
-% head.
-% \item If \plen{firstheadhpos} is negative and the absolute value is less
-% than the paper width, the absolute value is the distance of the right
-% paper edge to the right edge of the letter head.
-% \item If \plen{firstheadhpos} is larger than the paper width, the letter
-% head will be centered.
-% \item If \plen{firstheadhpos} is negative an the absolute value is larger
-% than the paper width, the letter head will be left aligned to the text area.
-% \end{itemize}
-% \begin{macrocode}
- \ifdim\useplength{firstheadhpos}<\paperwidth
- \ifdim \useplength{firstheadhpos}>-\paperwidth
- \ifdim \useplength{firstheadhpos}<\z@
- \setlength\@tempskipa{\paperwidth}%
- \addtolengthplength{\@tempskipa}{firstheadhpos}%
- \addtolengthplength[-]{\@tempskipa}{firstheadwidth}%
- \else
- \setlength{\@tempskipa}{\useplength{firstheadhpos}}%
- \fi
- \else
- \setlength\@tempskipa{\oddsidemargin}%
- \addtolength\@tempskipa{1in}%
- \fi
- \else
- \setlength\@tempskipa{.5\paperwidth}%
- \addtolengthplength[-.5]{\@tempskipa}{firstheadwidth}%
- \fi
- \hskip\@tempskipa
- \vbox{\hsize\useplength{firstheadwidth}%
- \setlength{\@tempskipa}{\useplength{toaddrvpos}}%
- \addtolengthplength[-1]{\@tempskipa}{firstheadvpos}%
- \addtolength{\@tempskipa}{-\baselineskip}%
-% \end{macrocode}
-% Locally set \len{textwidth} to the width of the letter head (similar to
-% using a \env{minipage}. Also reset \len{parfillskip} to avoid overfull
-% \cs{hbox} messages because of filled text width.
-% \begin{macrocode}
- \setlength{\textwidth}{\useplength{firstheadwidth}}%
- \setlength{\parfillskip}{\z@ \@plus 1fil}%
- \@savevbox{\@tempskipa}{\noindent\usekomavar{firsthead}%
- \vskip \z@ \@plus .00001fil}%
- {head of first page}{firstheadvpos}{\setkomavar}%
- }%
- }%
- }%
- \vskip-\useplength{firstheadvpos}\move@frompt
- \else
- \typeout{No head at first page}%
- \fi
- \move@topt
- \if@firstfoot
- \typeout{Foot of first page}%
- \vb@t@z{%
- \rlap{\move@topl
-% \end{macrocode}
-% \begin{itemize}
-% \item If \plen{firstfoothpos} is positiv and less than the paper width, it
-% is the distance of the left paper edge to the left edge of the letter
-% footer.
-% \item If \plen{firstfoothpos} is negative and the absolute value is less
-% than the paper width, the absolute value is the distance of the right
-% paper edge to the right edge of the letter footer.
-% \item If \plen{firstfoothpos} is larger than the paper width, the letter
-% footer will be centered.
-% \item If \plen{firstfoothpos} is negative an the absolute value is larger
-% than the paper width, the letter footer will be left aligned to the text
-% area.
-% \end{itemize}
-% \begin{macrocode}
- \ifdim\useplength{firstfoothpos}<\paperwidth
- \ifdim \useplength{firstfoothpos}>-\paperwidth
- \ifdim \useplength{firstfoothpos}<\z@
- \setlength\@tempskipa{\paperwidth}%
- \addtolengthplength{\@tempskipa}{firstfoothpos}%
- \addtolengthplength[-]{\@tempskipa}{firstfootwidth}%
- \else
- \setlength{\@tempskipa}{\useplength{firstfoothpos}}%
- \fi
- \else
- \setlength\@tempskipa{\oddsidemargin}%
- \addtolength\@tempskipa{1in}%
- \fi
- \else
- \setlength\@tempskipa{.5\paperwidth}%
- \addtolengthplength[-.5]{\@tempskipa}{firstfootwidth}%
- \fi
- \hskip\@tempskipa
- \vbox{\hsize\useplength{firstfootwidth}%
- \vskip\useplength{firstfootvpos}%
- \setlength{\textwidth}{\useplength{firstfootwidth}}%
- \setlength{\parfillskip}{\z@ \@plus 1fil}%
- \vbox{\hsize\useplength{firstfootwidth}\noindent
- \usekomavar{firstfoot}}%
- }%
- }%
- }%
- \else
- \typeout{No foot at first page}%
- \fi
- \move@frompt%
-%</class|!willbe>
- {%
- \setlength{\@tempdima}{1in}\addtolength{\@tempdima}{\topmargin}%
- \addtolength{\@tempdima}{\headheight}%
- \addtolength{\@tempdima}{\headsep}%
- \addtolength{\@tempdima}{\textheight}%
- \addtolength{\@tempdima}{\footskip}%
- \if@firstfoot
- \addtolengthplength[-1]{\@tempdima}{firstfootvpos}%
- \else
- \addtolength{\@tempdima}{-\paperheight}%
- \fi
- \ifdim\@tempdima>\z@\enlargethispage{-\@tempdima}%
- \else\if@enlargefp\enlargethispage{-\@tempdima}\fi\fi
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@addrfield}
-% \changes{v2.8q}{2002/04/01}{\cs{parfillskip} locally changed}
-% \changes{v2.8q}{2002/06/03}{special treatment of addressee right aligend}
-% \changes{v2.9o}{2003/02/20}{\cs{noindent} added to \var{specialmail}}
-% \changes{v2.96}{2006/07/31}{using \cs{backaddr@format}}
-% \changes{v3.03}{2009/03/04}{support for priority}
-% \changes{v3.03}{2009/03/04}{new \opt{addrfield} values \opt{\quotechar=PP},
-% \opt{\quotechar=backgroundimage}, \opt{\quotechar=addresseeimage}}
-% \changes{v3.03b}{2009/06/30}{typo fix of ``addressee''}
-% \changes{v3.06a}{2010/07/29}{setting paragraph parameters}
-% \changes{v3.17}{2015/04/17}{\cs{setbox} replaced by \cs{sbox}}
-% \changes{v3.22}{2016/12/21}{braces fixed}
-% \changes{v3.22}{2016/12/21}{\cs{endgraf} added}
-% \changes{v3.25}{2017/11/15}{using \cs{scr@endstrut} instead of
-% \cs{unskip}\cs{strut}}
-% \changes{v3.27}{2019/03/27}{potentially only for \cls*{scrlttr2}}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% \changes{v3.30}{2020/03/27}{re-definition of line break moved}
-% The address field of the addressee inclusive return address and special mail
-% text.
-% \begin{description}
-% \item[ToDo:] The plans explained in the into of this section would have
-% consequences here too.
-% \end{description}
-% \begin{macrocode}
-%<*class|!willbe>
-\newcommand*{\@addrfield}{%
- \ifcase \ifnum\@afieldmode=5 \@ne\else\@afieldmode\fi\relax
- \typeout{Address: No}%
- \or
- \begingroup%
- \if@baddr
- \Ifkomavarempty{backaddress}{%
- \let\@tempa\@empty\let\@tempb\@empty
- }{%
- \def\@tempa{backaddress}\def\@tempb{,\space}%
- }%
- \else
- \let\@tempa\@empty\let\@tempb\@empty
- \fi
- \ifcase \ltr@priority
- \Ifkomavarempty{specialmail}{}{%
- \edef\@tempa{\@tempa\@tempb specialmail}\def\@tempb{,\space}%
- }%
- \or
- \edef\@tempa{\@tempa\@tempb B-Economy}\def\@tempb{,\space}%
- \or
- \edef\@tempa{\@tempa\@tempb A-Priority}\def\@tempb{,\space}%
- \fi
- \typeout{Address (\@tempa\@tempb addressee)}%
- \endgroup%
- \move@topt\vskip\useplength{toaddrvpos}%
- \vb@t@z{{\setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative
- \rlap{\move@topl
- \setlengthtoplength{\@tempskipa}{toaddrhpos}%
- \ifdim \@tempskipa<\z@
- \addtolength{\@tempskipa}{\paperwidth}%
- \addtolengthplength[-]{\@tempskipa}{toaddrwidth}%
- \fi
- \hskip\@tempskipa
- \@savevbox{\useplength{toaddrheight}}{\hsize\useplength{toaddrwidth}%
- \@savevbox[\vss]{\useplength{backaddrheight}}{%
- \hsize\useplength{toaddrwidth}%
- \if@baddr
- \Ifkomavarempty{backaddress}{}{{%
- \noindent%
- \backaddr@format{\scriptsize
- {%
- \def\\{\usekomavar{backaddressseparator}\@ogobble}%
- \usekomafont{backaddress}%
- {\usekomavar{backaddress}}%
- }}}}%
- \fi
- }{backaddress}{backaddrheight}{\setkomavar}%
- \ifcase \ltr@priority
- \or
- \setkomavar{specialmail}{%
- {\usekomafont{priority}{%
- {\usekomafont{prioritykey}{B}}%
- -ECONOMY}}%
- }%
- \or
- \setkomavar{specialmail}{%
- {\usekomafont{priority}{%
- {\usekomafont{prioritykey}{A}}%
- -PRIORITY}}%
- }%
- \fi
- \Ifkomavarempty{specialmail}{}{%
- \vbox{\hsize\useplength{toaddrwidth}%
- \noindent\hspace*{\useplength{specialmailindent}}%
- \specialmail@format{%
- \usekomafont{specialmail}\usekomavar{specialmail}}%
- \hspace*{\useplength{specialmailrightindent}}}%
- }%
- \ifnum\@afieldmode=\@ne\vfil\fi%
- \noindent\hskip\useplength{toaddrindent}%
- \setlength{\@tempdima}{\useplength{toaddrwidth}}%
- \addtolengthplength[-2]{\@tempdima}{toaddrindent}%
- \vbox{\hsize\@tempdima\raggedright
- \usekomafont{addressee}{%
- {\usekomafont{toname}{\usekomavar{toname}\\}}%
- {\usekomafont{toaddress}{\usekomavar{toaddress}\endgraf}}}}%
- \vfil\null\vskip-\baselineskip}%
- {address field}{toaddrheight}%
- {\begin{letter} or you\MessageBreak
- have to define a smaller special purpose using\MessageBreak
- \string\specialmail}%
- }}}%
- \vskip-\useplength{toaddrvpos}\move@frompt
- \else
- \begingroup%
-% \end{macrocode}
-% With \opt{addrfield=PP}, \opt{addrfield=backgroundimage} or
-% \opt{addrfield=image} there are neither a return address nor a special mail
-% text, but a priority.
-% \begin{macrocode}
- \if@baddr
- \let\@tempa\@empty\let\@tempb\@empty
- \ifcase \@afieldmode\relax\or\or
- \def\@tempa{PP-mode}\def\@tempb{,\space}%
- \or
- \def\@tempa{backgroundimage-mode}\def\@tempb{,\space}%
- \or
- \def\@tempa{image-mode}\def\@tempb{,\space}%
- \fi
- \Ifkomavarempty{backaddress}{}{%
- \edef\@tempa{\@tempa\@tempb backaddress ignored}\def\@tempb{,\space}%
- }%
- \else
- \let\@tempa\@empty\let\@tempb\@empty
- \fi
- \ifcase \ltr@priority
- \Ifkomavarempty{specialmail}{}{%
- \edef\@tempa{\@tempa\@tempb specialmail ignored}\def\@tempb{,\space}%
- }%
- \or
- \edef\@tempa{\@tempa\@tempb B-Economy}\def\@tempb{,\space}%
- \or
- \edef\@tempa{\@tempa\@tempb A-Priority}\def\@tempb{,\space}%
- \fi
- \typeout{Address (\@tempa\@tempb addressee)}%
- \endgroup%
- \move@topt\vskip\useplength{toaddrvpos}%
- \vb@t@z{{%
- \setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative
- \ifdim \useplength{toaddrindent}=\z@
- \setplength{toaddrindent}{8mm}%
- \fi
- \ifdim \useplength{PPheadheight}=\z@
- \setplength{PPheadheight}{20.74pt}%
- \fi
- \ifdim \useplength{PPheadwidth}=\z@
- \setplength{PPheadwidth}{42mm}%
- \fi
- \ifdim \useplength{PPdatamatrixvskip}=\z@
- \setplength{PPdatamatrixvskip}{9mm}%
- \fi
- \rlap{\move@topl
- \setlengthtoplength{\@tempskipa}{toaddrhpos}%
- \ifdim \@tempskipa<\z@
- \addtolength{\@tempskipa}{\paperwidth}%
- \addtolengthplength[-]{\@tempskipa}{toaddrwidth}%
- \fi
- \hskip\@tempskipa
- \@savevbox{\useplength{toaddrheight}}{\hsize\useplength{toaddrwidth}%
- \ifnum\@afieldmode=\tw@
-% \end{macrocode}
-% \opt{addrfield=PP}:
-% \begin{macrocode}
- \vskip 2pt\relax
- \hskip \useplength{toaddrindent}\relax
- \fbox{%
- \vbox to \dimexpr \useplength{PPheadheight}-2\fboxsep\relax{%
- \setlength{\parindent}{0pt}%
- \hsize \dimexpr \useplength{PPheadwidth}-2\fboxsep\relax
- \sbox\@tempboxa{%
- {\fontsize{20.74pt}{20.74pt}\selectfont
- \usekomafont{PPlogo}{P.P.}}\hskip 2mm%
- }%
- \dp\@tempboxa\z@
- \setlength{\@tempdima}{\hsize}%
- \addtolength{\@tempdima}{-\wd\@tempboxa}%
- \hbox{\box\@tempboxa
- \vbox to \dimexpr
- \useplength{PPheadheight}-2\fboxsep\relax{%
- \vss\hsize\@tempdima
- \raggedright
- \fontsize{8pt}{9pt}\selectfont\usekomafont{PPdata}%
- \usekomavar*{fromzipcode}\usekomavar{zipcodeseparator}%
- \usekomavar{fromzipcode}\scr@endstrut\\
- \usekomavar{place}\scr@endstrut
- \hfill
- }%
- }%
- \vss
- }%
- }%
- \hskip 1mm
- \mbox{%
- \vbox to \useplength{PPheadheight}{%
- \addtolengthplength[-]{\hsize}{PPheadwidth}%
- \addtolength{\hsize}{-1mm}%
- \addtolengthplength[-2]{\hsize}{toaddrindent}%
- \setlength{\parindent}{0pt}%
- \fontsize{8pt}{9pt}\selectfont\usekomafont{PPdata}%
- \hfill\usekomavar{PPcode}
- \vss
- \ifcase \ltr@priority
- \or
- \usekomafont{priority}{%
- {\usekomafont{prioritykey}{B}}%
- -ECONOMY\hss\vskip-\dp\strutbox
- }%
- \or
- \usekomafont{priority}{%
- {\usekomafont{prioritykey}{A}}%
- -PRIORITY\hss\vskip-\dp\strutbox
- }%
- \fi
- \vss
- }%
- }%
- \vskip 1mm
- \vskip-\ht\strutbox
- \noindent\hskip\useplength{toaddrindent}%
- \hrulefill%
- \hskip\useplength{toaddrindent}%
- \vbox to\z@{\hsize\z@
- \vskip \useplength{PPdatamatrixvskip}\relax
- \llap{\usekomavar{PPdatamatrix}\hskip\useplength{toaddrindent}}%
- \vss
- }%
- \else
-% \end{macrocode}
-% \opt{addrfield=backgroundimage} or \opt{addrfield=image}:
-% \begin{macrocode}
- \vskip 1mm
- \noindent\expandafter\hskip\useplength{toaddrindent}%
- \vbox to \useplength{PPheadheight}{%
- \addtolengthplength[-2]{\hsize}{toaddrindent}%
- \setlength{\parindent}{0pt}%
- \usekomavar{addresseeimage}%
- \vss
- }%
- \vskip 1mm
- \vskip\dp\strutbox
- \fi
- \ifnum \@afieldmode=4 \else
- \vfil%
- \noindent\hskip\useplength{toaddrindent}%
- \setlength{\@tempdima}{\useplength{toaddrwidth}}%
- \addtolengthplength[-2]{\@tempdima}{toaddrindent}%
- \vbox{\hsize\@tempdima
- \Ifkomavarempty{PPdatamatrix}{}{%
- \addtolength{\hsize}{-2mm}%
- \settowidth\@tempdima{\usekomavar{PPdatamatrix}}%
- \addtolength{\hsize}{-\@tempdima}%
- }%
- \raggedright
- \usekomafont{addressee}{%
- {\usekomafont{toname}{\usekomavar{toname}\\}}%
- {\usekomafont{toaddress}{\usekomavar{toaddress}\endgraf}}}}%
- \fi
- \vss\null}%
- {address field}{toaddrheight}%
- {\string\begin{letter}}%
- }}}%
- \vskip-\useplength{toaddrvpos}\move@frompt
- \fi
-}
-%</class|!willbe>
-% \end{macrocode}
-% \begin{macro}{\specialmail@format}
-% \changes{v2.97c}{2007/07/06}{added}
-% Formatting the special mail note.
-% \begin{macrocode}
-\newcommand*{\specialmail@format}[1]{}
-\let\specialmail@format\underline
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@ogobble}
-% \changes{v2.8q}{2002/01/22}{added}
-% Something like \cs{gobble} but to gobble an optional argument.
-% \begin{macrocode}
-\newcommand*{\@ogobble}[1][]{}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@locfield}
-% \changes{v2.8o}{2001/09/17}{\cs{noindent} added}
-% \changes{v2.8q}{2002/02/07}{\cs{noindent} after the logo}
-% \changes{v2.8q}{2002/07/23}{width calculation moved to this}
-% \changes{v2.8q}{2002/06/03}{special treatment of right aligned addressee}
-% \changes{v3.12}{2013/05/29}{using variable \var{frommobilephone}}
-% \changes{v3.27}{2019/03/27}{potentially only at \cls*{scrlttr2}}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% The location field to be placed independent of having an address field.
-% \begin{description}
-% \item[ToDo:] The plans explained in the into of this section would have
-% consequences here too.
-% \end{description}
-% \begin{macrocode}
-%<*class|!willbe>
-\newcommand*{\@locfield}{%
- \ifdim \useplength{locwidth}=\z@%
- \setplength{locwidth}{\paperwidth}%
- \ifdim \useplength{toaddrhpos}>\z@
- \addtoplength[-2]{locwidth}{\useplength{toaddrhpos}}%
- \else
- \addtoplength[2]{locwidth}{\useplength{toaddrhpos}}%
- \fi
- \addtoplength[-1]{locwidth}{\useplength{toaddrwidth}}%
- \if@bigloc%
- \setplength[.66667]{locwidth}{\useplength{locwidth}}%
- \else%
- \setplength[.5]{locwidth}{\useplength{locwidth}}%
- \fi%
- \fi%
-% \end{macrocode}
-% \changes{v2.97e}{2007/11/13}{support for sender in location}
-% \changes{v2.98b}{2008/01/30}{always print location if used}
-% Depending of \opt{fromalign} we have to take care to print the location by
-% adding a dummy content.
-% \begin{macrocode}
- \ifcase\@alignfrom
- \or
- \if@logo
- \Ifkomavarempty{location}{\setkomavar{location}{\null}}{}%
- \fi
- \or
- \or
- \Ifkomavarempty{location}{\setkomavar{location}{\null}}{}%
- \or
- \Ifkomavarempty{location}{\setkomavar{location}{\null}}{}%
- \fi
-% \end{macrocode}
-% Report if the location is empty or calculate the position and width.
-% \begin{macrocode}
- \Ifkomavarempty{location}{%
- \typeout{Location field: empty}%
- }{%
- \typeout{Location field: yes}%
- \ifdim \useplength{lochpos}=\z@%
- \setplength{lochpos}{\useplength{toaddrhpos}}%
- \fi
- \ifdim \useplength{locvpos}=\z@%
- \setplength{locvpos}{\useplength{toaddrvpos}}%
- \fi
- \ifdim \useplength{locheight}=\z@%
- \setplength{locheight}{\useplength{toaddrheight}}%
- \fi
- \move@topt\vskip\useplength{locvpos}%
- \vb@t@z{\noindent\makebox[0pt][l]{%
- \move@topl
- \setlengthtoplength[-]{\@tempskipa}{lochpos}%
- \ifdim \@tempskipa<\z@
- \addtolength{\@tempskipa}{\paperwidth}%
- \else
- \addtolengthplength{\@tempskipa}{locwidth}%
- \fi
- \hskip\@tempskipa
- \makebox[0pt][r]{%
- \@savevbox{\useplength{locheight}}{%
- \noindent\hsize\useplength{locwidth}%
-% \end{macrocode}
-% For some values of \opt{fromalign} we also have to place the sender's
-% address or logo.
-% \begin{macrocode}
- \ifcase\@alignfrom
- \or
- \if@logo
- \Ifkomavarempty{fromlogo}{\null}{%
- {\raggedleft\noindent\usekomavar{fromlogo}\\
- \vskip\parskip}\noindent}%
- \fi
- \or
- \or
- \if@logo
- \Ifkomavarempty{fromlogo}{}{%
- \raggedleft\usekomavar{fromlogo}\par}%
- \fi
- \raggedright
- {\usekomafont{fromname}\strut\ignorespaces
- \usekomavar{fromname}%
- {%
- \ifnum\@rulefrom=1\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\useplength{locwidth}}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}%
- }%
- \fi
- }%
- \\
- }%
- {\usekomafont{fromaddress}\strut\ignorespaces
- \usekomavar{fromaddress}%
- \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi%
- \if@mobilephone
- \\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}%
- \fi%
- \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi%
- \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi%
- \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi%
- \ifnum\@rulefrom=2\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\useplength{locwidth}}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}}%
- \fi
- \\
- }%
- \or
- \raggedleft
- \if@logo
- \Ifkomavarempty{fromlogo}{}{\usekomavar{fromlogo}\par}%
- \fi
- {\usekomafont{fromname}\strut\ignorespaces
- \usekomavar{fromname}%
- {%
- \ifnum\@rulefrom=1\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\useplength{locwidth}}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}%
- }%
- \fi
- }%
- \\
- }%
- {\usekomafont{fromaddress}\strut\ignorespaces
- \usekomavar{fromaddress}%
- \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi%
- \if@mobilephone%
- \\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}%
- \fi%
- \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi%
- \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi%
- \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi%
- \ifnum\@rulefrom=2\\[-.5\baselineskip]%
- \usekomafont{fromrule}{%
- \setlength{\@tempdima}{\useplength{fromrulewidth}}%
- \ifdim\@tempdima=\z@
- \setlength{\@tempdima}{\useplength{locwidth}}%
- \fi
- \expandafter\rule\expandafter{\the\@tempdima}{%
- \useplength{fromrulethickness}}}%
- \fi
- \\
- }%
-% \end{macrocode}
-% Last but not least the content of the location.
-% \begin{macrocode}
- \fi
- \usekomavar{location}%
- \vskip \z@ \@plus .00001fil}%
- {location field}{locheight}{\setkomavar}%
- }}%
- }%
- \vskip-\useplength{locvpos}\move@frompt
- }%
-}
-%</class|!willbe>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@datefield}
-% \changes{v2.8q}{2002/01/14}{setting \cs{if@tempwa}}
-% \changes{v2.97c}{2007/05/14}{using font elements \fnt{refname} and
-% \fnt{refvalue}}
-% Print either a reference line or place and date only.
-% \begin{macro}{\do@set@reffield}
-% \changes{v3.09}{2011/03/06}{added}
-% The macro will be defined later depending on testing of usage or
-% printing. So we just allocate/reserve it here.
-% \begin{macrocode}
-\newcommand*{\do@set@reffield}{}
-% \end{macrocode}
-% \begin{macro}{\@set@reffield}
-% \changes{v3.17}{2015/04/17}{\cs{setbox} replaced by \cs{sbox}}
-% Used to print a single field in the reference line. The argument is the name
-% of field.
-% \begin{macrocode}
-\newcommand*{\@set@reffield}[1]{%
- \Ifkomavarempty{#1}{}{%
- \settowidth{\@tempdima}{\strut\usekomafont{refvalue}\usekomavar{#1}}%
- \sbox\z@{\strut\usekomafont{refname}\usekomavar*{#1}}%
- \ifdim \@tempdima<\wd0\setlength{\@tempdima}{\wd0}\fi
- \if@tempswa\enskip\hfill\fi
- \parbox[t]{\@tempdima}{\noindent\raggedright
- \strut\box\z@\\\usekomafont{refvalue}\strut\usekomavar{#1}}%
- \@tempswatrue
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@test@reffield}
-% \changes{v3.09}{2011/03/06}{added}
-% Used to test, if a field is not empty and sets \cs{if@tempswa} corresponding
-% to the result. All not empty fields are added to a comma+space separated
-% list in \cs{@tempa}.
-% \begin{macrocode}
-\newcommand*{\@test@reffield}[1]{%
- \Ifkomavarempty{#1}{}{%
-%<trace> \if@tempswa\l@addto@macro\@tempa{, }\fi
-%<trace> \l@addto@macro\@tempa{#1}%
- \@tempswatrue
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@set@reffields}
-% \changes{v2.8q}{2002/01/14}{added}
-% The internal storage of all \cs{do@set@reffield} calls to be used for the
-% reference line.
-% \begin{macrocode}
-\newcommand*{\@set@reffields}{}%
-% \end{macrocode}
-% \end{macro}
-% \begin{command}{\addtoreffields}
-% \changes{v3.09}{2011/03/06}{using \cs{do@set@reffield}}
-% Adds a new \cs{do@set@reffield} to \cs{@set@reffields} for the field given
-% by the argument.
-% \begin{macrocode}
-\newcommand*{\addtoreffields}[1]{%
- \l@addto@macro{\@set@reffields}{\do@set@reffield{#1}}%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\removereffields}
-% \changes{v2.8q}{2002/01/14}{added}
-% Remove all fields from \cs{@set@reffields}.
-% \begin{macrocode}
-\newcommand*{\removereffields}{%
- \renewcommand*{\@set@reffields}{}%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\defaultreffields}
-% \changes{v2.8q}{2002/01/14}{added}
-% (Re)Set the default of \cs{@set@reffields}.
-% \begin{macrocode}
-\newcommand*{\defaultreffields}{%
- \removereffields
- \addtoreffields{yourref}%
- \addtoreffields{yourmail}%
- \addtoreffields{myref}%
- \addtoreffields{customer}%
- \addtoreffields{invoice}%
-}
-% \end{macrocode}
-% This is used for initial state:
-% \begin{macrocode}
-\defaultreffields
-% \end{macrocode}
-% \end{command}
-%
-% \changes{v2.3e}{1996/05/31}{distance between place and date added}
-% \changes{v2.8o}{2001/09/18}{added an additional verticale distance for
-% \file{KOMAold.lco} only}
-% \changes{v2.8q}{2001/11/13}{\cs{rlap} added}
-% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}}
-% \changes{v2.8q}{2002/01/14}{empty test moved to \cs{@set@reffield}}
-% \changes{v2.9l}{2003/01/28}{calculation of \plen{refwidth} fixed}
-% \changes{v2.9l}{2003/01/28}{calculation of \plen{refhpos} added}
-% \changes{v2.95}{2006/03/23}{using \cs{setparsizes}}
-% \changes{v2.97c}{2007/05/14}{using several new font elements}
-% \changes{v3.09}{2011/03/06}{initialization of \cs{do@set@reffield}}
-% \changes{v3.12}{2013/07/31}{using font element \fnt{placeanddate}}
-% \changes{v3.17}{2015/04/17}{\cs{setbox} replaced by \cs{sbox}}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% \begin{macrocode}
-\newcommand*{\@datefield}{%
- {%
- \setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative
- \ifdim\useplength{refwidth}=\z@
- \if@refwide
- \setplength{refwidth}{\paperwidth}%
- \ifdim \useplength{toaddrhpos}>\z@
- \setplength{refhpos}{\useplength{toaddrhpos}}%
- \else
- \setplength[-]{refhpos}{\useplength{toaddrhpos}}%
- \fi
- \addtoplength[-2]{refwidth}{\useplength{refhpos}}%
- \else
- \setplength{refwidth}{\textwidth}%
- \setplength{refhpos}{\oddsidemargin}%
- \addtoplength{refhpos}{1in}%
- \fi
- \else
- \ifdim\useplength{refhpos}=\z@
- \begingroup
-% \end{macrocode}
-% How much smaller is the reference line than the text width.
-% \begin{macrocode}
- \setlength\@tempdima{\textwidth}%
- \addtolengthplength[-]{\@tempdima}{refwidth}%
-% \end{macrocode}
-% Now we calculate the left margin.
-% \begin{macrocode}
- \setlength\@tempdimb{\oddsidemargin}%
- \addtolength\@tempdimb{1in}%
-% \end{macrocode}
-% And the left and right margin together.
-% \begin{macrocode}
- \setlength{\@tempdimc}{\paperwidth}%
- \addtolength{\@tempdimc}{-\textwidth}%
-% \end{macrocode}
-% Now we can calculate the left margin of the reference line without changing
-% the relation of the margins (with some tolerance).
-% \begin{macrocode}
- \divide\@tempdimb by 32768\relax
- \divide\@tempdimc by 32768\relax
- \ifdim\@tempdimc=\z@\else
- \multiply\@tempdima by\@tempdimb
- \divide\@tempdima by\@tempdimc
- \fi
- \edef\@tempa{\noexpand\endgroup
- \noexpand\setplength{refhpos}{\the\@tempdima}}%
- \@tempa
- \fi\fi
- \@tempswafalse
- \move@topt\vskip\useplength{refvpos}%
-% \end{macrocode}
-% Have we to print something?
-% \begin{macrocode}
- \@tempswafalse
- \let\do@set@reffield\@test@reffield
-%<trace> \let\@tempa\@empty
- \@set@reffields
- \ifcase \@datepos\else\@test@reffield{date}\fi
- \if@tempswa
-%<trace> \typeout{Reference line(s) with: \@tempa}%
- \@tempswafalse
-% \end{macrocode}
-% If so, do so.
-% \begin{macrocode}
- \rlap{\noindent\move@topl\hskip\useplength{refhpos}%
- \vbox{\hsize\useplength{refwidth}%
- \noindent
- \ifnum \@datepos=2
- \@set@reffields
- \if@tempswa
- \@tempswafalse
- \@set@reffield{date}%
- \fi
- \fi
- \let\do@set@reffield\@set@reffield
- \@set@reffields%
- \if@tempswa
- \ifnum \@datepos=1 \@set@reffield{date}\fi%
-% \end{macrocode}
-% From version~2.97c also test, of the font of the reference line is too big.
-% \begin{macrocode}
- \sbox\z@{\usekomafont{refname}\strutbox}%
- \ifdim\ht\z@>\ht\strutbox
-%<class> \ClassWarningNoLine{scrlttr2}{%
-%<package> \PackageWarningNoLine{scrletter}{%
- Font element `refname' should not be larger than
- \string\normalsize!}%
- \fi
- \sbox\z@{\usekomafont{refvalue}\strutbox}%
- \ifdim\ht\z@>\ht\strutbox
-%<class> \ClassWarningNoLine{scrlttr2}{%
-%<package> \PackageWarningNoLine{scrletter}{%
- Font element `refvalue' should not be larger than
- \string\normalsize!}%
- \fi
- \else
-% \end{macrocode}
-% If we do not have to print any field, we are printing the place and date.
-% \begin{macrocode}
- \ifcase \@datepos\else
- \ifnum \@datepos=1 \enskip\hfill\fi
- {\usekomafont{placeanddate}{\Ifkomavarempty{place}{}{%
- \usekomavar{place}\usekomavar{placeseparator}}%
- \usekomavar{date}}}%
- \fi
- \fi
- }%
- }%
-%<trace> \else\typeout{No reference line.}%
- \fi
- \vskip\useplength{refaftervskip}%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@maketitle,\@makelettertitle}
-% \changes{v2.3b}{1996/01/14}{using \cs{sectfont}}
-% \changes{v2.8p}{2001/09/22}{using \cs{titlefont} instead of \cs{sectfont}}
-% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}}
-% \changes{v2.9t}{2004/09/16}{\cs{par} with size and font of the title}
-% \changes{v2.95}{2006/03/22}{using \cs{usekomafont}}
-% \changes{v3.13}{2014/06/26}{\cs{@maketitle} renamed to \cs{@makelettertitle}}
-% \changes{v3.15}{2015/02/21}{\fnt{title} replaced by \fnt{lettertitle}}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% \changes{v3.36}{2022/03/04}{use of font element \fnt{title} removed}
-% \KOMAScript{} provides a letter title. This is different from a document
-% title.
-% \begin{macrocode}
-\newcommand*{\@makelettertitle}{%
- \Ifkomavarempty{title}{%
- \typeout{Title: no}%
- }{%
- \typeout{Title: yes}%
- {\setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative
- \centering\LARGE\usekomafont{lettertitle}\par}%
- \vskip\baselineskip%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@subjfield}
-% \changes{v2.8q}{2001/10/19}{\cs{centerline} replaced by \cs{centering}}
-% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}}
-% \changes{v2.8q}{2002/01/31}{hanging}
-% \changes{v2.95}{2006/03/23}{using cs{setparsizes}}
-% \changes{v3.01}{2008/11/03}{using \plen{subjectbeforevskip} and
-% \plen{subjectaftervskip}}
-% \changes{v3.15}{2015/02/21}{\fnt{subject} replaced by \fnt{lettersubject}}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% The subject of the letter.
-% \begin{macrocode}
-\newcommand*{\@subjfield}{{%
- \setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative
- \Ifkomavarempty{subject}{%
- \typeout{Subject: no}%
- }{%
- \ifx\raggedsubject\@empty
- \ifdim\useplength{subjectvpos}=\z@
- \if@subjafter%
- \typeout{Subject: after opening}%
- \let\raggedsubject\centering%
- \else
- \typeout{Subject: before opening}%
- \def\raggedsubject{\noindent\@hangfrom}%
- \fi
- \else
- \typeout{Subject: at absolute vertical position}%
- \def\raggedsubject{\noindent\@hangfrom}%
- \fi
- \fi
- \ifdim\useplength{subjectvpos}=\z@
- \vskip\useplength{subjectbeforevskip}%
- \begingroup
- \else
- \move@topt\vskip\useplength{subjectvpos}%
- \expandafter\vb@t@z\expandafter{%
- \fi
- \usekomafont{lettersubject}%
- \raggedsubject{\if@subj \subject@format{\strut\ignorespaces
- \usekomavar*{subject}}\fi}%
- \subject@format{\strut\ignorespaces\usekomavar{subject}}\par
- \ifdim\useplength{subjectvpos}=\z@
- \endgroup
- \vskip\useplength{subjectaftervskip}%
- \else
- }%
- \vskip-\useplength{subjectvpos}\move@frompt
- \fi
- }%
- }%
-}
-% \end{macrocode}
-% \begin{pseudolength}{subjectvpos}
-% \changes{v3.01}{2008/11/03}{added}
-% If \plen{subjectpos} is not 0 it is the absolute vertical position of the
-% subject. With 0 it is placed relative to the title, the reference line or
-% the opening. This is the initial value.
-% \begin{macrocode}
-\newplength{subjectvpos}
-\setplength{subjectvpos}{0pt}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{subjectaftervskip}
-% \changes{v3.01}{2008/11/03}{added}
-% The vertical distance after the subject is initialized with
-% 2\len{baselineskip}.
-% \begin{macrocode}
-\newplength{subjectaftervskip}
-\setplength{subjectaftervskip}{2\baselineskip}
-% \end{macrocode}
-% \end{pseudolength}
-% \begin{pseudolength}{subjectbeforevskip}
-% \changes{v3.01}{2008/11/03}{added}
-% The vertical distance before the subject, if not an absolute position is
-% used. Initial value is \len{baselineskip}.
-% \begin{macrocode}
-\newplength{subjectbeforevskip}
-\setplength{subjectbeforevskip}{0pt}
-%</body>
-% \end{macrocode}
-% \end{pseudolength}
-% \end{macro}^^A \@subjfield
-%
-%
-% \subsection{Head of the succeeding pages}
-%
-% The succeeding pages use another kind of note paper without all these large
-% elements for the sender, addressee etc. And there isn't an element like
-% \cs{opening}. So the page style is used.
-%
-% \begin{variable}{nexthead}
-% \changes{v3.08}{2010/10/28}{added}
-% This is the variable used for the page head of the page style.
-% The initial content depends mostly on \cs{@pageat} but also uses
-% \cs{leftmark} and \cs{rightmark} set by \cs{opening}.
-% \begin{macrocode}
-%<*body>
-\newkomavar{nexthead}
-\setkomavar{nexthead}{%
- \rlap{\parbox[c]{\textwidth}{\raggedright\strut
- \ifnum\@pageat=0\pagemark\else\leftmark\fi\strut}}%
- \parbox[c]{\textwidth}{%
- \centering\strut
- \ifcase\@pageat
- \rightmark
- \or
- \pagemark
- \or
- \rightmark
- \fi\strut}%
- \llap{\parbox[c]{\textwidth}{\raggedleft\strut
- \ifcase\@pageat
- \leftmark
- \or
- \rightmark
- \or
- \pagemark
- \else
- \rightmark
- \fi\strut}}%
-}%
-% \end{macrocode}
-% \end{variable}
-% \begin{command}{\nexthead}
-% \changes{v3.08}{2010/10/28}{deprecated}
-% \begin{macro}{\@nexthead}
-% \changes{v3.08}{2010/10/28}{deprecated}
-% \begin{macrocode}
-%<*class>
-\newcommand{\nexthead}{%
- \ClassWarning{scrlttr2}{%
- Deprecated usage of \string\nexthead.\MessageBreak
- You should use \string\setkomavar{nexthead}\MessageBreak
- instead of \string\nexthead
- }
- \setkomavar{nexthead}%
-}
-\newcommand*{\@nexthead}{%
- \ClassWarning{scrlttr2}{%
- Deprecated usage of \string\@nexthead.\MessageBreak
- \string\usekomavar{nexthead} should be used\MessageBreak
- instead of \string\@nexthead
- }%
- \usekomavar{nexthead}%
-}
-%</class>
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@nexthead
-% \end{command}^^A \nexthead
-%
-%
-% \subsection{Footer of the succeeding pages}
-%
-% \begin{variable}{nextfoot}
-% \changes{v3.08}{2010/10/28}{added}
-% This is the variable used for the page footer of the page style.
-% The initial content depends mostly on \cs{@pageat}
-% \begin{macrocode}
-%<*body>
-\newkomavar{nextfoot}
-\setkomavar{nextfoot}{%
- \ifnum\@pageat>2
- \parbox[c]{\textwidth}{%
- \ifcase\@pageat\or\or\or\raggedright\or\centering\or\raggedleft\fi
- \strut\pagemark%
- }%
- \fi
-}
-% \end{macrocode}
-% \end{variable}
-% \begin{command}{\nextfoot}
-% \changes{v3.08}{2010/10/28}{deprecated}
-% \begin{macro}{\@nextfoot}
-% \changes{v3.08}{2010/10/28}{deprecated}
-% \begin{macrocode}
-%<*class>
-\newcommand{\nextfoot}{%
- \ClassWarning{scrlttr2}{%
- Deprecated usage of \string\nextfoot.\MessageBreak
- You should use \string\setkomavar{nextfoot}\MessageBreak
- instead of \string\nextfoot
- }
- \setkomavar{nextfoot}%
-}
-\newcommand*{\@nextfoot}{%
- \ClassWarning{scrlttr2}{%
- Deprecated usage of \string\@nextfoot.\MessageBreak
- \string\usekomavar{nextfoot} should be used\MessageBreak
- instead of \string\@nextfoot
- }%
- \usekomavar{nextfoot}%
-}
-%</class>
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@nextfoot
-% \end{command}^^A \nextfoot
-%
-%
-% \subsection{The \env{letter} environment}
-%
-% \begin{environment}{letter}
-% \changes{v2.8q}{2002/01/16}{optional argument added}
-% \changes{v2.8q}{2002/01/16}{reset counter \cnt{footnote}}
-% \changes{v2.9d}{2002/08/12}{fixed reset of counter \cnt{footnote}}
-% \changes{v3.17}{2015/03/20}{replacement for \cs{pagemark}}
-% \changes{v3.19}{2015/07/15}{using \cs{letterpagestyle}}
-% \changes{v3.19}{2015/07/15}{referenceable numbering of letters}
-% \changes{v3.27}{2019/03/05}{no support for two-columned letters}
-% The is the environment used to define one or even several letters in one
-% document. It has an optional argument to set additional \KOMAScript{}
-% options and a mandatory argument with the addressee.
-% \begin{macrocode}
-%<*body>
-\newenvironment{letter}[2][]{%
-% \end{macrocode}
-% If we are in two column mode, we have to switch back to one column for the
-% letter. \cs{ifletter@restonecol} as indicator, it at the end we have to
-% switch back to two column mode.
-% \begin{macrocode}
- \if@twocolumn
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrletter}{%
- twocolumn mode not supported.\MessageBreak
- If you really want a twocolumned letter, you should\MessageBreak
- use package `multicol' and add a `multicols'\MessageBreak
- environment inside your letter.\MessageBreak
- Switching back to oneside%
- }%
- \letter@restonecoltrue
- \expandafter\onecolumn
- \else
- \letter@restonecolfalse
- \fi
-% \end{macrocode}
-% Then we start a new odd page and change the page style. Afterwards all
-% relevant counters (currently \cnt{page} and \cnt{footnote}) are reset and
-% the \cnt{letter} counter is increased referenceable.
-% \changes{v3.19}{2015/07/15}{using \cs{cleardoubleoddemptypage}}
-% \changes{v3.27}{2019/03/05}{using \cs{raggedbottom}}
-% \begin{macrocode}
- \cleardoubleoddemptypage
- \raggedbottom
- \scr@ifundefinedorrelax{letterpagestyle}{}{%
- \ifx\letterpagestyle\@empty\else
- \pagestyle{\letterpagestyle}%
- \fi
- }%
-%<package> \let\pagemark\letterpagemark
- \refstepcounter{letter}%
- \let\thisletter\@currentlabel
- \setcounter{page}{\@ne}%
- \setcounter{footnote}{0}%
- \interlinepenalty=200\@processto{#2}%
-% \end{macrocode}
-% Then it's time for the options.
-% \begin{macrocode}
- \KOMAoptions{#1}%
-% \end{macrocode}
-% \changes{v3.27}{2019/03/31}{first-page head generation moved}
-% There are plans to generate the page head already here instead of waiting
-% till \cs{opening}. But currently this is not used.
-% \begin{macrocode}
-%<package&willbe> \@gen@firsthead
-% \end{macrocode}
-% \changes{v3.27}{2019/03/22}{plans to set the page style}
-% There are plans to use page style \pstyle{notepaper} for the first page
-% before executing the begin hook.
-% \begin{macrocode}
-%<package&willbe> \thispagestyle{notepaper}%
-% \end{macrocode}
-% There are also plans to calculate the height of the reference line here.
-% \begin{macrocode}
-%<*package&willbe>
- \ifdim\useplength{refheight}>\z@
- \else
- \begingroup
- \newkomavar[\strut]{@internal@testvar@}%
- \setkomavar{@internal@testvar@}{\strut}%
- \setplengthtototalheight{refheight}{\@set@reffield{@internal@testvar@}}%
- \edef\reserved@a{\noexpand\endgroup
- \noexpand\setplength{refheight}{\useplength{refheight}}%
- }%
- \reserved@a
- \fi
-%</package&willbe>
-% \end{macrocode}
-% Before executing the hook. The hook can be used, e.g., to reset additional
-% counters.
-% \begin{macrocode}
- \@beginletterhook
-%<package&willbe>\initial@letter@vskip
-}{%
-% \end{macrocode}
-% At the end, stop the letter.
-% \begin{macrocode}
- \stopletter
-% \end{macrocode}
-% \changes{v3.19}{2015/07/15}{label at the end added}
-% Set a label for the current letter to provide referencing the last
-% page. Then do the final page beak and reset the column mode.
-% \begin{macrocode}
- \let\@currentlabel\thisletter
- \label{\thisletter.lastpage}%
- \@@par\pagebreak\@@par%
- \ifletter@restonecol\twocolumn\fi
-% \end{macrocode}
-% \changes{v3.27}{2019/03/31}{cleanup running head}
-% Plan: The package also cleans up the running head after the end of the
-% letter.
-% \begin{macrocode}
-%<package&willbe> \@mkdouble\@empty
-}
-% \end{macrocode}
-% \begin{macro}{\initial@letter@vskip}
-% \changes{v3.27}{2019/05/03}{added}
-% Go to the start position of the letter. Usually to jump below the reference
-% line inside the \texttt{letter} environment.
-% \begin{macrocode}
-%<*package&willbe>
-\newcommand*{\initial@letter@vskip}{%
- \move@topt
- \vskip \dimexpr \useplength{refvpos}
- \if@refline +\useplength{refheight}\fi
- +\useplength{refaftervskip}\relax
-}
-%</package&willbe>
-% \end{macrocode}
-% \end{macro}^^A \inital@letter@vskip
-% \begin{macro}{\letter@restonecolfalse,\letter@restonecoltrue,
-% \ifletter@restonecol}
-% \changes{v3.27}{2019/03/05}{added}
-% Used above to save and restore the column mode.
-% \begin{macrocode}
-\newif\ifletter@restonecol
-% \end{macrocode}
-% \end{macro}
-% \begin{command}{\thisletter}
-% \changes{v3.19}{2015/07/15}{added}
-% The base value of the current letter label. This can be used to, e.g.,
-% reference the \texttt{\cs{thisletter}.lastpage} label. It is initialized to
-% a unknown value, as long as we are outside any \env{letter} environment.
-% \begin{macrocode}
-\newcommand*{\thisletter}{outside.letter.undefined}
-% \end{macrocode}
-% \end{command}^^A \thisletter
-% \begin{command}{\letterlastpage}
-% \changes{v3.19}{2015/07/15}{add}
-% Reference to the page of the \texttt{\cs{thisletter}.lastpage} label.
-% \begin{macrocode}
-\newcommand*{\letterlastpage}{\pageref{\thisletter.lastpage}}
-% \end{macrocode}^^A \letterlastpage
-% \end{command}
-% \begin{command}{\stopletter}
-% This is a kind of end of letter hook. But \cs{AtEndLetter} should be used to
-% add code.
-% \begin{macrocode}
-\newcommand*{\stopletter}{}
-% \end{macrocode}
-% \end{command}^^A \stopletter
-% \begin{macro}{\@processto}
-% \changes{v2.9r}{2004/06/16}{supports empty addressee}
-% \changes{v3.27}{2019/03/24}{extended setting of variables}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% The addressee argument of \env{letter} has to be split into the name and the
-% address.
-% \begin{description}
-% \item[Note:] The specification clearly says, that optional arguments to |\\|
-% are not supported. So we do not adapt that change of \LaTeX{} 2021/10/01.
-% \item[Note:] Here we also have plans to change things.
-% \end{description}
-% \begin{macrocode}
-\newcommand{\@processto}[1]{%
-% \end{macrocode}
-% If \cs{@processto} argument (\texttt{letter} mandatory argument) is empty:
-% \begin{macrocode}
- \IfArgIsEmpty{#1}{%
-% \end{macrocode}
-% try to build it from \texttt{toname} and \texttt{toaddress}.
-% \begin{macrocode}
-%<*package&willbe>
- \Ifkomavarempty{toname}{%
- \Ifkomavarempty{tofamilyname}{}{%
- \Ifkomavarempty{togivenname}{%
- \usekomavar[\setkomavar{toname}]{tofamilyname}%
- }{%
- % Fixme: The \cs{protected@edef}s are critical!
- \usekomavar[\protected@edef\reserved@a]{togivenname}%
- \usekomavar[\protected@edef\reserved@b]{tofamilyname}%
- \edef\reserved@a{%
- \noexpand\setkomavar{toname}{%
- \unexpanded\expandafter{\reserved@a}\ %
- \unexpanded\expandafter{\reserved@b}}%
- }\reserved@a
- }%
- }%
- }{}%
- \Ifkomavarempty{toaddress}{%
- % Fixme: The \cs{protected@edef}s are critical!
- \usekomavar[\protected@edef\reserved@a]{toname}%
- \protected@edef\reserved@a{%
- \noexpand\usekomafont{toname}{\reserved@a}%
- }\reserved@a
- }{%
- \Ifkomavarempty{toname}{%
- % Fixme: The \cs{protected@edef}s are critical!
- \usekomavar[\protected@edef\reserved@a]{toaddress}%
- \protected@edef\reserved@a{%
- \noexpand\usekomafont{toaddress}{\reserved@a}%
- }\reserved@a
- }{%
- % Fixme: The \cs{protected@edef}s are critical!
- \usekomavar[\protected@edef\scr@local@toname]{toname}%
- \usekomavar[\protected@edef\reserved@b]{toaddress}%
- \protected@edef\reserved@a{%
- \noexpand\setkomavar{addressee}{%
- {\noexpand\usekomafont{toname}{\scr@local@toname}}\\
- \noexpand\usekomafont{toaddress}{\reserved@b}%
- }%
- }\reserved@a
- }%
- }%
-%</package&willbe>
- }{%
-% \end{macrocode}
-% Split into part before first \cmd\\ and it:
-% \begin{macrocode}
- \expandafter\@xproc#1\\\@nil
- \ifx\reserved@b\@empty\else\expandafter\@xproc#1\@nil\fi
-% \end{macrocode}
-% Plan: Set variable \var{addressee}:
-% \begin{macrocode}
-%<*package&willbe>
- % Fixme: The \cs{protected@edef}s are critical!
- \protected@edef\reserved@c{%
- \noexpand\setkomavar{addressee}{%
- {\noexpand\usekomafont{toname}{\reserved@a}}%
- \ifx\reserved@b\@empty\else
- \\\noexpand\usekomafont{toaddress}{\reserved@b}%
- \fi
- }%
- }%
-% \end{macrocode}
-% If \var{toname} is empty, set it:
-% \begin{macrocode}
- \Ifkomavarempty{toname}{%
- % Fixme: The \cs{protected@edef}s are critical!
- \protected@edef\reserved@a{%
- \noexpand\reserved@c{\noexpand\setkomavar{toname}{\reserved@a}}}%
- }{\let\reserved@a\reserved@c}%
-% \end{macrocode}
-% If \var{toaddress} is empty, set it:
-% \begin{macrocode}
- \Ifkomavarempty{toaddress}{%
- % Fixme: The \cs{protected@edef}s are critical!
- \protected@edef\reserved@b{\noexpand\reserved@a
- \noexpand\setkomavar{toaddress}{\reserved@b}}%
- \reserved@b
- }{\reserved@a}%
-%</package&willbe>
-% \end{macrocode}
-% For now simply set \var{toname} and \var{toaddress}:
-% \changes{v3.27}{2019/10/28}{don't expand the contents of \cs{reserved@a} and
-% \cs{reserved@b}}
-% \begin{macrocode}
-%<*class|!willbe>
- \edef\reserved@a{%
- \noexpand\setkomavar{toname}{\unexpanded\expandafter{\reserved@a}}%
- \noexpand\setkomavar{toaddress}{\unexpanded\expandafter{\reserved@b}}%
- }\reserved@a
-%</class|!willbe>
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\@xproc}
-% Macro to split two elements with |\\| separator.
-% \begin{macrocode}
-\newcommand*{\@xproc}{}
-\long\def\@xproc#1\\#2\@nil{%
-% \end{macrocode}
-% \changes{v3.27}{2019/03/24}{do not directly set variables but
-% \cs{reserved@a} and \cs{reserved@b}}
-% \begin{macrocode}
- \def\reserved@a{#1}\def\reserved@b{#2}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@xproc
-% \end{macro}^^A \@processto
-% \begin{command}{\flushbottom}
-% \changes{v2.97c}{2007/05/17}{added}
-% The \cs{stopletter} hook is used to make the last page similar to using
-% \cs{raggedbottom}.
-% \begin{description}
-% \item[Note:] It is correct to have this change globally, because it can be
-% used outside a letter, but should be valid for letters in this case too.
-% \end{description}
-% \begin{macrocode}
-\g@addto@macro\flushbottom{%
- \AtEndLetter{\vskip \z@\@plus.0001fil\relax}%
-}
-% \end{macrocode}
-% \end{command}^^A \flushbottom
-% \begin{counter}{letter}
-% \changes{v3.19}{2015/07/15}{added}
-% The counter used to number the letters and make them reference-able.
-% \begin{macrocode}
-\newcounter{letter}
-% \end{macrocode}
-% \end{counter}
-% \end{environment}^^A letter
-%
-%
-% \begin{command}{\letterpagestyle}
-% \changes{v3.19}{2015/07/15}{added}
-% Similar to \cs{tilepagestyle}, \cs{indexpagestyle} etc. we have a
-% \cs{letterpagestyle} for the page style of the letter environment. The
-% initial value of the class and the package are different. For the class we
-% use an empty value, which means not change, because it already uses an
-% adapted page style. But the package does not change the usual page styles of
-% the classes, and therefore has a new default \pstyle{plain.letter} for
-% letters.
-% \begin{macrocode}
-\newcommand*{\letterpagestyle}{%
-%<package> plain.letter%
-}
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{command}{\AtBeginLetter}
-% \changes{v2.8n}{2001/09/08}{added}
-% \begin{macro}{\@beginletterhook}
-% \changes{v2.8n}{2001/09/08}{added}
-% This is the hook at the beginning of a letter. Initially it is empty.
-% \begin{macrocode}
-\newcommand{\AtBeginLetter}{\g@addto@macro\@beginletterhook}
-\newcommand{\@beginletterhook}{}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\AtEndLetter}
-% \changes{v2.95}{2006/03/22}{added}
-% At the end currently a user command \cs{stopletter} is used to represent the
-% hook. An internal macro would be better but incompatible.
-% \begin{macrocode}
-\newcommand{\AtEndLetter}{\g@addto@macro\stopletter}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\stopbreaks}
-% \begin{command}{\startbreaks}
-% \changes{v3.33}{2021/03/05}{\cs{relax} added}
-% \begin{macro}{\@nobreakvspace}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \changes{v3.33}{2021/03/05}{robust definition}
-% \begin{macro}{\@nobreakvspacex}
-% \begin{macro}{\@nobreakcr}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \changes{v3.33}{2021/03/05}{simplified}
-% Inside letters we have a slightly different page break. This should improve
-% placement of letter texts (but I doubt, that it really does).
-% \begin{macrocode}
-\newcommand*{\stopbreaks}{\interlinepenalty \@M
- \def\par{\@@par\nobreak}\let\\=\@nobreakcr
- \let\vspace\@nobreakvspace}
-\DeclareRobustCommand*{\@nobreakvspace}{%
- \kernel@ifstar{\@nobreakvspacex}{\@nobreakvspacex}}
-\newcommand*{\@nobreakvspacex}[1]{\ifvmode\nobreak\vskip #1\relax\else
- \@bsphack\vadjust{\nobreak\vskip #1}\@esphack\fi}
-\newcommand*{\@nobreakcr}{\kernel@ifstar{\@normalcr*}{\@normalcr*}}
-\newcommand*{\startbreaks}{\let\\=\@normalcr
- \interlinepenalty 200\def\par{\@@par\penalty 200\relax}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{command}
-% \end{command}
-%
-% \begin{command}{\opening}
-% \changes{v2.8n}{2001/09/08}{re-implemented}
-% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}}
-% \changes{v2.8q}{2002/03/25}{\cs{@PapersizeWarning}}
-% \changes{v2.95}{2003/03/23}{using \cs{setparsizes}}
-% \changes{v3.27}{2019/03/27}{only \cls*{scrlttr2} uses \cs{@addrfield},
-% \cs{@locfield} and \cs{@foldmarks}}
-% \changes{v3.27}{2019/03/27}{only \cls*{scrlttr2} sets pagestyle}
-% \changes{v3.27}{2019/03/31}{only \cls*{scrlttr2} generates the first-page
-% head here}
-% \begin{description}
-% \item[ToDO:] There are plans to not generate the notepaper head, foot and
-% several other elements here but in \env{letter}.
-% \end{description}
-% \begin{macrocode}
-\newcommand{\opening}[1]{%
- \@PapersizeWarning
-%<class|!willbe> \@gen@firsthead
- \@mkboth{\scr@fromname@var}{\scr@subject@var}%
-%<class|!willbe> \thispagestyle{empty}%
- \noindent
-%<class|!willbe> \@foldmarks\@firstheadfootfield
-%<class|!willbe> \@addrfield\@locfield
- \ifdim\useplength{subjectvpos}=\z@\else\@subjfield\fi
-%<class|!willbe> \@datefield
- \@makelettertitle
- \ifdim\useplength{subjectvpos}=\z@\if@subjafter\else\@subjfield\fi\fi
- {\setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative#1\par}%
- {\setlength{\@tempdima}{\baselineskip}%
- \addtolength{\@tempdima}{-\parskip}%
- \ifdim \@tempdima>\z@\vskip\@tempdima\fi}%
- \ifdim\useplength{subjectvpos}=\z@\if@subjafter\@subjfield\fi\fi
- \@afterindentfalse\@afterheading
-}
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{command}{\closing}
-% \changes{v2.2b}{1995/02/16}{\cs{fromsig} used directly}
-% \changes{v2.3b}{1996/01/14}{distance between closing text and signature
-% increased}
-% \changes{v2.5d}{2000/06/10}{distance between closing text and signature
-% variable}
-% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}}
-% \changes{v2.8q}{2002/02/05}{not \cs{long}}
-% \changes{v2.8q}{2002/02/05}{supports \texttt{\cmd{\\}[\dots]}}
-% \changes{v2.9r}{2004/01/28}{length limited to \cs{hsize}}
-% \changes{v2.9r}{2004/01/28}{support for empty closing text}
-% \changes{v2.95}{2003/03/23}{using \cs{setparsizes}}
-% \changes{v3.17}{2015/02/19}{re-implemented to be more mistake tolerant}
-% \changes{v3.17}{2015/02/20}{\cs{}\cs{} replaced by \cs{tabularnewline}}
-% \changes{v3.17}{2015/02/20}{several \cs{strut} added}
-% \changes{v3.20}{2015/10/08}{line break after the closing text only in
-% horizontal mode}
-% \changes{v3.25}{2017/11/15}{\cs{unskip}\cs{strut} replaced by
-% \cs{scr@endstrut}}
-% Sets not only the closing text, that is given as argument, but also the
-% signature.
-% \begin{macro}{\presig@skip}
-% \changes{v2.5d}{2000/06/10}{added}
-% \changes{v2.8q}{2001/10/09}{replaced by \plen{sigbeforevskip}}
-% \end{macro}
-% \begin{command}{\setpresigskip}
-% \changes{v2.5d}{2000/06/10}{added}
-% \changes{v2.8q}{2001/10/09}{using \plen{asigbeforesvskip}}
-% \changes{v2.8q}{2001/10/09}{only for \file{KOMAold.lco}}
-% \begin{description}
-% \item[ToDo:] This has to be moved to
-% \file{scrkernel-letterclassoptions.dtx}!
-% \end{description}
-% \begin{macrocode}
-%</body>
-%</letter>
-%<lco&KOMAold&body>\def\setpresigskip{\setplength{sigbeforevskip}}
-%<*letter>
-%<*body>
-% \end{macrocode}
-% \end{command}^^A \setpresigskip
-% \begin{macro}{\@@xtrimtempa,\@xtrimtempa,\@tempdimaismaxwidthof}
-% \changes{v2.8q}{2002/02/05}{added}
-% \changes{v3.17}{2014/02/19}{removed}
-% \end{macro}^^A \@@xtrimtempa,\@xtrimtempa,\@tempdimaismaxwidthof
-% \begin{macrocode}
-\newcommand*{\closing}[1]{{%
- \setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative\nobreak\par
- \nobreak\vskip\baselineskip
- \stopbreaks\noindent
- \settowidth{\@tempdima}{%
- \begin{tabular}{@{}l@{}}
- #1\tabularnewline
- \usekomavar{signature}\tabularnewline
- \end{tabular}
- }%
- \setlength{\@tempdimb}{\hsize}%
- \addtolength{\@tempdimb}{-\useplength{sigindent}}%
- \ifdim\@tempdima>\@tempdimb\setlength{\@tempdima}{\@tempdimb}\fi
- \hspace{\useplength{sigindent}}%
- \parbox{\@tempdima}{\raggedsignature\strut\ignorespaces
- #1\ifhmode\scr@endstrut\\[\useplength{sigbeforevskip}]
- \else\vskip \useplength{sigbeforevskip}\fi
- \strut\ignorespaces
- \usekomavar{signature}\ifhmode\scr@endstrut\fi}}\par
- \nobreak\vskip\baselineskip
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\ps}
-% \changes{v2.8n}{2001/09/08}{re-implemented}
-% Switch to printing of \emph{postscriptum}.
-% \begin{macrocode}
-\newcommand\ps{\par%
- \ifdim\parskip=\z@
- \vskip\baselineskip
- \fi\startbreaks\noindent\ignorespaces
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\cc}
-% \changes{v2.6}{2001/01/03}{\cs{def} replaced by \cs{newcommand*}}
-% \changes{v2.8n}{2001/09/08}{re-implemented}
-% \changes{v2.9o}{2003/04/22}{\len{parfillskip} changed}
-% \changes{v2.9q}{2004/04/26}{\len{parfillskip} changed to \texttt{1em plus
-% 1fil}}
-% \changes{v2.9r}{2004/05/25}{\len{parfillskip} changed to \texttt{\cs{z@} plus
-% 1fil}}
-% \changes{v3.22}{2016/12/15}{missing star at \cs{ifkomavaremptry*} added}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
-% \cs{Ifkomavarempty}}
-% Switch to the printing of the \emph{copy circulated}.
-% \begin{macrocode}
-\newcommand*{\cc}[1]{\par%
- \ifdim\parskip=\z@%
- \vskip\baselineskip%
- \fi\noindent%
- \begingroup
- \parbox[t]{\textwidth}{%
- \Ifkomavarempty*{ccseparator}{}{%
- \@hangfrom{%
- \strut\usekomavar*{ccseparator}\usekomavar{ccseparator}}%
- }%
- \ignorespaces #1\strut}%
- \setlength{\parfillskip}{\z@ \@plus 1fil}\par
- \endgroup
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\encl}
-% \changes{v2.4a}{1997/06/06}{don't print a colon for empty enclosure}
-% \changes{v2.6}{2001/01/03}{\cs{def} replaced by \cs{newcommand*}}
-% \changes{v2.8n}{2001/09/08}{re-implemented}
-% \changes{v2.8q}{2002/01/31}{missing \% added}
-% \changes{v2.9o}{2003/04/22}{\cs{parfillskip} changed}
-% \changes{v2.9q}{2004/04/26}{\cs{parfillskip} changed to \texttt{1em plus
-% 1fil}}
-% \changes{v2.9r}{2004/05/25}{\cs{parfillskip} changed to \texttt{\cs{z@} plus
-% 1fil}}
-% The enclosures are given as argument of \cs{encl}. They are printed hanging,
-% if the output name of \var{enclseparator} is not empty.
-% \begin{macrocode}
-\newcommand*{\encl}[1]{\par%
- \ifdim\parskip=\z@%
- \vskip\baselineskip%
- \fi\noindent%
- \begingroup
- \parbox[t]{\textwidth}{%
- \Ifkomavarempty*{enclseparator}{}{%
- \@hangfrom{%
- \strut\usekomavar*{enclseparator}\usekomavar{enclseparator}}%
- }%
- \ignorespaces #1\strut}%
- \setlength{\parfillskip}{\z@ \@plus 1fil}\par
- \endgroup
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{Letter specific variables}
-%
-% \begin{variable}{place,location,specialmail,title,fromlogo}
-% \changes{v2.8q}{2002/01/28}{added}
-% \begin{variable}{fromzipcode,PPcode,PPdatamatrix}
-% \changes{v3.03}{2009/03/04}{added}
-% \begin{variable}{addresseeimage}
-% \changes{v3.03}{2009/03/04}{added}
-% \changes{v3.03b}{2009/06/30}{typofix}
-% \begin{variable}{signature}
-% \changes{v2.8q}{2002/01/16}{added}
-% \begin{variable}{backaddress}
-% \changes{v2.8q}{2002/01/16}{added}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} durch \cs{Ifkomavarempty}
-% ersetzt}
-% There are several variables without output name. For most of them the user
-% has to define a value, if it should be used in the notepaper. Only
-% \var{backaddress} and \var{signature} have a default, that depends on the
-% values of other variables. Unfortunately these defaults are not expandable,
-% because of the not expandable \cs{usekomavar}.
-% \begin{description}
-% \item[ToDo:] We should define a expandable \cs{usekomavar} alternative
-% without optional star and optional argument.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newkomavar{place}
-\newkomavar{location}
-\newkomavar{specialmail}
-\newkomavar{title}
-\newkomavar{fromlogo}
-\newkomavar{fromzipcode}
-\newkomavar{PPcode}
-\newkomavar{PPdatamatrix}
-\newkomavar{addresseeimage}
-\newkomavar{signature}
-\setkomavar{signature}{\usekomavar{fromname}}
-\newkomavar{backaddress}
-\setkomavar{backaddress}{%
- \Ifkomavarempty{fromname}{}{%
- \strut\ignorespaces\usekomavar{fromname}%
- \Ifkomavarempty{fromaddress}{}{\\}}%
- \Ifkomavarempty{fromaddress}{}{%
- \strut\ignorespaces\usekomavar{fromaddress}}%
- }
-%</body>
-% \end{macrocode}
-% \end{variable}^^A backaddress
-% \end{variable}^^A signature
-% \end{variable}^^A addresseeimage
-% \end{variable}^^A fromzipcode,PPcode,PPdatamatrix
-% \end{variable}^^A place,location,specialmail,title,fromlogo
-%
-% \begin{option}{symbolicnames}
-% \changes{v3.12}{2013/05/13}{added}
-% \changes{v3.17}{2015/03/16}{using internal value storage}
-% \changes{v3.27}{2019/03/21}{new values \opt{\quotechar=fontawesome} and
-% \opt{\quotechar=marvosym} added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{macro}{\@scrsymbolsfalse,\@scrsymbolstrue,\if@scrsymbols}
-% For some of the variable the print name can be a symbol instead of a name.
-% \begin{macrocode}
-%<*option>
-\newif\if@scrsymbols
-\KOMA@key{symbolicnames}[true]{%
- \KOMA@set@ifkey{symbolicnames}{@scrsymbols}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \def\scr@symbols@font{marvosym}%
- \else
- \KOMA@set@ncmdkey{symbolicnames}{reserved@a}{%
- {marvosym}{0},%
- {fontawesome}{1},{awesome}{1},%
- }{#1}%
- \ifx \FamilyKeyState\FamilyKeyStateProcessed
- \@scrsymbolstrue
- \ifcase \number\reserved@a
- \def\scr@symbols@font{marvosym}%
- \else
- \def\scr@symbols@font{fontawesome}%
- \fi
- \fi
- \fi
- \ifx \FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
- }{symbolicnames}{#1}%
- \if@scrsymbols
- \Ifstr{\scr@symbols@font}{marvosym}{%
- \def\scr@symbol@phone{\Telefon}%
- \def\scr@symbol@fax{\FAX}%
- \def\scr@symbol@email{\Email}%
- \def\scr@symbol@mobilephone{\Mobilefone}%
- \def\scr@symbol@www{\@empty}%
- }{%
- \def\scr@symbol@phone{\faPhone}%
- \def\scr@symbol@fax{\faFax}%
- \def\scr@symbol@email{\faEnvelopeO}%
- \def\scr@symbol@mobilephone{\faMobilePhone}%
- \def\scr@symbol@www{\faGlobe}%
- }%
- \if@atdocument
- \begingroup
- \@tempswafalse
- \expandafter\ifdefined\scr@symbol@phone\else\@tempswatrue\fi
- \expandafter\ifdefined\scr@symbol@fax\else\@tempswatrue\fi
- \expandafter\ifdefined\scr@symbol@email\else\@tempswatrue\fi
- \expandafter\ifdefined\scr@symbol@mobilephone\else\@tempswatrue\fi
- \expandafter\ifdefined\scr@symbol@www\else\@tempswatrue\fi
- \if@tempswa
- \aftergroup\@scrsymbolsfalse
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrletter}{%
- Option `symbolicnames=#1'
- ignorred.\MessageBreak
- You've tried to set option `symbolicnames'\MessageBreak
- after \string\begin{document}, but without\MessageBreak
- loading package `\scr@symbols@font' before.\MessageBreak
- You should either switch on option\MessageBreak
- `symbolicnames' before \string\begin{document}\MessageBreak
- or load package `\scr@letter@symbols@font' in the
- document\MessageBreak
- preamble to avoid this warning%
- }%
- \fi
- \endgroup
- \else
-% \end{macrocode}
-% \changes{v3.20}{2016/04/01}{need only extension for kind of loading delay}
-% \changes{v3.20}{2016/04/01}{loading delay only if needed and available}
-% In the document preamble we can load \pkg{macrosym} or \pkg{fontawesome},
-% but not while the options not has been processed. So in this case we have to
-% delay it using \cs{AtEndOfClass} resp. \cs{AtEndOfPackage}. With an unknown
-% extension we use \cs{AtBeginDocument}.
-% \begin{macrocode}
- \ifx\@fileswith@pti@ns\@badrequireerror
- \Ifstr{\@currext}{\@clsextension}{%
- \expandafter\AtEndOfClass
- }{%
- \Ifstr{\@currext}{\@pkgextension}{%
- \expandafter\AtEndOfPackage
- }{%
- \expandafter\AtBeginDocument
- }%
- }%
- \else
- \expandafter\@firstofone
- \fi
- {\RequirePackage{\scr@symbols@font}}%
- \fi
- \fi
- \fi
-}
-\KOMA@kav@add{.%
-%<class> \KOMAClassFileName
-%<package> scrletter.\scr@pkgextension
-}{symbolicnames}{false}%
-% \end{macrocode}
-% \begin{macro}{\scr@symbols@font}
-% \changes{v3.27}{2019/03/21}{added}
-% The name of the font packages used for the symbols if symbols instead of
-% names are activated.
-% \begin{macro}{\scr@symbol@phone}
-% \changes{v3.27}{2019/03/21}{added}
-% The phone symbole.
-% \begin{macro}{\scr@symbol@fax}
-% \changes{v3.27}{2019/03/21}{added}
-% The fax symbole.
-% \begin{macro}{\scr@symbol@email}
-% \changes{v3.27}{2019/03/21}{added}
-% The e-mail symbol.
-% \begin{macro}{\scr@symbol@mobilephone}
-% \changes{v3.27}{2019/03/21}{added}
-% The mobile-phone symbol.
-% \begin{macro}{\scr@symbol@www}
-% \changes{v3.27}{2019/03/21}{added}
-% The world-wide-web symbol.
-% \begin{macrocode}
-\newcommand*{\scr@symbols@font}{}
-\newcommand*{\scr@symbol@phone}{\undefined}
-\newcommand*{\scr@symbol@fax}{\undefined}
-\newcommand*{\scr@symbol@email}{\undefined}
-\newcommand*{\scr@symbol@mobilephone}{\undefined}
-\newcommand*{\scr@symbol@www}{\undefined}
-%</option>
-% \end{macrocode}
-% \end{macro}^^A \scr@symbol@www
-% \end{macro}^^A \scr@symbol@mobilephone
-% \end{macro}^^A \scr@symbol@email
-% \end{macro}^^A \scr@symbol@fax
-% \end{macro}^^A \scr@symbol@phone
-% \end{macro}^^A \scr@symbols@font
-% \end{macro}^^A \if@scrsymbols
-% \end{option}^^A symbolicnames
-%
-% \begin{variable}{placeseparator,subjectseparator,ccseparator,enclseparator,
-% backaddressseparator}
-% \changes{v2.8q}{2002/01/22}{added}
-% \begin{variable}{phoneseparator,faxseparator,emailseparator,urlseparator,
-% mobilephoneseparator}
-% \changes{v2.8q}{2002/03/25}{added}
-% \changes{v3.12}{2013/05/29}{support for option \opt{symbolicnames}}
-% \changes{v3.27}{2019/03/21}{indirect saving of symbols}
-% \begin{variable}{zipcodeseparator}
-% \changes{v3.03}{2009/03/04}{added}
-% We also have variables with (predefined) output names and predefined
-% values. These are the separator variables.
-% \begin{macrocode}
-%<*body>
-\newkomavar[\usekomavar{place}]{placeseparator}
-\setkomavar{placeseparator}{,\nobreakspace}
-\newkomavar[\subjectname]{subjectseparator}
-\setkomavar{subjectseparator}{: }
-\newkomavar[\ccname]{ccseparator}
-\setkomavar{ccseparator}{: }
-\newkomavar[\enclname]{enclseparator}
-\setkomavar{enclseparator}{: }
-\newkomavar{backaddressseparator}
-\setkomavar{backaddressseparator}{,\nobreakspace}
-\newkomavar[\if@scrsymbols\scr@symbol@phone\else\phonename\fi]{phoneseparator}
-\setkomavar{phoneseparator}{\if@scrsymbols\else:\fi\nobreakspace}
-\newkomavar[%
- \if@scrsymbols\scr@symbol@mobilephone\else\mobilephonename\fi
-]{mobilephoneseparator}
-\setkomavar{mobilephoneseparator}{\usekomavar{phoneseparator}}
-\newkomavar[\if@scrsymbols\scr@symbol@fax\else\faxname\fi]{faxseparator}
-\setkomavar{faxseparator}{\if@scrsymbols\else:\fi\nobreakspace}
-\newkomavar[\if@scrsymbols\scr@symbol@email\else\emailname\fi]{emailseparator}
-\setkomavar{emailseparator}{\if@scrsymbols\else:\fi\nobreakspace}
-\newkomavar[\if@scrsymbols\scr@symbol@www\else\wwwname\fi]{urlseparator}
-\setkomavar{urlseparator}{\if@scrsymbols\else:\nobreakspace\fi}
-\newkomavar{zipcodeseparator}
-\setkomavar{zipcodeseparator}{\,--\,}
-% \end{macrocode}
-% \end{variable}^^A zipcodeseparator
-% \end{variable}^^A phoneseparator … mobilephoneseparator
-% \end{variable}^^A placeseparator … backaddressseparator
-%
-% \begin{variable}{addressee}
-% \changes{v3.27}{2019/03/24}{new variable}
-% The package needs a variable for the addressee (used for the address field).
-% \begin{variable}{togivenname}
-% \changes{v3.27}{2019/03/24}{new variable}
-% \begin{variable}{tofamilyname}
-% \changes{v3.27}{2019/03/24}{new variable}
-% The package allows to build \texttt{toname} by \texttt{togivenname} and
-% \texttt{tofamilyname}.
-% \begin{macrocode}
-%<*package&willbe>
-\newkomavar{addressee}
-\newkomavar{togivenname}
-\newkomavar{tofamilyname}
-%</package&willbe>
-% \end{macrocode}
-% \end{variable}^^A tofamilyname
-% \end{variable}^^A togivenname
-% \end{variable}^^A addressee
-%
-% \begin{variable}{fromname,fromaddress,fromemail,fromurl,frombank,
-% toname,toaddress,
-% fromphone,fromfax,
-% yourmail,yourref,
-% myref,customer,invoice,subject,date}
-% \changes{v2.8q}{2002/01/16}{added}
-% \begin{variable}{frommobilephone}
-% \changes{v3.12}{2013/05/29}{added}
-% \begin{command}{\date}
-% \changes{v3.17}{2015/03/05}{deprecated}
-% \begin{macro}{\scr@saved@date}
-% \changes{v3.17}{2015/03/05}{added}
-% Several variables with output name but without default value. Somehow
-% special is \var{subject}, because the output name also contains the
-% separator. To change the name only but not the separator change the output
-% name of \var{subjectseparator}. \var{toaddress} and \var{fromaddress} are
-% also special. Their output names are the values of \var{toname}
-% resp. \var{fromname}. But this is not used initially. The initial value of
-% \var{date} is \cs{@date}. So \cs{date} can still be used to change it, but
-% this is not recommended.
-% \begin{macrocode}
-\newkomavar[\headfromname]{fromname}
-\newkomavar[\usekomavar{fromname}]{fromaddress}
-\newkomavar[\headtoname]{toname}
-\newkomavar[\usekomavar{toname}]{toaddress}
-\newkomavar[\usekomavar*{phoneseparator}%
- \usekomavar{phoneseparator}]{fromphone}
-\newkomavar[\usekomavar*{mobilephoneseparator}%
- \usekomavar{mobilephoneseparator}]{frommobilephone}
-\newkomavar[\usekomavar*{faxseparator}%
- \usekomavar{faxseparator}]{fromfax}
-\newkomavar[\usekomavar*{emailseparator}%
- \usekomavar{emailseparator}]{fromemail}
-\newkomavar[\usekomavar*{urlseparator}%
- \usekomavar{urlseparator}]{fromurl}
-\newkomavar[\bankname]{frombank}
-\newkomavar[\yourrefname]{yourref}
-\newkomavar[\yourmailname]{yourmail}
-\newkomavar[\myrefname]{myref}
-\newkomavar[\customername]{customer}
-\newkomavar[\invoicename]{invoice}
-\newkomavar[\usekomavar*{subjectseparator}%
- \usekomavar{subjectseparator}]{subject}
-\newkomavar[\datename]{date}
-\setkomavar{date}{\@date}
-\newcommand*{\scr@saved@date}{}
-\let\scr@saved@date\date
-\renewcommand*{\date}[1]{%
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrletter}{%
- \string\date\space changes the internal \string\LaTeX\space date
- only.\MessageBreak
- You should note that this changes the default\MessageBreak
- value of variable `date' only as long as nobody\MessageBreak
- uses `\string\setkomavar` to change the content of\MessageBreak
- variable `date'.\MessageBreak
- Therefore, usage of `\string\setkomavar' is recommended\MessageBreak
- to change the letter's date%
- }%
- \scr@saved@date{#1}%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \scr@saved@date
-% \end{command}^^A \date
-% \end{variable}^^A frommobilephone
-% \end{variable}^^A fromname … date
-%
-%
-% \begin{macrocode}
-%</letter>
-% \end{macrocode}
-%
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-pagestyles.dtx b/macros/latex/contrib/koma-script/source/scrkernel-pagestyles.dtx
deleted file mode 100644
index 63d02d9763..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-pagestyles.dtx
+++ /dev/null
@@ -1,784 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-pagestyles.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-pagestyles.dtx 3744 2022-03-05 16:30:02Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-05 17:30:02 +0100 (Sa, 05. Mär 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3744 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-pagestyles.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (page styles)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{3}
-\begin{document}
-\DocInput{scrkernel-pagestyles.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2002/06/25}{first version after splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/03/05}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/03/05}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-pagestyles.dtx}
-% \title{The Code of the Default Page Styles of the
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \file{scrkernel-pagestyles.dtx} provides the default page styles of the
-% \KOMAScript{} classes. As already told decades ago, there are plans to
-% remove this code and to require the \KOMAScript{} page style
-% package---namely \pkg*{scrlayer-scrpage}---instead.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of the Page Styles of the \KOMAScript{} Classes}
-%
-% \begin{macrocode}
-%<*class>
-% \end{macrocode}
-%
-% \subsection{Options for the separation lines in page head and footer}
-%
-% \begin{option}{headsepline}
-% \changes{v2.95c}{2006/08/11}{arguments of \cs{PassOptonsToPackage} fixed}
-% \changes{v2.97c}{2007/04/19}{don't pass \opt{headinclude} to \pkg*{typearea}}
-% \changes{v2.98c}{2008/03/26}{set \opt{headinclude}}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.12}{2013/03/05}{if \pkg*{typearea} has not been loaded, pass
-% option to the package}
-% \changes{v3.17}{2015/03/10}{using value storage}
-% \changes{v3.18a}{2015/07/08}{arguments of \cs{PassOptionsToPackage} fixed
-% again}
-% \changes{v3.20}{2015/12/12}{don't pass option to \pkg*{typearea}}
-% \begin{macro}{\@hslfalse,\@hsltrue,\if@hsl}
-% Optional separation line between page head and text area---in other words:
-% below the page head.
-% \begin{macrocode}
-%<*option>
-\KOMA@ifkey{headsepline}{@hsl}%
-\KOMA@kav@add{.\KOMAClassFileName}{headsepline}{false}
-% \end{macrocode}
-% \begin{option}{headnosepline}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by
-% \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{headnosepline}{headsepline=false}
-% \end{macrocode}
-% \end{option}^^A headnosepline
-% \end{macro}^^A \if@hsl
-% \end{option}^^A headsepline
-%
-%
-% \begin{option}{footsepline}
-% \changes{v2.0e}{1994/08/14}{missing package at \cs{PassOptionsToPackage}
-% added}
-% \changes{v2.95c}{2006/08/11}{arguments of \cs{PassOptionsToPackage} fixed}
-% \changes{v2.97c}{2007/04/19}{don't pass \opt{footinclude} to
-% \pkg*{typearea}}
-% \changes{v2.98c}{2008/03/26}{set \opt{footinclude}}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.12}{2013/03/05}{if \textsf{typearea} has not been loaded, pass
-% option to package}
-% \changes{v3.12}{2013/08/26}{\cs{KOMA@options} replaced by \cs{KOMAoptions}}
-% \changes{v3.12}{2013/08/26}{recalculation of typing area}
-% \changes{v3.13}{2014/07/07}{no recalculation of typing area}
-% \changes{v3.13}{2014/07/07}{\opt{headinclude} mistake fixed}
-% \changes{v3.17}{2015/03/10}{using value storage}
-% \changes{v3.18a}{2015/07/08}{arguments of \cs{PassOptionsToPackage} fixed
-% again}
-% \changes{v3.20}{2015/12/12}{don't pass option to \pkg*{typearea}}
-% \begin{macro}{\@fslfalse,\@fsltrue,\if@fsl}
-% Optional separation line between text area and page footer---in other words:
-% above the page footer.
-% \begin{macrocode}
-\KOMA@ifkey{footsepline}{@fsl}%
-\KOMA@kav@add{.\KOMAClassFileName}{footsepline}{false}
-% \end{macrocode}
-% \begin{option}{footnosepline}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by
-% \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{footnosepline}{footsepline=false}
-%</option>
-% \end{macrocode}
-% \end{option}^^A footnosepline
-% \end{macro}^^A \if@fsl
-% \end{option}^^A footsepline
-%
-% \begin{option}{mpinclude}
-% \changes{v2.95}{2002/07/08}{moved to \pkg*{typearea}}
-% \end{option}{mpinclude}
-%
-%
-% \subsection{Definition of the standard page styles}
-%
-%
-% \begin{pgstyle}{plain,myheadings,headings}
-% \changes{v2.0e}{1994/08/10}{\cls*{scrbook} does not provide single-side page
-% styles}
-% \changes{v2.0e}{1994/08/17}{in single-side mode \cs{markboth} replaced by
-% \cs{markright}}
-% \changes{v2.1b}{1994/12/31}{in single-side mode \cs{markboth} replaced by
-% \cs{markright}}
-% \changes{v2.2a}{1995/02/07}{dot after section number in \cls*{scrbook} and
-% \cls*{scrreprt} removed}
-% \changes{v2.2a}{1995/02/07}{using \cs{subsectionmark} in single-side mode
-% with \cls*{scrartcl}}
-% \changes{v2.2a}{1995/02/07}{using \cs{sectionmark} in single-side mode with
-% \cls*{scrreprt}}
-% \changes{v2.2c}{1995/05/25}{dot after chapter number removed}
-% \changes{v2.2c}{1995/05/25}{numbers in running heads support CJK format
-% extension}
-% \changes{v2.3a}{1995/07/08}{because \cls{book} from version 1.2v provides
-% option \opt{oneside} single-side page styles added to \cls*{scrbook}}
-% \changes{v2.4f}{1996/10/08}{\cs{strut} added to page head}
-% \changes{v2.97c}{2007/07/18}{distinguish \opt{twoside} as late as possible}
-% \changes{v3.08}{2010/10/28}{\cs{noindent} added before usage of variable
-% \var{nexthead} or \var{nextfoot}}
-% \changes{v3.10}{2011/08/31}{using \cs{MakeMarkcase}}
-% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to \cs{Ifnumbered}}
-% In difference to the standard classes, the \KOMAScript{} classes use
-% pagination in the page footer for all page styles. Also an optional
-% separation line below the page head and above the page footer is
-% supported. The ugly usage of pool man's upper case for the running head of
-% the standard classes is also not used, but optional.
-% \begin{macro}{\set@tempdima@hw}
-% \changes{v2.8q}{2002/03/28}{added}
-% Because with \pkg*{typearea} option \opt{mpinclude} the head should be
-% extended to the margin note column, \cs{set@tempdima@hw} sets
-% \len{@tempdima} to the corresponding head width.
-% \begin{description}
-% \item[Note:] Package \pkg*{scrlayer} does not use this code, but allows
-% to configure the width of head and foot independent, which is much
-% better.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\set@tempdima@hw}{%
- \setlength{\@tempdima}{\textwidth}%
- \if@mincl
- \addtolength{\@tempdima}{\marginparsep}%
- \addtolength{\@tempdima}{\marginparwidth}%
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \set@tempdima@hw
-% \begin{fontelement}{pagenumber}
-% \changes{v2.8o}{2001/09/14}{added}
-% \begin{fontelement}{pagination}
-% \changes{v2.8o}{2001/09/14}{alias added}
-% \begin{fontelement}{pageheadfoot}
-% \changes{v2.98c}{2008/02/14}{added}
-% \begin{fontelement}{pagehead}
-% \changes{v2.8o}{2001/09/14}{added with warning added}
-% \changes{v2.98c}{2008/02/14}{changed to alias}
-% \changes{v2.97c}{2007/09/25}{warning changed}
-% \changes{v2.98c}{2008/02/14}{warning changed}
-% \begin{fontelement}{pagefoot}
-% \changes{v2.8o}{2001/09/14}{alias with warning added}
-% \changes{v2.98c}{2008/02/14}{changed to element}
-% \changes{v3.13}{2014/01/13}{warning changed}
-% \begin{macro}{\pnumfont,\headfont}
-% \changes{v2.8c}{2001/06/29}{\cs{normalcolor} added}
-% \begin{macro}{\footfont}
-% \changes{v2.98c}{2008/02/14}{added}
-% All these font settings are deprecated as user commands, but still valid as
-% internal macros, used to define font elements. Because of using the old
-% macros, we have to define elements manually instead of using \cs{newkomafont}.
-% \begin{macrocode}
-\newcommand*{\pnumfont}{\normalfont\normalcolor}
-\newcommand*{\headfont}{\normalfont\normalcolor\slshape}
-\newcommand*{\footfont}{}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*{\scr@fnt@pagenumber}{\pnumfont}
-\aliaskomafont{pagination}{pagenumber}
-\newcommand*{\scr@fnt@pageheadfoot}{\headfont}
-\aliaskomafont{pagehead}{pageheadfoot}
-%<*letter>
-\newcommand*{\scr@fnt@wrn@pagehead}[1]{%
- `pagehead' is only an alias of `pageheadfoot'.\MessageBreak
- Font of page foot will also be changed%
-}
-\newcommand*{\scr@fnt@pagefoot}{\footfont}
-%</letter>
-%<*!letter>
-\newcommand*{\scr@fnt@pagefoot}{\footfont}
-\newcommand*{\scr@fnt@wrn@pagefoot}[1]{%
- This class does not use font element `pagefoot'!\MessageBreak
- Maybe you should load package `scrlayer-scrpage',\MessageBreak
- before using this element%
-}
-%</!letter>
-% \end{macrocode}
-% \end{macro}^^A \footfont
-% \end{macro}^^A \pnumfont,\headfont
-% \end{fontelement}^^A pagefoot
-% \end{fontelement}^^A pagehead
-% \end{fontelement}^^A pageheadfoot
-% \end{fontelement}^^A pagination
-% \end{fontelement}^^A pagenumber
-%
-% \begin{command}{\pagemark}
-% \changes{v2.95}{2006/03/15}{available for all classes}
-% \changes{v3.05}{2010/02/05}{group added}
-% \begin{command}{\letterpagemark}
-% \changes{v3.17}{2015/03/20}{added for \pkg*{scrletter}}
-% The pagination used by all classes. Originally this has been defined to
-% simplify usage of \pkg{fancyhdr} (instead of
-% \pkg[https://www.ctan.org/pkg/koma-script-obsolete]{scrpage2}), because in
-% this case you just have to use \cs{pagemark} instead of \cs{thepage} in the
-% definitions of the fancy page style to support \KOMAScript. But neither the
-% author nor the users of \pkg{fancyhdr} have used it. However, now it is
-% useful for \pkg{scrlayer-scrpage} too. And because we use another pagination
-% for letters, we define a second command for \pkg*{scrletter}.
-% \begin{macrocode}
-%</body>
-%</class>
-%<*(class|letter)&body>
-\newcommand*{%
-%<class> \pagemark
-%<package> \letterpagemark
-}{%
- {\usekomafont{pagenumber}{%
-%<letter> \pagename\nobreakspace
- \thepage}}}
-%</(class|letter)&body>
-% \end{macrocode}
-% \end{command}^^A \letterpagemark
-% \end{command}^^A \pagemark
-% First of all we have to define the page styles of all classes but the letter
-% class.
-% \begin{macrocode}
-%<*class&!letter&body>
-\renewcommand*{\ps@plain}{%
- \renewcommand*{\@oddhead}{}%
- \let\@evenhead\@oddhead
- \renewcommand*{\@evenfoot}{%
- \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
- \if@fsl \hrule \vskip 3\p@ \fi
- \hb@xt@ \@tempdima{{\pagemark\hfil}}}}}%
- \renewcommand*{\@oddfoot}{%
- \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
- \if@fsl \hrule \vskip 3\p@ \fi
- \hb@xt@ \@tempdima{{\hfil\pagemark
- \if@twoside\else\hfil\fi}}}}\hss}%
-}%
-\newcommand*{\ps@headings}{\let\@mkboth\markboth
- \renewcommand*{\@evenhead}{%
- \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
- \hb@xt@ \@tempdima{{\headfont\strut\leftmark\hfil}}%
- \if@hsl \vskip 1.5\p@ \hrule \fi}}}%
- \renewcommand*{\@oddhead}{%
- \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
- \hb@xt@ \@tempdima{{\headfont\hfil\strut\rightmark
- \if@twoside\else\hfil\fi}}%
- \if@hsl \vskip 1.5\p@ \hrule \fi}}\hss}%
- \renewcommand*{\@evenfoot}{%
- \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
- \if@fsl \hrule \vskip 3\p@ \fi
- \hb@xt@ \@tempdima{{\pagemark\hfil}}}}}%
- \renewcommand*{\@oddfoot}{%
- \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
- \if@fsl \hrule \vskip 3\p@ \fi
- \hb@xt@ \@tempdima{{\hfil\pagemark
- \if@twoside\else\hfil\fi}}}}\hss}%
-%<*article>
- \renewcommand*{\sectionmark}[1]{%
- \if@twoside\expandafter\markboth\else\expandafter\markright\fi
- {\MakeMarkcase{\Ifnumbered{section}{\sectionmarkformat}{}##1}}{}}%
- \renewcommand*{\subsectionmark}[1]{%
- \if@twoside
- \markright{%
- \MakeMarkcase{\Ifnumbered{subsection}{\subsectionmarkformat}{}##1}%
- }%
- \fi
- }%
-%</article>
-%<*report|book>
- \renewcommand*{\chaptermark}[1]{%
- \if@twoside\expandafter\markboth\else\expandafter\markright\fi
- {\MakeMarkcase{\Ifnumbered{chapter}{%
-%<book> \if@mainmatter
- \chaptermarkformat
-%<book> \fi
- }{}##1}%
- }{}%
- }%
- \renewcommand*{\sectionmark}[1]{%
- \if@twoside
- \markright{\MakeMarkcase{\Ifnumbered{section}{\sectionmarkformat}{}%
- ##1}}%
- \fi
- }%
-%</report|book>
-}%
-\newcommand*{\ps@myheadings}{\let\@mkboth\@gobbletwo
- \renewcommand*{\@evenhead}{%
- \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
- \hb@xt@ \@tempdima{{\headfont\strut\leftmark\hfil}}%
- \if@hsl \vskip 1.5\p@ \hrule \fi}}}%
- \renewcommand*{\@oddhead}{%
- \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
- \hb@xt@ \@tempdima{{\headfont\hfil\strut\rightmark
- \if@twoside\else\hfil\fi}}%
- \if@hsl \vskip 1.5\p@ \hrule \fi}}\hss}%
- \renewcommand*{\@evenfoot}{%
- \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
- \if@fsl \hrule \vskip 3\p@ \fi
- \hb@xt@ \@tempdima{{\pagemark\hfil}}}}}%
- \renewcommand*{\@oddfoot}{%
- \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
- \if@fsl \hrule \vskip 3\p@ \fi
- \hb@xt@ \@tempdima{{\hfil\pagemark
- \if@twoside\else\hfil\fi}}}}\hss}%
-%<!article> \renewcommand*{\chaptermark}[1]{}%
-%<article> \renewcommand*{\subsectionmark}[1]{}%
- \renewcommand*{\sectionmark}[1]{}%
-}
-%</class&!letter&body>
-% \end{macrocode}
-% And now the page styles of the letter class.
-% \begin{macrocode}
-%<*class&letter&body>
-\renewcommand*{\ps@plain}{%
- \renewcommand*{\@oddhead}{%
- \vbox{\vbox{\hsize=\textwidth\hbox to\textwidth{%
- \parbox[b]{\textwidth}{\strut
- \ifnum\@pageat>-1
- \ifnum\@pageat<3
- \ifcase\@pageat\raggedright\or\centering\or\raggedleft\fi
- \pagemark
- \else
- \hfill
- \fi
- \else
- \hfill
- \fi
- }%
- }%
- \if@hsl\kern1pt\rule{\textwidth}{.4pt}\fi
- }%
- }%
- }%
- \let\@evenhead\@oddhead%
- \renewcommand*{\@oddfoot}{%
- \parbox[t]{\textwidth}{%
- \if@fsl
- {%
- \raggedright%
- \vskip-\baselineskip\vskip.4pt
- \hrulefill\\
- }%
- \fi
- \ifnum\@pageat>2
- \ifcase\@pageat\or\or\or\raggedright\or\centering\or\raggedleft\fi
- \strut\pagemark
- \else
- \hfill
- \fi
- }%
- }%
- \let\@evenfoot\@oddfoot
-}
-\newcommand*{\ps@headings}{\let\@mkboth\markboth
- \renewcommand*{\@oddhead}{%
- \vbox{%
- \vbox{\hsize=\textwidth\hbox to\textwidth{\headfont\noindent
- \usekomavar{nexthead}}}%
- \if@hsl\kern1pt\rule{\textwidth}{.4pt}\fi%
- }%
- }%
- \let\@evenhead\@oddhead
- \renewcommand*{\@oddfoot}{%
- \parbox[t]{\textwidth}{%
- \if@fsl
- {%
- \raggedright%
- \vskip-\baselineskip\vskip.4pt
- \hrulefill\\
- }%
- \fi
- \vbox{\hsize=\textwidth\hbox to\textwidth{\headfont\footfont\noindent
- \usekomavar{nextfoot}}}%
- }%
- }%
- \let\@evenfoot\@oddfoot
-}
-\newcommand*{\ps@myheadings}{%
- \ps@headings
- \let\@mkboth\@gobbletwo
-}
-%</class&letter&body>
-% \end{macrocode}
-% The letter package already uses \pkg*{scrlayer-scrpage}:
-% \begin{macrocode}
-%<*package&letter&body>
-\RequirePackage{scrlayer-scrpage}
-\newpairofpagestyles{letter}{%
- \clearpairofpagestyles
- \lehead[\ifnum\@pageat=\z@\pagemark\fi]%
- {\usekomavar{nexthead}}%
- \lohead[\ifnum\@pageat=\z@\pagemark\fi]%
- {\usekomavar{nexthead}}%
- \chead[\ifnum\@pageat=\@ne\pagemark\fi]%
- {}%
- \rehead[\ifnum\@pageat=\tw@\pagemark\fi]%
- {}%
- \rohead[\ifnum\@pageat=\tw@\pagemark\fi]%
- {}%
- \lefoot[\ifnum\@pageat=\thr@@\pagemark\fi]%
- {\usekomavar{nextfoot}}%
- \lofoot[\ifnum\@pageat=\thr@@\pagemark\fi]%
- {\usekomavar{nextfoot}}%
- \cfoot[\ifnum\@pageat=4 \pagemark\fi]%
- {}%
- \refoot[\ifnum\@pageat=5 \pagemark\fi]%
- {}%
- \rofoot[\ifnum\@pageat=5 \pagemark\fi]%
- {}%
-}
-%</package&letter&body>
-% \end{macrocode}
-% \end{pgstyle}^^A plain,myheadings,headings
-%
-% \begin{pgstyle}{notepaper}
-% \changes{v3.27}{2019/03/22}{plan added}
-% There are plans for \pkg*{scrletter} package to use a new layer
-% \texttt{notepaper} to define the notepaper. With this layer it is possible
-% to add several separated information blocks everywhere on the first
-% page. A \texttt{picture} mode layer is used, because this makes the
-% placement easier. It's a background layer, so the page contents are printed
-% above. We could also use an odd-side layer, but who knows \dots
-% \begin{macrocode}
-%<*package&letter&body&willbe>
-\DeclareNewLayer[%
- background,
- mode=picture,
- page,
- align=b,
- contents=\scr@notepaper@printallelements
-]{notepaper}
-% \end{macrocode}
-% For \cs{scr@notepaper@elements} see \file{scrkernel-notepaper.dtx}.
-%
-% A second layer is used for the foldmarks. Again it is a picture layer. But
-% this time it is an odd-sides-only layer.
-% \begin{macrocode}
-\DeclareNewLayer[%
- background,
- mode=picture,
- page,
- align=b,
- contents=\scr@foldmarks@printallelements
-]{foldmarks}
-% \end{macrocode}
-% For \cs{@hfoldmark} and \cs{@vfoldmark} see \file{scrkernel-notepaper.dtx}.
-%
-% Last but not least the page style. The foldmarks are below the notepaper.
-% \begin{macrocode}
-\DeclareNewPageStyleByLayers{notepaper}{foldmarks,notepaper}
-%</package&letter&body&willbe>
-% \end{macrocode}
-% \end{pgstyle}^^A notepaper
-%
-%
-% \subsection{Selection of page styles for special pages}
-%
-%
-% \begin{command}{\titlepagestyle,\indexpagestyle}
-% \changes{v2.8d}{2001/07/05}{added}
-% For pages with the in-page title and for the first page of the index,
-% \KOMAScript{} provides configurable page styles. These are initially
-% \pstyle{plain}.
-% \begin{macrocode}
-%<*class&!letter&body>
-\newcommand*{\titlepagestyle}{plain}
-\newcommand*{\indexpagestyle}{plain}
-%</class&!letter&body>
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\partpagestyle}
-% \changes{v2.8d}{2001/07/05}{added}
-% \changes{v3.00}{2008/08/05}{not with \cls*{scrartcl}}
-% \changes{v3.18}{2015/06/10}{indirect by \cs{DeclareSectionCommand}}
-% \end{command}
-% \begin{command}{\chapterpagestyle}
-% \changes{v2.8d}{2001/07/05}{added}
-% \changes{v3.18}{2015/05/20}{indirect by \cs{DeclareSectionCommand}}
-% \end{command}
-%
-%
-% \subsection{Selection of initial page style}
-%
-% The initial page style depends on the class:
-% \begin{macrocode}
-%<*class&body>
-%<report|article|letter>\pagestyle{plain}
-%<book>\pagestyle{headings}
-% \end{macrocode}
-% But the pagination is always done using Arabic numbers.
-% \begin{macrocode}
-\pagenumbering{arabic}
-%</class&body>
-% \end{macrocode}
-%
-% \section{Implementation of Interleaf Pages}
-%
-% \begin{description}
-% \item[ToDo:] Move this code to a new file \file{scrkernel-interleaf.dtx}.
-% \end{description}
-%
-% \begin{option}{cleardoublepage}
-% \changes{v2.95}{2004/08/24}{added}
-% \changes{v2.96a}{2007/01/03}{value \opt{\quotechar=current} fixed}
-% \changes{v2.98c}{2008/03/06}{\cs{def} replaced by \cs{let}, because of
-% option \opt{open}}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/10}{using value storage}
-% \begin{command}{\cleardoublestandardpage}
-% \changes{v2.8a}{2001/06/18}{added}
-% \changes{v2.96a}{2007/01/02}{default value added}
-% \begin{command}{\cleardoubleusingstyle}
-% \changes{v2.95}{2004/08/24}{added}
-% \changes{v3.06a}{2010/09/17}{\cs{thispagestyle} replaced by
-% \cs{pagestyle}}
-% \begin{command}{\cleardoubleemptypage,\cleardoubleplainpage}
-% \changes{v2.8a}{2001/06/18}{added}
-% \begin{command}{\cleardoubleoddpage,\cleardoubleoddstandardpage}
-% \changes{v2.98c}{2008/03/06}{added}
-% \begin{command}{\cleardoubleoddusingstyle}
-% \changes{v2.98c}{2008/03/06}{added}
-% \changes{v3.06a}{2010/09/17}{\cs{thispagestyle} replaced by
-% \cs{pagestyle}}
-% \begin{command}{\cleardoubleoddemptypage,\cleardoubleoddplainpage}
-% \changes{v2.98c}{2001/06/18}{added}
-% \begin{command}{\cleardoubleevenpage,\cleardoubleevenstandardpage}
-% \changes{v2.98c}{2008/03/06}{added}
-% \begin{command}{\cleardoubleevenusingstyle}
-% \changes{v2.98c}{2008/03/06}{added}
-% \changes{v3.06a}{2010/09/17}{\cs{thispagestyle} replaced by
-% \cs{pagestyle}}
-% \begin{command}{\cleardoubleevenemptypage,\cleardoubleevenplainpage}
-% \changes{v2.98c}{2001/06/18}{added}
-% \begin{command}{\cleardoublepage}
-% \changes{v2.98c}{2001/06/18}{always redefining it}
-% \changes{v2.98c}{2008/04/11}{new default from version 2.98c}
-% \changes{v3.13}{2014/03/01}{allow page style \pstyle{headings} as value for
-% class option}
-% \changes{v3.28}{2019/11/18}{\cs{ifnotundefined} replaced by
-% \cs{Ifnotundefined}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} replaced by \cs{Ifstr}}
-% With options \opt{twoside} and \opt{openright}, which are both default with
-% \cls*{scrbook} and available with \cls*{scrreprt}, \cs{chapter} imply
-% \cs{cleardoublepage}. Usually this results in a new odd page and can insert
-% an interleaf page. With the standard classes this interleaf page has the
-% current active page style and therefore can have a running head and
-% pagination. Mainstream typography uses empty pages without running head or
-% pagination for interleaf pages. Some users also want a pagination but no
-% running head. Option \opt{cleardoublepage} can be used to select all the
-% often wishes and also every other page style. The corresponding commands are
-% also defined and the option re-defines \cs{cleardoublepage} to use one of
-% these additional commands. Similar is for \cs{cleardoubleoddpage} and
-% \cs{cleardoubleevenpage}.
-% \begin{macrocode}
-%<*(class|scrextend)&option>
-\KOMA@key{cleardoublepage}{%
- \begingroup%
- \def\@tempc{%
- \endgroup%
- \KOMA@unknown@keyval{cleardoublepage}{#1}{%
- 'current' or any defined pagestyle e.g. 'empty','plain', 'headings'}%
- }%
- \Ifstr{#1}{current}{%
- \def\@tempc{\endgroup%
- \def\cleardoublepage{\cleardoublestandardpage}%
- \def\cleardoubleoddpage{\cleardoubleoddstandardpage}%
- \def\cleardoubleevenpage{\cleardoubleevenstandardpage}%
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.%
-%<package&extend> scrextend.\scr@pkgextension
-%<class> \KOMAClassFileName
- }{cleardoublepage}{current}%
- }%
- }{%
- \Ifnotundefined{ps@#1}{%
- \def\@tempc{\endgroup%
- \def\cleardoublepage{\cleardoublepageusingstyle{#1}}%
- \def\cleardoubleoddpage{\cleardoubleoddpageusingstyle{#1}}%
- \def\cleardoubleevenpage{\cleardoubleevenpageusingstyle{#1}}%
- \FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.%
-%<package&extend> scrextend.\scr@pkgextension
-%<class> \KOMAClassFileName
- }{cleardoublepage}{#1}%
- }%
- }{%
-% \end{macrocode}
-% At class loading time page style \pstyle{headings} is still undefined, but
-% should be allowed as value for option \opt{cleardoublepage}.
-% \begin{description}
-% \item[Note:] Page style \pstyle{plain} is already defined in the \LaTeX{}
-% kernel and therefore does not need special treatment.
-% \end{description}
-% \begin{macrocode}
-%<*class>
- \ifx\@currname\KOMAClassName
- \ifx\@currext\@clsextension
- \Ifstr{#1}{headings}{%
- \def\@tempc{\endgroup%
- \def\cleardoublepage{\cleardoublepageusingstyle{#1}}%
- \def\cleardoubleoddpage{\cleardoubleoddpageusingstyle{#1}}%
- \def\cleardoubleevenpage{\cleardoubleevenpageusingstyle{#1}}%
- \FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.\KOMAClassFileName}%
- {cleardoublepage}{#1}%
- }%
- }{}%
- \fi
- \fi
-%</class>
- }%
- }%
- \@tempc
-}
-\newcommand*{\cleardoubleoddstandardpage}{}
-\let\cleardoubleoddstandardpage=\cleardoublepage
-\newcommand*{\cleardoubleoddpageusingstyle}[1]{\clearpage
- {\pagestyle{#1}\cleardoubleoddstandardpage}}
-\newcommand*{\cleardoubleoddemptypage}{\cleardoubleoddpageusingstyle{empty}}
-\newcommand*{\cleardoubleoddplainpage}{\cleardoubleoddpageusingstyle{plain}}
-\newcommand*{\cleardoubleevenstandardpage}{%
- \clearpage
- \if@twoside\ifodd\c@page
- \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi
- \fi\fi
-}
-\newcommand*{\cleardoubleevenpageusingstyle}[1]{\clearpage
- {\pagestyle{#1}\cleardoubleevenstandardpage}}
-\newcommand*{\cleardoubleevenemptypage}{\cleardoubleevenpageusingstyle{empty}}
-\newcommand*{\cleardoubleevenplainpage}{\cleardoubleevenpageusingstyle{plain}}
-\newcommand*{\cleardoublestandardpage}{\cleardoubleoddstandardpage}
-\renewcommand*{\cleardoublepage}{%
- \expandafter\ifnum \@nameuse{scr@v@2.98c}<\scr@compatibility\relax
- \cleardoubleemptypage
- \else
- \cleardoublestandardpage
- \fi
-}
-\KOMA@kav@add{.%
-%<package&extend> scrextend.\scr@pkgextension
-%<class> \KOMAClassFileName
-}{cleardoublepage}{%
- \expandafter\ifnum \scr@v@is@gt{2.98c}empty\else current\fi
-}
-% \end{macrocode}
-% We expand the value at the end of the class or package.
-% \begin{macrocode}
-%<package&extend>\AtEndOfPackage{%
-%<class>\AtEndOfClass{%
- \KOMAoptionOf[\expandafter\edef\expandafter\@tempa\@firstofone]%
- {%
-%<package&extend> scrextend.\scr@pkgextension
-%<class> \KOMAClassFileName
- }{cleardoublepage}%
- \KOMA@kav@removekey{.%
-%<package&extend> scrextend.\scr@pkgextension
-%<class> \KOMAClassFileName
- }{cleardoublepage}%
- \KOMA@kav@xadd{.%
-%<package&extend> scrextend.\scr@pkgextension
-%<class> \KOMAClassFileName
- }{cleardoublepage}{\@tempa}%
-}
-\newcommand*{\cleardoubleoddpage}{\cleardoubleoddemptypage}
-\newcommand*{\cleardoubleevenpage}{\cleardoubleevenemptypage}
-\newcommand*{\cleardoublepageusingstyle}[1]{\clearpage
- {\pagestyle{#1}\cleardoublestandardpage}}
-\newcommand*{\cleardoubleemptypage}{\cleardoublepageusingstyle{empty}}
-\newcommand*{\cleardoubleplainpage}{\cleardoublepageusingstyle{plain}}
-% \end{macrocode}
-% \end{command}^^A \cleardoublepage
-% \end{command}^^A \cleardoubleevenplainpage,\cleardoubleevenemptypage
-% \end{command}^^A \cleardoubleevenusingstyle
-% \end{command}^^A \cleardoubleevenpage,\cleardoubleevenstandardpage
-% \end{command}^^A \cleardoubleoddemptypage,\cleardoubleoddplainpage
-% \end{command}^^A \cleardoubleoddusingstyle
-% \end{command}^^A \cleardoubleoddpage,\cleardoubleoddstandardpage
-% \end{command}^^A \cleardoubleemptypage,\cleardoubleplainpage
-% \end{command}^^A \cleardoubleusingstyle
-% \end{command}^^A \cleardoublestandardpage
-% \begin{option}{cleardoubleempty,cleardoubleplain,cleardoublestandard}
-% \changes{v2.8a}{2001/06/18}{added}
-% \changes{v2.8q}{2001/11/06}{\cs{cleardoublestandardpage} replaced by
-% \cs{cleardoublestandard}}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by
-% \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macrocode}
-%<*class>
-\KOMA@DeclareDeprecatedOption{cleardoubleempty}{cleardoublepage=empty}
-\KOMA@DeclareDeprecatedOption{cleardoubleplain}{cleardoublepage=plain}
-\KOMA@DeclareDeprecatedOption{cleardoublestandard}{cleardoublepage=current}
-%</class>
-%</(class|scrextend)&option>
-% \end{macrocode}
-% \end{option}^^A cleardoublestandard,cleardoubleplain,cleardoubleempty
-% \end{option}^^A cleardoublepage
-%
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx b/macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx
deleted file mode 100644
index 9c65fcd6bd..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx
+++ /dev/null
@@ -1,724 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-paragraphs.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-paragraphs.dtx 3745 2022-03-07 09:14:34Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-07 10:14:34 +0100 (Mo, 07. Mär 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3745 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-paragraphs.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script
- (paragraphs)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{3}
-\begin{document}
-\DocInput{scrkernel-paragraphs.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2002/06/25}{first version after splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/03/07}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/03/07}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-paragraphs.dtx}
-% \title{The Code Related to Paragraph Building and Page Building of
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \file{scrkernel-paragraphs.dtx} does all the things about configuration of
-% paragraphs and page breaking. Some of them are very special for
-% \KOMAScript.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of Paragraphs and Pages}
-%
-% Almost all of this code is for the classes only.
-% \begin{macrocode}
-%<*class>
-% \end{macrocode}
-%
-% \subsection{Options and macros to handle the paragraph layout}
-%
-% Already from version 2.8i \KOMAScript can handle paragraph skips instead of
-% indenting paragraphs. But the corresponding code has changed a lot over the
-% years.
-%
-% \begin{command}{\setparsizes}
-% \changes{v2.95}{2004/11/05}{added}
-% \changes{v3.17}{2015/03/10}{support for internal option value storage}
-% \changes{v3.19}{2015/07/29}{\cs{par@update} should not reset itself to
-% \cs{default@par@update} in the document preamble}
-% \begin{macro}{\f@parindent}
-% \changes{v2.95}{2004/11/05}{added}
-% \begin{macro}{\f@parskip,\f@parfillskip}
-% \changes{v2.95}{2004/11/05}{added}
-% \changes{v2.95}{2004/11/05}{meaning changed}
-% \begin{macro}{\scr@parindent}
-% \changes{v2.95}{2004/11/05}{added}
-% \begin{macro}{\scr@parskip,\scr@parfillskip}
-% \changes{v2.95}{2004/11/05}{added}
-% \changes{v2.95}{2004/11/05}{meaning changed}
-% Command
-% \begin{quote}
-% \cs{setparsizes}\marg{indent}\marg{skip}\marg{fill}
-% \end{quote}
-% not only sets the three main paragraph parameters of \TeX: \len{parskip},
-% \len{parindent}, \len{parfillskip}. Because of option \opt{parskip=relative}
-% it has to use a kind of delayed setting of these parameters at least at the
-% document preamble. So these settings are not activated until
-% \cs{selectfont}. To do so, not the \TeX{} parameters are changed, but the
-% current values of the \TeX{} parameters are stored to \cs{f@parindent},
-% \cs{f@parskip} and \cs{f@parfillskip} and the new values are stored to
-% \cs{scr@parindent}, \cs{scr@parskip} and \cs{scr@parfillskip}
-% only. Additionally \cs{par@update} is used to activate these new
-% values. Later we will use a hook to automatically execute \cs{par@update}
-% with every \cs{selectfont}. The current value storage is initialized twice:
-% First immediately and second inside at the end of the class.
-% \begin{description}
-% \item[ToDo:] Is the second initialization really needed? Wouldn't it be done
-% with the class options? Here user changes are not to be expected, because
-% we are still inside the class and therefore there is no user interaction.
-% \end{description}
-% \begin{macro}{\par@update}
-% \changes{v2.95}{2004/11/05}{added}
-% \changes{v3.20}{2016/02/22}{\cs{AtBeginDocument} code added}
-% \begin{macro}{\default@par@update}
-% \changes{v2.95}{2004/11/05}{added}
-% \begin{macro}{\par@updaterelative}
-% \changes{v2.95}{2004/11/05}{added}
-% \changes{v3.36}{2022/03/07}{using \cs{reserved@a} instead of \cs{@tempa}}
-% \begin{macro}{\parindent@update,\parskip@update,\parfillskip@update}
-% \changes{v2.95}{2004/11/05}{added}
-% \changes{v3.36}{2022/03/07}{using \cs{reserved@a} and \cs{reserved@b}
-% instead if \cs{@tempa} and \cs{@tempb}}
-% The initial \cs{par@update} action is to do nothing. But with
-% \opt{parskip=relative} it always and after \cs{setparsizes} it once (or in
-% the document preamble also always) has to reactivate the new values. This is
-% done using \cs{default@par@update} and
-% \cs{par@updaterelative}. \cs{default@par@update} is either a do nothing
-% (\opt{parskip=absolute}) or \cs{par@updaterelative}
-% (\opt{parskip=relative}). \cs{par@updaterelative} does the real update.
-% \begin{description}
-% \item[ToDo:] Sometimes internally \cs{par@updaterelative} is used instead of
-% \cs{selectfont} to do an immediate update after \cs{setparsizes}. But is
-% this correct? Wouldn't be \cs{selectfont} the correct action, to also
-% reset the definition of \cs{par@update}?
-% \item[ToDO:] Does the \cs{AtBeginCode} execution of \cs{par@update} make
-% sense? The \cs{par@update} is done after the initial \cs{normalsize} and
-% the initial \cs{selectfont}. So shouldn't this be enough?
-% \end{description}
-% \begin{macrocode}
-%<*option>
-\newcommand*{\setparsizes}[3]{%
- \edef\f@parindent{\the\parindent}%
- \edef\f@parskip{\the\parskip}%
- \edef\f@parfillskip{\the\parfillskip}%
- \def\scr@parindent{#1}%
- \def\scr@parskip{#2}%
- \def\scr@parfillskip{#3}%
- \def\par@update{%
- \if@atdocument\let\par@update\default@par@update\fi
- \par@updaterelative
- }%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{false}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{never}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{full}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{full-}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{full+}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{full*}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{half}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{half-}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{half+}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{half*}%
-}
-\newcommand*{\f@parindent}{\the\parindent}
-\newcommand*{\f@parskip}{\the\parskip}
-\newcommand*{\f@parfillskip}{\the\parfillskip}
-\newcommand*{\scr@parindent}{1em}
-\newcommand*{\scr@parskip}{\z@}
-\newcommand*{\scr@parfillskip}{\z@ \@plus 1fil}
-\AtEndOfClass{%
- \edef\f@parindent{\the\parindent}%
- \edef\f@parskip{\the\parskip}%
- \edef\f@parfillskip{\the\parfillskip}%
-}
-\newcommand*{\par@update}{}
-\let\par@update\relax
-\newcommand*{\default@par@update}{}
-\let\default@par@update\relax
-\AtBeginDocument{\par@update}
-%</option>
-% \end{macrocode}
-% Because of the currently complicated initialization, i.e., when switching
-% between \cs{parskip=absolute} and \cs{parskip=relative}, we currently define
-% \cs{par@updaterelative} not before the class options has been processed. New
-% values are only set, if between the last \cs{setparsizes} and the current
-% \cs{par@updaterelative} (e.g. inside \cs{selectfont}) the user has not
-% changed the \TeX{} variables. If he has changed the \TeX{} variables instead
-% of using \cs{setparsizes} we think, he does not want any other change. And
-% because of to be able to do the tests inside a group without permanent
-% change of \cs{reserved@a} we use three additional helpers.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\par@updaterelative}{%
- \begingroup
- \edef\reserved@a{\the\parindent}\ifx\reserved@a\f@parindent
- \aftergroup\parindent@update
-%<*trace>
- \else
- \ClassInfo{\KOMAClassName}{\string\parindent\space not changed}%
-%</trace>
- \fi
- \edef\reserved@a{\the\parskip}\ifx\reserved@a\f@parskip
- \aftergroup\parskip@update
-%<*trace>
- \else
- \ClassInfo{\KOMAClassName}{\string\parskip\space not changed}%
-%</trace>
- \fi
- \edef\reserved@a{\the\parfillskip}\ifx\reserved@a\f@parfillskip
- \aftergroup\parfillskip@update
-%<*trace>
- \else
- \ClassInfo{\KOMAClassName}{\string\parfillskip\space not changed}%
-%</trace>
- \fi
- \endgroup
-}
-\newcommand*{\parindent@update}{%
- \scr@defaultunits\parindent\scr@parindent
- \begingroup
- \let\reserved@b\endgroup
- \edef\reserved@a{\the\parindent}\ifx\reserved@a\f@parindent\else
- \def\reserved@b{\endgroup\edef\f@parindent{\the\parindent}}%
-%<trace> \ClassInfo{\KOMAClassName}{\string\parindent=\the\parindent}%
- \fi
- \reserved@b
-}
-\newcommand*{\parskip@update}{%
- \scr@defaultunits\parskip\scr@parskip
- \begingroup
- \let\reserved@b\endgroup
- \edef\reserved@a{\the\parskip}\ifx\reserved@a\f@parskip\else
- \def\reserved@b{\endgroup\edef\f@parskip{\the\parskip}}%
-%<trace> \ClassInfo{\KOMAClassName}{\string\parskip=\the\parskip}%
- \fi
- \reserved@b
-}
-\newcommand*{\parfillskip@update}{%
- \scr@defaultunits\parfillskip\scr@parfillskip
- \begingroup
- \let\reserved@b\endgroup
- \edef\reserved@a{\the\parfillskip}\ifx\reserved@a\f@parfillskip\else
- \def\reserved@b{\endgroup\edef\f@parfillskip{\the\parfillskip}}%
-%<trace> \ClassInfo{\KOMAClassName}{\string\parfillskip=\the\parfillskip}%
- \fi
- \reserved@b
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \parindent@update,\parskip@update,\parfillskip@update}
-% \end{macro}^^A \par@updaterelative
-% \end{macro}^^A \default@par@update
-% \end{macro}^^A \par@update
-% \end{macro}^^A \scr@parskip,\scr@parfillskip
-% \end{macro}^^A \scr@parindent
-% \end{macro}^^A \f@parskip,\f@parfillskip
-% \end{macro}^^A \f@parindent
-% \end{command}^^A \setparsizes
-%
-% \begin{option}{parskip}
-% \changes{v2.8i}{2001/07/22}{added}
-% \changes{v2.95}{2006/03/11}{changed into \pkg{keyval} option}
-% \changes{v3.08}{2010/12/14}{value \opt{\quotechar=never} added}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}.}
-% \changes{v3.17}{2015/03/10}{using value storage}
-% \changes{v3.25}{2017/09/27}{typo fix in \cs{FamilyKeyStateUnknownValue}}
-% \changes{v3.26b}{2019/02/01}{\cs{baselineskip} replaced by 1\cs{baselineskip}}
-% \begin{option}{parindent,parskip-,parskip+,parskip*,
-% halfparskip,halfparskip-,halfparskip+,halfparskip*}
-% \changes{v2.8i}{2001/07/22}{added}
-% \changes{v2.95}{2006/03/11}{obsolete}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by
-% \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% Originally we have had nine options for all the paragraph indent and skip
-% settings. Using \pkg*{scrbase} we have only one option with additional
-% settings for relative and absolute values and paragraph indent without glue
-% for paragraph skip.
-% \begin{macrocode}
-%<*option>
-\KOMA@key{parskip}[true]{%
- \begingroup
- \KOMA@set@ncmdkey{parskip}{@tempa}{%
- {never}{0},%
- {false}{1},{off}{1},{no}{1},%
- {full-}{2},%
- {half-}{3},%
- {full}{4},{true}{4},{on}{4},{yes}{4},%
- {half}{5},%
- {full+}{6},%
- {half+}{7},%
- {full*}{8},%
- {half*}{9},%
- {relative}{10},%
- {absolute}{11}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \aftergroup\FamilyKeyStateProcessed
- \ifcase\number\@tempa% 0
- \endgroup
- \setparsizes{1em}{\z@}{\z@ \@plus 1fil}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{never}%
- \if@atdocument\AfterKOMAoptions{\selectfont}\fi
- \or% 1
- \endgroup
- \setparsizes{1em}{\z@ \@plus \p@}{\z@ \@plus 1fil}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{false}%
- \if@atdocument\AfterKOMAoptions{\selectfont}\fi
- \or% 2
- \endgroup
- \setparsizes{\z@}{1\baselineskip \@plus .1\baselineskip}{%
- \z@ \@plus 1fil}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{full-}%
- \if@atdocument\AfterKOMAoptions{\selectfont}\fi
- \or% 3
- \endgroup
- \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{%
- \z@ \@plus 1fil}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{half-}%
- \if@atdocument\AfterKOMAoptions{\selectfont}\fi
- \or% 4
- \endgroup
- \setparsizes{\z@}{1\baselineskip \@plus .1\baselineskip}{%
- 1em \@plus 1fil}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{full}%
- \if@atdocument\AfterKOMAoptions{\selectfont}\fi
- \or% 5
- \endgroup
- \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{%
- 1em \@plus 1fil}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{half}%
- \if@atdocument\AfterKOMAoptions{\selectfont}\fi
- \or% 6
- \endgroup
- \setparsizes{\z@}{1\baselineskip \@plus .1\baselineskip}{%
- .3333\linewidth\@plus 1fil}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{full+}%
- \if@atdocument\AfterKOMAoptions{\selectfont}\fi
- \or% 7
- \endgroup
- \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{%
- .3333\linewidth \@plus 1fil}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{half+}%
- \if@atdocument\AfterKOMAoptions{\selectfont}\fi
- \or% 8
- \endgroup
- \setparsizes{\z@}{1\baselineskip \@plus .1\baselineskip}{%
- .25\linewidth \@plus 1fil}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{full*}%
- \if@atdocument\AfterKOMAoptions{\selectfont}\fi
- \or% 9
- \endgroup
- \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{%
- .25\linewidth \@plus 1fil}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{half*}%
- \if@atdocument\AfterKOMAoptions{\selectfont}\fi
- \or% 10
- \endgroup
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{absolute}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{relative}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{relative}%
- \ifx\par@updaterelative\undefined
- \expandafter\AtEndOfClass
- \else
- \expandafter\@firstofone
- \fi
- {%
- \ifx\par@update\default@par@update
- \let\par@update\par@updaterelative
- \fi
- \let\default@par@update=\par@updaterelative
- }%
- \or%11
- \endgroup
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{absolute}%
- \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{relative}%
- \KOMA@kav@add{.\KOMAClassFileName}{parskip}{absolute}%
- \ifx\par@updaterelative\undefined
- \expandafter\AtEndOfClass
- \else
- \expandafter\@firstofone
- \fi
- {%
- \ifx\par@update\default@par@update
- \let\par@update\relax
- \fi
- \let\default@par@update=\relax
- }%
- \else% should never be
- \endgroup
- \fi
- \else
- \endgroup
- \FamilyKeyStateUnknownValue
- \fi
-}
-\KOMA@DeclareDeprecatedOption{parskip-}{parskip=full-}
-\KOMA@DeclareDeprecatedOption{parskip+}{parskip=full+}
-\KOMA@DeclareDeprecatedOption{parskip*}{parskip=full*}
-\KOMA@DeclareDeprecatedOption{halfparskip}{parskip=half}
-\KOMA@DeclareDeprecatedOption{halfparskip-}{parskip=half-}
-\KOMA@DeclareDeprecatedOption{halfparskip+}{parskip=half+}
-\KOMA@DeclareDeprecatedOption{halfparskip*}{parskip=half*}
-\KOMA@DeclareDeprecatedOption{parindent}{parskip=false}
-\KOMA@kav@add{.\KOMAClassFileName}{parskip}{false}
-\KOMA@kav@add{.\KOMAClassFileName}{parskip}{absolute}
-%</option>
-% \end{macrocode}
-% \end{option}^^A parindent … halfparskip*
-% \end{option}^^A parskip
-%
-% \changes{v2.8i}{2001/07/22}{don't change \cs{baselinestretch}}
-%
-% \begin{length}{\lineskip,\normallineskip}
-% The minimum line skip.
-% \begin{macrocode}
-%<*body>
-\setlength{\lineskip}{\p@}
-\setlength{\normallineskip}{\p@}
-% \end{macrocode}
-% \end{length}
-%
-% \begin{command}{\selectfont}
-% \changes{v2.95}{2004/11/05}{added}
-% \changes{v3.33}{2021/01/21}{from \LaTeX{} 2021/06/01 use hook instead of
-% patch}
-% \begin{macro}{\scr@selectfont,\scr@new@selectfont}
-% \changes{v2.95}{2006/04/14}{added}
-% \changes{v3.10}{2010/09/28}{\pkg{everysel} support fixed}
-% \changes{v3.10}{2010/09/28}{\pkg{tracefnt} supported}
-% \changes{v3.10b}{2011/03/13}{\pkg{everysel} can be loaded inside
-% \cs{begin\{document\}}}
-% Because of \opt{parskip=relative} we need a hook to activate the changes of
-% the paragraph values. A good place to do so is \cs{selectfont}. With
-% \KOMAScript{} 3.00 we needed to patch this command. But from \LaTeX{}
-% 2021/06/01 we can use a new generic hook.
-% \begin{description}
-% \item[Note:] We use 2021/05/01 instead of the official \LaTeX{} release date,
-% because there were relevant earlier \LaTeX{} developer releases with that
-% date.
-% \end{description}
-% \begin{macrocode}
-\IfLTXAtLeastTF{2021/05/01}{%
- \AddToHook{selectfont}{\par@update}%
- \AfterPackage{everysel}{%
- \IfPackageAtLeastTF{everysel}{2021/01/18}{}{%
- \ClassError{\KOMAClassName}{%
- incompatible `everysel' detected
- }{%
- You are using an old version of `everysel' in combination with a
- LaTeX\MessageBreak
- version >= 2021/06/01 and KOMA-Script >= 3.33. This combination
- is\MessageBreak
- not supported.\MessageBreak
- You could switch back to an older LaTeX using package
- `latexrelease'.\MessageBreak
- But I recommend to update `everysel'%
- }%
- }%
- }%
- \AfterPackage{tracefnt}{%
- \IfPackageAtLeastTF{tracefnt}{2020/12/22}{}{%
- \ClassError{\KOMAClassName}{%
- incompatible `tracefnt' detected
- }{%
- `tracefnt' is a LaTeX base package and therefore should be updated
- together\MessageBreak
- with LaTeX kernel. So this should never happen! Please check
- your\MessageBreak
- LaTeX installation%
- }%
- }%
- }%
-}{%
- \newcommand*{\scr@selectfont}{}
- \expandafter\let\expandafter\scr@selectfont\csname selectfont \endcsname
- \BeforePackage{everysel}{%
- \AtBeginDocument{%
- \expandafter\ifx\csname selectfont \endcsname\scr@new@selectfont\else
- \ClassWarningNoLine{\KOMAClassName}{%
- discard change of \string\selectfont}%
- \fi
- \expandafter\let\csname selectfont \endcsname\scr@selectfont
- }%
- }%
- \AfterPackage{everysel}{%
- \scr@ifundefinedorrelax{@EverySelectfont@Init}{%
- \expandafter\ifx\csname selectfont \endcsname\scr@new@selectfont
- \ClassWarningNoLine{\KOMAClassName}{%
- \string\selectfont\space already changed}%
- \else
- \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}%
- \expandafter\let\expandafter\scr@new@selectfont
- \csname selectfont \endcsname
- \fi
- }{%
- \g@addto@macro\@EverySelectfont@Init{%
- \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}%
- \expandafter\let\expandafter\scr@new@selectfont
- \csname selectfont \endcsname
- }%
- }%
- }%
- \AfterPackage{tracefnt}{%
- \expandafter\let\expandafter\scr@selectfont\csname selectfont \endcsname
- \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}%
- \expandafter\let\expandafter\scr@new@selectfont\csname selectfont \endcsname
- }%
- \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}
- \newcommand*{\scr@new@selectfont}{}
- \expandafter\let\expandafter\scr@new@selectfont\csname selectfont \endcsname
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@selectfont,\scr@new@selectfont
-% \end{command}^^A \selectfont
-%
-% \begin{macro}{\scr@defaultunits}
-% \changes{v2.95}{2004/11/05}{added}
-% \changes{v3.19}{2015/08/22}{\cs{setlength} replaced because of \pkg{tikz}}
-% \begin{macro}{\scr@@defaultunits}
-% \changes{v2.95}{2004/11/05}{added}
-% \begin{macro}{\scr@@@defaultunits}
-% \changes{v2.95}{2004/11/05}{added}
-% \changes{v3.19}{2015/08/22}{\cs{setlength} and \cs{addtolength} replaced
-% because of \pkg{tikz}}
-% Above we've already used \cs{scr@defaultunits} inside
-% \cs{par@updaterelative}. This is very similar to the \LaTeX{} kernel macro
-% \cs{@defaultunits}, but accepts dimensions or skips as first and second
-% value.
-% \begin{macrocode}
-\newcommand*{\scr@defaultunits}[2]{%
- \begingroup
- \edef\@tempa{#2}%
- \expandafter\scr@@defaultunits\expandafter#1\@tempa plusplus\@nnil
- \edef\@tempa{\noexpand\endgroup\noexpand#1\the\glueexpr #1\relax}%
- \@tempa
-}
-\newcommand*{\scr@@defaultunits}{}
-\def\scr@@defaultunits#1#2plus#3plus#4\@nnil{%
- \ifx\relax#3\relax
- \scr@@@defaultunits#1{}#2minusminus\@nnil
- \else
- \scr@@@defaultunits#1{#2}#3minusminus\@nnil
- \fi
-}
-\newcommand*{\scr@@@defaultunits}{}
-\def\scr@@@defaultunits#1#2#3minus#4minus#5\@nnil{%
- \ifx\relax#2\relax
- \@defaultunits\@tempskipa#3pt\relax\@nnil
- #1\@tempskipa
- \else
- \@defaultunits\@tempskipa\z@\@plus#3pt\relax\@nnil
- #1\@tempskipa
- \@defaultunits\@tempskipa#2pt\relax\@nnil
- \advance#1\@tempskipa
- \fi
- \ifx\relax#4\relax\else
- \@defaultunits\@tempskipa\z@\@minus #4pt\relax\@nnil
- \advance#1\@tempskipa
- \fi
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \scr@@@defaultunits
-% \end{macro}^^A \scr@@defaultunits
-% \end{macro}^^A \scr@defaultunits
-%
-% \subsection{Extra list code}
-%
-% \begin{macro}{\@list@extra}
-% \changes{v2.8q}{2001/11/06}{added}
-% \changes{v2.95c}{2006/08/03}{\len{parsep} fixed}
-% \begin{macro}{\add@extra@listi}
-% \changes{v2.9h}{2002/09/03}{added}
-% Some parameters of lists have to change, depending on the settings for
-% paragraphs.
-% \begin{description}
-% \item[ToDo:] Move this code to \file{scrkernel-listsandtabulars.dtx} or
-% \file{scrkernel-fontsizes.dtx}.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\@list@extra}{%
- \ifdim\parskip>\z@\topsep\z@\parsep\parskip\itemsep\z@\fi
-}
-\newcommand*{\add@extra@listi}[1]{%
- \expandafter\let\csname #1@listi\endcsname=\@listi
- \def\@listi{\csname #1@listi\endcsname\@list@extra}%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@list@extra
-% \end{macro}^^A \add@extra@listi
-%
-% \subsection{Patching other packages}
-%
-% \begin{macro}{\deferred@thm@head}
-% \changes{v3.27}{2019/02/10}{new patch of \textsf{amsthm}}
-% Unfortunatly \pkg{amsthm} has a problem if a class handles \len{topsep}
-% this way, because it is only prepared for the case, that \len{parskip} and
-% \len{parsep} are changed manually without influence to \len{topsep}. So the
-% initial distance is missing. To avoid this problem, we need to patch the
-% package's internal command \cs{deferred@thm@head}. This is not nice, but
-% unfortunaltly needed.
-% \begin{description}
-% \item[ToDo:] Move this code to the package patch code of
-% \file{scrkernel-miscellaneous.dtx} resp. a new file as noted there.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\AfterPackage{amsthm}{%
- \RequirePackage{xpatch}%
- \xpatchcmd{\deferred@thm@head}{\addvspace{-\parskip}}{}{%
- \ClassInfoNoLine{\KOMAClassName}{%
- amsthm's \string\deferred@thm@head\space patched}%
- }{%
- \ClassWarningNoLine{\KOMAClassName}{%
- cannot patch amsthm's \string\deferred@thm@head.\MessageBreak
- This could result in wrong spacing before theorem\MessageBreak
- environments defined by package `amsthm'%
- }%
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Extra code for font sizes}
-%
-% \begin{description}
-% \item[ToDo:] Move this to \file{scrkernel-fontsizes.dtx}.
-% \end{description}
-% \begin{macrocode}
-% \end{macrocode}
-%
-% \changes{v2.98c}{2008/03/26}{changed to be used in font size files}
-% \changes{v3.17}{2015/03/25}{update of paragraph settings}
-% \begin{macro}{\@listi}
-% \changes{v2.98c}{2008/03/27}{\cs{g@addto@macro} replaced by \cs{l@addto@macro}}
-% \changes{v3.01}{2008/11/13}{\cs{@listi} wird auf jeden Fall ausgeführt}
-% \begin{macro}{\@listI}
-% \begin{macro}{\@listii,\@listiii}
-% \changes{v2.98c}{2008/03/27}{\cs{g@addto@macro} replaced by \cs{l@addto@macro}}
-% \begin{command}{\footnotesize,\small}
-% \changes{v2.9h}{2002/09/03}{improved}
-% \changes{v2.98c}{2008/03/27}{\cs{g@addto@macro} replaced by \cs{l@addto@macro}}
-% \begin{macrocode}
-%</class>
-%<*class|clo>
-%<*body|10pt|11pt|12pt>
-%<10pt|11pt|12pt>\@ifundefined{@list@extra}{}{%
-%<10pt|11pt|12pt> \expandafter\ifnum\scr@v@is@ge{3.17}\par@updaterelative\fi
- \l@addto@macro{\@listi}{\@list@extra}%
- \let\@listI=\@listi
- \l@addto@macro{\@listii}{\@list@extra}%
- \l@addto@macro{\@listiii}{\@list@extra}%
- \l@addto@macro{\footnotesize}{\protect\add@extra@listi{ftns}}%
- \l@addto@macro{\small}{\protect\add@extra@listi{sml}}%
-%<10pt|11pt|12pt>}
-%<10pt|11pt|12pt>\@listi
-%</body|10pt|11pt|12pt>
-%</class|clo>
-%<*class>
-% \end{macrocode}
-% \end{command}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \subsection{Page layout parameters}
-%
-% \begin{length}{\columnsep,\columnseprule}
-% Initial column separation. Note, we do not support two column letters. So
-% this is not initialized for the letter class.
-% \begin{macrocode}
-%<*!letter&body>
-\setlength{\columnsep}{10\p@}
-\setlength{\columnseprule}{\z@}
-%</!letter&body>
-% \end{macrocode}
-% \end{length}
-%
-%
-% \subsection{Penalties}
-%
-% The initial values for the penalties are the same as for the standard classes.
-% \begin{macrocode}
-%<*body>
-\@lowpenalty = 51
-\@medpenalty =151
-\@highpenalty =301
-%</body>
-% \end{macrocode}
-%
-%
-% \begin{macrocode}
-%</class>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
-
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-pseudolengths.dtx b/macros/latex/contrib/koma-script/source/scrkernel-pseudolengths.dtx
deleted file mode 100644
index 4c891a8620..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-pseudolengths.dtx
+++ /dev/null
@@ -1,342 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-pseudolengths.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-pseudolengths.dtx 3701 2022-02-14 09:17:40Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-14 10:17:40 +0100 (Mo, 14. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3701 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-pseudolengths.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source
- (pseudo length)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{hvlogos}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-pseudolengths.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v2.95}{2002/06/20}{first version after splitting \file{scrclass.dtx}}
-% \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}
-%
-% \GetFileInfo{scrkernel-pseudolengths.dtx}
-% \title{Handling of Lengths Stored in Macros for
-% \href{https://komascript.de}{\KOMAScript} Letter Class and Packages}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \file{scrkernel-pseudolength.dtx} provides storing lengths in macros. This
-% feature has been introduced with \cls*{scrlttr2} in 2002, because at that
-% time there where only 256 skip registers for \LaTeX{} lengths and
-% \cls*{scrlttr2} needs several lengths to specify the positions of several
-% notepaper elements. Some time later The \LaTeX{} Team (at long last) has
-% decided to recommend \eTeX{} as \TeX{} engine for
-% \LaTeX.\!\footnote{Currently \pdfTeX{} with \eTeX{} extensions is the
-% recommended \TeX{} engine for \LaTeX.} \,Therefore the usage of the so
-% called \emph{pseudo lengths} in \KOMAScript{} wouldn't be necessary any
-% longer. But they exist and will be used at least for compatibility also in
-% future versions of \cls*{scrlttr2} and \pkg*{scrletter}.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of Package \pkg*{typearea} and Additional Class
-% Features}
-%
-% \begin{macrocode}
-%<*letter>
-% \end{macrocode}
-%
-% \subsection{Options}
-% The method of pseudo lengths is not influenced by options.
-%
-%
-% \subsection{Commands and macros for pseudo lengths}
-%
-% For the calculation of the positions of several elements of the notepaper
-% several lengths are needed. To not use a lot \LaTeX{} lengths (and therefore
-% \TeX{} skip registers) they are stored in macros. So we also need some
-% additional commands to not only store lengths values in macros but also for
-% arithmetic operations on such macros and even to test, if a pseudo lengths
-% exists or not.
-%
-%
-% \begin{command}{\Ifplength}
-% \changes{v3.27}{2019/03/29}{added}
-% \begin{macro}{\if@plength}
-% \changes{v3.27}{2019/03/29}{added}
-% \changes{v3.36}{2022/02/14}{deprecated}
-% Test whether or not a given pseudo-length (\texttt{\#1}) already exists. If
-% so execute argument \texttt{\#2}, otherwise \texttt{\#3}.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\Ifplength}[1]{%
- \@ifundefined{ltr@len@#1}{\@secondoftwo}{\@firstoftwo}%
-}
-\newcommand*{\if@plength}{%
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrletter}{%
- Internal macro `\string\if@plength' is deprecated.\MessageBreak
- Please use `\string\Ifplength' instead}%
- \Ifplength
-}
-% \end{macrocode}
-% \end{macro}^^A \if@plength
-% \end{command}^^A \Ifplength
-%
-%
-% \begin{command}{\newplength}
-% \changes{v2.8q}{2001/10/06}{added}
-% \changes{v2.8q}{2001/10/06}{retired compatibility to
-% \cls[https://www.ctan.org/pkg/koma-script-obsolete]{scrlettr}}
-% \changes{v3.26}{2018/04/26}{user command instead of internal macro}
-% \changes{v3.27}{2019/03/29}{changed error message}
-% \begin{macro}{\@newplength}
-% \changes{v3.36}{2022/02/14}{deprecated}
-% Define a new pseudo length (\texttt{\#1}) and initialize it with 0.
-% \begin{macrocode}
-\newcommand*{\newplength}[1]{%
- \@ifundefined{ltr@len@#1}{%
- \expandafter\let\csname ltr@len@#1\endcsname=\z@%
- }{%
-%<class> \ClassError{scrlttr2%
-%<package> \PackageError{scrletter%
- }{%
- pseudo-length \expandafter\string\csname ltr@len@#1\endcsname
- already defined%
- }{%
- You've tried to define a new pseudo-length using\MessageBreak
- \string\@newplength\space
- or \string\newplength.\MessageBreak
- Please, try another name%
- }%
- }%
-}
-\newcommand*{\@newplength}{%
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrletter}{%
- Internal macro `\string\@newplength' is deprecated.\MessageBreak
- Please use `\string\newplength' instead}%
- \newplength
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-%
-% \begin{command}{\useplength}
-% \changes{v2.8q}{2001/10/06}{added}
-% \changes{v2.97c}{2007/09/17}{with \eTeX{} using \cs{dimexpr} instead of \cs{number}}
-% \changes{v3.25}{2017/11/29}{\eTeX{} is mandatory}
-% \changes{v3.25}{2017/11/29}{\cs{dimexpr} replaced by \cs{glueexpr}}
-% Read the value of a pseudo length like a skip register. This can be done
-% using \cs{glueexpr}.
-% \begin{macrocode}
-\newcommand*{\useplength}[1]{%
- \glueexpr \csname ltr@len@#1\endcsname\relax}%
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\setlengthtoplength}
-% \changes{v2.8q}{2001/10/06}{added}
-% Set a real \LaTeX{} length (usually a \TeX{} skip, but \TeX{} dimensions are
-% also valid) to a multiple of a pseudo length. The factor is given by the
-% optional argument \texttt{\#1}. The length is mandatory argument \textrm{\#2}
-% and the name of the pseudo length the also mandatory \texttt{\#3}.
-% \begin{macrocode}
-\newcommand*{\setlengthtoplength}[3][]{%
- \setlength{#2}{\useplength{#3}}%
- \setlength{#2}{#1#2}}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\setplength}
-% \changes{v2.8q}{2001/10/06}{added}
-% \changes{v3.25}{2017/11/29}{\cs{glueexpr} eingefügt}
-% \changes{v3.36}{2018/04/26}{user command instead of internal macro}
-% \begin{macro}{\@setplength}
-% \changes{v3.36}{2022/02/14}{deprecated}
-% We also need a command to set a pseudo length (\texttt{\#2}) to a new value
-% (\texttt{\#3}). Locally we use a length to do so, because we want error
-% messages about illegal values here and not when using the pseudo value. Once
-% more an optional factor (\texttt{\#1}) is provided (but does not make much sense).
-% \begin{macrocode}
-\newcommand*{\setplength}[3][]{%
- \begingroup%
- \setlength{\@tempskipa}{\glueexpr #3\relax}%
- \setlength{\@tempskipa}{#1\@tempskipa}%
- \edef\@tempa{\noexpand\endgroup%
- \noexpand\expandafter\noexpand\renewcommand\noexpand\expandafter*%
- \noexpand\csname ltr@len@#2\noexpand\endcsname{\the\@tempskipa}%
- }%
- \@tempa
-}
-\newcommand*{\@setplength}{%
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrletter}{%
- Internal macro `\string\@setplength' is deprecated.\MessageBreak
- Please use `\string\setplength' instead}%
- \setplength
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-%
-% \begin{command}{\setplengthtowidth,\setplengthtoheight,\setplengthtodepth,
-% \setplengthtototalheight}
-% \changes{v3.26}{2018/04/26}{added}
-% First three commands are similar to \cs{settowidth}, \cs{settoheight} and
-% \cs{settodepth} but with pseudo length instead of a \LaTeX{} length. The
-% last one is a combination of \cs{setplengthtoheight} + \cs{setplengthtodepth}.
-% \begin{macrocode}
-\newcommand*{\setplengthtowidth}[3][]{%
- \begingroup
- \settowidth{\@tempdima}{#3}%
- \setlength{\@tempdima}{#1\@tempdima}%
- \edef\@tempa{\noexpand\endgroup
- \noexpand\expandafter\noexpand\renewcommand\noexpand\expandafter*%
- \noexpand\csname ltr@len@#2\noexpand\endcsname{\the\@tempdima}%
- }%
- \@tempa
-}
-\newcommand*{\setplengthtoheight}[3][]{%
- \begingroup
- \settoheight{\@tempdima}{#3}%
- \setlength{\@tempdima}{#1\@tempdima}%
- \edef\@tempa{\noexpand\endgroup
- \noexpand\expandafter\noexpand\renewcommand\noexpand\expandafter*%
- \noexpand\csname ltr@len@#2\noexpand\endcsname{\the\@tempdima}%
- }%
- \@tempa
-}
-\newcommand*{\setplengthtodepth}[3][]{%
- \begingroup
- \settodepth{\@tempdima}{#3}%
- \setlength{\@tempdima}{#1\@tempdima}%
- \edef\@tempa{\noexpand\endgroup
- \noexpand\expandafter\noexpand\renewcommand\noexpand\expandafter*%
- \noexpand\csname ltr@len@#2\noexpand\endcsname{\the\@tempdima}%
- }%
- \@tempa
-}
-\newcommand*{\setplengthtototalheight}[3][]{%
- \begingroup
- \settoheight{\@tempdima}{#3}%
- \settodepth{\@tempdimb}{#3}%
- \addtolength{\@tempdima}{\@tempdimb}%
- \setlength{\@tempdima}{#1\@tempdima}%
- \edef\@tempa{\noexpand\endgroup
- \noexpand\expandafter\noexpand\renewcommand\noexpand\expandafter*%
- \noexpand\csname ltr@len@#2\noexpand\endcsname{\the\@tempdima}%
- }%
- \@tempa
-}
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{command}{\addtolengthplength}
-% \changes{v2.8q}{2001/10/06}{added}
-% This provides a plus operation of a pseudo length \texttt{\#3} to a \LaTeX{}
-% length \texttt{\#2}. Again an optional factor \texttt{\#1} is possible.
-% \begin{macrocode}
-\newcommand*{\addtolengthplength}[3][]{%
- \begingroup%
- \setlengthtoplength[{#1}]{\@tempskipa}{#3}%
- \edef\@tempa{\endgroup%
- \noexpand\addtolength{#2}{\the\@tempskipa}}%
- \@tempa%
-}
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{command}{\addtoplength}
-% \changes{v2.8q}{2001/10/06}{added}
-% \changes{v3.25}{2017/11/29}{using \cs{glueexpr}}
-% \changes{v3.36}{2018/04/26}{user command instead of internal macro}
-% \begin{macro}{\@addtoplength}
-% \changes{v3.36}{2022/02/14}{deprecated}
-% This provides a plus operation for one pseudo length \texttt{\#3} to another
-% pseudo length \texttt{\#2}. Again an optional factor \texttt{\#1} is possible.
-% \begin{macrocode}
-\newcommand*{\addtoplength}[3][]{%
- \begingroup%
- \setlength{\@tempskipa}{\glueexpr #3\relax}%
- \setlength{\@tempskipa}{#1\@tempskipa}%
- \addtolengthplength{\@tempskipa}{#2}%
- \edef\@tempa{\noexpand\endgroup%
- \noexpand\expandafter\noexpand\renewcommand\noexpand\expandafter*%
- \noexpand\csname ltr@len@#2\noexpand\endcsname{\the\@tempskipa}%
- }%
- \@tempa%
-}
-\newcommand*{\@addtoplength}{%
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrletter}{%
- Internal macro `\string\@addtoplength' is deprecated.\MessageBreak
- Please use `\string\addtoplength' instead}%
- \addtoplength}
-%</body>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-%
-% \begin{macrocode}
-%</letter>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-sections.dtx b/macros/latex/contrib/koma-script/source/scrkernel-sections.dtx
deleted file mode 100644
index 71ceb54ce7..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-sections.dtx
+++ /dev/null
@@ -1,6754 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-sections.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-sections.dtx 3770 2022-03-22 16:27:02Z kohm $
-% The runs of run-time file generation:
-%<preidentify>%%% (run: preidentify)
-% - everything that is needed before selfidentification of resulting files
-% (unused)
-%<identify>%%% (run: identify)
-% - everything that is needed for selfidentification of resulting files
-% (unused)
-%<prepare>%%% (run: prepare)
-% - everything that is needed to define options
-%<option>%%% (run: option)
-% - definition of options
-%<execoption>%%% (run: execoption)
-% - initial option executions up to \KOMAProcessOptions
-%<body>%%% (run: body)
-% - everything, that should be done after \KOMAProcessOptions
-%<exit>%%% (run: exit)
-% - everything, that should be done immediately before leaving the file
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-22 17:27:02 +0100 (Di, 22. Mär 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3770 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-sections.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source (disposition)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{3}
-\begin{document}
-\DocInput{scrkernel-sections.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.3h}{1996/01/20}{configurable font sized for headings}
-% \changes{v2.95}{2002/06/26}{first version after splitting \file{scrclass.dtx}}
-% \changes{v3.15}{2014/12/09}{reordered code in \file{scrkernel-sections.dtx}}
-% \changes{v3.36}{2022/03/08}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/03/21}{the whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-sections.dtx}
-% \title{The Code for Parts, Chapters, Sections etc.\@ of
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \file{scrkernel-sections.dtx} implements all the options, macros and user
-% commands used for the sectioning of documents.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of Parts, Chapters, Section etc.}
-%
-% The letter class does not provide sectioning.
-% \begin{macrocode}
-%<*class&!letter>
-% \end{macrocode}
-%
-% \begin{macro}{@maybeasf}
-% \changes{v2.8e}{2001/07/10}{removed}
-% \end{macro}
-%
-% \subsection{Interleaf pages}
-%
-% With \cls*{scrbook} and \cls*{scrreprt} chapters can optionally (or by
-% default) start automatically on a odd page. So if the last page before
-% already was an odd page, we have to insert a so called interleaf page. The
-% main handling of interleaf pages is already defined in
-% \file{scrkernel-pagestyles.dtx} (but there is a ToDo note to move is to a
-% new file). Here we only support the optional selection of the start page of
-% a chapter.
-%
-% \begin{option}{open}
-% \changes{v2.98c}{2008/03/06}{added}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/09}{using internal value storage}
-% \changes{v3.18}{2015/05/22}{initialization using \opt{headings}}
-% \begin{macro}{\@openrighttrue,\@openrightfalse,\if@openright}
-% The option supports three values:
-% \begin{center}
-% \begin{tabular}{llll}
-% \opt{open} & \cs{if@openright} & \cs{cleardoublestandardpage} &
-% meaning\\\hline
-% \opt{=any} & \cs{iffalse} & \cs{cleardoubleoddstandardpage} &
-% chapters on any page\\
-% \opt{=right} & \cs{iftrue} & \cs{cleardoubleoddstandardpage} &
-% chapters on odd pages\\
-% \opt{=left} & \cs{iftrue} & \cs{cleardoubleevenstandardpage} &
-% chapters on even pages\\
-% \end{tabular}
-% \end{center}
-% \begin{macrocode}
-%<*book|report>
-%<*prepare>
-\newif\if@openright
-%<report>\@openrightfalse
-%<book>\@openrighttrue
-%</prepare>
-%<*option>
-\KOMA@key{open}{%
- \KOMA@set@ncmdkey{open}{@tempa}{%
- {any}{0},%
- {right}{1},%
- {left}{2}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.\KOMAClassFileName}{open}{#1}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{openany}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{openright}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{openleft}%
- \ifcase \@tempa\relax
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{openany}%
- \@openrightfalse
- \renewcommand*{\cleardoublestandardpage}{\cleardoubleoddstandardpage}%
- \or
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{openright}%
- \@openrighttrue
- \renewcommand*{\cleardoublestandardpage}{\cleardoubleoddstandardpage}%
- \or
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{openleft}%
- \@openrighttrue
- \renewcommand*{\cleardoublestandardpage}{\cleardoubleevenstandardpage}%
- \fi
- \fi
-}
-%</option>
-%<*execoption>
-%<book>\KOMAExecuteOptions{headings=openright}
-%<report>\KOMAExecuteOptions{headings=openany}
-%</execoption>
-% \end{macrocode}
-% \end{macro}^^A \if@openright
-% \end{option}^^A open
-%
-% \begin{option}{openright,openany}
-% \changes{v2.98c}{2008/03/05}{obsolete}
-% \changes{v3.01a}{2008/11/21}{standard instead of obsolete}
-% Two deprecated options of \KOMAScript{} 2.
-% \begin{macrocode}
-%<*option>
-\KOMA@DeclareStandardOption{openright}{open=right}
-\KOMA@DeclareStandardOption{openany}{open=any}
-%</option>
-%</book|report>
-% \end{macrocode}
-% \end{option}^^A openright,openany
-%
-%
-% \subsection{Numbers and the auto dot feature}
-%
-% Not only parts, chapter, section etc.\@ are numbered. But several other
-% numbers are related to these numbers. The feature we define here is also
-% known as the auto dot feature.
-%
-% \begin{option}{numbers}
-% \changes{v2.98c}{2008/03/07}{added}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/09}{using internal value storage}
-% \begin{macro}{\scr@dotchangeatdocument}
-% \changes{v2.98c}{2008/03/07}{added}
-% The \opt{numbers} option provides several settings for the dot at the end of
-% such numbers. But because the setting is always document global, this option
-% cannot be changed inside the document, but in the document preamble only. If
-% you try to change it inside the document, the error of
-% \cs{scr@dotchangedatdocument} will be raised. Currently following values to
-% the option are supported:
-% \begin{center}
-% \begin{tabular}{ll}
-% \opt{numbers} & meaning\\\hline
-% \opt{=auto} & automatically detect, if the dot has to be added\\
-% \opt{=enddot} & always use a dot at the end\\
-% \opt{=noenddot}& don't use a dot at the end\\
-% \end{tabular}
-% \end{center}
-% The criterion for automatically adding a dot is: Does any sectioning number
-% contain something else but an Arabic number for a number portion?
-% \begin{macrocode}
-%<*prepare>
-\newcommand*{\scr@dotchangeatdocument}[1]{%
- \ClassError{\KOMAClassName}{%
- change of end dot feature after \string\begin{document}%
- }{%
- You've tried to set `numbers=#1' after \string\begin{document},\MessageBreak
- but this option is only allowed at the document preamble.\MessageBreak
- See KOMA-Script manual for more information about.%
- }%
-}
-%</prepare>
-%<*option>
-\KOMA@key{numbers}{%
- \KOMA@set@ncmdkey{numbers}{@tempa}{%
- {autoendperiod}{0},{autoenddot}{0},{auto}{0},%
- {endperiod}{1},{withendperiod}{1},{periodatend}{1},%
- {enddot}{1},{withenddot}{1},{dotatend}{1},%
- {noendperiod}{2},{noperiodatend}{2},%
- {noenddot}{2},{nodotatend}{2}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.\KOMAClassFileName}{numbers}{#1}%
- \ifcase \@tempa\relax
- \if@atdocument\scr@dotchangeatdocument{#1}\else
- \let\scr@altsecnumhook\@empty
- \fi
- \or
- \if@atdocument\scr@dotchangeatdocument{#1}\else
- \let\scr@altsecnumhook\scr@altsecnumhooktrue
- \fi
- \or
- \if@atdocument\scr@dotchangeatdocument{#1}\else
- \let\scr@altsecnumhook\scr@altsecnumhookfalse
- \fi
- \fi
- \fi
-}
-%</option>
-%<execoption>\KOMAExecuteOptions{numbers=autoendperiod}
-% \end{macrocode}
-% \end{macro}^^A \scr@dotchangeatdocument
-% \end{option}^^A numbers
-%
-% \begin{option}{pointednumbers,pointlessnumbers}
-% \changes{v2.3h}{1995/01/19}{added}
-% \changes{v2.4g}{1996/11/04}{option name fixed}
-% \changes{v2.4g}{1996/11/04}{immediate setting \cs{@altsecnumformatfalse}
-% to \cs{@altsecnumformattrue}}
-% \changes{v2.98c}{2008/03/07}{obsolete}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% Two deprecated options.
-% \begin{macrocode}
-%<*option>
-\KOMA@DeclareDeprecatedOption{pointednumbers}{numbers=enddot}
-\KOMA@DeclareDeprecatedOption{pointlessnumbers}{numbers=noenddot}
-%</option>
-% \end{macrocode}
-% \end{option}^^A pointednumbers,pointlessnumbers
-%
-% \begin{command}{\autodot}
-% \changes{v2.7}{2001/01/03}{added}
-% \begin{macro}{\@altsecnumformattrue,\@altsecnumformatfalse,\if@altsecnumformat}
-% \changes{v2.3c}{1995/08/06}{added}
-% \begin{macro}{\@autodottrue,\@autodotfalse,\if@autodot}
-% \changes{v2.8e}{2001/07/10}{added}
-% \changes{v2.9k}{2003/01/12}{write to \cs{@mainaux}}
-% \changes{v2.95}{2004/01/15}{write to \cs{@mainaux} just before closing the
-% file}
-% \changes{v2.96a}{2006/12/07}{using \cs{immediate}}
-% \changes{v3.00}{2008/10/07}{global}
-% \changes{v3.20}{2016/03/25}{using \cs{csname}\dots\cs{endcsname}}
-% Depending on \cs{if@altsecnumformat} \cs{autodot} shows a dot or nothing.
-% \begin{description}
-% \item[ToDo:] Add an optional look forward feature to also not add a dot, if
-% the next character is a punctuation character, e.g. a dot, semicolon,
-% comma etc.
-% \end{description}
-% \cs{if@autodot} is the current result of the inspection of all sectioning
-% numbers. If it is \cs{iftrue}, switching on the dot will be written to the
-% main \file{aux}-file.
-% \begin{macrocode}
-%<*prepare>
-\newif\if@altsecnumformat\@altsecnumformatfalse
-\newif\if@autodot
-\renewcommand*{\@autodottrue}{\global\let\if@autodot\iftrue}
-\renewcommand*{\@autodotfalse}{\global\let\if@autodot\iffalse}
-\@autodotfalse
-%</prepare>
-%<*body>
-\BeforeClosingMainAux{%
- \if@autodot\if@filesw\immediate\write\@mainaux{%
- \string\global\string\csname\space @altsecnumformattrue\string\endcsname}%
- \fi\fi}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \if@autodot
-% \end{macro}^^A \if@altsecnumformat
-%
-% \begin{macro}{\scr@altsecnumhook,\scr@altsecnumhooktrue,\scr@altsecnumhookfalse}
-% \changes{v2.98c}{2008/03/07}{added}
-% Used by option \opt{numbers} for (de-)activation of the dot in the document
-% preamble and to overwrite the setting found in the \file{aux}-file.
-% \begin{description}
-% \item[Note:] The hook is executed after reading the main \file{aux}-file. So
-% the overwriting of the setting does work. It is needed as long a boolean
-% switch is used, because otherwise option \opt{numbers=auto} would not be
-% able to reset option \opt{numbers=enddot} ot \opt{numbers=noenddot}. With
-% this code we simply can use an empty \cs{scr@altsecnumhook} for
-% \opt{numbers=auto} and two compellent definitions for the other cases.
-% \end{description}
-% \begin{macrocode}
-%<*prepare>
-\newcommand*{\scr@altsecnumhook}{}
-\AtBeginDocument{\scr@altsecnumhook}
-\newcommand*{\scr@altsecnumhooktrue}{%
- \@altsecnumformattrue\global\let\@altsecnumformatfalse\@altsecnumformattrue
-}
-\newcommand*{\scr@altsecnumhookfalse}{%
- \@altsecnumformatfalse\global\let\@altsecnumformattrue\@altsecnumformatfalse
-}
-%</prepare>
-% \end{macrocode}
-% \end{macro}^^A \scr@altsecnumhook,\scr@altsecnumhooktrue,\scr@altsecnumhookfalse
-%
-% \begin{macro}{\@maybeautodot,\@@maybeautodot}
-% \changes{v2.8e}{2001/07/10}{added}
-% \changes{v3.00}{2008/10/07}{not any longer needed \cs{aftergroup} removed}
-% We scan a \cs{the\meta{counter}} command to decide, if the automatic dot has
-% to be added (later). It sets \cs{@autodottrue}, if there is any kind of
-% alphabetic or Roman numbering command inside the one time expansion of the
-% \cs{the\meta{counter}} given as argument.
-% \begin{description}
-% \item[Note:] This is a heuristic only. It would, e.g., fail, if you are
-% using another macro, that expands to the output of the counter, e.g.,
-%\begin{verbatim}
-% \def\myalph{\alph}\def\thesection{\myalph{section}}
-%\end{verbatim}
-% However, it seems that the heuristic is so good, that in more than twenty
-% years nobody has complained about.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand{\@maybeautodot}[1]{\if@autodot\else\begingroup%
- \expandafter\@@maybeautodot #1\@stop\endgroup\fi
-}
-\newcommand*{\@@maybeautodot}[1]{%
- \ifx #1\@stop\let\@@maybeautodot\relax
- \else
- \ifx #1\Alph \@autodottrue\fi
- \ifx #1\alph \@autodottrue\fi
- \ifx #1\Roman \@autodottrue\fi
- \ifx #1\roman \@autodottrue\fi
- \ifx #1\@Alph \@autodottrue\fi
- \ifx #1\@alph \@autodottrue\fi
- \ifx #1\@Roman \@autodottrue\fi
- \ifx #1\@roman \@autodottrue\fi
- \ifx #1\romannumeral \@autodottrue\fi
- \fi
- \@@maybeautodot
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@maybeautodot,\@@maybeautodot
-%
-% \begin{macrocode}
-%<*body>
-\newcommand*\autodot{\if@altsecnumformat.\fi}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \autodot
-%
-%
-% \subsection{Definition and handling of sectioning commands}
-%
-% Some of the \LaTeX{} kernel features are used here too. But almost none of
-% these features is enough to implement all the functionality of \KOMAScript{}
-% classes. So we redefine several of the \LaTeX{} kernel macros to extend them
-% and define several new features.
-% \begin{description}
-% \item[ToDo:] Don't redefine \LaTeX{} kernel macros, but define new macros
-% for the interface. Maybe this should also be swapped to a new package used
-% by the classes.
-% \end{description}
-%
-% \begin{counter}{secnumdepth}
-% The counter rules down to which section level the headings should be
-% numbered.
-% \begin{description}
-% \item[ToDo:] Move this behind the declaration of the section levels to be
-% able to use symbolic value \cs{subsectionnumdepth}. It is not related to
-% the auto dot feature.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-%<book|report>\setcounter{secnumdepth}{2}
-%<article>\setcounter{secnumdepth}{3}
-%</body>
-% \end{macrocode}
-% \end{counter}
-%
-%
-% \begin{command}{\ifnumbered,\Ifnumbered}
-% \changes{v3.12}{2013/12/16}{added}
-% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to \cs{Ifnumbered}}
-% \begin{command}{\ifunnumbered,\Ifunnumbered}
-% \changes{v3.12}{2013/12/16}{added}
-% \changes{v3.28}{2019/11/19}{\cs{ifunnumbered} renamed to \cs{Ifunnumbered}}
-% Commands
-% \begin{quote}\raggedright
-% \cs{Ifnumbered}\marg{section level name}\marg{numbered}\marg{not numbered}\\
-% \cs{Ifunnumbered}\marg{section level name}\marg{not numbered}\marg{numbered}\\
-% \end{quote}
-% If \meta{section level name} has to be numbered, execute code \meta{numbered}
-% otherwise execute code \meta{not numbered}.
-% \begin{macrocode}
-%<*body>
-\providecommand*{\ifnumbered}{%
- \ClassWarning{\KOMAClassName}{Usage of deprecated command
- `\string\ifnumbered'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifnumbered' by `\string\Ifnumbered'%
- }%
- \Ifnumbered
-}
-\newcommand*{\Ifnumbered}[1]{%
- \if@currentusenumber
- \scr@ifundefinedorrelax{#1numdepth}{%
- \expandafter\@secondoftwo
- }{%
- \expandafter\ifnum \@nameuse{#1numdepth}>\c@secnumdepth
- \expandafter\expandafter\expandafter\@secondoftwo
- \else
- \expandafter\expandafter\expandafter\@firstoftwo
- \fi
- }%
- \else
- \expandafter\@secondoftwo
- \fi
-}
-\providecommand*{\ifunnumbered}{%
- \ClassWarning{\KOMAClassName}{Usage of deprecated command
- `\string\ifunnumbered'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifunnumbered' by `\string\Ifunnumbered'%
- }%
- \Ifunnumbered
-}
-\newcommand*{\Ifunnumbered}[1]{%
- \Ifnumbered{#1}{\@secondoftwo}{\@firstoftwo}%
-}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \Ifunnumbered
-% \end{command}^^A \ifnumbered
-%
-%
-% \begin{macro}{\scr@activate@xsection,\scr@osectarg}
-% \changes{v3.10}{2011/08/30}{added}
-% Option \opt{headings=optiontotocandhead}, \opt{headings=optiontotoc} and
-% \opt{headings=optiontohead} used
-% \begin{quote}
-% \cs{scr@activate@xsection}\marg{value}
-% \end{quote}
-% with the values 3, 2 and 1 to activate the extended optional argument. This
-% sets \cs{scr@osectarg} to the corresponding value. The initial value 0
-% deactivates the extended optional argument.
-% \begin{description}
-% \item[ToDo:] Do we really need \cs{scr@activate@xsection}, that is used
-% inside option \opt{headings} only?
-% \end{description}
-% \begin{macrocode}
-%<*prepare>
-\newcommand*{\scr@osectarg}{0}
-\newcommand*{\scr@activate@xsection}[1]{%
- \renewcommand*{\scr@osectarg}{#1}%
-}
-%</prepare>
-% \end{macrocode}
-% \end{macro}^^A \scr@activate@xsection,\scr@osectarg
-%
-%
-% \begin{macro}{\@startsection}
-% \changes{v3.13a}{2014/09/11}{re-definition for extended optional argument}
-% \begin{macro}{\scr@startsection}
-% \changes{v3.13a}{2014/09/11}{added}
-% \changes{v3.18}{2015/05/22}{using \cs{numexpr} for argument 2}
-% \changes{v3.18}{2015/05/22}{using \cs{glueexpr} for arguments 3--5}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \changes{v3.26}{2018/09/18}{supporting \opt{afterindent}}
-% \begin{macro}{\scr@saved@startsection}
-% \changes{v3.13a}{2014/09/11}{added}
-% \changes{v3.20}{2016/04/12}{supporting \pkg{amsgen}}
-% \begin{macro}{\startsection@sectionname,\startsection@secnumdepth,
-% \startsection@indent,\startsection@beforeskip,
-% \startsection@afterskip,\startsection@afterindent,
-% \@startsection@runintrue,\@startsection@runinfalse,
-% \if@startsection@runin}
-% \changes{v3.26}{2018/05/14}{added}
-% The \cs{@startsection} of the \LaTeX{} kernel does not provide all the
-% features we need for \KOMAScript. And the generic hooks of \LaTeX{} do not
-% allow to change it wide enough. So we either have to use \pkg{xparse} to
-% patch it very much or we have to define our own version. In this case
-% patching is too fragile, so we define \cs{scr@startsection} and store the
-% original definition in \cs{scr@saved@startsection}.
-% \begin{description}
-% \item[Note:] Package \pkg{amsgen} redefines \cs{@ifstar}. The new version
-% does not ignore white spaces. So testing the original definition using
-% \cs{@ifstar} may fail. It is better to use \cs{kernel@ifstar}.
-% \item[ToDo:] All the testing here doesn't make much sense, because we are
-% inside a class and packages like \pkg{amsgen} should not yet have been
-% loaded. So the test only needs to test, if the \LaTeX{} kernel has been
-% changed.
-% \item[Note:] In our own \cs{scr@startsection} the macros
-% \cs{startsection@sectionname}, \cs{startsection@secnumdepth},
-% \cs{startsection@indent}, \cs{startsection@beforeskip},
-% \cs{startsection@afterskip}, \cs{if@afterindent},
-% \cs{if@startsection@runin}, and \cs{startsection@afterindent} are valid
-% from executing the do hook \dhook{heading/postinit}. So they can be used
-% inside all the hooks.
-% \item[Note:] \cs{startsection@indent}, \cs{startsection@beforeskip},
-% \cs{startsection@afterskip} and \cs{startsection@afterindent} are either
-% skips or \cs{glueexpr}, that can be used like skips.
-% \item[Note:] \cs{startsection@beforeskip} and \cs{startsection@afterskip}
-% are effective values already. Not special treatment for negative or
-% positive values must be done.
-% \item[Note:] \cs{if@startsection@runin}
-% are either \cs{iftrue} or \cs{iffalse}.
-% \item[Note:] \cs{if@startsection@indentafter} does not exist and is not
-% needed, because \cs{if@afterindent} is already valid and also either
-% \cs{iftrue} or \cs{iffalse}.
-% \item[Note:] Using one of the \cs{startsection@\dots}
-% resp. \cs{if@startsection@\dots} macros outside \cs{scr@startsection} is
-% not allowed and the result is unspecified. Inside \cs{scr@startsection}
-% they have to be interpreted as constants, so changing them is not allowed!
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\scr@saved@startsection}[6]{%
- \if@noskipsec \leavevmode \fi
- \par
- \@tempskipa #4\relax
- \@afterindenttrue
- \ifdim \@tempskipa <\z@
- \@tempskipa -\@tempskipa \@afterindentfalse
- \fi
- \if@nobreak
- \everypar{}%
- \else
- \addpenalty\@secpenalty\addvspace\@tempskipa
- \fi
- \kernel@ifstar
- {\@ssect{#3}{#4}{#5}{#6}}%
- {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}%
-}
-\def\reserved@a#1#2#3#4#5#6{%
- \if@noskipsec \leavevmode \fi
- \par
- \@tempskipa #4\relax
- \@afterindenttrue
- \ifdim \@tempskipa <\z@
- \@tempskipa -\@tempskipa \@afterindentfalse
- \fi
- \if@nobreak
- \everypar{}%
- \else
- \addpenalty\@secpenalty\addvspace\@tempskipa
- \fi
- \@ifstar
- {\@ssect{#3}{#4}{#5}{#6}}%
- {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}%
-}
-\ifcase \ifx\@startsection\scr@saved@startsection 0
- \else
- \ifx\@startsection\reserved@a 0
- \else 1
- \fi
- \fi
- \newcommand*{\scr@startsection}[6]{%
- \ExecuteDoHook{heading/preinit/#1}%
- \if@noskipsec \leavevmode \fi
- \par
- \@tempskipa \glueexpr #4\relax
- \@ifundefined{scr@#1@afterindent}{%
- \def\startsection@afterindent##1##2##3{##3}%
- }{%
- \expandafter\let\expandafter\startsection@afterindent
- \csname scr@#1@afterindent\endcsname
- }%
- \startsection@afterindent{\@afterindenttrue}{\@afterindentfalse}{%
- \@afterindenttrue
- \ifdim \@tempskipa <\z@
- \@tempskipa -\@tempskipa \@afterindentfalse
- \fi
- }%
- \def\startsection@sectionname{#1}%
- \def\startsection@secnumdepth{\numexpr #2\relax}%
- \def\startsection@indent{\glueexpr #3\relax}%
- \let\startsection@beforeskip\@tempskipa
- \@ifundefined{scr@#1@runin}{%
- \def\scr@sect@runin##1##2##3{##3}%
- }{%
- \expandafter\let\expandafter\scr@sect@runin
- \csname scr@#1@runin\endcsname
- }%
- \scr@sect@runin{%
- \def\startsection@afterskip{\glueexpr #3\relax}%
- \expandafter\let\csname if@startsection@runin\expandafter\endcsname
- \csname iftrue\endcsname
- }{%
- \def\startsection@afterskip{\glueexpr #3\relax}%
- \expandafter\let\csname if@startsection@runin\expandafter\endcsname
- \csname iffalse\endcsname
- }{%
- \ifdim \glueexpr #5\relax <\z@
- \def\startsection@afterskip{\glueexpr (#3)*\m@ne\relax}%
- \expandafter\let\csname if@startsection@runin\expandafter\endcsname
- \csname iftrue\endcsname
- \else
- \def\startsection@afterskip{\glueexpr #3\relax}%
- \expandafter\let\csname if@startsection@runin\expandafter\endcsname
- \csname iffalse\endcsname
- \fi
- }%
- \ExecuteDoHook{heading/postinit/#1}%
- \if@nobreak
- \everypar{}%
- \else
- \addpenalty\@secpenalty\addvspace\@tempskipa
- \fi
- \kernel@ifstar {%
- \ExecuteDoHook{heading/branch/star/#1}%
- \def\scr@s@ct@@nn@m@{#1}%
- \@ssect{\glueexpr #3\relax}{\glueexpr #4\relax}{\glueexpr #5\relax}{#6}%
- }{%
- \ExecuteDoHook{heading/branch/nostar/#1}%
- \scr@section@dblarg{%
- \@sect{#1}{\numexpr #2\relax}{\glueexpr #3\relax}{\glueexpr #4\relax}%
- {\glueexpr #5\relax}{#6}%
- }%
- }%
- }
-\else
- \ClassWarningNoLine{\KOMAClassName}{`\string\@startsection' has been
- changed.\MessageBreak
- \KOMAClassName\space needs it's own definition of
- `\string\@startsection'\MessageBreak
- to provide extended features for the optional argument\MessageBreak
- of `\string\section' etc.\MessageBreak
- Generally it defines `\string\@startsection' completely new\MessageBreak
- to achieve this. Because of the unexpected definition\MessageBreak
- an alternative approach will be used.\MessageBreak
- If this fails and if there isn't a new release of\MessageBreak
- KOMA-Script that fixes the problem, please\MessageBreak
- send a report to the KOMA-Script author.\MessageBreak
- Note, that this alternative approach does not\MessageBreak
- execute the elements of do-hooks:\MessageBreak
- \space\space- `heading/postinit',\MessageBreak
- \space\space- `heading/branch/star',\MessageBreak
- \space\space- `heading/branch/nostar',\MessageBreak
- and does always use `runin=bysign' and\MessageBreak
- `afterindent=bysign'%
- }%
- \let\scr@saved@startsection\@startsection
- \newcommand*{\scr@startsection}[6]{%
- \ExecuteDoHook{heading/preinit/#1}%
- \kernel@ifstar {%
- \scr@saved@startsection{#1}{\numexpr #2\relax}{\glueexpr #3\relax}%
- {\glueexpr #4\relax}{\glueexpr #5\relax}{#6}*%
- }{%
- \scr@section@dblarg{%
- \scr@saved@startsection{#1}{\numexpr #2\relax}{\glueexpr #3\relax}%
- {\glueexpr #4\relax}{\glueexpr #5\relax}{#6}}%
- }%
- }
-\fi
-% \end{macrocode}
-% \begin{macro}{\scr@sect@runin}
-% \changes{v3.26}{2018/09/18}{added}
-% Depending on sectioning feature \opt{runin} the macro expands to the first
-% argument, if a in-text heading aka run-in heading has to used, the second
-% argument, if a free-standing heading has to be used, or the third argument,
-% of run-in or free-standing depends on the sign of \opt{afterskip}. The
-% initial definition is depending on the sign of \opt{afterskip}. This initial
-% definition is also done inside \cs{@xsect}. \cs{scr@startsection} also
-% redefines \cs{scr@sect@runin}. So it should always be the currently valid
-% definition, even if \cs{scr@startsection} is used with a section command,
-% that does not provide all the variable of \KOMAScript.
-% \begin{macrocode}
-\newcommand*{\scr@sect@runin}[3]{#3}
-% \end{macrocode}
-% \end{macro}^^A \scr@sect@runin
-% \begin{macro}{\scr@startsection@ulm@error}
-% \changes{v3.26}{2018/05/14}{added}
-% This is the initial error message for using one of the internal macros
-% before \cs{scr@startsection}. This should never happen.
-% \begin{macrocode}
-\newcommand*{\scr@startsection@ulm@error}[1]{%
- \ClassError{\KOMAClassName}{%
- \string#1 undefined outside of \string\scr@startsection
- }{%
- A KOMA-Script macro for package authors have been used outside
- the\MessageBreak
- specified definition scope.\MessageBreak
- See `scrkernel-sections.dtx' for more information.%
- }%
-}
-\newcommand*\startsection@sectionname{%
- \scr@startsection@ulm@error\startsection@sectionname}
-\newcommand*\startsection@secnumdepth{%
- \scr@startsection@ulm@error\startsection@secnumdepth}
-\newcommand*\startsection@indent{%
- \scr@startsection@ulm@error\startsection@indent}
-\newcommand*\startsection@beforeskip{%
- \scr@startsection@ulm@error\startsection@beforeskip}
-\newcommand*\startsection@afterskip{%
- \scr@startsection@ulm@error\startsection@afterskip}
-\newcommand*{\if@startsection@runin}{%
- \scr@startsection@ulm@error\if@startsection@runin}
-\newif\if@startsection@runin
-\newcommand*\startsection@afterindent{%
- \scr@startsection@ulm@error\startsection@afterindent}
-% \end{macrocode}
-% \end{macro}^^A \scr@startsection@ulm@error
-% \end{macro}^^A \startsection@sectionname … \scr@startsection@runin
-% \begin{macro}{\At@startsection}
-% \changes{v3.14}{2014/09/11}{added}
-% \changes{v3.27}{2019/02/04}{using \cs{AddtoDoHook}}
-% \changes{v3.27}{2019/02/04}{deprecated}
-% This is deprecated now. You should use the corresponding
-% \dhook{heading/postinit} do hook. However the do hooks are command specific,
-% but the argument of \cs{At@startsection} is style specific.
-% \begin{macrocode}
-\newcommand*{\At@startsection}[1]{%
- \ClassInfo{\KOMAClassName}{%
- Usage of deprecated command `\string\At@startsection'
- mapped to\MessageBreak
- `\string\AddtoDoHook{heading/postinit}
- {...\string\@gobble}'%
- }%
- \AddtoDoHook{heading/postinit}{\scr@doonlyifstyleofargis{#1}{section}}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@doonlyifstyleofargis}
-% \changes{v3.27}{2019/02/04}{added}
-% Execute the first argument only, of the style of the third argument is the
-% second argument.
-% \begin{macrocode}
-\newcommand*{\scr@doonlyifstyleofargis}[3]{%
- \IfSectionCommandStyleIs{#3}{#2}{#1}{}%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@doonlyifstyleofargis
-% \end{macro}^^A \At@startsection
-% \begin{macro}{\Before@ssect}
-% \changes{v3.14}{2014/09/11}{added}
-% \changes{v3.27}{2019/02/04}{using \cs{AddtoDoHook}}
-% \changes{v3.27}{2019/02/04}{deprecated}
-% \changes{v3.35}{2021/10/15}{\cs{ClassWarning} instead of \cs{ClassInfo}}
-% \changes{v3.35}{2021/10/15}{Usage of \cs{scr@doonlyifstyleofargis} fixed}
-% This is deprecated now. You should use the corresponding
-% \dhook{heading/branch/star} do hook. However the do hooks are command
-% specific, but the argument of \cs{Before@ssect} is style specific.
-% \begin{macrocode}
-\newcommand*{\Before@ssect}[1]{%
- \ClassWarning{\KOMAClassName}{%
- Usage of deprecated command `\string\Before@ssect'
- mapped to\MessageBreak
- `\string\AddtoDoHook{heading/branch/star}%
- {...\string\@gobble}'%
- }%
- \AddtoDoHook{heading/branch/star}{\scr@doonlyifstyleofargis{#1}{section}}%
-}
-% \end{macrocode}
-% \end{macro}^^A \Before@ssect
-% \begin{macro}{\Before@sect}
-% \changes{v3.14}{2014/09/11}{added}
-% \changes{v3.27}{2019/02/04}{using \cs{AddtoDoHook}}
-% \changes{v3.27}{2019/02/04}{deprecated}
-% \changes{v3.35}{2021/10/15}{\cs{ClassWarning} instead of \cs{ClassInfo}}
-% \changes{v3.35}{2021/10/15}{Usage of \cs{scr@doonlyifstyleofargis} fixed}
-% This is deprecated now. You should use the corresponding
-% \dhook{heading/branch/nostar} do hook. However the do hooks are command
-% specific, but the argument of \cs{Before@sect} is style specific.
-% \begin{macrocode}
-\newcommand*{\Before@sect}[1]{%
- \ClassWarning{\KOMAClassName}{%
- Usage of deprecated command `\string\Before@sect'
- mapped to\MessageBreak
- `\string\AddtoDoHook{heading/branch/nostar}%
- {...\string\@gobble}'%
- }%
- \AddtoDoHook{heading/branch/nostar}{\scr@doonlyifstyleofargis{#1}{section}}%
-}
-% \end{macrocode}
-% \end{macro}^^A \Before@sect
-% \begin{macro}{\scr@section@dblarg,\scr@section@xdblarg}
-% \changes{v3.13a}{2014/09/11}{added}
-% Similar to the \LaTeX{} kernel macros \cs{@dblarg} and \cs{@xdblarg} but
-% preserve the definition of \cs{scr@osectarg}. So changes of
-% \cs{scr@osectarg} inside the definition of the command of the first
-% argument, are locally to the execution of that command.
-% \begin{macrocode}
-\newcommand{\scr@section@dblarg}[1]{%
- \kernel@ifnextchar[%]
- {#1}%
- {\scr@section@xdblarg{#1}}%
-}
-\newcommand{\scr@section@xdblarg}[2]{%
- \begingroup
- \edef\reserved@a{%
- \unexpanded{\endgroup\let\scr@osectarg\z@#1[{#2}]{#2}\def\scr@osectarg}%
- {\scr@osectarg}}%
- \reserved@a
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@section@dblarg,\scr@section@xdblarg
-% \end{macro}^^A \scr@saved@startsection
-% \end{macro}^^A \scr@startsection
-% \begin{description}
-% \item[ToDo:] Currently we still redefine \cs{@startsection} to use either
-% \cs{scr@saced@startsection} or \cs{scr@startsection}. But it would be
-% better to not redefine a \LaTeX{} kernel macro. However, if not doing so,
-% packages, that use \cs{@startsection} would not support \KOMAScript{}
-% features without detecting \KOMAScript{} and using \cs{scr@startsection}.
-% \end{description}
-% \begin{macrocode}
-\renewcommand*{\@startsection}{%
- \ifnum \scr@osectarg=\z@
- \expandafter\scr@saved@startsection
- \else
- \expandafter\scr@startsection
- \fi
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@startsection
-%
-% \begin{command}{\UseNumberUsageError}
-% \changes{v3.27}{2019/02/02}{added}
-% \begin{command}{\IfUseNumber}
-% \changes{v3.27}{2019/02/02}{error if used outside sectioning command}
-% Command \cs{IfUseNumner} is defined only inside sectioning commands. Using
-% it outside is not specified. To report an error in this case, it should be
-% set to \cs{UseNumberUsageError} outside a sectioning command.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\UseNumberUsageError}[2]{%
- \ClassError{\KOMAClassName}{%
- \string\IfUseNumber\space not allowed%
- }{%
- You cannot use \string\IfUseNumber\space outside a heading.\MessageBreak
- If you'd continue, I'll ignore both arguments, because I do not
- know\MessageBreak
- whether to use the first or the second argument.%
- }%
-}
-\newcommand*{\IfUseNumber}[2]{}%
-\let\IfUseNumber\UseNumberUsageError
-%</body>
-% \end{macrocode}
-% \end{command}^^A \IfUseNumnr
-% \end{command}^^A \UseNumberUsageError
-%
-%
-% \begin{command}{\SecDef}
-% \changes{v3.13a}{2014/09/11}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{command}{\secdef}
-% \changes{v3.13a}{2014/09/11}{re-definition because of extended optional argument}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\SecDef}[2]{\kernel@ifstar{#2}{\scr@section@dblarg{#1}}}
-\CheckCommand*{\secdef}[2]{\@ifstar{#2}{\@dblarg{#1}}}
-\let\secdef\SecDef
-%</body>
-% \end{macrocode}
-% \end{command}^^A \secdef
-% \end{command}^^A \SecDef
-% \begin{macro}{\scr@sect}
-% \changes{v3.10}{2011/08/30}{removed}
-% \end{macro}^^A \scr@sect
-% \begin{macro}{\@sect}
-% \changes{v3.10}{2011/08/30}{re-definition because of extended optional argument}
-% \changes{v3.10}{2011/08/30}{using
-% \cs{csname}\texttt{add\#1tocentry}\cs{endcsname}
-% resp. \cs{addtocentrydefault}}
-% \changes{v3.18}{2015/05/20}{defines \cs{IfUsePrefixLine} locally}
-% \changes{v3.18}{2015/05/22}{using \cs{numexpr} for argument 2}
-% \changes{v3.18}{2015/05/22}{using \cs{gluexpr} for arguments 3--5}
-% \changes{v3.19}{2015/07/17}{using \cs{sectionlinesformat} and
-% \cs{sectioncatchphraseformat}}
-% \changes{v3.27}{2019/07/08}{new optional \opt{nonumber}}
-% \changes{v3.30}{2020/02/25}{orphan spaces removed}
-% \begin{macro}{\scr@latex@sect}
-% \changes{v3.27}{2019/07/24}{added to be used by \pkg*{scrhack}}
-% Because we want to support the extended optional argument for all commands
-% defined using \cs{@startsection} we also have to redefine \cs{@sect}. Once
-% again several security tests are done, before redefining an internal
-% \LaTeX{} kernel macro.
-% \begin{description}
-% \item[ToDo:] It would be better not to redefine an internal \LaTeX{} kernel
-% macro, but use a own definition in our own \cs{scr@startsection}. But in
-% this case packages, that use \cs{@sect} would not automatically support
-% several \KOMAScript{} features.
-% \item[Note:] \cs{chapter} and \cs{part} do not use \cs{@sect} but
-% \cs{SecDef}.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\def\scr@latex@sect#1#2#3#4#5#6[#7]#8{%
- \ifnum #2>\c@secnumdepth
- \let\@svsec\@empty
- \else
- \refstepcounter{#1}%
- \protected@edef\@svsec{\@seccntformat{#1}\relax}%
- \fi
- \@tempskipa #5\relax
- \ifdim \@tempskipa>\z@
- \begingroup
- #6{%
- \@hangfrom{\hskip #3\relax\@svsec}%
- \interlinepenalty \@M #8\@@par}%
- \endgroup
- \csname #1mark\endcsname{#7}%
- \addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \protect\numberline{\csname the#1\endcsname}%
- \fi
- #7}%
- \else
- \def\@svsechd{%
- #6{\hskip #3\relax
- \@svsec #8}%
- \csname #1mark\endcsname{#7}%
- \addcontentsline{toc}{#1}{%
- \ifnum #2>\c@secnumdepth \else
- \protect\numberline{\csname the#1\endcsname}%
- \fi
- #7}}%
- \fi
- \@xsect{#5}}
-\ifx\@sect\scr@latex@sect\else
- \let\scr@latex@sect\@sect
- \ClassWarning{\KOMAClassName}{%
- Unexpected definition of \string\@sect!\MessageBreak
- Please send information about this to\MessageBreak
- the KOMA-Script maintainer!\MessageBreak
- Maybe LaTeX will be broken by the redefinition\MessageBreak
- of \string\@sect}%
-\fi
-% \end{macrocode}
-% \end{macro}^^A \scr@latex@sect
-% \begin{macrocode}
-%<trace>\ClassInfo{\KOMAClassName}{redefining LaTeX kernel macro \string\@sect}
-\def\@sect#1#2#3#4#5#6[#7]#8{%
- \ifnum \scr@osectarg=\z@
- \@scr@tempswafalse
- \else
- \scr@istest#7=\@nil
- \fi
- \@currentusenumbertrue
- \if@scr@tempswa
- \setkeys{KOMAarg.section}{tocentry={#8},head={#8},reference={#8},#7}%
- \else
- \ifcase \scr@osectarg\relax
- \setkeys{KOMAarg.section}{tocentry={#7},head={#7},reference={#7}}%
- \or
- \setkeys{KOMAarg.section}{tocentry={#8},head={#7},reference={#8}}%
- \or
- \setkeys{KOMAarg.section}{tocentry={#7},head={#8},reference={#7}}%
- \or
- \setkeys{KOMAarg.section}{tocentry={#7},head={#7},reference={#7}}%
- \fi
- \fi
-% \end{macrocode}
-% \changes{v3.23}{2017/02/04}{support for \pkg{minitoc}}
-% \changes{v3.23}{2017/03/24}{usage of \cs{ext@figure} and \cs{ext@table}
-% instead of \texttt{lof} and \texttt{lot}}
-% Add the \texttt{xsect} entries to \texttt{lof} and \texttt{lot}. Note, that
-% the original \cs{starsection} tests of \pkg{minitoc} has a bug and so
-% does not work. And the original code of \pkg{minitoc} has hard coded
-% \texttt{lot} and \texttt{lof} instead of \cs{ext@figure} and
-% \cs{ext@table}. This is a fixed one:
-% \begin{macrocode}
- \scr@ifundefinedorrelax{scr@mt@saved@sect}{}{%
- \expandafter\ifx\csname #1\endcsname\section
- \addcontentsline{\ext@figure}{xsect}{\@currenttocentry}%
- \addcontentsline{\ext@table}{xsect}{\@currenttocentry}%
- \fi
- \expandafter\ifx\csname #1\endcsname\starsection\relax
- \addcontentsline{\ext@figure}{xsect}{\@currenttocentry}%
- \addcontentsline{\ext@table}{xsect}{\@currenttocentry}%
- \fi
- }%
- \let\IfUsePrefixLine\@secondoftwo
- \ifcase
- \if@currentusenumber
- \ifnum \numexpr #2\relax>\c@secnumdepth \z@\else \@ne\fi
- \else
- \z@
- \fi
- \let\@svsec\@empty
-% \end{macrocode}
-% \changes{v3.31}{2020/06/02}{execute counter reset list}
-% Even for not numbered sections, the reset list für the section counter has
-% to be executed.
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.31}\relax\else
- \begingroup
- \let\@elt\@stpelt
- \csname cl@#1\endcsname
- \endgroup
- \fi
-% \end{macrocode}
-% \changes{v3.31}{2020/06/02}{\cs{hy@insteadofrefstepcounter} added}
-% At this point we have to make sure, that the \pkg{hyperref} code for not
-% increasing a counter is executed.
-% \begin{macrocode}
- \hy@insteadofrefstepcounter{#1}%
- \else
- \refstepcounter{#1}%
- \expandafter\@maybeautodot\csname the#1\endcsname
- \protected@edef\@svsec{\@seccntformat{#1}\relax}%
- \fi
-% \end{macrocode}
-% \changes{v3.26}{2018/09/18}{support for \cs{scr@sect@runin}}
-% \changes{v3.27}{2019/02/02}{\cs{IfUseNumber} defined locally}
-% \begin{macrocode}
- \ifdim
- \scr@sect@runin{\z@}{\p@}{\glueexpr #5\relax}>\z@
- \begingroup
- \ifx\@svsec\@empty
- \let\IfUseNumber\@secondoftwo
- \else
- \let\IfUseNumber\@firstoftwo
- \fi
-% \end{macrocode}
-% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added}
-% \changes{v3.27}{2019/02/02}{\cs{scr@do@at} added}
-% \begin{macrocode}
- \ExecuteDoHook{heading/begingroup/#1}%
- #6{\nobreak\interlinepenalty \@M
- \sectionlinesformat{#1}{\glueexpr #3\relax}\@svsec{#8}\@@par}%
- \ExecuteDoHook{heading/endgroup/#1}%
- \endgroup
-%<*trace>
- \ClassInfo{\KOMAClassName}{%
- head=`\detokenize\expandafter{\@currentheadentry}'\MessageBreak
- tocentry=`\detokenize\expandafter{\@currenttocentry}'\MessageBreak
- reference=`\detokenize\expandafter{\@currentlabelname}'}%
-%</trace>
- \expandafter\csname #1mark\expandafter\endcsname\expandafter{\@currentheadentry}%
- \ifx\@currenttocentry\@empty\else
- \scr@ifundefinedorrelax{add#1tocentry}{%
- \expandafter\gdef\csname add#1tocentry\endcsname##1##2{%
- \addtocentrydefault{#1}{##1}{##2}%
- }%
- }{}%
- \ifcase
- \if@currentusenumber
- \ifnum \numexpr #2\relax>\c@secnumdepth \z@\else \@ne\fi
- \else
- \z@
- \fi
- \csname add#1tocentry\endcsname{}{\@currenttocentry}%
- \else
-% \end{macrocode}
-% \changes{v3.31}{2020/06/06}{using \cs{\dots tocformat}}%
-% \begin{description}
-% \item[ToDo:] Move \cs{autodot} to the definition of \cs{\dots tocformat}.
-% \end{description}
-% \begin{macrocode}
- \@ifundefined{#1tocformat}{%
- \expandafter\gdef\csname #1tocformat\endcsname
- {\csname the#1\endcsname}%
- }{}%
- \csname add#1tocentry\endcsname{\csname #1tocformat\endcsname}{%
- \@currenttocentry}%
- \fi
- \fi
- \else
-% \end{macrocode}
-% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added}
-% \changes{v3.27}{2019/02/02}{\cs{ExecuteDoHook} added}
-% \begin{macrocode}
- \def\@svsechd{%
- \ifx\@svsec\@empty
- \let\IfUseNumber\@secondoftwo
- \else
- \let\IfUseNumber\@firstoftwo
- \fi
- \ExecuteDoHook{heading/begingroup/#1}%
- #6{\nobreak\sectioncatchphraseformat{#1}{\glueexpr #3\relax}\@svsec{#8}}%
-%<*trace>
- \ClassInfo{\KOMAClassName}{%
- head=`\detokenize\expandafter{\@currentheadentry}'\MessageBreak
- tocentry=`\detokenize\expandafter{\@currenttocentry}'\MessageBreak
- reference=`\detokenize\expandafter{\@currentlabelname}'}%
-%</trace>
- \expandafter\csname #1mark\expandafter\endcsname
- \expandafter{\@currentheadentry}%
- \ifx\@currenttocentry\@empty\else
- \scr@ifundefinedorrelax{add#1tocentry}{%
- \expandafter\gdef\csname add#1tocentry\endcsname####1####2{%
- \addtocentrydefault{#1}{####1}{####2}%
- }%
- }{}%
- \ifcase
- \if@currentusenumber
- \ifnum \numexpr #2\relax>\c@secnumdepth \z@\else \@ne\fi
- \else
- \z@
- \fi
- \csname add#1tocentry\endcsname{}{\@currenttocentry}%
- \else
-% \end{macrocode}
-% \changes{v3.31}{2020/06/06}{using \cs{\dots tocformat}}%
-% \begin{description}
-% \item[ToDo:] Move \cs{autodot} to the definition of \cs{\dots tocformat}.
-% \end{description}
-% \begin{macrocode}
- \@ifundefined{#1tocformat}{%
- \expandafter\gdef\csname #1tocformat\endcsname
- {\csname the#1\endcsname}%
- }{}%
- \csname add#1tocentry\endcsname{\csname #1tocformat\endcsname}{%
- \@currenttocentry}%
- \fi
- \fi
- \ExecuteDoHook{heading/endgroup/#1}%
- }%
- \fi
- \let\IfUsePrefixLine\scr@IfUsePrefixLineWarning
- \@xsect{\glueexpr #5\relax}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@ds@tocentry,\@currenttocentry}
-% \changes{v3.10}{2011/08/30}{added}
-% \changes{v3.22}{2016/07/12}{\cs{scr@ds@tocentry} renamed to \cs{@currenttocentry}}
-% \begin{macro}{\scr@ds@head,\@currentheadentry}
-% \changes{v3.10}{2011/08/30}{added}
-% \changes{v3.22}{2016/07/12}{\cs{scr@ds@head} renamed to \cs{@currentheadentry}}
-% \begin{macro}{\@currentlabelname}
-% \changes{v3.22}{2016/07/12}{added}
-% \begin{macro}{\@scr@tempswatrue,\@scr@tempswafalse,\if@scr@tempswa}
-% \changes{v3.10}{2011/08/30}{added}
-% \begin{macro}{\@currentusenumbertrue,\@currentusenumberfalse,\if@currentusenumber}
-% \changes{v3.27}{2019/07/08}{added}
-% \begin{macro}{\scr@istest}
-% \changes{v3.10}{2011/08/30}{added}
-% We are using several \pkg*{scrbase} options to handle the extended
-% optional argument features.
-% \begin{description}
-% \item[ToDo:] Is there a general initialization hook to make additional such
-% options at package author level possible?
-% \end{description}
-% \begin{macrocode}
-\DefineFamily{KOMAarg}
-\DefineFamilyMember[.section]{KOMAarg}
-\providecommand*\@currenttocentry{}
-\providecommand*\@currentheadentry{}
-\providecommand*\@currentlabelname{}
-\FamilyStringKey[.section]{KOMAarg}{tocentry}{\@currenttocentry}
-\FamilyStringKey[.section]{KOMAarg}{head}{\@currentheadentry}
-\DefineFamilyKey[.section]{KOMAarg}{reference}{%
- \scr@ifundefinedorrelax{NR@gettitle}{%
- \scr@ifundefinedorrelax{GetTitleString}{%
- \def\@currentlabelname{#1}%
- }{%
- \GetTitleString{#1}%
- \let\@currentlabelname\GetTitleStringResult
- }%
- }{%
- \NR@gettitle{#1}%
- }%
- \scr@ifundefinedorrelax{TR@gettitle}{}{%
- \expandafter\TR@gettitle\expandafter{\@currentlabelname}%
- }%
- \scr@ifundefinedorrelax{ztitlerefsetup}{}{%
- \ztitlerefsetup{title=\@currentlabelname}%
- }%
- \FamilyKeyStateProcessed
-}
-\FamilyInverseBoolKey[.section]{KOMAarg}{nonumber}{@currentusenumber}
-\newcommand*{\scr@istest}{}
-\def\scr@istest#1=#2\@nil{%
- \ifx\relax#2\relax\@scr@tempswafalse\else\@scr@tempswatrue\fi
-}
-\newif\if@scr@tempswa
-% \end{macrocode}
-% \end{macro}^^A \scr@istest
-% \end{macro}^^A \if@currentusenumber
-% \end{macro}^^A \if@scr@tempswa
-% \end{macro}^^A \@currentlabelname
-% \end{macro}^^A \scr@ds@head,\@currentheadentry
-% \end{macro}^^A \scr@ds@tocentry,\@currenttocentry
-%
-% \begin{command}{\sectionlinesformat,\sectioncatchphraseformat}
-% \changes{v3.19}{2015/07/17}{added}
-% Headings with style \texttt{section} can either be free-standing or
-% in-line. Free-standing headings are printed using:
-% \begin{quote}
-% \cs{sectionlinesformat}\marg{level name}\marg{indent}\marg{number}\marg{text}
-% \end{quote}
-% The in-line headings are printed using:
-% \begin{quote}
-% \cs{sectioncatchphraseformat}\marg{level name}\marg{indent}\marg{number}\marg{text}
-% \end{quote}
-% The \meta{level name} can also be interpreted as the section command
-% name. The \meta{indent} is the horizontal indent of the first line of the
-% heading. The \meta{number} is either empty for not numbered headings or the
-% formatted number to be used. \meta{text} is the formatted text to be
-% used. Formatted text means, the fonts are already set and \cs{@@par} for the
-% end of paragraph already has been added to the \meta{text} of
-% \cs{sectionlinesformat}. But if the user uses more paragraphs than this
-% final one, the user is responsible to prevent page breaks!
-% \begin{description}
-% \item[Note:] Argument \meta{indent} is a kind of design mistake. It would
-% have been better to get the indent by the attributes of the \meta{level
-% name}. However having an argument makes it easier for users to redefine
-% the command.
-% \end{description}
-% \begin{macrocode}
-\newcommand{\sectionlinesformat}[4]{%
- \@hangfrom{\hskip #2#3}{#4}%
-}
-\newcommand{\sectioncatchphraseformat}[4]{%
- \hskip #2#3#4%
-}
-% \end{macrocode}
-% \end{command}^^A \sectionlinesformat,\sectioncatchphraseformat
-% \end{macro}^^A \@sect
-%
-% \begin{macro}{\@ssect}
-% \changes{v3.19}{2015/07/17}{re-definition because of several new features}
-% \begin{macro}{\scr@latex@ssect}
-% \changes{v3.27}{2019/07/24}{added to be used by \pkg*{scrhack})}
-% \changes{v3.30}{2020/02/25}{orphan space removed}
-% The star variant of section commands do not use \cs{@sect} but
-% \cs{@ssect}. Here we have the problem, that the command name argument is
-% missing. The whole definition is very similar to \cs{@sect} but without a
-% number, ToC entry or running head.
-% \begin{description}
-% \item[Note:] we do not have to support an extended optional argument,
-% because there isn't an optional argument.
-% \item[ToDo:] It would be better not to redefine an internal \LaTeX{} kernel
-% macro, but use a own definition in our own \cs{scr@startsection}. But in
-% this case packages, that use \cs{@ssect} would not automatically support
-% several \KOMAScript{} features.
-% \item[Note:] \cs{chapter} and \cs{part} do not use \cs{@ssect} but
-% \cs{SecDef}.
-% \end{description}
-% \begin{macrocode}
-\def\scr@latex@ssect#1#2#3#4#5{%
- \@tempskipa #3\relax
- \ifdim \@tempskipa>\z@
- \begingroup
- #4{%
- \@hangfrom{\hskip #1}%
- \interlinepenalty \@M #5\@@par}%
- \endgroup
- \else
- \def\@svsechd{#4{\hskip #1\relax #5}}%
- \fi
- \@xsect{#3}}
-\ifx\@ssect\scr@latex@ssect
-\else
- \let\scr@latex@ssect\@ssect
- \ClassWarning{\KOMAClassName}{%
- Unexpected definition of \string\@ssect!\MessageBreak
- Please send information about this to\MessageBreak
- the KOMA-Script maintainer!\MessageBreak
- Maybe LaTeX will be broken by the redefinition\MessageBreak
- of \string\@ssect}%
-\fi
-% \end{macrocode}
-% \end{macro}^^A \scr@latex@ssect
-% \begin{macrocode}
-%<trace>\ClassInfo{\KOMAClassName}{redefining LaTeX kernel macro
-%<trace> \string\@ssect}
-\def\@ssect#1#2#3#4#5{%
- \scr@ifundefinedorrelax{scr@s@ct@@nn@m@}{%
- \ClassWarning{\KOMAClassName}{Incompatible usage of
- \string\@ssect\space detected.\MessageBreak
- You've used the KOMA-Script implementation of
- \string\@ssect\MessageBreak
- from within a non compatible caller, that does not\MessageBreak
- \string\scr@s@ct@@nn@m@\space locally.\MessageBreak
- This could result in several error messages}%
- \def\scr@s@ct@@nn@m@{\string\scr@s@ct@@nn@m@}%
- }{%
-% \end{macrocode}
-% \changes{v3.31}{2020/06/02}{execute counter reset list}
-% Even for not numbered sections, the reset list für the corresponding section
-% counter has to be executed.
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.31}\relax\else
- \begingroup
- \let\@elt\@stpelt
- \csname cl@\scr@s@ct@@nn@m@\endcsname
- \endgroup
- \fi
- }%
-% \end{macrocode}
-% \changes{v3.26}{2018/09/18}{support for \cs{scr@sect@runin}}
-% \changes{v3.27}{2019/02/02}{defining \cs{IfUseNumber} locally}
-% \begin{macrocode}
- \ifdim
- \scr@sect@runin{\z@}{\p@}{\glueexpr #3\relax}>\z@
- \begingroup
- \let\IfUseNumber\@secondoftwo
-% \end{macrocode}
-% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added}
-% \changes{v3.27}{2019/02/02}{\cs{ExecuteDoHook} added}
-% \begin{macrocode}
- \edef\reserved@a{%
- \noexpand\ExecuteDoHook{heading/begingroup/\scr@s@ct@@nn@m@}%
- }\reserved@a
- #4{\nobreak\interlinepenalty \@M
- \expandafter\sectionlinesformat\expandafter{\scr@s@ct@@nn@m@}%
- {\glueexpr #1\relax}\@empty{#5}\@@par}%
- \edef\reserved@a{%
- \noexpand\ExecuteDoHook{heading/endgroup/\scr@s@ct@@nn@m@}%
- }\reserved@a
- \endgroup
- \else
- \edef\@svsechd{%
- \unexpanded{\let\IfUseNumber\@secondoftwo}%
- \noexpand\ExecuteDoHook{heading/begingroup/\scr@s@ct@@nn@m@}%
- \unexpanded{#4}{%
-% \end{macrocode}
-% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added}
-% \begin{macrocode}
- \noexpand\nobreak
- \noexpand\sectioncatchphraseformat{\scr@s@ct@@nn@m@}%
- \unexpanded{{\glueexpr #1\relax}\@empty{#5}}%
- }%
- \noexpand\ExecuteDoHook{heading/endgroup/\scr@s@ct@@nn@m@}%
- }%
- \fi
- \let\scr@s@ct@@nn@m@\relax
- \@xsect{\glueexpr #3\relax}%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@ssect
-% \begin{macro}{\@xsect}
-% \changes{v3.26}{2018/09/18}{re-definition}
-% \changes{v3.30}{2020/02/25}{orphan space removed}
-% \begin{macro}{\scr@latex@xsect}
-% \changes{v3.27}{2019/07/24}{added to be used by \pkg*{scrhack}}
-% We need a differentiation with \cs{scr@sect@runin} to be initialized in
-% \cs{@xsect} and also need to reset this internal macro at the end.
-% \begin{description}
-% \item[ToDo:] It would be better not to redefine the internal \LaTeX{} kernel
-% macro, but to define and use our own one.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\def\scr@latex@xsect#1{%
- \@tempskipa #1\relax
- \ifdim \@tempskipa>\z@
- \par \nobreak
- \vskip \@tempskipa
- \@afterheading
- \else
- \@nobreakfalse
- \global\@noskipsectrue
- \everypar{%
- \if@noskipsec
- \global\@noskipsecfalse
- {\setbox\z@\lastbox}%
- \clubpenalty\@M
- \begingroup \@svsechd \endgroup
- \unskip
- \@tempskipa #1\relax
- \hskip -\@tempskipa
- \else
- \clubpenalty \@clubpenalty
- \everypar{}%
- \fi}%
- \fi
- \ignorespaces
-}
-\ifx\@xsect\scr@latex@xsect\else
- \let\scr@latex@xsect\@xsect
- \ClassWarning{\KOMAClassName}{%
- Unexpected definition of \string\@xsect!\MessageBreak
- Please send information about this to\MessageBreak
- the KOMA-Script maintainer!\MessageBreak
- Maybe LaTeX will be broken by the redefinition\MessageBreak
- of \string\@xsect}%
-\fi
-% \end{macrocode}
-% \end{macro}^^A \scr@latex@xsect
-% \begin{macrocode}
-%<trace>\ClassInfo{\KOMAClassName}{redefining LaTeX kernel macro
-%<trace> \string\@xsect}
-\def\@xsect#1{%
- \@ifundefined{scr@sect@runin}{%
- \def\scr@sect@runin##1##2##3{##3}%
- }%
- \@tempskipa #1\relax
- \ifdim \scr@sect@runin{\z@}{\p@}{\@tempskipa}>\z@
- \par \nobreak
- \vskip \@tempskipa
- \@afterheading
- \else
- \@nobreakfalse
- \global\@noskipsectrue
- \everypar{%
- \if@noskipsec
- \global\@noskipsecfalse
- {\setbox\z@\lastbox}%
- \clubpenalty\@M
- \begingroup \@svsechd \endgroup
- \unskip
- \@tempskipa #1\relax
- \ifdim \@tempskipa<\z@
- \hskip -\@tempskipa
- \else
- \hskip \@tempskipa
- \fi
- \else
- \clubpenalty \@clubpenalty
- \everypar{}%
- \fi}%
- \fi
- \def\scr@sect@runin##1##2##3{##3}%
- \ignorespaces
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@xsect
-%
-% \begin{command}{\IfUsePrefixLine}
-% \changes{v3.18}{2015/06/09}{added}
-% \begin{macro}{\scr@IfUsePrefixLineWarning}
-% \changes{v3.18}{2015/06/09}{added}
-% This command makes sense inside the section commands only. But users often
-% tried to use it outside instead of \cs{ifnumbered}. This mostly has resulted
-% in a undefined command sequence error users did not understand. So now, we
-% use an internal definition to be uses outside the section commands, that
-% results in a warning with more information about the mistake and that does
-% neither use the first nor the second argument (instead of using both of them).
-% \begin{macrocode}
-%<*body>
-\newcommand*{\scr@IfUsePrefixLineWarning}[2]{%
- \ClassWarning{\KOMAClassName}{%
- Usage of \string\IfUsePrefixLine\space outside
- section command\MessageBreak
- style makes no sense, because the behaviour not only\MessageBreak
- depends on class options but also on the run-time\MessageBreak
- section command style.\MessageBreak
- Neither the then-code nor the else-code will be\MessageBreak
- executed.\MessageBreak
- You may change this and avoid the warning by LOCALLY\MessageBreak
- setting \string\IfUsePrefixLine\space to either
- \string\@firstoftwo\space or\MessageBreak
- \string\@secondoftwo\space before using it%
- }%
-}
-\newcommand*{\IfUsePrefixLine}[2]{}
-\let\IfUsePrefixLine\scr@IfUsePrefixLineWarning
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \scr@IfUsePrefixLineWarning
-% \end{command}^^A \IfUsePrefixLine
-%
-%
-% \begin{command}{\raggedsection}
-% \changes{v2.3h}{1996/01/20}{added}
-% Should be either \cs{raggedleft}, \cs{raggedright}, \cs{centering} or
-% empty. Empty means no change, which is usually justified. Users could also
-% use other alignment/justification commands like the commands of package
-% \pkg{ragged2e}. The initial value is \cs{raggedright}.
-% \begin{description}
-% \item[Note:] We are here in the class. So usually \cs{raggedright} is the
-% \cs{raggedright} of the \LaTeX{} kernel. This also means: no hyphenation.
-% \item[Note:] We define is already here, because it is not only used for
-% style \texttt{section} but also as initial default of the \emph{higher
-% level} styles.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\raggedsection}{}
-\let\raggedsection\raggedright
-%</body>
-% \end{macrocode}
-% \end{command}^^A \raggedsection
-%
-%
-% All the options of \cs{DeclareSectionCommand} are options of family
-% \texttt{KOMAarg} member \texttt{.dsc}.
-% \begin{macrocode}
-%<*body>
-\DefineFamily{KOMAarg}
-\DefineFamilyMember[.dsc]{KOMAarg}
-% \end{macrocode}
-% \begin{command}{\DeclareSectionCommandStyleOption}
-% \changes{v3.17}{2015/03/23}{added}
-% \begin{command}{\AddToSectionCommandOptionsDoList,\RelaxSectionCommandOptions}
-% \changes{v3.20}{2015/11/18}{added}
-% \begin{macro}{\@AddToSectionCommandOptionsDoList,\scr@dsc@doopts}
-% \changes{v3.20}{2015/11/18}{added}
-% The basic command to define a section command style option is:
-% \begin{quote}
-% \cs{DeclareSectionCommandStyleOption}\marg{style}\marg{option}\marg{definition}
-% \end{quote}
-% Is similar to a corresponding \cs{DefineFamilyKey}. But the option
-% definition is not done immediately but added to
-% \cs{scr@dsc@style@\meta{style}@options} which is executed later inside
-% \cs{DeclareSectionCommand} after detection of the \opt{style} option. The
-% option is also added to the \emph{section command options do list} of
-% \cs{scr@dsc@doopts} using
-% \begin{quote}
-% \cs{AddToSectionCommandOptionsDoList}\marg{option}
-% \end{quote}
-% This is used, e.g., to relax all options inside \cs{DeclareSectionCommand}
-% using \cs{RelaxSectionCommandOptions} to not have options defined, that are
-% used by one style, while declaring a command of another style, that does not
-% support the option.
-% \begin{description}
-% \item[Note:] We also could have used another option member for every style
-% to avoid such problems. With \LaTeX3 also usage of
-% \pkg[https://www.ctan.org/pkg/l3kernel]{l3keys}, which provides a kind of
-% hierarchical options, would have been possible.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\DeclareSectionCommandStyleOption}[3]{%
- \AddToSectionCommandOptionsDoList{#2}%
- \expandafter\g@addto@macro\csname scr@dsc@style@#1@options\endcsname{%
- \DefineFamilyKey[.dsc]{KOMAarg}{#2}{#3}%
- }%
-}
-\newcommand*{\AddToSectionCommandOptionsDoList}[1]{%
- \kernel@ifnextchar [%]
- {\@AddToSectionCommandOptionListWithDefault{#1}}%
- {\l@addto@macro\scr@dsc@doopts{\do{#1}}}%
-}
-\newcommand*{\@AddToSectionCommandOptionListWithDefault}{}
-\def\@AddToSectionCommandOptionListWithDefault#1[#2]{%
- \l@addto@macro\scr@dsc@doopts{\do[{#2}]{#1}}
-}%
-\newcommand*{\scr@dsc@doopts}{}
-\newcommand*{\RelaxSectionCommandOptions}{%
- \begingroup
- \def\do@endgroup{\endgroup}%
- \def\do{%
- \kernel@ifnextchar [%]
- {\@do}%
- {\@do[]}%
- }%
- \def\@do[##1]##2{%
- \l@addto@macro\do@endgroup{\RelaxFamilyKey[.dsc]{KOMAarg}{##2}}%
- }%
- \scr@dsc@doopts
- \do@endgroup
-}
-% \end{macrocode}
-% \end{macro}^^A \@AddToSectionCommandOptionsListWithDefault,\scr@dsc@dooptions
-% \end{command}^^A \AddToSectionCommandOptionsDoList,\RelaxSectionCommandOptions
-% \end{command}^^A \DeclareSectionCommandStyleOption
-% We provide several kinds of options:
-% \begin{command}{\DeclareSectionCommandDummyOption}
-% \changes{v3.17}{2015/03/23}{added}
-% \changes{v3.20}{2015/11/18}{removed}
-% \end{command}^^A \DeclareSectionCommandDummyOption
-% \begin{command}{\DeclareSectionCommandStyleLengthOption,
-% \DeclareSectionCommandStyleNumberOption,
-% \DeclareSectionCommandStyleFontOption}
-% \changes{v3.17}{2015/03/23}{added}
-% \changes{v3.20}{2016/04/25}{argument expansion}
-% All these commands have the four arguments:
-% \begin{quote}
-% \marg{style}\marg{option}\marg{prefix}\marg{postfix}
-% \end{quote}
-% Most of the commands all correspond to \pkg*{scrbase} option declaration
-% commands:
-% \begin{center}
-% \begin{tabular}{lll}
-% \cs{DeclareSectionCommand} & \pkg*{scrbase} & meaning \\\hline
-% \cs{DeclareSectionCommandStyleLengthOption}
-% & \cs{FamilyLengthMacroKey} & length option\\
-% \cs{DeclareSectionCommandStyleNumberOption}
-% & \cs{FamilyCounterMacroKey} & numerical option\\
-% \cs{DeclareSectionCommandStyleFontOption}
-% & & font element option\\
-% \end{tabular}
-% \end{center}
-% The \meta{macro} of the corresponding \pkg*{scrbase} command is build by
-% \meta{prefix}\cs{scr@dsc@current}\meta{postfix}. For
-% \cs{DeclareSectionCommandStyleOption} the build name is the font
-% element instead. However, before using (setting) the option,
-% \cs{scr@dsc@current} has to be defined to be \meta{level name}
-% (aka \emph{section command name}). Depending on \cs{ifscr@dsc@expandtopt}
-% (see option \opt{expandtopt}) lengths given as argument to the option of
-% \cs{DeclareSectionCommandStyleLengthOption} is expanded to a \texttt{pt}
-% value instead of used as it is.
-% \begin{macrocode}
-\newcommand*{\DeclareSectionCommandStyleLengthOption}[4]{%
- \DeclareSectionCommandStyleOption{#1}{#2}{%
- \protected@edef\reserved@a{%
- \noexpand\FamilySetLength{KOMAarg}{#2}{\noexpand\@tempskipa}{##1}%
- }\reserved@a
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifscr@dsc@expandtopt
- \expandafter\edef\csname #3\scr@dsc@current#4\endcsname{%
- \the\@tempskipa}%
- \else
- \expandafter\edef\csname #3\scr@dsc@current#4\endcsname{##1}%
- \fi
- \fi
- }%
-}
-\newcommand*{\DeclareSectionCommandStyleNumberOption}[4]{%
- \DeclareSectionCommandStyleOption{#1}{#2}{%
- \protected@edef\reserved@a{%
- \noexpand\FamilySetCounterMacro{KOMAarg}{#2}{\noexpand\reserved@a}{##1}
- }\reserved@a
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \expandafter\let\csname #3\scr@dsc@current#4\endcsname\reserved@a
- \fi
- }%
-}
-\newcommand*{\DeclareSectionCommandStyleFontOption}[4]{%
- \DeclareSectionCommandStyleOption{#1}{#2}{%
- \IfExistskomafont{#3\scr@dsc@current#4}{%
- \setkomafont
- }{%
- \newkomafont
- }{#3\scr@dsc@current#4}{##1}%
- \FamilyKeyStateProcessed
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \DeclareSectionCommandStyleLengthOption …
-% \begin{command}{\DeclareSectionCommandStyleFuzzyOption}
-% \changes{v3.26}{2018/09/18}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% We also have a kind of fuzzy option. A fuzzy option defined by
-% \begin{quote}
-% \cs{DeclareSectionCommandStyleFuzzyOption}\meta{style}\meta{option}%
-% \meta{prefix}\meta{postfix}\meta{also}
-% \end{quote}
-% is an option, that provides three values: \texttt{true} (and the aliases
-% \texttt{on} and \texttt{yes}), \texttt{false} (and the aliases \texttt{off}
-% and \texttt{no}), and a third one \meta{also}. It defines a macro with the
-% name \meta{prefix}\cs{scr@dsc@current}\meta{postfix} and three arguments. If
-% the option is true, the macro expands to the first argument. If the option
-% is false, the macro expands to the second argument. If the option is
-% \meta{also} the macro expands to the third argument.
-% \begin{macrocode}
-\newcommand*{\DeclareSectionCommandStyleFuzzyOption}[5]{%
- \DeclareSectionCommandStyleOption{#1}{#2}{%
- \FamilySetBool{KOMAarg}{#2}{@tempswa}{##1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \if@tempswa
- \expandafter\def\csname #3\scr@dsc@current#4\endcsname
- ####1####2####3{####1}%
- \else
- \expandafter\def\csname #3\scr@dsc@current#4\endcsname
- ####1####2####3{####2}%
- \fi
- \else
- \Ifstr{##1}{#5}{%
- \expandafter\def\csname #3\scr@dsc@current#4\endcsname
- ####1####2####3{####3}%
- \FamilyKeyStateProcessed
- }{}%
- \fi
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \DeclareSectionCommandStyleFuzzyOptions
-%
-% These types of options are used to define all the options of a style, e.g.,
-% \begin{macro}{\scr@dsc@style@section@options}
-% \changes{v3.17}{2015/03/23}{added}
-% the option declarations of style \texttt{section}:
-% \begin{macrocode}
-\newcommand*{\scr@dsc@style@section@options}{}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{indent=\meta{length}}:]
-% the left indent of the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleLengthOption{section}
- {indent}{scr@}{@sectionindent}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{afterindent=\meta{fuzzy}}:]
-% \changes{v3.26}{2018/09/18}{option \opt{afterindent}}
-% fuzzy logic. A boolean value states whether to indent the first line
-% after the heading. With additional \opt{afterindent=bysign} the decision
-% depends on the sign of \opt{beforeskip}. Negative values of
-% \opt{beforeskip} result in no paragraph indent.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleFuzzyOption{section}
- {afterindent}{scr@}{@afterindent}
- {bysign}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{beforeskip=\meta{length}}:]
-% The vertical distance before the heading. If \opt{afterindent=bysign}, the
-% absolute value of \meta{length} is used. Otherwise the \meta{length} can
-% also be negative to move up the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleLengthOption{section}
- {beforeskip}{scr@}{@beforeskip}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{runin=\meta{fuzzy}}:]
-% \changes{v3.26}{2018/09/18}{option \opt{runin}}
-% fuzzy logic. A boolean value states whether the heading is run-in (or
-% free-standing). With additional \opt{runin=bysign} the decision depends on
-% the sign of \opt{afterskip}. Negative values of \opt{afterskip} result in
-% a run-in heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleFuzzyOption{section}
- {runin}{scr@}{@runin}
- {bysign}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{afterskip=\meta{length}}:]
-% In case of a run-in heading (see option \opt{runin}) the horizontal
-% distance after the heading. In case of a free-standing heading the
-% vertical distance after the heading. If the run-in heading is activated by
-% a negative \meta{length}, the absolute value is used. Otherwise the
-% \meta{length} can also be negative, which usually does not make much
-% sense.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleLengthOption{section}
- {afterskip}{scr@}{@afterskip}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{font=\meta{font settings}}:]
-% The font setting for the font element of the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleFontOption{section}{font}{}{}
-% \end{macrocode}
-% \end{macro}^^A \scr@dsc@style@section@options
-% \begin{macro}{\scr@dsc@def@style@section@command}
-% \changes{v3.18}{2015/05/21}{added}
-% \changes{v3.20}{2016/01/19}{inline section test fixed}
-% Macro
-% \begin{quote}
-% \cs{scr@dsc@def@style@section@command}\marg{command name}
-% \end{quote}
-% defines a section command \cs{\meta{command name}} of style
-% \texttt{section}.
-% \begin{description}
-% \item[Note:] Here we already use our own \cs{scr@startsection} instead of
-% \cs{@startsection}. So maybe not redefining \cs{@startsection} or
-% redefining \cs{@startsection} only optionally wouldn't be a big step.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\scr@dsc@def@style@section@command}[1]{%
- \@namedef{#1}{%
- \scr@startsection{#1}%
- {\csname #1numdepth\endcsname}%
- {\csname scr@#1@sectionindent\endcsname}%
- {\csname scr@#1@beforeskip\endcsname}%
- {\csname scr@#1@afterskip\endcsname}%
- {%
- \ifdim\glueexpr\csname scr@#1@afterskip\endcsname >\z@
- \expandafter\ifnum\scr@v@is@gt{2.96}\relax
- \setlength{\parfillskip}{\z@ plus 1fil}%
- \fi
- \fi
- \raggedsection\normalfont\sectfont\nobreak
- \usekomafont{#1}%
- }%
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@dsc@def@style@section@command
-%
-% \begin{macro}{\scr@dsc@style@chapter@options}
-% \changes{v3.17}{2015/03/23}{added}
-% Now, the option declaration of style \texttt{chapter} (similar, but not the
-% same):
-% \begin{macrocode}
-%<*book|report>
-\newcommand*{\scr@dsc@style@chapter@options}{}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{pagestyle=\meta{name}}:]
-% The page style, that should be used for the starting page of the chapter
-% like outline level.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleOption{chapter}{pagestyle}{%
- \@namedef{\scr@dsc@current pagestyle}{#1}%
- \FamilyKeyStateProcessed
-}%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{afterindent=\meta{fuzzy}}:]
-% \changes{v3.26}{2018/09/18}{option \opt{afterindent}}
-% fuzzy logic. A boolean value states whether to indent the first line
-% after the heading. With additional \opt{afterindent=bysign} the decision
-% depends on the sign of \opt{beforeskip}. Negative values of
-% \opt{beforeskip} result in no paragraph indent.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleFuzzyOption{chapter}
- {afterindent}{scr@}{@afterindent}
- {bysign}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{beforeskip=\meta{length}}:]
-% The vertical distance before the heading. If \opt{afterindent=bysign}, the
-% absolute value of \meta{length} is used. Otherwise the \meta{length} can
-% also be negative to move up the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleLengthOption{chapter}
- {beforeskip}{scr@}{@beforeskip}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{innerskip=\meta{length}}:]
-% The vertical distance between the prefix line and the text (if a prefix
-% line is used).
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleLengthOption{chapter}
- {innerskip}{scr@}{@innerskip}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{afterskip=\meta{length}}:]
-% The vertical distance after the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleLengthOption{chapter}
- {afterskip}{scr@}{@afterskip}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{font=\meta{font settings}}:]
-% The font setting for the font element of the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleFontOption{chapter}{font}{}{}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{prefixfont=\meta{font settings}}:]
-% The font setting for the font element of the prefix line of the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleFontOption{chapter}{prefixfont}{}{prefix}
-% \end{macrocode}
-% \end{macro}^^A \scr@dsc@style@chapter@options
-% \begin{macro}{\scr@dsc@def@style@chapter@command}
-% \changes{v3.18}{2015/05/22}{added}
-% Macro
-% \begin{quote}
-% \cs{scr@dsc@def@style@chapter@command}\marg{command name}
-% \end{quote}
-% defines a section command \cs{\meta{command name}} of style
-% \texttt{chapter}. We need some more macros to be initialized than with
-% \cs{scr@dsc@def@style@section@command}.
-% \begin{description}
-% \item[ToDo:] Make a more generic (and general) interface for this.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\scr@dsc@def@style@chapter@command}[1]{%
- \@namedef{#1}{\scr@startchapter{#1}}%
- \@namedef{@#1}{\scr@@startchapter{#1}}%
- \@namedef{@s#1}{\scr@@startschapter{#1}}%
- \@namedef{@make#1head}{\scr@makechapterhead{#1}}%
- \@namedef{@makes#1head}{\scr@makeschapterhead{#1}}%
- \@namedef{@@make#1head}{\scr@@makechapterhead{#1}}%
- \@namedef{@@makes#1head}{\scr@@makeschapterhead{#1}}%
- \@namedef{set#1preamble}{\set@preamble{#1}}%
-}
-%</book|report>
-% \end{macrocode}
-% \begin{macro}{\scr@dsc@style@chapter@subcommands}
-% \changes{v3.30}{2020/04/08}{added}
-% Internal name list of additional commands to be defined for style
-% \texttt{chapter} commands. This is used, to decide, if a new section command
-% declaration is really new or already redefines some commands. This should
-% help to avoid, e.g., defining a new chapter command \cs{schapter}, if
-% \cs{chapter} is already defines, because \cs{schapter} would redefine the
-% \cs{@schapter} of \cs{chapter}.
-% \begin{macrocode}
-\newcommand*{\scr@dsc@style@chapter@subcommands}[1]{%
- @#1,@s#1,@make#1head,@makes#1head,@@make#1head,@@makes#1head,set#1preamble%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@dsc@style@chapter@subcommands
-% \end{macro}^^A \scr@dsc@def@style@chapter@command
-%
-% \begin{macro}{\scr@dsc@style@part@options}
-% \changes{v3.17}{2015/03/23}{added}
-% Now the options for style \texttt{part} (very similar to \texttt{chapter}):
-% \begin{macrocode}
-\newcommand*{\scr@dsc@style@part@options}{}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{pagestyle=\meta{name}}:]
-% The page style, that should be used for the starting page of the chapter
-% like outline level.
-% \end{description}
-% \begin{macrocode}
-%<*report|book>
-\DeclareSectionCommandStyleOption{part}{pagestyle}{%
- \@namedef{\scr@dsc@current pagestyle}{#1}%
- \FamilyKeyStateProcessed
-}%
-%</report|book>
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{afterindent=\meta{fuzzy}}:]
-% \changes{v3.26}{2018/09/18}{option \opt{afterindent}}
-% fuzzy logic. A boolean value states whether to indent the first line
-% after the heading. With additional \opt{afterindent=bysign} the decision
-% depends on the sign of \opt{beforeskip}. Negative values of
-% \opt{beforeskip} result in no paragraph indent.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleFuzzyOption{part}
- {afterindent}{scr@}{@afterindent}
- {bysign}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{beforeskip=\meta{length}}:]
-% The vertical distance before the heading. If \opt{afterindent=bysign}, the
-% absolute value of \meta{length} is used. Otherwise the \meta{length} can
-% also be negative to move up the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleLengthOption{part}
- {beforeskip}{scr@}{@beforeskip}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{innerskip=\meta{length}}:]
-% The vertical distance between the prefix line and the text (if a prefix
-% line is used).
-% \end{description}
-% \begin{macrocode}
-%<*book|report>
-\DeclareSectionCommandStyleLengthOption{part}
- {innerskip}{scr@}{@innerskip}
-%</book|report>
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{afterskip=\meta{length}}:]
-% The vertical distance after the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleLengthOption{part}
- {afterskip}{scr@}{@afterskip}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{font=\meta{font settings}}:]
-% The font setting for the font element of the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleFontOption{part}{font}{}{}
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{prefixfont=\meta{font settings}}:]
-% The font setting for the font element of the prefix line of the heading.
-% \end{description}
-% \begin{macrocode}
-\DeclareSectionCommandStyleFontOption{part}{prefixfont}{}{prefix}
-% \end{macrocode}
-% \end{macro}^^A \scr@dsc@style@part@options
-% \begin{macro}{\scr@dsc@def@style@part@command}
-% \changes{v3.18}{2015/05/23}{added}
-% Macro
-% \begin{quote}
-% \cs{scr@dsc@def@style@part@command}\marg{command name}
-% \end{quote}
-% defines a section command \cs{\meta{command name}} of style
-% \texttt{part}. This looks like a mixture of
-% \cs{scr@dsc@def@style@section@command} and
-% \cs{scr@dsc@def@style@chapter@command}.
-% \begin{description}
-% \item[ToDo:] Make a more generic (and general) interface for this.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\scr@dsc@def@style@part@command}[1]{%
- \@namedef{#1}{\scr@startpart{#1}}%
- \@namedef{@#1}{\scr@@startpart{#1}}%
- \@namedef{@s#1}{\scr@@startspart{#1}}%
-%<book|report> \@namedef{@end#1}{\scr@@endpart{#1}}%
-%<book|report> \@namedef{set#1preamble}{\set@preamble{#1}}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@dsc@style@part@subcommands}
-% \changes{v3.30}{2020/04/08}{added}
-% Internal name list of additional commands to be defined for style
-% \texttt{part} commands.
-% \begin{macrocode}
-\newcommand*{\scr@dsc@style@part@subcommands}[1]{%
- @#1,@s#1,@end#1,set#1preamble%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@dsc@style@part@subcommands
-% \end{macro}^^A \scr@dsc@def@style@part@command
-%
-% \begin{macro}{\scr@dsc@style@section@neededoptionstest}
-% \changes{v3.17}{2015/03/24}{added}
-% \changes{v3.24}{2017/04/25}{initial values of \opt{indent} and
-% \opt{font}}
-% \changes{v3.26}{2018/09/18}{supporting \opt{runin} and \opt{afterindent}}
-% This macro checks, that all attributes needed for the definition of a
-% section command (with style \texttt{section}) are properly setup. If not, an
-% error is reported and the definition is prevented (using
-% \cs{aftergroup}\cs{@gobbletwo} inside \cs{scr@declaresectioncommanderror}).
-% \begin{macrocode}
-\newcommand*{\scr@dsc@style@section@neededoptionstest}{%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @sectionindent}{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {section indent}{indent}{0pt}%
- {\@namedef{scr@\scr@dsc@current @sectionindent}{0pt}}%
- }{}%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @beforeskip}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {before section skip}{beforeskip}%
- }{}%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterskip}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {after section skip}{afterskip}%
- }{}%
- \IfExistskomafont{\scr@dsc@current}{}{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {font}{font}{\normalsize}%
- {\newkomafont{\scr@dsc@current}{\normalsize}}%
- }%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @runin}{%
- \l@addto@macro\local@endgroup{%
- \ClassInfo{\KOMAClassName}
- {using compatibility default `runin=bysign'\MessageBreak
- for `\expandafter\string\csname \scr@dsc@current\endcsname}%
- \expandafter\gdef\csname scr@\scr@dsc@current @runin\endcsname
- ##1##2##3{##3}%
- }%
- }{}%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterindent}{%
- \l@addto@macro\local@endgroup{%
- \ClassInfo{\KOMAClassName}
- {using compatibility default `afterindent=bysign'\MessageBreak
- for `\expandafter\string\csname \scr@dsc@current\endcsname}%
- \expandafter\gdef\csname scr@\scr@dsc@current @afterindent\endcsname
- ##1##2##3{##3}%
- }%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@dsc@style@section@neededoptionstest
-%
-% \begin{macro}{\scr@dsc@style@chapter@neededoptionstest}
-% \changes{v3.17}{2015/03/24}{added}
-% \changes{v3.24}{2017/04/25}{initial values for all but level
-% \texttt{chapter}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% This macro checks, that all attributes needed for the definition of a
-% chapter command (with style \texttt{chapter}) are properly setup. If not, an
-% error is reported and the definition is prevented (using
-% \cs{aftergroup}\cs{@gobbletwo} inside \cs{scr@declaresectioncommanderror}).
-% \begin{macrocode}
-%<*book|report>
-\newcommand*{\scr@dsc@style@chapter@neededoptionstest}{%
- \scr@ifundefinedorrelax{\scr@dsc@current pagestyle}{%
- \Ifstr{\scr@dsc@current}{chapter}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {initial page style}{pagestyle}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {initial page style}{pagestyle}%
- {\chapterpagestyle}%
- {\@namedef{\scr@dsc@current pagestyle}{\chapterpagestyle}}%
- }%
- }{}%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @innerskip}{%
- \Ifstr{\scr@dsc@current}{chapter}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {inner chapter skip}{innerskip}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {inner chapter skip}{innerskip}%
- {\scr@chapter@innerskip}%
- {\@namedef{scr@\scr@dsc@current @innerskip}{\scr@chapter@innerskip}}%
- }%
- }{}%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @beforeskip}{%
- \Ifstr{\scr@dsc@current}{chapter}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {before chapter skip}{beforeskip}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {before chapter skip}{beforeskip}%
- {\scr@chapter@beforeskip}%
- {\@namedef{scr@\scr@dsc@current @beforeskip}{\scr@chapter@beforeskip}}%
- }%
- }{}%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterskip}{%
- \Ifstr{\scr@dsc@current}{chapter}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {after chaper skip}{afterskip}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {after chaper skip}{afterskip}%
- {\scr@chapter@afterskip}%
- {\@namedef{scr@\scr@dsc@current @afterskip}{\scr@chapter@afterskip}}%
- }%
- }{}%
- \IfExistskomafont{\scr@dsc@current}{}{%
- \Ifstr{\scr@dsc@current}{chapter}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}{font}{font}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {font}{font}%
- {\usekomafont{chapter}}%
- {\newkomafont{\scr@dsc@current}{\usekomafont{chapter}}}%
- }%
- }%
- \IfExistskomafont{\scr@dsc@current prefix}{}{%
- \Ifstr{\scr@dsc@current}{chapter}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {prefix line font}{prefixfont}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {prefix line font}{prefixfont}%
- {\usekomafont{chapterprefix}}%
- {\newkomafont{\scr@dsc@current prefix}{\usekomafont{chapterprefix}}}%
- }%
- }{}%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterindent}{%
- \l@addto@macro\local@endgroup{%
- \ClassInfo{\KOMAClassName}
- {using compatibility default `afterindent=bysign'\MessageBreak
- for `\expandafter\string\csname \scr@dsc@current\endcsname}%
- \expandafter\gdef\csname scr@\scr@dsc@current @afterindent\endcsname
- ##1##2##3{##3}%
- }%
- }{}%
-}
-%</book|report>
-% \end{macrocode}
-% \end{macro}^^A \scr@dsc@style@chapter@neededoptionstest
-%
-% \begin{macro}{\scr@dsc@style@part@neededoptionstest}
-% \changes{v3.17}{2015/03/24}{added}
-% \changes{v3.24}{2017/04/25}{initial values for all but level \texttt{part}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% This macro checks, that all attributes needed for the definition of a
-% part command (with style \texttt{part}) are properly setup. If not, an
-% error is reported and the definition is prevented (using
-% \cs{aftergroup}\cs{@gobbletwo} inside \cs{scr@declaresectioncommanderror}).
-% \begin{macrocode}
-\newcommand*{\scr@dsc@style@part@neededoptionstest}{%
-%<*book|report>
- \scr@ifundefinedorrelax{\scr@dsc@current pagestyle}{%
- \Ifstr{\scr@dsc@current}{part}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {initial page style}{pagestyle}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {initial page style}{pagestyle}%
- {\partpagestyle}%
- {\@namedef{\scr@dsc@current pagestyle}{\partpagestyle}}%
- }%
- }{}%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @innerskip}{%
- \Ifstr{\scr@dsc@current}{part}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {inner part skip}{innerskip}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {inner part skip}{innerskip}%
- {\scr@part@innerskip}%
- {\@namedef{scr@\scr@dsc@current @innerskip}{\scr@part@innerskip}}%
- }%
- }{}%
-%</book|report>
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @beforeskip}{%
- \Ifstr{\scr@dsc@current}{part}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {before part skip}{beforeskip}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {before part skip}{beforeskip}%
- {\scr@part@beforeskip}%
- {\@namedef{scr@\scr@dsc@current @beforeskip}{\scr@part@beforeskip}}%
- }%
- }{}%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterskip}{%
- \Ifstr{\scr@dsc@current}{part}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {after part skip}{afterskip}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {after part skip}{afterskip}%
- {\scr@part@afterskip}%
- {\@namedef{scr@\scr@dsc@current @afterskip}{\scr@part@afterskip}}%
- }%
- }{}%
- \IfExistskomafont{\scr@dsc@current}{}{%
- \Ifstr{\scr@dsc@current}{part}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}{font}{font}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}{font}{font}%
- {\usekomafont{part}}%
- {\newkomafont{\scr@dsc@current}{\usekomafont{part}}}%
- }%
- }{}%
- \IfExistskomafont{\scr@dsc@current prefix}{}{%
- \Ifstr{\scr@dsc@current}{part}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}%
- {number font}{prefixfont}%
- }{%
- \scr@declaresectioncommandwarning{\scr@dsc@current}%
- {number font}{prefixfont}%
- {\usekomafont{partprefix}}%
- {\newkomafont{\scr@dsc@current prefix}{\usekomafont{partprefix}}}%
- }%
- }{}%
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterindent}{%
- \l@addto@macro\local@endgroup{%
- \ClassInfo{\KOMAClassName}{%
- using compatibility default
-%<article> `afterindent=false'\MessageBreak
-%<book|report> `afterindent=true'\MessageBreak
- for `\expandafter\string\csname \scr@dsc@current\endcsname}%
- \expandafter\gdef\csname scr@\scr@dsc@current @afterindent\endcsname
- ##1##2##3%
-%<article> {##2}%
-%<book|report> {##1}%
- }%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@dsc@style@part@neededoptionstest
-%
-% \begin{macro}{\scr@dsc@parametersonlytrue,\scr@dsc@parametersonlyfalse,
-% \ifscr@dsc@parametersonly}
-% \changes{v3.17}{2015/03/24}{added}
-% \changes{v3.20}{2015/11/18}{dummy options removed}
-% In the first option pass of \cs{DeclareSectionCommand} this is set to true,
-% if the \opt{style} option is used without value, to change the settings of a
-% command without running \cs{scr@dsc@def@style@\meta{style}@command} and
-% therefore without defining the command itself.
-% \begin{description}
-% \item[ToDo:] Is this a not documented feature? What's the sense?
-% \end{description}
-% \begin{macrocode}
-\newif\ifscr@dsc@parametersonly
-% \end{macrocode}
-% \end{macro}^^A \ifscr@dsc@parametersonly
-%
-% \begin{command}{\DeclareSectionCommand}
-% \changes{v3.15}{2014/11/21}{added}
-% \changes{v3.17}{2015/03/23}{re-implemented because of style depending
-% options}
-% \changes{v3.18}{2015/05/22}{\cs{scr@dsc@def@style@\dots @command}
-% defines style depending macros}
-% \changes{v3.20}{2015/10/03}{using \cs{DeclareTOCStyleEntry}}
-% The main command to define new section commands or redefine existing section
-% commands. Incidentally it also defines the corresponding ToC entry command.
-% \begin{quote}
-% \cs{DeclareSectionCommand}\oarg{options}\marg{command name}
-% \end{quote}
-% is used to define \cs{\meta{command name}}. The \meta{options} are used to
-% specify the behave of the command. It is declared as optional
-% argument. However for new commands not all the options are really optional.
-% \begin{description}
-% \item[Note:] Don't forget to declare all options, that are defined for
-% \cs{DeclareSectionCommand} also for \cs{ProvideSectionCommands}!
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\DeclareSectionCommand}[2][]{%
- \edef\scr@dsc@current{#2}%
-% \end{macrocode}
-% The first pass to get the:
-% \begin{description}
-% \item[\opt{style=\meta{name}}:]
-% style of the section command.
-% \end{description}
-% \begin{macrocode}
- \scr@dsc@parametersonlyfalse
- \DefineFamilyKey[.dsc]{KOMAarg}{style}{%
- \IfArgIsEmpty{##1}{%
- \scr@dsc@parametersonlytrue
- \FamilyKeyStateProcessed
- }{%
- \scr@ifundefinedorrelax{scr@dsc@def@style@##1@command}{%
- \FamilyKeyStateUnknownValue
- }{%
- \@namedef{scr@\scr@dsc@current @style}{##1}%
- \FamilyKeyStateProcessed
- }%
- }%
- }%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{tocstyle=\meta{name}}:] \changes{v3.20}{2015/11/12}{early
-% evaluation of option \opt{tocstyle}} \changes{v3.27}{2019/10/02}{prefix
-% for storing directory style changed} style of the ToC entry. From
-% \pkg*{tocbasic} 3.27 the style name macro has been changed from
-% \cs{scr@dte@\meta{level name}@style} to \cs{scr@tso@\meta{level
-% name}@style}.
-% \begin{description}
-% \item[ToDo:] Don't support deprecated \cs{scr@dte@\meta{level name}@style}
-% any longer.
-% \end{description}
-% \end{description}
-% \begin{macrocode}
- \DefineFamilyKey[.dsc]{KOMAarg}{tocstyle}{%
- \IfArgIsEmpty{##1}{%
- \@ifundefined{scr@dte@\scr@dsc@current @style}{}{%
- \expandafter\let\csname scr@dte@\scr@dsc@current @style\endcsname
- \relax
- }%
- \expandafter\let\csname scr@tso@\scr@dsc@current @style\endcsname
- \relax
- \FamilyKeyStateProcessed
- }{%
-%<trace> \typeout{TRACE: option tocstyle=##1}%
-%<trace> \typeout{TRACE: command=\scr@dsc@current}%
- \scr@ifundefinedorrelax{scr@dte@def@l@##1}{%
-%<trace> \typeout{TRACE: style not defined}%
- \FamilyKeyStateUnknownValue
- }{%
-%<trace> \typeout{TRACE: style defined}%
- \@namedef{scr@dte@\scr@dsc@current @style}{##1}%
- \@namedef{scr@tso@\scr@dsc@current @style}{##1}%
- \FamilyKeyStateProcessed
- }%
- }%
- }%
-% \end{macrocode}
-% \begin{description}
-% \item[\texttt{@else@=\meta{value}}:]
-% \changes{v3.20}{2015/11/18}{early evaluation of option \opt{tocstyle}}
-% All other options are ignored using the \opt{@else@} option, which simply
-% accepts every option. So the first pass does not report any unknown
-% options.
-% \end{description}
-% \begin{macrocode}
- \DefineFamilyKey[.dsc]{KOMAarg}{@else@}{%
-%<*trace>
- \typeout{TRACE: ignoring option `@else@=\detokenize{##1}'}%
- \typeout{TRACE:
- \string\scr@key@atlist=`\detokenize\expandafter{\scr@key@atlist}'}%
- \typeout{TRACE:
- \string\scr@key@name=`\detokenize\expandafter{\scr@key@name}'}%
- \typeout{TRACE:
- \string\scr@key@value=`\detokenize\expandafter{\scr@key@value}'}%
-%</trace>
- \FamilyKeyStateProcessed
- }%
- \FamilyExecuteOptions[.dsc]{KOMAarg}{#1}%
-% \end{macrocode}
-% \changes{v3.20}{2015/11/18}{Resetting options after first pass}
-% After the first pass we have to reset these options.
-% \begin{macrocode}
- \RelaxFamilyKey[.dsc]{KOMAarg}{@else@}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{tocstyle}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{style}%
- \begingroup
- \scr@ifundefinedorrelax{scr@\scr@dsc@current @style}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}
- {section command style}{style}%
- }{}%
- \endgroup
- \@firstofone{%
-% \end{macrocode}
-% \changes{v3.20}{2015/11/12}{dummy options for main pass removed}
-% Now, we know the style and can activate all the options of the style.
-% \begin{macrocode}
-%<trace> \typeout{TRACE: style=\@nameuse{scr@\scr@dsc@current @style}}%
- \@nameuse{scr@dsc@style@\@nameuse{scr@\scr@dsc@current @style}@options}%
-% \end{macrocode}
-% And initialize the ToC style.
-% \begin{macrocode}
-%<trace> \typeout{TRACE: tocstyle=%
-%<trace> \@nameuse{scr@tso@\scr@dsc@current @style}}%
- \scr@ifundefinedorrelax{scr@tso@\scr@dsc@current @style}{%
- \scr@ifundefinedorrelax{l@\scr@dsc@current}{%
- \@namedef{scr@tso@\scr@dsc@current @style}{default}%
- }{}%
- }{}%
-% \end{macrocode}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \changes{v3.21}{2016/06/12}{support for prefix \opt{tocentry} instead of
-% \opt{toc}}
-% We also have to define options for all the ToC style options by adding the
-% prefix \opt{toc} to the names of these options. This also means a ToC style
-% option \opt{style} must not exist (because we already have an option
-% \opt{tocstyle}). This is the main reason, \cs{DeclareTOCStyleEntry} has not
-% such an option but a corresponding argument. Additionally ToC style options
-% should never start with \opt{toc} (because of the ugly resulting
-% \opt{toctoc\dots}).
-% \begin{macrocode}
- \let\scr@dsc@tocstyle@options\@empty
- \let\scr@dsc@extra@relax@opts\@empty
- \scr@ifundefinedorrelax{scr@tso@\scr@dsc@current @style}{%
- \expandafter\let
- \csname scr@tso@\scr@dsc@current @style\expandafter\endcsname
- \csname scr@dte@\scr@dsc@current @style\endcsname
- }{}%
- \scr@ifundefinedorrelax{scr@tso@\scr@dsc@current @style}{}{%
- \begingroup
- \def\scr@dte@current{#2}%
- \edef\reserved@a{%
- \noexpand\@ExecuteTOCEntryStyleInitCode{%
- \@nameuse{scr@tso@\scr@dsc@current @style}%
- }{\scr@dsc@current}%
- }\reserved@a
- \def\do@endgroup{\endgroup}%
- \def\do##1{%
- \l@addto@macro\do@endgroup{%
- \l@addto@macro\scr@dsc@extra@relax@opts{%
- \RelaxFamilyKey[.dsc]{KOMAarg}{toc##1}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{tocentry##1}%
- }%
- }%
- \kernel@ifnextchar[%]
- {\@dodefault{##1}}%
- {\@donodefault{##1}}%
- }%
- \def\@donodefault##1{%
- \l@addto@macro\do@endgroup{%
- \DefineFamilyKey[.dsc]{KOMAarg}{toc##1}{%
- \l@addto@macro{\scr@dsc@tocstyle@options}{##1={####1},}%
- \FamilyKeyStateProcessed
- }%
- \DefineFamilyKey[.dsc]{KOMAarg}{tocentry##1}{%
- \l@addto@macro{\scr@dsc@tocstyle@options}{##1={####1},}%
- \FamilyKeyStateProcessed
- }%
- }%
- }%
- \def\@dodefault##1[##2]{%
- \l@addto@macro\do@endgroup{%
- \DefineFamilyKey[.dsc]{KOMAarg}{toc##1}[##2]{%
- \l@addto@macro{\scr@dsc@tocstyle@options}{##1={####1},}%
- \FamilyKeyStateProcessed
- }%
- \DefineFamilyKey[.dsc]{KOMAarg}{tocentry##1}[##2]{%
- \l@addto@macro{\scr@dsc@tocstyle@options}{##1={####1},}%
- \FamilyKeyStateProcessed
- }%
- }%
- }%
- \scr@dte@doopts
- \do@endgroup
- }%
-% \end{macrocode}
-% Make option \opt{style} and \opt{tocstyle} (fast) dummies, because they
-% already have been handled completely.
-% \begin{macrocode}
- \DefineFamilyKey[.dsc]{KOMAarg}{style}{\FamilyKeyStateProcessed}%
- \DefineFamilyKey[.dsc]{KOMAarg}{tocstyle}{\FamilyKeyStateProcessed}%
-% \end{macrocode}
-% Some options exist for all section command styles and therefore are defined
-% here and not a part of the style options:
-% \begin{description}
-% \item[\opt{expandtopt=\meta{boolean}}:]
-% If \texttt{true} all lengths are expanded at setting time to unit pt
-% instead of used unchanged. With this, the lengths are not depending on the
-% font size of usage time but on the current font size.
-% \end{description}
-% \begin{macrocode}
- \FamilyBoolKey[.dsc]{KOMAarg}{expandtopt}{scr@dsc@expandtopt}%
- \scr@dsc@expandtoptfalse
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{increaselevel=\meta{number}}:]
-% Automatically increase \opt{level} by \meta{number} (with default 1). This
-% is needed for \cs{DeclareSectionCommands} and therefore only defined if
-% \cs{scr@local@levelincrease} is defined.
-% \end{description}
-% \begin{macrocode}
- \scr@ifundefinedorrelax{scr@local@levelincrease}{%
- \RelaxFamilyKey[.dsc]{KOMAarg}{increaselevel}%
- }{%
- \FamilyCounterMacroKey[.dsc]{KOMAarg}{increaselevel}[1]%
- {\scr@local@levelincrease}%
- }%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{level=\meta{number}}:]
-% The numerical outline level of the command.
-% \end{description}
-% \begin{macrocode}
- \scr@ifundefinedorrelax{scr@local@leveloffset}{%
- \edef\reserved@a{%
- \noexpand\FamilyCounterMacroKey[.dsc]{KOMAarg}{level}{%
- \expandafter\noexpand\csname \scr@dsc@current numdepth\endcsname}%
- }\reserved@a
- }{%
- \edef\reserved@a{%
- \noexpand\DefineFamilyKey[.dsc]{KOMAarg}{level}{%
- \noexpand\FamilySetCounterMacro{KOMAarg}{level}{%
- \expandafter\noexpand\csname \scr@dsc@current numdepth\endcsname
- }%
- \unexpanded{%
- {\numexpr ##1+\scr@local@leveloffset\relax}%
- \edef\scr@local@leveloffset{%
- \the\numexpr\scr@local@leveloffset+\scr@local@levelincrease\relax
- }%
- }%
- }%
- }\reserved@a
- }%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{counterwithout=\meta{name}}:]
-% \changes{v3.19}{2015/09/09}{option \opt{counterwithout}}
-% The counter of this command should not depend on the counter
-% \cnt{name} any longer.
-% \end{description}
-% \begin{macrocode}
- \FamilyStringKey[.dsc]{KOMAarg}{counterwithout}{\scr@local@counterwithout}%
- \let\scr@local@counterwithout\relax
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{counterwithin=\meta{name}}:]
-% The counter of this command depends on the counter \cnt{name}.
-% \end{description}
-% \begin{macrocode}
- \FamilyStringKey[.dsc]{KOMAarg}{counterwithin}{\scr@local@counterwithin}%
- \let\scr@local@counterwithin\relax
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{toclevel=\meta{number}}:]
-% The numerical ToC entry level. Default is \opt{level}. This option exists
-% only, if the ToC style supports it. But because with
-% \cs{DeclareSectionCommands} we need an offset for this (similar to the
-% increase of \opt{level}). So we have to redefine it in case of existing
-% \cs{scr@local@tocleveloffset}.
-% \end{description}
-% \begin{macrocode}
- \scr@ifundefinedorrelax{scr@local@tocleveloffset}{}{%
- \scr@ifundefinedorrelax{KV@KOMAarg.dsc@toclevel}{%
- }{%
- \DefineFamilyKey[.dsc]{KOMAarg}{toclevel}{%
- \edef\reserved@a{%
- \noexpand\l@addto@macro{\noexpand\scr@dsc@tocstyle@options}{%
- level=\the\numexpr ##1+\scr@local@tocleveloffset\relax,%
- }%
- }\reserved@a
- \edef\scr@local@tocleveloffset{%
- \the\numexpr\scr@local@tocleveloffset+\scr@local@levelincrease\relax
- }%
- \FamilyKeyStateProcessed
- }%
- }%
- }%
-% \end{macrocode}
-% \changes{v3.20}{2015/11/12}{only temporary definition of options}
-% The main pass of options execution. Afterwards reset all the options.
-% \begin{macrocode}
- \FamilyExecuteOptions[.dsc]{KOMAarg}{#1}%
- \scr@dsc@extra@relax@opts
- \let\scr@dsc@extra@relax@opts\relax
- \RelaxSectionCommandOptions
- \RelaxFamilyKey[.dsc]{KOMAarg}{style}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{tocstyle}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{expandtopt}%
- \scr@ifundefinedorrelax{scr@local@levelincrease}{}{%
- \RelaxFamilyKey[.dsc]{KOMAarg}{increaselevel}%
- }%
- \RelaxFamilyKey[.dsc]{KOMAarg}{level}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{counterwithin}%
-% \end{macrocode}
-% Now, we can test, if all needed options has been defined.
-% \changes{v3.27}{2019/02/07}{\opt{level} must no be -\cs{maxdimen}}
-% Also test, that \opt{level} is not -\len{maxdimen}, because this value is
-% used internally to switch of numbering locally.
-% \begin{macrocode}
- \begingroup
- \def\local@endgroup{\endgroup}%
- \scr@ifundefinedorrelax{\scr@dsc@current numdepth}{%
- \scr@declaresectioncommanderror{\scr@dsc@current}{section level}{level}%
- }{%
- \expandafter\ifnum \csname #2numdepth\endcsname>-\maxdimen
- \@nameuse{scr@dsc@style@%
- \@nameuse{scr@\scr@dsc@current @style}%
- @neededoptionstest}%
- \else
- \ClassError{\KOMAClassName}{%
- `level' must be > -\the\numexpr\maxdimen\relax
- }{%
- KOMA-Script internally sets `secnumdepth' to
- -\the\numexpr\maxdimen\relax\space
- to locally switch of\MessageBreak
- the numbering, i.e., inside running heads.\MessageBreak
- Because of this, you can define section commands with\MessageBreak
- `level' greater than -\the\numexpr\maxdimen\relax\space only.%
- }%
- \let\local@endgroup\endgroup
- \aftergroup\@gobbletwo
- \fi
- }%
- \local@endgroup
-% \end{macrocode}
-% If the configuration is compete, we are ready for the (re-)definition of the
-% command.
-% \begin{macrocode}
- \@firstofone{%
-% \end{macrocode}
-% \changes{v3.20}{2015/10/15}{missing \cs{expandafter} added}
-% First of all we need a counter:
-% \begin{macrocode}
- \@ifundefined{c@#2}{\newcounter{#2}}{}%
- \ifx\scr@local@counterwithout\relax
- \else\ifx\scr@local@counterwithout\@empty
- \else
- \@removefromreset{#2}{\scr@local@counterwithout}%
- \fi
- \@namedef{the#2}{\arabic{#2}}%
- \fi
- \ifx\scr@local@counterwithin\relax
- \else\ifx\scr@local@counterwithin\@empty
- \@namedef{the#2}{\arabic{#2}}%
- \else
- \@removefromreset{#2}{\scr@local@counterwithin}%
- \@addtoreset{#2}{\scr@local@counterwithin}%
- \expandafter\def\csname the#2\expandafter\endcsname\expandafter{%
- \csname the\scr@local@counterwithin\endcsname.\arabic{#2}}%
- \fi
- \fi
- \@ifundefined{#2format}{%
- \@namedef{#2format}{\csname the#2\endcsname\autodot\enskip}%
- }{}%
-% \end{macrocode}
-% Then the command itself (but only, if the \opt{style} was not empty):
-% \begin{macrocode}
- \ifscr@dsc@parametersonly
- \ClassInfo{\KOMAClassName}{%
- not defining `\expandafter\string\csname #2\endcsname' due
- to\MessageBreak
- empty section style option%
- }%
- \else
- \scr@ifundefinedorrelax{%
- scr@dsc@def@style@\@nameuse{scr@#2@style}@command%
- }{%
- \ClassWarning{\KOMAClassName}{%
- not defining `\expandafter\string\csname #2\endcsname'
- due\MessageBreak
- to not yet defined section style\MessageBreak
- `\@nameuse{scr@#2@style}'%
- }%
- }{%
- \@nameuse{scr@dsc@def@style@\@nameuse{scr@#2@style}@command}{#2}%
- }%
- \fi
-% \end{macrocode}
-% We also need commands for the running head and a corresponding number
-% formatting. With \pkg*{scrlayer} this can and should be done using
-% \cs{DeclareSectionNumberDepth}. Otherwise we do it step by step.
-% \changes{v3.15a}{2015/01/21}{\cs{endskip} instead of \cs{enskip}}
-% \begin{macrocode}
- \@ifundefined{DeclareSectionNumberDepth}{%
- \@ifundefined{#2markformat}{%
- \@namedef{#2markformat}{\csname the#2\endcsname\autodot\enskip}%
- }{}%
- \@ifundefined{#2mark}{%
- \expandafter\let\csname #2mark\endcsname\@gobble
- }{}%
- }{%
- \DeclareSectionNumberDepth{#2}{\csname #2numdepth\endcsname}%
- }%
-% \end{macrocode}
-% We also need macros to generate and print the ToC entry.
-% \begin{macrocode}
- \expandafter\providecommand\expandafter*%
- \csname add#2tocentry\endcsname[2]{%
- \addtocentrydefault{#2}{##1}{##2}%
- }%
- \scr@ifundefinedorrelax{scr@tso@#2@style}{%
- \expandafter\let\csname scr@tso@#2@style\expandafter\endcsname
- \csname scr@dte@#2@style\endcsname
- }{}%
- \scr@ifundefinedorrelax{scr@tso@#2@style}{%
- }{%
- \DeclareTOCStyleEntry[\scr@dsc@tocstyle@options]{%
- \@nameuse{scr@tso@#2@style}%
- }{#2}%
- }%
- \scr@ifundefinedorrelax{l@#2}{%
- \DeclareTOCStyleEntry[\scr@dsc@tocstyle@options]{default}{#2}%
- }{}%
-% \end{macrocode}
-% \changes{v3.20}{2015/0/07}{support for ToC levels with \pkg{hyperref}}
-% \changes{v3.26}{2018/06/27}{overwrite ToC levels of \pkg{hyperref}}
-% \changes{v3.26}{2018/06/27}{fallback handling of gaps in the bookmark
-% levels}
-% And we need extra code for \pkg{hyperref} and the bookmarks.
-% \begin{macrocode}
- \if@atdocument
- \let\reserved@a\@firstofone
- \else
- \@ifpackageloaded{hyperref}{%
- \let\reserved@a\@firstofone
- }{%
- \def\reserved@a##1{%
- \AfterAtEndOfPackage{hyperref}{\AtBeginDocument{##1}}%
- }%
- }%
- \fi
- \reserved@a{%
- \expandafter\let\csname toclevel@#2\expandafter\endcsname
- \csname #2tocdepth\endcsname
- \scr@ifundefinedorrelax{bookmarksetup}{%
- \scr@ifundefinedorrelax{scr@min@toclevel}{%
- \expandafter\let\expandafter\scr@min@toclevel
- \csname toclevel@#2\endcsname
- }{%
- \expandafter\ifnum \csname toclevel@#2\endcsname
- < \numexpr \scr@min@toclevel-1\relax
- \ClassWarning{\KOMAClassName}{%
- Trying emergency fix for bookmark level gap,\MessageBreak
- because toclevel of `#2'
- (\csname toclevel@#2\endcsname)\MessageBreak
- is more than 1 lower than currently lowest\MessageBreak
- known level (\scr@min@toclevel).\MessageBreak
- Note: This fix can fail and you should load\MessageBreak
- package `bookmark' to avoid usage of this\MessageBreak
- fix%
- }%
- \expandafter\edef\csname toclevel@#2\endcsname{%
- \the\numexpr \scr@min@toclevel-1\relax
- }%
- \fi
- \expandafter\ifnum \csname toclevel@#2\endcsname
- < \scr@min@toclevel\relax
- \expandafter\let\expandafter\scr@min@toclevel
- \csname toclevel@#2\endcsname
- \fi
- }%
- \scr@ifundefinedorrelax{scr@max@toclevel}{%
- \expandafter\let\expandafter\scr@max@toclevel
- \csname toclevel@#2\endcsname
- }{%
- \expandafter\ifnum \csname toclevel@#2\endcsname
- > \numexpr \scr@max@toclevel+1\relax
- \ClassWarning{\KOMAClassName}{%
- Trying emergency fix for bookmark level gap,\MessageBreak
- because toclevel of `#2'
- (\csname toclevel@#2\endcsname)\MessageBreak
- is more than 1 greater than currently highest\MessageBreak
- known level (\scr@max@toclevel).\MessageBreak
- Note: This fix can fail and you should load\MessageBreak
- package `bookmark' to avoid usage of this\MessageBreak
- fix%
- }%
- \expandafter\edef\csname toclevel@#2\endcsname{%
- \the\numexpr \scr@max@toclevel+1\relax
- }%
- \fi
- \expandafter\ifnum \csname toclevel@#2\endcsname
- > \scr@max@toclevel\relax
- \expandafter\let\expandafter\scr@max@toclevel
- \csname toclevel@#2\endcsname
- \fi
- }%
- }{}%
- }%
- }%
- }%
- \let\scr@dsc@current\relax
-}
-% \end{macrocode}
-% \begin{macro}{\scr@declaresectioncommanderror}
-% \changes{v3.15}{2014/11/21}{added}
-% It there were not enough options to \cs{DeclareSectionCommand} to define the
-% command, we report an error and also execute
-% \cs{aftergroup}\cs{@gobbletwo}. So the |\@firstofone{…}| code after
-% |\endgroup| resp. |\local@endgroup| inside \cs{DeclareSectionCommand} that
-% defines the new section command etc. will never be used in such a case.
-% \begin{macrocode}
-\newcommand*{\scr@declaresectioncommanderror}[3]{%
- \ClassError{\KOMAClassName}{%
- #2 of \expandafter\string\csname #1\endcsname\space unknown%
- }{%
- Please use option `#3' to declare the #2.\MessageBreak
- If you'll continue, declaration will be ignored%
- }%
- \let\local@endgroup\endgroup
- \aftergroup\@gobbletwo
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@declaresectioncommanderror
-% \begin{macro}{\scr@declaresectioncommandwarning}
-% \changes{v3.24}{2017/04/25}{added}
-% Sometimes a warning and extension of \cs{local@endgroup} is enough.
-% \begin{macrocode}
-\newcommand*{\scr@declaresectioncommandwarning}[5]{%
- \ClassInfo{\KOMAClassName}{%
- #2 of \expandafter\string\csname #1\endcsname\space unknown.\MessageBreak
- You should use option `#3' if you\MessageBreak
- do not want to use the default value\MessageBreak
- `\detokenize{#4}'%
- }%
- \l@addto@macro\local@endgroup{#5}%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@declaresectioncommandwarning
-% \end{command}^^A \DeclareSectionCommand
-%
-%
-% \begin{command}{\DeclareNewSectionCommand}
-% \changes{v3.15}{2014/11/21}{added}
-% \changes{v3.25}{2018/03/10}{additional tests and errors about
-% \cs{the\dots}, \cs{\dots mark}, \cs{\dots format},
-% \cs{\dots markformat}}
-% \changes{v3.30}{2020/04/08}{orphan spaces removed}
-% This is similar to \cs{DeclareSectionCommand} but reports an error, if the
-% command or a main helper already exist. So it can be used for new commands
-% only.
-% \begin{macrocode}
-\newcommand*{\DeclareNewSectionCommand}[2][]{%
- \@ifundefined{#2}{%
- \@tempswatrue
- \let\reserved@b\@empty
- \@for \reserved@a:=the#2,#2mark,#2format,#2markformat\do{%
- \expandafter\scr@ifundefinedorrelax\expandafter{\reserved@a}{}{%
- \@tempswafalse
- \edef\reserved@b{\expandafter\string\csname \reserved@a\endcsname}%
- }%
- }%
- \if@tempswa
-% \end{macrocode}
-% \changes{v3.30}{2020/04/08}{extended test for really new}
-% After the general user commands, we just have to detect the style \dots
-% \begin{macrocode}
- \expandafter\let\expandafter\scr@dsc@current
- \csname scr@tso@##2@style\endcsname
- \DefineFamilyKey[.dsc]{KOMAarg}{style}{%
- \edef\scr@dsc@current{##1}%
- \FamilyKeyStateProcessed
- }%
- \DefineFamilyKey[.dsc]{KOMAarg}{@else@}{\FamilyKeyStateProcessed}%
- \FamilyExecuteOptions[.dsc]{KOMAarg}{#1}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{@else@}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{style}%
- \@tempswatrue
-% \end{macrocode}
-% \dots{} to gut through the \cs{scr@dsc@style@\meta{style}@subcommands} and
-% test, if one of them exists.
-% \begin{macrocode}
- \@ifundefined{scr@dsc@current}{}{%
- \scr@ifundefinedorrelax{scr@dsc@style@\scr@dsc@current @subcommands}{%
- }{%
- \edef\reserved@b{%
- \csname scr@dsc@style@\scr@dsc@current @subcommands\endcsname{#2}%
- }%
- \expandafter\@for\expandafter\reserved@a\expandafter:\expandafter=%
- \reserved@b\do{%
- \expandafter\scr@ifundefinedorrelax\expandafter{\reserved@a}{}{%
- \@tempswafalse
- \edef\reserved@b{%
- \expandafter\string\csname \reserved@a\endcsname}%
- }%
- }%
- }
- }%
- \let\scr@dsc@current\relax
- \fi
- \if@tempswa
-% \end{macrocode}
-% If not, we can use \cs{DeclareSectionCommand}. Otherwise just report an
-% error.
-% \begin{macrocode}
- \DeclareSectionCommand[{#1}]{#2}%
- \else
- \ClassError{\KOMAClassName}{%
- command `\reserved@b' already defined%
- }{%
- You've tried to define the section command `\expandafter\string\csname
- #2\endcsname' newly.\MessageBreak
- Such a section command needs an additional new command
- `\reserved@b',\MessageBreak
- but this already exists. So you cannot define
- `\expandafter\string\csname #2\endcsname' newly.\MessageBreak
- Maybe you should use one of \string\DeclareSectionCommand,
- \string\RedeclareSectionCommand,\MessageBreak
- or \string\ProvideSectionCommand.\MessageBreak
- If you'll continue, the command will be ignored.%
- }%
- \fi
- }{%
- \ClassError{\KOMAClassName}{%
- command `\expandafter\string\csname #2\endcsname' already defined%
- }{%
- You've tried to define the section command `\expandafter\string\csname
- #2\endcsname' newly,\MessageBreak
- but a command or something else with this name already
- exists.\MessageBreak
- Maybe you should use one of \string\DeclareSectionCommand,
- \string\RedeclareSectionCommand,\MessageBreak
- or \string\ProvideSectionCommand.\MessageBreak
- If you'll continue, the command will be ignored.%
- }%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \DeclareNewSectionCommand
-%
-% \begin{command}{\RedeclareSectionCommand}
-% \changes{v3.15}{2014/11/21}{added}
-% This is much easier than \cs{DeclareNewSectionCommand} because it tests only
-% for the main command and uses \cs{DeclareSectionCommand} if the main command
-% already exists. So all the additional commands and main helpers do not need
-% to exist.
-% \begin{macrocode}
-\newcommand*{\RedeclareSectionCommand}[2][]{%
- \@ifundefined{#2}{%
- \ClassError{\KOMAClassName}{%
- command `\expandafter\string\csname #2\endcsname' not defined%
- }{%
- You've tried to re-define the section command `\expandafter\string\csname
- #2\endcsname',\MessageBreak
- but a command with this name does not exists.\MessageBreak
- Maybe you should use one of \string\DeclareSectionCommand,
- \string\DeclareNewSectionCommand,\MessageBreak
- or \string\ProvideSectionCommand.\MessageBreak
- If you'll continue, the command will be irgnored.%
- }%
- }{%
- \DeclareSectionCommand[{#1}]{#2}%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \RedeclareSectionCommand
-%
-% \begin{command}{\ProvideSectionCommand}
-% \changes{v3.15}{2014/11/21}{added}
-% This is much easier than \cs{DeclareNewSectionCommand} because currently it
-% tests only for the command itself but nor for the helpers.
-% \begin{description}
-% \item[ToDo:] This is dangerous, because
-% e.g. |\ProvideSectionCommand{schapter}| would break \cs{chapter} (because
-% of \cs{@schapter}). So maybe it should do the same tests as
-% \cs{DeclareNewSectionCommand} and at least warn.
-% \end{description}
-% Basierend auf |\DeclareSectionCommand| wird eine Gliederungsanweisung
-% definiert, wenn sie zuvor noch nicht existierte. Wichtig zu bemerken ist,
-% dass die ganzen Hilfsanweisungen bereits existieren dürfen.
-% \begin{macrocode}
-\newcommand*{\ProvideSectionCommand}[2][]{%
- \@ifundefined{#2}{%
- \DeclareSectionCommand[{#1}]{#2}%
- }{%
- \ClassInfo{\KOMAClassName}{%
- \string\ProvideSectionCommand{#1} ignored%
- }%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \ProvideSectionCommand
-%
-% \begin{command}{\DeclareSectionCommands}
-% \changes{v3.15}{2014/12/03}{added}
-% \changes{v3.26}{2018/08/29}{using \cs{scr@trim@spaces}}
-% Based on \cs{DeclareSectionCommand} this one can be used to define several
-% commands at once. The commands are given as a comma-separated list of
-% commands. There is one additional option \opt{increaselevel=\meta{number}}
-% to add \meta{number} to the \opt{level} at each call of
-% \cs{DeclareSectionCommand} but the first one. The definition of this option
-% is done inside \cs{DeclareSectionCommand} if \cs{scr@local@levelincrease} is
-% defined. Because of the first run, we initialize it with 0. The same has to
-% be done for \cs{scr@local@leveloffset} and \cs{scr@local@tocleveloffset}.
-% At the end we also have to un-define these local commands. Otherwise later
-% usage of \cs{DeclareSectionCommand} would be detected as part of
-% \cs{DeclareSectionCommands}.
-% \begin{macrocode}
-\newcommand*{\DeclareSectionCommands}[2][]{%
- \edef\reserved@a{#2}%
- \def\scr@local@levelincrease{\z@}%
- \def\scr@local@leveloffset{\z@}%
- \def\scr@local@tocleveloffset{\z@}%
- \@for\reserved@a:=\reserved@a\do{%
- \scr@trim@spaces\reserved@a
- \edef\reserved@a{%
- \unexpanded{\DeclareSectionCommand[{#1}]}{\reserved@a}%
- }%
- \reserved@a
- }%
- \let\scr@local@levelincrease\relax
- \let\scr@local@leveloffset\relax
- \let\scr@local@tocleveloffset\relax
-}
-% \end{macrocode}
-% \end{command}^^A \DeclareSectionCommands
-%
-% \begin{command}{\DeclareNewSectionCommands}
-% \changes{v3.15}{2014/12/03}{added}
-% \changes{v3.26}{2018/08/29}{using \cs{scr@trim@spaces}}
-% Because of \opt{increaselevel} we cannot simply use
-% \cs{DeclareNewSectionCommand} inside, but have to use
-% \cs{DeclareSectionCommand} even for already defined commands (but
-% nevertheless report an error).
-% \begin{description}
-% \item[ToDo:] Is this really the correct error action? Does it really matter,
-% if \opt{increaselevel} would be wrong after already reporting an error?
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\DeclareNewSectionCommands}[2][]{%
- \edef\reserved@a{#2}%
- \def\scr@local@levelincrease{\z@}%
- \def\scr@local@leveloffset{\z@}%
- \def\scr@local@tocleveloffset{\z@}%
- \@for\reserved@a:=\reserved@a\do{%
- \scr@trim@spaces\reserved@a
- \@ifundefined{\reserved@a}{}{%
- \ClassError{\KOMAClassName}{%
- command `\expandafter\string\csname\reserved@a\endcsname' already
- defined%
- }{%
- You've tried to define the section command
- `\expandafter\string\csname\reserved@a\endcsname' newly,\MessageBreak
- but a command, token, box or length with this name already
- exists.\MessageBreak
- Maybe you should use one of \string\DeclareSectionCommand,
- \string\RedeclareSectionCommand,\MessageBreak
- or \string\ProvideSectionCommand.\MessageBreak
- Nevertheless, if you'll continue, the command will be defined.%
- }%
- }%
- \edef\reserved@a{%
- \unexpanded{\DeclareSectionCommand[{#1}]}{\reserved@a}%
- }%
- \reserved@a
- }%
- \let\scr@local@levelincrease\relax
- \let\scr@local@leveloffset\relax
- \let\scr@local@tocleveloffset\relax
-}
-% \end{macrocode}
-% \end{command}^^A \DeclareNewSectionCommands
-%
-% \begin{command}{\RedeclareSectionCommands}
-% \changes{v3.15}{2014/12/03}{added}
-% \changes{v3.26}{2018/08/29}{using \cs{scr@trim@spaces}}
-% Because of \opt{increaselevel} we cannot simply use
-% \cs{RedeclareSectionCommand} inside, but have to use
-% \cs{DeclareSectionCommand} even for not yet defined commands (but
-% nevertheless report an error).
-% \begin{description}
-% \item[ToDo:] Is this really the correct error action? Does it really matter,
-% if \opt{increaselevel} would be wrong after already reporting an error?
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\RedeclareSectionCommands}[2][]{%
- \edef\reserved@a{#2}%
- \def\scr@local@levelincrease{\z@}%
- \def\scr@local@leveloffset{\z@}%
- \def\scr@local@tocleveloffset{\z@}%
- \@for\reserved@a:=\reserved@a\do{%
- \scr@trim@spaces\reserved@a
- \@ifundefined{\reserved@a}{%
- \ClassError{\KOMAClassName}{%
- command `\expandafter\string\csname\reserved@a\endcsname' not defined%
- }{%
- You've tried to re-define the section command
- `\expandafter\string\csname\reserved@a\endcsname',\MessageBreak
- but a command with this name does not exists.\MessageBreak
- Maybe you should use one of \string\DeclareSectionCommand,
- \string\DeclareNewSectionCommand,\MessageBreak
- or \string\ProvideSectionCommand.\MessageBreak
- Nevertheless, if you'll continue, the command will be defined.%
- }%
- }{}%
- \edef\reserved@a{%
- \unexpanded{\DeclareSectionCommand[{#1}]}{\reserved@a}%
- }%
- \reserved@a
- }%
- \let\scr@local@levelincrease\relax
- \let\scr@local@leveloffset\relax
- \let\scr@local@tocleveloffset\relax
-}
-% \end{macrocode}
-% \end{command}^^A \RedeclareSectionCommands
-%
-% \begin{command}{\ProvideSectionCommands}
-% \changes{v3.15}{2014/12/03}{added}
-% \changes{v3.17}{2015/03/23}{re-implemented because of style depending
-% options}
-% \changes{v3.26}{2018/08/29}{using \cs{scr@trim@spaces}}
-% This is the real problematic case, because \opt{increaselevel} should be
-% used even for commands, that must not be defined. However, maybe a solution
-% like this should be used for the two previous commands too.
-% \begin{macrocode}
-\newcommand*{\ProvideSectionCommands}[2][]{%
- \edef\reserved@a{#2}%
- \def\scr@local@levelincrease{\z@}%
- \def\scr@local@leveloffset{\z@}%
- \def\scr@local@tocleveloffset{\z@}%
- \@for\reserved@a:=\reserved@a\do{%
- \scr@trim@spaces\reserved@a
- \@ifundefined{\reserved@a}{%
- \edef\reserved@a{%
- \unexpanded{\DeclareSectionCommand[{#1}]}{\reserved@a}%
- }%
- \reserved@a
- }{%
-% \end{macrocode}
-% If the command already exists, process options \opt{level}, \opt{toclevel}
-% and \opt{increaselevel} and ignore all others using an \opt{@else@} option.
-% \begin{macrocode}
- \DefineFamilyKey[.dsc]{KOMAarg}{@else@}{\FamilyKeyStateProcessed}%
- \FamilyCounterMacroKey[.dsc]{KOMAarg}{increaselevel}[1]%
- {\scr@local@levelincrease}%
- \DefineFamilyKey[.dsc]{KOMAarg}{level}{%
- \FamilySetCounterMacro{KOMAarg}{level}{\reserved@b}{##1}%
- \edef\scr@local@leveloffset{%
- \the\numexpr\scr@local@leveloffset+\scr@local@levelincrease\relax
- }%
- }%
- \DefineFamilyKey[.dsc]{KOMAarg}{toclevel}{%
- \FamilySetCounterMacro{KOMAarg}{toclevel}{\reserved@b}{##1}%
- \edef\scr@local@tocleveloffset{%
- \the\numexpr\scr@local@tocleveloffset+\scr@local@levelincrease\relax
- }%
- }%
- \FamilyExecuteOptions[.dsc]{KOMAarg}{#1}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{toclevel}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{level}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{increaselevel}%
- \RelaxFamilyKey[.dsc]{KOMAarg}{@else@}%
- }%
- }%
- \let\scr@local@levelincrease\relax
- \let\scr@local@leveloffset\relax
- \let\scr@local@tocleveloffset\relax
-}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \ProvideSectionCommands
-%
-% \begin{command}{\IfSectionCommandStyleIs}
-% \changes{v3.27}{2019/02/04}{added}
-% Test whether ot not the section command of argument 1 has the style of
-% argument 2. If so: use argument 3, of not: use argument 4.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\IfSectionCommandStyleIs}[2]{%
- \scr@ifundefinedorrelax{#1}{%
- \ClassError{\KOMAClassName}{%
- \expandafter\string\csname #1\endcsname\space not defined}{%
- You cannot compare the section command style of an undefined command.}%
- }{%
- \scr@ifundefinedorrelax{scr@#1@style}{%
- \ClassError{\KOMAClassName}{%
- \expandafter\string\csname #1\endcsname\space not a valid section
- command%
- }{%
- You cannot detect the section command style of a command, that
- has\MessageBreak
- never been defined as a section command by KOMA-Script.%
- }%
- }%
- }%
- \scr@ifundefinedorrelax{scr@dsc@def@style@#2@command}{%
- \ClassError{\KOMAClassName}{%
- unknown section command style `#2'%
- }{}%
- }%
- \Ifstr{\@nameuse{scr@#1@style}}{#2}%
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{option}{bookmarkpackage}
-% \changes{v3.26}{2018/06/27}{added}
-% Package \pkg{hyperref} has problems with bookmark level gaps. So if
-% either the users omits a heading level or defines a heading with a level
-% that distinguish more than one from the previous or following level, there
-% would be a problem. One recommended solution for this would be to use
-% package \pkg{bookmark}. So if we load this package, we can use the same
-% value for bookmark levels and TOC levels even within
-% \cls*{scrartcl}. Nevertheless we allow the user to decide not to use
-% \pkg{bookmark}, but then it is not my fault, if something strange
-% happens.
-% \begin{macrocode}
-%<*option>
-\KOMA@ifkey{bookmarkpackage}{@scr@autoloadbookmarkpackage}
-\@scr@autoloadbookmarkpackagetrue
-\KOMA@kav@add{.\KOMAClassFileName}{bookmarkpackage}{true}
-\AfterAtEndOfPackage{hyperref}{%
- \AtBeginDocument{%
- \@ifpackageloaded{bookmark}{}{%
- \if@scr@autoloadbookmarkpackage
-% \end{macrocode}
-% \changes{v3.27}{2019/06/26}{try to translate \pkg{hyperref} driver to
-% \pkg{bookmark} driver option}
-% The name of the \pkg{hyperref} driver is in \cs{Hy@driver}. But
-% \pkg{bookmark} does not provide the same drivers, so we try to translate
-% the curreny known \pkg{hyperref} drivers to \pkg{bookmark}
-% drivers. Also we do not load \pkg{bookmark} with a driver option but
-% define \pkg{bookmark}'s \cs{BookmarkDriverDefault}.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{Hy@driver}{%
- \ClassWarning{\KOMAClassName}{%
- `hyperref' loaded but `\string\Hy@driver' undefined.\MessageBreak
- This should not happen!\MessageBreak
- Maybe `hyperref' not loaded or unknown version?%
- }%
- }{%
-% \end{macrocode}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Note: \texttt{hpdftex}, \texttt{hluatex}, \texttt{hxetex} and \texttt{hvtex}
-% do not need to be translated, because they are autodetected by
-% \pkg{bookmark} as well. \texttt{hypertex}, \texttt{hdviwindo},
-% \texttt{htex4ht} and \texttt{latex2html} are not known by \pkg{bookmark},
-% so we stay with the default (usually \texttt{dvips}).
-% \begin{macrocode}
- \Ifstr{\Hy@driver}{hdvips}{%
- \providecommand*{\BookmarkDriverDefault}{dvips}%
- }{%
- \Ifstr{\Hy@driver}{hdvipdfm}{%
- \providecommand*{\BookmarkDriverDefault}{dvipdfm}%
- }{%
- \Ifstr{\Hy@driver}{hdvipson}{%
- \providecommand*{\BookmarkDriverDefault}{dvipsone}%
- }{%
- \Ifstr{\Hy@driver}{htexture}{%
- \providecommand*{\BookmarkDriverDefault}{textures}%
- }{%
- }%
- }%
- }%
- }%
- }%
- \ClassInfo{\KOMAClassName}{%
- loading recommended package `bookmark'.\MessageBreak
- Using `bookmark' together with `hyperref' is
- recommended,\MessageBreak
- because of handling of possible bookmark level gaps.\MessageBreak
- You can avoid loading `bookmark' with KOMA-Script
- option\MessageBreak
- `bookmarkpackage=false' before \string\begin{document}
- and\MessageBreak
- you can avoid this message adding:\MessageBreak
- \space\space\string\usepackage
- \scr@ifundefinedorrelax{BookmarkDriverDefault}{}{%
- [\BookmarkDriverDefault]%
- }{bookmark}\MessageBreak
- before \string\begin{document}%
- }%
-% \end{macrocode}
-% \changes{v3.33}{2021/02/17}{workaround for catcode changes of
-% \pkg{babel-spanish}}
-% For \pkg{babel-spanish} we need to deactivate quoting before loading
-% \pkg{bookmark}.
-% \begin{macrocode}
- \@ifundefined{es@quoting}{%
- \RequirePackage{bookmark}%
- }{%
- \ifx\es@quoting\activatequoting
- \ClassInfo{\KOMAClassName}{%
- temporary deactivation of babel-spanish quoting
- }%
- \deactivatequoting
- \RequirePackage{bookmark}%
- \ClassInfo{\KOMAClassName}{%
- reactivation of babel-spanish quoting
- }%
- \activatequoting
- \else
- \RequirePackage{bookmark}%
- \fi
- }%
-% \end{macrocode}
-% \changes{v3.26b}{2019/01/17}{workaround for \cs{@beginmainauxhook} added}
-% Sometimes \pkg{auxhook} is not able to recognize that it cannot use a
-% patch of \cs{document} to execute \cs{@beginmainauxhook} if it is loaded via
-% \cs{AtBeginDocument}. In this case we do it here.
-% \begin{macrocode}
- \ifx\@beginmainauxhook\relax
- \else
- \if@filesw
- \ClassWarning{\KOMAClassName}{%
- seems someone has broken package `auxhook'.\MessageBreak
- Usually this happens, if `auxhook' is loaded or used\MessageBreak
- implicitly or explicitly by patching
- \string\document%
- \scr@ifundefinedorrelax{AtEndPreamble}{}{%
- \MessageBreak
- or via etoolbox command \string\AtEndPreamble%
- }.\MessageBreak
- Trying an emergency workaround.\MessageBreak
- You can avoid this warning adding:\MessageBreak
- \space\space\string\usepackage{auxhook}\MessageBreak
- before \string\begin{document}%
- }%
- \@beginmainauxhook
- \fi
- \fi
- \fi
- }%
- }%
-}
-%</option>
-% \end{macrocode}
-% \end{option}^^A bookmarkpackage
-%
-%
-% \subsection{Preambles of parts or chapters}
-%
-% The \KOMAScript{} classes \cls*{scrbook} and \cls*{scrreprt} provide
-% preambles above and below the headings of parts and chapters. The preamble
-% above is printed into the usual distance above the headings. It does not
-% increase this distance to avoid \emph{jumping headings}. However here we
-% have only the generic code for preambles. The user commands are defined by
-% \cs{scr@dsc@style@chapter@command} and \cs{scr@dsc@style@part@command}.
-%
-% \begin{macro}{\use@preamble}
-% \changes{v2.8p}{2001/09/25}{added}
-% Used as a general macro to print the stored preamble code and clean the
-% storage. Preambles are only printed, if the storage is defined. But an empty
-% defined storage would be printed. The argument is the name of the storage,
-% e.g., \texttt{chapter@o}, \texttt{chapter@u}, \texttt{part@o},
-% \texttt{part@u}.
-% \begin{macrocode}
-%<*book|report>
-%<*body>
-\newcommand*{\use@preamble}[1]{%
- \@ifundefined{#1@preamble}{}{%
- \@nameuse{#1@preamble}%
- \global\expandafter\let\csname#1@preamble\endcsname=\relax
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\set@preamble}
-% \changes{v2.8p}{2001/09/25}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% Macro
-% \begin{quote}
-% \cs{set@preamble}\marg{level name}\oarg{position}\oarg{width}\marg{text}
-% \end{quote}
-% defines a preamble code stored into \cs{\meta{preamble name}@preamble}. The
-% \meta{preamble name} is build depending on the \meta{level name} and the
-% \meta{position}. The \meta{position} is a combination of vertical and
-% horizontal position and used to generate not only the \meta{preamble name}
-% but also options for the \cs{parbox} used to encapsulate the \meta{text}
-% into a preamble code. The \meta{width} is also used for the \cs{parbox}.
-% \begin{description}
-% \item[Note:] The definition of a preamble is global and the definition of a
-% new preamble of the same \meta{preamble name} overwrite an existing one.
-% \end{description}
-% \begin{macro}{\set@@preamble}
-% \changes{v2.8p}{2001/09/25}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\set@@@preamble}
-% \changes{v2.8p}{2001/09/25}{added}
-% \begin{macro}{\set@@@@preamble}
-% \changes{v2.8p}{2001/09/25}{added}
-% \changes{v2.8q}{2001/11/27}{missing brace added}
-% \changes{v3.12}{2012/10/16}{allow \texttt{o} as alias for \texttt{b}}
-% \changes{v3.12a}{2014/02/14}{\texttt{b} fixed}
-% We need a lot of helpers because of not using \pkg*{xparse} but having
-% several optional arguments. At least one optional argument? If not use an
-% empty default for the first one and \len{hsize} for the second one.
-% \begin{macrocode}
-\newcommand*{\set@preamble}[1]{%
- \kernel@ifnextchar [%]
- {\set@@preamble{#1}}{\set@@@preamble{#1}[][\hsize]}%
-}
-% \end{macrocode}
-% Or even two optional argument? If not use default \len{hsize}.
-% \begin{macrocode}
-\newcommand*{\set@@preamble}{}
-\def\set@@preamble#1[#2]{%
- \kernel@ifnextchar [%]
- {\set@@@preamble{#1}[{#2}]}{\set@@@preamble{#1}[{#2}][\hsize]}%
-}
-% \end{macrocode}
-% From here we know all optional arguments and have to process the composite
-% \meta{position}.
-% \begin{macrocode}
-\newcommand{\set@@@preamble}{}
-\long\def\set@@@preamble#1[#2][#3]#4{%
- \begingroup
- \def\prmbl@pos{#2}\let\prmbl@hpos\relax\let\prmbl@vpos\relax
- \expandafter \@tfor \expandafter \@tempa
- \expandafter :\expandafter =\prmbl@pos
- \do{%
- \if \@tempa l%
- \set@preamble@hpos{0}{#2}%
- \fi%
- \if \@tempa c%
- \set@preamble@hpos{1}{#2}%
- \fi%
- \if \@tempa r%
- \set@preamble@hpos{2}{#2}%
- \fi%
- \if \@tempa u%
- \set@preamble@vpos{0}{#2}%
- \fi%
- \if \@tempa b%
- \set@preamble@vpos{0}{#2}%
- \fi
- \if \@tempa o%
- \set@preamble@vpos{1}{#2}%
- \fi%
- \if \@tempa t%
- \set@preamble@vpos{1}{#2}%
- \fi
- }%
-% \end{macrocode}
-% If the horizontal or vertical position is still unclear use defaults.
-% \begin{macrocode}
- \@ifundefined{prmbl@hpos}{\def\prmbl@hpos{0}}{}%
- \@ifundefined{prmbl@vpos}{\def\prmbl@vpos{0}}{}%
-% \end{macrocode}
-% From the vertical position we can build the \meta{preamble name} and the
-% vertical position of the \cs{parbox} the horizontal is used for the
-% horizontal skip before and after the \cs{parbox}.
-% \begin{macrocode}
- \ifcase\prmbl@hpos
- \ifcase\prmbl@vpos
- \set@@@@preamble{#1@u}{t}{#3}{}{\hfil}{#4}%
- \else
- \set@@@@preamble{#1@o}{b}{#3}{}{\hfil}{#4}%
- \fi
- \or
- \ifcase\prmbl@vpos
- \set@@@@preamble{#1@u}{t}{#3}{\hfil}{\hfil}{#4}%
- \else
- \set@@@@preamble{#1@o}{b}{#3}{\hfil}{\hfil}{#4}%
- \fi
- \else
- \ifcase\prmbl@vpos
- \set@@@@preamble{#1@u}{t}{#3}{\hfil}{}{#4}%
- \else
- \set@@@@preamble{#1@o}{b}{#3}{\hfil}{}{#4}%
- \fi
- \fi
- \endgroup
-}
-% \end{macrocode}
-% Last but not least add the horizontal aligned \cs{parbox} to the preamble
-% storage.
-% \begin{macrocode}
-\newcommand{\set@@@@preamble}[6]{%
- \expandafter\gdef\csname #1@preamble\endcsname{%
- \hbox to\hsize{#4\parbox[{#2}]{#3}{#6\par}#5\par}%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\set@preamble@hpos}
-% \changes{v2.8q}{2001/09/25}{added}
-% Either store the horizontal preamble position if not yet defined or if
-% already defined but illegal report it as an error.
-% \begin{macrocode}
-\newcommand*{\set@preamble@hpos}[2]{%
- \@ifundefined{prbml@hpos}{%
- \def\prmbl@hpos{#1}%
- }{%
- \ifnum \prmbl@hpos=0\relax\else%
- \ClassError{\KOMAClassName}{%
- inconsistent hpos options%
- }{%
- You've said `#2' as position option. But you have
- to\MessageBreak
- use only one of `l', `r', or `c' not two of
- these.\MessageBreak
- If you'll continue only first hpos option will be
- used%
- }%
- \fi
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \set@preamble@hpos
-% \begin{macro}{\set@preamble@vpos}
-% \changes{v2.8q}{2001/09/25}{added}
-% Either store the vertical position if not yet defined or if already defined
-% but illegal report it as an error.
-% \begin{macrocode}
-\newcommand*{\set@preamble@vpos}[2]{%
- \@ifundefined{prbml@vpos}{%
- \def\prmbl@vpos{#1}%
- }{%
- \ifnum \prmbl@vpos=0\relax\else%
- \ClassError{\KOMAClassName}{%
- inconsistent vpos options%
- }{%
- You've said `#2' as position option. But you have
- to\MessageBreak
- use only one of `t', `o', `b', or `u' not two of
- these.\MessageBreak
- If you'll continue only first vpos option will be
- used%
- }%
- \fi
- }%
-}
-%</body>
-%</book|report>
-% \end{macrocode}
-% \end{macro}^^A \set@preamble@vpos
-% \end{macro}^^A \set@@@@preamble
-% \end{macro}^^A \set@@@preamble
-% \end{macro}^^A \set@@preamble
-% \end{macro}^^A \set@preamble
-%
-%
-% \subsection{Deprecated code for the ToC}
-%
-% Before using \pkg*{tocbasic} we needed additional code for our extended
-% version of \cs{@dottedtocline}. However this has been removed in
-% \KOMAScript~v3.36.
-%
-% \begin{description}
-% \item[ToDo:] This should be moved to \file{scrkernel-listsof.dtx} or should
-% be removed.
-% \end{description}
-%
-% \begin{macro}{\bprot@dottedtocline}
-% \changes{v2.96a}{2006/11/30}{added}
-% \changes{v3.27}{2019/02/25}{deprecated}
-% \changes{v3.36}{2022/03/15}{removed}
-% \end{macro}
-%
-%
-% \subsection{Rough structuring of books}
-%
-% Some books have a kind of rough structuring into front matter, main matter
-% and back matter. This has consequences for the page numbering and the
-% numbering of headings and other elements.
-%
-% \begin{macro}{\@mainmattertrue,\@mainmatterfalse,\if@mainmatter}
-% For the numbering of headings and other elements we only need to know
-% whether we are in the main matter or not, because chapters outside the main
-% matter do not provide a number. A boolean switch is best for this. By
-% default we already start with the main matter.
-% \begin{macrocode}
-%<*book>
-%<*body>
-\newif\if@mainmatter\@mainmattertrue
-% \end{macrocode}
-% \end{macro}^^A \@mainmattertrue,\if@mainmatter
-%
-% \begin{command}{\frontmatter}
-% \changes{v2.4e}{1996/07/02}{support for \opt{open\quotechar=any}}
-% \changes{v2.5h}{1999/12/29}{support for \opt{twoside}}
-% \changes{v3.00}{2008/09/27}{\cs{cleardoublepage} replaced by
-% \cs{cleardoubleoddpage}}
-% Switching to the front matter always needs a new odd page, because we change
-% the page numbering to lowercase Roman numbers.
-% \begin{macrocode}
-\newcommand*\frontmatter{%
- \if@twoside\cleardoubleoddpage\else\clearpage\fi
- \@mainmatterfalse\pagenumbering{roman}%
-}
-% \end{macrocode}
-% \end{command}^^A \frontmatter
-% \begin{command}{\mainmatter}
-% \changes{v2.4e}{1996/07/02}{support for \opt{open\quotechar=any}}
-% \changes{v2.5h}{1999/12/29}{support for \opt{twoside}}
-% \changes{v3.00}{2008/09/27}{\cs{cleardoublepage} replaced by
-% \cs{cleardoubleoddpage}}
-% Switching back to main matter always needs a new odd page, because we change
-% the page numbering to Arabic numbers.
-% \begin{macrocode}
-\newcommand*\mainmatter{%
- \if@twoside\cleardoubleoddpage\else\clearpage\fi
- \@mainmattertrue\pagenumbering{arabic}%
-}
-% \end{macrocode}
-% \end{command}^^A \mainmatter
-% \begin{command}{\backmatter}
-% \changes{v3.00}{2008/09/27}{\cs{cleardoublepage} replaced by
-% \cs{cleardoubleoddpage}}
-% Only with \opt{open=right} we start a new odd page when starting the back
-% matter.
-% \begin{description}
-% \item[ToDo:] This does not make any sense, because the page numbering is not
-% changed. And it seems to be even wrong for \opt{open=left}! So why does
-% \cls*{book} use this and why shall we do so too?
-% \end{description}
-% \begin{macrocode}
-\newcommand*\backmatter{%
- \if@openright\cleardoubleoddpage\else\clearpage\fi\@mainmatterfalse
-}
-%</body>
-%</book>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{Appendix}
-%
-% The classes (except \cls*{scrlttr2}) does provide an appendix switch,
-% similar but not identical to the standard classes.
-%
-% \begin{command}{\appendix}
-% Activation of the appendix switch over to numbering of chapters
-% resp. sections with uppercase letters.
-% \changes{v2.2d}{1995/05/28}{\cls*{scrartcl} doesn't have a chapter
-% counter}
-% \changes{v2.3c}{1995/08/06}{alternative section numbering in appendix}
-% \changes{v2.8}{2001/06/15}{new \cs{appendixmore}}
-% \changes{v2.8e}{2001/07/10}{\cs{@altsecnumformattrue} removed}
-% \changes{v2.8o}{2001/09/19}{initial \cs{par} added}
-% \changes{v2.95}{2006/07/04}{\cs{newcommand*} replaced by \cs{gdef}}
-% \changes{v2.95}{2006/07/04}{simplified usage of \cs{appendixmore}}
-% \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}
-% \begin{command}{\appendixmore}
-% \changes{v2.8}{2001/06/15}{added}
-% \cs{appendixmore} is deprecated with \LaTeX{} 2020/10/01 (or newer) but
-% still executed as a kind of hook.
-% \begin{macrocode}
-%<*body>
-\newcommand*\appendix{%
- \Ifstr{\@currenvir}{appendix}{%
- \ClassWarning{\KOMAClassName}{%
- You are using
- `\string\begin{appendix}...\string\end{appendix}'.\MessageBreak
- You should note, that `\string\appendix' is a mostly
- globally\MessageBreak
- working command not an enviroment with only local\MessageBreak
- effects. Therefore `\string\end{appendix}' will neither\MessageBreak
- switch back to normal section numbering nor finish\MessageBreak
- every other effect of `\string\begin{appendix}'.\MessageBreak
- Nevertheless, some effects may end with\MessageBreak
- `\string\end{appendix}' and the document may become\MessageBreak
- inconsistent.\MessageBreak
- Because of this, you should remove `\string\end{appendix}'\MessageBreak
- and replace `\string\begin{appendix}' by command\MessageBreak
- `\string\appendix'%
- }%
- }{}%
- \par
-%<*article>
- \setcounter{section}{0}%
- \setcounter{subsection}{0}%
- \gdef\thesection{\@Alph\c@section}%
-%</article>
-%<*report|book>
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@Alph\c@chapter}%
-%</report|book>
-}
-\IfLTXAtLeastTF{2020/10/01}{%
- \g@addto@macro{\appendix}{\UseOneTimeHook{\KOMAClassName/appendix}}%
-}{}
-\g@addto@macro{\appendix}{\csname appendixmore\endcsname}
-%</body>
-%<*prepare>
-\IfLTXAtLeastTF{2020/10/01}{\NewHook{\KOMAClassName/appendix}}{}
-%</prepare>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-%
-% \subsection{Parts}
-%
-% \begin{macro}{\@thepart}
-% \changes{v2.8e}{2001/07/10}{removed}
-% \end{macro}
-%
-% The definition of parts depends on the class.
-%
-% \begin{fontelement}{partnumber,part}
-% \changes{v2.8o}{2001/09/14}{pre-added as macro}
-% \changes{v2.8p}{2001/09/23}{added}
-% \changes{v2.96a}{2006/12/02}{undocumented support for last macro expects an
-% argument}
-% \begin{fontelement}{partprefix}
-% \changes{v3.18}{2015/06/10}{alias added}
-% Definition of the font elements used by \cs{part}. The settings are done by
-% option \texttt{headings} later. Everything is prepared before this option is
-% used the first time. The elements are defined manually because of
-% compatibility with \KOMAScript~v2.8o before font elements has been
-% implemented in \KOMAScript~v2.8p.
-% \begin{macrocode}
-%<*prepare>
-\newcommand*{\size@part}{}
-\newcommand*{\scr@fnt@part}{\size@part}
-\newcommand*{\size@partnumber}{}
-\newcommand*{\scr@fnt@partnumber}{\size@partnumber}
-\aliaskomafont{partprefix}{partnumber}
-%</prepare>
-% \end{macrocode}
-% \end{fontelement}^^A partprefix
-% \end{fontelement}^^A partnumber,part
-%
-%
-% \begin{command}{\partheadstartvskip,\partheadendvskip}
-% \changes{v2.95a}{2006/07/10}{added}
-% \changes{v3.15}{2014/11/24}{\cls*{scrartcl} defines and uses
-% \cs{scr@part@beforeskip} resp. \cs{scr@part@afterskip}}
-% \begin{command}{\partheadmidvskip}
-% \changes{v2.95a}{2006/07/10}{added}
-% \begin{command}{\parheademptypage}
-% \changes{v3.02}{2009/01/01}{added}
-% These commands are the distance before and after a part heading, between the
-% prefix line and the text line of the heading and also the empty retro page
-% of a part.
-%
-% \begin{macro}{\scr@part@sectionbeforeskip,\scr@part@beforeskip}
-% \changes{v3.15}{2014/11/24}{added}
-% \changes{v3.17}{2015/03/25}{\cs{scr@part@sectionbeforeskip} renamed to
-% \cs{scr@part@beforeskip}}
-% \begin{macro}{\scr@part@sectionafterskip,\scr@part@sectionbeforeskip}
-% \changes{v3.15}{2014/11/24}{added}
-% \changes{v3.17}{2015/03/25}{\cs{scr@part@sectionafterskip} renamed to
-% \cs{scr@part@afterskip}}
-% \begin{macro}{\scr@part@sectionindent}
-% \changes{v3.15}{2014/11/24}{added}
-% \changes{v3.17}{2015/03/24}{removed}
-% \end{macro}^^A \scr@part@sectionindent
-% \begin{macro}{\scr@part@innerskip}
-% \changes{v3.17}{2015/03/24}{added}
-% \begin{macro}{\scr@part@style}
-% \changes{v3.15}{2014/11/24}{added}
-% All the skips and the page style are used by \cs{DeclareSectionCommand}
-% resp. the style \texttt{part}. We define it as early as possible. Even the
-% style of \cs{part} is already defined here.
-% \begin{description}
-% \item[ToDo:] Do we need them in the \texttt{prepare} run or can we move then
-% even to the \texttt{body} run?
-% \item[ToDo:] Do we really need to define \cs{scr@part@style}?
-% \end{description}
-% \begin{macrocode}
-%<*prepare>
-\newcommand*{\scr@part@beforeskip}{%
-%<article> 4ex
-% \end{macrocode}
-% \begin{description}
-% \item[Note:] The |+\baselineskip| is needed, to stay as compatible as
-% possible with prior definitions of \cs{chapterheadstartvskip}.
-% \end{description}
-% \begin{macrocode}
-%<report|book> \z@ \@plus 1fil + \baselineskip
-}
-%<book|report>\newcommand*{\scr@part@innerskip}{20\p@}
-\newcommand*{\scr@part@afterskip}{%
-%<article> 3ex
-%<report|book> \z@ \@plus 1fil
-}
-\newcommand*{\scr@part@style}{part}
-% \end{macrocode}
-% \end{macro}^^A \scr@part@style
-% \end{macro}^^A \scr@part@afterskip
-% \end{macro}^^A \scr@part@innerskip
-% \end{macro}^^A \scr@part@beforeskip
-% \begin{macrocode}
-\newcommand*{\partheadstartvskip}{%
-%<article> \addvspace{\@tempskipa}%
-%<report|book> \null\vskip-\baselineskip\vskip\@tempskipa
-}
-\newcommand*{\partheadmidvskip}{%
- \par\nobreak
-%<book|report> \vskip\@tempskipa
-}
-\newcommand*{\partheadendvskip}{%
-%<article> \vskip\@tempskipa
-%<report|book> \vskip\@tempskipa\newpage
-}
-%<*report|book>
-\newcommand*{\partheademptypage}{%
- \if@twoside\if@openright
- \null%
- \thispagestyle{empty}%
- \newpage
- \fi\fi
-}
-%</report|book>
-%</prepare>
-% \end{macrocode}
-% \end{command}^^A \partheademptypage
-% \end{command}^^A \partheadmidvskip
-% \end{command}^^A \partheadstartvskip,\partheadendvskip
-%
-%
-% \begin{macro}{\scr@startpart}
-% \changes{v2.8d}{2001/07/05}{using \cs{partpagestyle}}
-% \changes{v2.8p}{2001/09/27}{preamble above heading}
-% \changes{v3.13a}{2014/09/11}{using \cs{SecDef}}
-% \changes{v3.18}{2015/05/23}{added}
-% \changes{v3.19}{2015/08/25}{ignoring empty \cs{partpagestyle}}
-% \changes{v3.26}{2018/10/14}{supporting option \opt{afterindent}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% The macro
-% \begin{quote}
-% \cs{scr@startpart}\marg{part command name}
-% \end{quote}
-% is now part of the style \texttt{part}. However, the main parts
-% of the code are from the original definition of \cs{part}. It has only one
-% argument: The name of the part command, i.e., \texttt{part}. All arguments
-% to the part command will be processed later.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\scr@startpart}[1]{%
- \ExecuteDoHook{heading/preinit/#1}%
-%<article> \par
-%<*book|report>
- \if@openright\cleardoublepage\else\clearpage\fi
- \scr@ifundefinedorrelax{#1pagestyle}{}{%
- \Ifstr{#1pagestyle}{}{}{%
- \thispagestyle{\@nameuse{#1pagestyle}}%
- }%
- }%
- \if@twocolumn
- \onecolumn
- \@tempswatrue
- \else
- \@tempswafalse
- \fi
-%</book|report>
- \@tempskipa=\glueexpr\@nameuse{scr@#1@beforeskip}\relax
- \@ifundefined{scr@#1@afterindent}{\@afterindentfalse}{%
- \csname scr@#1@afterindent\endcsname
- {\@afterindenttrue}{\@afterindentfalse}{%
- \@afterindenttrue
- \ifdim\@tempskipa<\z@
- \@tempskipa=-\@tempskipa
- \@afterindentfalse
- \fi
- }%
- }%
- \ExecuteDoHook{heading/postinit/#1}%
- \partheadstartvskip
-%<*book|report>
- \vbox to\z@{\vss\use@preamble{#1@o}\strut\par}%
- \vskip-\baselineskip\nobreak
-%</book|report>
- \expandafter\SecDef\csname @#1\expandafter\endcsname\csname @s#1\endcsname
-}
-% \end{macrocode}
-%
-% \begin{macro}{\scr@@startpart}
-% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}}
-% \changes{v2.95}{2002/08/13}{\cs{centering} and \cs{@parskipfalse}%
-% \cs{@parskip@indent} switched}
-% \changes{v2.95}{2004/11/05}{\cs{@parskipfalse} and \cs{@parskip@indent}
-% replaced}
-% \changes{v3.18}{2015/05/23}{added}
-% \changes{v3.27}{2019/07/08}{support for option \opt{nonumber}}
-% The macro
-% \begin{quote}
-% \cs{scr@@startpart}\marg{part command name}\oarg{extended optional
-% argument}\marg{part heading}
-% \end{quote}
-% is now part of the style \texttt{part}. However, the main parts
-% of the code are from the original definition of \cs{@part}. Therefore it has
-% the mandatory and optional arguments of a non-star variant of, i.e.,
-% \cs{part} but an additional first argument.
-% \begin{description}
-% \item[Note:] \meta{extended optional argument} is named as optional, however
-% here it is already mandatory, because it is a delimited argument.
-% \end{description}
-% \begin{macrocode}
-\newcommand{\scr@@startpart}{}
-\long\def\scr@@startpart#1[#2]#3{%
- \ExecuteDoHook{heading/branch/nostar/#1}%
-% \end{macrocode}
-% \changes{v3.10}{2011/08/30}{extended optional argument}
-% First of all, depending in \opt{headings=optionto\dots} we have different
-% defaults for the options.
-% \begin{macrocode}
- \ifnum \scr@osectarg=\z@
- \@scr@tempswafalse
- \else
- \scr@istest#2=\@nil
- \fi
- \@currentusenumbertrue
- \if@scr@tempswa
- \setkeys{KOMAarg.section}{tocentry={#3},head={#3},reference={#3},#2}%
- \else
- \ifcase \scr@osectarg\relax
- \setkeys{KOMAarg.section}{tocentry={#2},head={#2},reference={#2}}%
- \or
- \setkeys{KOMAarg.section}{tocentry={#3},head={#2},reference={#3}}%
- \or
- \setkeys{KOMAarg.section}{tocentry={#2},head={#3},reference={#2}}%
- \or
- \setkeys{KOMAarg.section}{tocentry={#2},head={#2},reference={#2}}%
- \fi
- \fi
-% \end{macrocode}
-% \changes{v2.8e}{2001/07/10}{using \cs{@maybeautodot}}
-% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to
-% \cs{Ifnumbered}}
-% \changes{v3.31}{2020/06/02}{\cs{@maybeautodot}\cs{thepart} removed}
-% For numbered headings we have to increase the counter and write a process
-% information to the \file{log} and the terminal.
-% \begin{macrocode}
- \Ifnumbered{#1}{%
- \refstepcounter{#1}%
- \expandafter\@maybeautodot\csname the#1\endcsname
- \typeout{#1 \csname the#1\endcsname.}%
-% \end{macrocode}
-% \changes{v3.08}{2010/11/01}{using \cs{addparttocentry}}
-% \changes{v3.18}{2015/05/20}{using \cs{add\meta{Name}tocentry} for
-% \cs{typeout}}
-% \changes{v3.31}{2020/06/06}{using \cs{\dots tocformat}}
-% And if the ToC entry is not empty add a numbered entry to the table of
-% contents.
-% \begin{description}
-% \item[ToDo:] Move \cs{autodot} to the definition of \cs{\dots tocformat}.
-% \end{description}
-% \begin{macrocode}
- \ifx\@currenttocentry\@empty\else
- \@ifundefined{#1tocformat}{%
- \expandafter\gdef\csname #1tocformat\endcsname
- {\csname the#1\endcsname}%
- }{}%
- \scr@ifundefinedorrelax{add#1tocentry}{%
- \addtocentrydefault{#1}%
- }{%
- \@nameuse{add#1tocentry}%
- }{\csname\@ifundefined{#1tocformat}{the#1}{#1tocformat}\endcsname}%
- {\@currenttocentry}%
- \fi
- }{%
-% \end{macrocode}
-% \changes{v3.18}{2015/05/23}{execute counter reset list for not numbered
-% headings}
-% For not numbered headings we still have to process the reset list of the
-% counter and write a process information to the \file{log} and the terminal.
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.18}\relax\else
- \begingroup
- \let\@elt\@stpelt
- \csname cl@#1\endcsname
- \endgroup
- \fi
- \typeout{#1 without number}%
-% \end{macrocode}
-% \changes{v3.08}{2010/11/01}{using \cs{addparttocentry}}
-% \changes{v3.18}{2015/05/23}{generalized \cs{addparttocentry}}
-% And before writing a not numbered entry to the table of contents we have to
-% execute also the \pkg{hyperref} hook \cs{hy@insteadofrefstepcounter}.
-% \begin{description}
-% \item[Note:] \pkg*{scrhack} uses the existence of this command to detect a
-% \KOMAScript{} class. Shouldn't this be changed using, e.g.,
-% \cs{KOMAClassName}?
-% \end{description}
-% \begin{macrocode}
- \ifx\@currenttocentry\@empty\else
- \hy@insteadofrefstepcounter{#1}%
- \scr@ifundefinedorrelax{add#1tocentry}{%
- \addtocentrydefault{#1}%
- }{%
- \@nameuse{add#1tocentry}%
- }{}{\@currenttocentry}%
- \fi
- }%
-% \end{macrocode}
-% \changes{v2.2c}{1995/05/25}{support for CJK}
-% \changes{v2.4b}{1996/03/29}{\cs{size@partnumer} replaced by
-% \cs{size@partnumber}}
-% \changes{v2.8p}{2001/09/22}{\cs{sectfont} used before \cs{size@part} or
-% \cs{size@partnumber}}
-% \changes{v2.8q}{2002/02/28}{\cs{nobreak} after \cs{sectfont}}
-% \changes{v3.18}{2015/05/23}{\cs{size@\dots} replaced by \cs{usekomafont}}
-% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added}
-% \changes{v3.25}{2017/09/07}{defining \cs{IfUseNumber} locally}
-% \changes{v3.25}{2017/09/07}{\cs{sectfont} replaced by \cs{usekomafont}}
-% \changes{v3.25}{2017/09/07}{using \cs{partlineswithprefixformat}}
-% \changes{v3.25}{2018/02/12}{using correct fontelement}
-% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to
-% \cs{Ifnumbered}}
-% Now the main printing code.
-% \begin{description}
-% \item[ToDo:] This code is almost the same as \cs{scr@@startchapter}. Only
-% the procession of the reset list was there already with
-% \KOMAScript~v3.15. And in \cs{scr@@startchapter} we are using
-% \cs{@make\meta{name}head} here. So maybe we should do the same here and
-% really use the same definition instead of having it twice.
-% \end{description}
-% \begin{macrocode}
- \begingroup
- \def\IfUseNumber{\Ifnumbered{#1}}%
- \ExecuteDoHook{heading/begingroup/#1}%
- \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
- \raggedpart
- \normalfont\usekomafont{disposition}{\nobreak
- \IfUseNumber{%
- \partlineswithprefixformat{#1}{%
- \usekomafont{#1prefix}{\nobreak\@nameuse{#1format}}%
-%<book|report> \setlength{\@tempskipa}{\@nameuse{scr@#1@innerskip}}%
- \partheadmidvskip
- }{%
- \usekomafont{#1}{\nobreak\interlinepenalty \@M#3\strut\@@par}%
- }%
- }{%
- \partlineswithprefixformat{#1}{}{%
- \usekomafont{#1}{\nobreak\interlinepenalty \@M#3\strut\@@par}%
- }
- }%
-% \end{macrocode}
-% \changes{v3.10}{2011/08/30}{using\cs{@mkboth{}{}} if \cs{partmark} is
-% \cs{@gobble}}
-% The running head.
-% \begin{macrocode}
- \expandafter\ifx\csname #1mark\endcsname\@gobble
- \@mkboth{}{}%
- \else
- \csname #1mark\expandafter\endcsname\expandafter{\@currentheadentry}%
- \fi
- }%
- \ExecuteDoHook{heading/endgroup/#1}%
- \endgroup
-% \end{macrocode}
-% The final distance.
-% \begin{macrocode}
-%<*article>
- \nobreak
- \@tempskipa=\glueexpr\@nameuse{scr@#1@afterskip}\relax\relax
- \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi
- \partheadendvskip
-%</article>
-%<book|report> \@nameuse{@end#1}%
-% \end{macrocode}
-% \changes{v3.26}{2018/10/14}{using \@cs{@afterheading} with
-% \cls*{scrbook} or \cls*{scrreprt}}
-% And \cs{@afterheading} for all classes.
-% \begin{macrocode}
- \@afterheading
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@@startpart
-%
-% \begin{macro}{\scr@@startspart}
-% \changes{v2.4n}{1997/05/28}{added \cs{chaptermark} resp.
-% \cs{sectionmark} to star variant}
-% \changes{v2.6a}{2000/01/20}{using \cs{@mkboth} to delete the running head}
-% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}}
-% \changes{v2.95}{2002/08/13}{\cs{centering} and
-% \cs{@parskipfalse}\cs{@parskip@indent} swapped}
-% \changes{v2.95}{2004/11/05}{\cs{@parskipfalse} and\cs{@parskip@indent}
-% replaced}
-% \changes{v3.18}{2015/05/23}{added}
-% The macro
-% \begin{quote}
-% \cs{scr@@startspart}\marg{part command name}\marg{part heading}
-% \end{quote}
-% is now part of the style \texttt{part}. However, the main parts
-% of the code are from the original definition of \cs{@spart}. Therefore it has
-% the mandatory argument of a star variant of, i.e., \cs{part} but an
-% additional first argument.
-% \begin{macrocode}
-\newcommand{\scr@@startspart}[2]{%
- \ExecuteDoHook{heading/branch/star/#1}%
-% \end{macrocode}
-% Some users don't learn to use \cs{addpart} for not numbered parts with entry
-% to the table of contents but insist in using \cs{addcontentsline}. Despite
-% this should not be used, because at least \cs{addparttocentry} should be
-% used, we tolerate this by using our \pkg{hyperref} hook.
-% \begin{description}
-% \item[ToDo:] I don't understand why \pkg{hyperref} uses a group here and
-% locally sets \cs{@mkboth} to \cs{@gobbletwo}. However, I've copied this.
-% \end{description}
-% \begin{macrocode}
- \begingroup
- \let\@mkboth\@gobbletwo
- \hy@insteadofrefstepcounter{#1}%
- \endgroup
-% \end{macrocode}
-% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added}
-% \changes{v3.25}{2017/09/07}{difining \cs{IfUseNumber} locally}
-% \changes{v3.25}{2017/09/07}{\cs{sectfont} replaced by \cs{usekomafont}}
-% \changes{v3.25}{2017/09/07}{using \cs{partlineswithprefixformat}}
-% Now the printing similar to \cs{scr@@startpart}.
-% \begin{macrocode}
- \begingroup
- \let\IfUseNumber\@secondoftwo
- \ExecuteDoHook{heading/begingroup/#1}%
- \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
- \raggedpart
- \normalfont\usekomafont{disposition}{%
- \nobreak
- \partlineswithprefixformat{#1}{}{%
- \usekomafont{#1}{\nobreak\interlinepenalty \@M#2\strut\@@par}%
- }%
- \@mkboth{}{}%
- }%
- \ExecuteDoHook{heading/endgroup/#1}%
- \endgroup
-%<*article>
- \nobreak
- \@tempskipa=\glueexpr\csname scr@#1@afterskip\endcsname\relax\relax
- \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi
- \partheadendvskip
- \@afterheading
-%</article>
-%<book|report> \@nameuse{@end#1}%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@@startspart
-%
-% \begin{command}{\partlineswithprefixformat}
-% \changes{v3.25}{2017/09/07}{added}
-% Command
-% \begin{quote}
-% \cs{partlineswithprefixformat}\marg{command name}\marg{number}\marg{text}
-% \end{quote}
-% is used to print a part heading with a prefix line. \meta{number} is the
-% completely formatted prefix line inclusive the vertical distance below. The
-% \meta{text} is the text of the heading also formatted and with final
-% \cs{@@par}. But if the user uses more paragraphs than this final one, the
-% user is responsible to prevent page breaks!
-% \begin{macrocode}
-\newcommand{\partlineswithprefixformat}[3]{%
- #2#3%
-}
-% \end{macrocode}
-% \end{command}^^A \partlineswithprefixformat
-%
-% \begin{macro}{\scr@@endpart}
-% \changes{v2.3g}{1996/01/14}{\cs{@endpart} not defined for \cls*{scrartcl}}
-% \changes{v2.4e}{1996/07/02}{supporting option \opt{openany}}
-% \changes{v2.6c}{2000/06/10}{\cs{@endpart} respects \opt{open\quotechar=right}}
-% \changes{v2.8p}{2001/09/27}{\cs{vbox} added}
-% \changes{v2.8p}{2001/09/27}{\cs{@part@preamble} replaced by \cs{use@preamble}}
-% \changes{v3.02}{2009/01/01}{using \cs{partheademptypage}}
-% \changes{v3.18}{2015/05/23}{added}
-% Before \KOMAScript~v3.18 this code was part of \cs{part}. \cls*{scrbook} and
-% \cls*{scrreprt} use this macro to finalize the heading, e.g., print a
-% preamble, to the final distance or new page and add an empty retro
-% page. \cls*{scrartcl} does not have such a command, because with
-% \cls*{scrartcl} parts are simple headings not pages. As usual the argument
-% is the name of the part command, e.g., \texttt{part}.
-% \begin{macrocode}
-%<*book|report>
-\newcommand*{\scr@@endpart}[1]{%
- \vbox to\z@{\use@preamble{#1@u}\vss}%
- \@tempskipa=\glueexpr\csname scr@#1@afterskip\endcsname\relax\relax
- \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi
- \partheadendvskip
- \partheademptypage
- \if@tempswa
- \twocolumn
- \fi
-}
-%</book|report>
-% \end{macrocode}
-% \end{macro}^^A \scr@@endpart
-% \end{macro}^^A \scr@startpart
-%
-%
-% \begin{macro}{\hy@insteadofrefstepcounter}
-% \changes{v3.18}{2015/05/22}{added to be used by \pkg{hyperref}}
-% \begin{macro}{\scr@chapter@before@hyperref@patch}
-% \changes{v3.27}{2019/07/24}{added to be used by \pkg*{scrhack}}
-% \begin{macro}{\scr@chapter@after@hyperref@patch}
-% \changes{v3.27}{2019/07/24}{added to be used by \pkg*{scrhack}}
-% \changes{v3.32}{2020/09/11}{\cs{AfterPackage!} replaced by
-% \cs{AfterAtEndOfPackage}}
-% Usually \pkg{hyperref} uses \cs{refstepcounter} to process extra codes for
-% anchors and bookmarks. However, if a not numbered heading is used,
-% \pkg{hyperref} cannot use \cs{refstepcounter} but still has to add
-% code. Usually \pkg{hyperref} patchs several commands like \cs{@chapter},
-% \cs{@schapter}, \cs{@part}, \cs{@spart} etc. to do so. But I think, it would
-% be better to provide a hook for this, \pkg*{hyperref} can change. So we've
-% designed \cs{hy@insteadofrefstepcounter}. Unfortunately \pkg{hyperref}
-% currently does not care for this, but still does its patches. So we need to
-% prevent \pkg{hyperref} from doing so and additionally define
-% \cs{hy@insteadofrefstepcounter} ourselves. But because \cs{autoref} is
-% nonsense for not numbered headings, I do not use \cs{Hy@chapapp} for
-% \cs{Hy@MakeCurrentHrefAuto}.
-% \begin{description}
-% \item[ToDo:] Explain the Oberdiek support team, what we are doing here and
-% what they should do.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\hy@insteadofrefstepcounter}[1]{}
-\let\hy@insteadofrefstepcounter\@gobble
-\newcommand*{\scr@chapter@before@hyperref@patch}{%
- \let\scr@orig@chapter\@chapter
- \let\scr@orig@schapter\@schapter
- \let\scr@orig@addchap\@addchap
-}
-\BeforePackage{hyperref}{\scr@chapter@before@hyperref@patch}
-\newcommand*{\scr@chapter@after@hyperref@patch}{%
- \let\@chapter\scr@orig@chapter
- \let\@schapter\scr@orig@schapter
- \let\@addchap\scr@orig@addchap
- \ifx\hy@insteadofrefstepcounter\@gobble
- \renewcommand*{\hy@insteadofrefstepcounter}[1]{%
- \Hy@MakeCurrentHrefAuto{##1*}%
- \Hy@raisedlink{%
- \hyper@anchorstart{\@currentHref}\hyper@anchorend
- }%
- }%
- \fi
-}
-\AfterAtEndOfPackage{hyperref}{\scr@chapter@after@hyperref@patch}
-% \end{macrocode}
-% \end{macro}^^A \scr@after@hyperref@patch
-% \end{macro}^^A \scr@before@hyperref@patch
-% \end{macro}^^A \hy@insteadofrefstepcounter
-%
-% \begin{command}{\addparttocentry}
-% \changes{v3.08}{2010/11/01}{added}
-% We do not use \cs{addcontentsline} directly for the entries to the table of
-% contents. Using
-% \begin{quote}
-% \cs{addparttocentry}\marg{number}\marg{text}
-% \end{quote}
-% allows easy manipulation of such entries and additional actions. If the
-% \meta{number} is completely empty no number should be used. Internally the
-% generic \cs{addtocentrydefault} it used, which uses \cs{nonumberline}
-% instead of \cs{numberline} in this case. See \file{scrkernel-listsof.dtx}
-% for more information.
-% \begin{macrocode}
-\newcommand*{\addparttocentry}[2]{%
- \addtocentrydefault{part}{#1}{#2}%
-}
-% \end{macrocode}
-% \end{command}^^A \addparttocentry
-%
-%
-% \begin{command}{\part}
-% \changes{v3.18}{2015/05/23}{indirect definition}
-% \begin{macro}{\@part,\@spart,\@endpart}
-% \changes{v3.18}{2015/05/23}{indirect definition}
-% \begin{command}{\setpartpreamble}
-% \changes{v2.8f}{2001/07/12}{added}
-% \changes{v2.8p}{2001/09/27}{using \cs{use@preamble}}
-% \changes{v3.18}{2015/05/23}{indirect definition}
-% \begin{macro}{\part@preamble,\part@u@preamble}
-% \changes{v2.8p}{2001/09/27}{added}
-% \changes{v2.8p}{2001/09/27}{\cs{part@preamble} renamed to \cs{part@u@preamble}}
-% \changes{v3.12a}{2014/02/14}{name fixed}
-% \changes{v3.18}{2015/05/23}{indirect definition}
-% \begin{macro}{\part@o@preamble}
-% \changes{v2.8p}{2001/09/27}{added}
-% \changes{v3.12a}{2014/02/14}{name fixed}
-% \changes{v3.18}{2015/05/23}{indirect definition}
-% All these commands and macros are not defined explicitly but by using
-% \cs{DeclareSectionCommand} later. See also
-% \cs{scr@dsc@def@style@part@command} and \cs{setpartpreamble}.
-% \end{macro}^^A \part@o@preamble
-% \end{macro}^^A \part@u@preamble
-% \end{command}^^A \setpartpreamble
-% \end{macro}^^A \@part,\@spart,\@endpart
-% \end{command}^^A \part
-%
-% \begin{command}{\addpart}
-% \changes{v2.8c}{2001/06/29}{added}
-% \changes{v2.8d}{2001/07/05}{using \cs{partpagestyle}}
-% \changes{v2.95a}{2006/07/10}{support of preamble added}
-% \changes{v3.11b}{2012/07/29}{missing negativ \cs{vskip} added}
-% \changes{v3.13a}{2014/09/11}{using \cs{SecDef}}
-% \changes{v3.15a}{2015/01/22}{distance adaption}
-% \changes{v3.18}{2015/05/25}{redefinition}
-% \begin{macro}{\@addpart}
-% \changes{v2.8c}{2001/06/29}{added}
-% \changes{v2.8l}{2001/08/17}{first ToC then output}
-% \changes{v2.95}{2004/07/20}{support for running head}
-% \changes{v3.00}{2008/07/01}{\pkg{hyperref} workaround}
-% \changes{v3.08}{2010/11/02}{using \cs{addparttocentry}}
-% \changes{v3.10}{2011/08/30}{extended optional argument}
-% \changes{v3.10}{2011/08/30}{using \cs{@mkboth{}{}} if \cs{partmark} is
-% \cs{@gobble}}
-% \changes{v3.17}{2015/04/20}{using \cs{addpartmark} but never \cs{@mkboth}}
-% \changes{v3.18}{2015/05/25}{redefinition}
-% \begin{macro}{\@saddpart}
-% \changes{v2.8c}{2001/06/29}{added}
-% \changes{v3.18}{2015/05/25}{redefinition}
-% The improved not numbered version of \cs{part}. Note: This could also be
-% done using the extended optional argument of \cs{part} and option
-% \opt{nonumber=true}. So this command becomes more and more deprecated.
-% \begin{macrocode}
-\newcommand\addpart{%
- \SecDef\@addpart\@saddpart
-}
-\newcommand*{\@addpart}{}
-\long\def\@addpart[#1]#2{%
- \edef\reserved@a{%
- \unexpanded{%
- \part[{#1}]{#2}%
- \c@secnumdepth=
- }\the\c@secnumdepth\relax
- }%
- \c@secnumdepth=\numexpr \partnumdepth-1\relax
- \reserved@a
-}
-\newcommand{\@saddpart}[1]{%
- \part*{#1}%
- \addpartmark{}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@saddpart
-% \end{macro}^^A \@addpart
-% \end{command}^^A \addpart
-%
-%
-% \begin{macro}{\l@part}
-% \changes{v2.97c}{2007/06/21}{\cs{sectfont}\cs{large} replaced by font
-% element \fnt{partentry}}
-% \changes{v2.97c}{2007/06/21}{using font element \fnt{partentrypagenumber}}
-% \changes{v3.15}{2014/12/23}{using \cs{parttocdepth} and
-% \cs{scr@part@numwidth}}
-% \changes{v3.20}{2015/10/06}{replaced by usage of ToC style}
-% \begin{macro}{\scr@part@tocindent}
-% \changes{v3.15}{2014/12/02}{added}
-% \changes{v3.18}{2015/06/09}{indirect by \cs{DeclareSectionCommand}}
-% \end{macro}^^A \scr@part@tocindent
-% \begin{macro}{\scr@part@tocnumwidth}
-% \changes{v3.15}{2014/12/02}{added}
-% \changes{v3.18}{2015/06/09}{indirect by\cs{DeclareSectionCommand}}
-% These macros are not longer defined explicitly but by
-% \cs{DeclareTOCEntryStyle} and indirectly by \cs{DeclareSectionCommand}.
-% \end{macro}
-% \end{macro}^^A \l@part
-%
-%
-% \begin{counter}{part}
-% \begin{command}{\thepart}
-% \begin{command}{\partformat}
-% \changes{v2.3c}{1995/08/06}{auto dot feature}
-% \changes{v2.5f}{1999/02/14}{orphan spaces removed}
-% \changes{v2.7h}{2001/04/22}{missing backslash of \cs{autodot} fixed}
-% Because we don't use the default Arabic numbering, we still define the
-% counter for \cs{part}, it's printing and the formatting explicitly.
-% \begin{macrocode}
-\newcounter{part}
-\renewcommand*{\thepart}{\@Roman\c@part}
-\newcommand*{\partformat}{\partname~\thepart\autodot}
-% \end{macrocode}
-% \end{command}^^A \partformat
-% \end{command}^^A \thepart
-% \end{counter}{part}
-%
-%
-% \begin{command}{\partname}
-% \changes{v3.36}{2022/03/15}{explicit definition for English languages}
-% The name of a part used for the prefix line and maybe for the ToC entry.
-% \begin{macrocode}
-\newcommand*\partname{Part}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\partname{Part}
-% \end{macrocode}
-% \end{command}^^A \partname
-%
-%
-% \begin{command}{\partmark}
-% \changes{v2.9r}{2004/07/20}{added}
-% \changes{v3.18}{2015/05/24}{default changed from \cs{@gobble} to
-% \cs{@mkboth{}{}}}
-% Initially \cs{part} should simply empty the left and right mark if an
-% automatic running head is used. This is independent from the page style.
-% \begin{macrocode}
-\newcommand*{\partmark}[1]{\@mkboth{}{}}
-% \end{macrocode}
-% \end{command}^^A \partmark
-%
-% \begin{command}{\addpartmark}
-% \changes{v3.17}{2015/04/20}{added}
-% \changes{v3.18}{2015/05/24}{depends on \cs{partnumdepth}}
-% To be used to add the marks with \cs{addpart}. Locally we define
-% \cs{if@mainmatter}, because it makes life easier for users or package
-% authors, who (re-)define \cs{partmark}.
-% \begin{macrocode}
-\newcommand*\addpartmark[1]{%
- \begingroup
- \expandafter\let\csname if@mainmatter\expandafter\endcsname
- \csname iffalse\endcsname
- \c@secnumdepth=\numexpr \partnumdepth-1\relax
- \partmark{#1}%
- \endgroup
-}
-% \end{macrocode}
-% \end{command}^^A \addpartmark
-%
-%
-% \begin{command}{\raggedpart}
-% \changes{v2.95a}{2006/07/10}{added}
-% Style \texttt{part} does not use \cs{raggedsection} but
-% \cs{raggedpart}. However for \cls*{scrartcl} the default is the same. But
-% \cls*{scrbook} and \cls*{scrreprt} use \cs{centering} as default.
-% \begin{description}
-% \item[Note:] Because of using \cs{let} inside a class, \cs{raggedright}
-% should be without hyphenation when we define \cs{raggedpart}.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\raggedpart}{}
-%<article>\let\raggedpart\raggedsection
-%<report|book>\let\raggedpart\centering
-% \end{macrocode}
-% \end{command}
-%
-% \begin{fontelement}{partentry}
-% \changes{v2.97c}{2007/06/21}{added}
-% \changes{v3.06}{2010/06/09}{\fnt{sectioning} replaced by \fnt{disposition}}
-% \cs{part} entries to the table of contents are \cs{large}.
-% \begin{macrocode}
-\newkomafont{partentry}{\usekomafont{disposition}\large}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{partentrypagenumber}
-% \changes{v2.97c}{2007/06/21}{added}
-% The page number of the ToC entry should be unchanged.
-% \begin{macrocode}
-\newkomafont{partentrypagenumber}{}
-%</body>
-% \end{macrocode}
-% \end{fontelement}
-%
-%
-% \subsection{Chapters}
-%
-% Classes \cls*{scrbook} and \cls*{scrreprt} provide chapters. These are
-% realized by \cs{DeclareSectionCommand} and the \texttt{chapter} style. The
-% style is represented by \cs{scr@dsc@def@style@chapter@command} and several
-% helpers.
-% \begin{description}
-% \item[Note:] Package \pkg{hyperref} is not really compatible with
-% \KOMAScript{} classes, because it redefines \cs{@schapter} and
-% \cs{@chapter} incompatible. However, currently \KOMAScript{} has a build
-% in workaround for this. But this workaround itself depends on internal
-% code of \pkg{hyperref}. It would be better, if \pkg{hyperref} would
-% provide an interface for class authors and would redefine internal macros
-% of classes only as fallback if classes do not use this
-% interface. \KOMAScript{} also provides an alternative. \pkg*{hyperref}
-% could redefine a single command \cs{hy@insteadofrefstepcounter}.
-% \item[Note:] Any package, that changes internal macros like \cs{@chapter},
-% \cs{@schapter}, \cs{@makechapterhead}, \cs{@makeschapterhead} is
-% incompatible with \KOMAScript{} classes. Neither \KOMAScript{} nor the
-% \KOMAScript{} author is responsible for this. Package authors are welcome
-% to ask for interfaces they need, e.g., a good idea would be to define a
-% own headings style.
-% \end{description}
-%
-% \begin{option}{chapterprefix}
-% \changes{v2.8}{2001/06/15}{added}
-% \changes{v2.95c}{2006/08/21}{changed to \pkg{keyval} option}
-% \changes{v3.18}{2015/05/22}{option correlates with style not level}
-% \begin{macro}{\@chapterprefixtrue,\@chapterprefixfalse,\if@chapterprefix}
-% Initially \KOMAScript{} does not use the enormous chapter headings with
-% prefix line ``Chapter \meta{number}'' but a more subtle one. However, either
-% \opt{chapterprefix} or \opt{headings=twolinechapter} can be used to
-% reactivate the prefix line. The current setting is available via the boolean
-% switch \cs{if@chapterprefix}.
-% \begin{macrocode}
-%<*book|report>
-%<prepare>\newif\if@chapterprefix
-%<*option>
-\KOMA@key{chapterprefix}[true]{%
- \KOMA@set@ifkey{chapterprefix}{@chapterprefix}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@replacebool{.\KOMAClassFileName}%
- {chapterprefix}{@chapterprefix}%
- \KOMA@kav@remove{.\KOMAClassFileName}%
- {headings}{twolinechapter}%
- \KOMA@kav@remove{.\KOMAClassFileName}%
- {headings}{onelinechapter}%
- \KOMA@kav@xadd{.\KOMAClassFileName}%
- {headings}{%
- \if@chapterprefix twolinechapter\else onelinechapter\fi
- }%
- \fi
-}
-\KOMA@kav@add{.\KOMAClassFileName}{headings}{onelinechapter}%
-% \end{macrocode}
-% \begin{option}{nochapterprefix}
-% \changes{v2.8}{2001/06/15}{added}
-% \changes{v2.95c}{2006/08/21}{obsolete}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% Deprecated option for compatibility with \KOMAScript~2.9u only.
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{nochapterprefix}{chapterprefix=false}
-%</option>
-% \end{macrocode}
-% \end{option}^^A nochapterprefix
-% \end{macro}^^A \if@chapterprefix
-% \end{option}^^A chapterprefix
-%
-%
-% \begin{option}{appendixprefix}
-% \changes{v2.8}{2001/06/15}{added}
-% \changes{v2.95c}{2006/08/21}{re-implementation as \pkg{keyval} option}
-% \changes{v3.12}{2013/03/05}{usage of \cs{FamilyKeyState}}
-% \changes{v3.17}{2015/03/09}{internal value storage}
-% \changes{v3.34}{2021/04/30}{usage of \LaTeX{} hook, if available}
-% \changes{v3.34}{2021/04/30}{new value \opt{\quotechar=default} with \LaTeX{}
-% hooks}
-% If the appendix chapters should be with or without prefix line independent
-% from the chapters of the main part, option \opt{appendixprefix} can be
-% used. This does not set up a new boolean but just activates or deactivates
-% the boolean for chapters inside \cs{appendix}. From \KOMAScript{} v3.34 and
-% \LaTeX{} 2020/10/01 this is done using a new \LaTeX{} hook. Otherwise still
-% \cs{appendixmore} is used. Default is, using the settings for chapters.
-% \begin{macrocode}
-%<*option>
-\IfLTXAtLeastTF{2020/10/01}{%
- \KOMA@key{appendixprefix}[true]{%
- \Ifstr{#1}{default}{%
- \KOMA@kav@removekey{.\KOMAClassFileName}{appendixprefix}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{twolineappendix}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{onelineappendix}%
- \IfHookEmptyTF{\KOMAClassName/appendix}{}{%
- \RemoveFromHook{\KOMAClassName/appendix}[appendixprefix]%
- }%
- \FamilyKeyStateProcessed
- }{%
- \KOMA@set@ifkey{appendixprefix}{@tempswa}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.\KOMAClassFileName}{appendixprefix}{#1}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{twolineappendix}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{onelineappendix}%
- \IfHookEmptyTF{\KOMAClassName/appendix}{}{%
- \RemoveFromHook{\KOMAClassName/appendix}[appendixprefix]%
- }%
- \if@tempswa
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{twolineappendix}%
- \AddToHook{\KOMAClassName/appendix}[appendixprefix]%
- {\@chapterprefixtrue}%
- \else
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{onelineappendix}%
- \AddToHook{\KOMAClassName/appendix}[appendixprefix]%
- {\@chapterprefixfalse}%
- \fi
- \fi
- }%
- }%
-}{%
- \KOMA@key{appendixprefix}[true]{%
- \KOMA@set@ifkey{appendixprefix}{@tempswa}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.\KOMAClassFileName}{appendixprefix}{#1}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{twolineappendix}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{onelineappendix}%
- \if@tempswa
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{twolineappendix}%
- \@ifundefined{appendixmore}{%
- \def\appendixmore{\@chapterprefixtrue}%
- }{%
- \l@addto@macro\appendixmore{\@chapterprefixtrue}%
- }%
- \else
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{onelineappendix}%
- \@ifundefined{appendixmore}{%
- \def\appendixmore{\@chapterprefixfalse}%
- }{%
- \l@addto@macro\appendixmore{\@chapterprefixfalse}%
- }%
- \fi
- \fi
- }%
-}
-% \end{macrocode}
-% \begin{option}{noappendixprefix}
-% \changes{v2.8}{2001/06/15}{added}
-% \changes{v2.95c}{2006/08/21}{obsolete}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{noappendixprefix}{appendixprefix=false}
-%</option>
-% \end{macrocode}
-% \end{option}^^A noappendixprefix
-% \end{option}^^A appendixprefix
-%
-%
-% \begin{fontelement}{chapter}
-% \changes{v2.8o}{2001/09/14}{added}
-% \changes{v2.96a}{2006/12/02}{undocumented support for last macro expects an
-% argument}
-% \begin{fontelement}{chapterprefix}
-% \changes{v2.8o}{2001/09/14}{added by macro}
-% \changes{v2.96a}{2006/12/02}{added}
-% Definition of the font elements used by \cs{chapter}. The settings are done
-% by option \opt{headings} later. Everything is prepared before this option
-% is used the first time. The manual definition is used, because of
-% compatibility with \KOMAScript{} 2.9u. However, using the old macros is
-% deprecated and not supported any longer.
-% \begin{macrocode}
-%<*prepare>
-\newcommand*{\size@chapter}{}
-\newcommand*{\scr@fnt@chapter}{\size@chapter}
-\newcommand*{\size@chapterprefix}{\size@chapter}
-\newcommand*{\scr@fnt@chapterprefix}{\size@chapterprefix}
-%</prepare>
-% \end{macrocode}
-% \end{fontelement}^^A chapterprefix
-% \end{fontelement}^^A chapter
-%
-%
-% \begin{command}{\chapterheadstartvskip}
-% \changes{v3.15}{2014/11/24}{defining and using \cs{scr@chapter@beforeskip}}
-% \begin{command}{\chapterheadmidvskip}
-% \changes{v3.15}{2014/11/20}{added}
-% \changes{v3.17}{2015/03/25}{defining and using \cs{scr@chapter@innerskip}}
-% \begin{command}{\chapterheadendvskip}
-% \changes{v3.11c}{2013/02/13}{\cs{chapterheadstartvskip} and
-% \cs{chapterheadendvskip} removed from \cls*{scrartcl}}
-% \changes{v3.15}{2014/11/24}{defining and using \cs{scr@chapter@afterskip}}
-% \changes{v3.15}{2014/12/10}{\cs{vspace} replaced by \cs{vskip} because of
-% \cs{lastskip}}
-% These commands are the distance before a chapter heading, between the
-% prefix line and the text line of the heading and after the chapter heading.
-% \cs{chapterheadmidvskip} is only used with option \opt{chapterprefix}
-% resp. \opt{headings=twolinechapter}.
-%
-% \begin{macro}{\scr@chapter@sectionbeforeskip,\scr@chapter@beforeskip}
-% \changes{v3.15}{2014/11/24}{added}
-% \changes{v3.17}{2015/03/25}{\cs{scr@chapter@sectionbeforeskip} renamed to
-% \cs{scr@chapter@beforeskip}}
-% \begin{macro}{\scr@chapter@innerskip}
-% \changes{v3.17}{2015/03/25}{added}
-% \begin{macro}{\scr@chapter@sectionafterskip,\scr@chapter@afterskip}
-% \changes{v3.15}{2014/11/24}{added}
-% \changes{v3.17}{2015/03/25}{\cs{scr@chapter@sectionafterskip} renamed to
-% \cs{scr@chapter@afterskip}}
-% \begin{macro}{\scr@chapter@sectionindent}
-% \changes{v3.15}{2014/11/24}{added}
-% \changes{v3.17}{2015/04/24}{removed}
-% \end{macro}^^A \scr@chapter@sectionindent
-% \begin{macro}{\scr@chapter@style}
-% \changes{v3.15}{2014/11/24}{added}
-% All the skips and the page style are used by \cs{DeclareSectionCommand}
-% resp. the style \texttt{chapter}. We define it as early as possible. Even the
-% style of \cs{chapter} is already defined here.
-% \begin{description}
-% \item[ToDo:] Do we need them in the \texttt{prepare} run or can we move then
-% even to the \texttt{body} run?
-% \item[ToDo:] Do we really need to define \cs{scr@chapter@style}?
-% \end{description}
-% \begin{macrocode}
-%<*prepare>
-\newcommand*{\scr@chapter@beforeskip}{\z@}
-\let\scr@chapter@beforeskip\z@
-\newcommand*{\scr@chapter@afterskip}{\z@}
-\let\scr@chapter@afterskip\z@
-\newcommand*{\scr@chapter@innerskip}{\z@}
-\let\scr@chapter@innerskip\z@
-\newcommand*{\scr@chapter@style}{chapter}
-% \end{macrocode}
-% \end{macro}^^A \scr@chapter@style
-% \end{macro}^^A \scr@chapter@afterskip
-% \end{macro}^^A \scr@chapter@innerskip
-% \end{macro}^^A \scr@chapter@beforeskip
-% \begin{macrocode}
-\newcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}
-\newcommand*{\chapterheadendvskip}{\vskip\@tempskipa}
-\newcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa}
-%</prepare>
-% \end{macrocode}
-% \end{command}^^A \chapterheadendvskip
-% \end{command}^^A \chapterheadmidvskip
-% \end{command}^^A \chapterheadstartvskip
-%
-%
-% \begin{macro}{\scr@startchapter}
-% \changes{v3.18}{2015/05/22}{added}
-% \changes{v3.19}{2015/08/25}{ignore empty page styles}
-% The macro
-% \begin{quote}
-% \cs{scr@startchapter}\marg{chapter command name}
-% \end{quote}
-% is now part of the style \texttt{chapter}. However, the main parts
-% of the code are from the original definition of \cs{chapter}. It has only one
-% argument: The name of the chapter command, i.e., \texttt{chapter}. All
-% arguments to the part command will be processed later.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\scr@startchapter}[1]{%
- \ExecuteDoHook{heading/preinit/#1}%
- \if@openright\cleardoublepage\else\clearpage\fi
- \scr@ifundefinedorrelax{#1pagestyle}{}{%
- \Ifstr{#1pagestyle}{}{}{%
- \thispagestyle{\@nameuse{#1pagestyle}}%
- }%
- }%
- \global\@topnum\z@
- \@ifundefined{scr@#1@afterindent}{\@afterindentfalse}{%
- \csname scr@#1@afterindent\endcsname
- {\@afterindenttrue}{\@afterindentfalse}{%
- \@afterindenttrue
- \@ifundefined{scr@#1@beforeskip}{\@afterindentfalse}{%
- \ifdim\glueexpr\@nameuse{scr@#1@beforeskip}\relax<\z@
- \@afterindentfalse
- \fi
- }%
- }%
- }%
- \ExecuteDoHook{heading/postinit/#1}%
- \expandafter\SecDef\csname @#1\expandafter\endcsname\csname @s#1\endcsname
-}
-% \end{macrocode}
-%
-% \begin{macro}{\scr@@startchapter}
-% \changes{v3.18}{2015/05/22}{added}
-% The macro
-% \begin{quote}
-% \cs{scr@@startchapter}\marg{chapter command name}\oarg{extended optional
-% argument}\marg{chapter heading}
-% \end{quote}
-% is now part of the style \texttt{chapter}. However, the main parts
-% of the code are from the original definition of \cs{@chapter}. Therefore it
-% has the mandatory and optional arguments of a non-star variant of, i.e.,
-% \cs{chapter} but an additional first argument.
-% \begin{description}
-% \item[Note:] \meta{extended optional argument} is named as optional, however
-% here it is already mandatory, because it is a delimited argument.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\scr@@startchapter}{}
-\def\scr@@startchapter#1[#2]#3{%
- \ExecuteDoHook{heading/branch/nostar/#1}%
-% \end{macrocode}
-% \changes{v3.10}{2011/08/30}{extended optional argument}
-% \changes{v3.27}{2019/07/08}{option \opt{nonumber} added}
-% First of all, depending in \opt{headings=optionto\dots} we have different
-% defaults for the options.
-% \begin{macrocode}
- \ifnum \scr@osectarg=\z@
- \@scr@tempswafalse
- \else
- \scr@istest#2=\@nil
- \fi
- \@currentusenumbertrue
- \if@scr@tempswa
- \setkeys{KOMAarg.section}{tocentry={#3},head={#3},reference={#3},#2}%
- \else
- \ifcase \scr@osectarg\relax
- \setkeys{KOMAarg.section}{tocentry={#2},head={#2},reference={#2}}%
- \or
- \setkeys{KOMAarg.section}{tocentry={#3},head={#2},reference={#3}}%
- \or
- \setkeys{KOMAarg.section}{tocentry={#2},head={#3},reference={#2}}%
- \or
- \setkeys{KOMAarg.section}{tocentry={#2},head={#2},reference={#2}}%
- \fi
- \fi
-% \end{macrocode}
-% \changes{v2.8e}{2001/07/10}{using \cs{@maybeautodot}}
-% \changes{v3.08}{2010/11/01}{using \cs{addchaptertocentry}}
-% \changes{v3.18}{2015/05/20}{using \cs{add\meta{name}tocentry}}
-% \changes{v3.18}{2015/05/22}{using \meta{name} instead of \cs{@chapapp}
-% in \cs{typeout}}
-% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to
-% \cs{Ifnumbered}}
-% For numbered headings we have to increase the counter and write a process
-% information to the \file{log} and the terminal.
-% \begin{macrocode}
- \Ifnumbered{#1}{%
-%<book> \if@mainmatter
- \@tempswatrue
-%<book> \else\@tempswafalse\fi
- }{\@tempswafalse}%
- \if@tempswa
- \refstepcounter{#1}%
- \expandafter\@maybeautodot\csname the#1\endcsname
- \typeout{#1 \csname the#1\endcsname.}%
- \ifx\@currenttocentry\@empty\else
-% \end{macrocode}
-% \changes{v3.31}{2020/06/06}{using \cs{\dots tocformat}}%
-% \begin{description}
-% \item[ToDo]: Move \cs{autodot} to the definition of \cs{\dots tocformat}.
-% \end{description}
-% \begin{macrocode}
- \@ifundefined{#1tocformat}{%
- \expandafter\gdef\csname #1tocformat\endcsname
- {\csname the#1\endcsname}%
- }{}%
- \scr@ifundefinedorrelax{add#1tocentry}{%
- \addtocentrydefault{#1}%
- }{%
- \@nameuse{add#1tocentry}%
- }{\csname\@ifundefined{#1tocformat}{the#1}{#1tocformat}\endcsname}%
- {\@currenttocentry}%
- \fi
- \else
-% \end{macrocode}
-% For not numbered headings we still have to process the reset list of the
-% counter and write a process information to the \file{log} and the terminal.
-% \begin{macrocode}
- \expandafter\ifnum\scr@v@is@lt{3.15}\relax\else
- \begingroup
- \let\@elt\@stpelt
- \csname cl@#1\endcsname
- \endgroup
- \fi
- \typeout{#1 without number}%
- \ifx\@currenttocentry\@empty\else
-% \end{macrocode}
-% And before writing a not numbered entry to the table of contents we have to
-% execute also the \pkg{hyperref} hook \cs{hy@insteadofrefstepcounter}.
-% \begin{description}
-% \item[Note:] \pkg*{scrhack} uses the existence of this command to detect a
-% \KOMAScript{} class. Shouldn't this be changed using, e.g.,
-% \cs{KOMAClassName}?
-% \end{description}
-% \begin{macrocode}
- \hy@insteadofrefstepcounter{#1}%
- \scr@ifundefinedorrelax{add#1tocentry}{%
- \addtocentrydefault{#1}%
- }{%
- \@nameuse{add#1tocentry}%
- }{}{\@currenttocentry}%
- \fi
- \fi
-% \end{macrocode}
-% Set the mark for the running head. Here we have to do a one step expansion
-% of \cs{@currentheadentry}, because otherwise it would change with every
-% \cs{section}, \cs{subsection} \dots
-% \begin{macrocode}
- \csname #1mark\expandafter\endcsname\expandafter{\@currentheadentry}%
-% \end{macrocode}
-% \changes{v2.8g}{2001/07/18}{support for \cs{float@addtolists}}
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by \cs{Iftocfeature}}
-% Depending on feature \texttt{chapteratlist} we have to add a vertical space
-% to other directories. And for compatibility we also support the deprecated
-% \cs{float@addtolists} but not without warning.
-% \begin{description}
-% \item[ToDo:] Why do we add the gap here but also use \cs{addctontentsline}
-% in \cs{addchaptertocentry}? Is this a bug? Should this be standardized?
-% \end{description}
-% \begin{macrocode}
- \ifdim \@chapterlistsgap>\z@
- \doforeachtocfile{%
- \Iftocfeature{\@currext}{chapteratlist}{%
- \addtocontents{\@currext}{\protect\addvspace{\@chapterlistsgap}}%
- }{}%
- }%
- \@ifundefined{float@addtolists}{}{%
- \scr@float@addtolists@warning
- \float@addtolists{\protect\addvspace{\@chapterlistsgap}}%
- }%
- \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}}
-% Setting the heading itself is more or less a call of \cs{@make\meta{command
-% name}head}.
-% \begin{description}
-% \item[ToDo:] Using \cs{scr@makechapterhead}\marg{command name} would be the
-% better solution. However in this case, every redefinition of
-% \cs{@makechapterhead} would be ignored. So currently we support such
-% deprecated redefinition of internal macro \cs{@makechapterhead} for
-% \cs{chapter}. But this will be changed in future.
-% \end{description}
-% \begin{macrocode}
- \scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d{#1}%
- \if@twocolumn
- \if@at@twocolumn
- \@nameuse{@make#1head}{#3}%
- \else
- \@topnewpage[\@nameuse{@make#1head}{#3}]%
- \fi
- \else
- \@nameuse{@make#1head}{#3}%
- \fi
-% \end{macrocode}
-% \changes{v3.18}{2015/05/21}{always using \cs{@afterheading}}
-% And finally the end of every outline command.
-% \begin{macrocode}
- \@afterheading
-}
-% \end{macrocode}
-% \begin{macro}{\scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d}
-% \changes{v3.36}{2022/03/16}{added}
-% The test and warning used inside \cs{scr@@startchapter}.
-% \begin{macrocode}
-\expandafter\ifnum\scr@v@is@ge{3.36}%
- \newcommand*{\scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d}[1]{%
- \Ifstr{#1}{chapter}{%
- \begingroup
- \def\reserved@a{\scr@makechapterhead{chapter}}%
- \ifx\@makechapterhead\reserved@a\else
- \ClassWarningNoLine{\KOMAClassName}{%
- Redefinition of \string\@makechapterhead\space detected.\MessageBreak
- Note: KOMA-Script does use styles for commands like\MessageBreak
- \string\chapter. Currently it internally still provides and\MessageBreak
- uses \string\@makechapterhead, but a completely different\MessageBreak
- definition compared to the standard classes.\MessageBreak
- So redefining or using internal \string\@makechapterhead\MessageBreak
- by users or package authors may already break\MessageBreak
- KOMA-Script and will not work with a coming version,\MessageBreak
- that will remove this deprecated code}%
- \let\scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d\@gobbble
- \fi
- \endgroup
- }{}%
- }
-\else
- \let\scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d\@gobble
-\fi
-% \end{macrocode}
-% \end{macro}^^A \scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d
-% \end{macro}^^A \scr@@startchapter
-%
-% \begin{macro}{\scr@@startschapter}
-% \changes{v3.18}{2015/05/22}{added}
-% The macro
-% \begin{quote}
-% \cs{scr@@startschapter}\marg{chapter command name}\marg{chapter heading}
-% \end{quote}
-% is now part of the style \texttt{chapter}. However, the main parts
-% of the code are from the original definition of \cs{@schapter}. Therefore it
-% has the mandatory argument of a star variant of, i.e., \cs{chapter} but an
-% additional first argument.
-% \begin{macrocode}
-\newcommand*{\scr@@startschapter}[2]{%
- \ExecuteDoHook{heading/branch/star/#1}%
-% \end{macrocode}
-% Some users don't learn to use \cs{addchapter} for not numbered parts with
-% entry to the table of contents but insist in using
-% \cs{addcontentsline}. Despite this should not be used, because at least
-% \cs{addchaptertocentry} should be used, we tolerate this by using our
-% \pkg{hyperref} hook.
-% \begin{description}
-% \item[ToDo:] I don't understand why \pkg{hyperref} uses a group here and
-% locally sets \cs{@mkboth} to \cs{@gobbletwo}. However, I've copied this.
-% \end{description}
-% \begin{macrocode}
- \begingroup
- \let\@mkboth\@gobbletwo
- \hy@insteadofrefstepcounter{#1}%
- \endgroup
-% \end{macrocode}
-% Setting the heading itself is more or less a call of \cs{@makes\meta{command
-% name}head}.
-% \begin{description}
-% \item[ToDo:] Using \cs{scr@makeschapterhead}\marg{command name} would be the
-% better solution. However in this case, every redefinition of
-% \cs{@makeschapterhead} would be ignored. So currently we support such
-% deprecated redefinition of internal macro \cs{@makeschapterhead} for
-% \cs{chapter}. But this will be changed in future.
-% \end{description}
-% \begin{macrocode}
- \scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d{#1}%
- \if@twocolumn
- \if@at@twocolumn
- \@nameuse{@makes#1head}{#2}%
- \else
- \@topnewpage[\@nameuse{@makes#1head}{#2}]%
- \fi
- \else
- \@nameuse{@makes#1head}{#2}%
- \fi
-% \end{macrocode}
-% \changes{v3.18}{2015/05/21}{always using \cs{@afterheading}}
-% And finally the end of every outline command.
-% \begin{macrocode}
- \@afterheading
-}
-% \end{macrocode}
-% \begin{macro}{\scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d}
-% \changes{v3.36}{2022/03/16}{added}
-% The test and warning used inside \cs{scr@@startschapter}.
-% \begin{macrocode}
-\expandafter\ifnum\scr@v@is@ge{3.36}%
- \newcommand*{\scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d}[1]{%
- \Ifstr{#1}{chapter}{%
- \begingroup
- \def\reserved@a{\scr@makeschapterhead{chapter}}%
- \ifx\@makeschapterhead\reserved@a\else
- \ClassWarningNoLine{\KOMAClassName}{%
- Redefinition of \string\@makeschapterhead\space detected.\MessageBreak
- Note: KOMA-Script does use styles for commands like\MessageBreak
- \string\chapter. Currently it internally still provides and\MessageBreak
- uses \string\@makeschapterhead, but a completely different\MessageBreak
- definition compared to the standard classes.\MessageBreak
- So redefining or using internal \string\@makeschapterhead\MessageBreak
- by users or package authors may already break\MessageBreak
- KOMA-Script and will not work with a coming version,\MessageBreak
- that will remove this deprecated code}%
- \let\scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d\@gobble
- \fi
- \endgroup
- }{}%
- }
-\else
- \let\scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d\@gobble
-\fi
-% \end{macrocode}
-% \end{macro}^^A \scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d
-% \end{macro}^^A \scr@@startschapter
-%
-%% \begin{macro}{\@at@twocolumntrue,\@at@twocolumnfalse,\if@at@twocolumn}
-% \changes{v2.7b}{2001/01/05}{added}
-% \begin{macro}{\scr@topnewpage}
-% \changes{v2.7b}{2001/01/05}{added}
-% \changes{v2.8q}{2001/11/27}{braces fixed}
-% \begin{macro}{\@topnewpage}
-% \changes{v2.7b}{2001/01/05}{added}
-% \changes{v2.7g}{2001/04/17}{missing \cs{long} added}
-% In the code above we use \cs{if@at@twocolumn} to detect, if we already
-% inside the optional argument of \cs{twocolumn}. A clean definition of this
-% feature would redefine \LaTeX{} command \cs{twocolumn}. Here we use the ugly
-% hack to redefine the internal macro \cs{@topnewpage} of the \LaTeX{} kernel
-% instead. This macro is used to print the optional argument. So we can add
-% switching on and of the boolean switch before and after it. With this,
-% packages can simply use chapter commands also inside the optional argument
-% of \cs{twocolumn} instead of need to use an internal command like
-% \cs{@makechapterhead}.
-% \begin{macrocode}
-\newif\if@at@twocolumn
-\newcommand*\scr@topnewpage{}
-\let\scr@topnewpage\@topnewpage
-\long\def\@topnewpage[#1]{%
- \@at@twocolumntrue\scr@topnewpage[{#1}]\@at@twocolumnfalse
-}
-% \end{macrocode}
-% \end{macro}^^A \@topnewpage
-% \end{macro}^^A \scr@topnewpage
-% \end{macro}^^A \if@at@twocolumn
-%
-% \begin{macro}{\scr@makechapterhead}
-% \changes{v2.7b}{2001/01/05}{support for chapter preamble}
-% \changes{v2.8p}{2001/09/25}{support for different kinds of preambles}
-% \changes{v3.15}{2014/12/10}{\cs{nobreak} removed}
-% \changes{v3.18}{2015/05/22}{added}
-% \begin{macro}{\scr@@makechapterhead}
-% \changes{v3.18}{2015/05/22}{added}
-% \changes{v2.8q}{2002/04/18}{\cs{raggedsection} also for the prefix}
-% \changes{v2.9p}{2003/06/28}{setting \cs{parfillskip} to \cs{fill}}
-% \changes{v2.96a}{2006/12/02}{distance after the prefix line only if prefix line}
-% \changes{v2.97b}{2007/03/09}{\cs{endgraf} fixed}
-% \changes{v3.15}{2014/11/20}{re-implementation}
-% \changes{v3.15}{2014/12/09}{\cs{raggedchapter} replaced by \cs{raggedsection}}
-% \changes{v3.17}{2015/04/03}{using \cs{usefontofkomafont} for initial font
-% changed}
-% Macros
-% \begin{quote}\raggedright
-% \cs{scr@makechapterhead}\marg{chapter command name}\marg{heading}\\
-% \cs{scr@@makechapterhead}\marg{chapter command name}\marg{heading}
-% \end{quote}
-% are used inside the definition of style \texttt{chapter} and replace
-% \cs{@makechapterhead} resp. \cs{@@makechapterhead} there. So they have one
-% more argument than \cs{@makechapterhead} of the standard classes.
-% \begin{macrocode}
-\newcommand*{\scr@makechapterhead}[2]{%
- \use@chapter@o@preamble{#1}%
- \@nameuse{@@make#1head}{#2}%
- \use@preamble{#1@u}%
-}
-\newcommand*{\scr@@makechapterhead}[2]{%
-% \end{macrocode}
-% \changes{v3.22}{2016/12/21}{\cs{@afterindentrue} if \opt{beforeskip} is
-% positive}
-% \changes{v3.26}{2018/09/18}{using \opt{afterindent}}
-% Depending on \opt{afterindent} we set \cs{if@afterindent} and set the
-% initial vertical skip using \cs{@tempskipa} and \cs{chapterheadstartvskip}.
-% \begin{macrocode}
- \@tempskipa=\glueexpr \csname scr@#1@beforeskip\endcsname\relax\relax
- \csname scr@#1@afterindent\endcsname
- {\@afterindenttrue}{\@afterindentfalse}{%
- \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\else
- \expandafter\ifnum\scr@v@is@ge{3.22}\@afterindenttrue\fi
- \fi
- }%
- \chapterheadstartvskip
-% \end{macrocode}
-% \changes{v3.19}{2015/08/02}{using \cs{chapterlinesformat} and
-% \cs{chapterlineswithprefixformat}}
-% \changes{v3.19}{2015/08/02}{using font element \fnt{disposition} instead of
-% \cs{sectfont}}
-% \changes{v3.19a}{2015/10/03}{missing local definition of \cs{IfUseNumber}
-% added}
-% \changes{v3.20}{2015/12/23}{setting \cs{parfillskip} to \texttt{\cs{z@} plus
-% 1fil}}
-% \changes{v3.27}{2019/02/02}{setting of \cs{parindent} and \cs{parfillskip}
-% moved}
-% \changes{v3.27}{2019/02/02}{\cs{ExecuteDoHook} added}
-% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to
-% \cs{Ifnumbered}}
-% For the heading itself a group is used. Using group braces instead of
-% \cs{begingroup} makes it possible to do a very ugly hack inside a
-% redefinition of \cs{chapterheadstartvskip}. Nevertheless, such hacks are not
-% recommended.
-% \begin{macrocode}
- {%
- \def\IfUseNumber{\Ifnumbered{#1}}%
-%<book> \if@mainmatter\else\let\IfUseNumber\@secondoftwo\fi
- \ExecuteDoHook{heading/begingroup/#1}%
- \if@chapterprefix
- \let\IfUsePrefixLine\@firstoftwo
- \else
- \let\IfUsePrefixLine\@secondoftwo
- \fi
- \setlength{\parindent}{\z@}\setlength{\parfillskip}{\z@ plus 1fil}%
- \normalfont\usekomafont{disposition}{%
- \usekomafont{#1}{%
- \settoheight{\@tempskipa}{%
- {\usekomafont{#1prefix}{%
- \vrule \@width\z@ \@height\csname scr@#1@innerskip\endcsname}}%
- }%
- \raggedchapter
- \IfUseNumber{%
- \IfUsePrefixLine{%
- \chapterlineswithprefixformat{#1}%
- {{\usekomafont{#1prefix}{\csname #1format\endcsname%
- \setlength{\@tempskipa}{\csname scr@#1@innerskip\endcsname}%
- \chapterheadmidvskip}}}%
- {\interlinepenalty \@M#2\@@par}%
- }{%
- \chapterlinesformat{#1}%
- {\csname #1format\endcsname}%
- {\interlinepenalty \@M#2\@@par}%
- }%
- }{%
- \IfUsePrefixLine{%
- \chapterlineswithprefixformat{#1}%
- {}%
- {\interlinepenalty \@M#2\@@par}%
- }{%
- \chapterlinesformat{#1}%
- {}%
- {\interlinepenalty \@M#2\@@par}%
- }%
- }%
- }%
- }%
- \ExecuteDoHook{heading/endgroup/#1}%
- }%
- \nobreak\par\nobreak
-% \end{macrocode}
-% \changes{v3.26}{2018/09/20}{no absolute value}
-% Last but not least the final skip.
-% \begin{description}
-% \item[Note:] \cs{@afterheading} will be added by \cs{scr@@startchapter}.
-% \end{description}
-% \begin{macrocode}
- \@tempskipa=\glueexpr \csname scr@#1@afterskip\endcsname\relax\relax
- \chapterheadendvskip
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@makechapterhead
-% \end{macro}^^A \scr@@makechapterhead
-%
-% \begin{macro}{\scr@makeschapterhead}
-% \changes{v3.18}{2015/05/22}{added}
-% \begin{macro}{\scr@@makeschapterhead}
-% \changes{v2.9p}{2003/06/28}{to \cs{parfillskip} to \cs{fill}}
-% \changes{v2.9q}{2004/03/24}{same braces like \cs{@@makechapterhead}}
-% \changes{v3.15}{2014/12/09}{\cs{raggedchapter} replaced by
-% \cs{raggedsection}}
-% \changes{v3.18}{2015/05/22}{added}
-% \changes{v3.19}{2015/08/02}{same changes like \cs{scr@@makechapterhead}}
-% \changes{v3.20}{2015/12/23}{setting \cs{parfillskip} to \texttt{\cs{z@} plus
-% 1fil}}
-% \changes{v3.25}{2017/09/07}{\cs{IfUseNumber} fixed}
-% \changes{v3.26}{2018/09/20}{no absolute of \opt{afterskip}}
-% Macros
-% \begin{quote}\raggedright
-% \cs{scr@makeschapterhead}\marg{chapter command name}\marg{heading}\\
-% \cs{scr@@makeschapterhead}\marg{chapter command name}\marg{heading}
-% \end{quote}
-% are used inside the definition of style \texttt{chapter} and replace
-% \cs{@makeschapterhead} resp. \cs{@@makeschapterhead} there. So they have one
-% more argument than \cs{@makeschapterhead} of the standard classes.
-% \begin{macrocode}
-\newcommand*{\scr@makeschapterhead}[2]{%
- \use@chapter@o@preamble{#1}%
- \@nameuse{@@makes#1head}{#2}%
- \use@preamble{#1@u}%
-}
-\newcommand*{\scr@@makeschapterhead}[2]{%
-% \end{macrocode}
-% \changes{v3.22}{2016/12/21}{\cs{@afterindentrue} if positive
-% \opt{beforeskip}}
-% \changes{v3.26}{2018/09/18}{supporting \opt{afterindent}}
-% This is a simplified version of \cs{scr@@makechapterhead}.
-% \begin{macrocode}
- \@tempskipa=\glueexpr \csname scr@#1@beforeskip\endcsname\relax\relax
- \csname scr@#1@afterindent\endcsname
- {\@afterindenttrue}{\@afterindentfalse}{%
- \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\else
- \expandafter\ifnum\scr@v@is@ge{3.22}\@afterindenttrue\fi
- \fi
- }%
- \chapterheadstartvskip
- {%
- \let\IfUseNumber\@secondoftwo
- \ExecuteDoHook{heading/begingroup/#1}%
- \if@chapterprefix
- \let\IfUsePrefixLine\@firstoftwo
- \else
- \let\IfUsePrefixLine\@secondoftwo
- \fi
- \setlength{\parindent}{\z@}\setlength{\parfillskip}{\z@ plus 1fil}%
- \normalfont\usekomafont{disposition}{%
- \usekomafont{#1}{%
- \raggedchapter
- \IfUsePrefixLine{%
- \chapterlineswithprefixformat{#1}%
- {}%
- {\interlinepenalty \@M#2\@@par}%
- }{%
- \chapterlinesformat{#1}%
- {}%
- {\interlinepenalty \@M#2\@@par}%
- }%
- }%
- }%
- \ExecuteDoHook{heading/endgroup/#1}%
- }%
- \nobreak\par\nobreak
- \@tempskipa=\glueexpr \csname scr@#1@afterskip\endcsname\relax\relax
- \chapterheadendvskip
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@@makeschapterhead
-% \end{macro}^^A \scr@makeschapterhead
-%
-% \begin{command}{\chapterlinesformat,\chapterlineswithprefixformat}
-% \changes{v3.19}{2015/08/02}{added}
-% Commands
-% \begin{quote}\raggedright
-% \cs{chapterlinesformat}\marg{command name}\marg{number}\marg{text}\\
-% \cs{chapterlineswithprefixformat}\marg{command name}\marg{number}\marg{text}
-% \end{quote}
-% are used to print a chapter heading either a free standing one or a free
-% stranding one with prefix line. \meta{number} is the completely formatted
-% prefix line inclusive the vertical distance below. The \meta{text} is the
-% text of the heading also formatted and with final \cs{@@par}. But if the
-% user used more paragraphs than this is final one, the user is responsible to
-% prevent page breaks!
-% \begin{macrocode}
-\newcommand{\chapterlinesformat}[3]{%
- \@hangfrom{#2}{#3}%
-}
-\newcommand{\chapterlineswithprefixformat}[3]{%
- #2#3%
-}
-% \end{macrocode}
-% \end{command}^^A \chapterlinesformat,\chapterlineswithprefixformat
-%
-% \begin{macro}{\use@chapter@o@preamble}
-% \changes{v3.15}{2014/12/08}{distances adapted}
-% \changes{v3.15a}{2015/02/02}{avoiding \texttt{overfull \cs{vbox}}}
-% \changes{v3.18}{2015/05/20}{using command depending distances and warnings}
-% \changes{v3.18}{2015/05/22}{has an argument and prints the preamble of the
-% command instead of the style}
-% Used by \cs{scr@makechapterhead} and \cs{scr@makeschapterhead} to set the
-% preamble above chapter headings.
-% \begin{macrocode}
-\newcommand*{\use@chapter@o@preamble}[1]{%
- {%
- \settoheight{\@tempdima}{%
- \@tempskipa=\glueexpr \csname scr@#1@beforeskip\endcsname\relax\relax
- \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi
- \vbox{\chapterheadstartvskip}%
- }%
- \settodepth{\@tempdimb}{%
- \@tempskipa=\glueexpr \csname scr@#1@beforeskip\endcsname\relax\relax
- \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi
- \vbox{\chapterheadstartvskip}%
- }%
- \addtolength{\@tempdima}{\@tempdimb}%
- \setbox\z@\vbox{%
- \use@preamble{#1@o}%
- }%
- \setlength{\@tempdimb}{\ht0}%
- \addtolength{\@tempdimb}{\dp0}%
- \vbox to \z@{%
- \vskip-\baselineskip
- \vbox to \@tempdima{%
- \vfill
- \box\z@
- }%
- \vss
- }\vskip-\parskip\vskip-\baselineskip
- \ifdim \@tempdimb>\@tempdima%
- \addtolength{\@tempdimb}{-\@tempdima}%
- \ifdim\@tempdimb<\vfuzz
- \ClassInfo{\KOMAClassName}{%
- preamble before #1 is \the\@tempdimb\space to high.\MessageBreak
- Tolerated without warning because of\MessageBreak
- \string\vfuzz\space = \the\vfuzz\space >= \the\@tempdimb
- }%
- \else
- \ClassWarning{\KOMAClassName}{%
- preamble before #1 is \the\@tempdimb\space to high.\MessageBreak
- To avoid the overfull \string\vbox\space you may
- change\MessageBreak
- the `beforeskip' value using
- \string\RedeclareSectionCommand\MessageBreak
- at the preamble of your document.\MessageBreak
- You may also change \string\setchapterpreamble\MessageBreak
- before the command, which generates the message
- about\MessageBreak
- an overfull \string\vbox
- }%
- \fi
- \fi%
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \use@chapter@o@preamble
-% \end{macro}^^A \scr@startchapter
-%
-% \begin{command}{\addchaptertocentry}
-% \changes{v3.08}{2010/11/01}{added}
-% \changes{v3.12}{2013/09/24}{support for \cs{if@chaptertolists}}
-% \changes{v3.12}{2013/09/24}{using\cs{addxcontentsline}}
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
-% \cs{Iftocfeature}}
-% We do not use \cs{addcontentsline} directly for the entries to the table of
-% contents. Using
-% \begin{quote}
-% \cs{addchaptertocentry}\marg{number}\marg{text}
-% \end{quote}
-% allows easy manipulation of such entries and additional actions. If the
-% \meta{number} is completely empty no number should be used. Internally the
-% generic \cs{addtocentrydefault} it used, which uses \cs{nonumberline}
-% instead of \cs{numberline} in this case. See \file{scrkernel-listsof.dtx}
-% for more information.
-% \begin{description}
-% \item[ToDo:] Here we also do the entries to other directories. But we have
-% also code for this in \cs{scr@@startchapter} at least for the vertical
-% space. Shouldn't we combine both places to one place? And shouldn't this
-% be done here only, because of handling of user calls of
-% \cs{addchaptertocentry}?
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\addchaptertocentry}[2]{%
- \addtocentrydefault{chapter}{#1}{#2}%
- \if@chaptertolists
- \doforeachtocfile{%
- \Iftocfeature{\@currext}{chapteratlist}{%
- \addxcontentsline{\@currext}{chapteratlist}[{#1}]{#2}%
- }{}%
- }%
- \@ifundefined{float@addtolists}{}{\scr@float@addtolists@warning}%
- \fi
-}
-% \end{macrocode}
-% \end{command}^^A \addchaptertocentry
-%
-% \begin{macro}{\@chapter,\@makechapterhead,\@@makechapterhead,
-% \@schapter,\@makeschapterhead,\@@makeschapterhead}
-% \changes{v3.18}{2015/05/22}{indirect by \cs{DeclareSectionCommand}}
-% \begin{command}{\setchapterpreamble}
-% \changes{v2.7b}{2001/01/05}{added}
-% \changes{v3.18}{2015/05/22}{indirect by \cs{DeclareSectionCommand}}
-% \begin{macro}{\chapter@u@preamble,\chapter@o@preamble}
-% \changes{v2.8p}{2001/09/25}{added}
-% \changes{v3.18}{2015/05/22}{indirect by \cs{DeclareSectionCommand}}
-% All these commands and macros are not defined explicitly but by using
-% \cs{DeclareSectionCommand} later. See also
-% \cs{scr@dsc@def@style@chapter@command} and \cs{setchapterpreamble}.
-% \end{macro}^^A \chapter@u@preamble,\chapter@o@preamble
-% \end{command}^^A \setchapterpreamble
-% \end{macro}^^A \@chapter … \@@makeschapterhead
-%
-% \begin{command}{\addchap}
-% \changes{v2.0e}{1994/08/10}{\cs{sectdef} replaced by h \cs{secdef}}
-% \changes{v2.0e}{1994/08/10}{\cs{addcontensline} replaced by
-% \cs{addcontentsline}}
-% \changes{v2.0e}{1994/08/10}{\cs{@makechapterhead} replaced by
-% \cs{@makeschapterhead}}
-% \changes{v2.0e}{1994/08/10}{\cs{afterheadings} replaced by
-% \cs{@afterheading}}
-% \changes{v2.1a}{1994/10/29}{argument of \cs{chaptermark} removed from
-% \cls*{scrbook}}
-% \changes{v2.0e}{1994/10/12}{several \cs{markboth} replaced by
-% \cs{sectionmark}}
-% \changes{v2.2b}{1995/03/20}{several \cs{chaptermark} replaced by
-% \cs{@mkboth}}
-% \changes{v2.8d}{2001/07/05}{using \cs{chapterpagestyle}}
-% \changes{v3.08}{2010/11/01}{using \cs{addchaptertocentry}}
-% \changes{v3.10}{2011/08/30}{extended optional argument}
-% \changes{v3.13a}{2014/09/11}{using \cs{SecDef}}
-% \changes{v3.18}{2015/05/22}{redefinition}
-% \begin{macro}{\@addchap}
-% \changes{v3.12}{2013/02/26}{using \cs{addchapmark}}
-% \changes{v3.17}{2015/04/20}{expanding \cs{scr@ds@head} in \cs{addchapmark}}
-% \changes{v3.18}{2015/05/22}{redefinition}
-% \begin{macro}{\@saddchap}
-% \changes{v3.12}{2013/02/26}{using \cs{addchapmark}}
-% \changes{v3.18}{2015/05/22}{redefinition}
-% Since \KOMAScript{} 3.18 using
-% \begin{quote}
-% \cs{addchap}\oarg{head or ToC entry}\marg{heading}
-% \end{quote}
-% is very similar to
-% |\chapter[nonumber=true,…]{…}| but also works if the extended optional
-% argument is not activated. And
-% \begin{quote}
-% \cs{addchap*}\marg{heading}
-% \end{quote}
-% is just a \cs{chapter*}\marg{heading} with additional |\addchapmark{}| to
-% empty the running head.
-% \begin{description}
-% \item[Note:] Because of simply manipulating \cnt{secnumdepth} this should
-% also work with packages like \pkg{hyperref} as long as they support
-% chapters without numbering.
-% \end{description}
-% \begin{macrocode}
-\newcommand\addchap{%
- \SecDef\@addchap\@saddchap
-}%
-\newcommand*{\@addchap}{}%
-\long\def\@addchap[#1]#2{%
- \edef\reserved@a{%
- \unexpanded{%
- \chapter[{#1}]{#2}%
- \c@secnumdepth=
- }\the\c@secnumdepth\relax
- }%
- \c@secnumdepth=\numexpr \chapternumdepth-1\relax
- \reserved@a
-}
-\newcommand{\@saddchap}[1]{%
- \chapter*{#1}%
- \addchapmark{}%
-}%
-% \end{macrocode}
-% \changes{v2.7e}{2001/04/16}{braces fixed}
-% \changes{v2.7f}{2001/04/17}{braces fixed}
-% \changes{v2.8q}{2001/11/17}{using \cs{AfterPackage} to test for
-% \pkg{hyperref} version}
-% \changes{v3.27a}{2019/11/11}{warning fixed}
-% \begin{description}
-% \item[ToDo:] Unfortunately \pkg{hyperref} until version 6.71a has a big fat
-% bug. It redefines the internal \KOMAScript{} macro \cs{@addchap} without
-% testing the definition. From version 6.71b this is done only, if a very
-% old \KOMAScript{} is used. However, I would prefer removing all such code
-% from \pkg{hyperref}. Currently we warn, if such an old \pkg{hyperref} is
-% used. But this will be removed in future.
-% \end{description}
-% \begin{macrocode}
-%<*book>
-\AfterPackage{hyperref}{%
- \@ifpackagelater{hyperref}{2001/02/19}{}{%
- \ClassWarningNoLine{\KOMAClassName}{%
- You are using an old version of the hyperref package!\MessageBreak%
- This version has a buggy hack in many drivers,\MessageBreak%
- causing \string\addchap\space to behave strangely.\MessageBreak%
- Please update hyperref to at least version 6.71b%
- }%
- }%
-}
-%</book>
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@saddchap
-% \end{macro}^^A \@addchap
-% \end{command}^^A \addchap
-%
-%
-% \begin{macro}{\l@chapter}
-% \changes{v2.9k}{2003/01/02}{supporting option \opt{tocleft}}
-% \changes{v2.96b}{2006/11/30}{prevent page break between chapter entry and
-% parent}
-% \changes{v2.96b}{2006/11/30}{prevent page break between chapter entry and
-% child}
-% \changes{v2.97c}{2007/06/21}{\cs{sectfont} replaced by font element
-% \fnt{chapterentry}}
-% \changes{v2.97c}{2007/06/21}{using font element
-% \fnt{chapterentrypagenumber}}
-% \changes{v2.97c}{2007/06/21}{re-implemented to support left aligned entries}
-% \changes{v3.15}{2014/12/22}{using \cs{chaptertocdepth} and
-% \cs{scr@chapter@tocnumwidth}}
-% \changes{v3.15}{2014/12/10}{initial skip with \cs{addvspace} instead of
-% \cs{vskip}}
-% \changes{v3.20}{2015/10/06}{re-implemented using ToC styles}
-% \begin{macro}{\scr@chapter@tocindent}
-% \changes{v3.15}{2014/12/02}{added}
-% \changes{v3.18}{2015/05/20}{indirect definition by \cs{DeclareSectionCommand}}
-% \changes{v3.20}{2015/11/06}{really used}
-% \end{macro}^^A \scr@chapter@tocindent
-% \begin{macro}{\scr@chapter@tocnumwidth}
-% \changes{v3.15}{2014/12/02}{added}
-% \changes{v3.18}{2015/05/20}{indirect definition by \cs{DeclareSectionCommand}}
-% \end{macro}
-% \begin{option}{chapterentrydots}
-% \changes{v3.15}{2014/12/10}{added}
-% Option
-% \begin{quote}
-% \opt{chapterentrydots=\meta{boolean}}
-% \end{quote}
-% is the main difference of ToC entry style \texttt{chapter} to ToC entry
-% style \texttt{tocline}. It activates the dots between the entry text and the
-% page number.
-% \begin{description}
-% \item[ToDo:] This should be moved to \file{scrkernel-tocstyle.dtx}.
-% \end{description}
-% \begin{macrocode}
-%<*option>
-\KOMA@ifkey{chapterentrydots}{@chapterentrywithdots}
-%</option>
-% \end{macrocode}
-% \end{option}^^A chapterentrydots
-% \begin{command}{\raggedchapterentry}
-% \changes{v2.97c}{2007/06/21}{added}
-% \changes{v3.20}{2016/02/23}{removed}
-% \changes{v3.21}{2016/06/06}{see \file{scrkernel-tocstyle.dtx},
-% style \texttt{tocline}, option \opt{raggedentrytext}}
-% The initial setting of option \opt{raggedtext} of chapter ToC entry style
-% \texttt{tocline} resp. \texttt{chapter}.
-% \begin{description}
-% \item[ToDo:] Do we really need this definition? Every definition but
-% \cs{raggedright} results in justified text. So not defining it would be
-% almost the same. It just would not reserve the macro. But this could be
-% done in \file{scrkernel-tocstyle.dtx}.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\raggedchapterentry}{}
-% \end{macrocode}
-% \end{command}^^A \raggedchapterentry
-% \end{macro}^^A \l@chapter
-%
-% \begin{macro}{\l@chapteratlist}
-% \changes{v2.96a}{2006/12/03}{added}
-% This is used for chapter entries to other directories by the table of
-% contents. By default it uses \cs{l@chapter}. But users can redefine it
-% using, i.e., \cs{DeclareTOCStyleEntry}. However in this case they have to
-% setup all the attributes/options on their own.
-% \begin{macrocode}
-\newcommand*{\l@chapteratlist}{\l@chapter}
-% \end{macrocode}
-% \end{macro}^^A \l@chapteratlist
-%
-% \begin{counter}{chapter}
-% \begin{command}{\thechapter}
-% \begin{command}{\chapterformat}
-% \changes{v2.3c}{1995/08/06}{auto dot feature}
-% \changes{v2.7}{2000/01/03}{white space replaced by \cs{enskip}}
-% \changes{v2.8}{2001/06/15}{\cs{chapappifprefix} added}
-% \changes{v2.8o}{2001/09/19}{\cs{chapappifprefix} replaced by
-% \cs{chapappifchapterprefix}}
-% \changes{v2.96a}{2006/12/02}{\cs{mbox} added}
-% \changes{v3.17}{2015/03/08}{\cs{enskip} not in prefix line mode}
-% \begin{command}{\chaptermarkformat}
-% \changes{v2.3a}{1995/07/08}{space after chapter number increased}
-% \changes{v2.3c}{1995/08/06}{auto dot feature}
-% \changes{v2.8}{2001/06/15}{\cs{chapappifprefix} added}
-% \changes{v2.8o}{2001/09/19}{\cs{chapappifprefix} replaced by
-% \cs{chapappifchapterprefix}}
-% \changes{v3.03a}{2009/04/03}{tilde replaced by \cs{nobreakspace} for better
-% \pkg{babel-spanish} support}
-% The counter would also be defined by \cs{DeclareSectionCommand}. But because
-% of handling \cs{frontmatter} and \cs{backmatter} and prefix lines we cannot
-% use the default definition of the formatting. So we define it already before
-% calling \cs{DeclareSectionCommand} for \cs{chapter}.
-% \begin{macrocode}
-\newcounter{chapter}
-\renewcommand*{\thechapter}{\@arabic\c@chapter}
-\newcommand*{\chapterformat}{%
- \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter\autodot
- \IfUsePrefixLine{}{\enskip}}%
-}
-\newcommand*\chaptermarkformat{\chapappifchapterprefix{\ }%
- \thechapter\autodot\enskip}
-% \end{macrocode}
-% \end{command}^^A \chaptermarkformat
-% \end{command}^^A \chapterformat
-% \end{command}^^A \thechapter
-% \end{counter}^^A chapter
-%
-%
-% \begin{command}{\chaptername}
-% \changes{v3.36}{2022/03/15}{explicit definition for English languages}
-% The name of a chapter, e.g., used for the prefix line and maybe for the ToC
-% entry.
-% \begin{macrocode}
-\newcommand*\chaptername{Chapter}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\chaptername{Chapter}
-% \end{macrocode}
-% \end{command}^^A \chaptername
-%
-%
-% \begin{command}{\appendixname}
-% \changes{v3.36}{2022/03/15}{explicit definition for English languages}
-% The same for appendix chapters.
-% \begin{macrocode}
-\newcommand*\appendixname{Appendix}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\appendixname{Appendix}
-% \end{macrocode}
-% \end{command}^^A \appendixname
-%
-%
-% \begin{command}{\chapappifprefix}
-% \changes{v2.8}{2001/06/15}{added}
-% \changes{v2.8o}{2001/09/19}{deprecated}
-% \changes{v3.36}{2022/03/18}{removed}
-% \begin{description}
-% \item[Note:] Command \cs{chapappifprefix} has been removed in \KOMAScript{}
-% v3.36, because it is deprecated from \KOMAScript{} v2.8o and there never has
-% been a compatibility switch for versions before \KOMAScript{} v2.9.
-% \end{description}
-% \end{command}^^A \chapappifprefix
-%
-%
-% \begin{command}{\chapappifchapterprefix}
-% \changes{v2.8o}{2001/09/19}{added}
-% \changes{v3.18}{2015/06/09}{using \cs{IfChapterUsePrefixLine}}
-% \begin{command}{\IfChapterUsesPrefixLine}
-% \changes{v3.18}{2015/06/09}{added}
-% \begin{command}{\chapapp}
-% \changes{v2.8}{2001/06/15}{added}
-% \begin{macro}{\@chapapp}
-% The \LaTeX{} standard classes provide an internal macro \cs{@chapapp} that
-% is either \cs{chaptername} or \cs{appendixname} depending on whether we are
-% inside or outside the appendix. For compatibility with lots of packages
-% \KOMAScript{} does provide this too. But for the user level this is
-% cumbersome. So \KOMAScript{} does also provide a \emph{read only specified}
-% user command \cs{chapapp}. \KOMAScript{} itself uses \cs{chapapp} inside
-% \begin{quote}
-% \cs{chapappifchapterprefix}\marg{then string}
-% \end{quote}
-% that outputs \cs{then string} prefixed by \cs{chapapp} only, if
-% \opt{chapterprefix} (resp. \opt{headings=twolinechapter}) has been activated
-% and therefore a chapter prefix line has to be used. A more general version
-% \cs{chapterifchapterprefix} is
-% \begin{quote}
-% \cs{IfChapterUsesPrefixLine}\marg{then code}\marg{else code}
-% \end{quote}
-% that executes \cs{then code} if a chapter prefix line has to be used and
-% \cs{else code} otherwise (both without extra prefix).
-% \begin{macrocode}
-\newcommand*{\chapappifchapterprefix}[1]{%
- \IfChapterUsesPrefixLine{\chapapp#1}{}%
-}
-\newcommand*{\IfChapterUsesPrefixLine}{%
- \if@chapterprefix\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-}
-\newcommand*{\chapapp}{\@chapapp}
-\newcommand*\@chapapp{\chaptername}
-% \end{macrocode}
-% \end{macro}^^A \@chapapp
-% \end{command}^^A \chapapp
-% \end{command}^^A \IfChapterUsePrefixLine
-% \end{command}^^A \chapappifchapterprefix
-%
-%
-% \begin{command}{\chaptermark}
-% Before selecting a page style with automatic running head, \cs{chapter}
-% should simply not change the left or right mark.
-% \begin{description}
-% \item[ToDo:] Do we really need this or would the later
-% \cs{DeclareSectionCommand} be enough to do the initial definition?
-% \end{description}
-% \begin{macrocode}
-\newcommand*\chaptermark[1]{}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\addchapmark}
-% \changes{v3.12}{2013/03/26}{added}
-% \cs{addchap} and marks for running heads are a little bit more
-% complicated. Currently we are using a local redefinition of
-% \cs{if@mainmatter} and setting of \cnt{secnumdept} to switch of numbering
-% and then using \cs{chaptermark}. So the \cs{chaptermark} definition should
-% always respect at least one of these settings.
-% \begin{description}
-% \item[Note:] The ToDo note at \cs{chaptermark} is not relevant for this
-% definition.
-% \end{description}
-% \begin{macrocode}
-\newcommand*\addchapmark[1]{%
- \begingroup
- \expandafter\let\csname if@mainmatter\expandafter\endcsname
- \csname iffalse\endcsname
- \c@secnumdepth=\numexpr \chapternumdepth-1\relax
- \chaptermark{#1}%
- \endgroup
-}
-% \end{macrocode}
-% \end{command}^^A \addchapmark
-%
-%
-% \begin{command}{\raggedchapter}
-% \changes{v3.15}{2014/12/09}{added}
-% Style \texttt{chapter} does not use \cs{raggedsection} but
-% \cs{raggedchapter}. However, the initial value is \cs{raggedsection}, so a
-% change of \cs{raggedsection} would also change the initial behave of
-% \cs{raggedchapter}. Nevertheless the alignment of chapters in independent
-% from the alignment of sections, if wanted.
-% \begin{macrocode}
-\newcommand*{\raggedchapter}{\raggedsection}
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{fontelement}{chapterentry}
-% \changes{v2.97c}{2007/06/21}{added}
-% \changes{v3.06}{2010/06/09}{font element \fnt{sectioning} replaced by
-% \fnt{disposition}}
-% \cs{chapter} entries to the table of contents initially using
-% \fnt{disposition}, the basic font of all outlines.
-% \begin{macrocode}
-\newkomafont{chapterentry}{\usekomafont{disposition}}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{chapterentrypagenumber}
-% \changes{v2.97c}{2007/06/21}{added}
-% The page number of \cs{chapter} entries to the table of contents is
-% initially the same as the entry at whole.
-% \begin{macrocode}
-\newkomafont{chapterentrypagenumber}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{chapterentrydots}
-% \changes{v3.15}{2014/12/10}{added}
-% \changes{v3.27}{2019/10/28}{\cs{normalfont} removed}
-% If the optional dots for \cs{chapter} entries to the table of contents are
-% used, we can change the font of the dots also. It is used for the
-% \texttt{linefill} of \pkg*{tocbasic} ToC entry style \texttt{chapter}, that
-% uses ToC entry style \texttt{tocline} where the line filler is always
-% prefixed by \cs{normalfont}\cs{normalsize}. So the setting is relative to
-% this. The color is relative to the color of \fnt{chapterentry}.
-% \begin{macrocode}
-\newkomafont{chapterentrydots}{}
-%</body>
-%</book|report>
-% \end{macrocode}
-% \end{fontelement}
-%
-%
-% \subsection{Section, subsections and more}
-%
-% The outline levels of sections, subsections, subsubsection, paragraphs and
-% subparagraphs are all very similar. There are only some special treatments
-% of sections with \cls*{scrartcl}, because there \cs{section} is a high-level
-% command.
-%
-% \begin{fontelement}{section,subsection,subsubsection,
-% paragraph,subparagraph}
-% \changes{v2.8o}{2001/09/14}{added}
-% Definition of the font elements used by \cs{section}, \cs{subsection},
-% \cs{subsubsection}, \cs{paragraph} and \cs{subparagraph}. The settings are
-% done by option \texttt{headings} later. Everything is prepared before this
-% option is used the first time. The definition of the font element is done
-% manually to stay compatible with old \KOMAScript{} versions using another
-% internal macro than the default of \cs{newkomafont}.
-% \begin{macrocode}
-%<*prepare>
-\newcommand*{\size@section}{}
-\newcommand*{\scr@fnt@section}{\size@section}
-\newcommand*{\size@subsection}{}
-\newcommand*{\scr@fnt@subsection}{\size@subsection}
-\newcommand*{\size@subsubsection}{}
-\newcommand*{\scr@fnt@subsubsection}{\size@subsubsection}
-\newcommand*{\size@paragraph}{}
-\newcommand*{\scr@fnt@paragraph}{\size@paragraph}
-\newcommand*{\size@subparagraph}{}
-\newcommand*{\scr@fnt@subparagraph}{\size@subparagraph}
-%</prepare>
-% \end{macrocode}
-% \end{fontelement}^^A section … subparagraph
-%
-%
-% \begin{macro}{\l@section}
-% \changes{v2.9k}{2003/01/02}{supporting option \opt{tocleft}}
-% \changes{v2.96b}{2006/11/30}{preventing page break between section entry and
-% parent}
-% \changes{v2.96b}{2006/11/30}{preventing page break between section entry and
-% child}
-% \changes{v2.97c}{2007/06/21}{\cs{sectfont} replaced by font element
-% \fnt{sectionentry}}
-% \changes{v2.97c}{2007/06/21}{using font element
-% \fnt{sectionentrypagenumber}}
-% \changes{v2.97c}{2007/06/21}{re-implemented to support left aligned entries}
-% \changes{v3.15}{2014/11/24}{using \cs{sectiontocdepth},
-% \cs{scr@section@tocindent} and \cs{scr@section@tocnumwidth}}
-% \changes{v3.20}{2015/10/06}{re-implemented using ToC styles}
-% \begin{option}{sectionentrydots}
-% \changes{v3.15}{2014/12/10}{added}
-% With \cls*{scrartcl} option
-% \begin{quote}
-% \opt{sectionentrydots=\meta{boolean}}
-% \end{quote}
-% is the main difference of ToC entry style \texttt{section} to ToC entry
-% style \texttt{tocline}. It activates the dots between the entry text and the
-% page number.
-% \begin{description}
-% \item[ToDo:] This should be moved to \file{scrkernel-tocstyle.dtx}.
-% \end{description}
-% \begin{macrocode}
-%<*article>
-%<*option>
-\KOMA@ifkey{sectionentrydots}{@sectionentrywithdots}
-%</option>
-% \end{macrocode}
-% \end{option}^^A sectionentrydots
-% \begin{command}{\raggedsectionentry}
-% \changes{v2.97c}{2007/06/21}{added}
-% \changes{v3.20}{2016/02/23}{removed}
-% The initial setting of option \opt{raggedtext} of section ToC entry style
-% \texttt{tocline} resp. \texttt{section}.
-% \begin{description}
-% \item[ToDo:] Do we really need this definition? Every definition but
-% \cs{raggedright} results in justified text. So not defining it would be
-% almost the same. It just would not reserve the macro. But this could be
-% done in \file{scrkernel-tocstyle.dtx}.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\raggedsectionentry}{}
-%</body>
-%</article>
-% \end{macrocode}
-% \end{command}^^A \raggedsectionentry
-% \end{macro}^^A \l@section
-%
-%
-% \begin{command}{\addsec}
-% \changes{v2.0e}{1994/10/12}{several \cs{markboth} replaced by
-% \cs{sectionmark}}
-% \changes{v2.2b}{1995/03/20}{\cs{sectionmark} replaced by \cs{@mkboth}}
-% \changes{v2.3h}{1995/01/21}{also available with \cls*{scrbook} and
-% \cls*{scrreprt}}
-% \changes{v2.4g}{1996/11/04}{\cs{section*} moved because of page breaks in
-% the table of contents}
-% \changes{v2.5d}{1998/01/03}{\cs{@mkboth} replaced by conditional
-% \cs{markright}}
-% \changes{v2.7a}{2001/01/04}{supporting \pkg{hyperref}}
-% \changes{v3.13a}{2014/09/11}{using \cs{SecDef}}
-% \begin{macro}{\@addsec}
-% \changes{v3.10}{2011/08/30}{using \cs{addsectiontocentry}}
-% \changes{v3.10}{2011/08/30}{extended optional argument}
-% \changes{v3.12}{2013/02/26}{using \cs{addsecmark}}
-% \changes{v3.18}{2015/05/22}{redefinition}
-% \begin{macro}{\@saddsec}
-% \changes{v3.12}{2013/02/26}{using \cs{addsecmark}}
-% \changes{v3.17}{2015/04/20}{expanding \cs{scr@ds@head} in \cs{addsecmark}}
-% Since \KOMAScript{} 3.18 using
-% \begin{quote}
-% \cs{addsec}\oarg{head or ToC entry}\marg{heading}
-% \end{quote}
-% is very similar to
-% |\section[nonumber=true,…]{…}| but also works if the extended optional
-% argument is not activated. And
-% \begin{quote}
-% \cs{addsec*}\marg{heading}
-% \end{quote}
-% is just a \cs{section*}\marg{heading} with additional |\addsecmark{}| to
-% empty the running head.
-% \begin{description}
-% \item[Note:] Because of simply manipulating \cnt{secnumdepth} this should
-% also work with packages like \pkg{hyperref} as long as they support
-% sections without numbering.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand\addsec{\SecDef\@addsec\@saddsec}
-\newcommand*{\@addsec}{}
-\def\@addsec[#1]#2{%
- \edef\reserved@a{%
- \unexpanded{%
- \section[{#1}]{#2}%
- \c@secnumdepth=
- }\the\c@secnumdepth\relax
- }%
- \c@secnumdepth=\numexpr \sectionnumdepth-1\relax
- \reserved@a
-}
-\newcommand*{\@saddsec}[1]{%
- \section*{#1}\addsecmark{}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@saddsec
-% \end{macro}^^A \@addsec
-% \end{command}^^A \addsec
-%
-%
-% \begin{command}{\minisec}
-% \changes{v2.8q}{2002/02/28}{\cs{nobreak} after \cs{sectfont} added}
-% \changes{v2.9o}{2003/01/31}{\cs{nobreak} after group end}
-% \changes{v2.96a}{2006/11/30}{initial value of \cs{parfillskip} depending on
-% \opt{version}}
-% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed}
-% \changes{v3.13a}{2014/08/07}{handling of distances of immediate following
-% headings like \cs{@startsection}}
-% \changes{v3.26}{2018/05/14}{missing \cs{interlinepenalty}\cs{@M} added}
-% \begin{fontelement}{minisec}
-% \changes{v2.8o}{2001/09/14}{using font element \fnt{minisec}}
-% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added}
-% \cs{minisec} is a very special additional outline of \KOMAScript. It is
-% always free standing but without numbering. Something like
-% \cs{sectionlinesformat} is not supported currently. Also entries to the
-% table of contents or marks for an automatic running head are not
-% supported. However a dedicated font element is provided.
-% \begin{macrocode}
-\newkomafont{minisec}{}
-\newcommand\minisec[1]{%
- \expandafter\ifnum\scr@v@is@lt{3.13a}\relax
- \@afterindentfalse \vskip 1.5ex
- \else
- \if@noskipsec \leavevmode \fi
- \par
- \@afterindentfalse
- \if@nobreak
- \everypar{}%
- \else
- \addpenalty\@secpenalty\addvspace{1.5ex}%
- \fi
- \fi
- {\parindent \z@
- \expandafter\ifnum\scr@v@is@gt{2.96}\relax
- \setlength{\parfillskip}{\z@ plus 1fil}\fi
- \raggedsection\normalfont\sectfont\nobreak
- \usekomafont{minisec}{\nobreak\interlinepenalty \@M #1\par\nobreak}%
- }\nobreak
- \@afterheading
-}
-% \end{macrocode}
-% \end{fontelement}^^A minisec
-% \end{command}^^A \minisec
-%
-%
-% \begin{command}{\addsectiontocentry,\addsubsectiontocentry,
-% \addsubsubsectiontocentry,
-% \addparagraphtocentry,\addsubparagraphtocentry}
-% \changes{v3.10}{2011/08/30}{added}
-% We do not use \cs{addcontentsline} directly for the entries to the table of
-% contents. Using
-% \begin{quote}\raggedright
-% \cs{addsectiontocentry}\marg{number}\marg{text}\\
-% \cs{addsubsectiontocentry}\marg{number}\marg{text}\\
-% \cs{addsubsubsectiontocentry}\marg{number}\marg{text}\\
-% \cs{addparagraphtocentry}\marg{number}\marg{text}\\
-% \cs{addsubparagraphtocentry}\marg{number}\marg{text}\\
-% \end{quote}
-% allows easy manipulation of such entries and additional actions. If the
-% \meta{number} is completely empty no number should be used. Internally the
-% generic \cs{addtocentrydefault} it used, which uses \cs{nonumberline}
-% instead of \cs{numberline} in this case. See \file{scrkernel-listsof.dtx}
-% for more information.
-% \begin{description}
-% \item[ToDo:] Should this be moved to \file{scrkernel-listsof.dtx} or even to
-% \file{scrkernel-tocstyle.dtx}?
-% \item[ToDo:] Are these really needed or would the implicit definition by the
-% later \cs{DeclareSectionCommand} be enough as it is already used for
-% \cs{addsubsubsectiontocentry}?
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\addsectiontocentry}[2]{%
- \addtocentrydefault{section}{#1}{#2}%
-}
-\newcommand*{\addsubsectiontocentry}[2]{%
- \addtocentrydefault{subsection}{#1}{#2}%
-}
-\newcommand*{\addparagraphtocentry}[2]{%
- \addtocentrydefault{paragraph}{#1}{#2}%
-}
-\newcommand*{\addsubparagraphtocentry}[2]{%
- \addtocentrydefault{subparagraph}{#1}{#2}%
-}
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{counter}{section}
-% \begin{command}{\thesection}
-% \changes{v2.97e}{2007/11/23}{chapter number prefix only in main matter}
-% \changes{v3.03b}{2009/06/09}{\cs{relax} replaced by white space for better
-% support of \pkg{hyperref}}
-% \changes{v3.27}{2019/06/26}{using \cs{scr@v@is@gt}}
-% \begin{command}{\sectionmarkformat}
-% \changes{v2.3a}{1995/07/08}{space after number increased}
-% \changes{v2.3c}{1995/08/06}{auto dot feature}
-% \begin{counter}{subsection}
-% \begin{command}{\thesubsection}
-% \begin{command}{\subsectionmarkformat}
-% \changes{v2.3a}{1995/07/08}{space after number increased}
-% \changes{v2.3c}{1995/08/06}{auto dot feature}
-% \begin{counter}{subsubsection}
-% \begin{command}{\thesubsubsection}
-% \begin{counter}{paragraph}
-% \begin{command}{\theparagraph}
-% \begin{counter}{subparagraph}
-% \begin{command}{\thesubparagraph}
-% The counter would also be defined by \cs{DeclareSectionCommand}. But because
-% of handling \cs{frontmatter} and \cs{backmatter} and prefix lines we cannot
-% use the default definition of the formatting of \cnt{section}. So we define
-% it already before calling \cs{DeclareSectionCommand} for \cs{section}.
-% \begin{description}
-% \item[ToDo:] Do we really need the explicit definition of \cnt{subsection},
-% \cnt{subsubsection}, \cnt{paragraph}, and \cnt{subparagraph} of would the
-% implicit definition by \cs{DeclareSectionCommand} be enough for these.
-% \end{description}
-% \begin{macrocode}
-%<*book|report>
-\newcounter{section}[chapter]
-\renewcommand*\thesection{%
-%<*book>
- \expandafter\ifnum\scr@v@is@gt{2.97d}%
- \if@mainmatter\thechapter.\fi
- \else
-%</book>
- \thechapter.%
-%<book> \fi
- \@arabic\c@section
-}
-%</book|report>
-%<*article>
-\newcounter{section}
-\renewcommand*{\thesection}{\@arabic\c@section}
-%</article>
-\newcommand*\sectionmarkformat{\thesection\autodot\enskip}
-\newcounter{subsection}[section]
-\renewcommand*{\thesubsection}{\thesection.\@arabic\c@subsection}
-%<*article>
-\newcommand*\subsectionmarkformat{\thesubsection\autodot\enskip}
-%</article>
-\newcounter{subsubsection}[subsection]
-\renewcommand*{\thesubsubsection}{%
- \thesubsection.\@arabic\c@subsubsection
-}
-\newcounter{paragraph}[subsubsection]
-\renewcommand*{\theparagraph}{\thesubsubsection.\@arabic\c@paragraph}
-\newcounter{subparagraph}[paragraph]
-\renewcommand*{\thesubparagraph}{%
- \theparagraph.\@arabic\c@subparagraph
-}
-% \end{macrocode}
-% \begin{macro}{\@seccntformat}
-% \changes{v2.3c}{1995/08/06}{CJK support extended}
-% \changes{v2.9p}{2004/01/07}{\cs{protect} added}
-% \changes{v2.97}{2007/01/24}{workaround for the ugly \cs{protect}}
-% \changes{v3.17}{2015/02/23}{using \cs{\dots format} if exists}
-% \changes{v3.17}{2015/03/31}{using \cs{protect} for \cs{\dots format}}
-% \begin{command}{\othersectionlevelsformat}
-% \changes{v2.7}{2000/01/03}{added}
-% \changes{v2.7}{2000/01/03}{\cs{quad} replaced by \cs{enskip}}
-% \changes{v2.7i}{2001/05/17}{\cs{let} replaced by \cs{def}}
-% \changes{v2.97}{2007/01/24}{three arguments instead of only one}
-% With \KOMAScript~2 \cs{othersectionlevelsformat} has had only one argument,
-% the \cs{…format} command of the level. But with there has been expansion
-% issues. So we have had to change the definition to
-% \begin{quote}
-% \cs{othersectionlevelsformat}\marg{level name}\marg{ignore
-% command}\marg{the command}
-% \end{quote}
-% Users who use or redefine \cs{othersectionlevelsformat} should always ignore
-% the \meta{ignore command}. It is used to internally handle deprecated
-% definitions of \cs{othersectionlevelsformat} with only one
-% argument. \meta{level name} is the name of the level command, e.g.,
-% |subsubsection|. \meta{the command} is the \cs{the…} command corresponding
-% with \marg{level name}. See the definition of \cs{@seccntformat} for more
-% information about the internal usage of \cs{othersectionlevelsformat}.
-% \begin{description}
-% \item[ToDo:] Can we somehow change this for \KOMAScript~4 to no longer
-% support the second argument (unless a low compatibility level is used)?
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\othersectionlevelsformat}[3]{#3\autodot\enskip}
-\renewcommand*{\@seccntformat}[1]{%
- \expandafter\ifnum\scr@v@is@lt{3.17}\relax
- \protect\othersectionlevelsformat{#1}{%
- \expandafter\aftergroup\noexpand\@gobble}{\csname the#1\endcsname}%
- \else
- \scr@ifundefinedorrelax{#1format}{%
- \protect\othersectionlevelsformat{#1}{%
- \expandafter\aftergroup\noexpand\@gobble}{\csname the#1\endcsname}%
- }{\expandafter\protect\csname #1format\endcsname}%
- \fi
-}
-% \end{macrocode}
-% \end{command}^^A \othersectonlevelsformat
-% \end{macro}^^A \@seccntformat
-% \end{command}^^A \thesubparagraph
-% \end{counter}^^A subparagraph
-% \end{command}^^A \theparagraph
-% \end{counter}^^A paragraph
-% \end{command}^^A \thesubsubsection
-% \end{counter}^^A subsubsection
-% \end{command}^^A \subsectionformat
-% \end{command}^^A \thesubsection
-% \end{counter}^^A subsection
-% \end{command}^^A \sectionformat
-% \end{command}^^A \thesection
-% \end{counter}^^A section
-%
-%
-% \begin{command}{\addsecmark}
-% \changes{v3.12}{2013/03/26}{added}
-% \cs{addsec} and marks for running heads are a little bit
-% complicated. Currently we are using a local setting of \cnt{secnumdept} to
-% switch of numbering and then using \cs{sectionmark}. So the \cs{sectionmark}
-% definition should always respect \cnt{secnumdepth}.
-% \begin{macrocode}
-\newcommand*\addsecmark[1]{%
- \begingroup
- \c@secnumdepth=\numexpr \sectionnumdepth-1\relax
- \sectionmark{#1}%
- \endgroup
-}
-% \end{macrocode}
-% \end{command}^^A \addsecmark
-%
-%
-% \begin{fontelement}{sectionentry}
-% \changes{v2.97c}{2007/06/21}{added}
-% \changes{v3.06}{2010/06/09}{font element \fnt{sectioning} replaced by
-% \fnt{disposition}}
-% With \cls*{scrartcl} \cs{section} entries to the table of contents initially
-% using \fnt{disposition}, the basic font of all outlines.
-% \begin{macrocode}
-%<*article>
-\newkomafont{sectionentry}{\usekomafont{disposition}}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{sectionentrypagenumber}
-% \changes{v2.97c}{2007/06/21}{added}
-% The page number of \cs{section} entries to the table of contents is
-% initially the same as the entry at whole with \cls*{scrartcl}.
-% \begin{macrocode}
-\newkomafont{sectionentrypagenumber}{}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{sectionentrydots}
-% \changes{v3.15}{2014/12/10}{added}
-% \changes{v3.27}{2019/10/28}{\cs{normalfont} removed}
-% If the optional dots for \cs{section} entries to the table of contents are
-% used, we can change the font of the dots also. It is used for the
-% \texttt{linefill} of \pkg*{tocbasic} ToC entry style \texttt{section}, that
-% uses ToC entry style \texttt{tocline} where the line filler is always
-% prefixed by \cs{normalfont}\cs{normalsize}. So the setting is relative to
-% this. The color is relative to the color of \fnt{sectionentry}.
-% \begin{macrocode}
-\newkomafont{sectionentrydots}{}
-%</article>
-% \end{macrocode}
-% \end{fontelement}
-%
-%
-% \begin{command}{\partnumdepth,\chapternumdepth,
-% \sectionnumdepth,\subsectionnumdepth,\subsubsectionnumdepth,
-% \paragraphnumdepth,\subparagraphnumdepth,
-% \parttocdepth,\chaptertocdepth
-% \sectiontocdepth,\subsectiontocdepth,\subsubsectiontocdepth,
-% \paragraphtocdepth,\subparagraphtocdepth}
-% \changes{v3.12}{2013/12/16}{added}
-% \changes{v3.15}{2014/12/09}{indirect definition by
-% \cs{DeclareSectionCommand}}
-% The section numbering levels, to be compared with counter
-% \cnt{secnumdepth}, and the table of contents entry levels, to be compared
-% with counter \cs{tocdepth}, of all outline commands defined by the
-% \KOMAScript{} classes.
-% \begin{description}
-% \item[Note:] These are specified to be \emph{read only}. They are defined by
-% \cs{DeclareSectionCommand}.
-% \end{description}
-% \end{command}^^A \partnumdepth … \subparagraphtocdepth
-%
-% \begin{command}{\part}
-% \changes{v3.18}{2015/05/25}{indirect definition by \cs{DeclareSectionCommand}}
-% \changes{v3.26}{2018/06/27}{definition moved behind \cs{section} because of
-% bookmark level workaround}
-% \begin{command}{\chapter}
-% \changes{v2.8d}{2001/07/05}{using \cs{chapterpagestyle}}
-% \changes{v3.18}{2015/05/20}{indirect definition by \cs{DeclareSectionCommand}}
-% \begin{command}{\section}
-% \changes{v2.8p}{2001/09/22}{\cs{sectfont} before \cs{size@section}}
-% \changes{v2.8q}{2002/02/28}{\cs{nobreak} after \cs{sectfont} added}
-% \changes{v2.96a}{2006/11/30}{initial value of \cs{parfillskip} depending on
-% option \opt{version}}
-% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed}
-% \changes{v3.13a}{2014/09/11}{using \cs{scr@startsection}}
-% \changes{v3.15}{2014/11/24}{indirect definition by \cs{DeclareSectionCommand}}
-% \begin{command}{\subsection}
-% \changes{v2.8p}{2001/09/22}{\cs{sectfont} before \cs{size@subsection}}
-% \changes{v2.8q}{2002/02/28}{\cs{nobreak} after \cs{sectfont} added}
-% \changes{v2.96a}{2006/11/30}{initial value of \cs{parfillskip} depending on
-% option \opt{version}}
-% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed}
-% \changes{v3.13a}{2014/09/11}{using \cs{scr@startsection}}
-% \changes{v3.15}{2014/11/24}{indirect definition by \cs{DeclareSectionCommand}}
-% \begin{command}{\subsubsection}
-% \changes{v2.3d}{1995/08/19}{with \cls*{scrartcl} also numbered and added to
-% ToC}
-% \changes{v2.8p}{2001/09/22}{\cs{sectfont} added before
-% \cs{size@subsubsection}}
-% \changes{v2.8q}{2002/02/28}{\cs{nobreak} added after \cs{sectfont}}
-% \changes{v2.96a}{2006/11/30}{initial value of \cs{parfillskip} depending on
-% option \opt{version}}
-% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed}
-% \changes{v3.13a}{2014/09/11}{using \cs{scr@startsection}}
-% \changes{v3.15}{2014/11/24}{indirect definition by \cs{DeclareSectionCommand}}
-% \begin{command}{\paragraph}
-% \changes{v2.8p}{2001/09/22}{\cs{sectfont} added before
-% \cs{size@paragraph}}
-% \changes{v2.8q}{2002/02/28}{\cs{nobreak} added after \cs{sectfont}}
-% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed}
-% \changes{v3.15}{2014/11/24}{indirect definition by \cs{DeclareSectionCommand}}
-% \begin{command}{\subparagraph}
-% \changes{v2.8p}{2001/09/22}{\cs{sectfont} added before
-% \cs{size@subparagraph}}
-% \changes{v2.8q}{2002/02/28}{\cs{nobreak} added after \cs{sectfont}}
-% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed}
-% \changes{v3.13a}{2014/09/11}{using \cs{scr@startsection}}
-% \changes{v3.15}{2014/11/24}{indirect definition by \cs{DeclareSectionCommand}}
-% \changes{v3.15}{2014/11/24}{\cs{parindent} replaced by \cs{scr@parindent}}
-% Commands \cs{part}, \cs{chapter}, \cs{section}, \cs{subsection},
-% \cs{subsubection}, \cs{paragraph} and \cs{subparagraph} are defined using
-% \cs{DeclareSectionCommand}. The definition of \cs{part} must be \emph{after}
-% \cs{section} because of the bookmark level workaround (see definition of
-% \cs{DelcareSectionCommand}. The declaration of \cs{chapter} uses only those
-% settings that do not depend on options, because settings by class options
-% must no be overwritten here. So all settings that do depend on class options
-% have to be initialized before the options (see the \texttt{prepare} code of
-% such options above). For the lower levels this is only the case for the font.
-% \begin{macrocode}
-%<*book|report>
-\DeclareSectionCommand[%
- style=chapter,%
- level=\z@,%
- pagestyle=plain,%
- tocstyle=chapter,%
- tocindent=\z@,%
- tocnumwidth=1.5em%
-]{chapter}
-%</book|report>
-\DeclareSectionCommand[%
- style=section,%
- level=1,%
- indent=\z@,%
- beforeskip=-3.5ex \@plus -1ex \@minus -.2ex,%
- afterskip=2.3ex \@plus.2ex,%
- tocstyle=section,%
-%<book|report> tocindentfollows=chapter,%
-%<article> tocindent=0pt,%
-%<book|report> tocindent=1.5em,%
-%<article> tocnumwidth=1.5em%
-%<book|report> tocnumwidth=2.3em%
-]{section}
-\DeclareSectionCommand[%
- style=part,%
-%<article> level=\z@,%
-%<report|book> level=\m@ne,%
-%<report|book> pagestyle=plain,%
- tocstyle=part,%
- toclevel=\m@ne,%
- tocindent=\z@,%
- tocnumwidth=2em%
-]{part}
-\DeclareSectionCommand[%
- style=section,%
- level=2,%
- indent=\z@,%
- beforeskip=-3.25ex\@plus -1ex \@minus -.2ex,%
- afterskip=1.5ex \@plus .2ex,%
-%<article> tocstyle=subsection,%
-%<book|report> tocstyle=section,%
-%<article> tocindent=1.5em,%
-%<book|report> tocindent=3.8em,%
-%<article> tocnumwidth=2.3em%
-%<book|report> tocnumwidth=3.2em%
-]{subsection}
-\DeclareSectionCommand[%
- style=section,%
- level=3,%
- indent=\z@,%
- beforeskip=-3.25ex\@plus -1ex \@minus -.2ex,%
- afterskip=1.5ex \@plus .2ex,%
-%<article> tocstyle=subsection,%
-%<book|report> tocstyle=section,%
-%<article> tocindent=3.8em,%
-%<book|report> tocindent=7.0em,%
-%<article> tocnumwidth=3.2em%
-%<book|report> tocnumwidth=4.1em%
-]{subsubsection}
-\DeclareSectionCommand[%
- style=section,%
- level=4,%
- indent=\z@,%
- beforeskip=3.25ex \@plus1ex \@minus.2ex,%
- afterskip=-1em,%
-%<article> tocstyle=subsection,%
- tocindentfollows=subsubsection,%
-%<book|report> tocstyle=section,%
-%<article> tocindent=7.0em,%
-%<book|report> tocindent=10em,%
-%<article> tocnumwidth=4.1em%
-%<book|report> tocnumwidth=5em%
-]{paragraph}
-\DeclareSectionCommand[%
- style=section,%
- level=5,%
- indent=\scr@parindent,%
- beforeskip=3.25ex \@plus1ex \@minus .2ex,%
- afterskip=-1em,%
-%<article> tocstyle=subsection,%
-%<book|report> tocstyle=section,%
-%<article> tocindent=10em,%
-%<book|report> tocindent=12em,%
-%<article> tocnumwidth=5em%
-%<book|report> tocnumwidth=6em%
-]{subparagraph}
-\expandafter\ifnum\scr@v@is@lt{3.15}\relax
- \let\scr@subparagraph@sectionindent\parindent
-\else
- \def\scr@subparagraph@sectionindent{\scr@parindent}%
-\fi
-%</body>
-% \end{macrocode}
-% \end{command}^^A \subparagraph
-% \end{command}^^A \paragraph
-% \end{command}^^A \subsubsection
-% \end{command}^^A \subsection
-% \end{command}^^A \section
-% \end{command}^^A \chapter
-% \end{command}^^A \part
-%
-%
-% \subsection{Fonts}
-%
-% The font settings of dedicated elements of the the corresponding section
-% levels already have been done. But there are also some elements that do not
-% correspond with a single section level.
-%
-% \begin{fontelement}{disposition}
-% \changes{v2.95b}{2006/07/30}{added}
-% \begin{fontelement}{sectioning}
-% \changes{v2.95b}{2006/07/30}{added}
-% \begin{macro}{\sectfont}
-% \changes{v2.8c}{2001/06/29}{\cs{normalcolor} added}
-% \changes{v3.12}{2013/11/11}{earlier definition to support option
-% \opt{headings\quotechar=standardclasses}}
-% \changes{v3.20}{2016/01/29}{\cs{sffamily} replaced by \cs{@gr@gsffamily}}
-% This element is not only used by all section levels before the dedicated
-% element of the single level is used. It is also used by other elements like
-% the \fnt{chaptertocentry}. The command \cs{sectfont} instead of the
-% \cs{newkomafont} default is used for compatibility only. So it is specified
-% as internal. Using it as user command is deprecated!
-% \begin{macrocode}
-%</class&!letter>
-%<*(class&!letter)|(package&extend)>
-%<*prepare>
-\newcommand*{\sectfont}{\normalcolor\@gr@gsffamily\bfseries}
-%</prepare>
-%</(class&!letter)|(package&extend)>
-%<*class&!letter>
-%<*body>
-\newcommand*{\scr@fnt@disposition}{\sectfont}
-\aliaskomafont{sectioning}{disposition}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \sectfont
-% \end{fontelement}^^A sectioning
-% \end{fontelement}^^A disposition
-%
-%
-% \begin{option}{headings}
-% \changes{v2.3h}{1996/01/20}{Size of \cs{chapter} decreased by one grade
-% step}
-% \changes{v2.3h}{1996/01/20}{using \cs{chapterheadstartvskip} and
-% \cs{chapterheadendvskip}}
-% \changes{v2.7c}{2000/01/19}{vertical distance after chapters slightly
-% changed and glue added}
-% \changes{v2.98c}{2008/03/10}{added}
-% \changes{v3.10}{2011/08/30}{extended optional argument}
-% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
-% \changes{v3.12}{2013/08/26}{\cs{KOMA@options} replaced by \cs{KOMAoptions}}
-% \changes{v3.12}{2013/11/11}{value \opt{\quotechar=standardclasses} added}
-% \changes{v3.15}{2014/11/24}{using \cs{scr@chapter@beforeskip} and
-% \cs{scr@chapter@afterskip}}
-% \changes{v3.17}{2015/03/09}{using internal value storage}
-% \changes{v3.18}{2015/05/20}{values of \cs{scr@chapter@beforeskip} negative}
-% Option \opt{headings} is the main switch for the headings of all outlines.
-% It provides the following values:
-% \begin{macrocode}
-%<*option>
-\KOMA@key{headings}{%
- \KOMA@set@ncmdkey{headings}{@tempa}{%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=big}:] use big sized headings. This also changes the distances
-% of chapter and redefined \cs{chapterheadstartvskip} and
-% \cs{chapterheadendvskip} (\cls*{scrbook} and \cls*{scrreprt} only).
-% \end{description}
-% \begin{macrocode}
- {big}{0},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=normal}:] use medium sized headings. This also changes the
-% distances of chapter and redefined \cs{chapterheadstartvskip} and
-% \cs{chapterheadendvskip} (\cls*{scrbook} and \cls*{scrreprt} only).
-% \end{description}
-% \begin{macrocode}
- {normal}{1},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=small}:] use small sized headings. This also changes the
-% distances of chapter and redefined \cs{chapterheadstartvskip} and
-% \cs{chapterheadendvskip} (\cls*{scrbook} and \cls*{scrreprt} only).
-% \end{description}
-% \begin{macrocode}
- {small}{2},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=openany}:] same as \opt{open=any} for \cls*{scrbook} and
-% \cls*{scrreprt}.
-% \end{description}
-% \begin{macrocode}
-%<*book|report>
- {openany}{3},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=openright}:] same as \opt{open=right} for \cls*{scrbook} and
-% \cls*{scrreprt}.
-% \end{description}
-% \begin{macrocode}
- {openright}{4},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=openleft}:] same as \opt{open=left} for \cls*{scrbook} and
-% \cls*{scrreprt}.
-% \end{description}
-% \begin{macrocode}
- {openleft}{5},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=twolinechapter}:] use chapter headings with two lines. The first
-% line is a kind of prefix line with the number and a prefix text only. The
-% second one is the heading text.
-% \end{description}
-% \begin{macrocode}
- {twolinechapter}{6},{chapterprefix}{6},{chapterwithprefix}{6},%
- {chapterwithprefixline}{6},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=onelinechapter}:] use chapter headings without the prefix line.
-% \end{description}
-% \begin{macrocode}
- {onelinechapter}{7},{nochapterprefix}{7},{chapterwithoutprefix}{7},%
- {chapterwithoutprefixline}{7},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=twolineappendix}:] use chapter headings with two lines in the
-% appendix. This overwrites \opt{headings=onelinechapter} for the chapters
-% of the appendix.
-% \end{description}
-% \begin{macrocode}
- {twolineappendix}{8},{appendixprefix}{8},{appendixwithprefix}{8},%
- {appendixwithprefixline}{8},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=onelineappendix}:] use chapter headings without prefix line in
-% the appendix. This overwrites \opt{headings=twolinechapter} for the
-% chapters of the appendix.
-% \end{description}
-% \begin{macrocode}
- {onelineappendix}{9},{noappendixprefix}{9},{appendixwithoutprefix}{9},%
- {appendixwithoutprefixline}{9},%
-%</book|report>
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=optiontotocandhead}:] activates the extended option handling of
-% all outline commands and uses an unspecified optional argument as default
-% of for the running head and the ToC entry.
-% \end{description}
-% \begin{macrocode}
- {optiontotocandhead}{10},{optiontoheadandtoc}{10},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=optiontotoc}:] activates the extended option handling of all
-% outline commands and uses an unspecified optional argument as default for
-% the ToC entry only.
-% \end{description}
-% \begin{macrocode}
- {optiontotoc}{11},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=optiontohead}:] activated the extended option handling of all
-% outline commands and uses an unspecified optional argument as default fot
-% the running head.
-% \end{description}
-% \begin{macrocode}
- {optiontohead}{12},%
-% \end{macrocode}
-% \begin{description}
-% \item[\opt{=standardclasses}:] reconfigure headings (at least the fonts) to
-% look more like the headings of the standard classes than the defaults of
-% \KOMAScript.
-% \end{description}
-% \begin{macrocode}
- {standardclasses}{13}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifcase \@tempa\relax% big
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{big}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{normal}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{small}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{standardclasses}%
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{big}%
-% \end{macrocode}
-% First of all we handle the three size values.
-% \begin{description}
-% \item[Note:] These are redefining \cs{chapterheadstartvkip} and
-% \cs{chapterheadendvskip}.
-% \item[Note:] The |+\baselineskip+\parskip| is needed to stay compatible with
-% old version of \KOMAScript{} not providing \cs{DeclareSectionCommand}. They
-% are regarded inside setting of the preamble to print heading with
-% |beforeskip=0pt| at the very beginning of the text area.
-% \end{description}
-% \begin{macrocode}
-%<*book|report>
- \renewcommand*{\scr@chapter@beforeskip}{-3.3\baselineskip-\parskip}%
- \renewcommand*{\scr@chapter@afterskip}{%
- 1.725\baselineskip \@plus .115\baselineskip \@minus .192\baselineskip
- }%
- \renewcommand*{\scr@chapter@innerskip}{.5\baselineskip}%
- \renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}%
- \renewcommand*{\chapterheadendvskip}{%
- \expandafter\ifnum\scr@v@is@lt{3.15}\vspace\@tempskipa
- \else\vskip\@tempskipa\fi
- }%
- \renewcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa}%
-%</book|report>
- \setkomafont{part}{\Huge}%
- \setkomafont{partnumber}{\huge}%
-%<book|report> \setkomafont{chapter}{\huge}%
-%<book|report> \setkomafont{chapterprefix}{\size@chapter}%
- \setkomafont{section}{\Large}%
- \setkomafont{subsection}{\large}%
- \setkomafont{subsubsection}{\normalsize}%
- \setkomafont{paragraph}{\normalsize}%
- \setkomafont{subparagraph}{\normalsize}%
- \or % normal
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{big}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{normal}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{small}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{standardclasses}%
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{normal}%
-%<*book|report>
- \renewcommand*{\scr@chapter@beforeskip}{-3\baselineskip-\parskip}%
- \renewcommand*{\scr@chapter@afterskip}{%
- 1.5\baselineskip \@plus .1\baselineskip \@minus .167\baselineskip
- }%
- \renewcommand*{\scr@chapter@innerskip}{.5\baselineskip}%
- \renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}%
- \renewcommand*{\chapterheadendvskip}{%
- \expandafter\ifnum\scr@v@is@lt{3.15}\vspace\@tempskipa
- \else\vskip\@tempskipa\fi
- }%
- \renewcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa}%
-%</book|report>
- \setkomafont{part}{\huge}%
- \setkomafont{partnumber}{\huge}%
-%<*book|report>
- \setkomafont{chapter}{\LARGE}%
- \setkomafont{chapterprefix}{\size@chapter}%
- \setkomafont{section}{\Large}%
- \setkomafont{subsection}{\large}%
-%</book|report>
-%<*article>
- \setkomafont{section}{\large}%
- \setkomafont{subsection}{\normalsize}%
-%</article>
- \setkomafont{subsubsection}{\normalsize}%
- \setkomafont{paragraph}{\normalsize}%
- \setkomafont{subparagraph}{\normalsize}%
- \or % small
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{big}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{normal}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{small}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{standardclasses}%
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{small}%
-%<*book|report>
- \renewcommand*{\scr@chapter@beforeskip}{-2.8\baselineskip-\parskip}%
- \renewcommand*{\scr@chapter@afterskip}{%
- 1.35\baselineskip \@plus 0.09\baselineskip \@minus .15\baselineskip
- }%
- \renewcommand*{\scr@chapter@innerskip}{.5\baselineskip}%
- \renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}%
- \renewcommand*{\chapterheadendvskip}{%
- \expandafter\ifnum\scr@v@is@lt{3.15}\vspace\@tempskipa
- \else\vskip\@tempskipa\fi
- }%
- \renewcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa}%
-%</book|report>
- \setkomafont{part}{\LARGE}%
- \setkomafont{partnumber}{\LARGE}%
-%<*book|report>
- \setkomafont{chapter}{\Large}%
- \setkomafont{chapterprefix}{\size@chapter}%
- \setkomafont{section}{\large}%
-%</book|report>
-%<*article>
- \setkomafont{section}{\normalsize}%
-%</article>
- \setkomafont{subsection}{\normalsize}%
- \setkomafont{subsubsection}{\normalsize}%
- \setkomafont{paragraph}{\normalsize}%
- \setkomafont{subparagraph}{\normalsize}%
-% \end{macrocode}
-% \cls*{scrbook} and \cls*{scrreprt} also provide settings that are delegated
-% to option \opt{open}.
-% \begin{macrocode}
- \or % openany
-%<*book|report>
- \KOMAoptions{open=any}%
-%</book|report>
- \or % openright
-%<*book|report>
- \KOMAoptions{open=right}%
-%</book|report>
- \or % openleft
-%<*book|report>
- \KOMAoptions{open=left}%
-%</book|report>
-% \end{macrocode}
-% \cls*{scrbook} and \cls*{scrreprt} also provide settings that are delegated
-% to option \opt{chapterprefix} and \opt{appendixprefix}.
-% \begin{macrocode}
- \or % twolinechapter
-%<*book|report>
- \KOMAoptions{chapterprefix=true}%
-%</book|report>
- \or % onelinechapter
-%<*book|report>
- \KOMAoptions{chapterprefix=false}%
-%</book|report>
- \or % twolineappendix
-%<*book|report>
- \KOMAoptions{appendixprefix=true}%
-%</book|report>
- \or % onelineappendix
-%<*book|report>
- \KOMAoptions{appendixprefix=false}%
-%</book|report>
-% \end{macrocode}
-% We have also options to handle the extended optional argument.
-% \begin{macrocode}
- \or % optiontotocandhead
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotocandhead}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontohead}%
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{optiontotocandhead}%
- \scr@activate@xsection{3}%
- \or % optiontotoc
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotocandhead}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontohead}%
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{optiontotoc}%
- \scr@activate@xsection{2}%
- \or % optiontohead
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotocandhead}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotoc}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontohead}%
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{optiontohead}%
- \scr@activate@xsection{1}%
-% \end{macrocode}
-% Last but not least the option to activate the standard class emulation of
-% headings.
-% \begin{macrocode}
- \or % standardclasses
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{big}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{normal}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{small}%
- \KOMA@kav@remove{.\KOMAClassFileName}{headings}{standardclasses}%
- \KOMA@kav@add{.\KOMAClassFileName}{headings}{standardclasses}%
-%<*book|report>
- \renewcommand*{\scr@chapter@beforeskip}{-50\p@}%
- \renewcommand*{\scr@chapter@afterskip}{40\p@}%
- \renewcommand*{\scr@chapter@innerskip}{20\p@}%
- \renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}%
- \renewcommand*{\chapterheadendvskip}{\vskip\@tempskipa}%
- \renewcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa}%
- \setkomafont{part}{\Huge}%
- \setkomafont{partnumber}{\huge}%
- \setkomafont{chapter}{\Huge}%
- \setkomafont{chapterprefix}{\huge}%
-%</book|report>
-%<*article>
- \setkomafont{part}{\huge}%
- \setkomafont{partnumber}{\Large}%
-%</article>
- \setkomafont{section}{\Large}%
- \setkomafont{subsection}{\large}%
- \setkomafont{subsubsection}{\normalsize}%
- \setkomafont{paragraph}{\normalsize}%
- \setkomafont{subparagraph}{\normalsize}%
- \renewcommand*{\sectfont}{\bfseries}%
-%<book|report> \KOMAoptions{open=right,chapterprefix=true}%
- \fi
- \fi
-}
-\KOMA@kav@add{.\KOMAClassFileName}{headings}{big}
-%<book|report>\KOMA@kav@add{.\KOMAClassFileName}{headings}{onelinechapter}
-% \end{macrocode}
-% \end{option}^^A headings
-%
-% \begin{option}{bigheadings,normalheadings,smallheadings}
-% \changes{v2.3h}{1996/01/20}{added}
-% \changes{v2.4g}{1996/11/04}{option name fixed}
-% \changes{v2.98c}{2008/03/10}{obsolete}
-% \changes{v3.01a}{2008/11/20}{deprecated}
-% \begin{macro}{\@bigheadings,\@normalheadings,\@smallheadings}
-% \changes{v2.98c}{2008/03/10}{removed}
-% \end{macro}^^A \@bigheadings … \@smallheadings
-% We also have some deprecated options.
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{bigheadings}{headings=big}
-\KOMA@DeclareDeprecatedOption{normalheadings}{headings=normal}
-\KOMA@DeclareDeprecatedOption{smallheadings}{headings=small}
-%</option>
-% \end{macrocode}
-% \end{option}^^A smallheading,normalheadings,bigheadings
-%
-% \begin{macrocode}
-%</class&!letter>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-title.dtx b/macros/latex/contrib/koma-script/source/scrkernel-title.dtx
deleted file mode 100644
index 5d4963fe4e..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-title.dtx
+++ /dev/null
@@ -1,1003 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-title.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-title.dtx 3747 2022-03-08 09:24:07Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-08 10:24:07 +0100 (Di, 08. Mär 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3747 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-title.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source (title pages)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{3}
-\begin{document}
-\DocInput{scrkernel-title.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2002/06/26}{first version after splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/03/08}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/03/08}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-title.dtx}
-% \title{The Code to Implement the Extended Titles of
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \file{scrkernel-title.dtx} implements on-page titles and title pages, that
-% are extended a lot comparing with the titles of the standard classes.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-%
-% \section{Implementation of Titles}
-%
-% This kind of titles are not needed for letters.
-%
-% \begin{macrocode}
-%<*!letter>
-% \end{macrocode}
-%
-% \begin{option}{titlepage}
-% \changes{v2.95c}{2006/08/21}{using \pkg*{scrkbase}}
-% \changes{v3.12}{2013/11/21}{value \opt{\quotechar=firstiscover} added}
-% \changes{v3.17}{2015/03/10}{using internal value storage}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{macro}{\@titlepagetrue,\@titlepagefalse,\if@titlepage}
-% \begin{macro}{\@titlepageiscoverpagetrue,\@titlepageisvoerpagefalse,
-% \if@titlepageiscoverpage}
-% \changes{v3.12}{2013/11/21}{added}
-% There is support for two kinds of titles: in-page titles also known as title
-% heads and title pages. Usually title pages are the title pages of the inner
-% book. But some users prefer to interpret them as cover instead. With
-% \KOMAScript{} this does in fact makes some sense, but only, if the user uses
-% the mock title and wants to interpret it not as mock title but as cover. So
-% we provide the following values:
-% \begin{description}
-% \item[\opt{=false}:] use a in-page title (\cs{@titlepagefalse},
-% \cs{@titlepageiscoverpagefalse}),
-% \item[\opt{=true}:] use several title pages (\cs{@titlepagetrue},
-% \cs{@titlepageiscoverpagefalse}),
-% \item[\opt{=firstiscover}:] use several title pages and the first one is the
-% cover (\cs{@titlepagetrue}, \cs{@titlepageiscoverpagetrue}). We do not
-% test, if this is was originally a mock title of a main title.
-% \end{description}
-% With package \pkg*{scrextend} this feature is defined as activatable. And
-% the initial values differ from class to class.
-% \begin{macrocode}
-%<*option>
-%<*class>
-\newif\if@titlepage
-%<article>\@titlepagefalse
-%<report|book>\@titlepagetrue
-%</class>
-%<*package&extend>
-\scr@ext@activateable{title}{%
- \scr@ifundefinedorrelax{if@titlepage}{%
- \expandafter\newif\csname if@titlepage\endcsname
- \@titlepagefalse
- }{}%
- \scr@ifundefinedorrelax{if@titlepageiscoverpage}{%
- \expandafter\newif\csname if@titlepageiscoverpage\endcsname
- \@titlepageiscoverpagefalse
- }{}%
-%</package&extend>
-%<*class|package>
-%<class>\newif\if@titlepageiscoverpage
-\KOMA@key{titlepage}[true]{%
-%<!(package&extend)> \Ifstr{#1}{firstiscover}{%
-%<package&extend> \Ifstr{##1}{firstiscover}{%
- \@titlepagetrue
- \@titlepageiscoverpagetrue
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{titlepage}{firstiscover}%
- }{%
- \def\FamilyElseValue{, `firstiscover'}%
-%<!(package&extend)> \KOMA@set@ifkey{titlepage}{@titlepage}{#1}%
-%<package&extend> \KOMA@set@ifkey{titlepage}{@titlepage}{##1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@remove{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{titlepage}{firstiscover}%
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
- }{titlepage}{@titlepage}%
- \@titlepageiscoverpagefalse
- \fi
- }%
-}
-\KOMA@kav@xadd{.%
-%<class> \KOMAClassFileName
-%<package&extend> scrextend.\scr@pkgextension
-}{titlepage}{\if@titlepage true\else false\fi}
-%<*extend>
-% \end{macrocode}
-% For \pkg*{scrextend} we allow to activate the feature at load time.
-% \begin{macrocode}
- \def\scr@ext@immediate@title{%
- \scr@ext@activate{title}%
- \let\scr@ext@immediate@title\relax
- }%
-}
-%</extend>
-%</class|package>
-% \end{macrocode}
-% \begin{option}{notitlepage}
-% \changes{v2.95c}{2006/08/21}{obsolete}
-% \changes{v3.01a}{2008/11/21}{standard not obsolete}
-% \begin{macrocode}
-\KOMA@DeclareStandardOption%
-%<package> [scrextend]%
- {notitlepage}{titlepage=false}
-%</option>
-% \end{macrocode}
-% \end{option}^^A notitlepage
-% \end{macro}^^A \if@titlepageiscoverpage
-% \end{macro}^^A \if@titlepage
-% \end{option}^^A titlepage
-%
-% \begin{command}{\extratitle}
-% \begin{macro}{\@extratitle}
-% \begin{command}{\frontispiece}
-% \changes{v3.25}{2017/11/21}{added}
-% \begin{macro}{\@frontispiece}
-% \changes{v3.25}{2017/11/21}{added}
-% \begin{command}{\titlehead}
-% \begin{macro}{\@titlehead}
-% \begin{command}{\subject}
-% \begin{macro}{\@subject}
-% \begin{command}{\subtitle}
-% \changes{v2.97c}{2007/06/20}{neue Möglichkeit}
-% \begin{macro}{\@subtitle}
-% \changes{v2.97c}{2007/06/20}{added}
-% \begin{command}{\publishers}
-% \begin{macro}{\@publishers}
-% \begin{command}{\uppertitleback}
-% \begin{macro}{\@uppertitleback}
-% \begin{command}{\lowertitleback}
-% \begin{macro}{\@lowertitleback}
-% \begin{command}{\dedication}
-% \begin{macro}{\@dedication}
-% The \LaTeX{} kernel already provides user commands \cs{title}, \cs{author},
-% \cs{date}, which store their arguments globally into macros \cs{@title},
-% \cs{@author} and \cs{@date}. But for \KOMAScript{} these are not enough for
-% several pages of title and even not for the main title. So several more
-% similar commands and macros are defined. All additional user commands but
-% \cs{subject} are long.
-% \begin{description}
-% \item[ToDo:] Make them all robust as \LaTeX{} from 2018/10/01 does. However
-% this could be incompatible with \pkg{uni-titlepage}, so when doing the
-% change, don't forget to also change \pkg{uni-titlepage} if needed.
-% \end{description}
-% For package \pkg*{scrextend} all the code is added to the activatable
-% \texttt{title}.
-% \begin{macrocode}
-%<*body>
-%<package&extend>\scr@ext@addto@activateable{title}{%
-\newcommand*{\@extratitle}{}%
-\newcommand{\extratitle}[1]{\gdef\@extratitle{%
-%<extend> ##1%
-%<!extend> #1%
-}}%
-\newcommand*{\@frontispiece}{}%
-\newcommand{\frontispiece}[1]{\gdef\@frontispiece{%
-%<extend> ##1%
-%<!extend> #1%
-}}%
-\newcommand*{\@titlehead}{}%
-\newcommand{\titlehead}[1]{\gdef\@titlehead{%
-%<extend> ##1%
-%<!extend> #1%
-}}%
-\newcommand*{\@subject}{}%
-\newcommand*{\subject}[1]{\gdef\@subject{%
-%<extend> ##1%
-%<!extend> #1%
-}}%
-\newcommand*{\subtitle}[1]{\gdef\@subtitle{%
-%<extend> ##1%
-%<!extend> #1%
-}}%
-\newcommand*{\@subtitle}{}%
-\newcommand*{\@publishers}{}%
-\newcommand{\publishers}[1]{\gdef\@publishers{%
-%<extend> ##1%
-%<!extend> #1%
-}}%
-\newcommand*{\@uppertitleback}{}%
-\newcommand{\uppertitleback}[1]{\gdef\@uppertitleback{%
-%<extend> ##1%
-%<!extend> #1%
-}}%
-\newcommand*{\@lowertitleback}{}%
-\newcommand{\lowertitleback}[1]{\gdef\@lowertitleback{%
-%<extend> ##1%
-%<!extend> #1%
-}}%
-\newcommand*{\@dedication}{}%
-\newcommand{\dedication}[1]{\gdef\@dedication{%
-%<extend> ##1%
-%<!extend> #1%
-}}%
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-% \end{macro}
-% \end{command}
-% \end{macro}
-% \end{command}
-% \end{macro}
-% \end{command}
-% \end{macro}
-% \end{command}
-% \end{macro}
-% \end{command}
-% \end{macro}
-% \end{command}
-% \end{macro}
-% \end{command}
-% \end{macro}
-% \end{command}
-%
-% \begin{macro}{\next@tpage}
-% \changes{v2.3b}{1995/07/24}{\cs{null} removed}
-% \changes{v2.3g}{1996/01/14}{\cs{newpage} replaced by \cs{clearpage}}
-% \changes{v3.11c}{2013/02/14}{output \cs{@thanks}}
-% \changes{v3.11c}{2013/02/14}{initialize \cs{@thanks}}
-% \changes{v3.20}{2015/10/14}{\cs{setparsizes} resp. similar code added}
-% \begin{macro}{\next@tdpage}
-% \changes{v3.11c}{2013/02/14}{added}
-% \changes{v3.12}{2013/11/21}{\cs{titlepage@restore} added}
-% Because we have more than one title page but all title pages inside one
-% \env{titlepage} environment, we need a special kind of
-% \cs{newpage}/\cs{clearpage}.
-% \begin{description}
-% \item[ToDo:] Replace the original \cs{clearpage} and \cs{cleardoublepage}
-% inside \env{titlepage} by these two macros. With this, users could also
-% have more than one page inside a \env{titlepage} environment.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\next@tpage}{%
- \@thanks\global\let\@thanks\@empty
- \clearpage
- \csname titlepage@restore\endcsname
-%<!extend> \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
-%<extend> \parskip\z@ \parindent\z@ \parfillskip\z@\@plus 1fil
- \thispagestyle{empty}%
- \let\footnote\thanks
- \setcounter{footnote}{0}%
-}
-\newcommand*{\next@tdpage}{%
- \next@tpage\if@twoside \ifodd\value{page}\else\null\next@tpage\fi\fi
-}
-% \end{macrocode}
-% \end{macro}^^A \next@tdpage
-% \end{macro}^^A \next@tpage
-%
-% \begin{command}{\maketitle}
-% \changes{v2.3a}{1995/07/08}{\texttt{plus} replaced by \cs{@plus}}
-% \changes{v2.3a}{1995/07/08}{\texttt{fill} replaced by \cs{fill}}
-% \changes{v2.3a}{1995/07/08}{\cs{vfil} replaced by \cs{vfill}}
-% \changes{v2.3a}{1995/07/08}{using \cs{@makefnmark} in \cs{@makefntext}}
-% \changes{v2.3a}{1995/07/08}{\cs{@makefnmark} and \cs{@makefntext}
-% independent from math mode}
-% \changes{v2.3b}{1995/07/24}{page break inside \cs{@extratitle} in
-% double-sided mode fixed}
-% \changes{v2.3d}{1995/08/19}{\cs{fill} replaced by \texttt{fill}}
-% \changes{v2.3e}{1995/08/30}{support but ignore optional argument in
-% single-sided mode}
-% \changes{v2.3g}{1996/01/14}{several \cs{null} to \cs{next@tpage} added}
-% \changes{v2.3g}{1996/01/14}{\cs{footnote} in titles fixed}
-% \changes{v2.3g}{1996/01/14}{deleting \cs{@date}, \cs{title} etc. to save memory}
-% \changes{v2.3g}{1996/01/14}{\cs{gdef} replaced by \cs{global}\cs{let}}
-% \changes{v2.4}{1996/02/25}{\cs{footnote} in titles fixed again}
-% \changes{v2.4h}{1996/11/09}{always use \cs{sectfont} followed by the side
-% for the \cs{@title}}
-% \changes{v2.4l}{1997/02/06}{using footnote symbols with width 0}
-% \changes{v2.4l}{1997/02/06}{redefining \cs{\@makefnmark} instead of
-% \cs{@makefntext} only}
-% \changes{v2.8d}{2001/07/05}{using \cs{titlepagestyle} for in-page title}
-% \changes{v2.8p}{2001/09/22}{\cs{sectfont} replaced by \cs{titlefont}}
-% \changes{v2.95c}{2006/08/21}{setting paragraph base values}
-% \changes{v2.97c}{2007/08/31}{interleaf pages with page style
-% \pstyle{emmpty}}
-% \changes{v3.04a}{2009/07/14}{distinguishing in-page titles and title pages
-% inside \cs{maketitle} instead of loading time}
-% \changes{v3.11c}{2013/02/14}{mock title moved to new macro}
-% \changes{v3.11c}{2013/02/14}{using \cs{next@tdpage}}
-% \changes{v3.12}{2013/05/29}{using font elements \fnt{titlehead},
-% \fnt{author}, \fnt{date}, \fnt{publishers}, \fnt{dedication}}
-% \changes{v3.12}{2013/11/21}{support for
-% \opt{titlepage\quotechar=firstiscover}}
-% \changes{v3.12}{2013/11/21}{retro page only if needed}
-% \changes{v3.12}{2013/11/21}{kill the title macros only in compatibility mode}
-% \changes{v3.12a}{2014/03/03}{orphan spaced fixed}
-% \changes{v3.12a}{2014/03/03}{output extra/mock title in one-side mode only
-% if not empty}
-% \changes{v3.12a}{2014/03/03}{\cs{next@tdpage} removed from \cs{@maketitle}
-% and \cs{@makeextrattitle}}
-% \changes{v3.13}{2013/10/31}{\cs{next@tdpage} replaced by
-% \cs{cleardoubleemptypage} after dedication (last title page)}
-% \changes{v3.19}{2015/08/25}{don't use empty \cs{titlepagestyle}}
-% \changes{v3.25}{2017/11/21}{support for \cs{@frontispiece}}
-% \changes{v3.27}{2019/01/01}{warning for not empty retro page in single-sided
-% mode}
-% \changes{v3.27}{2019/03/18}{empty \cs{@thanks} after usage}
-% \changes{v3.27}{2019/03/18}{deleting \cs{@thanks} always globally}
-% The user command that prints either the in-page title or the title pages
-% with all the title macros filled before.
-% \begin{macrocode}
-%<package&extend>\let\maketitle\relax\let\@maketitle\relax
-\newcommand*\maketitle[1][1]{%
-% \end{macrocode}
-% To support several \cs{maketitle} in the same document, we have to take care
-% to use the correct \cs{and} every time. So we define it here (instead of
-% outside).
-% \begin{macrocode}
- \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax
- \else
- \def\and{%
- \end{tabular}%
- \hskip 1em \@plus.17fil%
- \begin{tabular}[t]{c}%
- }%
- \fi
-% \end{macrocode}
-% Depending on in-page titles or title pages, we have to use different
-% code. First the title pages.
-% \begin{macrocode}
- \if@titlepage
- \begin{titlepage}
- \setcounter{page}{%
-%<extend> ##1%
-%<!extend> #1%
- }%
-% \end{macrocode}
-% From \KOMAScript~3.12 we need special treatment for the case this is the
-% first title page and the first one should be the cover. The changes here has
-% to be restored later. So we locally define \cs{titlepage@restore} to restore
-% the original parameters.
-% \begin{macrocode}
- \if@titlepageiscoverpage
- \edef\titlepage@restore{%
- \noexpand\endgroup
- \noexpand\global\noexpand\@colht\the\@colht
- \noexpand\global\noexpand\@colroom\the\@colroom
- \noexpand\global\vsize\the\vsize
- \noexpand\global\noexpand\@titlepageiscoverpagefalse
- \noexpand\let\noexpand\titlepage@restore\noexpand\relax
- }%
- \begingroup
- \topmargin=\dimexpr \coverpagetopmargin-1in\relax
- \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax
- \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax
- \textwidth=\dimexpr
- \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax
- \textheight=\dimexpr
- \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax
- \headheight=0pt
- \headsep=0pt
- \footskip=\baselineskip
- \@colht=\textheight
- \@colroom=\textheight
- \vsize=\textheight
- \columnwidth=\textwidth
- \hsize=\columnwidth
- \linewidth=\hsize
- \else
- \let\titlepage@restore\relax
- \fi
- \let\footnotesize\small
- \let\footnoterule\relax
- \let\footnote\thanks
- \renewcommand*\thefootnote{\@fnsymbol\c@footnote}%
- \let\@oldmakefnmark\@makefnmark
- \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
- \ifx\@extratitle\@empty
- \ifx\@frontispiece\@empty
- \else
- \if@twoside\mbox{}\next@tpage\fi
- \noindent\@frontispiece\next@tdpage
- \fi
- \else
- \noindent\@extratitle
- \ifx\@frontispiece\@empty
- \else
- \next@tpage
- \noindent\@frontispiece
- \fi
- \next@tdpage
- \fi
-%<!extend> \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
-%<extend> \parskip\z@ \parindent\z@ \parfillskip\z@\@plus 1fil
- \ifx\@titlehead\@empty \else
- \begin{minipage}[t]{\textwidth}%
- \usekomafont{titlehead}{\@titlehead\par}%
- \end{minipage}\par
- \fi
- \null\vfill
- \begin{center}
- \ifx\@subject\@empty \else
- {\usekomafont{subject}{\@subject\par}}%
- \vskip 3em
- \fi
- {\usekomafont{title}{\huge \@title\par}}%
- \vskip 1em
- {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}%
- \vskip 2em
- {%
- \usekomafont{author}{%
- \lineskip 0.75em
- \begin{tabular}[t]{c}
- \@author
- \end{tabular}\par
- }%
- }%
- \vskip 1.5em
- {\usekomafont{date}{\@date \par}}%
- \vskip \z@ \@plus3fill
- {\usekomafont{publishers}{\@publishers \par}}%
- \vskip 3em
- \end{center}\par
- \@thanks\global\let\@thanks\@empty
- \vfill\null
- \if@twoside
-% \end{macrocode}
-% From \KOMAScript~3.12 we show the retro page only if needed. It is needed in
-% double-sided mode, if the upper and lower elements are not empty.
-% \begin{macrocode}
- \@tempswatrue
- \expandafter\ifnum \@nameuse{scr@v@3.12}>\scr@compatibility\relax
- \else
- \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty
- \@tempswafalse
- \fi\fi
- \fi
- \if@tempswa
- \next@tpage
- \begin{minipage}[t]{\textwidth}
- \@uppertitleback
- \end{minipage}\par
- \vfill
- \begin{minipage}[b]{\textwidth}
- \@lowertitleback
- \end{minipage}\par
- \@thanks\global\let\@thanks\@empty
- \fi
-% \end{macrocode}
-% In single-sided mode, we warn for used but never printed upper and lower
-% retro page variables.
-% \begin{macrocode}
- \else
- \ifx\@uppertitleback\@empty\else
-%<package> \PackageWarning{scrextend}{%
-%<class> \ClassWarning{\KOMAClassName}{%
- non empty \string\uppertitleback\space ignored
- by \string\maketitle\MessageBreak
- in `twoside=false' mode%
- }%
- \fi
- \ifx\@lowertitleback\@empty\else
-%<package> \PackageWarning{scrextend}{%
-%<class> \ClassWarning{\KOMAClassName}{%
- non empty \string\lowertitleback\space ignored
- by \string\maketitle\MessageBreak
- in `twoside=false' mode%
- }%
- \fi
- \fi
- \ifx\@dedication\@empty
- \else
- \next@tdpage\null\vfill
- {\centering\usekomafont{dedication}{\@dedication \par}}%
- \vskip \z@ \@plus3fill
-% \end{macrocode}
-% \begin{description}
-% \item[ToDo:] Why can't we use \cs{next@tdpage} here? Would this be a
-% problem, if we redefine \cs{cleardoublepage} to \cs{next@tdpage}?
-% \end{description}
-% \begin{macrocode}
- \@thanks\global\let\@thanks\@empty
- \cleardoubleemptypage
- \fi
-% \end{macrocode}
-% If we are still at a cover page, we have to restore the title page.
-% \begin{macrocode}
- \ifx\titlepage@restore\relax\else\clearpage\titlepage@restore\fi
- \end{titlepage}
- \else
-% \end{macrocode}
-% Now, the in-page title.
-% \begin{macrocode}
- \par
- \@tempcnta=%
-%<extend> ##1%
-%<!extend> #1%
- \relax\ifnum\@tempcnta=1\else
-%<class> \ClassWarning{\KOMAClassName}{%
-%<package> \PackageWarning{scrextend}{%
- Optional argument of \string\maketitle\space ignored\MessageBreak
- in `titlepage=false' mode%
- }%
- \fi
- \ifx\@uppertitleback\@empty\else
-%<package> \PackageWarning{scrextend}{%
-%<class> \ClassWarning{\KOMAClassName}{%
- non empty \string\uppertitleback\space ignored
- by \string\maketitle\MessageBreak
- in `titlepage=false' mode%
- }%
- \fi
- \ifx\@lowertitleback\@empty\else
-%<package> \PackageWarning{scrextend}{%
-%<class> \ClassWarning{\KOMAClassName}{%
- non empty \string\lowertitleback\space ignored
- by \string\maketitle\MessageBreak
- in `titlepage=false' mode%
- }%
- \fi
- \begingroup
- \let\titlepage@restore\relax
- \renewcommand*\thefootnote{\@fnsymbol\c@footnote}%
- \let\@oldmakefnmark\@makefnmark
- \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
- \next@tdpage
- \if@twocolumn
- \ifnum \col@number=\@ne
- \ifx\@extratitle\@empty
- \ifx\@frontispiece\@empty\else\if@twoside\mbox{}\fi\fi
- \else
- \@makeextratitle
- \fi
- \ifx\@frontispiece\@empty
- \ifx\@extratitle\@empty\else\next@tdpage\fi
- \else
- \next@tpage
- \@makefrontispiece
- \next@tdpage
- \fi
- \@maketitle
- \else
- \ifx\@extratitle\@empty
- \ifx\@frontispiece\@empty\else\if@twoside\mbox{}\fi\fi
- \else
- \twocolumn[\@makeextratitle]%
- \fi
- \ifx\@frontispiece\@empty
- \ifx\@extratitle\@empty\else\next@tdpage\fi
- \else
- \next@tpage
- \twocolumn[\@makefrontispiece]%
- \next@tdpage
- \fi
- \twocolumn[\@maketitle]%
- \fi
- \else
- \ifx\@extratitle\@empty
- \ifx\@frontispiece\@empty\else \mbox{}\fi
- \else
- \@makeextratitle
- \fi
- \ifx\@frontispiece\@empty
- \ifx\@extratitle\@empty\else\next@tdpage\fi
- \else
- \next@tpage
- \@makefrontispiece
- \next@tdpage
- \fi
- \@maketitle
- \fi
- \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi
- \@thanks\global\let\@thanks\@empty
- \endgroup
- \fi
- \setcounter{footnote}{0}%
- \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax
- \let\thanks\relax
- \let\maketitle\relax
- \let\@maketitle\relax
- \global\let\@thanks\@empty
- \global\let\@author\@empty
- \global\let\@date\@empty
- \global\let\@title\@empty
- \global\let\@subtitle\@empty
- \global\let\@extratitle\@empty
- \global\let\@frontispiece\@empty
- \global\let\@titlehead\@empty
- \global\let\@subject\@empty
- \global\let\@publishers\@empty
- \global\let\@uppertitleback\@empty
- \global\let\@lowertitleback\@empty
- \global\let\@dedication\@empty
- \global\let\author\relax
- \global\let\title\relax
- \global\let\extratitle\relax
- \global\let\titlehead\relax
- \global\let\subject\relax
- \global\let\publishers\relax
- \global\let\uppertitleback\relax
- \global\let\lowertitleback\relax
- \global\let\dedication\relax
- \global\let\date\relax
- \fi
- \global\let\and\relax
-}%
-% \end{macrocode}
-% \begin{macro}{\@maketitle}
-% \changes{v2.95c}{2006/08/21}{default paragraph settings}
-% \changes{v3.11c}{2012/02/14}{extra/mock title moved to \cs{@makeextratitle}}
-% \changes{v3.12a}{2014/03/03}{\cs{next@tdpage} removed}
-% \begin{macro}{\@makeextratitle}
-% \changes{v3.11c}{2013/02/14}{added}
-% \changes{v3.12a}{2014/03/03}{\cs{next@tdpage} removed}
-% \begin{macro}{\@makefrontispiece}
-% \changes{v3.25}{2017/11/21}{added}
-% These do the printing of the main title, the extra or mock title and the
-% frontispiece (retro page of the mock title).
-% \begin{macrocode}
-\newcommand*{\@makeextratitle}{%
- \ifx\@extratitle\@empty \else
- \noindent\@extratitle\par
- \fi
-}
-\newcommand*{\@makefrontispiece}{%
- \ifx\@frontispiece\@empty \else
- \noindent\@frontispiece\par
- \fi
-}
-\newcommand*{\@maketitle}{%
- \global\@topnum=\z@
-%<!extend> \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
-%<extend> \parskip\z@ \parindent\z@ \parfillskip\z@\@plus 1fil
- \ifx\@titlehead\@empty \else
- \begin{minipage}[t]{\textwidth}
- \usekomafont{titlehead}{\@titlehead\par}%
- \end{minipage}\par
- \fi
- \null
- \vskip 2em%
- \begin{center}%
- \ifx\@subject\@empty \else
- {\usekomafont{subject}{\@subject \par}}%
- \vskip 1.5em
- \fi
- {\usekomafont{title}{\huge \@title \par}}%
- \vskip .5em
- {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
- \vskip 1em
- {%
- \usekomafont{author}{%
- \lineskip .5em%
- \begin{tabular}[t]{c}
- \@author
- \end{tabular}\par
- }%
- }%
- \vskip 1em%
- {\usekomafont{date}{\@date \par}}%
- \vskip \z@ \@plus 1em
- {\usekomafont{publishers}{\@publishers \par}}%
- \ifx\@dedication\@empty \else
- \vskip 2em
- {\usekomafont{dedication}{\@dedication \par}}%
- \fi
- \end{center}%
- \par
- \vskip 2em
-}%
-% \end{macrocode}
-% \end{macro}^^A \@makefrontispiece
-% \end{macro}^^A \@makeextratitle
-% \end{macro}^^A \@maketitle
-% \end{command}^^A \maketitle
-%
-% \begin{command}{\coverpagetopmargin}
-% \changes{v3.12}{2013/11/21}{added}
-% Top margin of a cover page (\opt{titlepage=firstiscover}).
-% \begin{macrocode}
-\newcommand*{\coverpagetopmargin}{%
- \dimexpr \topmargin+1in\relax
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\coverpagebottommargin}
-% \changes{v3.12}{2013/11/21}{added}
-% Bottom margin of a cover page (\opt{titlepage=firstiscover}).
-% \begin{macrocode}
-\newcommand*{\coverpagebottommargin}{%
- 2\dimexpr\coverpagetopmargin\relax
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\coverpageleftmargin}
-% \changes{v3.12}{2013/11/21}{added}
-% Left margin of a cover page (\opt{titlepage=firstiscover}).
-% \begin{macrocode}
-\newcommand*{\coverpageleftmargin}{%
- \dimexpr \evensidemargin+1in\relax
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\coverpagerightmargin}
-% \changes{v3.12}{2013/11/21}{added}
-% Right margin of a cover page (\opt{titlepage=firstiscover}).
-% \begin{macrocode}
-\newcommand*{\coverpagerightmargin}{\coverpageleftmargin}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{environment}{titlepage}
-% The environment to be used for title pages. Title pages are always
-% one-columned and use page style \pstyle{empty}. We have to take care to
-% reset this at the end of the title page.
-% \begin{description}
-% \item[ToDo:] Wouldn't it be better to use \cs{pagestyle} instead of
-% \cs{thispagestyle}, because \cs{pagestyle} would also be valid, if a user
-% uses more than one page inside a \env{titlepage} environment?
-% \item[ToDo:] See the note about \cs{next@tpage} above.
-% \end{description}
-% \begin{macrocode}
-%<package&extend>\scr@ifundefinedorrelax{titlepage}{%
-\newenvironment{titlepage}{%
-%<report|book> \cleardoublepage
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \else
- \@restonecolfalse\newpage
- \fi
- \thispagestyle{empty}%
- \if@compatibility
- \setcounter{page}{0}%
- \fi
-}{%
- \if@restonecol\twocolumn \else \newpage \fi
-}%
-%<package&extend>}{}%
-% \end{macrocode}
-% \end{environment}
-%
-% In case of package \pkg*{scrextend} the code of activatable \texttt{title}
-% is complete and should be used if activated.
-% \begin{macrocode}
-%<package&extend>}\csname scr@ext@immediate@title\endcsname
-% \end{macrocode}
-%
-% \begin{fontelement}{subtitle}
-% \changes{v2.97c}{2007/06/20}{added}
-% \begin{macrocode}
-\newkomafont{subtitle}{\usekomafont{title}\large}%
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{titlehead}
-% \changes{v3.12}{2013/05/29}{added}
-% \begin{macrocode}
-\newkomafont{titlehead}{}%
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{author}
-% \changes{v3.12}{2013/05/29}{added}
-% \begin{macrocode}
-\newkomafont{author}{\Large}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{date}
-% \changes{v3.12}{2013/05/29}{added}
-% \begin{macrocode}
-\newkomafont{date}{\Large}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{publishers}
-% \changes{v3.12}{2013/05/29}{added}
-% \begin{macrocode}
-\newkomafont{publishers}{\Large}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{dedication}
-% \changes{v3.12}{2013/05/29}{added}
-% \begin{macrocode}
-\newkomafont{dedication}{\Large}
-% \end{macrocode}
-% \end{fontelement}
-%
-% \begin{fontelement}{title}
-% \changes{v2.8o}{2001/09/14}{added}
-% \begin{macro}{\titlefont}
-% \changes{v2.8p}{2001/09/22}{added}
-% Font to be used for the title. The font element has to be defined manually,
-% because of compatibility with \KOMAScript{} up to version 2.8n and old
-% \LaTeX~2.09 style \textsc{Script 2.0}. \cs{titlefont} is a user command for
-% compatibility only. So we index it a internal macro.
-% \begin{macrocode}
-\newcommand*\titlefont{\sectfont}%
-\newcommand*{\scr@fnt@title}{\titlefont}%
-% \end{macrocode}
-% \end{macro}
-% \end{fontelement}
-%
-% \begin{fontelement}{subject}
-% \changes{v2.8q}{2002/01/14}{added}
-% \changes{v2.95}{2002/06/26}{also with \cls*{scrbook}, \cls*{scrreprt},
-% \cls*{scrartcl}}
-% \begin{macro}{\subject@font}
-% \changes{v2.8q}{2002/01/14}{added}
-% \changes{v2.95}{2002/06/26}{also defined with \cls*{scrbook},
-% \cls*{scrreprt}, \cls*{scrartcl}}
-% This has to be defined manually, because of compatibility with \KOMAScript{}
-% up to version 2.8n and old \LaTeX~2.09 style \textsc{Script 2.0}.
-% \begin{macrocode}
-\newcommand*{\subject@font}{\normalfont\normalcolor\bfseries\Large}%
-\newcommand*{\scr@fnt@subject}{\subject@font}%
-%</body>
-% \end{macrocode}
-% \end{macro}
-% \end{fontelement}
-%
-% \begin{macrocode}
-%</!letter>
-% \end{macrocode}
-%
-% \section{Implementation of the Abstract}
-%
-% The abstract is not part of the title but related to it. But maybe it is
-% also a kind of section.
-% \begin{description}
-% \item[ToDo:] Should this be moved to \file{scrkernel-sections.dtx} or a new
-% file \file{scrkernel-abstract.dtx}?
-% \end{description}
-% It is only defined for the classes \cls*{scrartcl} and \cls*{scrreprt} but
-% not for \cls*{scrbook}, \cls*{scrlttr2} or package \pkg*{scrextend}.
-% \begin{macrocode}
-%<*class&(article|report)>
-% \end{macrocode}
-%
-% \begin{option}{abstract}
-% \changes{v2.95c}{2006/08/21}{added}
-% \begin{macro}{\@abstrttrue,\@abstrtfalse,\if@abstrt}
-% \changes{v3.17}{2015/03/10}{using \pkg*{scrkbase}}
-% \KOMAScript{} provides abstracts with and without titles and only for the
-% classes \cls*{scrartcl} and \cls*{scrreprt}. Books usually use a chapter for
-% the abstract. We just need a simple boolean option, that sets a boolean
-% switch.
-% \begin{macrocode}
-%<*option>
-\KOMA@ifkey{abstract}{@abstrt}
-% \end{macrocode}
-% \begin{option}{abstracton,abstractoff}
-% \changes{v2.95c}{2006/08/21}{obsolete}
-% \changes{v3.01a}{2008/11/21}{standard not obsolete}
-% \changes{v3.27}{2019/03/13}{deprecated}
-% \begin{macrocode}
-\KOMA@DeclareDeprecatedOption{abstracton}{abstract=true}
-\KOMA@DeclareDeprecatedOption{abstractoff}{abstract=false}
-%</option>
-% \end{macrocode}
-% \end{option}^^A abstracton,abstractoff
-% \end{macro}^^A \if@abstrt
-% \end{option}^^A abstract
-%
-% \begin{environment}{abstract}
-% \changes{v2.3a}{1995/07/08}{\cs{@endparpenalty} added}
-% \changes{v2.3g}{1996/01/14}{\cs{@beginparpenalty} added}
-% \changes{v2.7a}{2001/01/04}{\cs{section*} replaced by \cs{addsec*}}
-% \changes{v3.04a}{2009/07/14}{\cs{if@titlepage} moved inside environment}
-% The abstract is different for documents with title page. We provide an
-% abstract with or without title.
-% \begin{macrocode}
-%<*body>
-\newenvironment{abstract}{%
- \if@titlepage
- \titlepage
- \null\vfil
- \@beginparpenalty\@lowpenalty
- \if@abstrt
- \begin{center}
- \normalfont\sectfont\nobreak\abstractname
- \@endparpenalty\@M
- \end{center}
- \fi
- \else
- \if@twocolumn\if@abstrt
- \addsec*{\abstractname}
- \fi
- \else
- \if@abstrt
- \small
- \begin{center}
- {\normalfont\sectfont\nobreak\abstractname
- \vspace{-.5em}\vspace{\z@}}%
- \end{center}
- \fi
- \quotation
- \fi
- \fi
-}{%
- \if@titlepage
- \par\vfil\null\endtitlepage
- \else
- \if@twocolumn\else\endquotation\fi
- \fi
-}
-% \end{macrocode}
-% \end{environment}^^A abstract
-%
-% \begin{command}{\abstractname}
-% \changes{v3.36}{2022/03/08}{explicit definition for English languages}
-% The name of the abstract (if a title is used).
-% \begin{macrocode}
-\newcommand*\abstractname{Abstract}
-\providecaptionname{american,australian,british,canadian,english,newzealand,%
- UKenglish,ukenglish,USenglish,usenglish}\abstractname{Abstract}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \abstractname
-%
-% \begin{macrocode}
-%</class&(article|report)>
-% \end{macrocode}
-%
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx b/macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx
deleted file mode 100644
index f092e44a3b..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx
+++ /dev/null
@@ -1,2712 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-tocstyle.dtx
-% Copyright (c) Markus Kohm, 2015-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-tocstyle.dtx 3703 2022-02-15 07:41:54Z kohm $
-% The runs of run-time file generation:
-%<preidentify>%%% (run: preidentify)
-% - everything that is needed before selfidentification of resulting files
-% (unused)
-%<identify>%%% (run: identify)
-% - everything that is needed for selfidentification of resulting files
-% (unused)
-%<prepare>%%% (run: prepare)
-% - everything that is needed to define options
-%<option>%%% (run: option)
-% - definition of options (unused)
-%<execoption>%%% (run: execoption)
-% - initial option executions up to \KOMAProcessOptions
-% (unused)
-%<body>%%% (run: body)
-% - everything, that should be done after \KOMAProcessOptions
-%<exit>%%% (run: exit)
-% - everything, that should be done immediately before leaving the file
-% (unused)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-15 08:41:54 +0100 (Di, 15. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3703 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-tocstyle.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source (TOC styles)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{3}
-\begin{document}
-\DocInput{scrkernel-tocstyle.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v3.20}{2015/11/13}{new}
-% \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}
-%
-% \GetFileInfo{scrkernel-tocstyle.dtx}
-% \title{The Predifined Directory Styles of
-% \href{https://komascript.de}{\KOMAScript} Package \pkg*{tocbasic} and the
-% \href{https://komascript.de}{\KOMAScript} Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \file{scrkernel-tocstyle.dtx} provides the predefined directory (or ToC)
-% styles. The basic styles of \pkg*{tocbasic} are defined independent from
-% the \KOMAScript{} classes. However, the \KOMAScript{} classes define their
-% own styles depending on the styles of \pkg*{tocbasic}.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of the Basic ToC Styles of Package
-% \pkg*{tocbasic} and the Specific ToC Styles of the \KOMAScript{} classes}
-%
-% \subsection{Settings independent from directories but nevertheless basis for
-% them}
-%
-% Before \KOMAScript~3.20 the commands here were part of the \KOMAScript{}
-% classes. But now they are part of package \pkg*{tocbasic}, because they
-% are more basic than only to be used by the \KOMAScript{} classes.
-%
-%
-% \begin{command}{\numberline}
-% \changes{v3.20}{2016/03/10}{\cs{numberline} defined indirectly by
-% \cs{scr@numberline}}
-% \begin{macro}{\scr@numberline}
-% \changes{v2.3c}{1995/08/06}{\cs{numberline} redefined}
-% \changes{v3.06}{2010/05/18}{Usage of\cs{numberline@prefix} and
-% \cs{numberline@postfix}}
-% \changes{v3.12}{2013/11/22}{use \cs{numberline@numberformat} only, if the
-% argument expands to a non-empty string}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed into \cs{Ifstr}}
-% This macro is used indirectly in the ToC and has to be redefined to fulfil
-% rules~5 and 6 of DUDDEN, 20th edition.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\scr@numberline}[1]{%
- \numberline@box{%
- \numberline@prefix
- \Ifstr{#1}{}{#1}{%
- \numberline@numberformat{#1}%
- }%
- \numberline@postfix
- }%
-}
-% \end{macrocode}
-% \begin{command}{\usetocbasicnumberline}
-% \changes{v3.20}{2016/03/15}{added}
-% The macro tests, whether \cs{numberline} used \cs{scr@numberline}. If not,
-% the optional argument is executed and a afterwards \cs{numberline} is
-% redefined.
-% \begin{macrocode}
-\newcommand*{\usetocbasicnumberline}[1][%
- \PackageInfo{tocbasic}{Using my definition of `\string\numberline'}%
-]{%
- \@tempswatrue
- \begingroup
- \def\scr@numberline##1{\global\@tempswafalse}%
-% \end{macrocode}
-% For \cs{numberline} \cs{@tempdima} usually is the width reserved for the
-% number. To avoid problems with to low values, we use the maximum value for
-% the test.
-% \begin{macrocode}
- \@tempdima\maxdimen
- \sbox\@tempboxa{\numberline{0}}%
- \endgroup
- \if@tempswa #1\renewcommand*{\numberline}[1]{\scr@numberline{##1}}\fi
-}
-% \end{macrocode}
-% \end{command}^^A \usetocbasicnumberline
-% \begin{macro}{\numberline@prefix}
-% \changes{v3.06}{2010/05/18}{added}
-% The default is just empty. It can be used, e.g., to print something before
-% the number or to make the number right aligned.
-% \begin{macrocode}
-\newcommand*{\numberline@prefix}{}
-% \end{macrocode}
-% \end{macro}^^A \numberline@prefix
-% \begin{macro}{\numberline@postfix}
-% \changes{v3.06}{2010/05/18}{added}
-% The default is \cs{hfil} to make the number left aligned.
-% \begin{macrocode}
-\newcommand*{\numberline@postfix}{\hfil}
-% \end{macrocode}
-% \end{macro}^^A \numberline@postfix
-% \begin{macro}{\numberline@numberformat}
-% \changes{v3.06}{2010/05/18}{added}
-% \changes{v3.12}{2013/11/22}{don't output anything, if argument expands to
-% an empty string}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed into \cs{Ifstr}}
-% Used to fulfil rules~5 and 6 of DUDEN, 20th edition.
-% \begin{macrocode}
-\newcommand*{\numberline@numberformat}[1]{%
- \Ifstr{#1}{}{}{\numberline@numberprefix#1\numberline@numberpostfix}%
-}
-% \end{macrocode}
-% \begin{macro}{\numberline@numberprefix}
-% \changes{v3.20}{2016/03/15}{added}
-% Used to prefix the number inside \cs{numberline@numberformat}. In opposite
-% to \cs{numberline@prefix} it is only used, if the argument of
-% \cs{numberline@numberformat} and therefore the argument of \cs{numberline}
-% is not empty.
-% \begin{macrocode}
-\newcommand*{\numberline@numberprefix}{}
-% \end{macrocode}
-% \end{macro}^^A \numberline@numberprefix
-% \begin{macro}{\numberline@numberpostfix}
-% \changes{v3.20}{2016/03/15}{added}
-% Used to postfix the number inside \cs{numberline@numberformat}. In opposite
-% to \cs{numberline@prefix} it is only used, if the argument of
-% \cs{numberline@numberformat} and therefore the argument of \cs{numberline}
-% is not empty.
-% \begin{macrocode}
-\newcommand*{\numberline@numberpostfix}{}
-% \end{macrocode}
-% \end{macro}^^A \numberline@numberpostfix
-% \end{macro}^^A \numberline@numberformat
-% \begin{macro}{\numberline@box}
-% \changes{v3.06}{2010/05/18}{added}
-% Is used to put the sectioning number into a box.
-% \begin{macrocode}
-\newcommand*{\numberline@box}[1]{\hb@xt@\@tempdima{#1}}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \numberline@box
-% \end{macro}^^A \scr@numberline
-%
-% \begin{macrocode}
-%<*class&body>
-\let\numberline\scr@numberline
-%</class&body>
-% \end{macrocode}
-% \end{command}^^A \numberline
-%
-%
-% \subsection{The basics of the styles}
-%
-% From \KOMAScript~3.20 styles are a new basic feature for the entries into
-% the table of contents and other directories. Each style consists of a
-% command that defines the entry command and the corresponding options. The
-% options are used to provide configuration features.
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% \changes{v3.20}{2015/11/17}{ToC styles have the \texttt{KOMAarg} member
-% \texttt{.dte}}
-% \begin{macrocode}
-%<*body>
-\DefineFamily{KOMAarg}
-\DefineFamilyMember[.dte]{KOMAarg}
-%</body>
-% \end{macrocode}
-%
-% \begin{macro}{\@DefineTOCEntryOption}
-% \changes{v3.20}{2015/04/10}{added}
-% The definition of the options is done by a general interface. Important is,
-% that the definition of the option is done indirectly, which means: Here we
-% define a command, that defines the options when needed. Note, not only the
-% entry command interface itself but also the sectioning command interface may
-% and should be able to setup options of the entry commands.
-% The parameters:
-% \begin{description}
-% \item[\marg{style}: \meta{string},] name of the entry style
-% \item[\marg{option}: \meta{string},] name of the option
-% \item[\oarg{value}:] default value of the option depending on the
-% \meta{definition}
-% \item[\marg{definition}: \meta{code},] definition of the option
-% \end{description}
-% \begin{macro}{\@DefineTOCEntryOptionWithoutDefault,\@DefineTOCEntryOptionWithDefault}
-% \changes{v3.20}{2015/11/10}{added}
-% Because of the options argument at position 3 (and because we've made this
-% before \pkg{xparse} became part of the \LaTeX{} kernel), we need two
-% auxiliary macros.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\@DefineTOCEntryOption}[2]{%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2}%
- }%
- \kernel@ifnextchar [%]
- {\@DefineTOCEntryOptionWithDefault{#1}{#2}}%
- {\@DefineTOCEntryOptionWithoutDefault{#1}{#2}}%
-}
-\newcommand*{\@DefineTOCEntryOptionWithoutDefault}[3]{%
- \DefineFamilyKey[.dte]{KOMAarg}{#2}{#3}%
-}
-\newcommand*{\@DefineTOCEntryOptionWithDefault}{}
-\def\@DefineTOCEntryOptionWithDefault#1#2[#3]#4{%
- \l@addto@macro\scr@dte@doopts{[{#3}]}%
- \DefineFamilyKey[.dte]{KOMAarg}{#2}[{#3}]{#4}%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@DefineTOCEntryOptionWithoutDefault,\@DefineTOCEntryOptionWithDefault
-% \end{macro}^^A \@DefineTOCEntryOption
-%
-% \begin{macro}{\@RelaxTOCEntryOptions}
-% \changes{v3.20}{2015/04/10}{added}
-% Reset all options of the current do-list back to \cs{relax}.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\@RelaxTOCEntryOptions}{%
- \begingroup
- \def\do@endgroup{\endgroup}%
- \def\do##1{%
- \l@addto@macro\do@endgroup{%
- \RelaxFamilyKey[.dte]{KOMAarg}{##1}%
- }%
- \scr@dte@gobbleopt
- }%
- \scr@dte@doopts
- \do@endgroup
-}
-\newcommand{\scr@dte@gobbleopt}[1][]{}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@RelaxTOCEntryOptions
-%
-% \begin{macro}{\@DefineTOCEntryListOption}
-% \changes{v3.31}{2020/06/11}{added}
-% Use \cs{DefineTOCEntryOption} to define an option that represents a list.
-% It has following parameters:
-% \begin{description}
-% \item[\marg{style}: \meta{string},] name of the entry style
-% \item[\marg{option}: \meta{string},] name of the option
-% \item[\oarg{default}: \meta{string},] default value of the option
-% \item[\marg{prefix}: \meta{string},] prefix of the macro to be defined
-% \item[\marg{postfix}: \meta{string},] postfix of the macro to be defined
-% \item[\marg{description}: \meta{String},] short description of the option
-% \item[\oarg{init}: \meta{code},] initialization of the option
-% \end{description}
-% Between the \meta{prefix} and \meta{postfix} automatically
-% \cs{scr@dte@current} will be added. A copy option using ``\opt{:=}''
-% instead of ``\opt{=}'' and an add (append) option using ``\opt{+=}''
-% instead of ``\opt{=}'' is also defined.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\@DefineTOCEntryListOption}[2]{%
- \kernel@ifnextchar [%]
- {\@DefineTOCEntryListOptionWithDefault{#1}{#2}}
- {\@DefineTOCEntryListOptionWithoutDefault{#1}{#2}}%
-}
-% \end{macrocode}
-% \begin{macro}{\@DefineTOCEntryListOptionWithoutDefault}
-% \changes{v3.31}{2020/06/11}{added}
-% This is the case without default value. So we only have to define
-% the three internal options, that manipulate a macro.
-% \begin{macrocode}
-\newcommand*{\@DefineTOCEntryListOptionWithoutDefault}[5]{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#3}{#4}{#2}{#5}%
- \@DefineTOCEntryOption{#1}{#2}{%
- \expandafter\protected@edef\csname #3\scr@dte@current#4\endcsname{##1}%
- \FamilyKeyStateProcessed
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#3##1#4}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #3\scr@dte@current#4\expandafter\endcsname
- \csname #3##1#4\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2+}{%
- \expandafter\protected@edef\csname #2\scr@dte@current#4\endcsname{%
- \csname #2\scr@dte@current#4\endcsname,##1}%
- \FamilyKeyStateProcessed
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}\noexpand\do{#2+}%
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \@DefineTOCEntryListOptionWithoutDefault
-% \begin{macro}{\@DefineTOCEntryListOptionWithDefault}
-% \changes{v3.31}{2020/06/11}{added}
-% This is the case with a default value. It's almost the same, but the
-% argument numbers and using \cs{DefineFamilyKey} with optional argument.
-% \begin{macrocode}
-\newcommand*{\@DefineTOCEntryListOptionWithDefault}{}
-\def\@DefineTOCEntryListOptionWithDefault#1#2[#3]#4#5#6{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#4}{#5}{#2}{#6}%
- \@DefineTOCEntryOption{#1}{#2}[{#3]}{%
- \expandafter\protected@edef\csname #4\scr@dte@current#5\endcsname{##1}%
- \FamilyKeyStateProcessed
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#4##1#5}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #4\scr@dte@current#5\expandafter\endcsname
- \csname #4##1#5\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2+}{%
- \expandafter\protected@edef\csname #4\scr@dte@current#5\endcsname{%
- \csname #4\scr@dte@current#5\endcsname,##1}%
- \FamilyKeyStateProcessed
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}\noexpand\do{#2+}%
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@DefineTOCEntryListOptionWithDefault
-% \end{macro}^^A \@DefineTOCEntryListOption
-%
-% \begin{macro}{\@DefineTOCEntryLengthOption}
-% \changes{v3.20}{2015/12/04}{added}
-% Use \cs{DefineTOCEntryOption} to define an option that represents a length
-% macro. The parameters are:
-% \begin{description}
-% \item[\marg{style}: \meta{string},] name of the entry style
-% \item[\marg{option}: \meta{string},] name of the option
-% \item[\oarg{value}: \meta{length},] default value of the option
-% \item[\marg{prefix}: \meta{string},] prefix of the name of the macro
-% \item[\marg{postfix}: \meta{string},] postfix of the name of the macro
-% \item[\marg{explanation}: \meta{string},] short description of the option
-% \item[\oarg{init}: \meta{code},] initialisation code for the option
-% \end{description}
-% Later, when the option is defines, between \meta{prefix} and \meta{postfix}
-% will be added \cs{scr@dte@current} automatically. This is the name of the
-% entry level, e.g., |subsection| or |figure|. Additionally to
-% the option \marg{option} itself a copy option \marg{option}\opt{:} will
-% be defined. So it seems, that for the copy option a colon is before the
-% equal sign. The value of the copy option has to be the name of another entry
-% level and it copies the value of the same option of that entry
-% level. Additionally an additive option with appended plus sign is
-% defined. It adds the new value to the existing one.
-% \begin{macro}{\@DefineTOCEntryLengthOptionWithoutDefault,
-% \@DefineTOCEntryLengthOptionWithDefault}
-% \changes{v3.20}{2015/11/10}{added}
-% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
-% \changes{v3.27}{2019/10/03}{automatic definition of add option}
-% \begin{macro}{\@DefineTOCEntryLengthOptionMacro,\@DefineTOCEntryAddLengthOptionMacro}
-% \changes{v3.27}{2019/10/03}{added}
-% Because of the options argument at position 3 (and because we've made this
-% before \pkg{xparse} became part of the \LaTeX{} kernel), we need three
-% auxiliary macros.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\@DefineTOCEntryLengthOption}[2]{%
- \kernel@ifnextchar [%]
- {\@DefineTOCEntryLengthOptionWithDefault{#1}{#2}}
- {\@DefineTOCEntryLengthOptionWithoutDefault{#1}{#2}}%
-}
-\newcommand*{\@DefineTOCEntryLengthOptionWithoutDefault}[5]{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#3}{#4}{#2}{#5}%
- \@DefineTOCEntryOption{#1}{#2}{%
- \@DefineTOCEntryLengthOptionMacro{#2}{#3}{#4}{##1}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#3##1#4}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #3\scr@dte@current#4\expandafter\endcsname
- \csname #3##1#4\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2+}{%
- \@DefineTOCEntryAddLengthOptionMacro{#2+}{#3}{#4}{##1}%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}%
- \noexpand\do{#2:}\noexpand\do{#2+}%
- }%
-}
-\newcommand*{\@DefineTOCEntryLengthOptionWithDefault}{}
-\def\@DefineTOCEntryLengthOptionWithDefault#1#2[#3]#4#5#6{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#4}{#5}{#2}{#6}%
- \@DefineTOCEntryOption{#1}{#2}[{#3}]{%
- \@DefineTOCEntryLengthOptionMacro{#2}{#4}{#5}{##1}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#4##1#5}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #4\scr@dte@current#5\expandafter\endcsname
- \csname #4##1#5\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2+}{%
- \@DefineTOCEntryAddLengthOptionMacro{#2+}{#4}{#5}{##1}%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}%
- \noexpand\do{#2:}\noexpand\do{#2+}%
- }%
-}
-\newcommand*{\@DefineTOCEntryLengthOptionMacro}[4]{%
- \protected@edef\reserved@a{%
- \noexpand\FamilySetLength{KOMAarg}{#1}{\noexpand\@tempskipa}{#4}%
- }\reserved@a
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifscr@dte@expandtopt
- \expandafter\edef\csname #2\scr@dte@current#3\endcsname{%
- \the\@tempskipa}%
- \else
- \expandafter\protected@edef\csname #2\scr@dte@current#3\endcsname{#4}%
- \fi
- \fi
-}
-\newcommand*{\@DefineTOCEntryAddLengthOptionMacro}[4]{%
- \@ifundefined{#2\scr@dte@current#3}{%
- \FamilyKeyStateUnknownValue
- }{%
- \protected@edef\reserved@a{%
- \noexpand\FamilySetLength{KOMAarg}{#1}{\noexpand\@tempskipa}{#4}%
- }\reserved@a
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifscr@dte@expandtopt
- \expandafter\edef\csname #2\scr@dte@current#3\endcsname{%
- \the\glueexpr\@tempskipa
- +\csname #2\scr@dte@current#3\endcsname\relax}%
- \else
- \expandafter\protected@edef\csname #2\scr@dte@current#3\endcsname{%
- \the\glueexpr #4%
- +\csname #2\scr@dte@current#3\endcsname\relax}%
- \fi
- \fi
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@DefineTOCEntryAddLengthOptionMacro,\@DefineTOCEntryLengthOptionMacro
-% \end{macro}^^A \@DefineTOCEntryLengthOptionWithDefault,\@DefineTOCEntryLengthOptionWithoutDefault
-% \end{macro}^^A \@DefineTOCEntryLengthOption
-%
-% \begin{macro}{\@DefineTOCEntryNumberOption}
-% \changes{v3.20}{2015/12/04}{added}
-% Use \cs{DefineTOCEntryOption} to define an option that represents a number
-% macro. The parameters are:
-% \begin{description}
-% \item[\marg{style}: \meta{string},] name of the entry style
-% \item[\marg{option}: \meta{string},] name of the option
-% \item[\oarg{value}: \meta{length},] default value of the option
-% \item[\marg{prefix}: \meta{string},] prefix of the name of the macro
-% \item[\marg{postfix}: \meta{string},] postfix of the name of the macro
-% \item[\marg{explanation}: \meta{string},] short description of the option
-% \item[\oarg{init}: \meta{code},] initialisation code for the option
-% \end{description}
-% Later, when the option is defines, between \meta{prefix} and \meta{postfix}
-% will be added \cs{scr@dte@current} automatically. This is the name of the
-% entry level, e.g., |subsection| or |figure|. Additionally to
-% the option \marg{option} itself a copy option \marg{option}\opt{:} will
-% be defined. So it seems, that for the copy option a colon is before the
-% equal sign. The value of the copy option has to be the name of another entry
-% level and it copies the value of the same option of that entry
-% level. Additionally an additive option with appended plus sign is
-% defined. It adds the new value to the existing one.
-% \begin{macro}{\@DefineTOCEntryNumberOptionWithoutDefault,
-% \@DefineTOCEntryNumberOptionWithDefault}
-% \changes{v3.20}{2015/11/12}{added}
-% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
-% \changes{v3.27}{2019/10/03}{automatic definition of add option}
-% \begin{macro}{\@DefineTOCEntryNumberOptionMacro,\@DefineTOCEntryAddNumberOptionMacro}
-% \changes{v3.27}{2019/10/03}{added}
-% Because of the options argument at position 3 (and because we've made this
-% before \pkg{xparse} became part of the \LaTeX{} kernel), we need three
-% auxiliary macros.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\@DefineTOCEntryNumberOption}[2]{%
- \kernel@ifnextchar [%]
- {\@DefineTOCEntryNumberOptionWithDefault{#1}{#2}}
- {\@DefineTOCEntryNumberOptionWithoutDefault{#1}{#2}}%
-}
-\newcommand*{\@DefineTOCEntryNumberOptionWithoutDefault}[5]{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#3}{#4}{#2}{#5}%
- \@DefineTOCEntryOption{#1}{#2}{%
- \@DefineTOCEntryNumberOptionMacro{#2}{#3}{#4}{##1}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#3##1#4}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #3\scr@dte@current#4\expandafter\endcsname
- \csname #3##1#4\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2+}{%
- \@DefineTOCEntryAddNumberOptionMacro{#2+}{#3}{#4}{##1}%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}%
- \noexpand\do{#2:}\noexpand\do{#2+}%
- }%
-}
-\newcommand*{\@DefineTOCEntryNumberOptionWithDefault}{}
-\def\@DefineTOCEntryNumberOptionWithDefault#1#2[#3]#4#5#6{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#4}{#5}{#2}{#6}%
- \@DefineTOCEntryOption{#1}{#2}[{#3}]{%
- \@DefineTOCEntryNumberOptionMacro{#2}{#4}{#5}{##1}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#4##1#5}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #4\scr@dte@current#5\expandafter\endcsname
- \csname #4##1#5\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2+}{%
- \@DefineTOCEntryAddNumberOptionMacro{#2+}{#4}{#5}{##1}%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}%
- \noexpand\do{#2:}\noexpand\do{#2+}%
- }%
-}
-\newcommand*{\@DefineTOCEntryNumberOptionMacro}[4]{%
- \protected@edef\reserved@a{%
- \noexpand\FamilySetCounterMacro{KOMAarg}{#1}{%
- \expandafter\noexpand\csname #2\scr@dte@current#3\endcsname
- }{#4}%
- }\reserved@a
-}
-\newcommand*{\@DefineTOCEntryAddNumberOptionMacro}[4]{%
- \@ifundefined{#2\scr@dte@current#3}{%
- \FamilyKeyStateUnknownValue
- }{%
- \FamilySetCounterMacro{KOMAarg}{#1}{%
- \reserved@a
- }{#4}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \expandafter\edef\csname #2\scr@dte@current#3\endcsname{%
- \the\numexpr \reserved@a+\csname #2\scr@dte@current#3\endcsname\relax
- }%
- \fi
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@DefineTOCEntryAddNumberOptionMacro,\@DefineTOCEntryNumberOptionMacro
-% \end{macro}^^A \@DefineTOCEntryNumberOptionWithDefault,\@DefineTOCEntryNumberOptionWithoutDefault
-% \end{macro}^^A \@DefineTOCEntryNumberOption
-%
-% \begin{macro}{\@DefineTOCEntryBooleanOption}
-% \changes{v3.20}{2015/12/04}{added}
-% Use \cs{DefineTOCEntryOption} to define an option that represents a boolean
-% switch. The parameters are:
-% \begin{description}
-% \item[\marg{style}: \meta{string},] name of the entry style
-% \item[\marg{option}: \meta{string},] name of the option
-% \item[\oarg{value}: \meta{length},] default value of the option
-% \item[\marg{prefix}: \meta{string},] prefix of the name of the macro
-% \item[\marg{postfix}: \meta{string},] postfix of the name of the macro
-% \item[\marg{explanation}: \meta{string},] short description of the option
-% \item[\oarg{init}: \meta{code},] initialisation code for the option
-% \end{description}
-% Later, when the option is defines, between \meta{prefix} and \meta{postfix}
-% will be added \cs{scr@dte@current} automatically. This is the name of the
-% entry level, e.g., |subsection| or |figure|. Additionally to
-% the option \marg{option} itself a copy option \marg{option}\opt{:} will
-% be defined. So it seems, that for the copy option a colon is before the
-% equal sign. The value of the copy option has to be the name of another entry
-% level and it copies the value of the same option of that entry
-% level.
-% \begin{macro}{\@DefineTOCEntryBoolOptionWithoutDefault,
-% \@DefineTOCEntryBoolOptionWithDefault}
-% \changes{v3.20}{2015/11/12}{added}
-% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
-% \begin{macro}{\@DefineTOCEntryBoolOptionMacro}
-% \changes{v3.20}{2015/11/12}{added}
-% Because of the options argument at position 3 (and because we've made this
-% before \pkg{xparse} became part of the \LaTeX{} kernel), we need three
-% auxiliary macros.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\@DefineTOCEntryBooleanOption}[2]{%
- \kernel@ifnextchar [%]
- {\@DefineTOCEntryBoolOptionWithDefault{#1}{#2}}
- {\@DefineTOCEntryBoolOptionWithoutDefault{#1}{#2}}%
-}
-\newcommand*{\@DefineTOCEntryBoolOptionWithoutDefault}[5]{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{if#3}{#4}{#2}{#5}%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#3}{#4false}{#2}{#5}%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#3}{#4false}{#2}{#5}%
- \@DefineTOCEntryOption{#1}{#2}[true]{%
- \@DefineTOCEntryBoolOptionMacro{#2}{#3}{#4}{##1}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{if#3##1#4}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname if#3\scr@dte@current#4\expandafter\endcsname
- \csname if#3##1#4\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}%
- }%
-}
-\newcommand*{\@DefineTOCEntryBoolOptionWithDefault}{}
-\def\@DefineTOCEntryBoolOptionWithDefault#1#2[#3]#4#5#6{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{if#4}{#5}{#2}{#6}%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#4}{#5true}{#2}{#6}%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#4}{#5false}{#2}{#6}%
- \@DefineTOCEntryOption{#1}{#2}[{#3}]{%
- \@DefineTOCEntryBoolOptionMacro{#2}{#4}{#5}{##1}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{if#4##1#5}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname if#4\scr@dte@current#5\expandafter\endcsname
- \csname if#4##1#5\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}%
- }%
-}
-\newcommand*{\@DefineTOCEntryBoolOptionMacro}[4]{%
- \@ifundefined{if#2\scr@dte@current#3}{%
- \expandafter\newif\csname if#2\scr@dte@current#3\endcsname
- }{}%
- \FamilySetBool{KOMAarg}{#1}{#2\scr@dte@current#3}{#4}%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@DefineTOCEntryBoolOptionMacro
-% \end{macro}^^A \@DefineTOCEntryBoolOptionWithDefault,\@DefineTOCEntryBoolOptionWithoutDefault
-% \end{macro}^^A \@DefineTOCEntryBooleanOption
-%
-% \begin{macro}{\@DefineTOCEntryIfOption}
-% \changes{v3.20}{2015/12/06}{added}
-% Use \cs{DefineTOCEntryOption} to define an option that represents an if
-% command. The option itself is a boolean option. The parameters are:
-% \begin{description}
-% \item[\marg{style}: \meta{string},] name of the entry style
-% \item[\marg{option}: \meta{string},] name of the option
-% \item[\oarg{value}: \meta{length},] default value of the option
-% \item[\marg{prefix}: \meta{string},] prefix of the name of the macro
-% \item[\marg{postfix}: \meta{string},] postfix of the name of the macro
-% \item[\marg{explanation}: \meta{string},] short description of the option
-% \end{description}
-% Later, when the option is defines, between \meta{prefix} and \meta{postfix}
-% will be added \cs{scr@dte@current} automatically. This is the name of the
-% entry level, e.g., |subsection| or |figure|. Additionally to
-% the option \marg{option} itself a copy option \marg{option}\opt{:} will
-% be defined. So it seems, that for the copy option a colon is before the
-% equal sign. The value of the copy option has to be the name of another entry
-% level and it copies the value of the same option of that entry
-% level.
-% \begin{macro}{\@DefineTOCEntryIfOptionWithoutDefault,
-% \@DefineTOCEntryIfOptionWithDefault}
-% \changes{v3.20}{2015/11/12}{added}
-% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
-% \begin{macro}{\@DefineTOCEntryIfOptionMacro}
-% \changes{v3.20}{2015/11/12}{added}
-% Because of the options argument at position 3 (and because we've made this
-% before \pkg{xparse} became part of the \LaTeX{} kernel), we need three
-% auxiliary macros.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\@DefineTOCEntryIfOption}[2]{%
- \kernel@ifnextchar [%]
- {\@DefineTOCEntryIfOptionWithDefault{#1}{#2}}
- {\@DefineTOCEntryIfOptionWithoutDefault{#1}{#2}}%
-}
-\newcommand*{\@DefineTOCEntryIfOptionWithoutDefault}[5]{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{If#3}{#4}{#2}{#5}%
- \@DefineTOCEntryOption{#1}{#2}[true]{%
- \@DefineTOCEntryIfOptionMacro{#2}{#3}{#4}{##1}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{If#3##1#4}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname If#3\scr@dte@current#4\expandafter\endcsname
- \csname If#3##1#4\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}%
- }%
-}
-\newcommand*{\@DefineTOCEntryIfOptionWithDefault}{}
-\def\@DefineTOCEntryIfOptionWithDefault#1#2[#3]#4#5#6{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{If#4}{#5}{#2}{#6}%
- \@DefineTOCEntryOption{#1}{#2}[{#3}]{%
- \@DefineTOCEntryIfOptionMacro{#2}{#4}{#5}{##1}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{If#4##1#5}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname If#4\scr@dte@current#5\expandafter\endcsname
- \csname If#4##1#5\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}%
- }%
-}
-\newcommand*{\@DefineTOCEntryIfOptionMacro}[4]{%
- \FamilySetBool{KOMAarg}{#1}{@tempswa}{#4}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \if@tempswa
- \expandafter\let\csname If#2\scr@dte@current#3\endcsname\@firstoftwo
- \else
- \expandafter\let\csname If#2\scr@dte@current#3\endcsname\@secondoftwo
- \fi
- \fi
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@DefineTOCEntryIfOptionMacro
-% \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
-% macro. The parameters are:
-% \begin{description}
-% \item[\marg{style}: \meta{string},] name of the entry style
-% \item[\marg{option}: \meta{string},] name of the option
-% \item[\oarg{value}: \meta{length},] default value of the option
-% \item[\marg{prefix}: \meta{string},] prefix of the name of the macro
-% \item[\marg{postfix}: \meta{string},] postfix of the name of the macro
-% \item[\marg{explanation}: \meta{string},] short description of the option
-% \item[\oarg{init}: \meta{code},] initialisation code for the option
-% \end{description}
-% Later, when the option is defines, between \meta{prefix} and \meta{postfix}
-% will be added \cs{scr@dte@current} automatically. This is the name of the
-% entry level, e.g., |subsection| or |figure|. Additionally to
-% the option \marg{option} itself a copy option \marg{option}\opt{:} will
-% be defined. So it seems, that for the copy option a colon is before the
-% equal sign. The value of the copy option has to be the name of another entry
-% level and it copies the value of the same option of that entry
-% level. Additionally an appending option with appended plus sign is
-% defined. It appends the new code to the existing one.
-% \begin{macro}{\@DefineTOCEntryCommandOptionWithoutDefault}
-% \changes{v3.20}{2015/11/12}{added}
-% \begin{macro}{\@@DefineTOCEntryCommandOptionWithoutDefault}
-% \changes{v3.20}{2015/11/12}{added}
-% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
-% \changes{v3.27}{2019/10/03}{automatic definition of add option}
-% \begin{macro}{\@DefineTOCEntryCommandOptionWithDefault}
-% \changes{v3.20}{2015/11/12}{added}
-% \begin{macro}{\@@DefineTOCEntryCommandOptionWithDefault}
-% \changes{v3.20}{2015/11/12}{added}
-% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
-% \changes{v3.27}{2019/10/03}{automatic definition of add option}
-% \begin{macro}{\@DefineTOCEntryCommandOptionMacro,\@@DefineTOCEntryCommandOptionMacro}
-% \changes{v3.20}{2015/11/26}{added}
-% Because of the options argument at position 3 (and because we've made this
-% before \pkg{xparse} became part of the \LaTeX{} kernel), we need three
-% auxiliary macros.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\@DefineTOCEntryCommandOption}[2]{%
- \kernel@ifnextchar [%]
- {\@DefineTOCEntryCommandOptionWithDefault{#1}{#2}}
- {\@DefineTOCEntryCommandOptionWithoutDefault{#1}{#2}}%
-}
-\newcommand*{\@DefineTOCEntryCommandOptionWithoutDefault}[4]{%
- \@testopt{\@@DefineTOCEntryCommandOptionWithoutDefault{#1}{#2}{#3}{#4}}0%
-}
-\newcommand*{\@@DefineTOCEntryCommandOptionWithoutDefault}{}%
-\def\@@DefineTOCEntryCommandOptionWithoutDefault#1#2#3#4[#5]#6{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#3}{#4}{#2}{#6}%
- \ifcase #5
- \@DefineTOCEntryOption{#1}{#2}{%
- \@DefineTOCEntryCommandOptionMacro{#2}{#3}{#4}[#5]{##1}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#3##1#4}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #3\scr@dte@current#4\expandafter\endcsname
- \csname #3##1#4\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}%
- }%
- \or
- \@DefineTOCEntryOption{#1}{#2}{%
- \@DefineTOCEntryCommandOptionMacro{#2}{#3}{#4}[#5]{##1{####1}}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#3##1#4}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #3\scr@dte@current#4\expandafter\endcsname
- \csname #3##1#4\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}%
- }%
- \else
- \PackageError{tocbasic}{only one argument supported}{%
- \string\DefineTOCEntryCommandOption\space currently supports only
- commands with\MessageBreak
- at most one argument not #5}%
- \fi
-}
-\newcommand*{\@DefineTOCEntryCommandOptionWithDefault}{}
-\def\@DefineTOCEntryCommandOptionWithDefault#1#2[#3]#4#5{%
- \@testopt{\@@DefineTOCEntryCommandOptionWithDefault{#1}{#2}{#3}{#4}{#5}}0%
-}
-\def\@@DefineTOCEntryCommandOptionWithDefault#1#2#3#4#5[#6]#7{%
- \@TOCEntryStyleNeedsCommandByOption{#1}{#4}{#5}{#2}{#7}%
- \ifcase #6
- \@DefineTOCEntryOption{#1}{#2}[{#3}]{%
- \@DefineTOCEntryCommandOptionMacro{#2}{#4}{#5}[#6]{##1}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#4##1#5}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #4\scr@dte@current#5\expandafter\endcsname
- \csname #4##1#5\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}%
- }%
- \or
- \@DefineTOCEntryOption{#1}{#2}[{#3}]{%
- \@DefineTOCEntryCommandOptionMacro{#2}{#4}{#5}[#6]{##1{####1}}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#4##1#5}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #4\scr@dte@current#5\expandafter\endcsname
- \csname #4##1#5\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}%
- }%
- \or
- \@DefineTOCEntryOption{#1}{#2}[{#3}]{%
- \@DefineTOCEntryCommandOptionMacro{#2}{#4}{#5}[#6]{##1{####1}{####2}}%
- }%
- \DefineFamilyKey[.dte]{KOMAarg}{#2:}{%
- \scr@ifundefinedorrelax{#4##1#5}{\FamilyKeyStateUnknownValue}{%
- \expandafter\let
- \csname #4\scr@dte@current#5\expandafter\endcsname
- \csname #4##1#5\endcsname
- \FamilyKeyStateProcessed
- }%
- }%
- \edef\scr@dte@doopts{%
- \unexpanded\expandafter{\scr@dte@doopts}\noexpand\do{#2:}%
- }%
- \else
- \PackageError{tocbasic}{only one argument supported}{%
- \string\DefineTOCEntryCommandOption\space currently supports only
- commands with\MessageBreak
- at most two argument not #6}%
- \fi
-}
-\newcommand*{\@DefineTOCEntryCommandOptionMacro}[3]{%
- \@testopt{\@@DefineTOCEntryCommandOptionMacro{#1}{#2}{#3}}0%
-}
-\newcommand*{\@@DefineTOCEntryCommandOptionMacro}{}
-\long\def\@@DefineTOCEntryCommandOptionMacro#1#2#3[#4]#5{%
- \let\l@ngrel@x\long
- \expandafter\@yargdef\csname #2\scr@dte@current#3\endcsname\@ne{#4}{#5}%
- \FamilyKeyStateProcessed
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@@DefineTOCEntryCommandOptionMacro,\@DefineTOCEntryCommandOptionMacro
-% \end{macro}^^A \@@DefineTOCEntryCommandOptionWithDefault
-% \end{macro}^^A \@DefineTOCEntryCommandOptionWithDefault
-% \end{macro}^^A \@@DefineTOCEntryCommandOptionWithoutDefault
-% \end{macro}^^A \@DefineTOCEntryCommandOptionWithoutDefault
-% \end{macro}^^A \@DefineTOCEntryCommandOption
-%
-% \begin{macro}{\@AddToDeclareTOCStyleEntryPreCheckNeeds,
-% \@PreToDeclareTOCStyleEntryPreCheckNeeds}
-% \changes{v3.20}{2015/12/06}{added}
-% Before the existence of the mandatory commands can be tested in
-% \cs{DeclareTOCStyleEntry}, a hook will be executed. To add code to this hook
-% we have this command with the following parameter:
-% \begin{description}
-% \item[\marg{code}: \meta{code},] code to be executed.
-% \end{description}
-% Please note, this command is used inside the init code of styles, which
-% means inside \cs{DeclareTOCEntryStyle}, but the hook is inside
-% \cs{DeclareTOCStyleEntry}. The code of the hook has exactly one argument,
-% the name of the ToC entry level.
-% \begin{macrocode}
-%<*body>
-\newcommand{\@AddToDeclareTOCEntryStylePreCheckNeeds}[1]{%
- \expandafter\providecommand\csname scr@dte@precheck\endcsname[1]{}%
- \expandafter\l@addto@macro@a\csname scr@dte@precheck\endcsname
-}
-\newcommand{\@PreToDeclareTOCEntryStylePreCheckNeeds}[1]{%
- \expandafter\providecommand\csname scr@dte@precheck\endcsname[1]{}%
- \expandafter\l@preto@macro@a\csname scr@dte@precheck\endcsname
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@AddToDeclareTOCStyleEntryPreCheckNeeds,\@PreToDeclareTOCStyleEntryPreCheckNeeds
-%
-% \begin{macro}{\@TOCEntryStyleNeedsCommandByOption}
-% \changes{v3.20}{2015/12/04}{added}
-% Adds one or more commands to the list of mandatory commands. The parameters
-% are:
-% \begin{description}
-% \item[\marg{style}:] The style \meta{string}, that needs the command(s).
-% \item[\marg{prefix}:] Prefix \meta{string} of the mandatory command(s).
-% \item[\marg{postfix}:] Postfix \meta{string} of the mandatory command(s).
-% \item[\marg{Option}:] Option \meta{string}, that defines the command(s).
-% \item[\marg{explanation}:] Short description.
-% \end{description}
-% Between \meta{prefix} and \meta{postfix} will be added the name of the entry
-% level automatically.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\@TOCEntryStyleNeedsCommandByOption}[5]{%
- \expandafter\providecommand\expandafter*\csname scr@dte@#1@needs\endcsname{}%
- \expandafter\l@addto@macro\csname scr@dte@#1@needs\endcsname{%
- \do{#2}{#3}{#4}{#5}%
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@TOCEntryStyleNeedsCommandByOption
-%
-% \begin{command}{\TOCEntryStyleInitCode,\TOCEntryStyleStartInitCode}
-% \changes{v3.20}{2015/11/25}{added}
-% Executes commands before a ToC entry level command of this style is defined
-% and before the \emph{needs} list will be executed. The parameters are:
-% \begin{description}
-% \item[\marg{style}:] The style \meta{string} that should be initialised.
-% \item[\marg{code}:] The code that should be executed to initialise the
-% style. The code has one argument \texttt{\#1} which is the name of the ToC
-% entry level.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand{\TOCEntryStyleInitCode}[1]{%
- \scr@ifundefinedorrelax{scr@dte@#1@init}{%
- \expandafter\providecommand\expandafter*%
- \csname scr@dte@#1@init\endcsname[1]%
- }{%
- \expandafter\l@addto@macro@a\csname scr@dte@#1@init\endcsname
- }%
-}
-\newcommand{\TOCEntryStyleStartInitCode}[1]{%
- \scr@ifundefinedorrelax{scr@dte@#1@init}{%
- \expandafter\providecommand\expandafter*%
- \csname scr@dte@#1@init\endcsname[1]%
- }{%
- \expandafter\l@preto@macro@a\csname scr@dte@#1@init\endcsname
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \TOCEntryStyleInitCode,\TOCEntryStyleStartInitCode
-% \begin{macro}{\@ExecuteTOCEntryStyleInitCode}
-% \changes{v3.20}{2015/12/04}{added}
-% Executes the init code of one style. The first argument is the name of the
-% style, the second the name of the ToC entry level, which will be used as
-% argument of the init code (see above).
-% \begin{macrocode}
-\newcommand*{\@ExecuteTOCEntryStyleInitCode}[2]{%
- \let\scr@dte@doopts\@empty
-% \end{macrocode}
-% \changes{v3.27}{2019/10/02}{init \cs{scr@dte@\meta{Stil}@init}}
-% Because the definition which options or which macros are needed for a style
-% takes place via the declaration of the options and this declaration does not
-% take place with the definition of the style but with the assignment of the
-% style to an entry, the do list of this information must also be deleted
-% here. Otherwise it would constantly grow over all entries of the same style
-% and thus contain various entries several times. Probably it would be better
-% to actually create a list per entry here instead of one per style, but
-% that's just not how it is. So the same list is always rebuilt here and must
-% therefore be reset at the beginning.
-% \begin{macrocode}
- \expandafter\let\csname scr@dte@#1@needs\endcsname\relax
- \scr@ifundefinedorrelax{scr@dte@#1@init}{}{%
- \def\DefineTOCEntryBooleanOption{\@DefineTOCEntryBooleanOption{#1}}%
- \def\DefineTOCEntryCommandOption{\@DefineTOCEntryCommandOption{#1}}%
- \def\DefineTOCEntryIfOption{\@DefineTOCEntryIfOption{#1}}%
- \def\DefineTOCEntryLengthOption{\@DefineTOCEntryLengthOption{#1}}%
- \def\DefineTOCEntryListOption{\@DefineTOCEntryListOption{#1}}%
- \def\DefineTOCEntryNumberOption{\@DefineTOCEntryNumberOption{#1}}%
- \def\DefineTOCEntryOption{\@DefineTOCEntryOption{#1}}%
- \def\AddToDeclareTOCEntryStylePreCheckNeeds{%
- \@AddToDeclareTOCEntryStylePreCheckNeeds{#1}}%
- \def\PreToDeclareTOCEntryStylePreCheckNeeds{%
- \@PreToDeclareTOCEntryStylePreCheckNeeds{#1}}%
- \def\TOCEntryStyleNeedsCommandByOption{%
- \@TOCEntryStyleNeedsCommandByOption{#1}}%
- \@nameuse{scr@dte@#1@init}{#2}%
- \let\TOCEntryStyleNeedsCommandByOption\relax
- \let\PreToDeclareTOCEntryStylePreCheckNeeds\relax
- \let\AddToDeclareTOCEntryStylePreCheckNeeds\relax
- \let\DefineTOCEntryOption\relax
- \let\DefineTOCEntryNumberOption\relax
- \let\DefineTOCEntryListOption\relax
- \let\DefineTOCEntryLengthOption\relax
- \let\DefineTOCEntryIfOption\relax
- \let\DefineTOCEntryCommandOption\relax
- \let\DefineTOCEntryBooleanOption\relax
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@ExecuteTOCEntryStyleInitCode
-%
-%
-% \begin{command}{\DeclareTOCStyleEntry}
-% \changes{v3.20}{2015/11/13}{added}
-% 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@dte@def@l@\meta{style}}. That needs exactly one argument, the
-% \meta{level name}.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\DeclareTOCStyleEntry}[3][]{%
- \scr@ifundefinedorrelax{scr@dte@def@l@#2}{%
- \PackageError{tocbasic}{toc entry style `#2' undefined}{%
- Somebody told me to define toc entry `#3' with style `#2',\MessageBreak
- but I do not know style `#2'.\MessageBreak
- You should first define the style then define the entry.\MessageBreak
- If you'll continue, I'll ignore the command. This could result
- in\MessageBreak
- further error messages.%
- }%
- }{%
- \let\scr@dte@precheck\@gobble
- \def\scr@dte@current{#3}%
- \@ExecuteTOCEntryStyleInitCode{#2}{#3}%
- \IfArgIsEmpty{#1}{}{%
- \FamilyBoolKey[.dte]{KOMAarg}{expandtopt}{scr@dte@expandtopt}%
- \scr@dte@expandtoptfalse
- \FamilyExecuteOptions[.dte]{KOMAarg}{#1}%
- \RelaxFamilyKey[.dte]{KOMAarg}{expandtopt}%
- }%
- \@RelaxTOCEntryOptions
- \let\scr@dte@doopts\relax
- \let\scr@dte@current\relax
- \scr@ifundefinedorrelax{#3tocdepth}{%
- \expandafter\let\csname #3tocdepth\expandafter\endcsname
- \csname #3numdepth\endcsname
- }{}%
- \scr@dte@precheck{#3}%
- \let\scr@dte@precheck\relax
- \begingroup
- \aftergroup\@tempswatrue
- \def\do##1##2##3##4{%
- \scr@ifundefinedorrelax{##1#3##2}{%
- \PackageError{tocbasic}{toc style `#2' needs ##4}{%
- Usually the ##4 is defined using option `##3'.\MessageBreak
- In some cases it may be set defining command
- `\expandafter\string\csname ##1#3##2\endcsname'.\MessageBreak
- If you'll continue, I'll ignore the command. This could result
- in\MessageBreak
- further error messages.%
- }%
- \aftergroup\@tempswafalse
- }{}%
- }%
- \do{}{tocdepth}{level}{toc style level}%
- \@nameuse{scr@dte@#2@needs}%
- \endgroup
- \if@tempswa
- \@nameuse{scr@dte@def@l@#2}{#3}%
-% \end{macrocode}
-% \changes{v3.27}{2019/10/02}{macro name prefix for style information changed}
-% Note: Before \KOMAScript~3.27 the style name of an entry was stored in
-% \cs{scr@dte@\meta{level name}@style}. But this war wrong, because the prefix
-% |scr@dte| is used for attributes of the style (while declaring an
-% entry), but the style is an attribute of the entry. So usage of the prefix
-% |scr@tso| would be much better. This means usage of
-% \cs{scr@dte@\meta{level name}@style} is deprecated and should be replaced by
-% \cs{scr@tso@\meta{level name}@style}.
-% \begin{macrocode}
- \expandafter\edef\csname scr@dte@#3@style\endcsname{#2}%
- \expandafter\edef\csname scr@tso@#3@style\endcsname{#2}%
-% \end{macrocode}
-% \changes{v3.21}{2016/06/09}{\cs{toclevel@\emph{level}} added for \pkg{hyperref}}
-% At least \pkg{hyperref}, but several other packages too, depend on a
-% \pkg{hyperref} compatible storage of the level number. So we define it here
-% additionally. Unfortunately \pkg{hyperref} overwrites this definition, so we
-% do so after loading the package and sometimes also at |\begin{document}|.
-% \begin{macrocode}
- \expandafter\let\csname toclevel@#3\expandafter\endcsname
- \csname #3tocdepth\endcsname
- \if@atdocument\else
- \scr@ifundefinedorrelax{AfterPackage}{%
- \AtBeginDocument
- }{%
- \AfterPackage*{hyperref}%
- }%
- {%
- \expandafter\let\csname toclevel@#3\expandafter\endcsname
- \csname #3tocdepth\endcsname
- }%
- \fi
- \fi
- }%
-}
-%</body>
-% \end{macrocode}
-% \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.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\DeclareTOCStyleEntries}[3][]{%
- \edef\reserved@a{#3}%
- \@for \reserved@a:=\reserved@a \do {%
- \scr@trim@spaces\reserved@a
- \ifx\reserved@a\@empty\else
- \IfArgIsEmpty{#1}{%
- \edef\reserved@a{%
- \unexpanded{\DeclareTOCStyleEntry{#2}}{\reserved@a}}%
- }{%
- \edef\reserved@a{%
- \unexpanded{\DeclareTOCStyleEntry[{#1}]{#2}}{\reserved@a}}%
- }%
- \reserved@a
- \fi
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \DeclareTOCStyleEntries
-%
-% \begin{command}{\DeclareTOCEntryStyle}
-% \changes{v3.20}{2015/11/17}{added}
-% \begin{macro}{\@DeclareTOCEntryStyle}
-% \changes{v3.20}{2015/11/17}{added}
-% 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@ifnextchar [%]
- {\@DeclareTOCEntryStyle{#1}}%
- {\@DeclareTOCEntryStyle{#1}[]}%
-}
-\newcommand{\@DeclareTOCEntryStyle}{}
-\long\def\@DeclareTOCEntryStyle#1[#2]#3{%
- \@namedef{scr@dte@def@l@#1}##1{%
- \@namedef{l@##1}####1####2{%
- \TOC@EntryStartHook{##1}%
- #3%
- \TOC@EntryEndHook{##1}%
- }%
- }%
- \TOCEntryStyleInitCode{#1}{%
- \DefineTOCEntryNumberOption{level}{}{tocdepth}{toc entry level}%
- #2%
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \@DeclareTOCEntryStyle
-% \end{command}^^A \DeclareTOCEntryStyle
-%
-%
-% \begin{macro}{\TOC@EntryStartHook,\TOC@EntryEndHook}
-% \changes{v3.20}{2016/01/12}{added}
-% For every ToC entry, that has been defined by \KOMAScript{}, there is one
-% \emph{hook}, that will be executed before the corresponding ToC entry, and
-% another \emph{hook}, that will executed after the corresponding ToC entry. Inside
-% the \emph{hook} commands \texttt{\#1} is the name of the ToC level. Generally
-% the \emph{hook} commands should not do any output and should neither change
-% \cs{lastpenalty} nor \len{lastskip}. The user is responsible for this!
-% However, because this \emph{hook} is very dangerous, we only have two
-% internal macros for it but no user command to add new commands to the
-% hook. So it is a kind of last chance mechanism.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\TOC@EntryStartHook}[1]{}
-\newcommand*{\TOC@EntryEndHook}[1]{}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \TOC@EntryStartHook,\TOC@EntryEndHook
-%
-%
-% \begin{command}{\CloneTOCEntryStyle}
-% \changes{v3.20}{2015/11/25}{added}
-% The user command clones the style from \texttt{\#1} to style
-% \texttt{\#2}. After cloning you can change the new style.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\CloneTOCEntryStyle}[2]{%
-% \end{macrocode}
-% First of all copy the ToC entry command.
-% \begin{macrocode}
- \expandafter\let\csname scr@dte@def@l@#2\expandafter\endcsname
- \csname scr@dte@def@l@#1\endcsname
-% \end{macrocode}
-% Then copy the \meta{initialization code}.
-% \begin{macrocode}
- \expandafter\let\csname scr@dte@#2@init\expandafter\endcsname
- \csname scr@dte@#1@init\endcsname
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{macro}{\@pnumwidth,\@tocrmarg,\@dotsep}
-% \changes{v3.27}{2019/05/11}{moved from the classes to the package}
-% \begin{description}
-% \item[\cs{@pnumwidth}] is the space of the page number.
-% \item[\cs{@tocrmarg}] is the right margin of entries with more than one
-% line. Usually this should be larger than \cs{@pnumwidth}.
-% \item[\cs{\@dotsep}] is the space between the dots of a dotted connecting line.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\providecommand*\@pnumwidth{1.55em}
-\providecommand*\@tocrmarg {2.55em}
-\providecommand*\@dotsep {4.5}
-%</body>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Predefined ToC entry styles}
-%
-% You can read this code as examples for defining ToC entry styles using the
-% commands from the previous sections. Some of them are very basic. Others are
-% extensions of the basic styles. \file{scrdocstrip.tex} has to process this
-% code several times to generate all the styles.
-%
-% \begin{macrocode}
-%<*style>
-% \end{macrocode}
-%
-% \begin{macro}{\scr@dte@def@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.
-% \begin{macrocode}
-%<*gobble>
-%%% (run: style,gobble)
-\DeclareTOCEntryStyle{gobble}{}%
-%</gobble>
-% \end{macrocode}
-% \end{macro}^^A \scr@dte@def@l@gobble
-%
-% \begin{macro}{\scr@dte@def@l@dottedtocline}
-% \changes{v3.20}{2015/11/20}{ToC style \texttt{dottedtocline} added}
-% The most simple real ToC entry style is |dottedtocline|. It used the
-% \LaTeX{} kernel macro \cs{@dottedtocline}. You should not use this style for
-% \KOMAScript. But it may be useful to be used with the standard
-% classes. However, in my opinion style |tocline| would always be the better one.
-% \begin{macro}{\scr@dte@def@l@undottedtocline}
-% \changes{v3.20}{2015/11/20}{ToC style \texttt{undottedtocline} added}
-% Style |undottedtocline| corresponds to the style, that is used for chapter
-% entries of the standard class \cls*{book} or \cls*{report}. In opposite to
-% that, it also supports an horizontal indent. So you can alternatively
-% interpret it as a variant of |dottedtocline| without dots.
-% \begin{macro}{\scr@dte@def@l@largetocline}
-% \changes{v3.20}{2015/11/20}{ToC style \texttt{largetocline} added}
-% Style |largetocline| corresponds to the style, that is used for part entries
-% of the standard classes. Once again and in opposite to the original code of
-% the standard classes, this style supports an entry indent. But an additional
-% number width is not supported. Instead the entries will be printed hanging.
-% \begin{macro}{\scr@dte@def@l@tocline}
-% \changes{v3.20}{2015/11/22}{ToC style \texttt{tocline} added}
-% |tocline| is a very flexible style. It is intended to be used for entries with
-% one or more line. It is used for all the ToC entries of the \KOMAScript{}
-% classes. The classes also clone this style several times.
-% \begin{macro}{\scr@dte@def@l@toctext}
-% \changes{3.27}{2019/07/08}{ToC style \texttt{toctext} added}
-% So far all mentioned styles are intended to generate one paragraph per
-% entry. Style |toctext| generated only one paragraph for all consecutive
-% entries. So it prints \emph{text inside} a paragraph.
-% \begin{macrocode}
-%<*dottedtocline|undottedtocline|largetocline|tocline|toctext>
-%<*dottedtocline>
-%%% (run: style,dottedtocline)
-\DeclareTOCEntryStyle{dottedtocline}[{%
-%</dottedtocline>
-%<*undottedtocline>
-%%% (run: style,undottedtocline)
-\DeclareTOCEntryStyle{undottedtocline}[{%
-%</undottedtocline>
-%<*largetocline>
-%%% (run: style, largetocline)
-\DeclareTOCEntryStyle{largetocline}[{%
-%</largetocline>
-%<*toctext>
-%%% (run: style,toctext)
-\DeclareTOCEntryStyle{toctext}[{%
-%</toctext>
-%<*tocline>
-%%% (run: style,tocline)
-\DeclareTOCEntryStyle{tocline}[{%
-%</tocline>
-% \end{macrocode}
-% \changes{v3.31}{2020/06/09}{style \texttt{toctext} also provides option
-% \opt{beforeskip}}
-% \begin{macrocode}
-%<*tocline|toctext>
- \DefineTOCEntryLengthOption{beforeskip}%
- {scr@tso@}{@beforeskip}{vertical skip before the entry}%
-%</tocline|toctext>
-%<*tocline>
- \DefineTOCEntryIfOption{breakafternumber}%
- {scr@tso@}{@breakafternumber}{line break after number flag}%
- \DefineTOCEntryIfOption{dynnumwidth}%
- {scr@tso@}{@dynnumwidth}{dynamic number width flag}%
-% \end{macrocode}
-% \changes{v3.31}{2020/06/08}{option for indent follows list}
-% \begin{macrocode}
- \DefineTOCEntryListOption{indentfollows}%
- {scr@tso@}{@indentfollows}{list of levels that define the indent}%
- \DefineTOCEntryIfOption{dynindent}%
- {scr@tso@}{@dynindent}{dynamic indent width flag}%
-%</tocline>
-%<*tocline|toctext>
- \DefineTOCEntryCommandOption{entryformat}%
- {scr@tso@}{@entryformat}[1]{entry format}%
- \DefineTOCEntryCommandOption{entrynumberformat}%
- {scr@tso@}{@numberformat}[1]{entry number format}%
-%</tocline|toctext>
-%<*tocline>
- \DefineTOCEntryCommandOption{linefill}[\TOCLineLeaderFill]%
- {scr@tso@}{@linefill}{filling between text and page number}%
-%</tocline>
-%<*toctext>
- \DefineTOCEntryCommandOption{prepagenumber}%
- {scr@tso@}{@prepagenumber}{separator between text and page number}%
-%</toctext>
-%<*tocline|toctext>
- \DefineTOCEntryLengthOption{numsep}%
- {scr@tso@}{@numsep}{entry number separation}%
-%</tocline|toctext>
-%<*tocline>
- \DefineTOCEntryCommandOption{onstarthigherlevel}%
- {scr@tso@}{@LastTOCLevelWasLower}{start higher level entry hook}%
- \DefineTOCEntryCommandOption{onstartlowerlevel}%
- {scr@tso@}{@LastTOCLevelWasHigher}{start lower level entry hook}%
- \DefineTOCEntryCommandOption{onstartsamelevel}%
- {scr@tso@}{@LastTOCLevelWasSame}{start same level entry hook}%
-%</tocline>
-%<*toctext>
- \DefineTOCEntryCommandOption{onstartfirstentry}%
- {scr@tso@}{@onstartfirstentry}{output at start of paragraph}%
- \DefineTOCEntryCommandOption{onstartentry}%
- {scr@tso@}{@onstartentry}{output at start of all entries but the first}%
- \DefineTOCEntryCommandOption{onendlastentry}%
- {scr@tso@}{@onendlastentry}{output at end of paragraph}%
- \DefineTOCEntryCommandOption{afterpar}%
- {scr@tso@}{@afterpar}{settings after end of paragraph}%
- \DefineTOCEntryCommandOption{onendentry}%
- {scr@tso@}{@onendentry}{output at end of all entries but the last}%
-%</toctext>
-%<*tocline>
- \DefineTOCEntryCommandOption{pagenumberbox}%
- {scr@tso@}{@pagenumberbox}[1]{page number box}%
-%</tocline>
-%<*tocline|toctext>
- \DefineTOCEntryCommandOption{pagenumberformat}%
- {scr@tso@}{@pagenumberformat}[1]{page number format}%
-%</tocline|toctext>
-% \end{macrocode}
-% \changes{v3.27}{2019/05/24}{new option \opt{pagenumberwidth}}
-% \changes{v3.27}{2019/05/24}{new option \opt{rightindent}}
-% Die Optionen \opt{pagenumberwidth} und \opt{rightindent} ersetzen
-% innerhalb des Stils |tocline| die Makros \cs{@pnumwidth} und
-% \cs{@tocrmarg}.
-% \begin{macrocode}
-%<*tocline>
- \DefineTOCEntryLengthOption{pagenumberwidth}%
- {scr@tso@}{@pagenumberwidth}{width of page number box}%
-%</tocline>
-%<*tocline|toctext>
- \DefineTOCEntryLengthOption{rightindent}%
- {scr@tso@}{@rightindent}{entry's text right indent}%
-%</tocline|toctext>
-% \end{macrocode}
-% \changes{v3.21}{2016/06/06}{new option \opt{raggedentrytext}}
-% Unfortunately definition of option \opt{raggedentrytext} is somehow
-% cumbersome, to be more or less compatible with former definition of
-% \cs{raggedchapterentry}.
-% \begin{macrocode}
-%<*tocline>
- \DefineTOCEntryOption{raggedentrytext}[true]{%
- \FamilySetBool{KOMAarg}{raggedentrytext}{@tempswa}{##1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \if@tempswa
- \expandafter\let\csname ragged\scr@dte@current entry\endcsname
- \raggedright
- \else
- \expandafter\let\csname ragged\scr@dte@current entry\endcsname
- \relax
- \fi
- \fi
- }%
- \DefineTOCEntryIfOption{raggedpagenumber}%
- {scr@tso@}{@raggedpage}{page number ragged flag}%
-%</tocline>
-%<*toctext>
- \DefineTOCEntryIfOption{raggedright}%
- {scr@tso@}{@raggedright}{use raggedright for the whole paragraph}%
-%</toctext>
- \DefineTOCEntryLengthOption{indent}%
- {scr@tso@}{@indent}{entry indent}%
-%<*dottedtocline|undottedtocline|tocline>
- \DefineTOCEntryLengthOption{numwidth}%
- {scr@tso@}{@numwidth}{entry number width}%
-%</dottedtocline|undottedtocline|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:
-% \changes{v3.21}{2016/06/09}{\cs{the} inserted}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{macrocode}
-%<*tocline|toctext>
- \scr@ifundefinedorrelax{#1tocdepth}{%
- \Ifstrstart{#1}{sub}{%
- \scr@ifundefinedorrelax{\scr@dte@nosub{#1}tocdepth}{}{%
- \expandafter\edef\csname #1tocdepth\endcsname{%
- \the\numexpr \noexpand\@nameuse{\scr@dte@nosub{#1}tocdepth}+\@ne\relax
- }%
- }%
- }{}%
- }{}%
-%</tocline|toctext>
-% \end{macrocode}
-% or, if this cannot be used, by using a standard value analogues to the
-% values of the standard classes and the \KOMAScript{} classes.
-% \begin{macrocode}
- \@ifundefined{#1tocdepth}{%
- \Ifstr{#1}{part}{\@namedef{#1tocdepth}{-1}}{%
- \Ifstr{#1}{chapter}{\@namedef{#1tocdepth}{0}}{%
- \Ifstr{#1}{section}{\@namedef{#1tocdepth}{1}}{%
- \Ifstr{#1}{subsection}{\@namedef{#1tocdepth}{2}}{%
- \Ifstr{#1}{subsubsection}{\@namedef{#1tocdepth}{3}}{%
- \Ifstr{#1}{paragraph}{\@namedef{#1tocdepth}{4}}{%
- \Ifstr{#1}{subparagraph}{\@namedef{#1tocdepth}{5}}{%
- \Ifstr{#1}{figure}{\@namedef{#1tocdepth}{1}}{%
- \Ifstr{#1}{table}{\@namedef{#1tocdepth}{1}}{%
-% \end{macrocode}
-% As last chance, we can use the same number already used for a headings level
-% with the same name.
-% \begin{macrocode}
- \expandafter\let\csname #1tocdepth\expandafter\endcsname
- \csname #1numdepth\endcsname
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }{}%
-% \end{macrocode}
-% The indent can also be defined automatically by a parent level.
-% \begin{macrocode}
-%<*tocline|toctext>
- \scr@ifundefinedorrelax{scr@tso@#1@indent}{%
- \@ifundefined{scr@#1@tocindent}{%
- \Ifstrstart{#1}{sub}{%
- \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@indent}{%
- \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@numwidth}{}{%
- \expandafter\edef\csname scr@tso@#1@indent\endcsname{%
- \glueexpr \noexpand\@nameuse{scr@tso@\scr@dte@nosub{#1}@numwidth}%
- \relax
- }%
- }%
- }{%
- \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@numwidth}{%
- \expandafter\edef\csname scr@tso@#1@indent\endcsname{%
- \glueexpr \noexpand\@nameuse{scr@tso@\scr@dte@nosub{#1}@indent}%
- \relax
- }%
- }{%
- \expandafter\edef\csname scr@tso@#1@indent\endcsname{%
- \glueexpr \noexpand\@nameuse{scr@tso@\scr@dte@nosub{#1}@indent}%
- +\noexpand\@nameuse{scr@tso@\scr@dte@nosub{#1}@numwidth}%
- \relax
- }%
- }%
- }%
- }{}%
- }{%
-% \end{macrocode}
-% Former \KOMAScript{} versions use another macro name, that is also defined
-% for compatibility.
-% \begin{macrocode}
- \@namedef{scr@tso@#1@indent}{\@nameuse{scr@#1@tocindent}}%
- }%
- }{}%
-%</tocline|toctext>
-% \end{macrocode}
-% The width of the page number box and the right margin can simply be copied
-% from a parent level.
-% \begin{macrocode}
-%<*tocline>
- \scr@ifundefinedorrelax{scr@tso@#1@pagenumberwidth}{%
- \Ifstrstart{#1}{sub}{%
- \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@pagenumberwidth}{%
- \@namedef{scr@tso@#1@pagenumberwidth}{\@pnumwidth}%
- }{%
- \expandafter\let
- \csname scr@tso@#1@pagenumberwidth\expandafter\endcsname
- \csname scr@tso@\scr@dte@nosub{#1}@pagenumberwidth\endcsname
- }%
- }{%
- \@namedef{scr@tso@#1@pagenumberwidth}{\@pnumwidth}%
- }%
- }{}%
-%</tocline>
-%<*tocline|toctext>
- \scr@ifundefinedorrelax{scr@tso@#1@rightindent}{%
- \Ifstrstart{#1}{sub}{%
- \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@rightindent}{%
- \@namedef{scr@tso@#1@rightindent}{\@tocrmarg}%
- }{%
- \expandafter\let
- \csname scr@tso@#1@rightindent\expandafter\endcsname
- \csname scr@tso@\scr@dte@nosub{#1}@rightindent\endcsname
- }%
- }{%
- \@namedef{scr@tso@#1@rightindent}{\@tocrmarg}%
- }%
- }{}%
-%</tocline|toctext>
-% \end{macrocode}
-% If all the automatic setting methods were not successful, we try standard
-% values used from the standard classes or older versions of the \KOMAScript{}
-% classes.
-% \begin{macrocode}
- \@ifundefined{scr@tso@#1@indent}{%
-%<*dottedtocline|undottedtocline|largetocline>
- \@ifundefined{scr@#1@tocindent}{%
-%</dottedtocline|undottedtocline|largetocline>
- \Ifstr{#1}{figure}{\@namedef{scr@tso@#1@indent}{1.5em}}{%
- \Ifstr{#1}{table}{\@namedef{scr@tso@#1@indent}{1.5em}}{%
- \Ifstr{#1}{part}{\@namedef{scr@tso@#1@indent}{0em}}{%
- \Ifstr{#1}{chapter}{\@namedef{scr@tso@#1@indent}{0em}}{%
-% \end{macrocode}
-% The follow code needs information about the existence of the chapter
-% level. So the chapter level should already be defined, before the first
-% usage!
-% \begin{macrocode}
- \scr@ifundefinedorrelax{l@chapter}{%
- \Ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{0pt}}{%
- \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{1.5em}}{%
- \Ifstr{#1}{subsubsection}{%
- \@namedef{scr@tso@#1@indent}{3.8em}%
- }{%
- \Ifstr{#1}{paragraph}{%
- \@namedef{scr@tso@#1@indent}{7em}%
- }{%
- \Ifstr{#1}{subparagraph}{%
- \@namedef{scr@tso@#1@indent}{10em}%
- }{%
-% \end{macrocode}
-% If nothing helps, the user has to define the values.
-% \begin{macrocode}
- }%
- }%
- }%
- }%
- }%
- }{%
- \Ifstr{#1}{section}{\@namedef{scr@tso@#1@indent}{1.5em}}{%
- \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@indent}{3.8em}}{%
- \Ifstr{#1}{subsubsection}{%
- \@namedef{scr@tso@#1@indent}{7.0em}%
- }{%
- \Ifstr{#1}{paragraph}{%
- \@namedef{scr@tso@#1@indent}{10em}%
- }{%
- \Ifstr{#1}{subparagraph}{%
- \@namedef{scr@tso@#1@indent}{12em}%
- }{%
-% \end{macrocode}
-% Once more: if nothing helps, the user has to define the values.
-% \begin{macrocode}
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
-%<*dottedtocline|undottedtocline|largetocline>
- }{%
-% \end{macrocode}
-% Once again, for compatibility with former versions of \KOMAScript:
-% \begin{macrocode}
- \@namedef{scr@tso@#1@indent}{\@nameuse{scr@#1@tocindent}}%
- }%
-%</dottedtocline|undottedtocline|largetocline>
- }{}%
-% \end{macrocode}
-% Almost the same for the number width:
-% \begin{macrocode}
-%<*dottedtocline|undottedtocline|tocline>
-%<*tocline>
- \scr@ifundefinedorrelax{scr@tso@#1@numwidth}{%
- \scr@ifundefinedorrelax{scr@#1@tocnumwidth}{%
- \Ifstrstart{#1}{sub}{%
- \scr@ifundefinedorrelax{scr@tso@\scr@dte@nosub{#1}@numwidth}{}{%
- \expandafter\edef\csname scr@tso@#1@numwidth\endcsname{%
- \glueexpr \noexpand\@nameuse{scr@tso@\scr@dte@nosub{#1}@numwidth}%
- +.9em%
- \relax
- }%
- }%
- }{}%
- }{%
- \@namedef{scr@tso@#1@numwidth}{\@nameuse{scr@#1@tocnumwidth}}%
- }%
- }{}%
-%</tocline>
- \@ifundefined{scr@tso@#1@numwidth}{%
-%<*dottedtocline|undottedtocline>
- \@ifundefined{scr@#1@tocnumwidth}{%
-%</dottedtocline|undottedtocline>
- \Ifstr{#1}{figure}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{%
- \Ifstr{#1}{table}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{%
- \Ifstr{#1}{chapter}{\@namedef{scr@tso@#1@numwidth}{1.5em}}{%
-% \end{macrocode}
-% Depending on existence of the chapter level:
-% \begin{macrocode}
- \scr@ifundefinedorrelax{chapter}{%
- \Ifstr{#1}{section}{\@namedef{scr@tso@#1@numwidth}{1.5em}}{%
- \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{%
- \Ifstr{#1}{subsubsection}{%
- \@namedef{scr@tso@#1@numwidth}{3.2em}%
- }{%
- \Ifstr{#1}{paragraph}{%
- \@namedef{scr@tso@#1@numwidth}{4.1em}%
- }{%
- \Ifstr{#1}{subparagraph}{%
- \@namedef{scr@tso@#1@numwidth}{5m}%
- }{%
-% \end{macrocode}
-% Need option to be set.
-% \begin{macrocode}
- }%
- }%
- }%
- }%
- }%
- }{%
- \Ifstr{#1}{section}{\@namedef{scr@tso@#1@numwidth}{2.3em}}{%
- \Ifstr{#1}{subsection}{\@namedef{scr@tso@#1@numwidth}{3.2em}}{%
- \Ifstr{#1}{subsubsection}{%
- \@namedef{scr@tso@#1@numwidth}{3.1em}%
- }{%
- \Ifstr{#1}{paragraph}{%
- \@namedef{scr@tso@#1@numwidth}{5em}%
- }{%
- \Ifstr{#1}{subparagraph}{%
- \@namedef{scr@tso@#1@numwidth}{6em}%
- }{%
-% \end{macrocode}
-% Need option to be set.
-% \begin{macrocode}
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
-%<*dottedtocline|undottedtocline>
- }{%
-% \end{macrocode}
-% Compatibility with old \KOMAScript{} versions.
-% \begin{macrocode}
- \@namedef{scr@tso@#1@numwidth}{\@nameuse{scr@#1@tocnumwidth}}%
- }%
-%</dottedtocline|undottedtocline>
- }{}%
-%</dottedtocline|undottedtocline|tocline>
-%<*tocline>
-% \end{macrocode}
-% The three penalty hooks. Here simply the default commands are used by
-% default.
-% \begin{macrocode}
- \expandafter\providecommand%
- \csname scr@tso@#1@LastTOCLevelWasLower\endcsname{\LastTOCLevelWasLower}%
- \expandafter\providecommand%
- \csname scr@tso@#1@LastTOCLevelWasSame\endcsname{\LastTOCLevelWasSame}%
- \expandafter\providecommand%
- \csname scr@tso@#1@LastTOCLevelWasHigher\endcsname{\LastTOCLevelWasHigher}%
-% \end{macrocode}
-% The default of the vertical distance of entries is 0 plus some glue. But
-% this is enough only for at least one line, if needed for vertical
-% justification. For the higher levels (part and chapter resp. section) the
-% defaults of the standard classes are used. These have some more glue.
-% \begin{macrocode}
- \@ifundefined{scr@tso@#1@beforeskip}{%
- \Ifstr{#1}{part}{%
- \@namedef{scr@tso@#1@beforeskip}{\glueexpr 2.25em \@plus\p@\relax}%
- }{%
- \Ifstr{#1}{chapter}{%
- \@namedef{scr@tso@#1@beforeskip}{\glueexpr 1.0em \@plus\p@\relax}%
- }{%
- \Ifstr{#1}{section}{%
- \scr@ifundefinedorrelax{l@chapter}{%
- \@namedef{scr@tso@#1@beforeskip}{\glueexpr 1.0em \@plus\p@\relax}%
- }{}%
- }{}%
- }%
- }%
- \expandafter\providecommand\expandafter*%
- \csname scr@tso@#1@beforeskip\endcsname{\glueexpr \z@ plus .2\p@\relax}%
- }{}%
-%</tocline>
-% \end{macrocode}
-% \changes{v3.31}{2020/06/09}{\opt{beforeskip} default also for style \texttt{toctext}}
-% For style |toctext| a default without glue is used to stay compatible.
-% \begin{macrocode}
-%<*toctext>
- \expandafter\providecommand\expandafter*%
- \csname scr@tso@#1@beforeskip\endcsname{\z@}%
-%</toctext>
-%<*tocline>
-% \end{macrocode}
-% It would be good to know the width of the widest number. We will use this to
-% test several conditions.
-% \begin{macrocode}
- \@ifundefined{scr@dte@#1@maxnumwidth}{%
- \expandafter\newlength\csname scr@dte@#1@maxnumwidth\endcsname
- \setlength{\@nameuse{scr@dte@#1@maxnumwidth}}{\z@}%
- }{}%
- \providecommand*{\scr@dte@donumwidth}{}%
- \g@addto@macro{\scr@dte@donumwidth}{\do{#1}}%
-%</tocline>
-% \end{macrocode}
-% One condition is a minimum distance between number and text.
-% \begin{macrocode}
-%<*tocline|toctext>
- \expandafter\providecommand\expandafter*%
- \csname scr@tso@#1@numsep\endcsname{.4em}%
-%</tocline|toctext>
-% \end{macrocode}
-% The |toctext| style support the output of some text before the first entry
-% of a paragraph, between the entries and after the last entry of a paragraph.
-% \begin{macrocode}
-%<*toctext>
- \expandafter\providecommand%
- \csname scr@tso@#1@onstartfirstentry\endcsname{}%
- \expandafter\providecommand%
- \csname scr@tso@#1@onstartentry\endcsname{}%
- \expandafter\providecommand%
- \csname scr@tso@#1@onendlastentry\endcsname{}%
- \expandafter\providecommand%
- \csname scr@tso@#1@onendentry\endcsname{\quad}%
- \expandafter\providecommand%
- \csname scr@tso@#1@afterpar\endcsname{}%
-%</toctext>
-% \end{macrocode}
-% Formatting for only the number and formatting for number and text are
-% provided. For part we use the formatting of the standard classes as default.
-% \begin{macrocode}
-%<*tocline|toctext>
- \expandafter\providecommand%
- \csname scr@tso@#1@numberformat\endcsname[1]{##1}%
-%<*tocline>
- \Ifstr{#1}{part}{%
- \expandafter\providecommand%
- \csname scr@tso@#1@entryformat\endcsname[1]{\large\bfseries ##1}%
- }{%
- \Ifstr{#1}{chapter}{%
- \expandafter\providecommand%
- \csname scr@tso@#1@entryformat\endcsname[1]{\bfseries ##1}%
- }{%
- \scr@ifundefinedorrelax{l@chapter}{%
- \Ifstr{#1}{section}{%
- \expandafter\providecommand%
- \csname scr@tso@#1@entryformat\endcsname[1]{\bfseries ##1}%
- }{}%
- }{}%
-%</tocline>
- \expandafter\providecommand%
- \csname scr@tso@#1@entryformat\endcsname[1]{##1}%
-%<*tocline>
- }%
- }%
-%</tocline>
-%</tocline|toctext>
-% \end{macrocode}
-% After the number a line break is optional. In this case the text starts
-% again at the horizontal position of the number and not behind it. The
-% default is, not to break after the number.
-% \begin{macrocode}
-%<*tocline>
- \expandafter\providecommand
- \csname Ifscr@tso@#1@breakafternumber\endcsname[2]{##2}%
-% \end{macrocode}
-% The default of the connection between the end of the text and the page
-% number column is a simple \cs{hfill}. Here you can optionally use dots as usual.
-% \begin{macrocode}
- \@ifundefined{scr@tso@#1@linefill}{%
- \Ifstr{#1}{part}{%
- \@namedef{scr@tso@#1@linefill}{\hfill}%
- }{%
- \Ifstr{#1}{chapter}{%
- \@namedef{scr@tso@#1@linefill}{\hfill}%
- }{%
- \scr@ifundefinedorrelax{l@chapter}{%
- \Ifstr{#1}{section}{%
- \@namedef{scr@tso@#1@linefill}{\hfill}%
- }{}%
- }{}%
- \expandafter\providecommand%
- \csname scr@tso@#1@linefill\endcsname{\TOCLineLeaderFill\relax}%
- }%
- }%
- }{}%
-% \end{macrocode}
-% If you don't want a connection, this does not automatically mean, that the
-% page number moves forwards to the end of the text. This only happens, if the
-% entry is set ragged.
-% \begin{macrocode}
- \expandafter\providecommand\csname Ifscr@tso@#1@raggedpage\endcsname[2]{##2}%
-% \end{macrocode}
-% Optionally you can use a formatting for the page number.
-% \begin{macrocode}
- \Ifstr{#1}{part}{%
-% \end{macrocode}
-% With parts this is usually large and bold.
-% \begin{macrocode}
- \expandafter\providecommand%
- \csname scr@tso@#1@pagenumberformat\endcsname[1]{\large\bfseries ##1}%
- }{%
-% \end{macrocode}
-% \changes{v3.25}{2017/11/23}{default of page numbers of chapter entries is bold}
-% With chapters it is bold.
-% \begin{macrocode}
- \Ifstr{#1}{chapter}{%
- \expandafter\providecommand%
- \csname scr@tso@#1@pagenumberformat\endcsname[1]{\bfseries ##1}%
- }{%
- \scr@ifundefinedorrelax{l@chapter}{%
- \Ifstr{#1}{section}{%
-% \end{macrocode}
-% \changes{v3.25}{2017/11/23}{default of page numbers of section entries maybe
-% bold}
-% With sections sometimes bold.
-% \begin{macrocode}
- \expandafter\providecommand%
- \csname scr@tso@#1@pagenumberformat\endcsname[1]{\bfseries ##1}%
- }{}%
- }{}%
-% \end{macrocode}
-% All others in normal font and normal color.
-% \begin{macrocode}
- \expandafter\providecommand%
- \csname scr@tso@#1@pagenumberformat\endcsname[1]{%
- \normalfont\normalcolor ##1}%
- }%
- }%
-% \end{macrocode}
-% Sometimes the page number has a box with defined width.
-% \changes{v3.27}{2019/10/02}{consequent use of width of page number box}
-% \begin{macrocode}
- \expandafter\providecommand%
- \csname scr@tso@#1@pagenumberbox\endcsname[1]{%
- \hb@xt@\@nameuse{scr@dte@pagenumberwidth}{\hfil ##1}}%
- \expandafter\providecommand\csname Ifscr@tso@#1@dynnumwidth\endcsname[2]{##2}%
-% \end{macrocode}
-% \changes{v3.31}{2020/06/08}{init indent follows list}
-% This command defines a list of levels that specify the indent (if not empty).
-% \begin{macrocode}
- \expandafter\providecommand\csname Ifscr@tso@#1@dynindent\endcsname[2]{##2}%
- \scr@ifundefinedorrelax{scr@tso@#1@indentfollows}{%
- \Ifstrstart{#1}{sub}{%
- \expandafter\edef\csname scr@tso@#1@indentfollows\endcsname{%
- \scr@dte@nosub{#1}%
- }%
- }{%
- \expandafter\let\csname scr@tso@#1@indentfollows\endcsname\@empty
- }%
- }{}%
-%</tocline>
-% \end{macrocode}
-% \changes{v3.27}{2019/07/08}{initialization of \opt{raggedentry}}
-% \changes{v3.27}{2019/07/08}{initialization of \opt{prepagenumber}}
-% 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).
-% \begin{macrocode}
-%<*toctext>
- \expandafter\providecommand%
- \csname Ifscr@tso@#1@raggedright\endcsname[2]{##2}%
- \expandafter\providecommand%
- \csname scr@tso@#1@prepagenumber\endcsname{\nobreakspace}%
-%</toctext>
-}]{%
-% \end{macrocode}
-% \changes{v3.27}{2019/05/12}{support for \opt{noindent}}
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
-% \cs{Iftocfeature}}
-% Initialization complete. Next we have the output code or macro.
-% \begin{macrocode}
-%<*dottedtocline>
- \Iftocfeature{\@currext}{noindent}{%
- \@dottedtocline{\@nameuse{#1tocdepth}}{\z@}%
- {\@nameuse{scr@tso@#1@numwidth}}{##1}{##2}%
- }{%
- \@dottedtocline{\@nameuse{#1tocdepth}}{\@nameuse{scr@tso@#1@indent}}%
- {\@nameuse{scr@tso@#1@numwidth}}{##1}{##2}%
- }%
-%</dottedtocline>
-%<*undottedtocline|largetocline>
- \ifnum \c@tocdepth >\numexpr \@nameuse{#1tocdepth}-\@ne\relax
-% \end{macrocode}
-% Here we have a little difference between chapters and the sections of
-% \cls*{article}. We do this by the level. So if you change the levels, the
-% result would change too.
-% \begin{macrocode}
- \ifnum \@nameuse{#1tocdepth}<\@ne
- \scr@ifundefinedorrelax{chapter}{%
- \addpenalty\@secpenalty
-%<undottedtocline> \addvspace{1.0em \@plus\p@}%
-%<largetocline> \addvspace{2.25em \@plus\p@}%
- }{%
- \addpenalty{-\@highpenalty}%
-%<undottedtocline> \vskip 1.0em \@plus\p@
-%<largetocline> \addvspace{2.25em \@plus\p@}%
- }%
- \else
- \addpenalty\@secpenalty
-%<undottedtocline> \addvspace{1.0em \@plus\p@}%
-%<largetocline> \addvspace{2.25em \@plus\p@}%
- \fi
-%<undottedtocline> \setlength\@tempdima{\@nameuse{scr@tso@#1@numwidth}}%
-%<largetocline> \setlength\@tempdima{3em}%
- \begingroup
-% \end{macrocode}
-% Note: Here we should use two \cs{@tocrmarg} correctly. I've reported this
-% bug in the standard classes years ago without any change. So for
-% compatibility I've decided to accept it as feature and two times
-% \cs{@pnumwith} like the standard classes.
-% \begin{macrocode}
- \parindent \z@ \rightskip \@pnumwidth
- \parfillskip -\@pnumwidth
-% \end{macrocode}
-% The standard classes use a group at this point. This group ends before the
-% final \cs{par}. This can result in wrong baseline skip for multi line
-% entries. It was a hard decision, but I've decided to avoid this bug, because
-% it was much too strange. Moreover, with the bug, the setting of
-% \len{leftskip} would have to be changed, because here also the value at the
-% end of the paragraph is used.
-% \begin{macrocode}
- \leavevmode
-%<largetocline> \large
- \bfseries
-% \end{macrocode}
-% Note, here we also should use \cs{@tempdima} with style |largetocline|. But
-% we cannot do so, only because the standard classes do not use
-% \cs{numberline} for parts. Because of this, multi line entries are not
-% correctly indented. To do this same is also because of compatibility.
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by \cs{Iftocfeature}}
-% \begin{macrocode}
-%<undottedtocline> \advance\leftskip\@tempdima
- \Iftocfeature{\@currext}{noindent}{%
-%<undottedtocline> \hskip -\leftskip
- }{%
- \advance\leftskip\@nameuse{scr@tso@#1@indent}%
-%<*undottedtocline>
- \hskip -\dimexpr \leftskip-\@nameuse{scr@tso@#1@indent}\relax
-%</undottedtocline>
- }%
- ##1%
-%<undottedtocline> \nobreak
-% \end{macrocode}
-% Here \cs{@pnumwidth} is not the same absolute value for entries with
-% \cs{large} as for entries without \cs{large}. So correctly, e.g., the value
-% should be transferred via \len{@temdimb}. But because of compatibility this
-% bug hat also been interpreted as feature.
-% \begin{macrocode}
- \hfil \nobreak\hb@xt@\@pnumwidth{\hss ##2}%
- \par
-%<undottedtocline> \penalty\@highpenalty
-%<*largetocline>
- \nobreak
- \ifnum 0=
- \scr@ifundefinedorrelax{chapter}{\if@compatibility 1\else 0\fi}{1}\relax
- \global\@nobreaktrue
- \everypar{\global\@nobreakfalse\everypar{}}%
- \fi
-%</largetocline>
- \endgroup
- \fi
-%</undottedtocline|largetocline>
-%<*tocline>
- \scr@dte@tocline{#1}{##1}{##2}%
-%</tocline>
-%<*toctext>
- \scr@dte@toctext{#1}{##1}{##2}%
-%</toctext>
-}
-%</dottedtocline|undottedtocline|largetocline|tocline|toctext>
-% \end{macrocode}
-% \end{macro}^^A \scr@dte@def@l@toctext
-% \end{macro}^^A \scr@dte@def@l@tocline
-% \end{macro}^^A \scr@dte@def@l@largetocline
-% \end{macro}^^A \scr@dte@def@l@undottedtocline
-% \end{macro}^^A \scr@dte@def@l@dottedtocline
-%
-% Style |tocline| needs several additional settings and macros:
-% \begin{macrocode}
-%<*tocline>
-\AtBeginDocument{%
- \BeforeClosingMainAux{%
- \begingroup
- \def\do#1{%
- \relax
- \scr@ifundefinedorrelax{scr@dte@#1@maxnumwidth}{}{%
- \ifdim \@nameuse{scr@dte@#1@maxnumwidth}>\z@
- \if@filesw
- \protected@write\@mainaux{}{%
- \string\global\string\@namedef{scr@dte@#1@lastmaxnumwidth}%
- {\the\@nameuse{scr@dte@#1@maxnumwidth}}%
- }%
- \fi
- \@nameuse{scr@dte@#1@maxnumwidth}\z@
- \fi
- }%
- }%
- \@nameuse{scr@dte@donumwidth}%
- \endgroup
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@dte@nosub,\@scr@dte@nosub}
-% \changes{v3.20}{2015/11/23}{added}
-% These helper macros are used to recognize the |sub| prefix at the start of
-% an argument and remove it. If there isn't a |sub| at the very beginning, we
-% report an error, because of wrong usage of \cs{@scr@de@nusub}.
-% \begin{macrocode}
-\newcommand*{\scr@dte@nosub}[1]{\@scr@dte@nosub #1\relax}
-\newcommand*{\@scr@dte@nosub}{}
-\def\@scr@dte@nosub sub#1\relax{#1}
-% \end{macrocode}
-% \end{macro}^^A \scr@dte@nosub,\@scr@dte@nosub
-% \begin{macro}{\scr@dte@tocline}
-% \changes{v3.20}{2015/11/22}{added}
-% \changes{v3.27}{2019/05/12}{support for \opt{noindent}}
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by \cs{Iftocfeature}}
-% This is somehow like the \LaTeX{} kernel macro \cs{@dottedtocline}. But it
-% supports a lot of more attributes, not only the level, the numberwidth, the
-% indent and the text. The attributes are handled by options. So we need only
-% three arguments:
-% \begin{description}
-% \item[\marg{level name}:] the name of the ToC entry level;
-% \item[\marg{entry}:] the ToC entry;
-% \item[\marg{page number}:] the page number of the ToC entry.
-% \end{description}
-% \begin{length}{\scr@dte@tocline@numberwidth}
-% \changes{v3.20}{2016/01/15}{added}
-% Sometimes the real width of a formatted number is of interest. So we store
-% it in \len{scr@dte@tocline@numberwidth}.
-% \begin{macrocode}
-\newlength\scr@dte@tocline@numberwidth
-\newcommand*{\scr@dte@tocline}[3]{%
- \ifnum \@nameuse{#1tocdepth}>\c@tocdepth
- \else
- \tocbasic@DependOnPenaltyAndTOCLevel{#1}%
- \addvspace{\@nameuse{scr@tso@#1@beforeskip}}\relax
-% \end{macrocode}
-% \changes{v3.31}{2020/06/08}{code for indent following list processing}
-% If a indent following list exists and the depth of an entry is lower than
-% the depth of the current entry, use the maximum of the ident + number width
-% for the indent of this entry.
-% \begin{macrocode}
- \@nameuse{Ifscr@tso@#1@dynindent}{%
- \expandafter\ifx\csname scr@tso@#1@indentfollows\endcsname\@empty
- \PackageWarning{tocbasic}{`dynindent' for `#1' not available}%
- \else
- \edef\reserved@a{\@nameuse{scr@tso@#1@indentfollows}}%
- \@for \reserved@a:=\reserved@a\do {%
- \scr@trim@spaces\reserved@a
- \ifx\reserved@a\@empty\else
- \scr@ifundefinedorrelax{\reserved@a tocdepth}{%
- }{%
- \ifnum \@nameuse{\reserved@a tocdepth}<\@nameuse{#1tocdepth}%
- \@tempdima\@nameuse{scr@tso@\reserved@a @indent}\relax
- \@nameuse{Ifscr@tso@\reserved@a @dynnumwidth}{%
- \scr@ifundefinedorrelax
- {scr@dte@\reserved@a @lastmaxnumwidth}{%
- \advance\@tempdima
- \@nameuse{scr@tso@\reserved@a @numwidth}\relax
- }{%
- \advance\@tempdima
- \@nameuse{scr@dte@\reserved@a @lastmaxnumwidth}\relax
- }%
- }{%
- \advance\@tempdima
- \@nameuse{scr@tso@\reserved@a @numwidth}\relax
- }%
- \ifdim \@tempdima>\@nameuse{scr@tso@#1@indent}\relax
- \expandafter\edef\csname scr@tso@#1@indent\endcsname
- {\the\@tempdima}%
- \fi
- \fi
- }%
- \fi
- }%
- \fi
- }{}%
- {%
- \Iftocfeature{\@currext}{noindent}{%
- \leftskip \z@
- }{%
- \leftskip \@nameuse{scr@tso@#1@indent}\relax
- }%
- \rightskip \@nameuse{scr@tso@#1@rightindent}\relax
- \parfillskip -\rightskip
- \@nameuse{Ifscr@tso@#1@raggedpage}{%
- \addtolength{\parfillskip}{\z@ \@plus 1fil}%
- }{}%
- \Iftocfeature{\@currext}{noindent}{%
- \parindent \z@
- }{%
- \parindent \@nameuse{scr@tso@#1@indent}\relax
- }%
- \@afterindenttrue
- \interlinepenalty\@M
-% \end{macrocode}
-% \changes{v3.21}{2016/06/06}{\cs{ragged\dots entry} is supported (again)}
-% \begin{macrocode}
- \expandafter\ifx\csname ragged#1entry\endcsname\raggedright
- \addtolength\rightskip\@flushglue
- \else
- \def\reserved@a{\raggedright}%
- \expandafter\ifx\csname ragged#1entry\endcsname\reserved@a
- \addtolength\rightskip\@flushglue
- \else
- \renewcommand\reserved@a{\raggedright}%
- \expandafter\ifx\csname ragged#1entry\endcsname\reserved@a
- \addtolength\rightskip\@flushglue
- \fi
- \fi
- \fi
- \leavevmode
- \@tempdima \@nameuse{scr@tso@#1@numwidth}\relax
- \@nameuse{Ifscr@tso@#1@dynnumwidth}{%
- \scr@ifundefinedorrelax{scr@dte@#1@lastmaxnumwidth}{}{%
- \ifdim \@nameuse{scr@dte@#1@lastmaxnumwidth}>\@tempdima
- \@tempdima\@nameuse{scr@dte@#1@lastmaxnumwidth}\relax
- \fi
- }%
- }{}%
- \advance\leftskip \@tempdima
- \null\nobreak\hskip -\leftskip
- {%
-% \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}.
-% \begin{macrocode}
- \usetocbasicnumberline
- \let\scr@dte@numberline@box\numberline@box
- \def\numberline@box##1{%
- \sbox\scr@dte@tocline@numbox{\@nameuse{scr@tso@#1@numberformat}{##1}}%
-% \end{macrocode}
-% We are inside a group, so we have to set the length globally.
-% \begin{macrocode}
- \global\scr@dte@tocline@numberwidth
- \dimexpr\wd\scr@dte@tocline@numbox+\@nameuse{scr@tso@#1@numsep}\relax
-% \end{macrocode}
-% \changes{v3.22}{2016/12/02}{missing second \cs{relax} added}
-% Attention: We need two \cs{relax}, because the first one is eaten by
-% \cs{dimexpr}.
-% \begin{macrocode}
- \relax
- \ifdim \scr@dte@tocline@numberwidth
- >\@nameuse{scr@dte@#1@maxnumwidth}\relax
- \global\@nameuse{scr@dte@#1@maxnumwidth}\scr@dte@tocline@numberwidth
- \fi
- \@nameuse{Ifscr@tso@#1@dynnumwidth}{}{%
- \ifdim \scr@dte@tocline@numberwidth
- >\dimexpr \@nameuse{scr@tso@#1@numwidth}%
- +\@nameuse{scr@tso@#1@numsep}\relax\relax
- \PackageWarning{tocbasic}{%
- number width of #1 toc entries should be
- increased!\MessageBreak
- Currently used number width =
- \the\wd\scr@dte@tocline@numbox,\MessageBreak
- Wanted number separation
- \space\space\space =
- \the\dimexpr\@nameuse{scr@tso@#1@numsep}\relax,\MessageBreak
- Reserved number width \space\space\space\space\space\space =
- \the\dimexpr\@nameuse{scr@tso@#1@numwidth}\relax%
- }%
- \fi
- }%
- \scr@dte@numberline@box{\@nameuse{scr@tso@#1@numberformat}{##1}}%
- \@nameuse{Ifscr@tso@#1@breakafternumber}{%
- {\parfillskip\@flushglue\par}\nobreak\hskip-\leftskip
- }{}%
- }%
- \@nameuse{scr@tso@#1@entryformat}{%
- #2%
- \nobreak
- {%
- \normalfont\normalsize\@nameuse{scr@tso@#1@linefill}%
- \nobreak
-% \end{macrocode}
-% \changes{v3.27}{2019/10/02}{\cs{scr@dte@pagenumberwidth} is defined}
-% We don't want a dependency of entry variable from entry variables. So
-% locally \cs{scr@dte@pagenumberwidth} will become
-% \cs{scr@tso@\meta{Eintragsname}@pagenumberwidth} and in the definition of
-% \cs{scr@tso@\meta{Eintragsname}@pagenumberbox} we use this local macro.
-% \begin{macrocode}
- \expandafter\let\expandafter\scr@dte@pagenumberwidth
- \csname scr@tso@#1@pagenumberwidth\endcsname
- \@nameuse{scr@tso@#1@pagenumberbox}{%
- \@nameuse{scr@tso@#1@pagenumberformat}{#3}%
- }%
- }%
- \@par
- }%
- }%
- }%
- \tocbasic@SetPenaltyByTOCLevel{#1}%
- \fi
-}
-% \end{macrocode}
-% \end{length}^^A \scr@dte@tocline@numberwidth
-% \begin{macro}{\scr@dte@tocline@numbox}
-% \changes{v3.20}{2015/11/25}{new (\emph{box})}
-% Needed to measure the width of the number and use the number later.
-% \begin{macrocode}
-\newsavebox\scr@dte@tocline@numbox
-% \end{macrocode}
-% \end{macro}^^A \scr@dte@tocline@numbox
-% \begin{macro}{\tocbasic@DependOnPenaltyAndTOCLevel,
-% \tocbasic@SetPenaltyByTOCLevel}
-% \changes{v3.20}{2015/11/23}{added}
-% \changes{v3.20}{2016/03/12}{changed for \pkg*{tocbasic} syntax of package
-% author macros}
-% \cs{tocbasic@DepenedOnPenaltyAndTOCLevel} executes a saved action depending
-% on whether the current penalty value stands for an entry with higher, same,
-% or lower entry level.
-% \cs{tocbasic@SetPenaltyByTOCLevel} sets the penalty for the page break
-% depending on the current entry level.
-% \begin{command}{\LastTOCLevelWasHigher,\LastTOCLevelWasSame,
-% \LastTOCLevelWasLower}
-% \changes{v3.20}{2015/11/23}{added}
-% Standard action, if the previous entry level was higher (allow page break),
-% same (allow page break), or lower (keep penalty and therefore prevent page
-% break).
-% \begin{macrocode}
-\newcommand*{\tocbasic@DependOnPenaltyAndTOCLevel}[1]{%
- \ifnum \lastpenalty<\numexpr 20009-\@nameuse{#1tocdepth}\relax
- \@nameuse{scr@tso@#1@LastTOCLevelWasHigher}%
- \else\ifnum \lastpenalty=\numexpr 20009-\@nameuse{#1tocdepth}\relax
- \@nameuse{scr@tso@#1@LastTOCLevelWasSame}%
- \else
- \@nameuse{scr@tso@#1@LastTOCLevelWasLower}%
- \fi
- \fi
-}
-\newcommand*{\tocbasic@SetPenaltyByTOCLevel}[1]{%
- \penalty \numexpr 20009-\@nameuse{#1tocdepth}\relax
-}
-\newcommand*{\LastTOCLevelWasHigher}{\ifvmode\addpenalty{\@lowpenalty}\fi}
-\newcommand*{\LastTOCLevelWasSame}{\ifvmode\addpenalty{\@lowpenalty}\fi}
-\newcommand*{\LastTOCLevelWasLower}{}
-% \end{macrocode}
-% \end{command}^^A \LastTOCLevelWasHigher … \LastTOCLevelWasLower
-% \end{macro}^^A \tocbasic@SetPenaltyByTOCLevel,\tocbasic@DependOnPenaltyAndTOCLevel
-% \begin{command}{\TOCLineLeaderFill}
-% \changes{v3.20}{2015/11/14}{added}
-% Filler between the last text line and the page number. The optional argument
-% \texttt{\#1} is the character used for filling.
-% \begin{macrocode}
-\newcommand*{\TOCLineLeaderFill}[1][.]{%
- \leaders\hbox{$\m@th
- \mkern \@dotsep mu\hbox{#1}\mkern \@dotsep
- mu$}\hfill
-}
-%</tocline>
-% \end{macrocode}
-% \end{command}^^A \TOCLineLeaderFill
-% \end{macro}^^A \scr@dte@tocline
-%
-% \begin{macro}{\scr@dte@toctext}
-% \changes{v3.27}{2019/07/08}{added}
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
-% \cs{Iftocfeature}}
-% This is the command to format entries that will be accumalted into a single
-% paragraph. This is somehow special, because the settings of one entrie can
-% influence another one. The three arguments are:
-% \begin{description}
-% \item[\marg{level}:] The name \meta{string} of the entry level.
-% \item[\marg{entry}:] The ToC entry \meta{string}.
-% \item[\marg{pagenumber}:] The page number \meta{string} of the ToC entry.
-% \end{description}
-% \begin{macrocode}
-%<*toctext>
-\newcommand*{\scr@dte@toctext}[3]{%
- \ifnum \@nameuse{#1tocdepth}>\c@tocdepth
- \else
- \ifhmode
-% \end{macrocode}
-% In h-mode their is already output of a previous text entry. So the end code
-% of that previous text entry has to be output before the initial output of
-% the new text entry has to be done.
-% \begin{macrocode}
- \scr@dte@toctext@lastend
- \@nameuse{scr@tso@#1@onstartentry}%
- \else
-% \end{macrocode}
-% \changes{v3.31}{2020/06/09}{use of option \opt{beforeskip}}
-% In v-mode it is a new text entry. Before leaving v-mode the vertical space
-% is added.
-% \begin{macrocode}
- \addvspace{\@nameuse{scr@tso@#1@beforeskip}}%
- \leavevmode
-% \end{macrocode}
-% The paragraph end has to be prepared to eventually change the right
-% skip, to do the final output, and after all destroy these commands.
-% \begin{macrocode}
- \def\par{%
- \scr@dte@toctext@raggedright
- \scr@dte@toctext@parend
- \@par
- \scr@dte@toctext@afterpar
- \global\let\scr@dte@toctext@afterpar\relax
- \global\let\scr@dte@toctext@parend\relax
- \global\let\scr@dte@toctext@raggedright\relax
- }%
- \global\let\scr@dte@toctext@afterpar\@empty
-% \end{macrocode}
-% Also the left skip and the right skip has to be setup (these are the
-% margins) and if any of the text entries has to be printed ragged right, all
-% of them should be ragged right.
-% \begin{macrocode}
- \Iftocfeature{\@currext}{noindent}{%
- \leftskip \z@
- }{%
- \leftskip \@nameuse{scr@tso@#1@indent}\relax
- }%
- \rightskip \@nameuse{scr@tso@#1@rightindent}\relax
- \parfillskip \z@ \@plus 1fill\relax
-% \end{macrocode}
-% \changes{v3.31}{2020/06/09}{redefinition of \cs{addvspace}}
-% \changes{v3.31}{2020/06/09}{redefinition of \cs{addpenalty}}
-% Now, make sure, that the first non-|toctext| entry does do a \cs{par}
-% before it uses \cs{addpenalty} or \cs{addvspace}. Before version~3.31 this
-% has been done by redefining \cs{@noitemerr} but this does not work, because
-% it ignores the argument of \cs{addpenalty} or \cs{addvspace}. So, this more
-% dangerous solution has been made, that redefines \cs{addvspace} and
-% \cs{addpenalty} locally.
-% \begin{macrocode}
- \ifx\addvspace\scr@dte@xaddvspace\else
- \let\scr@dte@saddvspace\addvspace
- \def\scr@dte@xaddvspace{%
- \let\addvspace\scr@dte@saddvspace\par\addvspace}%
- \let\addvspace\scr@dte@xaddvspace
- \fi
- \ifx\addpenalty\scr@dte@xaddpenalty\else
- \let\scr@dte@saddpenalty\addpenalty
- \def\scr@dte@xaddpenalty{%
- \let\addpenalty\scr@dte@saddpenalty\par\addpenalty}%
- \fi
-% \end{macrocode}
-% Finally the init code of the first entry has to be used.
-% \begin{macrocode}
- \@nameuse{scr@tso@#1@onstartfirstentry}%
- \fi
-% \end{macrocode}
-% Also some settings are independend from beeing the first entry in the
-% paragraph or not.
-% \begin{macrocode}
- \@nameuse{Ifscr@tso@#1@raggedright}{%
- \let\\\@centercr
- \gdef\scr@dte@toctext@raggedright{%
- \@rightskip\@flushglue
- \addtolength\rightskip\@rightskip
- }%
- }{}%
- \l@addto@macro\scr@dte@toctext@afterpar{\@nameuse{scr@tso@#1@afterpar}}%
-% \end{macrocode}
-% The end codes have to be changed. These are used either at the start of the
-% next entry with this style or at the end of the paragraph.
-% \begin{macrocode}
- \expandafter\global\expandafter\let\expandafter\scr@dte@toctext@lastend
- \csname scr@tso@#1@onendentry\endcsname
- \expandafter\global\expandafter\let\expandafter\scr@dte@toctext@parend
- \csname scr@tso@#1@onendlastentry\endcsname
-% \end{macrocode}
-% Last but not least, the output has to be done.
-% \begin{macrocode}
- {%
- \usetocbasicnumberline
- \def\numberline@box##1{%
- \mbox{%
- \@nameuse{scr@tso@#1@numberformat}{\ignorespaces ##1\unskip}%
- \hskip\@nameuse{scr@tso@#1@numsep}\relax
- }%
- }%
- \@nameuse{scr@tso@#1@entryformat}{%
- \ignorespaces#2\unskip
- \@nameuse{scr@tso@#1@prepagenumber}%
- \@nameuse{scr@tso@#1@pagenumberformat}{\ignorespaces #3\unskip}%
- }%
- }%
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\scr@dte@toctext@raggedright,\scr@dte@toctext@parend,
-% \scr@dte@toctext@lastend}
-% Helper macros to store some information for later usage.
-% \begin{macrocode}
-\newcommand*{\scr@dte@toctext@raggedright}{}
-\newcommand*{\scr@dte@toctext@parend}{}
-\newcommand*{\scr@dte@toctext@lastend}{}
-%</toctext>
-% \end{macrocode}
-% \end{macro}^^A \scr@dte@toctext@raggedright … \scr@dte@toctext@lastend
-% \end{macro}^^A \scr@dte@toctext
-%
-%
-% \begin{macro}{\scr@dte@def@l@default}
-% \changes{v3.20}{2015/12/16}{new for the package}
-% The package \pkg*{tocbasic} already has a standard style. Other packages
-% should not change the standard style. But classes are allowed to clone (or
-% define) another standard style for documents made with that class.
-% \begin{macrocode}
-%<*default>
-%%% (run: style,dottedtocline)
-\CloneTOCEntryStyle{dottedtocline}{default}
-%</default>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-%</style>
-%</package>
-% \end{macrocode}
-%
-%
-% \subsubsection{The styles used by the \KOMAScript{} classes}
-%
-% \begin{macrocode}
-%<*class>
-%<*style>
-% \end{macrocode}
-%
-% Some styles are defined by the classes only. They are only defined for the
-% classes, that use them. So not all styles are available by all classes and
-% even not all styles are the same with every class.
-%
-% \begin{macro}{\scr@dte@def@l@part}
-% \changes{v3.20}{2015/12/07}{ToC entry style \texttt{part} added}
-% This style exists with \cls*{scrbook}, \cls*{scrreprt} and
-% \cls*{scrartcl}. The formatting of the entry and the page number is defined
-% by the font elements \fnt{partentry} and \fnt{partentrypagenumber}.
-% \begin{macrocode}
-%<*part>
-%%% (run: class,style,part)
-\CloneTOCEntryStyle{tocline}{part}
-\TOCEntryStyleStartInitCode{part}{%
- \expandafter\providecommand%
- \csname scr@tso@#1@linefill\endcsname{\hfill}%
- \expandafter\providecommand%
- \csname scr@tso@#1@entryformat\endcsname[1]{\usekomafont{partentry}{##1}}%
- \expandafter\providecommand%
- \csname scr@tso@#1@pagenumberformat\endcsname[1]{%
- \usekomafont{partentry}{\usekomafont{partentrypagenumber}{##1}}}%
- \expandafter\providecommand\expandafter*%
- \csname scr@tso@#1@beforeskip\endcsname{2.25em \@plus\p@}%
-}
-%</part>
-% \end{macrocode}
-% \end{macro}^^A \scr@dte@def@l@part
-%
-% \begin{macro}{\scr@dte@def@l@chapter}
-% \changes{v3.20}{2015/12/07}{ToC entry style \texttt{chapter} added}
-% \changes{v3.27}{2019/10/28}{using font element \fnt{chapterentrydots}}
-% This style exists with \cls*{scrbook} and \cls*{scrreprt} only.
-% \begin{macrocode}
-%<*chapter>
-%%% (run: class,style,chapter)
-\CloneTOCEntryStyle{tocline}{chapter}
-\TOCEntryStyleStartInitCode{chapter}{%
- \expandafter\providecommand%
- \csname scr@tso@#1@linefill\endcsname{%
- \if@chapterentrywithdots
- {\usekomafont{chapterentrydots}{\TOCLineLeaderFill}}\relax
- \else
- \hfill
- \fi
- }%
- \expandafter\providecommand%
- \csname scr@tso@#1@entryformat\endcsname{\usekomafont{chapterentry}}%
- \expandafter\providecommand%
- \csname scr@tso@#1@pagenumberformat\endcsname[1]{%
- \usekomafont{chapterentry}{\usekomafont{chapterentrypagenumber}{##1}}}%
- \expandafter\providecommand\expandafter*%
- \csname scr@tso@#1@beforeskip\endcsname{1.0em \@plus\p@}%
-}
-%</chapter>
-% \end{macrocode}
-% \end{macro}^^A \scr@dte@def@l@chapter
-%
-% \begin{macro}{\scr@dte@def@l@section}
-% \changes{v3.20}{2015/12/07}{ToC entry style \texttt{section} added}
-% \changes{v3.27}{2019/10/28}{using font element \fnt{sectionentrydots}}
-% With classes \cls*{scrbook} and \cls*{scrreprt} this is the style of the
-% \emph{minor} entry level. With \cls*{scrartcl} this is the style of the top
-% entry level (below the part level). So with \cls*{scrartcl} it is similar
-% to the chapter style of \cls*{scrbook} or \cls*{scrreprt}.
-% \begin{macrocode}
-%<*section>
-%%% (run: class,style,section)
-\CloneTOCEntryStyle{tocline}{section}
-%<*book|report>
-\TOCEntryStyleStartInitCode{section}{%
- \expandafter\providecommand%
- \csname scr@tso@#1@linefill\endcsname{\TOCLineLeaderFill\relax}%
-}
-%</book|report>
-%<*article>
-\TOCEntryStyleStartInitCode{section}{%
- \expandafter\providecommand%
- \csname scr@tso@#1@linefill\endcsname{%
- \if@sectionentrywithdots
- {\usekomafont{sectionentrydots}{\TOCLineLeaderFill}}\relax
- \else
- \hfill
- \fi
- }%
-% \end{macrocode}
-% Für die Einträge die Schrift von Element sectionentry verwenden.
-% \begin{macrocode}
- \expandafter\providecommand%
- \csname scr@tso@#1@entryformat\endcsname{\usekomafont{sectionentry}}%
- \expandafter\providecommand%
- \csname scr@tso@#1@pagenumberformat\endcsname[1]{\usekomafont{sectionentry}{\usekomafont{sectionentrypagenumber}{##1}}}%
- \expandafter\providecommand\expandafter*%
- \csname scr@tso@#1@beforeskip\endcsname{1.0em \@plus\p@}%
-}
-%</article>
-%</section>
-% \end{macrocode}
-% \end{macro}^^A \scr@dte@def@l@section
-%
-% \begin{macro}{\scr@dte@def@l@subsection}
-% \changes{v3.20}{2015/12/07}{ToC entry style \texttt{subsection} added}
-% This style exists with \cls*{scrartcl} only. It is the minor level style
-% similar to the section style with \cls*{scrbook} and \cls*{scrreprt}.
-% \begin{macrocode}
-%<*subsection&article>
-%%% (run: class,style,subsection)
-\CloneTOCEntryStyle{tocline}{subsection}
-\TOCEntryStyleStartInitCode{subsection}{%
- \expandafter\providecommand%
- \csname scr@tso@#1@linefill\endcsname{\TOCLineLeaderFill\relax}%
-}
-%</subsection&article>
-% \end{macrocode}
-% \end{macro}^^A \scr@dte@def@l@subsection
-%
-% \begin{macro}{\scr@dte@def@l@default}
-% \changes{v3.20}{2015/12/07}{ToC entry style \texttt{default} added}
-% With classes \cls*{scrbook} and \cls*{scrreprt} this is a clone of the
-% section style. With \cls*{scrartcl} this is a clone of the subsection style.
-% \begin{macrocode}
-%<*default>
-%%% (run: class,style,default)
-%<book|report>\CloneTOCEntryStyle{section}{default}
-%<article>\CloneTOCEntryStyle{subsection}{default}
-%</default>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-%</style>
-%</class>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
-
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-typearea.dtx b/macros/latex/contrib/koma-script/source/scrkernel-typearea.dtx
deleted file mode 100644
index 50691df27b..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-typearea.dtx
+++ /dev/null
@@ -1,3225 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-typearea.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-typearea.dtx 3699 2022-02-11 15:53:36Z kohm $
-%<identify>%%% (run: identify)
-%<init>%%% (run: init)
-%<options>%%% (run: options)
-%<body>%%% (run: body)
-%<final>%%% (run: final)
-%<package&identify>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-11 16:53:36 +0100 (Fr, 11. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3699 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-typearea.dtx}[%
- \filedate\space\filerevision\space
- KOMA-Script
- }
-\reserved@a
-%</dtx>
-%<*dtx|(package&typearea&identify)>
-%<package>\ProvidesPackage{typearea}[%
-%!KOMAScriptVersion
- package
-%<*dtx>
- source
-%</dtx>
- (type area)]
-%</dtx|(package&typearea&identify)>
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \generate{\usepreamble\defaultpreamble
- \file{typearea.sty}{%
- \from{scrkernel-version.dtx}{package,typearea}%
- \from{scrkernel-typearea.dtx}{package,typearea,identify}%
- \from{scrkernel-basics.dtx}{load}%
- \from{scrkernel-compatibility.dtx}{package,typearea,init}%
- \from{scrkernel-typearea.dtx}{package,typearea,init}%
- \from{scrkernel-compatibility.dtx}{package,typearea,option}%
- \from{scrkernel-typearea.dtx}{package,typearea,options}%
- \from{scrkernel-compatibility.dtx}{package,typearea,body}%
- \from{scrkernel-typearea.dtx}{package,typearea,body}%
- \from{scrkernel-typearea.dtx}{package,typearea,final}%
- \from{scrlogo.dtx}{logo}%
- }%
- }
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-typearea.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v2.95}{2002/06/20}{first version after splitting \file{scrclass.dtx}}
-% \changes{v3.24}{2017/07/23}{reorganization of code into semantic portions}
-% \changes{v3.24}{2017/07/23}{start of English translation}
-% \changes{v3.36}{2022/02/11}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/11}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-typearea.dtx}
-% \title{Calculation of the Typeing Area with
-% \href{https://komascript.de}{\KOMAScript} Package \pkg*{typearea}
-% and Additional Commands for the \href{https://komascript.de}{\KOMAScript}
-% Classes}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \filename{} contains macros for the typing area. These result not only in
-% the package \pkg*{typearea} but also provide features for the
-% \KOMAScript{} classes.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation of package \pkg*{typearea} and the
-% commands implemented here in the \KOMAScript{} manual, either the German
-% \file{scrguide} or the English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of Package \pkg*{typearea} and Additional Class
-% Features}
-%
-%
-% \subsection{Loading packages}
-%
-% Package \pkg*{typearea} needs package \pkg*{scrkbase}. But this will
-% be loaded by \file{scrkernel-basics.dtx} just after the identify run of this
-% file. It does not need other packages.
-%
-% The \KOMAScript{} classes need package \pkg*{typearea}. This will be
-% loaded here as an early body action. Nevertheless, at this state the typing
-% area option code for the classes has already been loaded. So before loading
-% the almost identical option code of the package, some macros have to be
-% reset:
-% \begin{macrocode}
-%<*class&body>
-\let\@BCOR =\relax
-\let\@@BCOR =\relax
-\let\@DIV =\relax
-\let\@@DIV =\relax
-\let\@headlines =\relax
-\let\@@headlines =\relax
-\let\x@paper =\relax
-\let\x@@paper =\relax
-\let\scr@pti@nerr@r =\relax
-% \end{macrocode}
-% Now we can load \pkg*{typearea}:
-% \changes{v2.95}{2002/06/22}{Use \cs{KOMAScriptVersion} while loading
-% \pkg*{typearea}}
-% We use \cs{KOMAScriptVersion} to verify the identical versions of
-% \KOMAScript{} and the package. See \file{scrkernel-version.dtx} for more
-% information about this verification.
-% \begin{macrocode}
-\RequirePackage{typearea}[\KOMAScriptVersion]
-%</class&body>
-% \end{macrocode}
-%
-% \subsection{Selection of paper size}
-%
-% Before we can define page margins and a typing area, we have to define the
-% paper size. Beside \pkg*{typearea} also \pkg*{scrletter} uses some of
-% this code, because it needs the paper size, too.
-%
-% \begin{command}{\PaperNameToSize}
-% \changes{v3.23}{2017/02/22}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}
-% This command sets \cs{paperheight} and \cs{paperwidth} depending on
-% the name of a paper size. It currently supports the ISO formats of the
-% series A, B, C and D and the American formats letter, legal and
-% executive. The command is defined using \cs{providecommand} so a class
-% can define it different before loading \pkg*{typearea}. The first
-% optional argument is the error class. Error classes will be defined using
-% \cs{ProvideUnknownPaperSizeError} later. The second argument is the name
-% of the paper size.
-% \begin{macrocode}
-%<*package&options>
-\providecommand*{\PaperNameToSize}[2][warning]{%
- \Ifstr{#2}{letter}{%
- \setlength\paperheight{11in}%
- \setlength\paperwidth {8.5in}%
- }{%
- \Ifstr{#2}{legal}{%
- \setlength\paperheight{14in}%
- \setlength\paperwidth {8.5in}%
- }{%
- \Ifstr{#2}{executive}{%
- \setlength\paperheight{10.5in}%
- \setlength\paperwidth {7.25in}%
- }{%
- \Ifstr{#2}{}{%
- \ISO@PaperNameToSize[#1]{}{}\@nil
- }{%
- \edef\reserved@a{\noexpand\ISO@PaperNameToSize[#1]#2 \noexpand\@nil}%
- \reserved@a
- }%
- }%
- }%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\ISO@PaperNameToSize}
-% \changes{v3.23}{2017/02/22}{new (internal)}
-% \changes{v3.28}{2019/11/18}{\cs{ifnumber} umbenannt in \cs{Ifnumber}}
-% For ISO paper sizes a sub-macro is used. It has to split the series and the
-% root.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{ISO@PaperNameToSize}{%
- \def\ISO@PaperNameToSize[#1]#2#3\@nil{%
- \lowercase{\edef\reserved@a{#2}}%
- \@tempswafalse
- \if \reserved@a a%
- \Ifnumber{#3}{%
- \setlength{\paperwidth}{841sp}%
- \setlength{\paperheight}{1189sp}%
- \@tempswatrue
- }{}%
- \else
- \if \reserved@a b%
- \Ifnumber{#3}{%
- \setlength{\paperwidth}{1000sp}%
- \setlength{\paperheight}{1414sp}%
- \@tempswatrue
- }{}%
- \else
- \if \reserved@a c%
- \Ifnumber{#3}{%
- \setlength{\paperwidth}{917sp}%
- \setlength{\paperheight}{1297sp}%
- \@tempswatrue
- }{}%
- \else
- \if \reserved@a d%
- \Ifnumber{#3}{%
- \setlength{\paperwidth}{771sp}%
- \setlength{\paperheight}{1090sp}%
- \@tempswatrue
- }{}%
- \fi
- \fi
- \fi
- \fi
- \if@tempswa
- \@tempcnta=#3\relax
- \@whilenum\@tempcnta>\z@
- \do{\setlength{\@tempdima}{\paperwidth}%
- \setlength{\paperwidth}{.5\paperheight}%
- \setlength{\paperheight}{\@tempdima}%
- \advance\@tempcnta by\m@ne
- }%
- \multiply\paperwidth by186468
- \multiply\paperheight by186468
- \else
-% \end{macrocode}
-% The paper size is not a supported ISO format. If
-% \cs{scr@UnknownPaperSize@}\meta{errorclass} is defined, use it to show
-% the error. If not, use \cs{scr@UnknownPaperSize@error}. This means,
-% \meta{errorclass} \texttt{error} has to be defined.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{scr@UnknownPaperSize@#1}{%
- \scr@UnknownPaperSize@error{#2#3}%
- }{%
- \@nameuse{scr@UnknownPaperSize@#1}{#2#3}%
- }%
- \fi
- }%
-}{}
-% \end{macrocode}
-% \begin{command}{\ProvideUnknownPaperSizeError}
-% \changes{v3.23}{2017/02/22}{added}
-% Define a new error class for unknown paper formats. The argument is the new
-% error class. Each error class is represented by a command
-% \cs{scr@UnknownPaperSize@}\meta{errorclass}. That command also has
-% exactly one argument, the unknown paper size.
-% \begin{macrocode}
-\providecommand*{\ProvideUnknownPaperSizeError}[1]{%
- \expandafter\providecommand\expandafter*%
- \csname scr@UnknownPaperSize@#1\endcsname[1]%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@UnkownPaperSize@error,\scr@UnkownPaperSize@warning,
-% \scr@UnkownPaperSize@info,\scr@UnkownPaperSize@ignore}
-% \changes{v3.23}{2017/02/22}{new (internal)}
-% Error handling (error classes) for \cs{PaperNameToSize}.
-% \begin{macrocode}
-\ProvideUnknownPaperSizeError{error}{%
- \PackageError{%
-%<typearea> typearea%
-%<letter> scrletter%
- }{Unknown paper size #1}{%
- \string\paperwidth\space and \string\paperheight\space stay unchanged,
- because of unknown paper size.%
- }%
-}
-%<*typearea>
-\ProvideUnknownPaperSizeError{warning}{%
- \PackageWarning{%
- typearea%
- }{%
- \string\paperwidth\space and \string\paperheight\space stay
- unchanged, because\MessageBreak
- of unknown paper size #1%
- }%
-}
-\ProvideUnknownPaperSizeError{info}{%
- \PackageInfo{%
- typearea
- }{%
- \string\paperwidth\space and \string\paperheight\space stay
- unchanged, because\MessageBreak
- of unknown paper size #1%
- }%
-}
-\ProvideUnknownPaperSizeError{ignore}{}
-%</typearea>
-%</package&options>
-% \end{macrocode}
-% \end{macro}^^A \scr@UnknownPaperSize@error … \scr@UnknownPaperSize@ignore
-% \end{command}^^A \ProvideUnknownPaperSizeError
-% \end{macro}^^A \ISO@PaperNameToSize
-% \end{command}^^A \PaperNameToSize
-%
-% \begin{option}{a4paper,a5paper,b5paper,letterpaper,legalpaper,executivepaper,
-% landscape,portrait}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/21}{the option is standard but not deprecated}
-% The paper sizes of the standard classes are a special case. For
-% compatibility they are declared explicitly. Note: There is still a pattern
-% matching implementation for other paper size options, but the usage of those
-% is hardly deprecated.
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@DeclareStandardOption[typearea]{a4paper}{paper=a4}
-\KOMA@DeclareStandardOption[typearea]{a5paper}{paper=a5}
-\KOMA@DeclareStandardOption[typearea]{b5paper}{paper=b5}
-\KOMA@DeclareStandardOption[typearea]{letterpaper}{paper=letter}
-\KOMA@DeclareStandardOption[typearea]{legalpaper}{paper=legal}
-\KOMA@DeclareStandardOption[typearea]{executivepaper}{paper=executive}
-\KOMA@DeclareStandardOption[typearea]{landscape}{paper=landscape}
-\KOMA@DeclareStandardOption[typearea]{portrait}{paper=portrait}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}^^A a4paper … portrait
-%
-% \begin{option}{paper}
-% \changes{v2.95}{2002/12/03}{added}
-% \changes{v3.01b}{2008/12/09}{height and width swapped}
-% \changes{v3.02c}{2009/02/12}{new \opt{paper\quotechar=seascape}}
-% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}}
-% \changes{v3.22}{2016/07/29}{paper orientation depends on format name}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Normally, the paper size should be set using this option. It provides the
-% ISO series A, B, C, D, value pairs
-% \opt{(\meta{width},\meta{height})} and the orientations
-% \opt{portrait}, \opt{landscape} and \opt{seascape}.
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@key{paper}{%
- \Ifstr{#1}{seascape}{%
- \@seascapetrue
- \expandafter\ifnum\scr@ta@v@is@ge{3.22}\relax
- \@landscapetrue
- \scr@setpaperorientation
- \else
- \if@landscape\else\scr@switchpapersizes\@landscapetrue\fi
- \fi
- \FamilyKeyStateProcessed
- \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{landscape}%
- \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{portrait}%
- \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{seascape}%
- \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{seascape}%
- }{%
- \Ifstr{#1}{landscape}{%
- \@seascapefalse
- \expandafter\ifnum\scr@ta@v@is@ge{3.22}\relax
- \@landscapetrue
- \scr@setpaperorientation
- \else
- \if@landscape\else\scr@switchpapersizes\@landscapetrue\fi
- \fi
- \FamilyKeyStateProcessed
- \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{landscape}%
- \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{portrait}%
- \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{seascape}%
- \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{landscape}%
- }{%
- \Ifstr{#1}{portrait}{%
- \expandafter\ifnum\scr@ta@v@is@ge{3.22}\relax
- \@landscapefalse
- \scr@setpaperorientation
- \else
- \if@landscape\scr@switchpapersizes\@landscapefalse\fi
- \fi
- \FamilyKeyStateProcessed
- \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{landscape}%
- \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{portrait}%
- \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{seascape}%
- \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{portrait}%
- }{%
- \Ifstr{#1}{letter}{%
- \if@landscape
- \setlength\paperheight{8.5in}%
- \setlength\paperwidth {11in}%
- \else
- \setlength\paperheight{11in}%
- \setlength\paperwidth {8.5in}%
- \fi
- \FamilyKeyStateProcessed
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{paper}%
- \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{letter}%
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{%
- \if@seascape seascape\else
- \if@landscape landscape\else portrait\fi\fi
- }%
- }{%
- \Ifstr{#1}{legal}{%
- \if@landscape
- \setlength\paperheight{8.5in}%
- \setlength\paperwidth {14in}%
- \else
- \setlength\paperheight{14in}%
- \setlength\paperwidth {8.5in}%
- \fi
- \FamilyKeyStateProcessed
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{paper}%
- \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{legal}%
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{%
- \if@seascape seascape\else
- \if@landscape landscape\else portrait\fi\fi
- }%
- }{%
- \Ifstr{#1}{executive}{%
- \if@landscape
- \setlength\paperheight{7.25in}%
- \setlength\paperwidth {10.5in}%
- \else
- \setlength\paperheight{10.5in}%
- \setlength\paperwidth {7.25in}%
- \fi
- \FamilyKeyStateProcessed
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{paper}%
- \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{executive}%
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{%
- \if@seascape seascape\else
- \if@landscape landscape\else portrait\fi\fi
- }%
- }{%
- \iso@paper{#1}%
- \if@tempswa
- \FamilyKeyStateProcessed
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{paper}%
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{#1}%
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{%
- \if@seascape seascape\else
- \if@landscape landscape\else portrait\fi\fi
- }%
- \else
- \expandafter\maybe@pair#1::\@nil
- \if@tempswa
- \FamilyKeyStateProcessed
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{paper}%
- \expandafter\ifnum \scr@ta@v@is@lt{3.01b}\relax
- \PackageWarningNoLine{typearea}{%
- You may have to exchange height and width!\MessageBreak
- Until KOMA-Script version 3.01b the semantic\MessageBreak
- of option `paper' was `paper=height:width'\MessageBreak
- instead of `paper=width:height'.\MessageBreak
- I've switched back to that old interpretation\MessageBreak
- because of the given compatiblity settings}%
- \setlength\paperwidth{\@tempb}%
- \setlength\paperheight{\@tempa}%
- \else
- \setlength\paperwidth{\@tempa}%
- \setlength\paperheight{\@tempb}%
- \fi
- \expandafter\ifnum \scr@ta@v@is@lt{3.22}\relax
- \if@landscape
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{\@tempa:\@tempb}%
- \else
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{\@tempb:\@tempa}%
- \fi
- \else
- \scr@setpaperorientation
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{%
- \the\paperwidth:\the\paperheight}%
- \fi
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{%
- \if@seascape seascape\else
- \if@landscape landscape\else portrait\fi\fi
- }%
- \else
- \KOMA@unknown@keyval{paper}{#1}{%
- `letter', `legal', `executive', `a'<nr>, `b'<nr>,
- `c'<nr>, `d'<nr>,\MessageBreak
- <width>`:'<height>, `landscape' and `portrait'%
- }%
- \fi
- \fi
- }%
- }%
- }%
- }%
- }%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\if@seascape,\@seascapetrue,\@seascapefalse}
-% \changes{v3.02c}{2009/02/12}{added}
-% This switch stores only whether or not the landscape orientation should be
-% up-side-down. Currently this makes sense only using \file{dvips}.
-% \begin{macrocode}
-\newif\if@seascape
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\if@landscape,\@landscapetrue,\@landscapefalse}
-% This switch stores whether using portrait or landscape orientation.
-% \begin{macrocode}
-\newif\if@landscape
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\maybe@pair}
-% \changes{v2.95}{2002/12/03}{added}
-% \changes{v2.97e}{2007/11/26}{works really}
-% Test whether the following parameter is of kind \texttt{\meta{first
-% argument}:\meta{second argument}}. If so \cs{@tempa} will become \meta{first
-% argument} and \cs{@tempb} will become \meta{second argument} and
-% \cs{if@tempswa} will become \cs{iftrue}. Otherwise \cs{if@tempswa} is
-% \cs{iffalse} and \cs{@tempa} and \cs{@tempb} are not specified.
-% \begin{macrocode}
-\newcommand*{\maybe@pair}{}
-\def\maybe@pair#1:#2:#3\@nil{%
- \edef\@tempa{#1}\edef\@tempb{#2}%
- \ifx\@tempa\@empty\@tempswafalse\else
- \ifx\@tempb\@empty\@tempswafalse\else\@tempswatrue\fi
- \fi
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{macro}^^A \maybe@pair
-% \end{option}^^A paper
-%
-% \subsection{Special handling of \pkg*{geometry}}
-%
-% \begin{option}{usegeometry}
-% \changes{v3.17}{2015/02/07}{added}
-% \pkg*{typearea} optionally can pass several settings to package
-% \pkg{geometry}. The user decides whether or not to use this.
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@ifkey{usegeometry}{@ta@usegeometry}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}
-%
-%
-% \subsection{Setting the output paper size}
-%
-% The document paper format of option \opt{paper} is one thing. It is used
-% only for calculation of the dimensions used by \TeX{}. Originally
-% \textsc{dvi} does not know something like a paper size. It just contained
-% relative movements from the current position starting with the
-% origin. Setting up a page size depends on the output driver or back-end.
-%
-% \begin{option}{pagesize}
-% \changes{v2.7g}{2001/04/17}{added}
-% \changes{v2.95}{2002/08/27}{new implementation}
-% \changes{v3.02c}{2009/02/14}{new \opt{pagesize\quotechar=false}}
-% \changes{v3.05a}{2010/03/18}{new \opt{pagesize\quotechar=dvipdfmx}}
-% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}}
-% \changes{v3.17a}{2015/05/03}{logic redesigned}
-% \changes{v3.20}{2015/07/10}{\file{luatex} as a synonym of \file{pdftex}}
-% This option is the main element for telling pdf\TeX, \file{dvips} or V\TeX{}
-% which paper size to use. It is also used by some deprecated options. Here
-% are the values and their meanings:
-% \begin{labeling}[~--]{\opt{automedia}}
-% \item[\opt{auto}] combination of options \opt{pdftex} and
-% \opt{dvips}.
-% \item[\opt{automedia}] like \opt{auto} with additional setting of
-% \cs{mediawidth} and \cs{mediaheight} if available.
-% \item[\opt{dvips}] adds a \file{dvips} \cs{special} to set the paper
-% size. This should be done only once in the document preamble. Usage inside
-% the document body is not fully supported and will raise a warning.
-% \item[\opt{dvipdfmx}] adds a \file{dvipdfmx} \cs{special} to set the
-% paper size.
-% \item[\opt{false}] switch of the automatic driver page size setting,
-% i.e., if there are changes inside the document.
-% \item[\opt{pdftex}] set \cs{pdfpagewidth} and \cs{pdfpageheight} if
-% available.
-% \end{labeling}
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@key{pagesize}[auto]{%
- \KOMA@set@ncmdkey{pagesize}{@pagesizelast}{%
- {off}{-1},{no}{-1},{false}{-1},%
- {auto}{0},{automedia}{1},{dvips}{2},{pdftex}{3},{luatex}{3},{dvipdfmx}{4}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifcase\number\@pagesizelast\relax
- \edef\@pagesizelast{auto}%
- \if@atdocument
- \set@pdftexpagesize
- \set@dvipspagesize
- \fi
- \or
- \edef\@pagesizelast{automedia}%
- \if@atdocument
- \set@pdftexpagesize
- \set@vtexpagesize
- \set@dvipspagesize
- \fi
- \or
- \edef\@pagesizelast{dvips}%
- \if@atdocument
- \set@dvipspagesize
- \fi
- \or
- \edef\@pagesizelast{pdftex}%
- \if@atdocument
- \set@pdftexpagesize
- \fi
- \or
- \edef\@pagesizelast{dvipdfmx}%
- \if@atdocument
- \set@dvipdfmxpagesize
- \fi
- \else
- \edef\@pagesizelast{false}%
- \fi
- \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}%
- {pagesize}{\@pagesizelast}%
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\@pagesizelast}
-% This internal macro stores the current value of option \opt{pagesize} and
-% is needed to use the correct signalling if option \opt{paper} is used
-% inside the document and the initial setup in |\begin{document}|.
-% \begin{macrocode}
-\newcommand\@pagesizelast{auto}
-\AtBeginDocument{%
- \KOMAExecuteOptions[.typearea.\scr@pkgextension]{pagesize=\@pagesizelast}%
-% \end{macrocode}
-% \end{macro}^^A \@pagesizelast
-%
-% \begin{macro}{\set@pdftexpagesize}
-% \changes{v2.95}{2002/08/27}{added}
-% \changes{v3.20}{2015/07/10}{if \cs{pdfpage\dots} does not exist
-% \cs{page\dots} will be tried (needed for lua\TeX{}~0.80.1)}
-% \begin{macro}{\set@dvipspagesize}
-% \changes{v2.95}{2002/08/27}{added}
-% \changes{v3.02c}{2009/02/13}{respecting \opt{seascape}}
-% \changes{v3.02c}{2009/02/14}{can be used inside the document}
-% \changes{v3.12}{2012/02/06}{not expanded
-% \cs{let}\cs{if@tempswa}\cs{if@dvips} does even work is the later is not
-% yet defined}
-% \changes{v3.28}{2019/11/18}{\cs{ifnotundefined} renamed into
-% \cs{Ifnotundefined}}
-% \begin{macro}{\setnot@dvipspagesize}
-% \changes{v2.95}{2002/08/27}{added}
-% \begin{macro}{\set@dvipdfmxpagesize}
-% \changes{v3.05a}{2010/03/18}{added}
-% \begin{macro}{\set@vtexpagesize}
-% \changes{v2.95}{2002/08/27}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifnotundefined} renamed into
-% \cs{Ifnotundefined}}
-% \begin{macro}{\scr@updatedvipspagesize}
-% \changes{v3.02c}{2009/02/14}{added}
-% \changes{v3.12}{2013/05/10}{deactivated, if \cs{XeTeXversion} exists}
-% Option \opt{pagesize} needs some internal macros.
-% \begin{description}
-% \item{Attention:} The definition of these macros may change at usage of
-% themselves or at |\begin{document}|.
-% \end{description}
-% First of all the definition from |\begin{document}|:
-% \begin{macrocode}
- \expandafter\ifnum\scr@ta@v@is@gt{3.02b}\relax
- \renewcommand*{\set@dvipspagesize}{%
-% \end{macrocode}
-% \changes{v3.12}{2012/11/23}{use paper size update only for DVI and PS}
-% \changes{v3.12}{2012/02/06}{not expanded
-% \cs{let}\cs{if@tempswa}\cs{if@dvips} does even work if the later is not
-% yet defined}
-% Test whether unspecified \textsc{dvi} output or specified \textsc{ps} output
-% is used. Only in that cases the \textsc{ps} code for paper size updates will
-% be used.
-% \begin{macrocode}
- \begingroup
- \@tempswafalse
- \scr@ifdvioutput{\@tempswatrue}{%
- \Ifnotundefined{if@dvips}{%
- \expandafter\let\csname if@tempswa\expandafter\endcsname
- \csname if@dvips\endcsname
- }{}%
- }%
- \if@tempswa
- \endgroup
- \scr@ifundefinedorrelax{AtNextShipout}{%
- \scr@ifundefinedorrelax{AtBeginShipoutNext}{%
- \begingroup
- \protected@edef\reserved@a{\endgroup
- \scr@updatedvipspagesize}%
- \reserved@a
- }{%
-% \end{macrocode}
-% If \cs{AtBeginShipoutNext} is available (mostly because of loading package
-% \pkg{atbegshi}) use it so execute the code at least before other code
-% that has been added to \cs{shipout}. Unfortunately this is not reliable. If
-% \cs{AtBeginShipout} is used after \cs{set@dvipspagesize} (this means the
-% recalculation of the typing area and the margins) but before the current
-% page has been shipped out the code of such \cs{AtBeginShipout} will be lost!
-% \begin{macrocode}
- \begingroup
- \protected@edef\reserved@a{\endgroup
- \protect\AtBeginShipoutNext{%
- \protect\bgroup
- \protect\global\protect\setbox\AtBeginShipoutBox
- \protect\vbox{%
- \scr@updatedvipspagesize
- \protect\box\AtBeginShipoutBox
- }%
- \protect\egroup
- }}%
- \reserved@a
- }%
- }{%
-% \end{macrocode}
-% If \cs{AtNextShipout} is available (mostly because of loading package
-% \pkg{everyshi} use it to execute the code at least before other code
-% that has been added to \cs{shipout}. Unfortunately this is not reliable. If
-% \cs{AtNextShipout} or \cs{EveryShipout} is used after \cs{set@dvipspagesize}
-% (this means the recalculation of the typing area and the margins) but before
-% the current page has been shipped out the code of such \cs{AtNextShipout} or
-% \cs{EveryShipout} will be lost!
-% \begin{macrocode}
- \begingroup
- \protected@edef\reserved@a{\endgroup
- \protect\AtNextShipout{%
- \protect\bgroup
- \protect\global\protect\setbox\protect\@cclv\protect\vbox{%
- \scr@updatedvipspagesize
- \protect\box\protect\@cclv
- }%
- \protect\egroup
- }}%
- \reserved@a
- }%
- \else
-% \end{macrocode}
-% In this case (neither \textsc{DVI} nor \textsc{PS} output) we only have to
-% finish the group that has been used to keep changes of \cs{if@tempswa}
-% local.
-% \begin{macrocode}
- \endgroup
- \fi
- }%
- \else
- \let\set@dvipspagesize=\setnot@dvipspagesize
- \fi
- \renewcommand*{\set@dvipdfmxpagesize}{%
- \scr@ifdvioutput{%
- \special{papersize=\the\paperwidth,\the\paperheight}%
- }{}%
- }%
-}
-% \end{macrocode}
-% And now the definition that is used before |\begin{document}| but executed
-% the first time inside |\begin{document}|.
-% \changes{v3.21}{2016/05/27}{two missing backslashs added}
-% \begin{macrocode}
-\newcommand*{\set@pdftexpagesize}{%
- \scr@ifundefinedorrelax{pdfpagewidth}{%
- \scr@ifundefinedorrelax{pagewidth}{}{\pagewidth=\paperwidth}%
- }{\pdfpagewidth=\paperwidth}%
- \scr@ifundefinedorrelax{pdfpageheight}{%
- \scr@ifundefinedorrelax{pageheight}{}{\pageheight=\paperheight}%
- }{\pdfpageheight=\paperheight}%
-}
-\newcommand*{\set@dvipspagesize}{%
- \begingroup
- \@tempswafalse
- \scr@ifdvioutput{\@tempswatrue}{%
- \Ifnotundefined{if@dvips}{%
- \expandafter\let\csname if@tempswa\expandafter\endcsname
- \csname if@dvips\endcsname
- }{}%
- }{}%
-% \end{macrocode}
-% \changes{v3.22}{2016/08/04}{\pkg{preview} workaround}
-% If package \pkg{preview} has been loaded with option \opt{tightpage},
-% which can be recognized by a defined macro \cs{pr@nextbb}, and if the
-% package is active, we do not add \textsc{dvi} specials, because it would
-% disturb Xe\LaTeX.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{pr@nextbb}{}{%
- \expandafter\ifx\csname ifPreview\expandafter\endcsname
- \csname iftrue\endcsname
- \PackageInfo{typearea}{%
- package `preview' with option `tightpage' detected.\MessageBreak
- initial page size special deactivated%
- }%
- \@tempswafalse
- \fi
- }%
- \if@tempswa
- \endgroup
- \AtBeginDvi{%
- \special{papersize=\the\paperwidth,\the\paperheight}%
- \if@seascape\special{! TeXDict begin /landplus90{true}store end }\fi
- }%
- \expandafter\ifnum\scr@ta@v@is@gt{3.02b}\relax
- \let\set@dvipspagesize=\@empty
- \else
- \let\set@dvipspagesize=\setnot@dvipspagesize
- \fi
- \else
- \endgroup
- \fi
-}
-\newcommand*{\setnot@dvipspagesize}{%
- \scr@ifdvioutput{%
- \PackageWarning{%
- typearea%
- }{%
- With dvi output option `pagesize=auto',\MessageBreak
- `pagesize=automedia' or `pagesize=dvips'\MessageBreak
- may be used only once at preamble.\MessageBreak
- Option ignored%
- }%
- }{}%
-}
-\newcommand*{\set@dvipdfmxpagesize}{%
- \scr@ifdvioutput{%
- \AtBeginDvi{%
- \special{papersize=\the\paperwidth,\the\paperheight}%
- }%
- }{}%
-}
-\newcommand*{\set@vtexpagesize}{%
- \Ifnotundefined{mediawith}{\mediawidth=\paperwidth}{}%
- \Ifnotundefined{mediaheight}{\mediaheight=\paperheight}{}%
-}
-\newcommand*{\scr@updatedvipspagesize}{%
- \scr@ifundefinedorrelax{XeTeXversion}{%
- \special{ps::\@percentchar\@percentchar
- PageBoundingBox: 0 0 \the\numexpr\paperwidth/\dimexpr 1bp\relax\relax
- \space \the\numexpr\paperheight/\dimexpr 1bp\relax\relax^^J%
- \@percentchar\@percentchar BeginPageSetup^^J%
- << /PageSize [\the\numexpr\paperwidth/\dimexpr 1bp\relax\relax\space
- \the\numexpr\paperheight/\dimexpr 1bp\relax\relax]
- >> setpagedevice^^J%<<
- 0 0 bop^^J%
- \@percentchar\@percentchar EndPageSetup}%
- }{}%
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{option}
-%
-% \begin{option}{dvips}
-% \changes{v2.7g}{2001/04/17}{added}
-% \changes{v2.95}{2002/08/27}{new implementation}
-% \changes{v2.98c}{2008/04/09}{replacement changed}
-% \changes{v2.98c}{2008/04/09}{info instead of warning}
-% \changes{v3.01a}{2008/11/21}{it's a standard option not deprecated}
-% This option is a kind of obsolete. It is now implemented using
-% \opt{pagesize}. But because this is a standard option using several other
-% packages we only show a standard option information instead of a deprecated
-% option warning. Note: Usage of \opt{pagesize=automedia} can still result
-% in a warning message!
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@DeclareStandardOption[typearea]{dvips}{%
- pagesize=automedia%
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}
-%
-% \begin{option}{pdftex}
-% \changes{v2.7g}{2001/04/17}{added}
-% \changes{v2.95}{2002/08/27}{new implementation}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/21}{it's a standard option not deprecated}
-% This option is a kind of obsolete. It is now implemented using
-% \opt{pagesize}. But because this is a standard option using several other
-% packages we only show a standard option information instead of a deprecated
-% option warning.
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@DeclareStandardOption[typearea]{pdftex}{%
- pagesize=pdftex%
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}
-%
-% \subsection{Influencing left and right margin proportions}
-%
-% Options like \opt{twoside} or \opt{twocolumn} influence the
-% proportions of the left and right margin and indirectly also the top and the
-% bottom margin. They are also very important for the document classes.
-%
-% \begin{option}{oneside}
-% \changes{v2.97e}{2007/11/23}{pass option from class to \pkg*{typearea}}
-% \changes{v3.01a}{2008/11/21}{it's a standard option not deprecated}
-% \begin{option}{twoside}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}}
-% \changes{v2.97e}{2007/11/23}{pass option from class to \pkg*{typearea}}
-% \changes{v3.00}{2008/07/09}{new option \opt{twoside\quotechar=semi}}
-% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}}
-% \changes{v3.13a}{2014/04/09}{the class also uses status signaling with
-% \cs{FamilyKeyStateProcessed}}
-% \changes{v3.17}{2015/03/17}{automatic usage of \cs{flushbottom} and
-% \cs{raggedbottom}}
-% \changes{v3.17}{2015/03/17}{early setting of default}
-% \changes{v3.17}{2015/03/18}{use \cs{cleardoubleoddpage} if available}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{macro}{\if@semitwoside,\@semitwosidetrue,\@semitwosidefalse}
-% \changes{v3.00}{2008/07/09}{new boolean switch (intern)}
-% \begin{macro}{\if@twoside,\@twosidetrue,\@twosidefalse}
-% \changes{v3.00}{2008/07/09}{switch also sets \cs{if@semitwoside}}
-% Do we have a single sided or double sided layout?
-% \begin{macrocode}
-%<*package&typearea&options>
-\newif\if@semitwoside
-\g@addto@macro\@twosidetrue\@semitwosidefalse
-\g@addto@macro\@twosidefalse\@semitwosidefalse
-%</package&typearea&options>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macrocode}
-%<*(class|(package&typearea))&options>
-\KOMA@key{twoside}[true]{%
-%<class> \if@atdocument\else\PassOptionsToPackage{twoside=#1}{typearea}\fi%
-%<*package>
- \if@atdocument\if@twoside
- \scr@ifundefinedorrelax{cleardoubleoddpage}{%
- \cleardoublepage
- }{%
- \cleardoubleoddpage
- }%
- \else\clearpage\fi\fi
-%</package>
- \Ifstr{#1}{semi}{%
- \@twosidetrue
-%<package> \@semitwosidetrue
- \FamilyKeyStateProcessed
- }{%
- \def\FamilyElseValue{, `semi'}%
- \KOMA@set@ifkey{twoside}{%
-% \end{macrocode}
-% \changes{v3.20}{2015/11/02}{not existing order dependency of
-% \opt{twocolumn} and \opt{twoside} fixed}
-% \changes{v3.27}{2019/03/05}{no special treatment for letters}
-% \changes{v3.27}{2019/03/05}{missing \cs{sloppy} in twocolumn mode added}
-% From v3.17 until 3.19a the classes used a local switch
-% \cs{if@tempswa}. As a result of this option \opt{twocolumn} was not
-% able to recognize double sided layout. Because of this it was essential to
-% handle option \opt{twocolumn} before option \opt{twoside}. This has
-% been solved using \cs{if@twoside} in the classes too. Another solution
-% could have been to move the implementation and execution of
-% \opt{twocolumn} before \opt{twoside}. But I don't know whether or not
-% this would have been reliable and the solution here is more simple.
-% \begin{macrocode}
- @twoside%
- }{#1}%
- }%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
-%<*class>
- \expandafter\ifnum\scr@v@is@ge{3.17}%
- \if@twoside\flushbottom
- \else
- \if@twocolumn\sloppy\flushbottom\else\raggedbottom\fi
- \fi
- \fi
-%</class>
- \KOMA@kav@xreplacevalue{.%
-%<class> \KOMAClassFileName
-%<package> typearea.\scr@pkgextension
- }{twoside}{#1}%
-%<*package>
- \if@twoside
- \if@semitwoside
- \@mparswitchfalse
- \else
- \@mparswitchtrue
- \fi
- \else
- \@mparswitchfalse
- \fi%
- \csname recalctypearea\endcsname
-%</package>
- \fi
-}
-%<*class>
-%<book>\KOMAExecuteOptions{twoside=true}
-%<!book>\KOMAExecuteOptions{twoside=false}
-%</class>
-%<*package>
-\KOMA@kav@xadd{.typearea.\scr@pkgextension}{twoside}{%
- \if@twoside true\else false\fi
-}
-%</package>
-\KOMA@DeclareStandardOption%
-%<package> [typearea]%
- {oneside}{twoside=false}
-%</(class|(package&typearea))&options>
-% \end{macrocode}
-% \end{option}^^A twoside
-% \end{option}^^A oneside
-%
-% \begin{option}{onecolumn}
-% \changes{v2.95}{2002/12/04}{option moved to package \pkg*{typearea}}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}}
-% \changes{v2.97e}{2007/11/23}{the classes pass the option to \pkg*{typearea}}
-% \changes{v3.01a}{2008/11/21}{standard option but not deprecated}
-% \begin{option}{twocolumn}
-% \changes{v2.95}{2002/12/04}{option moved to package \pkg*{typearea}}
-% \changes{v2.97e}{2007/11/23}{the classes pass the option to \pkg*{typearea}}
-% \changes{v2.98a}{2007/01/08}{passing the correct option}
-% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}}
-% \changes{v3.13a}{2014/04/09}{the class also uses status signaling with
-% \cs{FamilyKeyStateProcessed}}
-% \changes{v3.20}{2016/02/16}{\cs{sloppy}, \cs{raggedbottom} and
-% \cs{flushbottom} delayed}
-% \changes{v3.27}{2019/03/05}{no extra treatment for letters}
-% Do we have a single column or two columns layout?
-% \begin{macrocode}
-%<*(class|(package&typearea))&options>
-\KOMA@key{twocolumn}[true]{%
-%<class> \if@atdocument\else\PassOptionsToPackage{twocolumn=#1}{typearea}\fi%
-%<*package>
- \if@atdocument\clearpage\fi
-%</package>
- \KOMA@set@ifkey{twocolumn}{@twocolumn}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@replacebool{.%
-%<class> \KOMAClassFileName
-%<package> typearea.\scr@pkgextension
- }{twocolumn}{@twocolumn}%
-%<package> \csname recalctypearea\endcsname
-%<*class>
- \if@atdocument\expandafter\@firstofone
- \else\@ifpackageloaded{typearea}{\expandafter\@firstofone}
- {\expandafter\AtEndOfClass}\fi
- {\expandafter\ifnum\scr@v@is@ge{3.17}%
- \if@twocolumn\twocolumn\sloppy\flushbottom
- \else
- \onecolumn
- \if@twoside\flushbottom\else
- \raggedbottom
- \fi
- \fi
- \fi}%
-%</class>
- \fi
-}
-%<*class>
-\AtEndOfClass{%
- \expandafter\ifnum\scr@v@is@lt{3.17}%
-%<*!letter>
- \if@twocolumn\twocolumn\sloppy\flushbottom
- \else\onecolumn\if@twoside\flushbottom\else\raggedbottom\fi\fi
-%</!letter>
-%<letter> \raggedbottom
- \fi
-}
-\KOMAExecuteOptions{twocolumn=false}
-%</class>
-%<*package>
-\KOMA@kav@xadd{.typearea.\scr@pkgextension}{twocolumn}{%
- \if@twocolumn true\else false\fi
-}
-%</package>
-\KOMA@DeclareStandardOption%
-%<package> [typearea]%
- {onecolumn}{twocolumn=false}
-%</(class|(package&typearea))&options>
-% \end{macrocode}
-% \end{option}^^A twocolumn
-% \end{option}^^A onecolumn
-%
-%
-% \subsection{Influencing size of head and foot and margins}
-%
-% We have several options to influence the head hight and the foot height and
-% whether or not these are part of the typing area or the margins. We have also
-% an option to decide whether or not the margin notes are part of the typing
-% area or not.
-%
-% \begin{option}{headlines}
-% \changes{v2.95}{2002/12/06}{new implementation using \pkg{keyval}}
-% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}}
-% \begin{option}{footlines}
-% \changes{v3.12}{2013/03/26}{added}
-% These are two of the recommended options to set the height of the page head
-% and footer. Here we set the height by the number of base lines. The number
-% is a factor to \cs{baselineskip} and therefore a real number.
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@key{headlines}{%
- \begingroup
- \setlength{\@tempdima}{#1\baselineskip}%
- \endgroup
- \def\ta@hh{#1\baselineskip}%
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{headlines}{#1}%
- \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{headheight}{#1\baselineskip}%
-}
-\KOMA@key{footlines}{%
- \begingroup
- \setlength{\@tempdima}{#1\baselineskip}%
- \endgroup
- \def\ta@fh{#1\baselineskip}%
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{footlines}{#1}%
- \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{footheight}{#1\baselineskip}%
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}
-% \end{option}
-%
-% \begin{option}{headheight}
-% \changes{v2.98c}{2008/04/06}{added}
-% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}}
-% \begin{option}{footheight}
-% \changes{v3.12}{2013/03/26}{added}
-% Instead of setting the height of the page head or footer by the number of
-% base lines, we can set it also using a length or length value. Note, via
-% \cs{documenclass} or \cs{usepackage} only length values are supported
-% (due to an expansion problem by the \LaTeX{} kernel with both commands).
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@key{headheight}{%
- \begingroup
- \setlength{\@tempdima}{#1}%
- \endgroup
- \def\ta@hh{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{headheight}{#1}%
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{headlines}%
-}
-\KOMA@key{footheight}{%
- \begingroup
- \setlength{\@tempdima}{#1}%
- \endgroup
- \def\ta@fh{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{footheight}{#1}%
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{footlines}%
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}
-% \end{option}
-%
-% \begin{option}{headinclude}
-% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}}
-% This options determines whether or not the head is part of the typing
-% area.
-% \begin{option}{headexclude}
-% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/21}{deprecated}
-% \begin{macro}{\if@hincl,\@hincltrue,\@hinclfalse}
-% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}}
-% \changes{v2.97c}{2007/04/19}{direct initialization via \cs{if@hsl},
-% if already defined}
-% We use a boolean switch to store the decision.
-% \begin{macrocode}
-%<*package&typearea&options>
-\newif\if@hincl\@ifundefined{if@hsl}{}{\let\if@hincl\if@hsl}
-\KOMA@ifkey{headinclude}{@hincl}
-\KOMA@DeclareDeprecatedOption[typearea]{headexclude}{headinclude=false}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-% \end{option}
-%
-% \begin{option}{headsepline}
-% \changes{v3.20}{2015/12/12}{\pkg*{typearea} itself reacts on \opt{headsepline}}
-% Until \KOMAScript{} v3.20 \pkg*{typearea} was not able to handle
-% sequences of options \opt{headsepline} and \opt{headinclude} to get
-% always a correct result. Until v3.18a \opt{headinclude} was prioritized
-% against \opt{headsepline} if used as global options but not if used via
-% \cs{KOMAoptions}. In v3.18a a bug has been fixed with the result that
-% \opt{headsepline} was prioritized against \opt{headinclude} if used
-% as global options. But intentionally
-% \opt{headinclude=false,}\opt{headsepline} or
-% \opt{headinclude=true,}\opt{headsepline=false} always should use the
-% setting of option \opt{headsepline} independent of setting this as
-% global options or using \cs{KOMAoptions}. Similar with
-% \opt{headsepline,}\opt{headinclude=false} or
-% \opt{headsepline=false,},\opt{headinclude} the setting of
-% \opt{headinclude} should be used. To achieve this \pkg*{typearea}
-% itself has to interpret not only \opt{headinclude} but also
-% \opt{headsepline} (as an alias of \opt{headinclude}).
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@key{headsepline}[true]{%
- \KOMA@set@ifkey{headinclude}{@hincl}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@replacebool{.typearea.\scr@pkgextension}{headinclude}{@hincl}%
- \fi
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}^^A headsepline
-%
-% \begin{option}{footinclude}
-% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}}
-% \begin{option}{footexclude}
-% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/21}{deprecated}
-% This options determines whether or not the page footer is part of the typing
-% area.
-% \begin{macro}{\if@fincl,\@fincltrue,\@finclfalse}
-% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}}
-% \changes{v2.97c}{2007/04/19}{direct initialization via \cs{if@fsl},
-% if already defined}
-% We use a boolean switch to store the decision.
-% \begin{macrocode}
-%<*package&typearea&options>
-\newif\if@fincl\@ifundefined{if@fsl}{}{\let\if@fincl\if@fsl}
-\KOMA@ifkey{footinclude}{@fincl}
-\KOMA@DeclareDeprecatedOption[typearea]{footexclude}{footinclude=false}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-% \end{option}
-%
-% \begin{option}{footsepline}
-% \changes{v3.23}{2017/03/03}{has to set \cs{if@fincl} instead of \cs{if@hincl}}
-% \changes{v3.20}{2015/12/12}{\pkg*{typearea} itself reacts on \opt{footsepline}}
-% Until \KOMAScript{} v3.20 \pkg*{typearea} was not able to handle
-% sequences of options \opt{footsepline} and \opt{footinclude} to get
-% always a correct result. Until v3.18a \opt{footinclude} was prioritized
-% against \opt{footsepline} if used as global options but not if used via
-% \cs{KOMAoptions}. In v3.18a a bug has been fixed with the result that
-% \opt{footsepline} was prioritized against \opt{footinclude} if used
-% as global options. But intentionally
-% \opt{footinclude=false,}\opt{footsepline} or
-% \opt{footinclude=true,}\opt{footsepline=false} always should use the
-% setting of option \opt{footsepline} independent of setting this as
-% global options or using \cs{KOMAoptions}. Similar with
-% \opt{footsepline,}\opt{footinclude=false} or
-% \opt{footsepline=false,},\opt{footinclude} the setting of
-% \opt{footinclude} should be used. To achieve this \pkg*{typearea}
-% itself has to interpret not only \opt{footinclude} but also
-% \opt{footsepline} (as an alias of \opt{footinclude}).
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@key{footsepline}[true]{%
- \KOMA@set@ifkey{footinclude}{@fincl}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@replacebool{.typearea.\scr@pkgextension}{footinclude}{@fincl}%
- \fi
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}^^A footsepline
-%
-% \begin{option}{mpinclude}
-% \changes{v2.8q}{2002/03/28}{added}
-% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}}
-% \begin{option}{mpexclude}
-% \changes{v2.8q}{2002/03/28}{added}
-% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/21}{deprecated}
-% Some documents have a lot of large margin notes. Optical these margin notes
-% are more part of the typing area than the margin. This options determines
-% whether or not margin notes should be part of the typing area.
-% \begin{macro}{\if@mincl,\@mincltrue,\@minclfalse}
-% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}}
-% We use a boolean switch to store the decision. Note, if the margin notes are
-% part of the typing area, you should increase the divisor.
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@ifkey{mpinclude}{@mincl}
-\KOMA@DeclareDeprecatedOption[typearea]{mpexclude}{mpinclude=false}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-% \end{option}
-%
-%
-% \subsection{Typing area for the emulation of the standard classes}
-%
-% For the emulation of the standard classes we need a dedicated size of the
-% typing area, if and only if no explicit \opt{DIV} has been given by
-% option. The emulation of the standard classes is a class feature. We could
-% do it before \pkg*{typearea} and then deactivate initial setting of
-% margins and typing area. But it is more easy to use \cs{areaset} after
-% loading \pkg*{typearea}. The standard letter class cannot be emulated.
-% \begin{macrocode}
-%<*class&body&!letter>
-\if@scr@emulatestandardclasses
- \Ifstr{\@lastdiv}{areaset}{}{%
- \ifnum\@lastdiv=\z@
- \setlength{\textwidth}{\dimexpr \paperwidth-2in\relax}
- \ifdim \f@size\p@<10.5\p@
- \setlength{\@tempdimb}{345\p@}
- \else\ifdim \f@size\p@<11.5\p@
- \setlength{\@tempdimb}{360\p@}
- \else
- \setlength{\@tempdimb}{390\p@}
- \fi
- \fi
- \if@twocolumn
- \ifdim\@textwidth>2\@tempdimb\relax
- \setlength{\textwidth}{2\@tempdimb}
- \fi
- \else
- \ifdim\textwidth>\@tempdimb
- \setlength{\textwidth}{\@tempdimb}
- \fi
- \fi
- \@settopoint\textwidth
- \setlength{\@tempdima}{\dimexpr \paperheight-3.5in\relax}
- \divide\@tempdima\baselineskip
- \@tempcnta=\@tempdima
- \setlength{\textheight}{\@tempcnta\baselineskip}
- \addtolength{\textheight}{\topskip}
- \edef\reserved@a{%
- \noexpand\@areasetadvancedtrue
- \noexpand\areaset[current]{\noexpand\textwidth}{\noexpand\textheight}%
- \if@areasetadvanced\else\noexpand\@areasetadvancedfalse\fi
- }\reserved@a
- \fi
- }%
-\fi
-%</class&body&!letter>
-% \end{macrocode}
-%
-% \subsection{Using a predefined divisor depending on the font size}
-%
-% Some years ago \pkg*{typearea} provides the feature to use a hard coded
-% or user defined divisor depending on the document font size. The feature to
-% define such predefined divisors is deprecated, because it can be used only
-% for integer font sizes in pt. Nevertheless, for compatibility reasons it is
-% still implemented.
-%
-% \begin{macro}{\ta@divlist}
-% \changes{v2.0e}{1994/10/28}{added}
-% \changes{v2.6}{2000/01/04}{the list provides values from font size 1\,pt}
-% \begin{macro}{\ta@divlistelse}
-% \changes{v2.6}{2000/01/04}{added}
-% We need a default settings for 10\,pt, 11\,pt and 12\,pt. But we define it
-% only if they has not been defined before. So classes could define other
-% defaults before loading \pkg*{typearea}.
-% \begin{macrocode}
-%<*package&typearea&init>
-\providecommand\ta@divlist{{}{}{}{}{}{}{}{}{}{8}{10}{12}}
-% \end{macrocode}
-% \end{macro}
-% If a font size does not have a predefined divisor, the following default
-% will be used:
-% \begin{macrocode}
-\providecommand\ta@divlistelse{1}
-%</package&typearea&init>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ta@divfor}
-% We also need a macro to get one of the values stored at \cs{ta@divlist}
-% depending on the font size given by the real number argument. The real
-% number will be rounded to the nearest integer.
-% \changes{v2.4g}{1996/11/04}{usage of the default value list}
-% \changes{v2.6}{2000/01/04}{usage of the extended list}
-% \changes{v2.8q}{2002/03/28}{respect option \opt{mpinclude}}
-% \changes{v2.96}{2006/08/11}{font size does not need to be an integer}
-% \changes{v3.25}{2018/03/05}{paper size test added}
-% \begin{macrocode}
-%<*package&typearea&body>
-\newcommand*{\ta@divfor}[1]{%
- \ta@div=\z@
- \expandafter\ifnum\scr@ta@v@is@ge{3.25}\relax
- \ifnum \z@=\ifdim \paperwidth<207mm \z@\else\ifdim \paperwidth>213mm \z@
- \else\ifdim \paperheight<294mm \z@\else
- \ifdim \paperheight>300mm \z@\else \@ne\fi\fi\fi\fi
- \PackageInfoNoLine{typearea}{%
- With paper sizes other than (almost) `A4' predefined\MessageBreak
- DIV values do not exist. Using DIV calculation for good\MessageBreak
- line width (unless using `version=3.24` or prior)%
- }%
- \ta@div=\tw@
- \fi
- \fi
- \if@mincl
- \PackageInfo{typearea}{%
- With option `mpinclude' there are no predefined\MessageBreak
- DIV values. Using DIV calculation for good line\MessageBreak
- width%
- }%
- \ta@div=\tw@
- \fi
- \ifnum \ta@div=\z@
- \xdef\@tempa{\ta@divlist{}}%
- \@tempdima=#1pt
- \addtolength{\@tempdima}{.5\p@}%
- \divide\@tempdima by\p@
- \setlength{\@tempdimb}{\@tempdima}%
- \multiply\@tempdimb by\p@
- \ifdim \@tempdimb=#1pt
- \ta@div=#1\relax
- \@whilenum \ta@div >-9 \do {%
- \ifx\@tempa\empty
- \else \xdef\@tempa{\expandafter\@cdr\@tempa\@nil}\fi
- \advance\ta@div by-1
- }%
- \else
- \let\@tempa\empty
- \fi
- \ifx\@tempa\empty
-% \end{macrocode}
-% If there is not default in the list we use the general default.
-% \begin{macrocode}
- \setlength{\@tempdima}{#1\p@}%
- \addtolength{\@tempdima}{10\p@}%
- \PackageWarningNoLine{typearea}{%
- DIV for \the\@tempdima\space and used papersize\MessageBreak
- not defined!\MessageBreak
- Using DIV=\ifnum\number\ta@divlistelse>\m@ne
- \ifcase \ta@divlistelse default%
- \or calc%
- \or calc%
- \or classic%
- \else\ta@divlistelse\fi\else\ta@divlistelse\fi
- }%
- \ta@div=\ta@divlistelse\relax
- \else
-% \end{macrocode}
-% Otherwise we use the default of the list.
-% \begin{macrocode}
- \xdef\@tempa{\expandafter\@car\@tempa\@nil}%
- \ifx\@tempa\empty
- \ta@div=\ta@divlistelse\relax
- \else
- \ta@div=\@tempa\relax
- \fi
- \fi
- \fi
-}
-%</package&typearea&body>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{command}{\SetDIVList}
-% \changes{v2.1a}{1994/10/28}{new}
-% \changes{v2.6}{2000/01/04}{\cs{ta@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.
-% \begin{macrocode}
-%<*package&typearea&body>
-\newcommand*\SetDIVList[1]{%
- \PackageWarning{typearea}{\string\SetDIVList\space is
- deprecated!\MessageBreak
- This command supports only integer font sizes\MessageBreak
- in pt equal or greater than 10pt.\MessageBreak
- Since version 2.6 the command is implemented\MessageBreak
- for compatibility only. You should not use it\MessageBreak
- any longer}%
- \def\ta@divlist{{}{}{}{}{}{}{}{}{}#1}}
-% \end{macrocode}
-% \end{command}^^A \SetDIVList
-%
-% \begin{command}{\SetXDIVList}
-% \changes{v2.6}{2000/01/04}{neu}
-% \changes{v3.24}{2017/07/23}{deprecated}
-% The command is deprecated. Don't use it any longer.
-% \begin{macrocode}
-\newcommand*\SetXDIVList[1]{%
- \PackageWarning{typearea}{\string\SetXDIVList\space is
- deprecated!\MessageBreak
- This command supports only integer font sizes\MessageBreak
- in pt equal or greater than 10pt.\MessageBreak
- Since version 3.0 the command is implemented\MessageBreak
- for compatibility only. You should not use it\MessageBreak
- any longer}%
- \def\ta@divlist{#1}}
-%</package&typearea&body>
-% \end{macrocode}
-% \end{command}^^A \SetXDIVList
-%
-%
-% \subsection{Calculation of typing area and margins}
-%
-% The main purpose of the package is the calculation of the size of the
-% typeing area and the margins depending on a divisor. As an addition a
-% binding correction is included.
-%
-% The parameters and the calculation is needed before the options can be
-% processed.
-%
-% \begin{ilength}{\ta@bcor}
-% \changes{v2.2a}{1995/01/25}{definition of the dimension before option
-% \opt{BCOR}}
-% \changes{v2.7g}{2001/04/17}{definition using \cs{newlength} instead of
-% \cs{newdimen}}
-% We need a length to store the binding correction. It is initializes to 0\,pt
-% implicitly by \cs{newlength}.
-% \begin{macrocode}
-%<*package&typearea&options>
-\newlength{\ta@bcor}
-% \end{macrocode}
-% \end{ilength}
-%
-% \begin{macro}{\ta@div}
-% \changes{v2.2a}{1995/01/25}{definition of the dimension before option
-% \opt{BCOR}}
-% We need a counter for the divisor (aka \emph{DIV}). It is initializes to
-% 0\,pt implicitly by \cs{newcount}. So it is not a \LaTeX{} counter but a
-% \TeX{} counter.
-% \begin{macrocode}
-\newcount\ta@div
-%</package&typearea&options>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{ilength}{\ta@hblk,\ta@vblk}
-% Width of one horizontal resp. height of one vertical block.
-% \begin{macrocode}
-%<*package&typearea&body>
-\newlength{\ta@hblk}
-\newlength{\ta@vblk}
-%</package&typearea&body>
-% \end{macrocode}
-% \end{ilength}
-%
-% \begin{ilength}{\ta@temp}
-% Used several times instead of \cs{@tempdima}, \cs{@tempdimb} or another
-% temporary dimension or glue of the LaTeX{} kernel. Nevertheless I should
-% think about not using this temporary length any longer.
-% \begin{macrocode}
-%<*package&typearea&body>
-\newlength{\ta@temp}
-%</package&typearea&body>
-% \end{macrocode}
-% \end{ilength}
-%
-% \begin{option}{BCOR}
-% \changes{v2.2a}{1995/01/25}{added}
-% \changes{v2.95}{2002/12/04}{new implementation using \pkg{keyval}}
-% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% The value is written into the length \cs{ta@bcor}. Several symbolic values
-% are supported that have to be converted into a length. Note, while loading
-% the package symbolic values are nonsense.
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@key{BCOR}{%
- \Ifstr{#1}{current}{}{%
- \setlength{\ta@bcor}{#1}%
- }%
- \FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}{BCOR}{#1}%
-}
-% \end{macrocode}
-% After loading the package we have to do a little bit more, because we need
-% to recalculate the areas.
-% \changes{v3.13}{2014/06/30}{\cs{FamilyKeyStateProcessed} added}
-% \changes{v3.24}{2017/07/23}{\cs{KOMA@kav@xreplacevalue} added}
-% \begin{macrocode}
-\AtEndOfPackage{%
- \KOMA@key{BCOR}{%
- \typearea[{#1}]{last}
- \FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}{BCOR}{#1}%
- }%
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}
-%
-% \begin{option}{DIV}
-% \changes{v2.2a}{1995/01/25}{new option}
-% \changes{v2.95}{2002/12/04}{new implementation using \pkg{keyval}}
-% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}}
-% The value is written into the counter \cs{ta@div}. Several symbolic values
-% are supported and have to be converted into a counter. Note, while loading
-% the package symbolic values are nonsense.
-% \begin{macro}{\@lastdiv}
-% \changes{v3.30}{2020/03/24}{init the internal macro}
-% This internal macro stores the last value to option \opt{DIV}. It is
-% initialized with \cs{relax}.
-% \begin{macrocode}
-%<package&typearea&init>\newcommand*{\@lastdiv}{\z@}\let\@lastdiv\relax
-% \end{macrocode}
-% \end{macro}^^A \@lastdiv
-% \begin{macrocode}
-%<*package&typearea&options>
-\def\movet@reserved@a@to@nnil#1\@nnil{\def\reserved@a{#1}}%
-\KOMA@key{DIV}[calc]{%
- \edef\@tempa{#1}%
- \def\@tempb{last}\ifx\@tempa\@tempb\let\@tempa=\@lastdiv
- \ifx\@tempa\relax\def\@tempa{current}\fi
- \fi
- \def\@tempb{current}\ifx\@tempa\@tempb\else
- \def\@tempb{default}\ifx\@tempa\@tempb\ta@div=\z@ \else
- \def\@tempb{calc}\ifx\@tempa\@tempb\ta@div=\tw@ \else
- \def\@tempb{classic}\ifx\@tempa\@tempb\ta@div=\thr@@ \else
- \expandafter\def\expandafter\@tempa\expandafter{\expandafter0\@tempa}%
- \afterassignment\movet@reserved@a@to@nnil
- \@tempcnta=\@tempa\relax\@nnil
- \def\@tempb{\relax}\ifx\reserved@a\@tempb
- \ta@div=\@tempcnta
- \edef\@tempa{\the\ta@div}%
- \else
- \let\@tempa\relax
- \fi
- \fi
- \fi
- \fi
- \fi
- \ifx\@tempa\relax
- \FamilyKeyStateUnknownValue
- \else
- \FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}{DIV}{\@tempa}%
- \fi
-}
-% \end{macrocode}
-% After loading the package we have to do a little bit more, because we need
-% to recalculate the areas.
-% \changes{v3.13}{2014/06/30}{\cs{FamilyKeyStateProcessed} added}
-% \changes{v3.24}{2017/07/23}{\cs{KOMA@kav@xreplacevalue} added}
-% \begin{macrocode}
-\AtEndOfPackage{%
- \KOMA@key{DIV}{%
- \typearea[current]{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}{DIV}{#1}%
- }%
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}
-%
-% \begin{command}{\typearea}
-% This is the real reason for the package: calculation of typing area and
-% margins providing an optional binding correction and depending on a
-% divisor.
-% \begin{macro}{\@typearea}
-% \changes{v2.4n}{1997/05/28}{moved main calculation into \cs{@typearea}}
-% \changes{v2.95}{2002/08/20}{\cs{selectfont} added}
-% The calculation itself is done in \cs{@typearea}. This command does not need
-% any parameters because it uses \cs{ta@div} and \cs{ta@bcor}.
-% \begin{macrocode}
-%<*package&typearea&body>
-\newcommand*\@typearea{%
-% \end{macrocode}
-% First of all we have to take care to select the correct font. Because
-% otherwise we cannot depend on, e.g., \cs{baselineskip}.
-% \begin{macrocode}
- \selectfont
-% \end{macrocode}
-% First calculation is about the horizontal block element size:
-% \begin{macrocode}
- \ta@hblk=\paperwidth
- \advance \ta@hblk by-\ta@bcor
- \divide\ta@hblk by\ta@div
-% \end{macrocode}
-% The with of the margin note column depends in the horizontal block size,
-% whether or not is should be part of the typing area and whether of not we
-% have a double sided document.
-% \changes{v2.8q}{2002/03/28}{\cs{marginparwidth} depends on
-% \opt{mpinclude}}
-% \begin{macrocode}
- \if@mincl
- \marginparwidth=\ta@hblk
- \advance\marginparwidth by-\marginparsep
- \else
- \if@twoside
- \if@semitwoside
- \marginparwidth=\ta@hblk
- \else
- \marginparwidth=1.5\ta@hblk
- \fi
- \else
- \marginparwidth=\ta@hblk
- \fi
- \fi
-% \end{macrocode}
-% The left and right margin resp. the left margin of odd and even pages
-% depends also on the horizontal block width. The relation depends on whether
-% or not the document is double sided.
-% \begin{macrocode}
- \oddsidemargin=-1in
- \evensidemargin=-1in
- \if@twoside
- \if@semitwoside
- \advance\oddsidemargin by1.5\ta@hblk
- \advance\oddsidemargin by\ta@bcor
-% \end{macrocode}
-% \changes{v3.12}{2013/10/15}{use alternating \opt{BCOR} with
-% \opt{twoside\quotechar=semi}}
-% From v3.12 the binding correction is part of the inner margin also for
-% \opt{twoside=semi}. If compatibility to earlier release is selected the
-% binding correction with \opt{twoside=semi} is always added to the left
-% margin.
-% \begin{macrocode}
- \expandafter\ifnum\scr@ta@v@is@lt{3.12}\relax
- \evensidemargin=\oddsidemargin
- \else
- \advance\evensidemargin by1.5\ta@hblk
- \fi
- \else
- \advance\oddsidemargin by\ta@hblk
- \advance\oddsidemargin by\ta@bcor
- \advance\evensidemargin by2\ta@hblk
- \if@mincl
- \advance\evensidemargin by\marginparwidth
- \advance\evensidemargin by\marginparsep
- \fi
- \fi
- \else
- \advance\oddsidemargin by1.5\ta@hblk
- \advance\oddsidemargin by\ta@bcor
- \evensidemargin=\oddsidemargin
- \fi
-% \end{macrocode}
-% The width of the typing area is the paper width without the three blocks
-% used for the margins and without the binding correction.
-% \begin{macrocode}
- \textwidth=\paperwidth
- \advance\textwidth by-\ta@bcor
- \advance\textwidth by-3\ta@hblk
-% \end{macrocode}
-% But, if the margin note column should be part of the typing area, it's width
-% has to be subtracted from the width of the typing area. We assume to place
-% the margin notes at the outer margin. But if the typing area is to narrow
-% for the margin note column, the width of margin note column will be
-% reduced. This can be done easily be swapping the two lengths.
-% \changes{v3.30}{2020/02/25}{orphan line break at end of warning message
-% removed}
-% \begin{macrocode}
- \if@mincl
- \advance\textwidth by-\marginparwidth
- \advance\textwidth by-\marginparsep
- \ifdim\textwidth <\marginparwidth
- \PackageWarningNoLine{typearea}{%
- Width of text (\the\textwidth) less than width of\MessageBreak
- marginpar (\the\marginparwidth) while using option\MessageBreak
- `mpinclude'.\MessageBreak
- Because of this, I'm exchanging the values.\MessageBreak
- You should increase DIV to avoid such problems%
- }%
- \@tempskipa=\marginparwidth
- \marginparwidth=\textwidth
- \textwidth=\@tempskipa
- \fi
- \fi
-% \end{macrocode}
-% Next the vertical size of a block.
-% \begin{macrocode}
- \ta@vblk=\paperheight
- \divide\ta@vblk by\ta@div
-% \end{macrocode}
-% The top margin depends on this vertical block size. But note, \TeX{} will
-% increase it by 1\,in.
-% \begin{macrocode}
- \topmargin=-1in
- \advance\topmargin by\ta@vblk
-% \end{macrocode}
-% And if head is not part of the typing area, the top margin has to be reduced
-% by the head size.
-% \begin{macrocode}
- \if@hincl \else
- \advance\topmargin by-\headheight
- \advance\topmargin by-\headsep
- \fi
-% \end{macrocode}
-% For the height of the typing area we use the paper size without the height
-% of head and footer. The head and footer may be part of the typing area or
-% not. If they are part of the typing area they reduce the height of it.
-% \begin{macrocode}
- \ta@temp=\paperheight
- \advance\ta@temp by-3\ta@vblk
- \if@hincl
- \advance\ta@temp by-\headheight
- \advance\ta@temp by-\headsep
- \fi
- \if@fincl
- \advance\ta@temp by-\footskip
- \fi
-% \end{macrocode}
-% Last but not least we have take care that the typing area consists of an
-% integer number of text lines.
-% \changes{v2.96}{2006/09/12}{setting \cs{topskip}}
-% \changes{v2.97c}{2007/07/04}{setting \cs{maxdepth}}
-% \begin{macrocode}
- \scr@ifundefinedorrelax{@ptsize}{%
- \topskip=\f@size\p@
- }{%
- \topskip=\@ptsize\p@
- \advance\topskip by 10\p@
- }%
- \maxdepth=.5\topskip
- \textheight=\topskip
- \@whiledim\textheight <\ta@temp
- \do{\advance\textheight by\baselineskip}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@typearea
-%
-% \begin{macro}{\ta@modiv}
-% Needed by \cs{typearea}. The first parameter will be divided by the second
-% one. \cs{ta@div} is set to the rounded result. Internally \cs{@tempdima} and
-% \cs{@tempdimb} are used.
-% \begin{macrocode}
-\newcommand*\ta@modiv[2]{
- \setlength{\@tempdima}{#1}
- \divide\@tempdima by#2
- \ta@div\@tempdima
- \ifnum \ta@div<4
- \ta@div=4
- \else
- \setlength{\@tempdimb}{#1}%
- \divide\@tempdimb by\ta@div
- \addtolength{\@tempdima}{\@tempdima}%
- \addtolength{\@tempdima}{-\@tempdimb}%
- \advance\ta@div by\@ne
- \setlength{\@tempdimb}{#1}%
- \divide\@tempdimb by\ta@div
-% \end{macrocode}
-% \changes{v2.5a}{1997/06/22}{\cs{ifdim} instead of \cs{ifnum}}
-% \begin{macrocode}
- \ifdim \@tempdima<\@tempdimb
- \advance\ta@div by\m@ne
- \fi
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \ta@modiv
-%
-% \begin{macro}{\ta@temp@goodwidth}
-% Sets \cs{ta@temp} to the heuristic optimal line width depending on the
-% current font. An optimal line width has 66 up to 72 characters. Here we use
-% a value of 69 characters. We assume that such a line consists of 66 lower
-% case letters (minors) and three upper case letters (majors). Normally the
-% weight of a letter depends on the language but we use same weight for each
-% letter.
-% \changes{v2.7i}{2001/05/17}{avoid overflows if a very large font is used}
-% \changes{v2.8q}{2002/03/06}{\cs{normalfont} \cs{normalsize} added}
-% \changes{v2.95a}{2006/07/20}{fix of large font calculation}
-% \begin{macrocode}
-\newcommand*\ta@temp@goodwidth{%
- \settowidth{\ta@temp}{\normalfont\normalsize
- abcdefghijklmnopqrstuvwxyz}%
- \ifdim\ta@temp >200\p@
- \setlength{\ta@temp}{2.53846\ta@temp}%
- \settowidth{\@tempdima}{\normalfont\normalsize
- ABCDEFGHIJKLMNOPQRSTUVWXYZ}%
- \setlength{\@tempdima}{.11538\@tempdima}%
- \addtolength{\ta@temp}{\@tempdima}%
- \else
- \multiply\ta@temp by66
- \settowidth{\@tempdima}{\normalfont\normalsize
- ABCDEFGHIJKLMNOPQRSTUVWXYZ}%
- \multiply\@tempdima by3
- \addtolength{\ta@temp}{\@tempdima}%
- \divide\ta@temp by26
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \ta@temp@goodwidth
-%
-% \begin{command}{\AfterCalculatingTypearea}
-% \changes{v2.96a}{2006/11/29}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by
-% \cs{kernel@ifstar}}
-% Users can influence the behaviour of \cs{typearea} by a hook. The star
-% variation adds the code locally the non-star variation globally.
-% \begin{macrocode}
-\newcommand*{\AfterCalculatingTypearea}{%
- \kernel@ifstar \l@addto@macro \g@addto@macro \@typearea@end
-}
-% \end{macrocode}
-% \begin{macro}{\@typearea@end}
-% \changes{v2.96a}{2006/11/29}{defined again but completely different}
-% Macro \cs{@typearea@end} is a hook that is executed at the end of
-% \cs{typearea} but before the activation of the new settings. So you can
-% change the result of \cs{typearea}.
-% \begin{macrocode}
-\newcommand*{\@typearea@end}{}
-% \end{macrocode}
-% \end{macro}^^A \@typearea@end
-% \end{command}^^A \AfterCalculatingTypearea
-%
-% \begin{command}{\activateareas}
-% \changes{v2.96a}{2006/11/29}{new name for old macro}
-% \changes{v3.17}{2015/02/07}{respect option \opt{usegeometry}}
-% This macro is used to activate the new typing area and margin settings
-% inside the document body. It is a hack, because is uses internal \LaTeX{}
-% kernel code.
-% \begin{macrocode}
-\newcommand*{\activateareas}{%
-% \end{macrocode}
-% First of all test, whether or not we are inside the document body. If not do
-% nothing.
-% \begin{macrocode}
- \if@atdocument
-% \end{macrocode}
-% \changes{v3.23}{2017/04/03}{info instead of warning if used inside the
-% document body}
-% But if, we show an info, because it is a hack. It depends in the \LaTeX{}
-% release. Nevertheless, it seems to be stable from the very first \LaTeXe{}
-% release. So we use an info only. Before v3.23 we have used a warning.
-% \begin{macrocode}
- \PackageInfo{typearea}{%
- Using dirty hack to recalculate internal output\MessageBreak
- dimensions of LaTeX%
- }%
-% \end{macrocode}
-% Now, set several internal and none internal \LaTeX{}lengths to the new
-% dimensions.
-% \begin{macrocode}
- \@colht=\textheight
- \@colroom=\textheight
- \vsize=\textheight
- \columnwidth=\textwidth
- \if@twocolumn
- \advance\columnwidth by-\columnsep
- \divide\columnwidth by\tw@
- \hsize=\columnwidth
- \@firstcolumntrue
- \fi
- \hsize=\columnwidth
- \linewidth\hsize
- \scr@ifundefinedorrelax{@pagesizelast}{}{%
- \KOMAoptions{pagesize=\@pagesizelast}%
- }%
-% \end{macrocode}
-% \changes{v3.17}{2015/03/18}{adapt the \opt{parskip} settings}
-% From v3.17 changes of the typing area can immediately change some of the
-% \opt{parskip} settings. Before |\begin{document}| the change will be done
-% automatically at |\begin{document}| and therefore adding it here is correct.
-% \begin{macrocode}
- \expandafter\ifnum\scr@ta@v@is@ge{3.17}%
- \csname par@updaterelative\endcsname
- \fi
- \fi
-% \end{macrocode}
-% \changes{v3.17}{2015/02/07}{new code for option \opt{usegeometry}}
-% If option \opt{usegeometry} is active we need to setup several options of
-% package \pkg{geometry}. We use \cs{scr@geometryargs} to store them. And
-% we either have to pass these options to \pkg{geometry} or define a new
-% geometry. In the second case we also need some hacks to make the new paper
-% size available for \pkg{geometry}.
-% \begin{macrocode}
- \edef\scr@geometryargs{%
- bindingoffset=\the\ta@bcor,
- lmargin=\the\dimexpr 1in+\oddsidemargin-\ta@bcor\relax,
- textwidth=\the\textwidth,
- \if@hincl
- includehead,%
- top=\the\dimexpr 1in+\topmargin\relax,
- \else
- includehead=false,%
- top=\the\dimexpr 1in+\topmargin+\headheight+\headsep\relax,
- \fi
- headheight=\the\headheight,
- headsep=\the\headsep,
- textheight=\the\textheight,
- \if@fincl
- includefoot,
- \else
- includefoot=false,
- \fi
- footskip=\the\footskip,
- \if@mincl
- includemp,
- \else
- includemp=false,
- \fi
- marginparwidth=\the\marginparwidth,
- marginparsep=\the\marginparsep
- }%
- \if@ta@usegeometry
- \@ifundefined{Gm@save}{%
- \if@atdocument\else
- \edef\scr@geometryargs{%
- paperwidth=\the\paperwidth,paperheight=\the\paperheight,%
- \scr@geometryargs
- }%
- \PassOptionsToPackage{\scr@geometryargs}{geometry}%
- \fi
- }{%
- \edef\Gm@restore@org{\Gm@restore}%
- \if@atdocument
- \expandafter\newgeometry\expandafter{\scr@geometryargs}%
- \else
- \edef\scr@geometryargs{%
- paperwidth=\the\paperwidth,paperheight=\the\paperheight,%
- \scr@geometryargs
- }%
- \expandafter\geometry\expandafter{\scr@geometryargs}%
- \fi
- }%
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\scr@geometryargs}
-% \changes{v3.16}{2015/02/07}{neu (intern)}
-% The initialization of the \pkg{geometry} options is empty. It will be
-% filled automatically by \cs{activateareas}.
-% \begin{macrocode}
-\newcommand*{\scr@geometryargs}{}
-% \end{macrocode}
-% \end{macro}^^A \scr@geometryargs
-% \end{command}^^A \activateareas
-%
-% \changes{v2.4g}{1996/11/04}{waste comments removed}
-% \changes{v2.7g}{2001/04/17}{new symbolic values \opt{current},
-% \opt{default}, \opt{calc}, \opt{classic}}
-% \changes{v2.8q}{2001/11/06}{new symbolic value \opt{last}}
-% \changes{v2.96}{2006/08/21}{warn if \cs{typearea} is used inside a group}
-% \changes{v3.10}{2011/09/13}{using \cs{scr@grouplevel@test}}
-% \changes{v3.12}{2013/03/26}{page footer height configurable}
-% \changes{v3.30}{2020/03/24}{\opt{current} after \cs{areaset} is \opt{areaset}}
-%
-% The symbolic values of the obligatory argument of \cs{typearea}:
-% \begin{center}\begin{tabular}{lll}
-% Symbol & Value & Meaning \\\hline\\[-2ex]
-% \opt{calc} & 2 & calculate a good value \\
-% \opt{classic} & 3 & \emph{mittelalterlicher Buchseitenkanon} \\
-% \opt{current} & --- & use the current value \\
-% \opt{default} & 0 & use a value from the list \\
-% \opt{last} & --- & use the value from the last usage of
-% \cs{typearea} \\
-% \opt{areaset} & --- & replace the current typing area \\
-% \end{tabular}\end{center}
-%
-% There is only one symbolic value that can be used as the optional argument:
-% \opt{current}.
-% \begin{macrocode}
-\newcommand*\typearea[2][\z@]{%
- \scr@grouplevel@test\typearea
- \edef\@tempa{#1}\edef\@tempb{current}\ifx\@tempa\@tempb\else
- \setlength{\ta@bcor}{#1}%
- \fi
- \edef\@tempa{#2}%
- \def\@tempb{last}\ifx\@tempa\@tempb\let\@tempa=\@lastdiv
- \ifx\@tempa\relax \def\@tempa{current}\fi
- \fi
- \Ifstr{\@tempa}{current}{%
- \Ifstr{\@lastdiv}{areaset}{\let\@tempa\@lastdiv}{}%
- }{}%
- \def\@tempb{areaset}\ifx\@tempa\@tempb
- \areaset[current]{\textwidth}{\textheight}%
- \else
- \def\@tempb{current}\ifx\@tempa\@tempb
- \else
- \def\@tempb{default}\ifx\@tempa\@tempb\ta@div=\z@ \else
- \def\@tempb{calc}\ifx\@tempa\@tempb\ta@div=\tw@ \else
- \def\@tempb{classic}\ifx\@tempa\@tempb\ta@div=\thr@@ \else
- \ta@div=\@tempa
- \fi
- \fi
- \fi
- \fi
- \edef\@lastdiv{\the\ta@div}%
-% \end{macrocode}
-% Before we do the calculation we need to start a new page if we are inside
-% the document's body. And we need to select the document font size.
-% \changes{v2.95a}{2006/07/20}{select document font size}
-% \begin{macrocode}
- \if@atdocument\newpage\fi
- \normalsize
-% \end{macrocode}
-% Is the height of the page head already given or do we need to calculate
-% it. If we need to calculate it we use 1.25 of the base lines distance. This
-% gives enough room for optional separation lines (which are set outside if
-% use \pkg*{scrlayer-scrpage}).
-% \changes{v2.4n}{1997/05/28}{page head height depends on base line
-% distance}
-% \begin{macrocode}
- \@ifundefined{ta@hh}{%
- \headheight=1.25\baselineskip
- }{%
- \headheight=\ta@hh
- }%
-% \end{macrocode}
-% The distance between the head and the text is always the same. Different
-% typographers recommend different values. A good value would result in a grid
-% that would be used for all lines of the page. But the distance should not to
-% large. Supposedly a good value would be the height of one text line. But
-% with head separation rule this wouldn't be a good value. So we use a
-% compromise.
-% \begin{macrocode}
- \headsep=1.5\baselineskip
-% \end{macrocode}
-% The foot is a similar problem. But we have to setup also \len{footskip} not
-% only \len{footheight}.
-% \begin{macrocode}
- \@ifundefined{footheight}{%
- \newlength\footheight
- }{}%
- \@ifundefined{ta@fh}{%
- \footheight=1.25\baselineskip
- }{%
- \footheight=\ta@fh
- }%
- \footskip=\dimexpr\footheight+2.25\baselineskip
-% \end{macrocode}
-% Some values also independent from the divisor and the binding correction.
-% \begin{macrocode}
- \marginparsep=1cc
- \marginparpush=0.45\baselineskip
-% \end{macrocode}
-% \changes{v2.4g}{1996/11/04}{\opt{DIV\quotechar=0} tries to use a value from the
-% default list}
-% Before we do the calculation we test, whether the resulting divisor is
-% 0. Values from 0 up to 3 are not possible because we use three parts for the
-% margins. So we can use 0 to get a value from the default value list if
-% available.
-% \changes{v2.5h}{1999/12/29}{warning message changed}
-% \begin{macrocode}
- \ifnum\ta@div=\z@
- \@ifundefined{@ptsize}{%
- \@tempdima=\f@size\p@
- \advance\@tempdima by.5pt
- \ta@div=\@tempdima
- \divide\ta@div by65536
- \advance\ta@div by-10
- \xdef\@ptsize{\the\ta@div}%
- \PackageWarningNoLine{typearea}{%
- \string\@ptsize\space not defined!\MessageBreak
- Fontsize is \f@size pt.\MessageBreak
- Defining \string\@ptsize\space to \@ptsize%
- }%
- }{}%
- \ta@divfor{\@ptsize}%
- \fi
-% \end{macrocode}
-% \changes{v2.4n}{1997/05/28}{optional \emph{klassischer Buchseitenkanon}}
-% Another special case is if the divisor is 3. In this case we calculate a
-% divisor near to the \emph{klassischer Buchseitenkanon}. This means we try to
-% have the height of the typing area is as near as possible the width of the
-% paper. For classic paper size this should be a harmonious result.
-% \begin{macrocode}
- \ifnum\ta@div=3
- \typeout{DIV calculation for classic typearea.}%
- \setlength{\ta@temp}{\paperwidth}%
- \addtolength{\ta@temp}{-\ta@bcor}%
-% \end{macrocode}
-% Here we also need to take care for whether the head is part of the typing
-% area or the margin.
-% \begin{macrocode}
- \if@hincl\else
- \addtolength{\ta@temp}{\headheight}%
- \addtolength{\ta@temp}{\headsep}%
- \fi
- \if@fincl\else
- \addtolength{\ta@temp}{\footskip}%
- \fi
-% \end{macrocode}
-% Sometimes we need more vertical space than available. In this case we use
-% another calculation. This will be defined later.
-% \changes{v2.5a}{1997/06/22}{\cs{ifdim} instead of \cs{ifnum}}
-% \begin{macrocode}
- \ifdim \ta@temp >\paperheight
- \PackageWarningNoLine{typearea}{%
- No classic typearea with this papersize!\MessageBreak
- Using calculated DIV%
- }%
- \ta@div=\@ne
-% \end{macrocode}
-% Otherwise we can calculate the height of all vertical margins by the height
-% of the paper width (without binding correction)
-% \begin{macrocode}
- \else
- \setlength{\ta@temp}{\paperheight}%
- \addtolength{\ta@temp}{-\paperwidth}%
- \addtolength{\ta@temp}{\ta@bcor}%
-% \end{macrocode}
-% and from this the height of one block
-% \begin{macrocode}
- \divide\ta@temp by3
-% \end{macrocode}
-% and this will result in a divisor.
-% \begin{macrocode}
- \ta@modiv{\paperheight}{\ta@temp}%
- \fi
-% \end{macrocode}
-% Here we do not need to respect \opt{mpinclude} because we do not use the
-% width of the typing area but the height of the paper.
-% \begin{macrocode}
- \fi
-% \end{macrocode}
-% If we did not found a good value until this point, we try to calculate the
-% optimal divisor.
-% \changes{v2.4n}{1997/05/28}{improved optimal divisor calculation}
-% \begin{macrocode}
- \ifnum\ta@div <4
- \typeout{DIV calculation for typearea with good linewidth.}%
-% \end{macrocode}
-% The width of the typing area could at most be the width of the paper without
-% the binding correction.
-% \begin{macrocode}
- \setlength{\textwidth}{\paperwidth}%
- \addtolength{\textwidth}{-\ta@bcor}%
-% \end{macrocode}
-% The optimal width would be the optimal line width.
-% \begin{macrocode}
- \ta@temp@goodwidth
-% \end{macrocode}
-% In two column mode each text line has two such columns plus the column
-% separation width.
-% \changes{v2.8q}{2001/12/13}{\opt{DIVcalc} uses wider columns in two
-% column mode}
-% \begin{macrocode}
- \if@twocolumn
- \addtolength{\ta@temp}{\ta@temp}%
- \addtolength{\ta@temp}{\columnsep}%
- \fi
-% \end{macrocode}
-% Former releases used an iterative approach to get the best
-% divisor. Depending on the \TeX{} implementation and the paper size this
-% could be more or less slow. So we do a direct calculation starting with the
-% width of the left and right margin.
-% \begin{macrocode}
- \setlength{\ta@hblk}{\paperwidth}%
- \addtolength{\ta@hblk}{-\ta@temp}%
-% \end{macrocode}
-% This can be used to calculate the width of a block.
-% \begin{macrocode}
- \divide\ta@hblk by3
-% \end{macrocode}
-% If this width is negative, we use a minimum width of 5\,mm.
-% \changes{v2.5a}{1997/06/22}{\cs{ifdim} instead of \cs{ifnum}.}
-% \begin{macrocode}
- \ifdim \ta@hblk <\z@
- \setlength{\ta@hblk}{5mm}%
- \fi
-% \end{macrocode}
-% The width of block and the width of the paper can be used to calculate the
-% divisor.
-% \changes{v2.8q}{2002/03/28}{respect \opt{mpinclude} at the calculation
-% of the best divisor}
-% If option \opt{mpinclude} is active, we have to multiply the divisor with
-% $\frac{3}{3+m}$. $m$ is the number of blocks used for the margin notes. If
-% $m=1$ we have an factor of $\frac{3}{4}=0.75$. More difficult would be not
-% to use a number of blocks for the margin note column but a dedicated value
-% for the width of the margin note column.
-% \begin{macrocode}
- \if@mincl
- \setlength{\ta@temp}{.75\ta@hblk}%
- \else
- \setlength{\ta@temp}{\ta@hblk}%
- \fi
- \ta@modiv{\paperwidth}{\ta@temp}%
-% \end{macrocode}
-% Another difficulty would be, if the divisor now is optimal for the width but
-% result in a to large height. To find this out, we first calculate the typing
-% area and margins with the found divisor.
-% \begin{macrocode}
- \@typearea
-% \end{macrocode}
-% Now, we test the vertical sizes. Again a minimum block size is of 5\,mm will
-% be used. But we have to take care the 1\,in of \TeX!
-% \changes{v2.5a}{1997/06/22}{\cs{ifdim} instead of \cs{ifnum}}
-% \begin{macrocode}
- \setlength{\ta@temp}{-1in}%
- \addtolength{\ta@temp}{5mm}%
- \ifdim\topmargin <\ta@temp
-% \end{macrocode}
-% This would be the minimum top margin. If the margin is less, we need another
-% divisor. In this case we also have to recognize whether the page head and
-% footer are part of the margins or the typing area.
-% \changes{v2.5b}{1997/06/29}{take care for \opt{headinclude} and
-% \opt{footinclude} while calculating the divisor for minimum top
-% margin}
-% \begin{macrocode}
- \setlength{\ta@temp}{15mm}%
- \if@hincl\else
- \addtolength{\ta@temp}{\headheight}%
- \addtolength{\ta@temp}{\headsep}%
- \fi
- \if@fincl\else
- \addtolength{\ta@temp}{\footskip}%
- \fi
- \divide\ta@temp by3
- \ta@modiv{\paperheight}{\ta@temp}%
- \fi
-% \end{macrocode}
-% A solution for this difficulty has been found.
-% \begin{macrocode}
- \fi
-% \end{macrocode}
-% So now we have the final divisor and can do the final calculation.
-% \begin{macrocode}
- \@typearea
-% \end{macrocode}
-% \changes{v2.0e}{1994/10/28}{write layout values to the \file{log} file}
-% \changes{v2.4i}{1996/11/11}{write to the \file{log} file later}
-% \changes{v2.4i}{1996/11/11}{execute \cs{@typearea@end} at the end of \cs{typearea}}
-% \changes{v2.4j}{1996/12/04}{\file{log} output with only one
-% \cs{textheight} but additional \cs{baselineskip}}
-% \changes{v2.5}{1997/06/17}{"`arithmetic overflow"' with \opt{landscape} fixed}
-% \changes{v2.95}{2004/01/30}{warning in two column mode fixed}
-% \changes{v3.00}{2008/10/08}{use \cs{ta@layoutinfo} to write the layout
-% values into the \file{log} file}
-% \changes{v3.01b}{2008/12/09}{warning for sub-optimal settings changed}
-% \changes{v3.26}{2018/07/16}{warning about long lines changed}
-% \changes{v3.26}{2018/07/16}{warning about small lines changed and
-% replaced by an info}
-% Last but not least we write some layout values into the \file{log} file. For
-% some of the information we need additional calculations, e.g., of a good
-% line width.
-% \begin{macrocode}
- \ta@temp@goodwidth
- \if@twocolumn
- \addtolength{\ta@temp}{\ta@temp}%
- \addtolength{\ta@temp}{\columnsep}%
- \fi
- \setlength{\@tempdima}{\ta@temp}%
- \addtolength{\ta@temp}{-\textwidth}%
- \divide\@tempdima by100
- \divide\ta@temp by\@tempdima
- \@tempcnta=\ta@temp
- \ifnum\@tempcnta <5
- \ifnum\@tempcnta >-5
- \@tempcnta=0
- \else
- \advance\@tempcnta by4
- \fi
- \else
- \advance\@tempcnta by-4
- \fi
- \ifnum\@tempcnta <-15
- \@tempcnta=-\@tempcnta
- \PackageWarningNoLine{typearea}{%
- Bad type area settings!\MessageBreak
- The detected line width is about
- \the\@tempcnta\@percentchar\MessageBreak
- larger than the heuristically estimated maximum\MessageBreak
- limit of typographical good line width.\MessageBreak
- You should e.g.
- \ifnum\ta@div >6 decrease DIV, \fi
- \ifdim\f@size\p@<\@xiipt\p@ increase fontsize\else
- (increase fontsize)\fi\MessageBreak
- or change papersize%
- }%
- \@tempcnta=-\@tempcnta
- \else
- \ifnum\@tempcnta>15
- \PackageInfoNoLine{typearea}{%
- Maybe no optimal type area settings!\MessageBreak
- The detected line width is about
- \the\@tempcnta\@percentchar\MessageBreak
- smaller than the heuristically estimated maximum\MessageBreak
- limit of typographical good line width.\MessageBreak
- You could e.g. increase DIV%
- \ifdim\f@size\p@>\@xpt\p@, decrease fontsize\fi\MessageBreak
- or change the papersize%
- }%
- \fi\fi
- \ifnum\ta@div <6
- \PackageWarningNoLine{typearea}{%
- Very low DIV value!\MessageBreak
- DIV values less than 6 result in textwidth/-height\MessageBreak
- smaller than total marginwidth/-height.\MessageBreak
- You should e.g. increase DIV, increase fontsize or\MessageBreak
- change papersize%
- }
- \fi
- \ta@layoutinfo{\number\ta@div}{\the\@tempcnta}%
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{DIV}%
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{DIV}{\@lastdiv}%
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{BCOR}%
- \KOMA@kav@xadd{.typearea.\scr@pkgextension}{BCOR}{\the\ta@bcor}%
- \@typearea@end
- \activateareas
- \ifdim \dimexpr 1in+\topmargin
- +\headheight+\headsep
- +\textheight
- +\footskip+\dp\strutbox\relax
- >\paperheight
- \PackageWarningNoLine{typearea}{%
- page content and margins higher than paper.\MessageBreak
- This may result in page footer out of paper.\MessageBreak
- You should decrease DIV, decrease foot height,\MessageBreak
- or include footer into type area%
- }%
- \fi
- \fi
-}
-% \end{macrocode}
-%
-% \begin{macro}{\ta@layoutinfo}
-% \changes{v3.00}{2008/10/08}{added}
-% Write several layout information into the \file{log} file. The first
-% argument is the current divisor and the second the discrepancy from the
-% optimal divisor or empty or \cs{relax}.
-% \begin{macrocode}
-\newcommand*{\ta@layoutinfo}[2]{%
- \PackageInfo{typearea}{%
- These are the values describing the layout:\MessageBreak
- DIV\space\space=\space#1\MessageBreak
- BCOR\space=\space\the\ta@bcor\MessageBreak
- \string\paperwidth\space\space\space\space\space\space=%
- \space\the\paperwidth\MessageBreak
- \space\string\textwidth\space\space\space\space\space\space=%
- \space\the\textwidth\MessageBreak
- \ifx\relax#2\relax\else
- \space DIV departure\space\space\space=%
- \space#2\@percentchar\MessageBreak
- \fi
- \space\string\evensidemargin\space=%
- \space\the\evensidemargin\MessageBreak
- \space\string\oddsidemargin\space\space=%
- \space\the\oddsidemargin\MessageBreak
- \string\paperheight\space\space\space\space\space=%
- \space\the\paperheight\MessageBreak
- \space\string\textheight\space\space\space\space\space=%
- \space\the\textheight\MessageBreak
- \space\string\topmargin\space\space\space\space\space\space=%
- \space\the\topmargin\MessageBreak
- \space\string\headheight\space\space\space\space\space=%
- \space\the\headheight\MessageBreak
- \space\string\headsep\space\space\space\space\space\space\space\space=%
- \space\the\headsep\MessageBreak
- \space\string\topskip\space\space\space\space\space\space\space\space=%
- \space\the\topskip\MessageBreak
- \space\string\footskip\space\space\space\space\space\space\space=%
- \space\the\footskip\MessageBreak
- \space\string\baselineskip\space\space\space=%
- \space\the\baselineskip\MessageBreak
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \ta@layoutinfo
-% \end{command}^^A \typearea
-%
-% \begin{command}{\recalctypearea}
-% \changes{v2.95}{2002/12/04}{added}
-% This command can be used to recalculate the typing area and the margins with
-% the divisor and the binding correction that has been used last. The command
-% is available only after loading the package. So it is an indicator if we
-% are in the load or the run-time phase of the package.
-% \begin{macrocode}
-\AtEndOfPackage{\newcommand*{\recalctypearea}{\typearea[current]{last}}}
-%</package&typearea&body>
-% \end{macrocode}
-% \end{command}
-%
-% Initially \cs{ta@bcor} and \cs{ta@div} are zero if is has not been set using
-% one of the options. The 0 divisor stands for using a value from the default
-% list. So the final initialization of the typing area and margins is very
-% easy.
-% \changes{v2.8q}{2001/11/06}{initialization using symbolic values \opt{current}}
-% \begin{macrocode}
-%<*package&typearea&final>
-\typearea[current]{current}
-%</package&typearea&final>
-% \end{macrocode}
-%
-% \subsection{Storage and reactivation of typing area and margin settings}
-%
-% \begin{command}{\storeareas}
-% \changes{v3.10}{2011/09/13}{added}
-% \changes{v3.18}{2015/05/20}{Hooks at the beginning and end of the defined macro}
-% You can store the current settings of the typing area and the margins in a
-% macro. If you use the macro later the stored settings will be restored.
-% \begin{macro}{\scr@grouplevel@test}
-% \changes{v3.10}{2011/09/13}{added}
-% Warn if restoring the settings is used inside a group.
-% \begin{macrocode}
-%<*package&typearea&body>
-\newcommand*{\scr@grouplevel@test}[1]{%
- \ifcase\currentgrouptype\else
- \PackageWarning{typearea}{%
- \string#1\space used at group level
- \the\currentgrouplevel.\MessageBreak
- Using \string#1\space inside any group, e.g.\MessageBreak
- environments, math mode, boxes, etc. may result in\MessageBreak
- many type setting problems.\MessageBreak
- You should move the command \string#1\MessageBreak
- outside all groups%
- }%
- \fi
-}
-\newcommand*{\storeareas}[1]{%
- \edef\reserved@a{%
- \noexpand\newcommand*{\unexpanded{#1}}{%
- \noexpand\scr@grouplevel@test\unexpanded{#1}%
- \noexpand\csname scr@storeareas@before@hook\noexpand\endcsname
- \unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@storeareas@before@current@hook\endcsname}%
- \noexpand\paperheight=\the\paperheight\space
- \noexpand\paperwidth=\the\paperwidth\space
- \noexpand\topmargin=\the\topmargin\space
- \noexpand\headheight=\the\headheight\space
- \noexpand\headsep=\the\headsep\space
- \noexpand\textheight=\the\textheight\space
- \noexpand\vsize=\the\vsize\space
- \noexpand\footskip=\the\footskip\space
- \noexpand\@colht=\the\@colht\space
- \noexpand\@colroom=\the\@colroom\space
- \noexpand\textwidth=\the\textwidth\space
- \noexpand\columnwidth=\the\columnwidth\space
- \noexpand\hsize=\the\hsize\space
- \noexpand\oddsidemargin=\the\oddsidemargin\space
- \noexpand\evensidemargin=\if@twoside
- \the\evensidemargin
- \else
- \the\oddsidemargin
- \fi\space
- \noexpand\linewidth=\the\linewidth\space
- \noexpand\maxdepth=\the\maxdepth\space
- \scr@ifundefinedorrelax{@pagesizelast}{}{%
- \noexpand\KOMAoptions{pagesize=\@pagesizelast}}%
- \noexpand\ta@div=\the\ta@div\space
- \noexpand\ta@bcor=\the\ta@bcor\space
- \noexpand\def\noexpand\@lastdiv{\@lastdiv}%
- \noexpand\marginparsep=\the\marginparsep\space
- \noexpand\marginparwidth=\the\marginparwidth\space
- \noexpand\def
- \expandafter\noexpand\csname scr@kav@KOMA.typearea.\scr@pkgextension\endcsname{%
- \unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@kav@KOMA.typearea.\scr@pkgextension\endcsname}%
- }%
- \unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@storeareas@after@current@hook\endcsname}%
- \noexpand\csname scr@storeareas@after@hook\noexpand\endcsname
- }%
- }%
- \reserved@a
-}
-% \end{macrocode}
-% \begin{command}{\BeforeRestoreareas,\AfterRestoreareas}
-% \changes{v3.18}{2015/05/20}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\scr@storeareashook,\scr@storeareas@before@hook,
-% \scr@storeareas@before@current@hook,\scr@storeareas@after@hook,
-% \scr@storeareas@after@current@hook}
-% \changes{v3.18}{2015/05/20}{added}
-% Adds code to one of the hooks of the macros defined by \cs{storeareas}.
-% The star variants adds code only to not yet defined macros. The non-star
-% variant also changes already defined macros.
-% \begin{macrocode}
-\newcommand*{\BeforeRestoreareas}{%
- \kernel@ifstar{\scr@storeareashook{before@current}}%
- {\scr@storeareashook{before}}%
-}
-\newcommand*{\AfterRestoreareas}{%
- \kernel@ifstar{\scr@storeareashook{after@current}}%
- {\scr@storeareashook{after}}%
-}
-\newcommand*{\scr@storeareashook}[2]{%
- \expandafter\l@addto@macro\csname scr@storeareas@#1@hook\endcsname{#2}%
-}
-\newcommand*{\scr@storeareas@before@hook}{}
-\newcommand*{\scr@storeareas@before@current@hook}{}
-\newcommand*{\scr@storeareas@after@hook}{}
-\newcommand*{\scr@storeareas@after@current@hook}{}
-%</package&typearea&body>
-% \end{macrocode}
-% \end{macro}^^A \scr@storeareashook … \scr@storeareas@after@current@hook
-% \end{command}^^A \BeforeRestoreareas,\AfterRestoreareas
-% \end{macro}^^A \scr@grouplevel@test
-% \end{command}^^A \storeareas
-%
-% \subsection{Calculation of margins for a given typing area}
-%
-% Beside the calculation of the typing area and the margins by a divisor
-% \pkg*{typearea} also provides the calculation of margins for a given
-% typing area.
-%
-% \begin{option}{areasetadvanced}
-% \changes{v3.11}{2012/04/17}{added}
-% Switch to advanced version of \cs{areaset}. This does calculate margins
-% more like \cs{typearea}. Nevertheless, there's still a difference at the top
-% margin, because \cs{typerea} doesn't balance differences in calculated
-% height of margins and resulting height of margins but reduces only the
-% bottom margin.
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@ifkey{areasetadvanced}{@areasetadvanced}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}
-%
-% \begin{command}{\areaset}
-% \changes{v2.1b}{1994/12/31}{\cs{headheight} depends on \cs{@ptsize}}
-% \changes{v2.6}{2000/01/04}{\cs{headheight} depends on \cs{f@size} instead
-% of \cs{@ptsize}}
-% \changes{v2.7g}{2001/04/17}{symbolic value \opt{current} for the
-% optional argument}
-% \changes{v2.95}{2002/12/05}{execute \cs{@typearea@end} at the end of
-% \cs{areaset}}
-% If we have given width and height of the typing area we still can calculate
-% the margins. Again we want to use this not only in the document preamble but
-% also in the document body.
-% \begin{macrocode}
-%<*package&typearea&body>
-\newcommand*\areaset[3][\z@]{%
- \edef\@tempa{#1}\edef\@tempb{current}\ifx\@tempa\@tempb\else
- \setlength{\ta@bcor}{#1}%
- \fi
-% \end{macrocode}
-% We have to start a new page if we are inside the document body.
-% \begin{macrocode}
- \if@atdocument\newpage\fi
-% \end{macrocode}
-% Then we do the calculation.
-% \changes{v2.96}{2006/09/12}{set \cs{topskip}}
-% \changes{v3.00}{2008/10/08}{use \cs{ta@layoutinfo} to write layout
-% information into the \file{log} file}
-% \begin{macrocode}
- \setlength{\textwidth}{#2}%
- \setlength{\textheight}{#3}%
- \def\@lastdiv{areaset}%
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{DIV}%
- \KOMA@kav@add{.typearea.\scr@pkgextension}{DIV}{areaset}%
- \KOMA@kav@removekey{.typearea.\scr@pkgextension}{BCOR}%
- \KOMA@kav@add{.typearea.\scr@pkgextension}{BCOR}{\the\ta@bcor}%
- \ta@hblk=\paperwidth
- \advance\ta@hblk by-\ta@bcor
- \advance\ta@hblk by-\textwidth
-% \end{macrocode}
-% \changes{v3.11}{2012/04/17}{advanced version with different margin widths}%
-% With v3.11 we will have an advanced version of \cs{areaset}. This
-% version takes care to option \opt{mpinclude}.
-% \begin{macrocode}
- \if@areasetadvanced
- \if@mincl
- \divide\ta@hblk by4
- \else
- \divide\ta@hblk by3
- \fi
- \else
- \divide\ta@hblk by3
- \fi
- \oddsidemargin=-1in
- \evensidemargin=-1in
- \if@twoside
- \if@semitwoside
- \advance\oddsidemargin by1.5\ta@hblk
- \advance\oddsidemargin by\ta@bcor
-% \end{macrocode}
-% \changes{v3.12}{2013/10/15}{use alternating \opt{BCOR} with
-% \opt{twoside\quotechar=semi}}
-% If \opt{twoside=semi} is used, form v3.12 we add the binding correction
-% to the inner margin. If compatibility to version less than 3.12 has been
-% selected the binding correction will be added to the left margin.
-% \begin{macrocode}
- \expandafter\ifnum\scr@ta@v@is@lt{3.12}\relax
- \evensidemargin=\oddsidemargin
- \else
- \advance\evensidemargin by1.5\ta@hblk
- \fi
- \else
- \advance\oddsidemargin by\ta@hblk
- \advance\oddsidemargin by\ta@bcor
- \advance\evensidemargin by2\ta@hblk
- \fi
- \else
- \advance\oddsidemargin by1.5\ta@hblk
- \advance\oddsidemargin by\ta@bcor
- \evensidemargin\oddsidemargin
- \fi
- \scr@ifundefinedorrelax{@ptsize}{%
- \topskip=\f@size\p@
- }{%
- \topskip=\@ptsize\p@
- \advance\topskip by 10\p@
- }%
-% \end{macrocode}
-% \changes{v3.11}{2012/04/17}{advanced version with different margin widths}%
-% With v3.11 we will have an advanced version of \cs{areaset}. This
-% version uses the head height algorithm of \cs{typearea}.
-% \begin{macrocode}
- \if@areasetadvanced
- \normalsize
- \@ifundefined{ta@hh}{%
- \headheight=1.25\baselineskip
- }{%
- \headheight=\ta@hh
- }%
- \else
- \headheight=15\p@
- \advance\headheight by\f@size\p@
- \advance\headheight by-10\p@
- \fi
- \headsep=1.5\baselineskip
-% \end{macrocode}
-% \changes{v3.12}{2013/03/26}{changes for height of foot}
-% \begin{macrocode}
- \@ifundefined{footheight}{\newlength\footheight}{}
- \if@areasetadvanced
- \@ifundefined{ta@fh}{%
- \footheight=1.25\baselineskip
- \footskip=3.5\baselineskip
- }{%
- \footheight=\ta@fh
- \footskip=\dimexpr \footheight+2.25\baselineskip\relax
- }%
- \else
- \footheight=1.25\baselineskip
- \footskip=3.5\baselineskip
- \fi
- \ta@vblk=\paperheight
- \advance\ta@vblk by-\textheight
- \divide\ta@vblk by3
- \if@hincl
- \advance\textheight by-\headheight
- \advance\textheight by-\headsep
- \fi
- \if@fincl
- \advance\textheight by-\footskip
- \fi
- \topmargin=-1in
- \advance\topmargin by\ta@vblk
- \if@hincl \else
- \advance\topmargin by-\headheight
- \advance\topmargin by-\headsep
- \fi
- \if@twoside
- \if@semitwoside
- \marginparwidth=\ta@hblk
- \else
- \marginparwidth=1.5\ta@hblk
- \fi
- \else
- \marginparwidth=\ta@hblk
- \fi
- \marginparsep=1cc
-% \end{macrocode}
-% \changes{v3.11}{2012/04/17}{advanced version with different
-% \cs{marginparwidth} and unchanged \cs{marginparsep}}%
-% With version 3.11 we will have an advanced version of \cs{areaset}. This
-% version supports \opt{mpinclude} option like \cs{typearea}.
-% \begin{macrocode}
- \if@areasetadvanced
- \if@mincl
- \marginparwidth=\ta@hblk
- \if@twoside\if@semitwoside\else
- \advance\evensidemargin by\marginparwidth
- \fi\fi
- \advance\marginparwidth by-\marginparsep
- \fi
- \fi
- \marginparpush=0.45\baselineskip
- \ta@layoutinfo{areaset}{}%
-% \end{macrocode}
-% \changes{v3.11}{2012/04/17}{using \cs{@areaset@end}}
-% \changes{v3.16a}{2015/02/11}{using \cs{footheight} for calculation of
-% page usage}
-% Since v3.11 we also support \cs{AfterSettingArea} analogous to
-% \cs{AfterCalculatingTypearea}:
-% \begin{macrocode}
- \@areaset@end
- \activateareas
- \ifdim \dimexpr 1in+\topmargin
- +\headheight+\headsep
- +\textheight
- +\footskip+\footheight-\ht\strutbox\relax
- >\paperheight
- \PackageWarningNoLine{typearea}{%
- page content and margins higher than paper.\MessageBreak
- This may result in page footer out of paper.\MessageBreak
- You should decrease DIV, decrease foot height,\MessageBreak
- or decreate height of text area%
- }%
- \fi
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\AfterSettingArea}
-% \changes{v3.11}{2012/04/17}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% The user may influence the result of \cs{areaset}. The star version works
-% local while the non-star version is global.
-% \begin{macrocode}
-\newcommand*{\AfterSettingArea}{%
- \kernel@ifstar \l@addto@macro \g@addto@macro \@areaset@end
-}
-% \end{macrocode}
-% \begin{macro}{\@areaset@end}
-% \changes{v3.11}{2012/04/17}{added}
-% Macro \cs{@areaset@end} is a hook to make it possible to add some
-% instructions to the end of the \cs{areaset} command. This will be executed
-% before the activation of the settings inside a document.
-% \begin{macrocode}
-\newcommand*{\@areaset@end}{}
-%</package&typearea&body>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \subsection{Deprecated options}
-%
-% Former versions of \KOMAScript{} had some options that are completely
-% deprecated since \KOMAScript{} 3.00. Most of them but not all are pattern
-% matching options.
-%
-% \begin{option}{DIVcalc,DIVclassic}
-% \changes{v2.4g}{1996/11/04}{added}
-% \changes{v2.95}{2002/12/04}{implemented using option \opt{DIV}}
-% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}}
-% \changes{v3.01a}{2008/11/21}{deprecated}
-% The former form of \opt{DIV=}\opt{calc} and \opt{DIV=}\opt{classic}.
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMA@DeclareDeprecatedOption[typearea]{DIVcalc}{DIV=calc}
-\KOMA@DeclareDeprecatedOption[typearea]{DIVclassic}{DIV=classic}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{option}^^A DIVcalc,DIVclassic
-%
-% \begin{option}{a...paper,b...paper,c...paper,d...paper}
-% Formerly \opt{a}\meta{integer}\opt{paper},
-% \opt{b}\meta{integer}\opt{paper},
-% \opt{c}\meta{integer}\opt{paper},
-% \opt{d}\meta{integer}\opt{paper} has been documented. Since
-% \KOMAScript{} v3.00 most of them are deprecated and has been replaced by
-% option \opt{paper}. Nevertheless, for compatibility these options and the
-% commands needed to recognize and handle them are still implemented.
-%
-%
-% \begin{macro}{\x@paper}
-% \begin{macro}{\x@@paper}
-% \changes{v2.5}{1997/06/17}{pattern matching of paper sizes}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \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.95}{2002/12/03}{upper case letters are also allowed}
-% \changes{v3.23}{2017/02/22}{using \cs{ISO@PaperNameToSize}}
-% Because \cs{isopaper} is used inside the paper size detection by pattern
-% matching to select a specific ISO/DIN paper size, it has to be defined
-% before the pattern matching will be done.
-% \begin{macrocode}
-%<*package&typearea&options>
-\newcommand\isopaper[2][a]{%
-% \end{macrocode}
-% The command has to parameters. The first one is optional and the basic size
-% given by one of the letters:
-% \begin{description}
-% \item[a] -- ISO/DIN A sizes
-% \item[b] -- ISO/DIN B sizes
-% \item[c] -- ISO/DIN C sizes
-% \item[d] -- ISO/DIN D sizes
-% \end{description}
-% The second and mandatory argument is the scale number
-% \begin{macrocode}
- \ISO@PaperNameToSize[typearea]#1#2\@nil
-% \end{macrocode}
-% Select either landscape or portrait:
-% \changes{v2.97e}{2007/10/23}{landscape or portrait}
-% \changes{v3.22}{2016/07/29}{adapting paper orientation}
-% \begin{macrocode}
- \expandafter\ifnum\scr@ta@v@is@ge{3.22}\relax
- \scr@setpaperorientation
- \else
- \if@landscape\scr@switchpapersizes\fi
- \fi
-}
-% \end{macrocode}
-% \pkg*{typearea} uses its own error message.
-% \begin{macro}{\scr@UnknownPaperSize@typearea}
-% \changes{v3.23}{2017/02/22}{new}
-% \begin{macrocode}
-\ProvideUnknownPaperSizeError{typearea}{%
- \PackageError{typearea}{%
- Unknown ISO/DIN-papersize-letter #1%
- }{%
- There are only four defined paper scalings:\MessageBreak
- a = ISO/DIN-A, b = ISO/DIN-B, c = ISO/DIN-C,
- d = ISO/DIN-D\MessageBreak
- Read KOMA-Script-documentation for further information.%
- }%
- \setlength{\paperwidth}{841sp}%
- \setlength{\paperheight}{1189sp}%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@UnknownPaperSize@typearea
-% \end{command}^^A \isopaper
-% \begin{macro}{\scr@setpaperorientation}
-% \changes{v3.22}{2016/07/29}{new}
-% Setup the paper orientation depending on \cs{if@landscape}.
-% \begin{macrocode}
-\newcommand*\scr@setpaperorientation{%
- \ifdim\paperheight>\paperwidth
- \if@landscape\scr@switchpapersizes\fi
- \else
- \if@landscape\else\scr@switchpapersizes\fi
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\scr@switchpapersizes}
-% \changes{v3.22}{2016/07/29}{new}
-% Switches the two lengths \len{paperwidth} and \len{paperheight}.
-% \begin{macrocode}
-\newcommand*\scr@switchpapersizes{%
- \@tempdima\paperwidth\paperwidth\paperheight\paperheight\@tempdima
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@switchlength
-% \end{macro}^^A \scr@setpaperorientation
-% \begin{macro}{\iso@paper}
-% \changes{v2.95}{2002/12/03}{new}
-% 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{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.
-% \begin{macrocode}
-\newcommand*{\iso@paper}[1]{\expandafter\iso@@paper#1\@nil}
-\newcommand*{\iso@@paper}{}
-\def\iso@@paper#1#2\@nil{%
- \@tempswafalse
- \if #1a\@tempswatrue
- \else\if #1A\@tempswatrue
- \else\if #1b\@tempswatrue
- \else\if #1B\@tempswatrue
- \else\if #1c\@tempswatrue
- \else\if #1C\@tempswatrue
- \else\if #1d\@tempswatrue
- \else\if #1D\@tempswatrue
- \fi\fi\fi\fi\fi\fi\fi\fi
- \if@tempswa
- \Ifnumber{#2}{\isopaper[#1]{#2}}{\@tempswafalse}%
- \fi
-}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{macro}^^A \iso@@paper
-% \end{macro}^^A \iso@paper
-%
-% \begin{option}{DIV...}
-% \begin{option}{BCOR...}
-% Formerly \opt{DIV}\meta{integer}, \opt{BCOR}\meta{length},
-% \opt{headlines}\meta{real} has been documented as options. Since
-% \KOMAScript{} 3.00 these have been replaced by \opt{DIV=}\meta{integer},
-% \opt{BCOR=}\meta{length} and
-% \opt{headlines=}\meta{real}. Nevertheless, for compatibility the
-% deprecated options are still handled by \cs{DeclareOption*} and so we
-% need several helper macros to recognize them.
-%
-%
-% \begin{macro}{\@BCOR}
-% \begin{macro}{\@@BCOR}
-% \changes{v2.5}{1997/06/17}{Single letter scanner replaced by pattern matching}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Macro \cs{@BCOR} it needed to handle option \opt{BCOR\emph{BCOR}}. The
-% option is recognized by pattern matching.
-% \begin{macrocode}
-%<*(class|(package&typearea))&options>
-\newcommand*{\@BCOR}{\expandafter\@@BCOR\CurrentOption BCORBCOR\@@BCOR}
-\newcommand*{\@@BCOR}{}
-\def\@@BCOR #1BCOR#2BCOR#3\@@BCOR{%
-% \end{macrocode}
-% If it is option \opt{BCOR} the first argument is empty.
-% \begin{macrocode}
- \Ifstr{#1}{}{%
-% \end{macrocode}
-% Additionally the third argument is |BCOR|.
-% \begin{macrocode}
- \Ifstr{#3}{BCOR}{%
-% \end{macrocode}
-% Now, the second argument should be the size. If this is not the case, an
-% error has to be reported.
-% \changes{v3.22}{2016/07/29}{missing deprecated option warning added}
-% \changes{v3.28}{2019/11/18}{\cs{ifdimen} renamed to \cs{Ifdimen}}
-% \changes{v3.30}{2020/03/24}{avoid error message for unknown \opt{BCOR}
-% value to \cs{documentclass}}
-% \changes{v3.31}{2020/04/27}{improved valid value recognization}
-% \begin{macrocode}
-%<*class>
- \Ifstrstart{#2}{=}{%
- \edef\reserved@a{\noexpand\Ifdimen{\@gobble#2}}%
- \reserved@a{\PassOptionsToPackage{BCOR#2}{typearea}}{\OptionNotUsed}%
- }{%
- \Ifdimen{#2}{\PassOptionsToPackage{BCOR#2}{typearea}}{\OptionNotUsed}%
- }%
-%</class>
-%<*package>
- \Ifdimen{#2}{%
- \KOMA@UseDeprecatedOption{%
- \PackageWarningNoLine{typearea}}{BCOR#2}{BCOR=#2}%
- }{\scr@pti@nerr@r}%
-%</package>
-% \end{macrocode}
-% In all other cases it is not this option. So we report an error. Instead of
-% the error another option could be tested.
-% \begin{macrocode}
- }{\scr@pti@nerr@r}%
- }{\scr@pti@nerr@r}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@DIV}
-% \begin{macro}{\@@DIV}
-% \changes{v2.5}{1997/06/17}{Single letter scanner replaced by pattern matching}
-% \changes{v3.22}{2016/07/29}{missing deprecated option warning added}
-% \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}}
-% \changes{v3.30}{2020/03/24}{avoid error message for unknown \opt{DIV}
-% value to \cs{documentclass}}
-% \changes{v3.31}{2020/04/27}{improved valid value recognization}
-% Here we use more or less the same functionality as with \cs{@BCOR} and \cs{@@BCOR}.
-% \begin{macrocode}
-\newcommand*{\@DIV}{\expandafter\@@DIV\CurrentOption DIVDIV\@@DIV}
-\newcommand*{\@@DIV}{}
-\def\@@DIV #1DIV#2DIV#3\@@DIV{%
- \edef\@tempa{#1}\ifx\@tempa\@empty
- \edef\@tempa{#3}\def\@tempb{DIV}\ifx\@tempa\@tempb
-%<*class>
- \Ifstrstart{#2}{=}{%
- \edef\reserved@a{\noexpand\Ifnumber{\@gobble#2}}%
- \reserved@a{\PassOptionsToPackage{DIV#2}{typearea}}{\OptionNotUsed}%
- }{%
- \Ifnumber{#2}{\PassOptionsToPackage{DIV#2}{typearea}}{\OptionNotUsed}%
- }%
-%</class>
-%<*package>
- \Ifnumber{#2}{%
- \KOMA@UseDeprecatedOption{%
- \PackageWarningNoLine{typearea}}{DIV#2}{DIV=#2}%
- }{\scr@pti@nerr@r}%
-%</package>
- \else\scr@pti@nerr@r\fi
-% \end{macrocode}
-% The only difference is, that we do not report an error but also test for
-% \opt{BCOR}.
-% \begin{macrocode}
- \else\@BCOR\fi
-}
-% \end{macrocode}
-% \end{macro}^^A \@@DIV
-% \end{macro}^^A \@DIV
-%
-% \begin{option}{headlines...}
-% \begin{macro}{\@headlines}
-% \begin{macro}{\@@headlines}
-% \changes{v2.7g}{2001/04/17}{neW pattern matching for the number of headlines}
-% The macros are needed to recognize the deprecated option
-% \opt{headlines\meta{integer}}.
-% \begin{macrocode}
-\newcommand{\@headlines}{%
- \expandafter\@@headlines\CurrentOption headlines\@@headlines%
-}
-\newcommand*{\@@headlines}{}
-\def\@@headlines #1headlines#2\@@headlines{
- \edef\@tempa{#2}\edef\@tempb{headlines}\ifx\@tempa\@tempb
-%<class> \PassOptionsToPackage{#1headlines}{typearea}
-%<package> \setlength{\@tempdima}{#1\baselineskip}%
-%<package> \def\ta@hh{#1\baselineskip}%
- \else\@DIV\fi
-}
-%</(class|(package&typearea))&options>
-% \end{macrocode}
-% \end{macro}^^A \@headlines
-% \end{macro}^^A \@@headlines
-%
-% Starting point for all the deprecated pattern matching options is
-% \cs{DeclareOption*} for command \cs{x@paper} that uses pattern
-% matching with \cs{x@@paper} to recognize the deprecated options. These
-% are needed not only for package \pkg*{typearea} but also for the classes.
-%
-% Back to the pattern matching. This one is the most simple of all.
-% \changes{v2.97e}{2007/10/23}{passing options \pkg*{typearea} using the new syntax}
-% \begin{macrocode}
-%<*(class|(package&typearea))&options>
-\newcommand*{\x@paper}{%
- \expandafter\x@@paper\CurrentOption paper\x@@paper%
-}
-\newcommand*{\x@@paper}{}
-\def\x@@paper #1#2paper#3\x@@paper{%
- \Ifstr{#3}{paper}{%
- \Ifnumber{#2}{%
- \Ifstr{#1}{a}{%
-%<class> \PassOptionsToPackage{#3=#1#2}{typearea}%
-%<package> \isopaper[a]{#2}%
- }{%
- \Ifstr{#1}{b}{%
-%<class> \PassOptionsToPackage{#3=#1#2}{typearea}%
-%<package> \isopaper[b]{#2}%
- }{%
- \Ifstr{#1}{c}{%
-%<class> \PassOptionsToPackage{#3=#1#2}{typearea}%
-%<package> \isopaper[c]{#2}%
- }{%
- \Ifstr{#1}{d}{%
-%<class> \PassOptionsToPackage{#3=#1#2}{typearea}%
-%<package> \isopaper[d]{#2}%
- }{\scr@pti@nerr@r}%
- }%
- }%
- }%
- }{\scr@pti@nerr@r}%
- }{%
-%<class> \@pt@scan
-%<package> \@headlines
- }%
-}
-% \end{macrocode}
-%
-% \begin{macro}{\scr@pti@nerr@r}
-% \changes{v2.95}{2002/06/20}{\cs{OptionNotUsed} instead of \cs{PackageError}}
-% If the addition option is neither \opt{BCOR\dots} nor \opt{DIV\dots} nor
-% \opt{headlines} nor a known paper size, it is still unused.
-% \begin{macrocode}
-\newcommand*{\scr@pti@nerr@r}{
-%<class> \OptionNotUsed
-%<package> \@unknownoptionerror
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \changes{v2.97c}{2007/09/12}{\cs{lco@test} added to before pattern matching
-% of options}
-% \begin{macrocode}
-\DeclareOption*{%
-%<letter> \lco@test
- \x@paper}
-%</(class|(package&typearea))&options>
-% \end{macrocode}
-% \end{option}^^A headline...
-% \end{option}^^A DIV...
-% \end{option}^^A BCOR...
-% \end{macro}^^A \x@paper
-% \end{macro}^^A \x@@paper
-% \end{option}^^A a...paper … d...paper
-%
-%
-% ^^A This part should stay at the end of the source file!
-% \subsection{Configuration file}
-%
-% At the very ending of the option section just before executing and
-% processing the options you can add additional options the
-% \pkg*{typearea}. This is a very seldom used feature and I recommend to
-% not use it any longer. If you need additional options use
-% |\BeforeFamilyProcessOptions[.typearea.sty]{KOMA}{...}|.
-%
-% \changes{v2.0e}{1994/10/28}{configuration file \file{typearea.cfg}}
-% \begin{macrocode}
-%<*package&typearea&options>
-\InputIfFileExists{typearea.cfg}{%
- \typeout{%
- ***************************************^^J%
- * Local config file typearea.cfg used^^J%
- ***************************************%
- }
-}{}
-%</package&typearea&options>
-% \end{macrocode}
-%
-% \subsection{Option execution}
-%
-% The paper size and telling the back-end driver information about the paper
-% size are default. The default for the default paper size will be \opt{A4}
-% if nothing else was defined by a class. Execution of option \opt{twoside}
-% depends already on the setting of \cs{if@twoside} and
-% \cs{if@semitwoside}. This may be surprising but nevertheless is correct.
-% \changes{v2.3h}{1995/01/19}{\cs{relax} after \cs{ProcessOptions} added}
-% \changes{v2.96}{2006/08/18}{processing options in order of usage instead of
-% order of declaration}
-% \changes{v2.97c}{2007/04/19}{Usage of \cs{KOMAExecuteOptions} instead of
-% \cs{KOMAoptions}}
-% \changes{v2.97c}{2007/04/19}{Usage of \cs{KOMAProcessOptions} instead of
-% \cs{ProcessOptions}}
-% \changes{v2.97c}{2007/04/19}{set only options that are not an implicit
-% default}
-% \changes{v2.97c}{2007/07/18}{explicit setting of a valid value to
-% \opt{twoside}}
-% \changes{v3.12}{2013/11/11}{the default paper size is given by
-% \cs{defaultpagesize}}
-% \changes{v3.17}{2015/03/02}{\opt{pagesize} is default}
-% \begin{macro}{\defaultpapersize}
-% \changes{v3.12}{2013/11/11}{added}
-% The default paper size. Defined using \cs{providecommand} so it can be
-% changed by a class or wrapper package or \file{typearea.cfg} or somewhere
-% else before loading \pkg*{typearea}.
-% \begin{macrocode}
-%<*package&typearea&options>
-\providecommand*{\defaultpapersize}{A4}
-%</package&typearea&options>
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-%<*package&typearea&options>
-\KOMAExecuteOptions{paper=\defaultpapersize,pagesize}
-\if@twoside
- \if@semitwoside
- \KOMAExecuteOptions{twoside=semi}
- \else
- \KOMAExecuteOptions{twoside}
- \fi
-\else
- \KOMAExecuteOptions{twoside=false}
-\fi
-\KOMAProcessOptions\relax
-%</package&typearea&options>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-variables.dtx b/macros/latex/contrib/koma-script/source/scrkernel-variables.dtx
deleted file mode 100644
index 15e2be40e7..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-variables.dtx
+++ /dev/null
@@ -1,463 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-variables.dtx
-% Copyright (c) Markus Kohm, 2006-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-variables.dtx 3707 2022-02-15 10:40:57Z kohm $
-%<option>%%% (run: option)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\def\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-15 11:40:57 +0100 (Di, 15. Feb 2022) $
- \def\filerevision$#1: #2 ${\def\filerevision{r#2}}
- \filerevision$Revision: 3707 $
- \xdef\fileinfo{\filedate\space\filerevision\space}
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrkernel-variables.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script source(koma variables)]
- }%
-\reserved@a
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrkernel-variables.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v2.95}{2006/03/20}{new by splitting \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/15}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/15}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-variables.dtx}
-% \title{Using Variables in
-% \href{https://komascript.de}{\KOMAScript} Letter Classes and Package}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% Letters have several variables like the name and address of the sender and
-% the addressee, for fields like customer ids phone numbers, email addresses
-% etc. Depending on the purpose of a letter or a corporate identity much
-% more field and so variables are possible. For all of them
-% \file{scrkernel-variables.dtx} provides a general mechanism and user
-% interface.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user documentation the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of Variables}
-%
-% \begin{macrocode}
-%<*letter>
-% \end{macrocode}
-%
-% \subsection{Options}
-% The mechanism does not depend on options.
-%
-%
-% \subsection{Commands and macros for variables}
-%
-% \begin{command}{\newkomavar*,\newkomavar}
-% \changes{v2.8q}{2002/01/14}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced \cs{kernel@ifstar} by}
-% We have two kinds of fields and so variables:
-% \begin{itemize}
-% \item to be printed in the reference line,
-% \item for other purpose, but not printed in the reference line.
-% \end{itemize}
-% But it is also possible to add variables later to (or
-% even remove them from the reference line. But the star variant
-% \cs{newkomavar*} automatically adds a variable to (the end of) the reference
-% line.
-% \begin{macro}{\@newkomavar}
-% Because of the star variant (and because we currently do not use
-% \pkg{xparse}), we need an internal command.
-% Both \cs{newkomavar} and \cs{newkomavar*} have one optional argument
-% (\texttt{\#1}), the \meta{output name}. It is intended to be printed. In
-% opposite to this the first mandatory argument (\texttt{\#2}) is the
-% \meta{name} of the variable. It is not indented to be printed but used for access
-% only. Only \emph{command sequence} characters are allowed here. It is
-% recommended to use only letters for the \meta{name}. Internally
-% macro \cs{scr@\meta{name}@name} and \cs{scr@\meta{name}@var} are
-% defined. The second one is initialized to be empty.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\newkomavar}{%
- \kernel@ifstar {\@tempswatrue\@newkomavar}{\@tempswafalse\@newkomavar}}
-\newcommand*{\@newkomavar}[2][\relax]{%
- \@ifundefined{scr@#2@name}{%
- \@ifundefined{scr@#2@var}{%
- \begingroup
- \def\@tempa{#1}\def\@tempb{\relax}%
- \ifx\@tempa\@tempb\endgroup\else
- \endgroup\@namedef{scr@#2@name}{#1}%
- \fi%
- \expandafter\let\csname scr@#2@var\endcsname=\@empty
- \if@tempswa\addtoreffields{#2}\fi
- }{%
-%<class> \ClassError{scrlttr2%
-%<package> \PackageError{scrletter%
- }{%
- This should never happen%
- }{%
- The contents of the KOMA-Script variable `#2'\MessageBreak
- is undefined, but the name of the variable is
- defined.\MessageBreak
- This should never happen. So someone crashs me!%
- }%
- }%
- }{%
-%<class> \ClassError{scrlttr2%
-%<package> \PackageError{scrletter%
- }{%
- Variable `#2' already defined%
- }{%
- I'll ignore this command, if you'll continue.%
- }%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\setkomavar*,\setkomavar}
-% \changes{v2.8q}{2002/01/14}{added}
-% \changes{v3.08}{2010/10/28}{\cs{scr@\emph{Name}@postsetname} and
-% \cs{scr@\emph{Name}@postsetvar} added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% After defining a new variable we also need a command to set the
-% \meta{value}. This is the second mandatory argument (\texttt{\#3}) of
-% \cs{setkomavar}. The first mandatory argument (\texttt{\#2}) once again is
-% the \meta{name}. The \meta{output name} can be set with the
-% optional first argument (\texttt{\#1}). But for the case only the
-% \meta{output name} should be changed but not the \meta{value} there is an
-% additional star variant \cs{setkomavar*}. This has only two mandatory argument:
-% \meta{name} (\texttt{\#1}) and \meta{output name} (\texttt{\#2}). Both also
-% executes two hooks \cs{scr@\meta{name}@postsetname} and
-% \cs{scr@\meta{name}@postsetvar} after setting the \meta{output name}
-% resp. the \meta{value}. So package authors can define additional actions for
-% the case a variable changes.
-% \begin{macro}{\@setkomavar}
-% \changes{v2.8q}{2002/01/14}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@setkomavar}
-% \changes{v2.8q}{2002/01/14}{added}
-% \begin{macro}{\@setkomaname}
-% \changes{v2.8q}{2002/01/14}{added}
-% Because of the star variant and the optional argument additional helper
-% macros are needed.
-% \begin{macrocode}
-\newcommand*{\setkomavar}{%
- \kernel@ifstar {\@setkomaname}{\@setkomavar}}
-\newcommand*{\@setkomavar}[1]{%
- \kernel@ifnextchar [%]
- {\@@setkomavar{#1}}{\@@setkomavar{#1}[\relax]}}
-\newcommand*{\@setkomaname}[2]{%
- \@ifundefined{scr@#1@var}{%
- \@komavar@err{set}{#1}%
- }{%
- \@namedef{scr@#1@name}{#2}%
- \csname scr@#1@postsetname\endcsname
- }%
-}
-\newcommand*{\@@setkomavar}{}
-\long\def\@@setkomavar#1[#2]#3{%
- \@ifundefined{scr@#1@var}{%
- \@komavar@err{set}{#1}%
- }{%
- \@namedef{scr@#1@var}{#3}%
- \csname scr@#1@postsetvar\endcsname
- \begingroup
- \def\@tempa{#2}\def\@tempb{\relax}%
- \ifx\@tempa\@tempb\endgroup\else
- \endgroup\@namedef{scr@#1@name}{#2}%
- \csname scr@#1@postsetname\endcsname
- \fi
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \@setkomaname
-% \end{macro}^^A \@@setkomavar
-% \end{macro}^^A \@setkomavar
-% \end{command}^^A \setkomavar*,\setkomavar
-%
-% \begin{macro}{\@komavar@err}
-% \changes{v2.8q}{2002/01/14}{added}
-% Error message for using or setting (\texttt{\#1}) unknown variables
-% (\texttt{\#2}), used by \cs{setkomavar} or \cs{usekomavar}.
-% \begin{macrocode}
-\newcommand*{\@komavar@err}[2]{%
-%<class> \ClassError{scrlttr2%
-%<package> \PackageError{scrletter%
- }{%
- KOMA-Script variable not defined%
- }{%
- You've tried to #1 the not defined KOMA-Script variable
- `#2'.\MessageBreak
- You have to define the variable using \string\newkomavar\space
- before\MessageBreak
- you do this.%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\usekomavar*,\usekomavar}
-% \changes{v2.8q}{2002/01/14}{added}
-% \changes{v2.9i}{2002/09/04}{robust}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% User command to get either the \meta{output name} (star variant) or the
-% \meta{value} (non-star variant) of a variable. Once again the first
-% mandatory argument (\texttt{\#2}) is the \meta{name} of the value. Both also
-% have an optional first argument (\texttt{\#1}) \meta{code}. The \meta{code}
-% is added before the \meta{output name} or \meta{value} in the output
-% stream and these are used as argument. You use it, e.g., to define a command
-% with the content of \meta{output name} or \meta{value} or change the formatting.
-% \begin{macro}{\@usekomavar,\@usekomaname}
-% \changes{v2.8q}{2002/01/14}{added}
-% \changes{v2.9i}{2002/09/04}{optional argument}
-% \changes{v2.9j}{2002/09/18}{\cs{@firstofone} as default for the optional argument}
-% \begin{macrocode}
-\DeclareRobustCommand*{\usekomavar}{%
- \kernel@ifstar {\@usekomaname}{\@usekomavar}}
-\newcommand*{\@usekomavar}[2][\@firstofone]{%
- \@ifundefined{scr@#2@var}{%
- \@komavar@err{use}{#2}%
- }{%
- #1{\@nameuse{scr@#2@var}}%
- }%
-}
-\newcommand*{\@usekomaname}[2][\@firstofone]{%
- \@ifundefined{scr@#2@var}{%
- \@komavar@err{use}{#2}%
- }{%
- #1{\@nameuse{scr@#2@name}}%
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \@usekomavar,\@usekomaname
-% \end{command}
-%
-% \begin{command}{\ifkomavar,\Ifkomavar}
-% \changes{v3.03}{2009/03/04}{added}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavar} renamed to {Ifkomavar}}
-% \cs{Ifkomavar} tests if the variable with the \meta{name} of \texttt{\#1} is
-% defined and execute the \meta{code} of \texttt{\#2} and otherwise the
-% \meta{code} of \texttt{\#3}. The old command \cs{ifkomavar} is deprecated
-% and should not be used any longer. This incompatible change has been done,
-% because of a new recommendation of The \LaTeX{} Team (who does break its own
-% recommendation, e.g., with \cs{ifToplevel}, \cs{ifthenelse} \dots).
-% \begin{macrocode}
-\newcommand*{\ifkomavar}{%
-%<package> \PackageWarning{scrletter}{%
-%<class> \ClassWarning{\KOMAClassName}{%
- Usage of deprecated command `\string\ifkomavar'.\MessageBreak
- The command has been renamed to because of a\MessageBreak
- recommendation of LaTeX3 team members.\MessageBreak
- Please replace `\string\ifkomavar' by `\string\Ifkomavar'%
- }%
- \Ifkomavar
-}
-\DeclareRobustCommand*{\Ifkomavar}[1]{%
- \scr@ifundefinedorrelax{scr@#1@var}{%
- \expandafter\@secondoftwo
- }{%
- \expandafter\@firstoftwo
- }%
-}
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{command}{\ifkomavarempty*,\ifkomavarempty,\Ifkomavarempty*,\Ifkomavarempty}
-% \changes{v2.8q}{2002/01/14}{added}
-% \changes{v2.9i}{2002/09/04}{spurious spaced removed}
-% \changes{v2.9i}{2002/09/04}{robust}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} renamed to \cs{Ifkomavar}}
-% \cs{Ifkomavarempty} tests if the variable with the \meta{name} of
-% \texttt{\#1} is defined and the \meta{value} (non-star variant)
-% resp. \meta{output name} (star variant) is empty. If it is undefined or
-% empty the \meta{code} of \texttt{\#2} is executed. If is defined and not
-% empty the \meta{code} of \texttt{\#3} is executed.
-% The old command \cs{ifkomavarempty} resp. \cs{ifkomavarempty*} is deprecated
-% and should not be used any longer. This incompatible change has been done,
-% because of a new recommendation of The \LaTeX{} Team (who does break its own
-% recommendation, e.g., with \cs{ifToplevel}, \cs{ifthenelse} \dots).
-% \begin{macro}{\if@komavarempty}
-% \changes{v2.8q}{2002/01/14}{added}
-% \changes{v3.03}{2009/03/04}{using \cs{ifkomavar}}
-% \changes{v3.03}{2009/03/04}{don't read the arguments but delegate them}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavar} replaced by \cs{Ifkomavar}}
-% Because of the star variant (and because we are currently not using
-% \pkg{xparse}) we need an internal helper macro.
-% \begin{macrocode}
-\newcommand*{\ifkomavarempty}{%
-%<package> \PackageWarning{scrletter}{%
-%<class> \ClassWarning{\KOMAClassName}{%
- Usage of deprecated command `\string\ifkomavarempty'.\MessageBreak
- The command has been renamed to because of a\MessageBreak
- recommendation of LaTeX3 team members.\MessageBreak
- Please replace `\string\ifkomavarempty' by `\string\Ifkomavarempty'%
- }%
- \Ifkomavarempty
-}
-\DeclareRobustCommand*{\Ifkomavarempty}{%
- \begingroup
- \kernel@ifstar {\@tempswatrue\@ifkomavarempty}%
- {\@tempswafalse\@ifkomavarempty}%
-}
-\newcommand{\@ifkomavarempty}[1]{%
- \Ifkomavar{#1}{%
- \if@tempswa
- \@ifundefined{scr@#1@name}{%
- \aftergroup\@firstoftwo
- }{%
- \expandafter\ifx\csname scr@#1@name\endcsname\@empty
- \aftergroup\@firstoftwo
- \else
- \aftergroup\@secondoftwo
- \fi
- }%
- \else
- \expandafter\ifx\csname scr@#1@var\endcsname\@empty
- \aftergroup\@firstoftwo
- \else
- \aftergroup\@secondoftwo
- \fi
- \fi
- }{%
- \@komavar@err{use}{#1}%
- \aftergroup\@gobbletwo
- }%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}%^^A \@ifkomavarempty
-% \end{command}%^^A \ifkomavarempty* … \Ifkomavarempty
-%
-%
-% \begin{command}{\foreachkomavar}
-% \changes{v3.27}{2019/03/13}{added}
-% Executes \texttt{\#2} for each variable in the comma separated list
-% \texttt{\#1}. An argument is appended to \texttt{\#2} which is the current
-% variable to be processed. This command is short. So if you want so execute
-% long code you should define a command for it. Sideeffect: \cs{reserved@a} is
-% changed.
-% \begin{macrocode}
-\newcommand*{\foreachkomavar}[2]{%
- \@for \reserved@a:=#1\do{%
- \scr@trim@spaces\reserved@a
- \ifx\reserved@a\@empty\else
- \edef\reserved@a{\unexpanded{#2}{\reserved@a}}\expandafter\reserved@a
- \fi
- }%
-}
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{command}{\foreachkomavarifempty}
-% \changes{v3.27}{2019/03/13}{added}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by \cs{Ifkomavarempty}}
-% Same like \cs{foreachkomavar} but \texttt{\#2} is called only for empty
-% variables and \texttt{\#3} is called for non empty.
-% \begin{macrocode}
-\newcommand*{\foreachkomavarifempty}[3]{%
- \@for \reserved@a:=#1\do{%
- \scr@trim@spaces\reserved@a
- \ifx\reserved@a\@empty\else
- \edef\reserved@a{%
- \noexpand\Ifkomavarempty{\reserved@a}%
- {\unexpanded{#2}{\reserved@a}}%
- {\unexpanded{#3}{\reserved@a}}%
- }\expandafter\reserved@a
- \fi
- }%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\foreachemptykomavar}
-% \changes{v3.27}{2019/03/13}{added}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by \cs{Ifkomavarempty}}
-% Similar to \cs{foreachemptykomavar} with \texttt{\#3}=\cs{@gobble}.
-% \begin{macrocode}
-\newcommand*{\foreachemptykomavar}[2]{%
- \@for \reserved@a:=#1\do{%
- \scr@trim@spaces\reserved@a
- \ifx\reserved@a\@empty\else
- \edef\reserved@a{%
- \noexpand\Ifkomavarempty{\reserved@a}{\unexpanded{#2}{\reserved@a}}{}%
- }\expandafter\reserved@a
- \fi
- }%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\foreachnonemptykomavar}
-% \changes{v3.27}{2019/03/13}{added}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by \cs{Ifkomavarempty}}
-% Similar to \cs{foreachemptykomavar} with \texttt{\#2}=\cs{@gobble}.
-% \begin{macrocode}
-\newcommand*{\foreachnonemptykomavar}[2]{%
- \@for \reserved@a:=#1\do{%
- \scr@trim@spaces\reserved@a
- \ifx\reserved@a\@empty\else
- \edef\reserved@a{%
- \noexpand\Ifkomavarempty{\reserved@a}{}{\unexpanded{#2}{\reserved@a}}%
- }\expandafter\reserved@a
- \fi
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{macrocode}
-%</letter>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-version.dtx b/macros/latex/contrib/koma-script/source/scrkernel-version.dtx
deleted file mode 100644
index bb6e1ca9dd..0000000000
--- a/macros/latex/contrib/koma-script/source/scrkernel-version.dtx
+++ /dev/null
@@ -1,235 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrkernel-version.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrkernel-version.dtx 3774 2022-04-28 07:46:52Z 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
-% in this file and most of the other KOMA-Script dtx-files.
-%
-% \fi^^A meta-comment
-%
-% \changes{v2.0e}{1994/07/07}{first release of \cls*{scrartcl},
-% \cls*{scrreprt}, and \cls*{scrbook}}
-% \changes{v2.95}{2002/06/25}{first version of this file by splitting of
-% \file{scrclass.dtx}}
-% \changes{v3.36}{2022/02/11}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/11}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrkernel-version.dtx}
-% \title{The Version of the \href{https://komascript.de}{\KOMAScript} Kernel
-% and therefore the Classes and most of the Packages}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Version \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% \filename{} is not only used for the code of all \KOMAScript{} classes and
-% most of the \KOMAScript{} packages. It is also used by most of the
-% installation drivers (\file{ins}-files) for the definition of
-% \KOMAScript{} version.
-% \end{abstract}
-% \tableofcontents
-%
-%
-% \section{User Manual}
-%
-% You can find the user documentation of the commands implemented here in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of the \KOMAScript{} Kernel Version Information}
-%
-% \begin{command}{\KOMAScriptVersion}
-% \changes{v2.95}{2002/06/25}{added}
-% This is the \KOMAScript{} version the file is related to. It is also added
-% to the classes and most of the packages by the installation drivers. This is
-% done using \file{scrdocstrip.tex} and additionally loading this file.
-% \begin{macro}{\@CheckKOMAScriptVersion}
-% \changes{v2.95}{2002/06/25}{added}
-% Depending on \cs{KOMAScriptVersion} already defined or not, the existing
-% definition is compared with the version here or \cs{KOMAScriptVersion} is
-% newly and globally defined. This has to work not only in class or package
-% files, but also in document files. So \cs{makeatletter} inside a group is
-% needed for the internal macros. Additionally a guard \texttt{ignorethis} is
-% used, to avoid adding code, that is needed only for the installation driver,
-% also to classes or packages.
-% \begin{macrocode}
-\begingroup
- \catcode`\@11\relax
-%<*ignorethis>
- \ifx\newcommand\undefined
- \gdef\@CheckKOMAScriptVersion#1{%
- \global\KOMAdefVariable{KOMAScriptVersion}{\space\space#1}%
- \aftergroup\endinput
- }%
- \else
-%</ignorethis>
- \ifx\KOMAScriptVersion\undefined
- \newcommand*{\@CheckKOMAScriptVersion}[1]{%
- \gdef\KOMAScriptVersion{#1}%
- }%
- \else
- \newcommand*{\@CheckKOMAScriptVersion}[1]{%
- \def\@tempa{#1}%
- \ifx\KOMAScriptVersion\@tempa\else
- \@latex@warning@no@line{%
- \noexpand\KOMAScriptVersion\space is
- `\KOMAScriptVersion',\MessageBreak
- but `#1' was expected!\MessageBreak
- You should not use classes, packages or files
- from\MessageBreak
- different KOMA-Script versions%
- }%
- \fi
- }
-%<*ignorethis>
- \fi
-%</ignorethis>
- \fi
-% \end{macrocode}
-% Note: Following line will be patched by \file{makebetaorrelase.sh} and
-% therefore the syntax or general structure of the line must not be changed!
-% \begin{macrocode}
- \@CheckKOMAScriptVersion{2022/05/01 v3.36 KOMA-Script}%
-\endgroup
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \iffalse
-%<*dtx>
-\ProvidesFile{scrkernel-version.dtx}[\KOMAScriptVersion (versions)]
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\begin{document}
- \DocInput{scrkernel-version.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \subsection{Implementation of class and package names and file names}
-%
-% \begin{description}
-% \item[ToDo] Maybe, this should be split in one file for each class. The file
-% extension code should be moved to \file{scrkernel-miscellaneous.dtx}.
-% \end{description}
-%
-% \begin{macro}{\scr@pkgextension}
-% \changes{v3.17}{2015/03/17}{added}
-% \begin{macro}{\scr@clsextension}
-% \changes{v3.17}{2015/03/17}{added}
-% \changes{v3.18}{2015/06/17}{fixed}
-% Last but not least same like \cs{@pkgextension} and \cs{@clsextension} but
-% still valid after the preamble.
-% \begin{macrocode}
-%<*class|package>
-%<package>\providecommand*{\scr@pkgextension}{\@pkgextension}
-%<class>\providecommand*{\scr@clsextension}{\@clsextension}
-\AtBeginDocument{%
-%<package> \let\scr@pkgextension\@pkgextension
-%<class> \let\scr@clsextension\@clsextension
-}
-%</class|package>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{command}{\KOMAClassFileName}
-% \changes{v3.17}{2014/03/12}{added}
-% \begin{command}{\KOMAClassName}
-% \changes{v2.95}{2004/11/04}{added}
-% \begin{command}{\KOMALongClassFileName,\KOMALongClassName}
-% \changes{v3.27}{2019/02/16}{added}
-% \begin{command}{\ClassName}
-% \changes{v2.95}{2004/11/04}{added}
-% We define the name of each \KOMAScript{} class and the name of the
-% \emph{class} of the class (usually name of the corresponding standard class)
-% once. This allows to use code, that outputs the name of the class, for
-% several classes without using always class specific code.
-% \begin{macrocode}
-%<*class>
-\newcommand*{\KOMAClassName}{%
-%<article|(letter&long)> scrartcl%
-%<report> scrreprt%
-%<book> scrbook%
-%<letter&!long> scrlttr2%
-}
-%<*!long>
-\newcommand*{\KOMAClassFileName}{\KOMAClassName.\@clsextension}
-\edef\KOMAClassFileName{\KOMAClassFileName}
-%</!long>
-\newcommand*{\ClassName}{%
-%<article|(letter&long)> article%
-%<report> report%
-%<book> book%
-%<letter&!long> letter%
-}
-%<*long>
-\newcommand*{\KOMALongClassName}{}
-%<!letter>\edef\KOMALongClassName{scr\ClassName}
-%<letter>\def\KOMALongClassName{scrletter}
-\newcommand*{\KOMALongClassFileName}{\KOMALongClassName.\@clsextension}
-\edef\KOMALongClassFileName{\KOMALongClassFileName}
-%</long>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-% \end{command}
-% \end{command}
-% \begin{macrocode}
-%<!long>\ProvidesClass{\KOMAClassName}[%
-%<long>\ProvidesClass{\KOMALongClassName}[%
-%!KOMAScriptVersion
- document class (\ClassName)%
-]
-%<*long>
-\let\ClassName\relax
-%<letter>\providecommand*{\@ptsize}{12}
-\expandafter\let\expandafter\KOMAClassName\expandafter\relax
-\expandafter\LoadClassWithOptions\expandafter{\KOMAClassName}
-%<letter>\RequirePackage{scrletter}
-%</long>
-%</class>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*package&letter>
-\ProvidesPackage{scrletter}[%
-%!KOMAScriptVersion
- letter package extending any KOMA-Script class%
-]
-%</package&letter>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrlayer-notecolumn.dtx b/macros/latex/contrib/koma-script/source/scrlayer-notecolumn.dtx
deleted file mode 100644
index ec55e285ee..0000000000
--- a/macros/latex/contrib/koma-script/source/scrlayer-notecolumn.dtx
+++ /dev/null
@@ -1,1703 +0,0 @@
-% \iffalse^^A meta-comment
-% ======================================================================
-% scrlayer-notecolumn.dtx
-% Copyright (c) Markus Kohm, 2013-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ----------------------------------------------------------------------
-% ======================================================================
-%%% From File: $Id: scrlayer-notecolumn.dtx 3694 2022-02-10 13:53:33Z kohm $
-%<identify>%%% (run: identify)
-%<init>%%% (run: init)
-%<options>%%% (run: options)
-%<body>%%% (run: body)
-%<final>%%% (run: final)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-10 14:53:33 +0100 (Do, 10. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{v0.3.#2}}
- \filerevision$Revision: 3694 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrlayer-notecolumn.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script package source
- }%
-\reserved@a
-%</dtx>
-%<*identify|doc>
-%<interface>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-%<interface>\ProvidesPackage{scrlayer-notecolumn}[%
-%<doc>\ProvidesFile{scrlayer-notecolumn.tex}[%
-% Sometimes following will be replaced by !KOMASCRIPTVERSION:
-%!SCRLAYERVERSION
-%<interface> package
-%</identify|doc>
-%<*dtx|identify|doc>
- (end user interface for scrlayer)]
-%</dtx|identify|doc>
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2013}
- \KOMAdefVariable{SCRLAYERVERSION}{%
- \space\space\filedate\space\filerevision\space KOMA-Script
- }%
- \expandafter\let\csname ifbetawas\expandafter\endcsname
- \csname ifbeta\endcsname
- \expandafter\let\csname ifbeta\expandafter\endcsname
- \csname iftrue\endcsname
- \generate{\usepreamble\defaultpreamble
- \file{scrlayer-notecolumn.sty}{%
- \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,identify}%
- \from{scrlayer.dtx}{interface,notecolumn,init}%
- \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,init}%
- \from{scrlayer.dtx}{interface,notecolumn,options}%
- \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,options}%
- \from{scrlayer.dtx}{interface,notecolumn,body}%
- \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,body}%
- \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,final}%
- \from{scrlogo.dtx}{logo}%
- }%
- }
- \expandafter\let\csname ifbeta\expandafter\endcsname
- \csname ifbetawas\endcsname
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{hvlogos}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
- \DocInput{scrlayer-notecolumn.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v0.0}{2013/04/26}{start of interface}
-% \changes{v0.3.3532}{2020/09/11}{do not use deprecated interface commands}
-% \changes{v3.36}{2022/02/10}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/10}{require package \pkg*{scrlogo} instead of
-% defining \cs{KOMAScript}}
-%
-% \GetFileInfo{scrlayer-notecolumn.dtx}
-% \title{Providing Note Columns Similar to \cs{marginpar} with
-% \href{https://komascript.de}{\KOMAScript} Package
-% \pkg*{scrlayer-notecolumn} as Proof of Concept about Layers with
-% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrlayer}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Version \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% This package is only a proof of concept. The main sense of the package is,
-% to show the power of layers with \pkg{scrlayer}. It was never intended to
-% be used as a productivity package. So there is no support for using
-% it. Several features are only rudimentary. Several can be improved. Please
-% feel free to fork this package.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user manuals of \pkg*{scrlayer-notecolumn} in the \KOMAScript{}
-% manual, either the German \file{scrguide} or the English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of \pkg*{scrlayer-notecolumn}}
-%
-% \begin{macrocode}
-%<*interface>
-% \end{macrocode}
-%
-%
-% \subsection{Initialising some values before the options}
-%
-% Initialization before all options (even the options from
-% \file{scrlayer.dtx}).
-%
-% Here we test the used pdf\TeX{} primitives.
-% \changes{v0.1}{2015/10/07}{ready for renaming \cs{pdfsavepos} and
-% \cs{pdflastypos} in luaTeX}
-% \changes{v0.1.2483}{2016/06/28}{grouping fixed}
-% \begin{macrocode}
-%<*init>
-\@tempswatrue
-\scr@ifundefinedorrelax{pdfsavepos}{%
- \scr@ifundefinedorrelax{savepos}{%
- \expandafter\@tempswafalse
- }{%
- \let\scr@savepos\savepos
- }%
-}{%
- \let\scr@savepos\pdfsavepos
-}
-\scr@ifundefinedorrelax{pdflastypos}{%
- \scr@ifundefinedorrelax{lastypos}{%
- \expandafter\@tempswafalse
- }{%
- \let\scr@lastypos\lastypos
- }%
-}{%
- \let\scr@lastypos\pdflastypos
-}%
-\if@tempswa\else
- \PackageError{scrlayer-notecolumn}{missing pdfTeX/luaTeX features}{%
- This package needs \string\pdfsavepos\space or \string\savepos\space
- and\MessageBreak
- \string\pdflastypos\space or \string\lastypos.\MessageBreak
- This error is fatal, because usage of the package without these
- features\MessageBreak
- cannot work!\MessageBreak
- You shouldn't continue, but if you'd try, I'll try to abort the LaTeX run
- }%
- \batchmode\csname @@end\endcsname\end
-\fi
-%</init>
-% \end{macrocode}
-%
-%
-% \subsection{Making a note column}
-%
-% The package supports a various number of note columns. Each is referenced by
-% a unique name.
-%
-% \begin{command}{\DeclareNoteColumn}
-% \begin{description}
-% \item[\oarg{option list}:] a comma-separated list of
-% \texttt{\meta{key}=\meta{value}} pairs.
-% \item[\marg{string}:] the name of the note column (must be fully expandable
-% and expand to a string only).
-% \end{description}
-% That's the primary command for note columns. It defines everything, the note
-% column needs.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\DeclareNoteColumn}[2][]{%
-% \end{macrocode}
-% First of all we need a box register. The contents of the note column will be
-% build inside of this register. Since \eTeX{} registers shouldn't be a
-% problem. User should use package \pkg{etex}, if he or she runs out of
-% registers. Note, that the registers will stay allocated, if the interface
-% will be removed! Nevertheless, the name will be destroyed!
-% \begin{macrocode}
- \@ifundefined{slnc@#2@box}{%
- \expandafter\newsavebox\csname slnc@#2@box\endcsname
- }{}%
-% \end{macrocode}
-% There's also a kind of item stack of unprocessed notes for each note column.
-% \begin{macrocode}
- \@ifundefined{slnc@#2@unprocessed}{%
- \@namedef{slnc@#2@unprocessed}{}%
- }{}%
-% \end{macrocode}
-% Next we need a horizontal positions and a width for the note column. Neither
-% the horizontal position nor the width are stretchable or shrinkable. The
-% position should be variable depending on the page. So it's better to use a
-% macro instead of a length. The width isn't more variable than, e.g., the
-% text width. So we can use a macro too. Both will be initialised to the
-% normal marginal note column later.
-% \changes{3.27}{2019/02/14}{initialization of one color stack per note column}
-% For color support we also need one color stack per note column. A color
-% stack is a feature only available for pdf\TeX{} and lua\TeX{}.
-% \begin{macrocode}
- \@ifundefined{slnc@#2@colorstack}{%
- \scr@ifundefinedorrelax{pdfcolorstackinit}{%
- \scr@ifundefinedorrelax{pdffeedback}{}{%
- \expandafter\chardef\csname slnc@#2@colorstack\endcsname=
- \pdffeedback colorstackinit direct {\slnc@initial@black}%
- }%
- }{%
- \expandafter\chardef\csname slnc@#2@colorstack\endcsname=
- \pdfcolorstackinit direct {\slnc@initial@black}%
- }%
- }{}%
-% \end{macrocode}
-% If there isn't a font element for the (new) note column, we define a new one
-% and add it to the auto-remove code:
-% \begin{macrocode}
- \@ifundefined{scr@fnt@notecolumn.#2}{%
- \@ifundefined{@notecolumn.#2font}{}{%
- \PackageInfo{scrlayer-notecolumn}{using already defined
- macro\MessageBreak
- `\expandafter\string\csname @notecolumn.#2font\endcsname' for font
- element\MessageBreak
- `notecolumn.#2'%
- }%
- }%
- \newkomafont{notecolumn.#2}{}%
- }{%
- \PackageInfo{scrlayer-notecolumn}{using already defined font
- element\MessageBreak
- `notecolumn.#2'%
- }%
- }%
-% \end{macrocode}
-% After the initialisation we process the options, that may change the initial
-% values.
-% \begin{macrocode}
- \newcommand*{\slnc@name}{}%
- \edef\slnc@name{#2}%
- \FamilyExecuteOptions[.definenotecolumn]{KOMAarg}{marginpar,#1}%
- \let\slnc@name\relax
-% \end{macrocode}
-% The values are set up, so they may be used to declare a layer.
-% \begin{macrocode}
- \DeclareLayer[%
- foreground,%
- align=tl,%
- voffset=1in+\topmargin+\headheight+\headsep,%
- height=\dimexpr\textheight+\topskip\relax,%
- hoffset=\csname slnc@#2@pos\endcsname,%
- width=\csname slnc@#2@width\endcsname,%
- contents=\slnc@processnotes{#2}%
- ]{notecolumn.#2}
-% \end{macrocode}
-% We need to add the layer to every page style. The easiest way to do this is
-% to add it to the pseudo layer page style \pstyle{@everystyle@}.
-% \changes{v0.1.1681}{2014/02/05}{add the layer only once}
-% \begin{macrocode}
- \IfLayerAtPageStyle{@everystyle@}{notecolumn.#2}{}{%
- \AddLayersToPageStyle{@everystyle@}{notecolumn.#2}%
- }%
-% \end{macrocode}
-% Last but not least, we add the new note column to the note column procession
-% list.
-% \begin{macrocode}
- \@cons\slnc@processnotecolumns{{#2}}%
-}
-% \end{macrocode}
-% \begin{macro}{\slnc@initial@black}
-% \changes{v0.2.3085}{2019/02/14}{added}
-% The initial black is the color used to initialize the color stacks. As long
-% as only pdf\TeX{} and lua\TeX{} provide color stacks, we can initialize it
-% with \texttt{0 g 0 G}. However it may be better to use the initial
-% \cs{current@color} of the used color package. Using \cs{default@color} would
-% be even better, but this is not available until \cs{begin\{document\}}.
-% \begin{macrocode}
-\newcommand*{\slnc@initial@black}{0 g 0 G}%
-\AfterPackage*{color}{%
- \let\slnc@initial@black\current@color
- \AtBeginDocument{\let\slnc@initial@black\default@color}%
-}%
-\AfterPackage*{xcolor}{%
- \let\slnc@initial@black\current@color
- \AtBeginDocument{\let\slnc@initial@black\default@color}%
-}%
-% \end{macrocode}
-% \end{macro}^^A \slnc@initial@black
-% \begin{macro}{\slnc@processnotecolumns}
-% This is a list of all declared note columns in \LaTeX{} syntax (using
-% \cs{@cons} and \cs{@elt} etc.).
-% \begin{macrocode}
-\newcommand*{\slnc@processnotecolumns}{}%
-% \end{macrocode}
-% \end{macro}^^A \slnc@processnotecolumns
-% \begin{macrocode}
-%</body>
-% \end{macrocode}
-% One note column will be declared by default:
-% \begin{macrocode}
-%<*final>
-\DeclareNoteColumn{marginpar}
-%</final>
-%<*body>
-% \end{macrocode}
-% \begin{macro}{\slnc@testforpagestylewarning}
-% Not all page styles are layer page styles, but only layer page styles can be
-% extended by the note column layers. So we warn, if another page style has
-% been selected.
-% \begin{macrocode}
-\newcommand*{\slnc@testforpagestylewarning}{%
- \IfLayerPageStyleExists{\currentpagestyle}{}{%
- \PackageWarning{scrlayer-notecolumn}{%
- output of note columns delayed,\MessageBreak
- because with `\currentpagestyle'\MessageBreak
- a page style has been selected, that\MessageBreak
- isn't a layer page style,%
- }%
- }%
-}%
-\AfterSelectAnyPageStyle{\slnc@testforpagestylewarning}
-% \end{macrocode}
-% \end{macro}^^A \slnc@testforpagestylewarning
-% \begin{option}{position,width,font,marginpar,normalmarginpar,reversemarginpar}
-% Last but not least we have to define the options for the \meta{option
-% list}.
-% \begin{macrocode}
-\DefineFamilyMember[.definenotecolumn]{KOMAarg}
-\DefineFamilyKey[.definenotecolumn]{KOMAarg}{position}{%
- \@namedef{slnc@\slnc@name @pos}{\dimexpr #1\relax}%
- \FamilyKeyStateProcessed
-}
-\DefineFamilyKey[.definenotecolumn]{KOMAarg}{width}{%
- \@namedef{slnc@\slnc@name @width}{\dimexpr #1\relax}%
- \FamilyKeyStateProcessed
-}
-\DefineFamilyKey[.definenotecolumn]{KOMAarg}{font}{%
- \setkomafont{notecolumn.\slnc@name}{#1}%
- \FamilyKeyStateProcessed
-}
-\DefineFamilyKey[.definenotecolumn]{KOMAarg}{marginpar}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{marginpar}{#1}%
- \edef\reserved@a{\noexpand\slnc@defpos{\slnc@name}}\reserved@a
- \@namedef{slnc@\slnc@name @width}{\marginparwidth}%
-}
-% \end{macrocode}
-% \begin{macro}{\slnc@defpos}
-% Little helper for option \opt{marginpar}. The argument is the expanded
-% name of the note column.
-% \begin{macrocode}
-\newcommand*\slnc@defpos[1]{%
- \@namedef{slnc@#1@pos}{%
- \ifodd\value{page}
- \if@reversemargin
-% \end{macrocode}
-% The reverse marginal note column on odd pages is at the left margin.
-% \begin{macrocode}
- \dimexpr \oddsidemargin+1in
- -\marginparsep-\csname slnc@#1@width\endcsname\relax
- \else
-% \end{macrocode}
-% The normal marginal note column on odd pages is the right margin.
-% \begin{macrocode}
- \dimexpr \oddsidemargin+1in
- +\textwidth+\marginparsep\relax
- \fi
- \else
- \if@twoside
- \if@reversemargin
-% \end{macrocode}
-% The reverse marginal note column on even pages is the right margin.
-% \begin{macrocode}
- \dimexpr \evensidemargin+1in
- +\textwidth+\marginparsep\relax
- \else
-% \end{macrocode}
-% The normal marginal note column on even pages is at the left margin.
-% \begin{macrocode}
- \dimexpr \evensidemargin+1in
- -\marginparsep-\csname slnc@#1@width\endcsname\relax
- \fi
- \else
-% \end{macrocode}
-% \begin{macrocode}
-% If not in two-side mode, do the same already done for odd pages.
- \if@reversemargin
- \dimexpr \oddsidemargin+1in
- -\marginparsep-\csname slnc@#1@width\endcsname\relax
- \else
- \dimexpr \oddsidemargin+1in
- +\textwidth+\marginparsep\relax
- \fi
- \fi
- \fi
- }%
-}%
-% \end{macrocode}
-% \end{macro}^^A \slnc@defpos
-% \begin{macrocode}
-\DefineFamilyKey[.definenotecolumn]{KOMAarg}{normalmarginpar}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{normalmarginpar}{#1}%
- \edef\reserved@a{\noexpand\slnc@defnormalpos{\slnc@name}}\reserved@a
- \@namedef{slnc@\slnc@name @width}{\marginparwidth}%
-}
-% \end{macrocode}
-% \begin{macro}{\slnc@defnormalpos}
-% Little helper for option \opt{normalmarginpar}. The argument is the
-% expanded name of the note column.
-% \begin{macrocode}
-\newcommand*\slnc@defnormalpos[1]{%
- \@namedef{slnc@#1@pos}{%
- \ifodd\value{page}
-% \end{macrocode}
-% The normal marginal note column on odd pages is the right margin.
-% \begin{macrocode}
- \dimexpr \oddsidemargin+1in
- +\textwidth+\marginparsep\relax
- \else
- \if@twoside
-% \end{macrocode}
-% The normal marginal note column on even pages is at the left margin.
-% \begin{macrocode}
- \dimexpr \evensidemargin+1in
- -\marginparsep-\csname slnc@#1@width\endcsname\relax
- \else
-% \end{macrocode}
-% \begin{macrocode}
-% If not in two-side mode, do the same already done for odd pages.
- \dimexpr \oddsidemargin+1in
- +\textwidth+\marginparsep\relax
- \fi
- \fi
- }%
-}%
-% \end{macrocode}
-% \end{macro}^^A \slnc@defnormalpos
-% \begin{macrocode}
-\DefineFamilyKey[.definenotecolumn]{KOMAarg}{reversemarginpar}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{reversemarginpar}{#1}%
- \edef\reserved@a{\noexpand\slnc@defreversepos{\slnc@name}}\reserved@a
- \@namedef{slnc@\slnc@name @width}{\marginparwidth}%
-}
-% \end{macrocode}
-% \begin{macro}{\slnc@defreversepos}
-% Little helper for option \opt{reversemarginpar}. The argument is the
-% expanded name of the note column.
-% \begin{macrocode}
-\newcommand*\slnc@defreversepos[1]{%
- \@namedef{slnc@#1@pos}{%
- \ifodd\value{page}
-% \end{macrocode}
-% The reverse marginal note column on odd pages is at the left margin.
-% \begin{macrocode}
- \dimexpr \oddsidemargin+1in
- -\marginparsep-\csname slnc@#1@width\endcsname\relax
- \else
- \if@twoside
-% \end{macrocode}
-% The reverse marginal note column on even pages is the right margin.
-% \begin{macrocode}
- \dimexpr \evensidemargin+1in
- +\textwidth+\marginparsep\relax
- \else
-% \end{macrocode}
-% \begin{macrocode}
-% If not in two-side mode, do the same already done for odd pages.
- \dimexpr \oddsidemargin+1in
- -\marginparsep-\csname slnc@#1@width\endcsname\relax
- \fi
- \fi
- }%
-}%
-% \end{macrocode}
-% \end{macro}^^A \slnc@defreversepos
-% \begin{macrocode}
-%</body>
-% \end{macrocode}
-% \end{option}^^A position … reversemarginpar
-% \end{command}^^A \DeclareNoteColumn
-%
-% \begin{command}{\DeclareNewNoteColumn,\ProvideNoteColumn,\RedeclareNoteColumn}
-% Like \cs{DeclareNoteColumn} but with restrictions, if the note column has
-% (not) been declared already.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\DeclareNewNoteColumn}[2][]{%
- \scr@ifundefinedorrelax{slnc@#2@box}{}{%
- \PackageError{scrlayer-notecolumn}{note column `#2' already defined}{%
- You may declare only note columns, that haven't been declared
- previously using\MessageBreak
- \string\DeclareNewNoteColumn. See also the alternatives
- \string\RedeclareNoteColumn,\MessageBreak
- \string\ProvideNoteColumn, and \string\DeclareNoteColumn.\MessageBreak
- Nevertheless, if you'll continue, declaration will be done.%
- }%
- }%
- \DeclareNoteColumn[{#1}]{#2}%
-}%
-\newcommand*{\ProvideNoteColumn}[2][]{%
- \scr@ifundefinedorrelax{slnc@#2@box}{}{%
- \PackageInfo{scrlayer-notecolumn}{\string\ProvideNoteColumn{#2}
- ignored,\MessageBreak
- because of already defined\MessageBreak
- not column}%
- }{%
- \DeclareNoteColumn[{#1}]{#2}%
- }%
-}%
-\newcommand*{\RedeclareNoteColumn}[2][]{%
- \scr@ifundefinedorrelax{slnc@#2@box}{%
- \PackageError{scrlayer-notecolumn}{note column `#2' undefined}{%
- You may declare only note columns, that have been declared
- previously using\MessageBreak
- \string\RedeclareNoteColumn. See also the alternatives
- \string\DeclareNewNoteColumn,\MessageBreak
- \string\ProvideNoteColumn, and \string\DeclareNoteColumn.\MessageBreak
- Nevertheless, if you'll continue, declaration will be done.%
- }%
- }{}%
- \DeclareNoteColumn[{#1}]{#2}%
-}%
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{Setting a note column}
-%
-% We already have commands to declare note columns. But we also need a command
-% to put contents into the note columns and to output the note columns.
-%
-% \begin{macro}{\tf@slnc}
-% \changes{v0.1.2395}{2016/03/25}{write to \file{aux}-file with
-% \cs{if@filesw}}
-% \begin{macro}{\slnc@initwrite,\slnc@openwrite}
-% \changes{v0.1.2928}{2018/02/02}{use \cs{closein} instead of \cs{closeout}
-% to close \cs{slnc@file}}
-% First of all we need a file to write the notes to. We use the
-% \file{aux}-file to write into the file, because we need to read the file
-% while the document will be typeset and the same time we need to write into
-% the file. Note, that the file will be still reserved on auto-removing the
-% interface!
-% \begin{macrocode}
-%<*body>
-\newwrite\tf@slnc
-\AtBeginDocument{%
- \if@filesw
- \immediate\write\@auxout{%
- \noexpand\csname slnc@initwrite\noexpand\endcsname
- }%
- \fi
-}%
-\AtEndDocument{\let\slnc@initwrite\slnc@openwrite}%
-\newcommand*{\slnc@initwrite}{}%
-\newcommand*{\slnc@openwrite}{%
- \immediate\closein\slnc@file
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{%
- Opening `\jobname.slnc'\MessageBreak
- for writing}%
-%</trace>
- \immediate\openout\tf@slnc\jobname.slnc
-}
-% \end{macrocode}
-% After reading the main \file{aux}-file at |\end{document}|, we again
-% calculate the md5 checksum of the \file{slnc}-file. If it has been changed
-% we set |\if@tempswa| to |\iftrue| to provocate a rerun message.
-% \changes{v0.1.2872}{2018/01/17}{usage of Lua function \texttt{slncmdfivesum}}
-% \changes{v0.1.2972}{2018/04/01}{usage of not yet documented Xe\TeX{}
-% primitive \cs{mdfivesum}}
-% \begin{macrocode}
-\AfterReadingMainAux{%
- \immediate\closeout\tf@slnc
- \begingroup
- \scr@ifundefinedorrelax{pdfmdfivesum}{%
- \scr@ifundefinedorrelax{mdfivesum}{%
- \ifdefined\directlua
- \edef\reserved@a{\directlua{slnc.mdfivesum(slnc.slncfile)}}%
- \else
- \let\reserved@a\relax
- \fi
- }{%
- \edef\reserved@a{\mdfivesum file {\jobname.slnc}}%
- }%
- }{%
- \edef\reserved@a{\pdfmdfivesum file {\jobname.slnc}}%
- }%
- \ifx\reserved@a\relax
- \PackageWarningNoLine{scrlayer-notecolumn}{%
- \string\pdfmdfivesum\space unavailable.\MessageBreak
- The package needs \string\pdfmdfivesum,\MessageBreak
- \string\mdfivesum, or LuaTeX to test whether\MessageBreak
- or not one more LaTeX run is needed to place the\MessageBreak
- note columns correctly. If these are unavailable\MessageBreak
- you have to do the decision without the help\MessageBreak
- of the package%
- }%
- \else
- \ifx \slnc@mdfivesum\reserved@a
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{%
- MD5 of current `\jobname.slnc':\MessageBreak
- \reserved@a}%
-%</trace>
- \else
-%<*trace>
- \PackageWarningNoLine{scrlayer-notecolumn}{%
- MD5 of slnc-file changed.\MessageBreak
- Last: \slnc@mdfivesum\MessageBreak
- New: \space \reserved@a\MessageBreak
- At least one more LaTeX rerun needed to\MessageBreak
- make note columns right%
- }%
-%</trace>
- \aftergroup\@tempswatrue
- \fi
- \fi
- \endgroup
-}
-%</body>
-% \end{macrocode}
-% \changes{v0.3.3600}{2021/05/30}{use of \pkg*{scrwfile}'s never list}%
-% The easiest way to make it compatible with \pkg*{scrwfile} is to put it
-% on the \emph{never} list.
-% \begin{macrocode}
-%<*body>
-\AfterPackage*{scrwfile}{%
- \@ifundefined{scrwfile@never}{\def}{\g@addto@macro}%
- \scrwfile@never{slnc}%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \slnc@initwrite,\slnc@openwrite
-% \end{macro}^^A \tf@slnc
-%
-% \begin{command}{\makenote}
-% \begin{description}
-% \item[\oarg{string}:] the name of the note column the note should be added
-% to (must be fully expandable and expand to a string only). The default
-% value is |marginpar|.
-% \item[\marg{code}:] the code, that should become par of the note
-% column. Note, that this will be written protected to a file. So you have
-% to use \cs{protect} if a macro shouldn't be expanded while writing or may
-% break while writing.
-% \end{description}
-% There is a star variant with the same parameters, that writes the
-% \meta{code} un-expanded. To do so, we need some internal commands.
-% \begin{macro}{\slnc@unexpanded,\slnc@makenote}
-% \changes{v0.1.2583}{2017/02/08}{added}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\slnc@unexpanded}{}
-\let\slnc@unexpanded\detokenize
-\newcommand*{\makenote}{%
- \kernel@ifstar{\let\slnc@unexpanded\detokenize\slnc@makenote}%
- {\let\slnc@unexpanded\@firstofone\slnc@makenote}%
-}%
-\newcommand{\slnc@makenote}[2][marginpar]{%
- \@bsphack
- \scr@savepos
- \addtocontents{slnc}{%
- \string\slnc@note{#1}%
- {\noexpand\number\value{slncpage}}%
- {\noexpand\number\scr@lastypos}%
- {\slnc@unexpanded{#2}}%
- }%
- \@esphack
-}%
-% \end{macrocode}
-% \begin{counter}{slncpage}
-% This counter should be increased once per page with note column. This may
-% be done simply at a once per page executed hook of
-% \pstyle{@everystyle@}. You should note, that auto-remove wouldn't
-% remove the counter.
-% \begin{macrocode}
-\@ifundefined{c@slncpage}{%
- \newcounter{slncpage}%
- \AddToLayerPageStyleOptions{@everystyle@}{%
- onbackground=\stepcounter{slncpage}%
- }%
-}{}
-%</body>
-% \end{macrocode}
-% \end{counter}^^A slncpage
-% \end{macro}^^A \slnc@makenote,\slnc@unexpanded
-% \end{command}^^A \makenote
-%
-% \begin{macro}{\slnc@processnotes}
-% \begin{description}
-% \item[\marg{string}:] the name of the note column (must be fully expandable
-% an expand to a string only).
-% \end{description}
-% Each note column typesets the notes with this command. It works in following
-% steps:
-% \begin{macrocode}
-%<*body>
-\newcommand*{\slnc@processnotes}[1]{%
-% \end{macrocode}
-% Read as long notes from the notes file until the number at \#2 of
-% \cs{slnc@note} in the file is greater than \cnt{slncpage}. Put all
-% these to the corresponding unprocessed list.
-% \begin{macrocode}
- \begingroup
- \slnc@readnotes{\value{slncpage}}%
-% \end{macrocode}
-% Process the unprocessed list of the current note column
-% \begin{macrocode}
- \expandafter\let\expandafter\reserved@a
- \csname slnc@#1@unprocessed\endcsname
- \expandafter\global
- \expandafter\let\csname slnc@#1@unprocessed\endcsname\@empty
- \def\slnc@notesyncfonttest##1{%
- \ifhmode
- \PackageError{scrlayer-notecolumn}{%
- illegal font setting for `notecolumn.##1'%
- }{%
- Current setting of font for `notecolumn.##1' switches
- from\MessageBreak
- vertical mode to horizontal mode. This is
- illegal!\MessageBreak
- You have to change the font setting to fix
- this.\MessageBreak
- If you'll continue vertical alignment of notes may fail%
- }%
- \par\vskip-\dimexpr \baselineskip+\parskip\relax
- \fi
- }%
- \long\def\slnc@note##1##2##3##4{%
-%<trace> \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): ##2<=\theslncpage?}%
- \ifnum ##2>\value{slncpage}\relax
-%<trace> \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): no: unprocess note}%
- \expandafter\g@addto@macro\csname slnc@#1@unprocessed\endcsname{%
- \slnc@note{##1}{##2}{##3}{##4}%
- }%
- \else
- \ifnum ##2<\value{slncpage}\relax
- \PackageWarning{scrlayer-notecolumn}{note of type `#1' delayed}%
- \fi
- \boxmaxdepth\maxdepth
- \expandafter\setbox\csname slnc@#1@box\endcsname\vbox{%
- \expandafter\hsize\csname slnc@#1@width\endcsname
- \normalfont\normalsize
-% \end{macrocode}
-% \changes{v0.2.3085}{2019/02/14}{using color stack if available}
-% If a color stack is available we switch to it before changing the font. So a
-% color definition inside the font would overwrite every color change inside
-% the column! But if we don't have a color stack, color switching is not
-% permitted!
-% \begin{macrocode}
- \slnc@switchcolorstack{#1}%
- {%
- \usekomafont{notecolumn.#1}{%
- \slnc@notesyncfonttest{#1}%
- \expandafter\ifvoid\csname slnc@#1@box\endcsname
- \expandafter\setbox\csname slnc@#1@box\endcsname\vbox{%
- \kern\dimexpr\topskip-\baselineskip\relax
- }%
- \fi
-% \end{macrocode}
-% \changes{v0.1}{2015/10/07}{ready for renaming \cs{pdfpageheight} in
-% luaTeX}
-% From lua\TeX~0.80.1 \cs{pdfpageheight} will be renamed into
-% \cs{pageheight}. So we have to do an extra test for the new primitive.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{pdfpageheight}{%
- \scr@ifundefinedorrelax{pageheight}{%
- \@tempdima=\paperheight
- }{%
- \@tempdima=\pageheight
- }%
- }{%
- \@tempdima=\pdfpageheight
- }%
- \@tempdima=\dimexpr \@tempdima-##3sp
- -1in-\topmargin
- -\headheight-\headsep
- -\baselineskip
- \relax
- \@tempdimb=\dimexpr \expandafter\ht\csname slnc@#1@box\endcsname
- +\expandafter\dp\csname slnc@#1@box\endcsname
- \relax
- \ifdim\@tempdima<\@tempdimb
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{%
- Note moved down from\MessageBreak
- \the\@tempdima\space to \the\@tempdimb\MessageBreak
- at note box `#1'
- }%
-%</trace>
- \else
- \ifdim\@tempdima>\@tempdimb
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{%
- Adding vertical white space from\MessageBreak
- \the\@tempdimb\space to \the\@tempdima\MessageBreak
- into note box `#1'
- }%
-%</trace>
- \expandafter\setbox\csname slnc@#1@box\endcsname
- \vbox {%
- \expandafter\unvbox\csname slnc@#1@box\endcsname
- \kern\dimexpr\@tempdima-\@tempdimb\relax
- }%
- \fi
- \fi
- \expandafter\ifvoid\expandafter\csname slnc@#1@box\endcsname
- \else
- \@tempdima\dimexpr
- \dp\strutbox
- -\dp\csname slnc@#1@box\endcsname
- \relax
- \expandafter\unvbox\csname slnc@#1@box\endcsname
- \ifdim\@tempdima>\z@ \kern\@tempdima\fi
- \fi
-% \end{macrocode}
-% \changes{v0.1.2582}{2017/02/08}{restore several commands}
-% Some commands have to be restored when processing the note.
-% \begin{macrocode}
- \slnc@restoreinnote
- \strut\ignorespaces ##4\par
- }%
- }%
- }%
- \fi
- }%
- \def\slnc@sync##1##2##3##4{%
- \ifnum ##2>\value{slncpage}\relax
- \expandafter\g@addto@macro\csname slnc@#1@unprocessed\endcsname{%
- \slnc@sync{##1}{##2}{##3}{}%
- }%
- \else
- \if@filesw
- \expandafter\setbox\csname slnc@#1@box\endcsname\vbox{%
- \expandafter\unvbox\csname slnc@#1@box\endcsname
- \scr@savepos
- \protected@write\@auxout{}{%
- \string\newlabel{notecolumn.##1.##3.syncnote.label}{%
- {%
- \noexpand\number\scr@lastypos
- }{\thepage}%
- }%
- }%
- }%
- \fi
- \fi
- }%
- \reserved@a
- \expandafter\ifvoid\csname slnc@#1@box\endcsname
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{Note box `#1' empty}%
-%</trace>
- \else
- \ifdim \dimexpr \expandafter\ht\csname slnc@#1@box\endcsname
- +\expandafter\dp\csname slnc@#1@box\endcsname
- \relax >\textheight\relax
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{Split note box `#1'}%
-%</trace>
- \splittopskip\topskip
- \splitmaxdepth\baselineskip
-% \end{macrocode}
-% Bring back the colors:
-% \changes{v0.2.3085}{2019/02/14}{\cs{slnc@switchcolorstack} added}
-% \begin{macrocode}
- \usekomafont{notecolumn.#1}{%
- \expandafter\vsplit\csname slnc@#1@box\endcsname to
- \textheight\relax
- }%
- \expandafter\ifvoid\csname slnc@#1@box\endcsname
- \else
- \expandafter\setbox\csname slnc@#1@box\endcsname\vbox{%
- \slnc@switchcolorstack{#1}%
- \expandafter\unvbox\csname slnc@#1@box\endcsname
- }%
- \fi
- \else
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{Flush note box `#1'}%
-%</trace>
-% \end{macrocode}
-% Bring back the colors:
-% \changes{v0.2.3085}{2019/02/14}{\cs{slnc@switchcolorstack} added}
-% \begin{macrocode}
- \usekomafont{notecolumn.#1}{%
- \slnc@switchcolorstack{#1}%
- \expandafter\box\csname slnc@#1@box\endcsname%
- }%
- \fi
- \fi
- \expandafter\global
- \expandafter\setbox\csname slnc@#1@box\expandafter\endcsname
- \expandafter\box\csname slnc@#1@box\endcsname
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\slnc@switchcolorstack}
-% \changes{v0.2.3085}{2019/02/14}{added}
-% This either redefines \cs{set@color} or switches to the color stack of the
-% note column given by the argument.
-% \begin{macrocode}
-\newcommand*{\slnc@switchcolorstack}[1]{%
- \scr@ifundefinedorrelax{slnc@#1@colorstack}{%
- \def\set@color{%
- \PackageWarningNoLine{scrlayer-notecolumn}{%
- unsupported change of color!\MessageBreak
- It seems you are using a TeX engine,\MessageBreak
- that does not support switching the\MessageBreak
- color stack like pdfTeX or luaTeX do.\MessageBreak
- Because of this, usage of \string\color,\MessageBreak
- \string\textcolor\space etc. inside a note
- column\MessageBreak
- is not supported%
- }%
- }%
- }{%
- \scr@ifundefinedorrelax{@pdfcolorstack}{%
- }{%
- \expandafter\let\expandafter\@pdfcolorstack
- \csname slnc@#1@colorstack\endcsname
- }%
- \scr@ifundefinedorrelax{pdfcolorstack}{%
- \scr@ifundefinedorrelax{pdfextension}{%
- \PackageError{scrlayer-notecolumm}{%
- color stack defined but not usable%
- }{%
- \expandafter\string
- \csname slnc@#1@colorstack\endcsname\space defined
- \MessageBreak
- but neither \string\pdfcolorstack\space nor
- \string\pdfextension.\MessageBreak
- This should never happen!%
- }%
- }{%
- \pdfextension colorstack
- \csname slnc@#1@colorstack\endcsname current\relax
- }%
- }{%
- \pdfcolorstack
- \csname slnc@#1@colorstack\endcsname current\relax
- }%
- }%
-}%
-% \end{macrocode}
-% \end{macro}^^A \slnc@switchcolorstack
-% \begin{command}{\restoreinnote}
-% \changes{v0.1.2582}{2017/02/08}{added}
-% \begin{macro}{\slnc@restoreinnote}
-% \changes{v0.1.2582}{2017/02/08}{added}
-% Some commands have to be restored while processing the notes. By default
-% these are \cs{label}, \cs{index}, \cs{glossary}. More can be added using
-% \cs{restoreinnote}. The storage is \cs{slnc@restoreinnote}.
-% \begin{macrocode}
-\newcommand*{\slnc@restoreinnote}{}
-\let\slnc@restoreinnote\@empty
-\newcommand*\restoreinnote[1]{%
- \AtBeginDocument{%
- \expandafter\newcommand\expandafter*\csname slnc\string#1\endcsname{}%
- \expandafter\let\csname slnc\string#1\endcsname#1%
- \g@addto@macro\slnc@restoreinnote{%
- \expandafter\let\expandafter#1\csname slnc\string#1\endcsname
- }%
- }%
-}
-\@onlypreamble\restoreinnote
-\restoreinnote\label
-\restoreinnote\index
-\restoreinnote\glossary
-% \end{macrocode}
-% \end{macro}^^A \slnc@restoreinnote
-% \end{command}^^A \restoreinnote
-% \begin{macro}{\slnc@readnotes}
-% Read as long notes from the notes file until the number at \#2 of
-% \cs{slnc@note} or \cs{slnc@sync} in the file is greater than
-% \cnt{slncpage}. Put all these to the corresponding unprocessed list.
-% \begin{macro}{\slnc@catcodes}
-% \changes{v0.3}{2019/03/02}{added}
-% We need a helper macro \cs{slnc@catcodes} to restore (some of) the catcodes
-% before reading from file.
-% \begin{macrocode}
-\newcommand*{\slnc@catcodes}{}%
-\AtBeginDocument{%
- \begingroup
- \def\do#1{%
- \protected@xdef\slnc@catcodes{\slnc@catcodes
- \catcode`\protect#1=\the\catcode`#1\relax
- }%
- }%
- \dospecials
- \let\protect\noexpand
- \xdef\slnc@catcodes{\slnc@catcodes\catcode`\protect\@=11\relax}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}^^A \slnc@catcodes
-% \begin{macrocode}
-\newcommand*\slnc@readnotes[1]{%
- \ifeof\slnc@file\else
- \ifnum \number #1<\slnc@unprocessed\relax
- \@tempswafalse
- \else
- \@tempswatrue
- \fi
- \@whilesw\if@tempswa\fi{%
- \begingroup
- \slnc@catcodes
- \endlinechar\m@ne
- \read\slnc@file to\reserved@a
- \edef\reserved@a{%
- \endgroup
- \noexpand\def\noexpand\reserved@a{%
- \unexpanded\expandafter{\reserved@a}%
- }%
- }%
- \reserved@a
- \expandafter\slnc@iofv\expandafter\reserved@b\reserved@a
- \@empty\@empty\@empty\@empty\@empty
- \@tempswafalse
- \@for\reserved@c :={\slnc@note },{\slnc@sync }\do{%
- \ifx\reserved@b\reserved@c \@tempswatrue\fi
- }%
- \if@tempswa
- \@tempswafalse
- \expandafter\slnc@iiiofv\expandafter\reserved@b\reserved@a
- \@empty\@empty\@empty\@empty\@empty
- \ifx\reserved@b\@empty
- \PackageError{scrlayer-notecolumn}{internal syntax error}{%
- Unexpected syntax of file `\jobname.slnc'.\MessageBreak
- Second argument should be a number.\MessageBreak
- I don't know what to do with\MessageBreak
- \expandafter\detokenize\expandafter{\reserved@a}%
- }%
- \@tempswatrue
- \else
- \global\let\slnc@unprocessed\reserved@b
- \expandafter\slnc@iiofv\expandafter\reserved@b\reserved@a
- \@empty\@empty\@empty\@empty\@empty
- \@ifundefined{slnc@\reserved@b @unprocessed}{%
- \PackageWarning{scrlayer-notecolumn}{%
- column `\reserved@b' undefined.\MessageBreak
- You should declare the column before the usage.\MessageBreak
- Notes will be lost%
- }%
- }{%
- \expandafter\g@addto@macro
- \csname slnc@\reserved@b @unprocessed\expandafter\endcsname
- \expandafter{%
- \reserved@a
- }%
- }%
- \ifnum \number #1<\slnc@unprocessed\relax
- \@tempswafalse
- \else
- \@tempswatrue
- \fi
- \fi
- \else
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{%
- Ignoring `\expandafter\detokenize\expandafter{\reserved@a}'}%
-%</trace>
- \@tempswatrue
- \fi
- \ifeof\slnc@file\@tempswafalse\fi
- }%
- \fi
-}%
-% \end{macrocode}
-% \end{macro}^^A \slnc@readnotes
-% \begin{macro}{\slnc@iofv,\slnc@iiofv,\slnc@iiiofv}
-% \begin{macrocode}
-\newcommand\slnc@iofv[6]{\def#1{#2}}%
-\newcommand\slnc@iiofv[6]{\def#1{#3}}%
-\newcommand\slnc@iiiofv[6]{\def#1{#4}}%
-% \end{macrocode}
-% \end{macro}^^A \slnc@iofv … \slnc@iiiofv
-% \begin{macro}{\slnc@unprocessed}
-% The \#2 of the last read note column from notes file.
-% \begin{macrocode}
-\newcommand*{\slnc@unprocessed}{0}%
-%</body>
-% \end{macrocode}
-% \begin{macro}{\slnc@file}
-% The input file with the unprocessed notes.
-% \changes{v0.1.2928}{2018/02/02}{use \cs{closein} instead of \cs{closeout}
-% to close \cs{slnc@file}}
-% \begin{macro}{\slnc@mdfivesum}
-% \changes{v0.1.2872}{2018/01/17}{definition and usage of Lua function
-% \texttt{slncmdfivesum}}
-% \changes{v0.1.2972}{2018/04/01}{usage of not yet documented \XeTeX{}
-% primitive \cs{mdfivesum}}
-% \changes{v0.3.3591}{2021/03/25}{Lua function name changed to
-% \texttt{slnc.mdfivesum}}
-% \changes{v0.3.3591}{2021/03/25}{new Lua variable \texttt{slnc.slncfile}}
-% The MD5 sum of the file before opening it for reading.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\slnc@mdfivesum}{}
-\let\slnc@mdfivesum\@empty
-\scr@ifundefinedorrelax{pdfmdfivesum}{%
- \scr@ifundefinedorrelax{mdfivesum}{%
- \ifdefined\directlua
- \directlua{%
- slnc = slnc or {}
- function slnc.mdfivesum(filename)
- local fh = io.open(filename,"rb")
- if fh then
- local sum=md5.sumhexa(fh:read("*a"))
- tex.sprint(sum)
- fh:close()
- end
- end
- if (string.sub(tex.jobname,1,1) == '"')
- and (string.sub(tex.jobname,string.len(tex.jobname),-1) == '"')
- then
- slnc.slncfile = string.sub(tex.jobname,2,-2)
- else
- slnc.slncfile = tex.jobname
- end
- slnc.slncfile = slnc.slncfile .. '.slnc'
- }%
- \xdef\slnc@mdfivesum{\directlua{slnc.mdfivesum(slnc.slncfile)}}%
- \fi
- }{%
- \xdef\slnc@mdfivesum{\mdfivesum file {\jobname.slnc}}%
- }%
-}{%
- \xdef\slnc@mdfivesum{\pdfmdfivesum file {\jobname.slnc}}%
-}%
-%<*trace>
-\scr@ifundefinedorrelax{slnc@mdfivesum}{}{%
- \PackageInfo{scrlayer-notecolumn}{%
- MD5 of last `\jobname.slnc':\MessageBreak
- \slnc@mdfivesum}%
-}%
-%</trace>
-\newread\slnc@file
-\immediate\openin\slnc@file \jobname.slnc
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \slnc@mdfivesum
-% \end{macro}^^A \slnc@file
-% \end{macro}^^A \slnc@unprocessed
-% \end{macro}^^A \slnc@processnotes
-%
-% \begin{option}{autoclearnotecolumns}
-% \begin{macro}{\ifslnc@autoclearnotecolumns,\slnc@autoclearnotecolumnstrue,
-% \slnc@autoclearnotecolumnsfalse}
-% \begin{macrocode}
-%<*options>
-\KOMA@ifkey{autoclearnotecolumns}{slnc@autoclearnotecolumns}
-\slnc@autoclearnotecolumnstrue
-%</options>
-%<*final>
-\let\reserved@a\clearpage
-\def\clearpage{%
- \ifslnc@autoclearnotecolumns\clearnotecolumns\relax\fi
-}%
-\expandafter\g@addto@macro\expandafter\clearpage\expandafter{\reserved@a}
-%</final>
-% \end{macrocode}
-% \end{macro}
-% \end{option}
-%
-% \begin{command}{\clearnotecolumn}
-% \begin{description}
-% \item[\oarg{string}:] the name of the note column (must be fully
-% expandable and expand to a string only). Default is |marginpar|.
-% \end{description}
-% Output as many (empty) pages as needed to output all unprocessed notes of
-% one note column. Note, that the output of the first page may result in more
-% unprocessed notes. But the output of the following (empty) pages shouldn't.
-% \begin{macrocode}
-%<*body>
-\newcounter{slnc@clearnote@label}%
-\newcommand*\clearnotecolumn[1][marginpar]{%
- \begingroup
- \slnc@autoclearnotecolumnsfalse
-% \end{macrocode}
-% First of all we need to know the note column page of this page.
-% \begin{macrocode}
- \stepcounter{slnc@clearnote@label}%
- \if@filesw
- \protected@write\@auxout{%
- \let\theslncpage\relax
- \let\slnc@voidtest\relax
- }{%
- \string\newlabel{notecolumn.\theslnc@clearnote@label}%
- {{\theslncpage}{\slnc@voidtest{#1}}}%
- }%
- \fi
- \scr@ifundefinedorrelax{r@notecolumn.\theslnc@clearnote@label}{%
- \PackageInfo{scrlayer-notecolumn}{%
- Using estimated to low value for clearing\MessageBreak
- note colum `#1'%
- }
- \edef\slnc@cmp@value{\the\value{slncpage}}%
- \let\reserved@a\z@
- }{%
- \edef\reserved@a{%
- \@nameuse{r@notecolumn.\theslnc@clearnote@label}\@empty\@empty
- }%
- \edef\slnc@cmp@value{\expandafter\slnc@firstof\reserved@a\@nil}%
- \edef\reserved@a{\expandafter\slnc@secondof\reserved@a\@nil}%
- }%
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{%
- TRACE (slnc): clearnote=\@nameuse{theslnc@clearnote@label},
- abspage=\the\value{slncpage}, until page=\slnc@cmp@value,
- process=\reserved@a, pagetotal=\the\pagetotal, topskip=\the\topskip}%
-%</trace>
- \ifvmode\ifdim \pagetotal<\topskip
-% \end{macrocode}
-% \cs{clearpage} wouldn't result in a new page, so we do not have to output
-% the notes of this page but only until the previous.
-% \begin{macrocode}
- \edef\slnc@cmp@value{\the\numexpr\slnc@cmp@value-1}%
-%<trace> \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): until page=\slnc@cmp@value}%
- \fi\fi
- \ifnum \reserved@a=\z@
-% \end{macrocode}
-% Next we read all notes until the end of the current page, but only
-% if a \cs{clearpage} wouldn't result in a new page.
-% \begin{macrocode}
- \ifvmode
- \ifdim \pagetotal<\topskip
- \else
- \slnc@readnotes{\slnc@cmp@value}%
- \fi
- \else
- \slnc@readnotes{\slnc@cmp@value}%
- \fi
- \begingroup
- \aftergroup\@tempswafalse
- \long\def\slnc@note##1##2##3##4{%
- \ifnum ##2>\slnc@cmp@value\relax \else \aftergroup\@tempswatrue\fi
- }%
- \let\slnc@sync\slnc@note
- \csname slnc@#1@unprocessed\endcsname
- \endgroup
- \else
- \PackageInfo{scrlayer-notecolumn}{%
- box of note column `#1'\MessageBreak
- not empty after page of \string\clearnotecolumn}%
- \@tempswatrue
- \fi
- \if@tempswa
-% \end{macrocode}
-% Yes, we have!
-% \begin{macrocode}
- \IfLayerPageStyleExists{\currentpagestyle}{}{%
- \PackageWarning{scrlayer-notecolumn}{%
- \string\clearnotecolumn\space while active non-layer page
- style.\MessageBreak
- Activate empty page style until note column\MessageBreak
- has been cleared%
- }%
- \pagestyle{empty}%
- }%
- \@tempswatrue
- \fi
- \@whilesw\if@tempswa\fi{%
-%<trace> \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): add \string\clearpage}%
-% \end{macrocode}
-% Yes, we have (maybe again)!
-% \begin{macrocode}
- \clearpage
- \expandafter\ifcase \slnc@voidtest{#1}%
- \begingroup
- \aftergroup\@tempswafalse
- \long\def\slnc@note##1##2##3##4{%
- \ifnum ##2>\slnc@cmp@value\relax \else \aftergroup\@tempswatrue\fi
- }%
- \let\slnc@sync\slnc@note
- \csname slnc@#1@unprocessed\endcsname
- \endgroup
- \else
- \@tempswatrue
- \fi
- \if@tempswa
-% \end{macrocode}
-% And we still have: So we have to output one more page.
-% \begin{macrocode}
- \null
- \fi
- }%
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\slnc@firstof,\slnc@secondof}
-% We need these little helpers, because some packages like
-% \pkg{hyperref} extend the label mechanism by additional arguments.
-% \begin{macrocode}
-\newcommand*{\slnc@firstof}{}
-\def\slnc@firstof#1#2\@nil{#1}%
-\newcommand*{\slnc@secondof}{}
-\def\slnc@secondof#1#2#3\@nil{#2}%
-% \end{macrocode}
-% \end{macro}^^A \slnc@firstof,\slnc@secondof
-% \begin{macro}{\slnc@voidtest}
-% \begin{description}
-% \item[\marg{string}:] the name of a note column (must be fully
-% expandable and expand to a string only).
-% \end{description}
-% If the box of the note column is empty/void it returns \cs{z@} otherwise
-% \cs{@ne}.
-% \begin{macrocode}
-\newcommand*{\slnc@voidtest}[1]{%
- \expandafter\ifvoid \csname slnc@#1@box\endcsname \z@\else \@ne\fi
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \slnc@voidtest
-% \end{command}^^A \clearnotecolumn
-%
-% \begin{command}{\clearnotecolumns}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added}
-% \changes{v3.26}{2018/08/29}{removed spurious \cs{expandafter}}
-% \begin{description}
-% \item[\oarg{string list}:] comma separated list of note column names (must
-% be fully expandable and each element must expand to a string only, that is
-% the name of a note column); if omitted or empty all note columns will be
-% used.
-% \end{description}
-% Output as many (empty) pages as needed to output all unprocessed notes of
-% all (given) note columns. Note, that the output of the first page may
-% result in more unprocessed notes. But the output of the following (empty)
-% pages shouldn't.
-% \begin{macrocode}
-%<*body>
-\newcommand*\clearnotecolumns[1][\relax]{%
- \begingroup
- \slnc@autoclearnotecolumnsfalse
- \ifx\relax#1\relax\else
- \let\slnc@processnotecolumns\@empty
- \edef\reserved@a{#1}%
- \@for\reserved@a:=\reserved@a\do {%
- \scr@trim@spaces\reserved@a
- \ifx\reserved@a\@empty\else
- \expandafter\l@addto@macro\expandafter\slnc@processnotecolumns
- \expandafter{\expandafter\@elt\expandafter{\reserved@a}}%
- \fi
- }%
- \fi
-% \end{macrocode}
-% First of all we need to know the note column page of this page.
-% \begin{macrocode}
- \stepcounter{slnc@clearnote@label}%
- \if@filesw
- \begingroup
- \def\@elt##1{+\slnc@voidtest{##1}}%
- \protected@write\@auxout{%
- \let\theslncpage\relax
- \let\slnc@voidtest\relax
- }{%
- \string\newlabel{notecolumn.\theslnc@clearnote@label}%
- {{\theslncpage}{\numexpr \slnc@processnotecolumns\relax}}%
- }%
- \endgroup
- \fi
- \scr@ifundefinedorrelax{r@notecolumn.\theslnc@clearnote@label}{%
- \begingroup
- \def\@elt##1{, `##1'}%
- \PackageInfo{scrlayer-notecolumn}{%
- Using estimated to low value for\MessageBreak
- clearing note colums\MessageBreak
- \expandafter\@gobble\slnc@processnotecolumns
- }%
- \endgroup
- \edef\slnc@cmp@value{\the\value{slncpage}}%
- \let\reserved@a\z@
- }{%
- \edef\reserved@a{%
- \@nameuse{r@notecolumn.\theslnc@clearnote@label}\@empty\@empty
- }%
- \edef\slnc@cmp@value{\expandafter\slnc@firstof\reserved@a\@nil}%
- \edef\reserved@a{\expandafter\slnc@secondof\reserved@a\@nil}%
- }%
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{%
- TRACE (slnc): clearnote=\@nameuse{theslnc@clearnote@label},
- abspage=\theslncpage, until page=\slnc@cmp@value,
- process=\reserved@a, pagetotal=\the\pagetotal, topskip=\the\topskip}%
-%</trace>
- \ifvmode\ifdim \pagetotal<\topskip
-% \end{macrocode}
-% \cs{clearpage} wouldn't result in a new page, so we do not have to output
-% the notes of this page but only until the previous.
-% \begin{macrocode}
- \edef\slnc@cmp@value{\the\numexpr\slnc@cmp@value-1}%
-%<trace> \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): until page=\slnc@cmp@value}%
- \fi\fi
- \ifnum \reserved@a=\z@
-% \end{macrocode}
-% Next we read all notes until the end of the current page, but only
-% if a \cs{clearpage} wouldn't result in a new page.
-% \begin{macrocode}
- \ifvmode
- \ifdim \pagetotal<\topskip
- \else
- \slnc@readnotes{\slnc@cmp@value}%
- \fi
- \else
- \slnc@readnotes{\slnc@cmp@value}%
- \fi
- \begingroup
- \aftergroup\@tempswafalse
- \long\def\slnc@note##1##2##3##4{%
- \ifnum ##2>\slnc@cmp@value\relax \else \aftergroup\@tempswatrue\fi
- }%
- \let\slnc@sync\slnc@note
- \def\@elt##1{\csname slnc@##1@unprocessed\endcsname}%
- \slnc@processnotecolumns
- \endgroup
- \else
- \PackageInfo{scrlayer-notecolumn}{%
- box of at least one note column\MessageBreak
- not empty after page of \string\clearnotecolumns}%
- \@tempswatrue
- \fi
- \if@tempswa
-% \end{macrocode}
-% Yes, we have!
-% \begin{macrocode}
- \IfLayerPageStyleExists{\currentpagestyle}{}{%
- \PackageWarning{scrlayer-notecolumn}{%
- \string\clearnotecolumns\space while active non-layer page
- style.\MessageBreak
- Activate empty page style until note column\MessageBreak
- has been cleared%
- }%
- \pagestyle{empty}%
- }%
- \@tempswatrue
- \fi
- \@whilesw\if@tempswa\fi{%
-%<trace> \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): adding \string\clearpage}%
-% \end{macrocode}
-% Yes, we have (maybe again)!
-% \begin{macrocode}
- \clearpage
- \begingroup
- \def\@elt##1{+\slnc@voidtest{##1}}%
- \ifcase \numexpr \slnc@processnotecolumns\relax
- \aftergroup\@tempswafalse
- \long\def\slnc@note##1##2##3##4{%
- \ifnum ##2>\slnc@cmp@value\relax \else \aftergroup\@tempswatrue\fi
- }%
- \let\slnc@sync\slnc@note
- \def\@elt##1{\csname slnc@##1@unprocessed\endcsname}%
- \slnc@processnotecolumns
- \else
- \aftergroup\@tempswatrue
- \fi
- \endgroup
- \if@tempswa
-% \end{macrocode}
-% And we still have: So we have to output one more page.
-% \begin{macrocode}
- \null
- \fi
- }%
- \endgroup
-}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \clearnotecolumns
-%
-%
-% \subsection{Syncronisation of text and note}
-% \label{sec:scrlayer-notecolumn.sync}
-%
-% Until yet we have the text and we have note columns. Normally note entries
-% to a note column are in sync with the text position, that makes the
-% note. But if there are collisions the sync may be lost. In this case the
-% note may be later (but never earlier), so we need a mechanism to force
-% synchronisation of the text with the note.
-%
-% \begin{command}{\syncwithnotecolumn,\syncwithnotecolumns}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added}
-% \changes{v3.26}{2018/08/29}{removed spurious \cs{expandafter}}
-% \begin{description}
-% \item[\oarg{string}:] the name of the note column to sync with (this must be
-% fully expandable and expand to the name of a note column). By default sync
-% with note column |marginpar|.
-% \end{description}
-% \begin{counter}{slnc@syncpoint}
-% Add at the \LaTeX{} run after the next \LaTeX{} run as much space to the
-% text (not the note column!) as needed to reach the next position at the
-% note column. This is not the same like \cs{clearnotecolumn}, because it
-% doesn't need to go to the next page, but it needs at least three \LaTeX{}
-% runs to terminate.
-% \begin{macrocode}
-%<*body>
-\newcounter{slnc@syncpoint}%
-\newcommand*{\syncwithnotecolumn}[1][marginpar]{%
- \begingroup
- \edef\reserved@a{\endgroup\noexpand\syncwithnotecolumns[{#1}]}%
- \reserved@a
-}
-\newcommand*{\syncwithnotecolumns}[1][\relax]{%
- \begingroup
- \ifx\relax#1\relax\else
- \let\slnc@processnotecolumns\@empty
- \edef\reserved@a{#1}%
- \@for\reserved@a:=\reserved@a\do {%
- \scr@trim@spaces\reserved@a
- \ifx\reserved@a\@empty\else
- \expandafter\l@addto@macro\expandafter\slnc@processnotecolumns
- \expandafter{\expandafter\@elt\expandafter{\reserved@a}}%
- \fi
- }%
- \fi
- \stepcounter{slnc@syncpoint}%
- \def\@elt##1{%
- \addtocontents{slnc}{%
- \string\slnc@sync{##1}%
- {\noexpand\number\value{slncpage}}%
- {\theslnc@syncpoint}%
- {}%
- }%
- }%
- \slnc@processnotecolumns
- \ifvmode
- \let\slnc@voffset\@empty%
- \expandafter\@firstofone
- \else
- \PackageWarning{scrlayer-notecolumn}{%
- \string\syncwithnotecolumn\space in hmode.\MessageBreak
- Using \string\syncwithnotecolumn\space in horizontal\MessageBreak
- mode may result in unwanted vertical\MessageBreak
- space inside paragraphs and may lost\MessageBreak
- colors of text of notes. \space So perhaps you\MessageBreak
- should move \string\syncwithnotecolumn\space before\MessageBreak
- or after the paragraph%
- }%
- \let\slnc@voffset\@empty%\def\slnc@voffset{-\number\baselineskip}%
- \expandafter\slnc@vadjust
- \fi
- {%
- \if@filesw
- \scr@savepos
- \protected@write\@auxout{}{%
- \string\newlabel{notecolumn.\theslnc@syncpoint.synctext.label}{%
- {%
- \noexpand\number
- \numexpr \scr@lastypos\slnc@voffset\relax
- }{\thepage}%
- }%
- }%
- \fi
- \@ifundefined{r@notecolumn.\theslnc@syncpoint.synctext.label}{%
- \PackageInfo{scrlayer-notecolumn}{%
- No text label for \string\syncwithnotecolumn.\MessageBreak
- Need rerun to sync position}%
- }{%
- \edef\reserved@a{%
- \@nameuse{r@notecolumn.\theslnc@syncpoint.synctext.label}%
- \@empty\@empty
- }%
- \edef\slnc@textpos{\expandafter\slnc@firstof\reserved@a\@nil}%
- \edef\slnc@textpage{\expandafter\slnc@secondof\reserved@a\@nil}%
- \let\slnc@notepos\slnc@textpos
- \let\slnc@notepage\slnc@textpage
- \def\@elt##1{%
- \@ifundefined{r@notecolumn.##1.\theslnc@syncpoint.syncnote.label}{%
- \PackageInfo{scrlayer-notecolumn}{%
- No note label for sync with note column\MessageBreak
- `##1'.\MessageBreak
- Need rerun to sync position}%
- \G@refundefinedtrue
- }{%
- \edef\reserved@a{%
- \@nameuse{r@notecolumn.##1.\theslnc@syncpoint.syncnote.label}%
- \@empty\@empty
- }%
- \edef\reserved@b{\expandafter\slnc@firstof\reserved@a\@nil}%
- \edef\reserved@c{\expandafter\slnc@secondof\reserved@a\@nil}%
- \ifnum \slnc@notepage<\reserved@c\relax
- \let\slnc@notepos=\reserved@b
- \let\slnc@notepage=\reserved@c
- \else
- \ifnum \slnc@notepage=\reserved@c\relax
- \ifnum \slnc@notepos>\reserved@b
- \let\slnc@notepos=\reserved@b
- \let\slnc@notepage=\reserved@c
- \fi
- \fi
- \fi
- }%
- }%
- \slnc@processnotecolumns
- \ifnum\slnc@textpage>\slnc@notepage\relax
- \PackageInfo{scrlayer-notecolumn}{%
- Last note page before last text page.\MessageBreak
- Need rerun to sync position}%
- \else
- \ifnum\slnc@textpage<\slnc@notepage\relax
- \@whilenum \slnc@textpage<\slnc@notepage\do {%
- \newpage\null\vskip-\dimexpr \baselineskip+\parskip\relax
- \edef\slnc@textpage{\the\numexpr\slnc@textpage+1\relax}%
- }%
-% \end{macrocode}
-% \changes{v0.1}{2015/10/07}{ready for renaming \cs{pdfpageheight} in
-% luaTeX}
-% From lua\TeX~0.80.1 \cs{pdfpageheight} will be renamed into
-% \cs{pageheight}. So we have to do an extra test for the new primitive.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{pdfpageheight}{%
- \scr@ifundefinedorrelax{pageheight}{%
- \@tempdima=\paperheight
- }{%
- \@tempdima=\pageheight
- }%
- }{%
- \@tempdima=\pdfpageheight
- }%
- \@tempdima=\dimexpr \@tempdima
- -\topmargin-1in
- -\headheight-\headsep
- -\topskip+\baselineskip
- \relax
- \edef\slnc@textpos{\number\@tempdima}%
-%<*trace>
- \PackageInfo{scrlayer-notecolumn}{%
- Top position is \slnc@textpos%
- }%
-%</trace>
- \fi
- \ifnum\slnc@notepos>\slnc@textpos\relax
- \PackageInfo{scrlayer-notecolumn}{%
- Last note position before last text\MessageBreak
- position.\MessageBreak
- Need rerun to sync position%
- }%
- \else
- \ifnum\slnc@notepos<\slnc@textpos\relax
- \@tempdima=\numexpr \slnc@textpos-\slnc@notepos\relax sp
- \PackageInfo{scrlayer-notecolumn}{%
- skipping \the\@tempdima\space to sync%
- }%
- \vskip\@tempdima
- \fi
- \fi
- \fi
- }%
- }%
- \endgroup
-}
-% \end{macrocode}
-% \end{counter}
-% \begin{macro}{\slnc@vadjust}
-% \begin{macrocode}
-\newcommand{\slnc@vadjust}[1]{%
- \@bsphack
- \vadjust{#1}%
- \@esphack
-}
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \slnc@vadjust
-% \end{command}^^A \syncwithnotecolumn,\syncwithnotecolumns
-%
-%
-% \begin{macrocode}
-%</interface>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrlayer-scrpage.dtx b/macros/latex/contrib/koma-script/source/scrlayer-scrpage.dtx
deleted file mode 100644
index e0b8af619a..0000000000
--- a/macros/latex/contrib/koma-script/source/scrlayer-scrpage.dtx
+++ /dev/null
@@ -1,2495 +0,0 @@
-% \iffalse^^A meta-comment
-% ======================================================================
-% scrlayer-scrpage.dtx
-% Copyright (c) Markus Kohm, 2012-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrlayer-scrpage.dtx 3693 2022-02-10 13:20:09Z kohm $
-%<identify>%%% (run: identify)
-%<init>%%% (run: init)
-%<options>%%% (run: options)
-%<body>%%% (run: body)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-10 14:20:09 +0100 (Do, 10. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3693 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrlayer-scrpage.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script package source
- }%
-\reserved@a
-%</dtx>
-%<*identify>
-%<interface>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-%<interface>\ProvidesPackage{scrlayer-scrpage}[%
-%!KOMAScriptVersion
-%<interface> package
-%</identify>
-%<*dtx|identify>
- (end user interface for scrlayer)]
-%</dtx|identify>
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2012}
- \generate{\usepreamble\defaultpreamble
- \file{scrlayer-scrpage.sty}{%
- \from{scrlayer-scrpage.dtx}{interface,scrpage,identify}%
- \from{scrlayer.dtx}{interface,scrpage,init}%
- \from{scrlayer-scrpage.dtx}{interface,scrpage,init}%
- \from{scrlayer.dtx}{interface,scrpage,options}%
- \from{scrlayer-scrpage.dtx}{interface,scrpage,options}%
- \from{scrlayer.dtx}{interface,scrpage,body}%
- \from{scrlayer-scrpage.dtx}{interface,scrpage,body}%
- \from{scrlogo.dtx}{logo}%
- }%
- }
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-% We need (foo,bar)
-\DeclareRobustCommand*{\pparg}[2]{\texttt(\meta{#1}\texttt,\meta{#2}\texttt)}
-% and {foo:bar}
-\DeclareRobustCommand*{\mmarg}[2]{%
- \texttt{\char`\{}\meta{#1}\texttt:\meta{#2}\texttt{\char`\}}}
-\begin{document}
- \DocInput{scrlayer-scrpage.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v0.0}{2012/01/01}{start of interface}
-% \changes{v3.32}{2020/09/11}{do not use deprecated interface commands}
-% \changes{v3.36}{2022/02/09}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/09}{require package \pkg*{scrlogo} instead of
-% defining \cs{KOMAScript}}
-% \changes{v3.36}{2022/02/09}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrlayer-scrpage.dtx}
-% \title{The \texttt{scrlayer} Interface of
-% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrlayer-scrpage}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% This package defines several extensions above \pkg*{scrlayer} for easy
-% handling of pairs of \emph{headings} and \emph{plain} page styles. So this
-% widely is a replacement of the not any longer supported, former
-% \KOMAScript{} package \pkg{scrpage2}.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user manuals of \pkg*{scrlayer-scrpage} in the \KOMAScript{}
-% manual, either the German \file{scrguide} or the English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-%
-% \section{Implementation of \pkg*{scrlayer-scrpage}}
-% \label{sec:scrlayer-scrpage}
-%
-% This section if for developers only.
-%
-% \begin{macrocode}
-%<*interface>
-% \end{macrocode}
-%
-%
-% \subsection{Initialising some values before the options}
-%
-% \begin{macrocode}
-%<*init>
-% \end{macrocode}
-%
-% Initialisation before all options (even the options from
-% \file{scrlayer.dtx}).
-%
-% Currently nothing to do.
-%
-% \begin{macrocode}
-%</init>
-% \end{macrocode}
-%
-%
-% \subsection{Options}
-%
-% \begin{macrocode}
-%<*options>
-% \end{macrocode}
-%
-% Package \pkg{scrpage2} didn't support \KOMAScript{} options but only
-% regular \LaTeX{} package options. This interface will also support those
-% options, but uses \KOMAScript{} options for the implementation. This
-% results in additional features of the interface.
-%
-% Note, that some options are already defined before this by the common option
-% parts of \file{scrlayer.dtx}. All others will follow step by step in the
-% main part.
-%
-% Options \opt{headinclude}, \opt{headexclude}, \opt{footinclude} and
-% \opt{footexclude} of package \pkg{scrpage2} are deprecated since
-% package version 2.3, 2008-12-08. They won't be supported by the
-% \pkg*{scrlayer-scrpage} interface.
-%
-% Additional initialisation may be done here, but currently this isn't
-% needed.
-%
-% \begin{macrocode}
-%</options>
-% \end{macrocode}
-%
-%
-% \subsection{Width of header and footer}
-%
-% \pkg{scrpage2} provided commands \cs{setheadwidth} and \cs{setfootwidth} to
-% set the width of the page head or footer different from the width of the
-% text area of the page. Optionally those commands allow to setup an
-% horizontal offset for the head or footer. This interface provides the same
-% feature but prefers to set up the widths and offsets with \KOMAScript{}
-% options. Those options will become the primary interface.
-%
-% \begin{option}{headwidth}
-% \changes{v0.9.1757}{2014/04/09}{new: two offsets available}
-% \changes{v3.17}{2015/02/25}{new: store the values}
-% \begin{option}{footwidth}
-% \changes{v0.9.1757}{2014/04/09}{new: two offsets available}
-% \changes{v3.15}{2014/12/28}{fix: missing colon in call of
-% \cs{sls@split@at@iicolons}}
-% \changes{v3.17}{2015/02/25}{new: store the values}
-% \begin{description}
-% \item[\texttt{=\meta{special dimensional expression}:\meta{special
-% dimensional expression}}:] see \cs{sls@settowidthof} for information about
-% the syntax of \meta{special dimensional expression}. The width of the page
-% head or footer will be set to the result of the first on, the offset to
-% the result of the second one. If the first one\,---\,the width\,---\,is
-% omitted, the current width will be used. If the second one\,---\,the
-% offset\,---\,is omitted and the width is the width of the text area plus
-% the margin note column, the offset will be set to zero. If the second one
-% is omitted and the width is not the width of the text area plus the margin
-% note column, a special kind of centering will be used.
-% \end{description}
-% These options may be used to set up the widths of head and foot.
-% \begin{macrocode}
-%<*options>
-\KOMA@key{headwidth}{%
- \begingroup
- \sls@split@at@iicolons#1:::\@nil
- \ifx\reserved@a\@empty \let\reserved@a\sls@headwidth\fi
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\sls@set@hf@width{head}{\reserved@b}{\reserved@c}{\reserved@a}%
- \noexpand\FamilyKeyStateProcessed
- \noexpand\KOMA@kav@replacevalue{.scrlayer-scrpage.sty}{headwidth}{%
- \reserved@a:\reserved@b:\reserved@c
- }%
- }%
- \reserved@a
-}
-\KOMA@key{footwidth}{%
- \begingroup
- \sls@split@at@iicolons#1:::\@nil
- \ifx\reserved@a\@empty \let\reserved@a\sls@footwidth\fi
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\sls@set@hf@width{foot}{\reserved@b}{\reserved@c}{\reserved@a}%
- \noexpand\FamilyKeyStateProcessed
- \noexpand\KOMA@kav@replacevalue{.scrlayer-scrpage.sty}{footwidth}{%
- \reserved@a:\reserved@b:\reserved@c
- }%
- }%
- \reserved@a
-}
-% \end{macrocode}
-% \begin{macro}{\sls@split@at@iicolons}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{description}
-% \item[\texttt{\meta{balanced}:\meta{balanced}:\meta{balanced}\cs{@nil}}:]
-% first \meta{balanced} will be stored into \cs{reserved@a}, second into
-% \cs{reserved@b}, third will be eaten and warn about if it is neither empty
-% and nor a colon.
-% \end{description}
-% This little helper is used, e.g., by options \opt{headwidth} and
-% \opt{footwidth}.
-% \begin{macrocode}
-\newcommand\sls@split@at@iicolons{}
-\def\sls@split@at@iicolons#1:#2:#3:#4\@nil{%
- \Ifstr{#4}{}{}{%
- \Ifstr{#4}{:}{}{%
- \Ifstr{#4}{::}{}{%
- \PackageWarning{scrlayer}{extra `:' found!\MessageBreak
- You've used more than two colons at the argument\MessageBreak
- of a two value option.\MessageBreak
- The extra value(s) will be ignored%
- }%
- }%
- }%
- }%
- \def\reserved@a{#1}%
- \def\reserved@b{#2}%
- \def\reserved@c{#3}%
-}%
-% \end{macrocode}
-% \end{macro}^^A \sls@split@at@iicolons
-% \begin{macro}{\sls@set@hf@width}
-% \changes{v0.9.1757}{2014/04/09}{new: two offsets available}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{description}
-% \item[\marg{head or foot}:] to complete the macro names for page head or
-% footer, either \texttt{head} or \texttt{foot}.
-% \item[\marg{special dimensional expression}:] the offset odd page
-% \item[\marg{special dimensional expression}:] the offset even page
-% \item[\marg{special dimensional expression}:] the width
-% \end{description}
-% This helper will generally set up width an offset of either head or footer.
-% \begin{macrocode}
-\newcommand*{\sls@set@hf@width}[4]{%
- \sls@settowidthof{\@tempdima}{#4}%
- \ifdim\@tempdima>\paperwidth
- \PackageWarning
- {scrlayer-scrpage}%
- {You've set width of #1 to a value\MessageBreak
- greater than width of page!\MessageBreak%
- I'll reduce width of #1 to width of page}%
- \setlength{\@tempdima}{\paperwidth}%
- \else
- \ifdim\@tempdima<\z@
- \PackageWarning
- {scrlayer-scrpage}%
- {You've set width of #1 to negative value!\MessageBreak%
- I'll set it to 0pt}%
- \setlength{\@tempdima}{\z@}%
- \fi
- \fi
- \expandafter\edef\csname sls@#1width\endcsname{\the\@tempdima}%
- \setlength{\@tempdima}{\textwidth}%
- \addtolength{\@tempdima}{-\csname sls@#1width\endcsname}%
- \Ifstr{#2}{}{%
- \ifdim \csname sls@#1width\endcsname
- = \dimexpr \textwidth+\marginparwidth+\marginparsep\relax
- \setlength{\@tempdimb}{\z@}
- \else
- \if@twoside
- \setlength{\@tempdimb}{.3333333333\@tempdima}%
- \else
- \setlength{\@tempdimb}{.5\@tempdima}%
- \fi
- \fi
- }{%
- \sls@settowidthof{\@tempdimb}{#2}%
- }%
- \Ifstr{#3}{}{%
- \addtolength{\@tempdima}{-\@tempdimb}%
- }{%
- \sls@settowidthof{\@tempdima}{#3}%
- \setlength{\@tempdima}{-\@tempdima}%
- }%
- \ifdim\@tempdimb<\z@
- \setlength{\@tempdimb}{-\@tempdimb}%
- \expandafter\edef\csname sls@odd#1shift\endcsname{-\the\@tempdimb}%
- \else
- \expandafter\edef\csname sls@odd#1shift\endcsname{\the\@tempdimb}%
- \fi
- \ifdim\@tempdima<\z@
- \setlength{\@tempdima}{-\@tempdima}%
- \expandafter\edef\csname sls@even#1shift\endcsname{-\the\@tempdima}%
- \else
- \expandafter\edef\csname sls@even#1shift\endcsname{\the\@tempdima}%
- \fi
-}%
-% \end{macrocode}
-% \end{macro}^^A \sls@set@hf@width
-% \begin{macro}{\sls@headwidth,\sls@oddheadshift,\sls@evenheadshift,
-% \sls@footwidth,\sls@oddfootshift,\sls@evenfootshift}
-% To store width and offset of page head an footer, we use macros. Those are
-% also used by the options and therefore need to be initialised before option
-% usage.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{@headwidth}{%
- \newcommand*{\sls@headwidth}{\textwidth}%
- \KOMA@kav@add{.scrlayer-scrpage.sty}{headwidth}{\textwidth:0pt:0pt}%
-}{%
- \newcommand*{\sls@headwidth}{\@headwidth}%
- \KOMA@kav@xadd{.scrlayer-scrpage.sty}{headwidth}{\@headwidth:0pt:0pt}%
-}%
-\newcommand*{\sls@oddheadshift}{0pt}
-\newcommand*{\sls@evenheadshift}{0pt}
-\scr@ifundefinedorrelax{@footwidth}{%
- \newcommand*{\sls@footwidth}{\textwidth}%
- \KOMA@kav@add{.scrlayer-scrpage.sty}{footwidth}{\textwidth:0pt:0pt}
-}{%
- \newcommand*{\sls@footwidth}{\@footwidth}%
- \KOMA@kav@xadd{.scrlayer-scrpage.sty}{footwidth}{\@footwidth:0pt:0pt}
-}%
-\newcommand*{\sls@oddfootshift}{0pt}
-\newcommand*{\sls@evenfootshift}{0pt}
-% \end{macrocode}
-% \end{macro}^^A \sls@headwidth … \sls@evenfootshift
-%
-% \begin{macro}{\sls@settowidthof,\sls@deftowidthof}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% the special dimensional expressions may be either one of the strings
-% \texttt{paper}, \texttt{text}, \texttt{marginpar},
-% \texttt{textwithmarginpar}, \texttt{head}, \texttt{foot},
-% \texttt{headtopline}, \texttt{headsepline}, \texttt{footsepline},
-% \texttt{footbotline}, or \texttt{page} or a valid dimensional
-% expression. But it cannot be both a dimensional expression using symbolic
-% values!
-% \begin{macrocode}
-\newcommand*{\sls@settowidthof}[2]{%
- \Ifstr{#2}{paper}{%
- \setlength{#1}{\paperwidth}%
- }{%
- \Ifstr{#2}{text}{%
- \setlength{#1}{\textwidth}%
- }{%
- \Ifstr{#2}{marginpar}{%
- \setlength{#1}{\dimexpr \marginparwidth+\marginparsep\relax}%
- }{%
- \Ifstr{#2}{textwithmarginpar}{%
- \setlength{#1}{\dimexpr\textwidth
- +\marginparwidth
- +\marginparsep\relax}%
- }{%
- \Ifstr{#2}{head}{%
- \setlength{#1}{\sls@headwidth}%
- }{%
- \Ifstr{#2}{foot}{%
- \setlength{#1}{\sls@footwidth}%
- }{%
- \Ifstr{#2}{headtopline}{%
- \setlength{#1}{\sls@headabove@linelength}%
- }{%
- \Ifstr{#2}{headsepline}{%
- \setlength{#1}{\sls@headbelow@linelength}%
- }{%
- \Ifstr{#2}{footsepline}{%
- \setlength{#1}{\sls@footabove@linelength}%
- }{%
- \Ifstr{#2}{footbotline}{%
- \setlength{#1}{\sls@footbelow@linelength}%
- }{%
- \Ifstr{#2}{page}{%
- \setlength{#1}{\paperwidth}%
- \begingroup
- \expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname ta@bcor\endcsname\relax\else
- \addtolength{#1}{-\ta@bcor}%
- \fi
- }{%
- \setlength{#1}{\dimexpr #2\relax}%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
- }%
-}%
-\newcommand*{\sls@deftowidthof}[2]{%
- \Ifstr{#2}{autohead}{%
- \expandafter\def\csname #1\endcsname{\sls@headwidth}%
- }{%
- \Ifstr{#2}{autofoot}{%
- \expandafter\def\csname #1\endcsname{\sls@footwidth}%
- }{%
- \sls@settowidthof{\@tempdima}{#2}%
- \expandafter\edef\csname #1\endcsname{\the\@tempdima}%
- }%
- }%
-}%
-%</options>
-% \end{macrocode}
-% \end{macro}^^A \sls@deftowidthof,\sls@settowidthof
-% \end{option}^^A footwidth
-% \end{option}^^A footheight
-%
-% \begin{command}{\setheadwidth,\setfootwidth}
-% \changes{v3.36}{2022/02/09}{warning about deprecated command}
-% For compatibility with \pkg{scrpage2}, map the commands to the options:
-% \begin{macrocode}
-%<*body>
-\newcommand*{\setheadwidth}[2][]{%
- \PackageWarning{scrlayer-scrpage}{%
- Command `\string\setheadwidth' is deprecated.\MessageBreak
- I'm using \detokenize{\KOMAoptions{headwidth=#2:#1}} instead,\MessageBreak
- and so should you do}%
- \KOMAoptions{headwidth=#2:#1}%
-}%
-\newcommand*{\setfootwidth}[2][]{%
- \PackageWarning{scrlayer-scrpage}{%
- Command `\string\setfootwidth' is deprecated.\MessageBreak
- I'm using \detokenize{\KOMAoptions{footwidth=#2:#1}} instead,\MessageBreak
- and so should you do}%
- \KOMAoptions{footwidth=#2:#1}%
-}%
-%</body>
-% \end{macrocode}
-% \end{command}^^A \setheadwidth,\setfootwidth
-%
-%
-% \subsection{Lines in page head and footer}
-%
-% The interface implements the options \opt{headtopline}, \opt{headsepline},
-% \opt{footsepline}, \opt{footbotline}, \opt{plainheadtopline},
-% \opt{plainheadsepline}, \opt{plainfootsepline}, \opt{plainfootbotline},
-% \opt{ilines}, \opt{clines}, and \opt{olines}, the commands
-% \cs{setheadtopline}, \cs{setheadsepline}, \cs{setfootsepline}, and
-% \cs{setfootbotline}, and the corresponding \KOMAScript{} font elements of
-% package \pkg{scrpage2}. Some of the options are extended to understand
-% values.
-%
-% \begin{option}{headtopline,headsepline,footsepline,footbotline}
-% \changes{v3.17}{2015/02/25}{new: store the values}
-% \begin{description}
-% \item[{\texttt{=\meta{dimensional expression}:\meta{dimensional
-% expression}}:}]
-% \end{description}\noindent
-% Define thickness and length of the a default separation line between:
-% \begin{description}
-% \item[\opt{headtopline}:] the top margin of the page and the page head.
-% \item[\opt{headsepline}:] the page head and the text area.
-% \item[\opt{footsepline}:] the text area and the page footer.
-% \item[\opt{footbotline}:] the page footer and the bottom margin.
-% \end{description}
-% Both \meta{dimensional expression} values may be omitted. In that case
-% thickness would be 0.4\,pt, and length would be the width of the page head
-% or footer. If the second argument, the length, has been omitted the
-% \texttt{:} may also be omitted.
-% \begin{macrocode}
-%<*options>
-\KOMA@key{headtopline}[:]{%
- \sls@set@values[headtopline]{head}{above}{#1}%
-}
-\KOMA@key{headsepline}[:]{%
- \sls@set@values[headsepline]{head}{below}{#1}%
-}
-\KOMA@key{footsepline}[:]{%
- \sls@set@values[footsepline]{foot}{above}{#1}%
-}
-\KOMA@key{footbotline}[:]{%
- \sls@set@values[footbotline]{foot}{below}{#1}%
-}
-% \end{macrocode}
-% \begin{macro}{\sls@set@values}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{description}
-% \item[\oarg{option name}:] either empty or the name of the option that sets
-% the line,
-% \item[\marg{head or foot}:] either \texttt{head} or \texttt{foot},
-% \item[\marg{above or below}:] either \texttt{above} or \texttt{below},
-% \item[\mmarg{dimension expression}{dimension expression}:] length an
-% thickness of a line (both are optional).
-% \end{description}
-% Helper macros for the options to set two macros by two values of one
-% option. The two values are separated by a colon.
-% \begin{macrocode}
-\newcommand*{\sls@set@values}[4][]{%
- \begingroup
- \Ifstr{#1}{}{%
- \FamilyKeyStateUnknown
- }{%
- \KOMA@set@ifkey{#1}{@tempswa}{#4}%
- }%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \if@tempswa
- \edef\reserved@b{%
- \noexpand\endgroup
- \noexpand\@namedef{sls@#2#3@linethickness}{.4pt}%
- \noexpand\@namedef{sls@#2#3@linelength}{%
- \expandafter\noexpand\csname sls@#2width\endcsname
- }%
- }%
- \else
- \def\reserved@b{%
- \endgroup
- \@namedef{sls@#2#3@linethickness}{0pt}%
- \@namedef{sls@#2#3@linelength}{0pt}%
- }%
- \fi
- \else
- \let\reserved@a\@empty
- \let\reserved@b\@empty
- \sls@split@at@colon#4::\@nil
- \ifx\reserved@a\@empty
- \def\reserved@a{\endgroup\@namedef{sls@#2#3@linethickness}{.4pt}}%
- \else
- \setlength{\@tempdima}{\dimexpr\reserved@a\relax}%
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\@namedef{sls@#2#3@linethickness}{\the\@tempdima}%
- }%
- \fi
- \ifx\reserved@b\@empty
- \def\reserved@b{%
- \reserved@a
- \@namedef{sls@#2#3@linelength}{\@nameuse{sls@#2width}}%
- }%
- \else
- \edef\reserved@b{%
- \noexpand\reserved@a
- \noexpand\sls@deftowidthof{sls@#2#3@linelength}{\reserved@b}%
- }%
- \fi
- \fi
- \reserved@b
- \FamilyKeyStateProcessed
- \Ifstr{#1}{}{}{%
- \KOMA@kav@xreplacevalue{.scrlayer-scrpage.sty}{#1}{%
- \csname sls@#2#3@linethickness\endcsname
- :\csname sls@#2#3@linelength\endcsname
- }%
- }%
-}%
-% \end{macrocode}
-% \end{macro}^^A \sls@set@values
-% \begin{macro}{\sls@split@at@colon}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{description}
-% \item[\texttt{\meta{balanced}:\meta{balanced}:\meta{balanced}\cs{@nil}}:]
-% first \meta{balanced} will be stored into \cs{reserved@a}, second into
-% \cs{reserved@b}, third will be eaten and warn about if it is neither empty
-% and nor a colon.
-% \end{description}
-% This little helper is used, e.g., by options \opt{headwidth} and
-% \opt{footwidth}.
-% \begin{macrocode}
-\newcommand*{\sls@split@at@colon}{}
-\def\sls@split@at@colon#1:#2:#3\@nil{%
- \Ifstr{#3}{}{}{%
- \Ifstr{#3}{:}{}{%
- \PackageWarning{scrlayer}{extra `:' found!\MessageBreak
- You've used more than one colon at the argument\MessageBreak
- of a two value option.\MessageBreak
- The extra value(s) will be ignored%
- }%
- }%
- }%
- \def\reserved@a{#1}%
- \def\reserved@b{#2}%
-}%
-% \end{macrocode}
-% \end{macro}^^A \sls@split@at@colon
-% \begin{macro}{\sls@headabove@linelength,\sls@headabove@linethickness,
-% \sls@headbelow@linelength,\sls@headbelow@linethickness,
-% \sls@footabove@linelength,\sls@footabove@linethickness,
-% \sls@footbelow@linelength,\sls@footbelow@linethickness}
-% To store length and thickness of the lines at the page head an footer, we
-% use macros. Those are also used by the options and therefore need to be
-% initialised before option usage.
-% \begin{macrocode}
-\newcommand*{\sls@headabove@linelength}{\sls@headwidth}%
-\newcommand*{\sls@headabove@linethickness}{0pt}%
-\KOMA@kav@xadd{.scrlayer-scrpage.sty}{headtopline}{%
- \expandafter\noexpand\sls@headabove@linethickness:%
- \expandafter\noexpand\sls@headabove@linelength
-}
-\newcommand*{\sls@headbelow@linelength}{\sls@headwidth}%
-\newcommand*{\sls@headbelow@linethickness}{0pt}%
-\KOMA@kav@xadd{.scrlayer-scrpage.sty}{headsepline}{%
- \expandafter\noexpand\sls@headbelow@linethickness:%
- \expandafter\noexpand\sls@headbelow@linelength
-}
-\newcommand*{\sls@footabove@linelength}{\sls@footwidth}%
-\newcommand*{\sls@footabove@linethickness}{0pt}%
-\KOMA@kav@xadd{.scrlayer-scrpage.sty}{footsepline}{%
- \expandafter\noexpand\sls@footabove@linethickness:%
- \expandafter\noexpand\sls@footabove@linelength
-}
-\newcommand*{\sls@footbelow@linelength}{\sls@footwidth}%
-\newcommand*{\sls@footbelow@linethickness}{0pt}%
-\KOMA@kav@xadd{.scrlayer-scrpage.sty}{footbotline}{%
- \expandafter\noexpand\sls@footbelow@linethickness:%
- \expandafter\noexpand\sls@footbelow@linelength
-}
-%</options>
-% \end{macrocode}
-% \end{macro}^^A \sls@headabove@linelength … \sls@footbelow@linethickness
-% \end{option}^^A headtopline … footbotline
-%
-% \begin{option}{plainheadtopline,plainheadsepline,
-% plainfootsepline,plainfootbotline}
-% \begin{macro}{\ifsls@plain@head@above@line,\sls@plain@head@above@linetrue,
-% \sls@plain@head@above@linefalse,
-% \ifsls@plain@head@below@line,\sls@plain@head@below@linetrue,
-% \sls@plain@head@below@linefalse,
-% \ifsls@plain@foot@above@line,\sls@plain@foot@above@linetrue,
-% \sls@plain@foot@above@linefalse,
-% \ifsls@plain@foot@below@line,\sls@plain@foot@below@linetrue,
-% \sls@plain@foot@below@linefalse}
-% \begin{description}
-% \item[\texttt{=\meta{switch value}}:]
-% \end{description}\noindent
-% While these only switches the rule on or off, we need only some switches.
-% \begin{macrocode}
-%<*options>
-\KOMA@ifkey{plainheadtopline}{sls@plain@head@above@line}%
-\KOMA@ifkey{plainheadsepline}{sls@plain@head@below@line}%
-\KOMA@ifkey{plainfootsepline}{sls@plain@foot@above@line}%
-\KOMA@ifkey{plainfootbotline}{sls@plain@foot@below@line}%
-%</options>
-% \end{macrocode}
-% \end{macro}^^A \ifsls@plain@foot@below@line … \sls@plain@foot@below@linefalse
-% \end{option}^^A plainheadtopline … plainfootbotline
-%
-% \begin{option}{ilines,clines,olines}
-% \changes{v3.17}{2015/02/25}{storing values}
-% \begin{macro}{\sls@hfline@adjust}
-% Maybe it would be more useful to be able to adjust each line on its own or
-% at most to define an offset. But \pkg{scrpage2} supports only these
-% options. At least we can set the options inside a layer or page style. This
-% may help.
-% \begin{macrocode}
-%<*options>
-\newcommand*{\sls@hfline@adjust}{0}%
-\KOMA@kav@add{.scrlayer-scrpage.sty}{ilines}{}
-\KOMA@key{ilines}[]{%
- \ifx\relax#1\relax
- \renewcommand*{\sls@hfline@adjust}{0}%
- \FamilyKeyStateProcessed
- \KOMA@kav@removekey{.scrlayer-scrpage.sty}{ilines}%
- \KOMA@kav@removekey{.scrlayer-scrpage.sty}{clines}%
- \KOMA@kav@removekey{.scrlayer-scrpage.sty}{olines}%
- \KOMA@kav@add{.scrlayer-scrpage.sty}{ilines}{}%
- \else
- \def\FamilyKeyStateProcessed{unexpected value}%
- \fi
-}
-\KOMA@key{clines}[]{%
- \ifx\relax#1\relax
- \renewcommand*{\sls@hfline@adjust}{1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@removekey{.scrlayer-scrpage.sty}{ilines}%
- \KOMA@kav@removekey{.scrlayer-scrpage.sty}{clines}%
- \KOMA@kav@removekey{.scrlayer-scrpage.sty}{olines}%
- \KOMA@kav@add{.scrlayer-scrpage.sty}{clines}{}%
- \else
- \def\FamilyKeyStateProcessed{unexpected value}%
- \fi
-}
-\KOMA@key{olines}[]{%
- \ifx\relax#1\relax
- \renewcommand*{\sls@hfline@adjust}{2}%
- \FamilyKeyStateProcessed
- \KOMA@kav@removekey{.scrlayer-scrpage.sty}{ilines}%
- \KOMA@kav@removekey{.scrlayer-scrpage.sty}{clines}%
- \KOMA@kav@removekey{.scrlayer-scrpage.sty}{olines}%
- \KOMA@kav@add{.scrlayer-scrpage.sty}{olines}{}%
- \else
- \def\FamilyKeyStateProcessed{unexpected value}%
- \fi
-}
-\KOMA@kav@add{.scrlayer-scrpage.sty}{ilines}{}
-%</options>
-% \end{macrocode}
-% \end{macro}^^A \sls@hfline@adjust
-% \end{option}^^A ilines … olines
-%
-% \begin{command}{\setheadtopline,\setheadsepline,
-% \setfootsepline,\setfootbotline}
-% \begin{description}
-% \item[\oarg{extended dimensional expression}:] the length of the line; if
-% omitted the length will use the width of the page head or footer while
-% printing the line.
-% \item[\marg{dimensional expression}:] the thickness of the line.
-% \item[\oarg{code}:] the font selection code for the line. You may use it for
-% any kind of operation, that doesn't change the position, width, height, or
-% depth, e.g., to change the colour of the line.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\setheadtopline}{\sls@setline{head}{above}}%
-\newcommand*{\setheadsepline}{\sls@setline{head}{below}}%
-\newcommand*{\setfootsepline}{\sls@setline{foot}{above}}%
-\newcommand*{\setfootbotline}{\sls@setline{foot}{below}}%
-% \end{macrocode}
-% \begin{macro}{\sls@setline}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\sls@@setline}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{macro}{\sls@@@setline}
-% \changes{v3.17}[2015/02/27]{internal use of the corresponding options}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{macro}{\sls@@@@setline}
-% \changes{v3.18}{2015/06/17}{explicit reuse of the current length}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Helper to set up the line attributes processing the parameters of the
-% commands above.
-% \begin{macrocode}
-\newcommand*\sls@setline[2]{%
- \kernel@ifnextchar[%]
- {\sls@@setline{#1}{#2}}{\sls@@@setline{#1#2}}%
-}%
-\newcommand*{\sls@@setline}{}
-\def\sls@@setline#1#2[#3]{%
- \Ifstr{#3}{auto}{%
- \sls@deftowidthof{sls@#1#2@linelength}{#3#1}%
- }{%
- \sls@deftowidthof{sls@#1#2@linelength}{#3}%
- }%
- \sls@@@setline{#1#2}%
-}%
-\newcommand*{\sls@@@setline}[2]{%
- \edef\@tempa{#2}\edef\@tempb{current}%
- \Ifstr{#2}{}{}{%
- \Ifstr{#2}{current}{}{%
- \setlength{\@tempdima}{#2}%
- \Ifstr{#1}{headabove}{%
- \KOMAExecuteOptions[.scrlayer-scrpage.sty]%
- {headtopline=\@tempdima:\csname sls@#1@linelength\endcsname}%
- }{\Ifstr{#1}{headbelow}{%
- \KOMAExecuteOptions[.scrlayer-scrpage.sty]%
- {headsepline=\@tempdima:\csname sls@#1@linelength\endcsname}%
- }{%
- \Ifstr{#1}{footabove}{%
- \KOMAExecuteOptions[.scrlayer-scrpage.sty]%
- {footsepline=\@tempdima:\csname sls@#1@linelength\endcsname}%
- }{%
- \KOMAExecuteOptions[.scrlayer-scrpage.sty]%
- {footbotline=\@tempdima:\csname sls@#1@linelength\endcsname}%
- }%
- }%
- }%
- }%
- }%
- \PackageWarning{scrlayer-scrpage}{%
- Command deprecated!\MessageBreak
- Usage of `\string\setheadtopline',
- `\string\setheadsepline',\MessageBreak
- `\string\setfootsepline', and `\string\setfootbotline'\MessageBreak
- became deprecated with scrlayer-scrpage.\MessageBreak
- You should use KOMA-Script options\MessageBreak
- `headsepline', `headtopline', `footsepline',\MessageBreak
- or `footbotline' with values\MessageBreak
- `<line thickness>:<line length>' to setup\MessageBreak
- the line length and thickness, and\MessageBreak
- `\string\setkomafont' or `\string\addtokomafont' to\MessageBreak
- setup the colour%
- }%
- \kernel@ifnextchar[%]
- {%
- \sls@@@@setline{#1}%
- }{%
- }%
-}%
-\newcommand*{\sls@@@@setline}{}
-\def\sls@@@@setline#1[#2]{%
- \Ifstr{#1}{headabove}{\setkomafont{headtopline}{#2}}{%
- \Ifstr{#1}{headbelow}{\setkomafont{headsepline}{#2}}{%
- \Ifstr{#1}{footabove}{\setkomafont{footsepline}{#2}}{%
- \setkomafont{footbotline}{#2}%
- }%
- }%
- }%
-}%
-% \end{macrocode}
-% \end{macro}^^A \sls@setline
-% \end{macro}^^A \sls@@setline
-% \end{macro}^^A \sls@@@setline
-% \end{macro}^^A \sls@@@@setline
-% \begin{fontelement}{headtopline,headsepline,footsepline,footbotline}
-% These are the font elements used in \cs{sls@hf@rule} to set the rules
-% with, i.e., another colour. Note, that those may already be defined and
-% become only part of the interface if they are not.
-% \begin{macrocode}
-\@ifundefined{scr@fnt@headtopline}{%
- \newkomafont{headtopline}{}%
-}{}
-\@ifundefined{scr@fnt@headsepline}{%
- \newkomafont{headsepline}{}%
-}{}
-\@ifundefined{scr@fnt@footsepline}{%
- \newkomafont{footsepline}{}%
-}{}
-\@ifundefined{scr@fnt@footbotline}{%
- \newkomafont{footbotline}{}%
-}{}
-%</body>
-% \end{macrocode}
-% \end{fontelement}^^A headtopline … footbotline
-% \end{command}^^A \setheadtopline … \setfootbotline
-%
-% \begin{length}{\headheight,\footheight}
-% \changes{v3.24}{2017/05/22}{warning depends on option \opt{singlespacing}}
-% Some classes set \len{headheight} to a very, very small value. We'll
-% warn about that.
-% \changes{v3.24}{2017/05/23}{also warn for low \cs{footheight}}
-% If the \len{headheight} is OK, we also test for \len{footheight}.
-% \begin{macrocode}
-%<*body>
-\AtBeginDocument{%
- \ifdim \headheight
- <\if@ps@singlespacing\f@baselineskip\else\baselineskip\fi\relax
- \PackageWarningNoLine{scrlayer-scrpage}{Very small head height
- detected!\MessageBreak
- Using scrlayer-scrpage the head height\MessageBreak
- should be at least \string\baselineskip, which is\MessageBreak
- \if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi\space
- currently.\MessageBreak
- But head height is currently
- \the\headheight\space only.\MessageBreak
- You may use\MessageBreak
- \@ifpackageloaded{geometry}{%
- geometry option
- `head=\if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi'%
- }{%
- \@ifpackageloaded{typearea}{%
- typearea option `headheight=%
- \if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi'%
- }{%
- \string\setlength{\string\headheight}%
- {\if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi}%
- }%
- }\MessageBreak
- \if@ps@singlespacing\else\ifdim \headheight<\f@baselineskip\else
- or load package `scrlayer-scrpage' with\MessageBreak
- option `singlespacing=true'\MessageBreak
- \fi\fi
- to avoid this warning%
- }%
- \else
- \ifdim \footheight
- <\if@ps@singlespacing\f@baselineskip\else\baselineskip\fi\relax
- \PackageWarningNoLine{scrlayer-scrpage}{Very small foot height
- detected!\MessageBreak
- Using scrlayer-scrpage the foot height\MessageBreak
- should be at least \string\baselineskip, which is\MessageBreak
- \if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi\space
- currently.\MessageBreak
- But foot height is currently
- \the\footheight\space only.\MessageBreak
- You may use\MessageBreak
- \@ifpackageloaded{typearea}{%
- typearea option `footheight=%
- \if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi'%
- }{%
- \string\setlength{\string\footheight}%
- {\if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi}%
- }%
- \MessageBreak
- \if@ps@singlespacing\else\ifdim \footheight<\f@baselineskip\else
- or load package `scrlayer-scrpage' with\MessageBreak
- option `singlespacing=true'\MessageBreak
- \fi\fi
- to avoid this warning%
- }%
- \fi
- \fi
-}
-%</body>
-% \end{macrocode}
-% \end{length}^^A \headheight,\footheight
-%
-%
-% \subsection{Usual \LaTeX{} kernel commands}
-%
-% \pkg*{scrlayer-scrpage} uses some very usual \LaTeX{} kernel commands, that
-% should really behave like the original \LaTeX{} kernel commands do. But some
-% packages redefine them without restoring them in the output routine before
-% the page head and foot is build. Such a redefinition could break
-% \pkg*{scrlayer-scrpage} or even provoke errors. Here we try to make sure,
-% that \pkg*{scrlayer-scrpage} uses the correct definitions. Note: This should
-% not be needed, if other packages would be more careful.
-%
-% \begin{command}{\LaTeXcentering,\LaTeXraggedright,\LaTeXraggedleft}
-% \changes{v3.27}{2019/04/05}{added}
-% \pkg*{scrlayer-scrpage} needs \cs{centering} to center, \cs{raggedright}
-% to left align and \cs{raggedleft} to right align the three elements of
-% three-part header and footer. \pkg{ragged2e} optionally redefines them. This
-% is not perfect but does not break \pkg*{scrlayer-scrpage} completely. But
-% \pkg{tabu}\footnote{Note, package \pkg{tabu} is not officially maintained by
-% anyone for several years. Unofficially some members of The \LaTeX{} Team
-% fix some problems related to new \LaTeX{} kernel changes. But the package
-% is without support for all other problems, even if they are known for
-% years. But you have to decide yourself, whether it is a good idea to use
-% such packages.} also redefines them an that breaks \pkg*{scrlayer-scrpage}
-% in a way, that even error messages can occur. So from version~3.27
-% \pkg*{scrlayer-scrpage} does not longer use \cs{centering}, \cs{raggedright}
-% or \cs{raggedleft} but \cs{LaTeXcentering}, \cs{LaTeXraggedright} and
-% \cs{LaTeXraggedleft}. With \pkg{ragged2e} and its option
-% \opt{newcommands}/\opt{NewCommands} this would be already defined and
-% contain the original definition. On all other circumstances the commands
-% have to be defined. But these commands should not be defined as part of the
-% interface or removing the interface could break other packages like
-% \pkg{ragged2e}.
-% \begin{macrocode}
-%<*body>
-\@ifundefined{LaTeXcentering}{\let\LaTeXcentering\centering}{}
-\@ifundefined{LaTeXraggedleft}{\let\LaTeXraggedleft\raggedleft}{}
-\@ifundefined{LaTeXraggedright}{\let\LaTeXraggedright\raggedright}{}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \LaTeXcentering … \LaTeXraggedright
-%
-%
-% \subsection{Style of running heads}
-%
-% This implements not only options \opt{komastyle} and \opt{standardstyle} of
-% \pkg{scrpage2}, but also activates the default style at the end of the
-% package and takes care for the correct behave of option \opt{markcase}.
-%
-% \begin{option}{pagestyleset}
-% \begin{description}
-% \item[\texttt{=\meta{string}}:] a valid name of a predefined
-% style-set. Currently only \optvalue{KOMA-Script} and \optvalue{standard}
-% are supported. Maybe more will follow.
-% \end{description}
-% Note, that the following automatic style activation must be before the
-% first option usage:
-% \begin{macrocode}
-%<*init>
-\AtEndOfPackage{%
- \sls@auto@pagestyleset%
-}
-% \end{macrocode}
-% \begin{macro}{\sls@auto@pagestyleset}
-% \changes{v0.9}{2014/01/22}{added}
-% \begin{macrocode}
-\newcommand*{\sls@auto@pagestyleset}{%
- \scr@ifundefinedorrelax{KOMAClassName}{%
-%<trace> \PackageInfoNoLine{scrlayer-scrpage}{%
-%<trace> auto-selection of `pagestyleset=standard'}%
- \FamilyExecuteOptions[.scrlayer-scrpage.sty]{KOMA}{pagestyleset=standard}%
- }{%
-%<trace> \PackageInfoNoLine{scrlayer-scrpage}{%
-%<trace> auto-selection of `pagestyleset=KOMA-Script'}%
- \FamilyExecuteOptions[.scrlayer-scrpage.sty]{KOMA}%
- {pagestyleset=KOMA-Script}%
- }%
-}
-%</init>
-% \end{macrocode}
-% \end{macro}^^A \sls@auto@pagestyleset
-% \changes{v3.17}{2015/02/25}{storing the values}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{pagestyleset}{%
- \scr@ifundefinedorrelax{sls@ps@style@#1}{%
- \FamilyKeyStateUnknownValue
- }{%
- \let\sls@auto@pagestyleset\relax
- \@nameuse{sls@ps@style@#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@replacevalue{.scrlayer-scrpage.sty}{pagestyleset}{#1}%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\sls@ps@style@standard,\sls@ps@style@KOMA-Script}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% These are the predefined page style sets.
-% \begin{macrocode}
-\newcommand*{\sls@ps@style@standard}{%
- \let\MakeMarkcase\MakeUppercase
- \scrlayer@AtEndOfPackage{%
- \pagestyle{scrheadings}%
- \clearpairofpagestyles
- \ihead{\headmark}%
- \ohead{\pagemark}%
- \cfoot[\if@twoside\else\pagemark\fi]{}%
- }%
-}%
-\expandafter\newcommand\expandafter*\csname sls@ps@style@KOMA-Script\endcsname{%
- \let\MakeMarkcase\@firstofone
- \scrlayer@AtEndOfPackage{%
- \pagestyle{scrheadings}%
- \clearpairofpagestyles
- \ohead{\if@twoside\headmark\fi}%
- \chead{\if@twoside\else\headmark\fi}%
- \ofoot[\if@twoside\pagemark\fi]{\if@twoside\pagemark\fi}%
- \cfoot[\if@twoside\else\pagemark\fi]{\if@twoside\else\pagemark\fi}%
- \scr@ifundefinedorrelax{KOMAClassName}{}{%
- \Ifstr{\KOMAClassName}{scrlttr2}{%
-% \end{macrocode}
-% We are using \cls*{scrlttr2}, so we have to initialise the page style
-% different:
-% \changes{v3.18}{2015/06/24}{missing \cs{lofoot} and \cs{rofoot} added}
-% \begin{macrocode}
- \clearpairofpagestyles
- \lehead[\ifnum\@pageat=\z@\pagemark\fi]
- {\ifnum\@pageat=\z@\pagemark\else\leftmark\fi}%
- \lohead[\ifnum\@pageat=\z@\pagemark\fi]
- {\ifnum\@pageat=\z@\pagemark\else\leftmark\fi}%
- \chead[\ifnum\@pageat=\@ne\pagemark\fi]
- {\ifcase\@pageat \rightmark\or \pagemark\or \rightmark\fi}%
- \rehead[\ifnum\@pageat=\tw@\pagemark\fi]
- {\ifcase\@pageat \leftmark\or \rightmark\or \pagemark
- \else \rightmark\fi}%
- \rohead[\ifnum\@pageat=\tw@\pagemark\fi]
- {\ifcase\@pageat \leftmark\or \rightmark\or \pagemark
- \else \rightmark\fi}%
- \lefoot[\ifnum\@pageat=\thr@@\pagemark\fi]
- {\ifnum\@pageat=\thr@@\pagemark\fi}%
- \lofoot[\ifnum\@pageat=\thr@@\pagemark\fi]
- {\ifnum\@pageat=\thr@@\pagemark\fi}%
- \cfoot[\ifnum\@pageat=4 \pagemark\fi]
- {\ifnum\@pageat=4 \pagemark\fi}%
- \refoot[\ifnum\@pageat=5 \pagemark\fi]
- {\ifnum\@pageat=5 \pagemark\fi}%
- \rofoot[\ifnum\@pageat=5 \pagemark\fi]
- {\ifnum\@pageat=5 \pagemark\fi}%
- }{}%
- }%
- }%
-}%
-%</options>
-% \end{macrocode}
-% \end{macro}^^A \sls@ps@style@standard,\sls@ps@style@KOMA-Script
-% \end{option}^^A pagestyleset
-%
-% \begin{option}{komastyle,standardstyle}
-% These options are deprecated, but defined for compatibility with
-% \pkg{scrpage2}:
-% \begin{macrocode}
-%<*options>
-\KOMA@DeclareDeprecatedOption[scrlayer-scrpage]{komastyle}{%
- pagestyleset=KOMA-Script}
-\KOMA@DeclareDeprecatedOption[scrlayer-scrpage]{standardstyle}{%
- pagestyleset=standard}
-%</options>
-% \end{macrocode}
-% \end{option}^^A komastyle,standardstyle
-%
-%
-% \subsection{Extended mark mechanisms}
-%
-% Package options \opt{markuppercase}, \opt{markusedcase}, and
-% \opt{nouppercase} of package \pkg{scrpage2} are mapped to \KOMAScript{}
-% option \opt{markcase}.
-%
-% \begin{option}{markuppercase,markusedcase,nouppercase}
-% For compatibility with \pkg{scrpage2}.
-% \begin{macrocode}
-%<*options>
-\KOMA@DeclareDeprecatedOption[scrlayer-scrpage]{markuppercase}{markcase=upper}
-\KOMA@DeclareDeprecatedOption[scrlayer-scrpage]{markusedcase}{markcase=used}
-\KOMA@DeclareDeprecatedOption[scrlayer-scrpage]{nouppercase}{%
- markcase=ignoreuppercase%
-}
-%</options>
-% \end{macrocode}
-% \end{option}^^A markuppercase … nouppercase
-%
-%
-% \subsection{Expert page style definition interface}
-%
-% This is the low level interface of \pkg{scrpage2} with \cs{defpagestyle},
-% \cs{newpagestyle}, \cs{renewpagestyle}, and \cs{providepagestyle}. We will
-% also define is. In difference to \pkg{scrpage2} layers are used. Following
-% layers will be defined for each page style:
-% \begin{description}
-% \item[\texttt{\meta{page style name}.head.above.line}] line above the head
-% \item[\texttt{\meta{page style name}.head.odd}] odd page head (only twoside)
-% \item[\texttt{\meta{page style name}.head.even}] even page head (only
-% twoside)
-% \item[\texttt{\meta{page style name}.head.oneside}] single-side head (only
-% oneside)
-% \item[\texttt{\meta{page style name}.head.below}] line below the head
-% \item[\texttt{\meta{page style name}.foot.above.line}] line above the footer
-% \item[\texttt{\meta{page style name}.foot.odd}] odd page footer (only
-% twoside)
-% \item[\texttt{\meta{page style name}.foot.even}] even side footer (only
-% twoside)
-% \item[\texttt{\meta{page style name}.foot.oneside}] single-side footer (only
-% oneside)
-% \item[\texttt{\meta{page style name}.foot.below.line}] line below the footer
-% (only oneside)
-% \end{description}
-% Note: \pkg{scrpage2} also provided star versions of the page style
-% definition commands, doing the same like the starless versions. This has
-% been done for compatibility reasons with deprecated
-% \pkg[https://www.ctan.org/pkg/koma-script-obsolete]{scrpage} and has been
-% described as to be removed some times. The layer interface doesn't support
-% this any longer.
-%
-%
-% \begin{command}{\defpagestyle}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{description}
-% \item[\marg{string}:] the name of the page style to be defined (must be
-% fully expandable and expand to a string only).
-% \item[\marg{head/foot definition}:] will be used to define the head (see
-% \cs{sls@defhead}).
-% \item[\marg{head/foot definition}:] will be used to define the foot (see
-% \cs{sls@deffoot}).
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\defpagestyle}[3]{%
- \sls@defhead{#1}#2\@empty\@empty\@empty
- \sls@deffoot{#1}#3\@empty\@empty\@empty
- \DeclarePageStyleByLayers{#1}{%
- #1.head.odd,#1.head.even,#1.head.oneside,%
- #1.head.above.line,#1.head.below.line,%
- #1.foot.odd,#1.foot.even,#1.foot.oneside,%
- #1.foot.above.line,#1.foot.below.line%
- }%
-}%
-% \end{macrocode}
-% \begin{macro}{\sls@defhead,\sls@@defhead}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\sls@@@defhead}
-% \changes{v0.9}{2014/08/18}{fixed names of layers \texttt{\dots head.odd} and
-% \texttt{\dots head.even}}
-% \begin{description}
-% \item[\pparg{dimensional expression}{dimensional expression}:] length and
-% thickness of a line (ruler) above the page head. May be omitted and if so
-% the values from option \opt{headtopline} will be used.
-% \item[\marg{code}:] will be executed on even pages; used to define the
-% contents of layer \texttt{\meta{page style name}.head.even}.
-% \item[\marg{code}:] will be executed on odd pages within two-side layout;
-% used to define the contents of layer \texttt{\meta{page style
-% name}.head.odd}.
-% \item[\marg{code}:] will be executed on single-side pages; used to define
-% the contents of layer \texttt{\meta{page style name}.head.oneside}.
-% \item[\pparg{dimensional expression}{dimensional expression}:] length and
-% thickness of a line (ruler) below the page head. May be omitted and if so
-% the values from option \opt{headsepline} will be used.
-% \end{description}
-% Helper to define the head layers.
-% \begin{macrocode}
-\newcommand*\sls@defhead[1]{%
- \kernel@ifnextchar(%)
- {\sls@@defhead{#1}}%
- {\sls@@defhead{#1}(\sls@headabove@linelength,\sls@headabove@linethickness)}%
-}%
-\newcommand*{\sls@@defhead}{}
-\def\sls@@defhead#1(#2,#3)#4#5#6{%
- \kernel@ifnextchar(%)
- {\sls@@@defhead{#1}({#2},{#3}){#4}{#5}{#6}}%
- {\sls@@@defhead{#1}%
- ({#2},{#3})%
- {#4}{#5}{#6}%
- (\sls@headbelow@linelength,\sls@headbelow@linethickness)}%
-}%
-\newcommand*{\sls@@@defhead}{}
-\def\sls@@@defhead#1(#2,#3)#4#5#6(#7,#8){%
-% \end{macrocode}
-% The lines:
-% \begin{macrocode}
- \DeclareLayer[%
- background,%
- hoffset=\sls@leftmargin{head},%
- voffset=\sls@topmargin+\dp\strutbox,%
- width=\sls@headwidth,%
- height=0pt,%
- align=bl,%
- contents={%
- {\normalfont\usekomafont{pageheadfoot}{\usekomafont{pagehead}{%
- \sls@hf@rule{headtop}{#2}{#3}}}}%
- }%
- ]{#1.head.above.line}%
- \DeclareLayer[%
- background,%
- hoffset=\sls@leftmargin{head},%
- voffset=\sls@topmargin+\headheight-\ht\strutbox+#8,%
- width=\sls@headwidth,%
- height=0pt,%
- align=tl,%
- contents={%
- {\normalfont\usekomafont{pageheadfoot}{\usekomafont{pagehead}{%
- \sls@hf@rule{headsep}{#7}{#8}}}}%
- }%
- ]{#1.head.below.line}%
-% \end{macrocode}
-% The odd side, even side and one side:
-% \changes{v3.13b}{2014/10/16}{workaround: additional group added to avoid
-% pdf\TeX{} color stack warnings}
-% \begin{macrocode}
- \DeclareLayer[%
- background,evenpage,twoside,%
- head,%
- hoffset=\sls@leftmargin{head},%
- width=\sls@headwidth,%
- contents={%
- \sls@secure@box\headheight{%
- \normalfont{\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#4}}}}}%
- ]{#1.head.even}%
- \DeclareLayer[%
- background,oddpage,twoside,%
- head,%
- hoffset=\sls@leftmargin{head},%
- width=\sls@headwidth,%
- contents={%
- \sls@secure@box\headheight{%
- \normalfont{\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#5}}}}}%
- ]{#1.head.odd}%
- \DeclareLayer[%
- background,oddpage,oneside,%
- head,%
- hoffset=\sls@leftmargin{head},%
- width=\sls@headwidth,%
- contents={%
- \sls@secure@box\headheight{%
- \normalfont{\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#6}}}}}%
- ]{#1.head.oneside}%
-}%
-% \end{macrocode}
-% \begin{macro}{\sls@deffoot,\sls@@deffoot}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\sls@@@deffoot}
-% \changes{v0.9}{2014/08/18}{fixed names of layers \texttt{\dots foot.odd} and
-% \texttt{\dots foot.even}}
-% \begin{description}
-% \item[\pparg{dimensional expression}{dimensional expression}:] length and
-% thickness of a line (ruler) above the page footer. May be omitted and if
-% so the values from option \opt{footsepline} will be used.
-% \item[\marg{code}:] will be executed on even pages; used to define the
-% contents of layer \texttt{\meta{page style name}.foot.even}.
-% \item[\marg{code}:] will be executed on odd pages within two-side layout;
-% used to define the contents of layer \texttt{\meta{page style
-% name}.foot.odd}.
-% \item[\marg{code}:] will be executed on single-side pages; used to define
-% the contents of layer \texttt{\meta{page style name}.foot.oneside}.
-% \item[\pparg{dimensional expression}{dimensional expression}:] length and
-% thickness of a line (ruler) below the page footer. May be omitted and if
-% so the values from option \opt{footbotline} will be used.
-% \end{description}
-% Helper to define the foot layers.
-% \begin{macrocode}
-\newcommand*\sls@deffoot[1]{%
- \kernel@ifnextchar(%)
- {\sls@@deffoot{#1}}%
- {\sls@@deffoot{#1}(\sls@footabove@linelength,\sls@footabove@linethickness)}%
-}%
-\newcommand*{\sls@@deffoot}{}
-\def\sls@@deffoot#1(#2,#3)#4#5#6{%
- \kernel@ifnextchar(%)
- {\sls@@@deffoot{#1}({#2},{#3}){#4}{#5}{#6}}%
- {\sls@@@deffoot{#1}%
- ({#2},{#3})%
- {#4}{#5}{#6}%
- (\sls@footbelow@linelength,\sls@footbelow@linethickness)}%
-}%
-\newcommand*{\sls@@@deffoot}{}
-\def\sls@@@deffoot#1(#2,#3)#4#5#6(#7,#8){%
-% \end{macrocode}
-% The lines:
-% \begin{macrocode}
- \DeclareLayer[%
- foreground,%
- hoffset=\sls@leftmargin{foot},%
- voffset=\sls@topmargin
- +\headheight+\headsep
- +\textheight
- +\footskip-\footheight
- +2\dp\strutbox,%
- width=\sls@footwidth,%
- height=0pt,%
- align=bl,%
- contents={%
- {\normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{%
- \sls@hf@rule{footsep}{#2}{#3}}}}%
- }%
- ]{#1.foot.above.line}%
- \DeclareLayer[%
- foreground,%
- hoffset=\sls@leftmargin{foot},%
- voffset=\sls@topmargin
- +\headheight+\headsep
- +\textheight
- +\footskip
- +2\dp\strutbox
- +#8,%
- width=\sls@footwidth,%
- height=0pt,%
- align=bl,%
- contents={%
- {\normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{%
- \sls@hf@rule{footbot}{#7}{#8}}}}%
- }%
- ]{#1.foot.below.line}%
-% \end{macrocode}
-% The odd side, even side and one side:
-% \begin{macrocode}
- \DeclareLayer[%
- foreground,evenpage,twoside,%
- foot,%
- hoffset=\sls@leftmargin{foot},%
- width=\sls@footwidth,%
- contents={%
- \sls@secure@box\footheight{%
- \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{#4}}}}%
- ]{#1.foot.even}%
- \DeclareLayer[%
- foreground,oddpage,twoside,%
- foot,%
- hoffset=\sls@leftmargin{foot},%
- width=\sls@footwidth,%
- contents={%
- \sls@secure@box\footheight{%
- \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{#5}}}}%
- ]{#1.foot.odd}%
- \DeclareLayer[%
- foreground,oddpage,oneside,%
- foot,%
- hoffset=\sls@leftmargin{foot},%
- width=\sls@footwidth,%
- contents={%
- \sls@secure@box\footheight{%
- \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{#6}}}}%
- ]{#1.foot.oneside}%
-}%
-% \end{macrocode}
-% \begin{macro}{\sls@secure@box}
-% \changes{v3.34}{2021/05/16}{\LaTeX{} team requested for additional \cs{par}}
-% \begin{description}
-% \item[\marg{length}:] a \LaTeX{} length, that gives the maximum
-% height + depth of the \meta{content}. It has to be either
-% \cs{headheight} or \cs{footheight}.
-% \item[\marg{content}:] what should be output (inside the box).
-% \end{description}
-% Note, that several length may be changed, to fit.
-% \begin{macrocode}
-\newcommand*{\sls@secure@box}[2]{%
- \begingroup
- \setbox\z@\vbox{%
- \ifsls@leavevmode\leavevmode\expandafter\ignorespaces\fi
- #2\par
- }%
- \ifdim #1<\dimexpr \ht\z@+\dp\z@\relax
- \PackageWarning{scrlayer-scrpage}{%
- \string#1 to low.\MessageBreak
- At least \the\dimexpr \ht\z@+\dp\z@\relax\space needed,\MessageBreak
- but only \the#1 found.\MessageBreak
- \ifsls@autoenlarge
- I'll enlarge \string#1, for further\MessageBreak
- processing, but you should do this yourself,\MessageBreak
- \else
- You should enlarge \string#1,\MessageBreak
- \fi
- e.g.,
- \scr@ifundefinedorrelax{geometry}{%
- \scr@ifundefinedorrelax{typearea}{%
- using\MessageBreak
- \space\space\string\setlength{\string#1}{%
- \the\dimexpr \ht\z@+\dp\z@\relax}\MessageBreak
- in your preamble%
- }{%
- setting typearea's option\MessageBreak
- `\expandafter\@gobble\string#1=\the\dimexpr \ht\z@+\dp\z@\relax'%
- }%
- }{%
- \ifx #1\headheight
- setting geometry's option\MessageBreak
- `head=\the\dimexpr \ht\z@+\dp\z@\relax'%
- \else
- using\MessageBreak
- \space\space\string\setlength{\string#1}{%
- \the\dimexpr \ht\z@+\dp\z@\relax}\MessageBreak
- in your preamble%
- \fi
- }%
- \ifsls@autoenlarge
- .\MessageBreak
- I'll also
- \ifx #1\headheight decrease \string\topmargin
- \else increase \string\footskip\fi
- \fi
- }%
- \ifsls@autoenlarge
- \@tempdima\dimexpr \ht\z@+\dp\z@\relax
- \ifx #1\headheight
- \global\advance\topmargin by \dimexpr #1-(\ht\z@+\dp\z@)\relax
- \dp\z@\dimexpr \dp\z@+\ht\z@+\dp\z@-\headheight\relax
- \else
- \global\advance\footskip by \dimexpr \ht\z@+\dp\z@-#1\relax
- \fi
- \global#1\@tempdima
- \fi
- \fi
- \usebox\z@
- \endgroup
-}%
-%</body>
-% \end{macrocode}
-% \begin{option}{hmode}
-% Switch automatically to the horizontal mode before setting a page head or
-% page footer element.
-% \begin{macrocode}
-%<*options>
-\KOMA@ifkey{hmode}{sls@leavevmode}
-%</options>
-% \end{macrocode}
-% \end{option}^^A hmode
-% \begin{option}{autoenlargeheadfoot}
-% \changes{v3.25}{2018/01/14}{added}
-% Automaticly enlarge vertical size of head or foot if the contents is to
-% large. This is the default.
-% \begin{macrocode}
-%<*options>
-\KOMA@ifkey{autoenlargeheadfoot}{sls@autoenlarge}
-\KOMAExecuteOptions{autoenlargeheadfoot=true}
-%</options>
-% \end{macrocode}
-% \end{option}^^A autoenlargeheadfoot
-% \end{macro}^^A \sls@secure@box
-% \end{macro}^^A \sls@@@deffoot
-% \end{macro}^^A \sls@deffoot,\sls@@deffoot
-% \end{macro}^^A \sls@@@defhead
-% \end{macro}^^A \sls@defhead,\sls@@defhead
-% \begin{command}{\headfont}
-% The low level page head font command. It is deprecated to redefine or use
-% this and it may already be defined.
-% \begin{macro}{\scr@fnt@pagehead}
-% \changes{v3.25}{2018/02/05}{don't use \cs{newkomafont} to avoid warning}
-% \begin{macro}{\scr@fnt@wrn@pagehead}
-% \changes{v0.9}{2014/01/13}{warning always deactivated}
-% \begin{macro}{\scr@fnt@pageheadfoot}
-% \begin{macrocode}
-%<*body>
-\@ifundefined{scr@fnt@pagehead}{%
- \scr@ifundefinedorrelax{scr@fnt@instead@pagehead}{}{%
- \PackageInfo{scrlayer-scrpage}{%
- Makeing stand-alone element `pagehead' from\MessageBreak
- alias to `pageheadfoot'%
- }%
- \let\scr@fnt@instead@pagehead\relax
- }%
- \@ifundefined{@pageheadfont}{%
- \newcommand*{\@pageheadfont}{}%
- }{}%
- \newcommand*{\scr@fnt@pagehead}{\@pageheadfont}%
-}{}
-\@ifundefined{scr@fnt@pageheadfoot}{%
- \newcommand*{\scr@fnt@pageheadfoot}{\headfont}%
- \@ifundefined{headfont}{%
- \newcommand*{\headfont}{\normalcolor\slshape}%
- }{}
-}{}
-\scr@ifundefinedorrelax{scr@fnt@wrn@pagehead}{}{%
-%<trace> \PackageInfo{scrlayer-scrpage}{%
-%<trace> deactivating warning for font element\MessageBreak
-%<trace> `pagehead'}%
- \let\scr@fnt@wrn@pagehead\relax
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@fnt@pageheadfoot
-% \end{macro}^^A \scr@fnt@wrn@pagehead
-% \end{macro}^^A \scr@fnt@pagehead
-% \end{command}^^A \headfont
-%
-% \begin{command}{\footfont}
-% The low level page footer font command. It is deprecated to redefine or use
-% this and it may already be defined.
-% \begin{macro}{\scr@fnt@pagefoot}
-% \begin{macro}{\scr@fnt@wrn@pagefoot}
-% \changes{v0.9}{2014/01/13}{warning always deactivated}
-% \begin{macrocode}
-\@ifundefined{scr@fnt@pagefoot}{%
- \def\scr@fnt@pagefoot{\footfont}%
- \@ifundefined{footfont}{%
- \newcommand*{\footfont}{}%
- }{}%
-}{}
-\scr@ifundefinedorrelax{scr@fnt@wrn@pagefoot}{}{%
-%<trace> \PackageInfo{scrlayer-scrpage}{%
-%<trace> deactivating warning for font element\MessageBreak
-%<trace> `pagefoot'}%
- \let\scr@fnt@wrn@pagefoot\relax
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@fnt@wrn@pagefoot
-% \end{macro}^^A \scr@fnt@pagefoot
-% \end{command}^^A \footfont
-%
-% \begin{macro}{\sls@hf@rule}
-% \changes{v3.34}{2021/05/16}{\LaTeX{} team requested for additional \cs{par}}
-% \begin{description}
-% \item[\marg{rule name}:] one of \texttt{headtop}, \texttt{headsep},
-% \texttt{footsep}, or \texttt{footbot}
-% \item[\marg{dimensional expression}:] the line length (width)
-% \item[\marg{dimensional expression}:] the line thickness (height)
-% \end{description}
-% Helper to draw the line.
-% \begin{macrocode}
-\newcommand*\sls@hf@rule[3]{%
- \begingroup
- \normalfont\usekomafont{#1line}{%
- \vbox to \z@{%
- \kern -\dimexpr #3\relax
- \ifnum \sls@hfline@adjust>\z@ \@tempswatrue \else \@tempswafalse\fi
- \if@twoside\ifodd\value{page}\else
- \ifnum \sls@hfline@adjust<\tw@ \@tempswatrue\else \@tempswafalse\fi
- \fi\fi
- \if@tempswa
- \hskip \z@\@plus 1fill\@minus \paperwidth
- \fi
- \vrule \@width\dimexpr #2\relax \@height\dimexpr #3\relax \@depth\z@
- \ifnum \sls@hfline@adjust<\tw@ \@tempswatrue\else \@tempswafalse\fi
- \if@twoside\ifodd\value{page}\else
- \ifnum \sls@hfline@adjust>\z@ \@tempswatrue \else \@tempswafalse\fi
- \fi\fi
- \if@tempswa
- \hskip \z@\@plus 1fill\@minus \paperwidth\null
- \fi
- \par
- }%
- }%
- \endgroup
-}%
-% \end{macrocode}
-% \end{macro}^^A \sls@hf@rule
-% \begin{macro}{\sls@topmargin,\sls@leftmargin}
-% Two simple helper macros:
-% \begin{macrocode}
-\newcommand*{\sls@topmargin}{\dimexpr\topmargin+1in\relax}%
-\newcommand*{\sls@leftmargin}[1]{%
- \dimexpr
- \if@twoside
- \ifodd\value{page}
- \oddsidemargin+\csname sls@odd#1shift\endcsname
- \else
- \evensidemargin+\csname sls@even#1shift\endcsname
- \fi
- \else
- \oddsidemargin+\csname sls@odd#1shift\endcsname
- \fi
- +1in\relax
-}%
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \sls@topmargin … \sls@leftmargin
-% \end{command}^^A \defpagestyle
-%
-% \begin{command}{\newpagestyle}
-% \changes{v3.32}{2020/09/11}{test for \pkg{titlesec}}
-% For the parameters see \cs{defpagestyle}. Define the pagestyle only, if not
-% already defined. Unfortunately \pkg{titlesec} also defines this command. So
-% new definition will fail. \textsf{titlesec} uses \cs{providecommand} so if
-% the order would be changed, everything would be OK.
-% \begin{macrocode}
-%<*body>
-\@ifpackageloaded{titlesec}{%
- \@ifundefined{newpagestyle}{}{%
- \@ifpackageloaded{titleps}{}{%
- \PackageWarningNoLine{scrlayer-scrpage}{%
- it seems that package `titlesec' is used\MessageBreak
- and has already defined `\string\newpagestyle'.\MessageBreak
- To avoid this warning message, you should\MessageBreak
- load package `titlesec' not before package\MessageBreak
- `scrlayer-scrpage'. If you need `titlesec'\MessageBreak
- you could load it after `scrlayer-scrpage',\MessageBreak
- but you still would not be able to use\MessageBreak
- the `titlesec' implemenation of\MessageBreak
- `\string\newpagestyle'%
- }%
- \let\newpagestyle\relax
- }%
- }%
-}{}
-\newcommand*\newpagestyle[3]{%
- \@ifundefined{ps@#1}{\defpagestyle{#1}{#2}{#3}}{%
- \PackageError{scrlayer-scrpage}{Page style `#1' already defined}{%
- Only not yet defined page style may be defined using
- \string\newpagestyle.\MessageBreak
- You may use either \string\renewpagestyle, \string\providepagestyle,
- or \string\defpagestyle\MessageBreak
- with already defined page styles.\MessageBreak
- If you'll continue, your command will be ignored.%
- }%
- }%
-}%
-%</body>
-% \end{macrocode}
-% \end{command}^^A \newpagestyle
-%
-% \begin{command}{\renewpagestyle}
-% \changes{v3.32}{2020/09/11}{test for \textsf{titlesec}}
-% For the parameters see \cs{defpagestyle}. Define the pagestyle only, if not
-% already defined. Unfortunately \textsf{titlesec} also defines this
-% command. So new definition will fail. \textsf{titlesec} uses
-% \cs{providecommand} so if the order would be changed, everything would be OK.
-% \begin{macrocode}
-%<*body>
-\@ifpackageloaded{titlesec}{%
- \@ifundefined{renewpagestyle}{}{%
- \@ifpackageloaded{titleps}{}{%
- \PackageWarningNoLine{scrlayer-scrpage}{%
- It seems that package `titlesec' is used\MessageBreak
- and has already defined `\string\renewpagestyle'.\MessageBreak
- To avoid this warning message, you should\MessageBreak
- load package `titlesec' not before package\MessageBreak
- `scrlayer-scrpage'. If you need `titlesec'\MessageBreak
- you could load it after `scrlayer-scrpage',\MessageBreak
- but you still would not be able to use\MessageBreak
- the `titlesec' implemenation of\MessageBreak
- `\string\renewpagestyle'%
- }%
- \let\renewpagestyle\relax
- }%
- }%
-}{}
-\newcommand*\renewpagestyle[3]{%
- \@ifundefined{ps@#1}{%
- \PackageError{scrlayer-scrpage}{Undefined page style `#1'}{%
- Only already defined page style may be re-defined using
- \string\renewpagestyle.\MessageBreak
- You may use either \string\newpagestyle, \string\providepagestyle,
- or \string\defpagestyle\MessageBreak
- with not yet defined page styles.\MessageBreak
- If you'll continue, your command will be ignored.%
- }%
- }{%
- \defpagestyle{#1}{#2}{#3}%
- }%
-}%
-%</body>
-% \end{macrocode}
-% \end{command}^^A \renewpagestyle
-%
-% \begin{command}{\providepagestyle}
-% For the parameters see \cs{defpagestyle}. Define only, if not already defined:
-% \begin{macrocode}
-%<*body>
-\newcommand*\providepagestyle[3]{%
- \@ifundefined{ps@#1}{%
- \defpagestyle{#1}{#2}{#3}%
- }{%
-%<*trace>
- \PackageInfo{scrlayer-scrpage}{%
- page style `#1' already defined.\MessageBreak
- New definition ignored%
- }%
-%</trace>
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \providepagestyle
-%
-%
-% \subsection{User page style definition interface}
-%
-% This is the mid-level interface of \pkg{scrpage2} with \cs{deftripstyle}. As
-% in \pkg{scrpage2} we simply use the expert page style definition interface
-% to define the new user interface commands. But here the useless starred
-% versions will not longer be supported. So users of them have to remove the
-% star (nothing else).
-%
-% \begin{command}{\deftriplepagestyle,\newtriplepagestyle,
-% \renewtriplepagestyle,\providetriplepagestyle}
-% \begin{description}
-% \item[\marg{string}:] the name of the page style to be defined (must be
-% fully expandable and expand to a string only).
-% \item[\oarg{dimensional expression}:] thickness of a horizontal line above
-% the page head and below the page foot (default: 0\,pt).
-% \item[\oarg{dimensional expression}:] thickness of a horizontal line below
-% the page head and above the page foot (default: 0\,pt).
-% \item[\marg{code}:] will be expanded left aligned at head of odd pages (with
-% one-side layout all pages are odd) and right aligned at head of even
-% pages.
-% \item[\marg{code}:] will be expanded centered at head of odd and even pages.
-% \item[\marg{code}:] will be expanded right aligned at head of odd pages
-% (with one-side layout all pages are odd) and left aligned at head of even
-% pages.
-% \item[\marg{code}:] will be expanded left aligned at footer of odd pages
-% (with one-side layout all pages are odd) and right aligned at footer of
-% even pages.
-% \item[\marg{code}:] will be expanded centered at footer of odd and even
-% pages.
-% \item[\marg{code}:] will be expanded right aligned at footer of odd pages
-% (with one-side layout all pages are odd) and left aligned at footer of
-% even pages.
-% \end{description}
-% \begin{macrocode}
-%<*body>
-\newcommand*{\deftriplepagestyle}[1]{%
- \let\@tempa\defpagestyle
- \scrlayer@triplestyle{#1}%
-}%
-\newcommand*{\newtriplepagestyle}[1]{%
- \let\@tempa\newpagestyle
- \scrlayer@triplestyle{#1}%
-}%
-\newcommand*{\renewtriplepagestyle}[1]{%
- \let\@tempa\renewpagestyle
- \scrlayer@triplestyle{#1}%
-}%
-\newcommand*{\providetriplepagestyle}[1]{%
- \let\@tempa\providepagestyle
- \scrlayer@triplestyle{#1}%
-}%
-% \end{macrocode}
-% \begin{macro}{\scrlayer@triplestyle,\scrlayer@@triplestyle}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\scrlayer@@@triplestyle}
-% Helpers, that do the real work. Parameters are same, but \cs{reserved@a} has
-% to be one of \cs{defpagestyle}, \cs{newpagestyle},
-% \cs{renewpagestyle}, or \cs{providepagestyle}.
-% \begin{macrocode}
-\newcommand*{\scrlayer@triplestyle}[1]{%
- \kernel@ifnextchar[%]
- {\scrlayer@@triplestyle{#1}}%
- {\scrlayer@@triplestyle{#1}[\z@]}%
-}
-\newcommand*{\scrlayer@@triplestyle}{}
-\def\scrlayer@@triplestyle#1[#2]{%
- \kernel@ifnextchar[%]
- {\scrlayer@@@triplestyle{#1}[#2]}%
- {\scrlayer@@@triplestyle{#1}[\z@][#2]}%
-}%
-\newcommand*{\scrlayer@@@triplestyle}{}
-\def\scrlayer@@@triplestyle#1[#2][#3]#4#5#6#7#8#9{%
- \@tempa{#1}{%
- (\sls@headwidth,#2)%
- {%
- \makebox[\z@][l]{#6}\hfill
- \makebox[\z@][c]{#5}\hfill
- \makebox[\z@][r]{#4}%
- }{%
- \makebox[\z@][l]{#4}\hfill
- \makebox[\z@][c]{#5}\hfill
- \makebox[\z@][r]{#6}%
- }{%
- \makebox[\z@][l]{#4}\hfill
- \makebox[\z@][c]{#5}\hfill
- \makebox[\z@][r]{#6}%
- }%
- (\sls@headwidth,#3)%
- }{%
- (\sls@footwidth,#3)%
- {%
- \makebox[\z@][l]{#9}\hfill
- \makebox[\z@][c]{#8}\hfill
- \makebox[\z@][r]{#7}%
- }{%
- \makebox[\z@][l]{#7}\hfill
- \makebox[\z@][c]{#8}\hfill
- \makebox[\z@][r]{#9}%
- }{%
- \makebox[\z@][l]{#7}\hfill
- \makebox[\z@][c]{#8}\hfill
- \makebox[\z@][r]{#9}%
- }%
- (\sls@footwidth,#2)%
- }%
-}%
-% \end{macrocode}
-% \end{macro}^^A \scrlayer@@@triplestyle
-% \end{macro}^^A \scrlayer@triplestyle,\scrlayer@@triplestyle
-% \begin{command}{deftripstyle}
-% Command \cs{deftripstyle} has been defined for compatibility with
-% \pkg{scrpage2} only. It is deprecated now.
-% The starred version \cs{deftripstyle*} is deprecated for several
-% years and hasn't been described at the manual, it will not longer be
-% defined.
-% \begin{macrocode}
-\newcommand*{\deftripstyle}{%
- \PackageWarning{scrlayer-scrpage}{%
- Command \string\deftripstyle\space is deprecate.\MessageBreak
- You should replace it by \string\deftriplepagestyle,\MessageBreak
- e.g.,%
- }%
- \let\deftripstyle\deftriplepagestyle
- \deftripstyle
-}%
-%</body>
-% \end{macrocode}
-% \end{command}^^A \deftripstyle
-% \end{command}^^A \deftriplepagestyle … \providetriplepagestyle
-%
-%
-% \subsection{Pre-defined page styles interface}
-%
-% This is the high-level interface of \pkg{scrpage2} with the page style
-% \pstyle{scrheadings}, \pstyle{scrplain}, and \pstyle{useheadings}. Those
-% will work as expected but will also be extended to support definition of
-% additional styles using the same interface.
-%
-% \begin{command}{\defpairofpagestyles}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{description}
-% \item[\oarg{string}:] name of a parent page style, that will be used to
-% initialise the new page style (must be fully expandable and expand to the
-% name of a page style).
-% \item[\marg{string}:] name the page style to be defined (must be fully
-% expandable and expand to the name of a page style).
-% \item[\marg{code}:] several commands of \cs{ihead}, \cs{chead}, \cs{ohead},
-% \cs{lehead}, \cs{lohead}, \cs{cohead}, \cs{rehead}, \cs{cehead},
-% \cs{rohead}, \cs{ifoot}, \cs{cfoot}, \cs{ofoot}, \cs{lefoot}, \cs{cefoot},
-% \cs{lofoot}, \cs{refoot}, \cs{cofoot}, \cs{rofoot}, \cs{clearscrheadfoot},
-% \cs{clearscrheadings}, \cs{clearscrplain}.
-% \end{description}
-% Two page styles will be defined using \cs{defpagestyle}, page style named
-% with the second argument and page style with the same name but an additional
-% prefix ``\pstyle{plain.}''. This will be activated automatically to be the
-% plain page style when the first page style will be used. If first argument
-% is used this pair of page styles will be used to initialise the head and
-% footer of the new. All the other commands are used to define the initial
-% fields. Note, if one of those page styles is active, all further commands
-% (see 3rd argument) depend on the active page style. If no one is active,
-% they depend on page style \pstyle{scrheadings}.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\defpairofpagestyles}[3][]{%
- \def\reserved@a##1##2##3##4##5##6##7\@nil{##1##2##3##4##5##6}%
- \edef\reserved@a{\expandafter\reserved@a #2xxxxxx\@nil}%
- \Ifstr\reserved@a{plain.}{%
- \PackageError{scrlayer-scrpage}{plain page style `#2' not allowed}{%
- You may not define a plain page style using
- \string\defpairofpagestyles, \string\newpairofpagestyles,
- \string\renewpairofpagestyles, or\MessageBreak
- \string\providepairofpagestyles. I'd suggest to simply define the
- corresponding\MessageBreak
- non-plain page style to also define the plain one.\MessageBreak
- If you'll continue, your command will be ignored.}%
- }{%
- \sls@init@pair@page@style*{#2}%
- \sls@init@pair@page@style*{plain.#2}%
- \ifx\relax #1\relax\else
- \scr@ifundefinedorrelax{sls@ps@#1@even@left@head}{%
- \PackageError{scrlayer-scrpage}{`#1' not a pair page style}{%
- Only pair page styles may be used to initialise new pairs of page
- styles. So\MessageBreak
- optional argument of \string\defpairofpagestyles,
- \string\newpairofpagestyles,\MessageBreak
- \string\renewpairofpagestyles, or \string\providepairofpagestyle has
- to be a pair\MessageBreak
- page style or should be unused.\MessageBreak
- If you'll continue, the initialisation will be ignored.}%
- }{%
- \sls@init@pair@page@style{#2}{#1}%
- \scr@ifundefinedorrelax{sls@ps@plain.#1@even@left@head}{%
- \sls@init@pair@page@style{plain.#2}{#1}%
- }{%
- \sls@init@pair@page@style{plain.#2}{plain.#1}%
- }%
- }%
- \fi
- \sls@def@pair@page@style@member{#2}%
- \AddToLayerPageStyleOptions{#2}{%
- onselect={%
-% \end{macrocode}
-% \changes{v3.15}{2015/01/08}{usage of \cs{DeclarePageStyleAlias} instead of
-% \cs{let}}
-% \begin{macrocode}
- \DeclarePageStyleAlias{plain}{plain.#2}%
- \DeclarePageStyleAlias{headings}{#2}%
- \def\sls@currentheadings{#2}%
- \def\sls@currentplain{plain.#2}%
- #3%
- }%
- }%
- \sls@def@pair@page@style@member{plain.#2}%
- \AddToLayerPageStyleOptions{plain.#2}{%
- onselect={%
-% \end{macrocode}
-% \changes{v3.15}{2015/01/08}{usage of \cs{DeclarePageStyleAlias} instead of
-% \cs{let}}
-% \begin{macrocode}
- \DeclarePageStyleAlias{plain}{plain.#2}%
- \DeclarePageStyleAlias{headings}{#2}%
- \def\sls@currentheadings{#2}%
- \def\sls@currentplain{plain.#2}%
- #3%
- },%
- oninit={%
- \expandafter
- \ifx\csname ifsls@plain@head@above@line\expandafter\endcsname
- \csname iftrue\endcsname\else
- \let\sls@headabove@linelength\z@
- \let\sls@headabove@linethickness\z@
- \fi
- \expandafter
- \ifx\csname ifsls@plain@head@below@line\expandafter\endcsname
- \csname iftrue\endcsname\else
- \let\sls@headbelow@linelength\z@
- \let\sls@headbelow@linethickness\z@
- \fi
- \expandafter
- \ifx\csname ifsls@plain@foot@above@line\expandafter\endcsname
- \csname iftrue\endcsname\else
- \let\sls@footabove@linelength\z@
- \let\sls@footabove@linethickness\z@
- \fi
- \expandafter
- \ifx\csname ifsls@plain@foot@below@line\expandafter\endcsname
- \csname iftrue\endcsname\else
- \let\sls@footbelow@linelength\z@
- \let\sls@footbelow@linethickness\z@
- \fi
- }%
- }%
- }%
-}%
-% \end{macrocode}
-% \begin{macro}{\sls@currentheadings,\sls@currentplain}
-% These little helpers will be set up at selection of each pair page style and
-% stores the last activated page style pair of the scope.
-% \begin{macrocode}
-\newcommand*\sls@currentheadings{scrheadings}%
-\newcommand*\sls@currentplain{plain.scrheadings}%
-% \end{macrocode}
-% \end{macro}^^A \sls@currentheadings,\sls@currentplain
-% \begin{macro}{\sls@init@pair@page@style}
-% \changes{v3.20}{2016/04/12}{\cs{ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\sls@init@@pair@page@style}
-% \begin{description}
-% \item[\marg{string}:] the name of the page style, that should be initialised
-% to be one member of a page style pair.
-% \item[\marg{string}:] the name of a member of a page style pair, that should
-% be used to initialise one the member of a page style pair from first
-% argument.
-% \end{description}
-% These are two little helpers for \cs{defpairofpagestyles}. The first command
-% has two starred versions. With one star the commands for the page style will
-% be initialised to \cs{@empty}, with two stars they will become
-% \LaTeX-undefined (\cs{relax}).
-%
-% Note also, that the second argument may either be the plain or the non-plain
-% member of the page style pair.
-% \begin{macrocode}
-\newcommand*{\sls@init@pair@page@style}{%
- \kernel@ifstar {%
- \kernel@ifstar {%
- \sls@let@pair@page@style\relax
- }{%
- \sls@let@pair@page@style\@empty
- }
- }{%
- \sls@init@@pair@page@style
- }%
-}%
-\newcommand*{\sls@init@@pair@page@style}[2]{%
- \expandafter\let\csname sls@ps@#1@even@left@head\expandafter\endcsname
- \csname sls@ps@#2@even@left@head\endcsname
- \expandafter\let\csname sls@ps@#1@even@middle@head\expandafter\endcsname
- \csname sls@ps@#2@even@middle@head\endcsname
- \expandafter\let\csname sls@ps@#1@even@right@head\expandafter\endcsname
- \csname sls@ps@#2@even@right@head\endcsname
- \expandafter\let\csname sls@ps@#1@odd@left@head\expandafter\endcsname
- \csname sls@ps@#2@odd@left@head\endcsname
- \expandafter\let\csname sls@ps@#1@odd@middle@head\expandafter\endcsname
- \csname sls@ps@#2@odd@middle@head\endcsname
- \expandafter\let\csname sls@ps@#1@odd@right@head\expandafter\endcsname
- \csname sls@ps@#2@odd@right@head\endcsname
- \expandafter\let\csname sls@ps@#1@even@left@foot\expandafter\endcsname
- \csname sls@ps@#2@even@left@foot\endcsname
- \expandafter\let\csname sls@ps@#1@even@middle@foot\expandafter\endcsname
- \csname sls@ps@#2@even@middle@foot\endcsname
- \expandafter\let\csname sls@ps@#1@even@right@foot\expandafter\endcsname
- \csname sls@ps@#2@even@right@foot\endcsname
- \expandafter\let\csname sls@ps@#1@odd@left@foot\expandafter\endcsname
- \csname sls@ps@#2@odd@left@foot\endcsname
- \expandafter\let\csname sls@ps@#1@odd@middle@foot\expandafter\endcsname
- \csname sls@ps@#2@odd@middle@foot\endcsname
- \expandafter\let\csname sls@ps@#1@odd@right@foot\expandafter\endcsname
- \csname sls@ps@#2@odd@right@foot\endcsname
-}%
-% \end{macrocode}
-% \end{macro}^^A \sls@init@@pair@page@style
-% \begin{macro}{\sls@let@pair@page@style}
-% \begin{description}
-% \item[\marg{command}:] a single command used to initialise the commands of
-% the page style commands.
-% \item[\marg{string}:] the name of a member of a page style pair, that should
-% be used to initialise one the member of a page style pair from first
-% argument.
-% \end{description}
-% A little helper for \cs{sls@init@pair@page@style}.
-% \begin{macrocode}
-\newcommand*{\sls@let@pair@page@style}[2]{%
- \expandafter\let\csname sls@ps@#2@even@left@head\endcsname #1%
- \expandafter\let\csname sls@ps@#2@even@middle@head\endcsname #1%
- \expandafter\let\csname sls@ps@#2@even@right@head\endcsname #1%
- \expandafter\let\csname sls@ps@#2@odd@left@head\endcsname #1%
- \expandafter\let\csname sls@ps@#2@odd@middle@head\endcsname #1%
- \expandafter\let\csname sls@ps@#2@odd@right@head\endcsname #1%
- \expandafter\let\csname sls@ps@#2@even@left@foot\endcsname #1%
- \expandafter\let\csname sls@ps@#2@even@middle@foot\endcsname #1%
- \expandafter\let\csname sls@ps@#2@even@right@foot\endcsname #1%
- \expandafter\let\csname sls@ps@#2@odd@left@foot\endcsname #1%
- \expandafter\let\csname sls@ps@#2@odd@middle@foot\endcsname #1%
- \expandafter\let\csname sls@ps@#2@odd@right@foot\endcsname #1%
-}%
-% \end{macrocode}
-% \end{macro}^^A \sls@let@pair@page@style
-% \end{macro}^^A \sls@init@pair@page@style
-% \begin{macro}{\sls@def@pair@page@style@member}
-% \changes{v3.24}{2017/05/04}{improved \textsf{bidi} compatibility}
-% \changes{v3.27}{2019/04/05}{\cs{centering} replaced by
-% \cs{LaTeXcentering}}
-% \changes{v3.27}{2019/04/05}{\cs{raggedright} replaced by
-% \cs{LaTeXraggedright}}
-% \changes{v3.27}{2019/04/05}{\cs{raggedleft} replaced by
-% \cs{LaTeXraggedleft}}
-% \begin{description}
-% \item[\marg{string}:] name of the page style to be defined.
-% \end{description}
-% A little helper for \cs{defpairofpagestyles}.
-% \begin{macrocode}
-\newcommand*{\sls@def@pair@page@style@member}[1]{%
- \defpagestyle{#1}{%
- {%
- \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@headwidth}{\LaTeXraggedright
- \strut\@nameuse{sls@ps@#1@even@left@head}\strut}}%
- \parbox{\sls@headwidth}{\LaTeXcentering
- \strut\@nameuse{sls@ps@#1@even@middle@head}\strut}%
- \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@headwidth}{\LaTeXraggedleft
- \strut\@nameuse{sls@ps@#1@even@right@head}\strut}}%
- }{%
- \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@headwidth}{\LaTeXraggedright
- \strut\@nameuse{sls@ps@#1@odd@left@head}\strut}}%
- \parbox{\sls@headwidth}{\LaTeXcentering
- \strut\@nameuse{sls@ps@#1@odd@middle@head}\strut}%
- \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@headwidth}{\LaTeXraggedleft
- \strut\@nameuse{sls@ps@#1@odd@right@head}\strut}}%
- }{%
- \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@headwidth}{\LaTeXraggedright
- \strut\@nameuse{sls@ps@#1@odd@left@head}\strut}}%
- \parbox{\sls@headwidth}{\LaTeXcentering
- \strut\@nameuse{sls@ps@#1@odd@middle@head}\strut}%
- \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@headwidth}{\LaTeXraggedleft
- \strut\@nameuse{sls@ps@#1@odd@right@head}\strut}}%
- }%
- }{%
- {%
- \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@footwidth}{\LaTeXraggedright
- \strut\@nameuse{sls@ps@#1@even@left@foot}\strut}}%
- \parbox{\sls@footwidth}{\LaTeXcentering
- \strut\@nameuse{sls@ps@#1@even@middle@foot}\strut}%
- \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@footwidth}{\LaTeXraggedleft
- \strut\@nameuse{sls@ps@#1@even@right@foot}\strut}}%
- }{%
- \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@footwidth}{\LaTeXraggedright
- \strut\@nameuse{sls@ps@#1@odd@left@foot}\strut}}%
- \parbox{\sls@footwidth}{\LaTeXcentering
- \strut\@nameuse{sls@ps@#1@odd@middle@foot}\strut}%
- \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@footwidth}{\LaTeXraggedleft
- \strut\@nameuse{sls@ps@#1@odd@right@foot}\strut}}%
- }{%
- \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@footwidth}{\LaTeXraggedright
- \strut\@nameuse{sls@ps@#1@odd@left@foot}\strut}}%
- \parbox{\sls@footwidth}{\LaTeXcentering
- \strut\@nameuse{sls@ps@#1@odd@middle@foot}\strut}%
- \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@footwidth}{\LaTeXraggedleft
- \strut\@nameuse{sls@ps@#1@odd@right@foot}\strut}}%
- }%
- }%
-}%
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \sls@def@pair@page@style@member
-% \end{command}^^A \defpairofpagestyles
-%
-% \begin{command}{\newpairofpagestyles,\renewpairofpagestyles,
-% \providepairofpagestyles}
-% See \cs{defpairofpagestyles} for the arguments.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\newpairofpagestyles}[3][]{%
- \scr@ifundefinedorrelax{ps@#2}{%
- \@ifundefined{ps@plain.#2}{\defpairofpagestyles[#1]{#2}{#3}}{%
- \PackageError{scrlayer-scrpage}{%
- Plain page style of `#2' already defined}{%
- You may only define a new pair of page styles, if neither the style
- itself\MessageBreak
- nor it's plain page style has already been defined.\MessageBreak
- You may use only \string\defpairofpagestyles\space or
- \string\providepairofpagestyles\space with partly\MessageBreak
- already defined page styles.\MessageBreak
- If you'll continue, your command will be ignored.%
- }%
- }%
- }{%
- \PackageError{scrlayer-scrpage}{%
- Page style `#2' already defined}{%
- You may only define a new pair of page styles, if neither the style
- itself\MessageBreak
- nor it's plain page style has already been defined.\MessageBreak
- You may use either \string\renewpairsofpagestyles,
- \string\defpairofpagestyles, or\MessageBreak
- \string\providepairofpagestyles\space with already defined page
- styles.\MessageBreak
- If you'll continue, your command will be ignored.%
- }%
- }%
-}%
-\newcommand*{\renewpairofpagestyles}[3][]{%
- \scr@ifundefinedorrelax{ps@#2}{%
- \PackageError{scrlayer-scrpage}{%
- Undefined page style `#2'}{%
- You may only redefine existing pairs of page styles. You may use
- either\MessageBreak
- \string\newpairsofpagestyles, \string\defpairofpagestyles, or
- \string\providepairofpagestyles\MessageBreak
- with not yet defined page styles.\MessageBreak
- If you'll continue, your command will be ignored.%
- }%
- }{%
- \@ifundefined{ps@plain.#2}{%
- \PackageError{scrlayer-scrpage}{%
- Undefined plain page style of `#2'}{%
- You may only redefine existing pairs of page styles. You may use
- either\MessageBreak
- \string\defpairofpagestyles\space or
- \string\providepairofpagestyles\space with partly already
- defined\MessageBreak
- page styles.\MessageBreak
- If you'll continue, your command will be ignored.%
- }%
- }{\defpairofpagestyles[#1]{#2}{#3}}%
- }%
-}%
-\newcommand*{\providepairofpagestyles}[3][]{%
- \scr@ifundefinedorrelax{ps@#2}{%
- \@ifundefined{ps@plain.#2}{\defpairofpagestyles[#1]{#2}{#3}}{%
-%<*trace>
- \PackageInfo{scrlayer-scrpage}{%
- Plain page style of `#2' already\MessageBreak
- defined. Definition ignored}%
-%</trace>
- }%
- }{%
-%<*trace>
- \PackageInfo{scrlayer-scrpage}{%
- Page style of `#2' already defined.\MessageBreak
- Definition ignored}%
-%</trace>
- }%
-}%
-%</body>
-% \end{macrocode}
-% \end{command}^^A \newpairofpagestyles … \providepairofpagestyles
-%
-%
-% \begin{pgstyle}{scrheading,plain.scrheadings}
-% We have one predefined pair: \texttt{scrheadings} with plain page style
-% \texttt{plain.scrheadings}.
-% \begin{macrocode}
-%<*body>
-\newpairofpagestyles{scrheadings}{}%
-% \end{macrocode}
-% \begin{pgstyle}{scrplain}
-% But with package \pkg{scrpage2}
-% the plain page style was \texttt{scrplain}. So we make a kind of alias:
-% \begin{macrocode}
-\DeclarePageStyleAlias{scrplain}{plain.scrheadings}
-%</body>
-% \end{macrocode}
-% \end{pgstyle}^^A scrplain
-% \end{pgstyle}^^A scrheadings,plain.scrheadings
-%
-%
-% \begin{command}{\ihead,\ohead,\chead,
-% \lehead,\lohead,\rehead,\rohead,\cehead,\cohead,
-% \ifoot,\ofoot,\cfoot,
-% \lefoot,\lofoot,\refoot,\rofoot,\cefoot,\cofoot}
-% \changes{v3.14}{2014/09/19}{new star version double the argument}
-% \changes{v3.20}{2016/04/12}{\cs{ifstar} replaced by \cs{kernel@ifstar}}
-% We also need macros to define the contents of the three part head and
-% foot. Each macro defines one of the part of head or foot of the
-% \emph{headings} page style member and optional of the \emph{plain} page
-% style member.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\ihead}{\kernel@ifstar {\@dblarg\@@@ihead}{\@ihead}}%
-% \end{macrocode}
-% \begin{macro}{\@ihead}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@ihead,\@@@ihead}
-% \changes{v3.27}{2019/04/05}{long}
-% Two helpers for the previous one to double the command and it's arguments.
-% \begin{macrocode}
-\newcommand*{\@ihead}{\kernel@ifnextchar[{\@@@ihead}{\@@ihead}}%
-\newcommand{\@@ihead}[1]{\rehead{#1}\lohead{#1}}%
-\newcommand{\@@@ihead}[2][]{\rehead[{#1}]{#2}\lohead[{#1}]{#2}}%
-% \end{macrocode}
-% \end{macro}^^A \@@ihead,\@@@ihead
-% \end{macro}^^A \@ihead
-% \begin{macrocode}
-\newcommand*{\ohead}{\kernel@ifstar {\@dblarg\@@@ohead}{\@ohead}}%
-% \end{macrocode}
-% \begin{macro}{\@ohead}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@ohead,\@@@ohead}
-% \changes{v3.27}{2019/04/05}{long}
-% Two helpers for the previous one to double the command and it's arguments.
-% \begin{macrocode}
-\newcommand*{\@ohead}{\kernel@ifnextchar[{\@@@ohead}{\@@ohead}}%
-\newcommand{\@@ohead}[1]{\lehead{#1}\rohead{#1}}%
-\newcommand{\@@@ohead}[2][]{\lehead[{#1}]{#2}\rohead[{#1}]{#2}}%
-% \end{macrocode}
-% \end{macro}^^A \@@ohead,\@@@ohead
-% \end{macro}^^A \@ohead
-% \begin{macrocode}
-\newcommand*{\chead}{\kernel@ifstar {\@dblarg\@@@chead}{\@chead}}%
-% \end{macrocode}
-% \begin{macro}{\@chead}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@chead,\@@@chead}
-% \changes{v3.27}{2019/04/05}{long}
-% Two helpers for the previous one to double the command and it's arguments.
-% \begin{macrocode}
-\newcommand*{\@chead}{\kernel@ifnextchar[{\@@@chead}{\@@chead}}%
-\newcommand{\@@chead}[1]{\cehead{#1}\cohead{#1}}%
-\newcommand{\@@@chead}[2][]{\cehead[{#1}]{#2}\cohead[{#1}]{#2}}%
-% \end{macrocode}
-% \end{macro}^^A \@@chead,\@@@chead
-% \end{macro}^^A \@chead
-% \begin{macrocode}
-\newcommand*{\lehead}{\sls@renewelement{even}{left}{head}}%
-\newcommand*{\lohead}{\sls@renewelement{odd}{left}{head}}%
-\newcommand*{\rehead}{\sls@renewelement{even}{right}{head}}%
-\newcommand*{\rohead}{\sls@renewelement{odd}{right}{head}}%
-\newcommand*{\cehead}{\sls@renewelement{even}{middle}{head}}%
-\newcommand*{\cohead}{\sls@renewelement{odd}{middle}{head}}%
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*{\ifoot}{\kernel@ifstar {\@dblarg\@@@ifoot}{\@ifoot}}%
-% \end{macrocode}
-% \begin{macro}{\@ifoot}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@ifoot,\@@@ifoot}
-% \changes{v3.27}{2019/04/05}{long}
-% Two helpers for the previous one to double the command and it's arguments.
-% \begin{macrocode}
-\newcommand*{\@ifoot}{\kernel@ifnextchar[{\@@@ifoot}{\@@ifoot}}%
-\newcommand{\@@ifoot}[1]{\refoot{#1}\lofoot{#1}}%
-\newcommand{\@@@ifoot}[2][]{\refoot[{#1}]{#2}\lofoot[{#1}]{#2}}%
-% \end{macrocode}
-% \end{macro}^^A \@@ifoot,\@@@ifoot
-% \end{macro}^^A \@ifoot
-% \begin{macrocode}
-\newcommand*{\ofoot}{\kernel@ifstar {\@dblarg\@@@ofoot}{\@ofoot}}%
-% \end{macrocode}
-% \begin{macro}{\@ofoot}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@ofoot,\@@@ofoot}
-% \changes{v3.27}{2019/04/05}{long}
-% Two helpers for the previous one to double the command and it's arguments.
-% \begin{macrocode}
-\newcommand*{\@ofoot}{\kernel@ifnextchar[{\@@@ofoot}{\@@ofoot}}%
-\newcommand{\@@ofoot}[1]{\lefoot{#1}\rofoot{#1}}%
-\newcommand{\@@@ofoot}[2][]{\lefoot[{#1}]{#2}\rofoot[{#1}]{#2}}%
-% \end{macrocode}
-% \end{macro}^^A \@@ofoot,\@@@ofoot
-% \end{macro}^^A \@ofoot
-% \begin{macrocode}
-\newcommand*{\cfoot}{\kernel@ifstar {\@dblarg\@@@cfoot}{\@cfoot}}%
-% \end{macrocode}
-% \begin{macro}{\@cfoot}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@cfoot,\@@@cfoot}
-% \changes{v3.27}{2019/04/05}{long}
-% Two helpers for the previous one to double the command and it's arguments.
-% \begin{macrocode}
-\newcommand*{\@cfoot}{\kernel@ifnextchar[{\@@@cfoot}{\@@cfoot}}%
-\newcommand{\@@cfoot}[1]{\cefoot{#1}\cofoot{#1}}%
-\newcommand{\@@@cfoot}[2][]{\cefoot[{#1}]{#2}\cofoot[{#1}]{#2}}%
-% \end{macrocode}
-% \end{macro}^^A \@@cfoot,\@@@cfoot
-% \end{macro}^^A \@cfoot
-% \begin{macrocode}
-\newcommand*{\lefoot}{\sls@renewelement{even}{left}{foot}}%
-\newcommand*{\lofoot}{\sls@renewelement{odd}{left}{foot}}%
-\newcommand*{\refoot}{\sls@renewelement{even}{right}{foot}}%
-\newcommand*{\rofoot}{\sls@renewelement{odd}{right}{foot}}%
-\newcommand*{\cefoot}{\sls@renewelement{even}{middle}{foot}}%
-\newcommand*{\cofoot}{\sls@renewelement{odd}{middle}{foot}}%
-% \end{macrocode}
-% \begin{macro}{\sls@renewelement}
-% \begin{macro}{\sls@@renewelement}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \changes{v3.20}{2016/04/12}{\cs{ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\sls@@@renewelement,\sls@@@@renewelement,
-% \sls@@renewplainelement}
-% \changes{v3.27}{2019/04/05}{long}
-% Little helper for several of the above commands.
-% \begin{macrocode}
-\newcommand*{\sls@renewelement}[3]{%
- \kernel@ifstar{\@dblarg{\sls@@@@renewelement{#1}{#2}{#3}}}%
- {\sls@@renewelement{#1}{#2}{#3}}%
-}%
-\newcommand*{\sls@@renewelement}[3]{%
- \kernel@ifnextchar[%]
- {\sls@@@@renewelement{#1}{#2}{#3}}%
- {\sls@@@renewelement{#1}{#2}{#3}}%
-}%
-\newcommand{\sls@@@renewelement}[4]{%
- \scr@ifundefinedorrelax{sls@ps@\sls@currentheadings @#1@#2@#3}{%
- \@namedef{sls@ps@scrheadings@#1@#2@#3}{#4}%
- }{%
- \@namedef{sls@ps@\sls@currentheadings @#1@#2@#3}{#4}%
- }%
-}%
-\newcommand*{\sls@@@@renewelement}{}
-\long\def\sls@@@@renewelement#1#2#3[#4]#5{%
- \sls@@renewplainelement{#1}{#2}{#3}{#4}%
- \sls@@@renewelement{#1}{#2}{#3}{#5}%
-}%
-\newcommand{\sls@@renewplainelement}[4]{%
- \scr@ifundefinedorrelax{sls@ps@\sls@currentplain @#1@#2@#3}{%
- \@namedef{sls@ps@plain.scrheadings@#1@#2@#3}{#4}%
- }{%
- \@namedef{sls@ps@\sls@currentplain @#1@#2@#3}{#4}%
- }%
-}%
-%</body>
-% \end{macrocode}
-% \end{macro}^^A \sls@@@renewelement … \sls@@renewplainelement
-% \end{macro}^^A \sls@@renewelement
-% \end{macro}^^A \sls@renewelement
-% \end{command}^^A \ihead … \cofoot
-%
-%
-% \begin{command}{\clearmainofpairofpagestyles}
-% \begin{command}{\clearscrheadings}
-% \changes{v3.32}{2020/09/11}{deprecation warning added}
-% Maybe you want to clear the currently defined head and foot. First
-% let's clear only scrheadings pagestyle but not scrplain pagestyle.
-% We do this simply using the already known command:
-% \begin{macrocode}
-%<*body>
-\newcommand*{\clearmainofpairofpagestyles}{%
- \ihead{}\chead{}\ohead{}\ifoot{}\cfoot{}\ofoot{}%
-}%
-\newcommand*{\clearscrheadings}{%
- \PackageWarning{scrlayer-scrpage}{%
- replacing deprecated \string\clearscrheading\space by\MessageBreak
- \string\clearmainofpairofpagestyles
- }%
- \clearmainofpairofpagestyles
-}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \clearscrheadings
-% \end{command}^^A \clearmainofpairofpagestyles
-% \begin{command}{\clearplainofpairofpagestyles}
-% \begin{command}{\clearscrplain}
-% \changes{v3.32}{2020/09/11}{deprecation warning added}
-% Now, we use the not recommended feature to set up a plain style:
-% \begin{macrocode}
-%<*body>
-\newcommand*{\clearplainofpairofpagestyles}{%
- \sls@@renewplainelement{odd}{left}{head}{}%
- \sls@@renewplainelement{odd}{right}{head}{}%
- \sls@@renewplainelement{odd}{middle}{head}{}%
- \sls@@renewplainelement{even}{left}{head}{}%
- \sls@@renewplainelement{even}{right}{head}{}%
- \sls@@renewplainelement{even}{middle}{head}{}%
- \sls@@renewplainelement{odd}{left}{foot}{}%
- \sls@@renewplainelement{odd}{right}{foot}{}%
- \sls@@renewplainelement{odd}{middle}{foot}{}%
- \sls@@renewplainelement{even}{left}{foot}{}%
- \sls@@renewplainelement{even}{right}{foot}{}%
- \sls@@renewplainelement{even}{middle}{foot}{}%
-}%
-\newcommand*{\clearscrplain}{%
- \PackageWarning{scrlayer-scrpage}{%
- replacing deprecated \string\clearscrplain\space by\MessageBreak
- \string\clearplainofpairofpagestyles
- }%
- \clearplainofpairofpagestyles
-}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \clearscrplain
-% \end{command}^^A \clearplainofpairofpagestyles
-% \begin{command}{\clearpairofpagestyles}
-% \begin{command}{\clearscrheadfoot}
-% \changes{v3.32}{2020/09/11}{deprecation warning added}
-% Last but not least we clean up both, the main and the plain:
-% \begin{macrocode}
-%<*body>
-\newcommand*{\clearpairofpagestyles}{%
- \ihead[]{}\chead[]{}\ohead[]{}\ifoot[]{}\cfoot[]{}\ofoot[]{}%
-}%
-\newcommand*{\clearscrheadfoot}{%
- \PackageWarning{scrlayer-scrpage}{%
- replacing deprecated \string\clearscrheadfoot\space by\MessageBreak
- \string\clearpairofpagestyles
- }%
- \clearpairofpagestyles
-}
-%</body>
-% \end{macrocode}
-% \end{command}^^A \clearscrheadfoot
-% \end{command}^^A \clearpairofpagestyles
-%
-%
-% \begin{pgstyle}{useheadings,plain.useheadings}
-% Not longer supported:
-% \begin{macrocode}
-%<*body>
-\newcommand*\ps@useheadings{%
- \PackageWarning{scrlayer-scrpage}{incompatible page style!\MessageBreak
- Page styles like `headings' and `plain'\MessageBreak
- are incompatible with the page styles\MessageBreak
- of scrlayer-scrpage. You shouldn't mix\MessageBreak
- them up. Therefore page style\MessageBreak
- `useheadings' is not longer provided.\MessageBreak
- Usage is deprecated and will be replaced\MessageBreak
- by `scrheadings'%
- }%
- \let\ps@useheadings\ps@scrheadings
- \ps@useheadings
-}%
-\expandafter\newcommand\expandafter*\csname ps@plain.useheadings\endcsname{%
- \@nameuse{ps@plain.scrheadings}%
-}%
-%</body>
-% \end{macrocode}
-% \end{pgstyle}^^A useheadings,plain.useheadings
-%
-% \begin{macrocode}
-%</interface>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrlayer.dtx b/macros/latex/contrib/koma-script/source/scrlayer.dtx
deleted file mode 100644
index 1a150b1cab..0000000000
--- a/macros/latex/contrib/koma-script/source/scrlayer.dtx
+++ /dev/null
@@ -1,4352 +0,0 @@
-% \iffalse^^A meta-comment
-% ======================================================================
-% scrlayer.dtx
-% Copyright (c) Markus Kohm, 2012-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrlayer.dtx 3773 2022-03-29 06:27:55Z kohm $
-%<identify>%%% (run: identify)
-%<init>%%% (run: init)
-%<options>%%% (run: options)
-%<body>%%% (run: body)
-%<final>%%% (run: final)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-29 08:27:55 +0200 (Tue, 29 Mar 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3773 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrlayer.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script package source
- }%
-\reserved@a
-%</dtx>
-%<*identify|doc>
-%<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-%<package>\ProvidesPackage{scrlayer}[%
-%<doc>\ProvidesFile{scrlayer.tex}[%
-%!KOMAScriptVersion
-%<package> package
-%</identify|doc>
-%<*dtx|identify|doc>
- (defining layers and page styles)]
-%</dtx|identify|doc>
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2012}
- \generate{\usepreamble\defaultpreamble
- \file{scrlayer.sty}{%
- \from{scrlayer.dtx}{package,scrlayer,identify}%
- \from{scrlayer.dtx}{package,scrlayer,init}%
- \from{scrlayer.dtx}{package,scrlayer,options}%
- \from{scrlayer.dtx}{package,scrlayer,body}%
- \from{scrlayer.dtx}{package,scrlayer,final}%
- \from{scrlogo.dtx}{logo}%
- }%
- }
-
- \batchinput{scrlayer-scrpage.dtx}
- \batchinput{scrlayer-notecolumn.dtx}
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
- \DocInput{scrlayer.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v0.0}{2012/01/01}{Start of new package}
-% \changes{v0.9}{2014/07/25}{User documentation removed}
-% \changes{v3.36}{2022/02/08}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/08}{require package \pkg*{scrlogo} instead of
-% defining \cs{KOMAScript}}
-% \changes{v3.36}{2022/02/08}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrlayer.dtx}
-% \title{Layers and Page Styles with \href{https://komascript.de}{\KOMAScript}
-% Package \pkg*{scrlayer}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% Usually page styles only define the page header and page footer. But with
-% \pkg*{scrlayer} page styles consist of multiple layers, that can be placed
-% everywhere in the page background or foreground.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user manuals of \pkg*{scrlayer} in the \KOMAScript{} manual,
-% either the German \file{scrguide} or the English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of \pkg*{scrlayer}}
-%
-% \begin{macrocode}
-%<*package|interface|class>
-% \end{macrocode}
-%
-% \subsection{Initialising some values before the options}
-%
-% \begin{macrocode}
-%<*init>
-% \end{macrocode}
-%
-% Initialisation before all options.
-%
-% \begin{macro}{\scrlayer@@inherited@options@cslist,
-% \scrlayer@@add@inherited@option}
-% \changes{v3.33}{2021/02/15}{added}
-% \begin{macro}{\scrlayer@do@inherited@options,
-% \scrlayer@inherit@option}
-% \changes{v3.33}{2021/02/15}{added (interface command)}
-% The options of \textsf{scrlayer} should be passed to \textsf{scrlayer} while
-% loading an interface package. We use the comma-separated-list
-% \cs{scrlayer@@inherited@options@cslist} to store all of them, so the
-% interface packages are able to process them via
-% \cs{scrlayer@do@inherited@options} which has an optional command, the
-% \texttt{KOMA} member defined by the interface package. The default of the
-% optional argument is (as usual)
-% ``\texttt{.}\cs{@currname}\texttt{.}\cs{currext}''. This option is passed to
-% the command, that is used a second argument, which is the first mandatory
-% argument.
-% Last but not least \cs{scrlayer@inherit@option} is the usual inheritance
-% function. It adds a new \texttt{KOMA} option and also removes it at the end
-% of the package. It should be used \emph{before} \cs{KOMAProcessOptions}. It
-% has three arguments: the \texttt{KOMA} member and the option name.
-%
-% With this the usual execution order of an interface package would be:
-% \begin{verbatim}
-% \RequirePackage{scrlayer}[2021/02/15]
-% \scrlayer@do@inherited@options{\scrlayer@inherit@option}
-% \end{verbatim}
-% \begin{macrocode}
-%<*package>
-\newcommand*{\scrlayer@@inherited@options@cslist}{}
-\newcommand*{\scrlayer@@add@inherited@option}[1]{%
- \ifx\scrlayer@@inherited@options@cslist\@empty
- \g@addto@macro\scrlayer@@inherited@options@cslist{#1}%
- \else
- \g@addto@macro\scrlayer@@inherited@options@cslist{,#1}%
- \fi
-}
-\newcommand*{\scrlayer@do@inherited@options}[2][.\@currname.\@currext]{%
- \@for \reserved@a:=\scrlayer@@inherited@options@cslist \do {%
- \edef\reserved@a{\unexpanded{#2}{#1}{\reserved@a}}%
- \reserved@a
- }%
-}
-\newcommand*{\scrlayer@inherit@option}[2]{%
-%<trace> \typeout{TRACE: Define key `#2' of member `#1'}%
- \DefineFamilyMember[#1]{KOMA}%
- \expandafter\let\csname KV@KOMA#1@#2\expandafter\endcsname
- \csname KV@KOMA.scrlayer.sty@#2\endcsname
- \expandafter\let\csname KV@KOMA#1@#2@default\expandafter\endcsname
- \csname KV@KOMA.scrlayer.sty@#2@default\expandafter\endcsname
- \AtEndOfPackage{%
- \RelaxFamilyKey[{#1}]{KOMA}{#2}%
- }%
-}
-\@onlypreamble\scr@do@inherited@options
-\@onlypreamble\scr@inherit@option
-%</package>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% While there are \KOMAScript{} options, we need \pkg*{scrkbase} to declare
-% them, but the interfaces also needs \pkg*{scrlayer} which already
-% includes \pkg*{scrkbase}.
-% \begin{macrocode}
-%<package>\RequirePackage{scrkbase}[2013/03/05]
-%<interface>\RequirePackage{scrlayer}
-% \end{macrocode}
-%
-%
-% \begin{macro}{\scrlayer@AtEndOfPackage}
-% Initial \cs{AtEndOfPackage}, but after end of package
-% \cs{@firstofone}.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{scrlayer@AtEndOfPackage}{%
- \AtEndOfPackage{\let\scrlayer@AtEndOfPackage\@firstofone}%
-}{%
- \ifx\scrlayer@AtEndOfPackage\@firstofone
- \AtEndOfPackage{\let\scrlayer@AtEndOfPackage\@firstofone}%
- \fi
-}
-\let\scrlayer@AtEndOfPackage\AtEndOfPackage
-% \end{macrocode}
-% \end{macro}^^A \sls@AtEndOfPackage
-%
-% \begin{macro}{\scrlayer@testunexpectedarg}
-% We'll have several \KOMAScript{} options, that didn't expect an
-% value. So we use this general helper to test the value and report an error
-% if it is not empty (or \cs{relax}).
-% \begin{macrocode}
-%<*package>
-\newcommand*{\scrlayer@testunexpectedarg}[2]{%
- \ifx\relax#2\relax\else
- \PackageError{scrlayer}{unexpected value to `#1'}{%
- Option `#1' doesn't expect any value.\MessageBreak
- If you'll continue, the value `#2' will be ignored.%
- }%
- \fi
-}
-%</package>
-% \end{macrocode}
-% \end{macro}^^A \scrlayer@testunexpectedarg
-%
-% \begin{macro}{\if@chapter,\@chaptertrue,\@chapterfalse}
-% We need this later. But it is something general. So we initialise it as
-% early as possible.
-% \begin{macrocode}
-%<*package>
-\scr@ifundefinedorrelax{if@chapter}{%
- \newif\if@chapter
- \scr@ifundefinedorrelax{chapter}{\@chapterfalse}{\@chaptertrue}%
-}{}
-% \end{macrocode}
-% \end{macro}^^A \if@chapter
-%
-% \begin{macro}{\if@mainmatter}
-% Some classes define \cs{frontmatter} or \cs{mainmatter}, but do not
-% define \cs{if@mainmatter}. But we nee some information about the matter,
-% so in that case, we add it.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{if@mainmatter}{%
- \scr@ifundefinedorrelax{mainmatter}{%
- \newif\if@mainmatter\@mainmattertrue
- }{%
- \PackageWarningNoLine{scrlayer}{%
- \string\mainmatter\space defined without
- \string\if@mainmatter!\MessageBreak
- Note, that several packages need
- \string\if@mainmatter\space\MessageBreak
- to detect whether or no the main matter has been\MessageBreak
- entered. So does scrlayer. Because of this\MessageBreak
- it will extend \string\mainmatter, now%
- }%
- \newif\if@mainmatter\@mainmattertrue
- \expandafter\def\expandafter\mainmatter\expandafter{%
- \expandafter\@mainmattertrue\mainmatter}%
- \scr@ifundefinedorrelax{frontmatter}{}{%
- \expandafter\def\expandafter\frontmatter\expandafter{%
- \expandafter\@mainmatterfalse\frontmatter}
- }%
- \scr@ifundefinedorrelax{backmatter}{}{%
- \expandafter\def\expandafter\backmatter{%
- \expandafter\@mainmatterfalse\backmattter}%
- }%
- }%
-}{}
-%</package>
-% \end{macrocode}
-% \end{macro}^^A \if@mainmatter
-%
-% \begin{macrocode}
-%</init>
-% \end{macrocode}
-%
-%
-% \subsection{Process Options}
-%
-% \begin{macrocode}
-%<*body>
-% \end{macrocode}
-%
-% The very first thing at the body is processing the options:
-% \begin{macrocode}
-%<*package|interface>
-\KOMAProcessOptions\relax
-%</package|interface>
-% \end{macrocode}
-%
-% \subsection{Body Initialisation}
-%
-% Currently not needed.
-%
-% \begin{macrocode}
-%</body>
-% \end{macrocode}
-%
-%
-% \subsection{Extended Running Heads}
-%
-% Package \pkg{scrpage2} changes and extends the running head mechanisms
-% of \LaTeX{} and the classes. Most of this are basic features an therefore
-% done already by \pkg*{scrlayer}. But not the deprecated options.
-%
-% \begin{option}{markcase}
-% \begin{description}
-% \item[\texttt{=\meta{setting}}] one of: \texttt{upper}, \texttt{lower},
-% \texttt{used}, or \texttt{ignoreuppercase}.
-% \end{description}\noindent
-% The two options \opt{markuppercase} and \opt{markusedcase} become
-% deprecated and are replace be the single option \opt{markcase}. Note,
-% that interface \pkg*{scrlayer-scrpage} has to delay this option to
-% overload case setting of option \opt{pagestyleset}.
-% \begin{macrocode}
-%<*options>
-\KOMA@key{markcase}{%
-%<interface&scrpage>\scrlayer@AtEndOfPackage{%
- \begingroup
- \KOMA@set@ncmdkey{markcase}{reserved@a}{%
- {upper}{0},{lower}{1},{used}{2},%
- {ignoreuppercase}{3},{nouppercase}{3},%
- {ignoreupper}{3},{noupper}{3}%
- }{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \aftergroup\FamilyKeyStateProcessed
- \ifnum \reserved@a>\m@ne
- \aftergroup\let\aftergroup\MakeMarkcase
- \ifcase \reserved@a
- \aftergroup\MakeUppercase
- \aftergroup\scrlayer@forceignoreuppercasefalse
- \or
- \aftergroup\MakeLowercase
- \aftergroup\scrlayer@forceignoreuppercasefalse
- \or
- \aftergroup\@firstofone
- \aftergroup\scrlayer@forceignoreuppercasefalse
- \else
- \aftergroup\scrlayer@ignoreuppercase
- \aftergroup\scrlayer@forceignoreuppercasetrue
- \fi
- \fi
- \else
- \aftergroup\FamilyKeyStateUnknownValue
- \fi
- \endgroup
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \KOMA@kav@removekey{.scrlayer.sty}{markcase}%
- \KOMA@kav@xadd{.scrlayer.sty}{markcase}{#1}%
- \fi
-%<interface&scrpage>}%
-}
-%<package>\scrlayer@@add@inherited@option{markcase}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @markcase\endcsname\relax
-%</interface&body>
-% \end{macrocode}
-% \begin{command}{\MakeMarkcase}
-% We use this instead of, e.g., \cs{MakeUppercase} for every layer! So the
-% name seams to be wrong, but it is common, so we use it here.
-% \begin{macrocode}
-%<*package&options>
-\@ifundefined{MakeMarkcase}{\let\MakeMarkcase\@firstofone}{}
-\ifx\MakeMarkcase\@firstofone
- \KOMA@kav@replacevalue{.scrlayer.sty}{markcase}{used}%
-\else\ifx\MakeMarkcase\MakeUppercase
- \KOMA@kav@replacevalue{.scrlayer.sty}{markcase}{upper}%
- \else\ifx\MakeMarkcase\MakeLowercase
- \KOMA@kav@replacevalue{.scrlayer.sty}{markcase}{lower}%
- \else\ifx\MakeMarkcase\scr@ignoreuppercase
- \KOMA@kav@replacevalue{.scrlayer.sty}{markcase}{ignoreuppercase}%
-\fi\fi\fi\fi
-% \end{macrocode}
-% \begin{macro}{\scrlayer@ignoreuppercase}
-% We span a group and set \cs{uppercase} and \cs{MakeUppercase} to
-% \cs{@firstofone}.
-% \begin{macrocode}
-\DeclareRobustCommand*{\scrlayer@ignoreuppercase}[1]{%
- \begingroup
- \let\uppercase\@firstofone
- \let\MakeUppercase\@firstofone
- \expandafter\let\csname MakeUppercase \endcsname\@firstofone
- #1%
- \endgroup
-}
-% \end{macrocode}
-% This is almost enough, but standard classes still would show upper-case
-% letters at table of contents, list of figures, list of tables, index and
-% bibliography. So we need an additional workaround.
-% \begin{macro}{\ifscrlayer@forceignoreuppercase}
-% \begin{macrocode}
-\newif\ifscrlayer@forceignoreuppercase
-%</package&options>
-% \end{macrocode}
-% \end{macro}^^A \ifscrlayer@forceignoreuppercase
-% \end{macro}^^A \scrlayer@ignoreuppercase
-% \end{command}^^A \MakeMarkcase
-% \end{option}^^A markcase
-%
-% \begin{command}{\rightfirstmark,\rightbotmark,\righttopmark}
-% \changes{v3.16}{2015/01/14}{added}
-% \cs{rightfirstmark} is simply the same like the \cs{rightmark} of the
-% \LaTeX{} kernel. \cs{rightbotmark} uses \cs{botmark} instead of
-% \cs{firstmark} and \cs{righttopmark} uses \cs{topmark}.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\rightfirstmark}{\expandafter\@rightmark\firstmark\@empty\@empty}
-\newcommand*{\rightbotmark}{\expandafter\@rightmark\botmark\@empty\@empty}
-\newcommand*{\righttopmark}{\expandafter\@rightmark\topmark\@empty\@empty}
-% \end{macrocode}
-% \end{command}^^A \rightfirstmark …
-%
-% \begin{command}{\leftfirstmark,\leftbotmark,\lefttopmark}
-% \changes{v3.16}{2015/01/14}{added}
-% \cs{leftbotmark} is simply the same like the \cs{leftmark} of the
-% \LaTeX{} kernel. \cs{leftfirstmark} uses \cs{firstmark} instead of
-% \cs{botmark} and \cs{lefttopmark} uses \cs{topmark}.
-% \begin{macrocode}
-\newcommand*{\leftfirstmark}{\expandafter\@leftmark\firstmark\@empty\@empty}
-\newcommand*{\leftbotmark}{\expandafter\@leftmark\botmark\@empty\@empty}
-\newcommand*{\lefttopmark}{\expandafter\@leftmark\topmark\@empty\@empty}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \leftfirstmark …
-%
-% \begin{command}{\headmark}
-% Inside a page style, this macro is either \cs{rightmark} or
-% \cs{leftmark}. Outside its \LaTeX-undefined and therefore it's not an
-% interface command, but has to be undefined:
-% \begin{macrocode}
-%<*package&body>
-\@ifundefined{headmark}{}{%
- \PackageWarningNoLine{scrlayer}{%
- \string\headmark\space detected!\MessageBreak
- \string\headmark\space will either be set to
- \string\rightmark\MessageBreak
- or \string\leftmark inside of page styles.\MessageBreak
- This means, that \string\headmark\space will be overwritten\MessageBreak
- at every page layer usage!\MessageBreak
- Nevertheless it will stay unchanged outside\MessageBreak
- of page layers.\MessageBreak
- I hope, this won't break your document%
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \headmark
-%
-% \begin{command}{\pagemark}
-% The page number together with its font setting. It's robust and will never
-% be part of the interface.
-% \begin{macrocode}
-%<*package&body>
-\@ifundefined{pagemark}{%
- \DeclareRobustCommand\pagemark{{\pnumfont{\thepage}}}%
-}{}%
-% \end{macrocode}
-% \begin{command}{\pnumfont}
-% \begin{macro}{\scr@fnt@pagenumber}
-% The low-level page number font command. It is deprecated to redefine or use
-% this and it may already be defined. These commands will not become part of
-% the interface!
-% \begin{macrocode}
-\@ifundefined{pnumfont}{%
- \newcommand{\pnumfont}{\normalfont}%
-}{}
-\@ifundefined{scr@fnt@pagenumber}{%
- \newcommand{\scr@fnt@pagenumber}{\pnumfont}%
-}{}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \scr@fnt@pagenumber
-% \end{command}^^A \pnumfont
-% \end{command}^^A \pagemark
-%
-% \begin{command}{\partmarkformat,\chaptermarkformat,\sectionmarkformat,
-% \GenericMarkFormat}
-% All the \cs{\dots markformat} macros of \KOMAScript{} are also
-% supported by \pkg*{scrlayer} and it uses them actively. The generic
-% definition has been moved from \cs{@seccntmarkformat} to
-% \cs{GenericMarkFormat}. This is one more difference to
-% \pkg{scrpage2}. The defaults are compatible to the standard
-% classes. These commands will not become part of the interface and other
-% interfaces should redefine them only, if they are not already defined.
-% \begin{macrocode}
-%<*package&body>
-\providecommand*{\partmarkformat}{\partname\ \thepart. \ }%
-\if@chapter
- \providecommand*{\@chapapp}{\chaptername}%
- \providecommand*{\chaptermarkformat}{\@chapapp\ \thechapter. \ }%
- \providecommand*{\sectionmarkformat}{\thesection. \ }%
-\else
- \providecommand*{\sectionmarkformat}{\GenericMarkFormat{section}}%
-\fi
-\scr@ifundefinedorrelax{@seccntmarkformat}{%
- \providecommand*{\GenericMarkFormat}{\@seccntformat}%
-}{%
- \providecommand*{\GenericMarkFormat}[1]{\@seccntmarkformat{#1}}%
-}
-%</package&body>
-% \end{macrocode}
-% Note, that the other \cs{\dots markformat} will be defined by
-% \cs{scrlayer@level@init}.
-% \end{command}^^A \partmarkformat …
-%
-% \begin{macro}{\@mkleft,\@mkright}
-% \changes{v3.25}{2017/10/13}{added to the \KOMAScript{} classes}
-% \begin{macro}{\@mkdouble}
-% \changes{v3.25}{2017/10/13}{added to the \KOMAScript{} classes}
-% \changes{v3.27a}{2019/10/17}{long definition}
-% These are new in \pkg*{scrlayer}. They may be updated, whenever
-% \cs{@mkboth} will be updated. Otherwise they get a working default
-% definition. These commands will not become part of the interface and other
-% interfaces should redefine them only, if they are not already defined.
-% \begin{macrocode}
-%<*(package|class)&body>
-\providecommand*{\@mkleft}{%
- \IfActiveMkBoth{\markleft}{\@gobble}%
-}%
-\providecommand*{\@mkright}{%
- \IfActiveMkBoth{\markright}{\@gobble}%
-}%
-\providecommand{\@mkdouble}[1]{%
- \@mkboth{#1}{#1}%
-}
-%</(package|class)&body>
-% \end{macrocode}
-% \end{macro}^^A \@mkdouble
-% \end{macro}^^A \@mkright,\@mkleft
-%
-% \begin{command}{\markleft}
-% \changes{v3.27a}{2019/10/17}{robust and long definition}
-% \begin{macro}{\@markleft}
-% \LaTeX{} itself provides \cs{markboth} and \cs{markright} but not
-% \cs{markleft}. So we add it.
-% \begin{macrocode}
-%<*package&body>
-\@ifundefined{markleft}{%
- \DeclareRobustCommand{\markleft}[1]{%
- \begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
- \expandafter\@markleft\@themark {#1}%
- \@temptokena \expandafter{\@themark}%
- \mark{\the\@temptokena}%
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi
- }%
- \providecommand{\@markleft}[3]{%
- \@temptokena {#2}%
- \unrestored@protected@xdef\@themark{{#3}{\the\@temptokena}}%
- }%
-}{}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@markleft
-% \end{command}^^A \markleft
-%
-% \begin{command}{\markdouble}
-% \changes{v3.28}{2019/10/17}{added}
-% This is easier, because it uses \cs{markboth}. So we do not need to declare
-% it robust and we can use \cs{providecommand}.
-% \begin{macrocode}
-%<*package&body>
-\providecommand{\markdouble}[1]{\markboth{#1}{#1}}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \markdouble
-%
-% \begin{option}{autooneside}
-% \begin{macro}{\ifscrlayer@autooneside}
-% Decide whether or not use the optional argument of \cs{automark} in
-% single-side layout.
-% \begin{macrocode}
-%<*options>
-%<*package>
-\KOMA@ifkey{autooneside}{scrlayer@autooneside}\scrlayer@autoonesidetrue
-\scrlayer@@add@inherited@option{autooneside}
-\KOMA@kav@replacebool{.scrlayer.sty}{autooneside}{scrlayer@autooneside}
-%</package>
-%<*interface>
-\KOMA@key{autooneside}[true]{%
- \KOMA@set@ifkey{autooneside}{scrlayer@autooneside}{#1}%
- \KOMA@kav@replacebool{.scrlayer.sty}{autooneside}{scrlayer@autooneside}%
-}
-%</interface>
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @autooneside\endcsname\relax
-%</interface&body>
-% \end{macrocode}
-% \end{macro}^^A \ifscrlayer@autooneside
-% \end{option}^^A autooneside
-%
-%
-% \begin{option}{automark}
-% \begin{option}{manualmark}
-% Maybe we will extend these options later. Currently they do almost the
-% same they do at \pkg{scrpage2}. The difference is, that single-side or
-% two-side doesn't matter here (but it does inside of the definitions of the
-% marks itself).
-%
-% \begin{description}
-% \item[ToDo:] Maybe \opt{manualmark} should become deprecated and
-% \opt{automark} should have simple values or a new option, that also
-% handles \opt{autooneside}?
-% \end{description}
-% \changes{v3.22}{2016/12/07}{prepared for classes without \cs{section} or
-% \cs{subsection}}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{automark}[]{%
- \scrlayer@testunexpectedarg{automark}{#1}%
- \scrlayer@AtEndOfPackage{%
- \if@chapter
- \scr@ifundefinedorrelax{section}{%
- \automark{chapter}%
- }{%
- \automark[section]{chapter}%
- }%
- \else
- \scr@ifundefinedorrelax{section}{%
- \automark{}%
- }{%
- \scr@ifundefinedorrelax{subsection}{%
- \automark{section}%
- }{%
- \automark[subsection]{section}%
- }
- }%
- \fi
- }%
- \FamilyKeyStateProcessed
- \KOMA@kav@removekey{.scrlayer.sty}{automark}%
- \KOMA@kav@removekey{.scrlayer.sty}{manualmark}%
- \KOMA@kav@add{.scrlayer.sty}{automark}{}%
-}
-%<package>\scrlayer@@add@inherited@option{automark}
-%</options>
-%<*interface&body>
-\expandafter\let\csname KV@KOMA.\@currname.\@currext @automark\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @automark@default\endcsname\relax
-%</interface&body>
-%<*options>
-\KOMA@key{manualmark}[]{%
- \scrlayer@testunexpectedarg{manualmark}{#1}%
- \scrlayer@AtEndOfPackage{\manualmark}%
- \FamilyKeyStateProcessed
- \KOMA@kav@removekey{.scrlayer.sty}{automark}%
- \KOMA@kav@removekey{.scrlayer.sty}{manualmark}%
- \KOMA@kav@add{.scrlayer.sty}{manualmark}{}%
-}
-%<package>\scrlayer@@add@inherited@option{manualmark}
-%</options>
-%<*interface&body>
-\expandafter\let\csname KV@KOMA.\@currname.\@currext @manualmark\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @manualmark@default\endcsname\relax
-%</interface&body>
-% \end{macrocode}
-% \end{option}^^A manualmark
-% \end{option}^^A automark
-%
-% \begin{command}{\manualmark}
-% Switch to manual marks. This resets \cs{@mkleft}, \cs{@mkright},
-% \cs{@mkdouble}, \cs{@mkboth} and the \cs{\dots mark} of all known
-% levels.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\manualmark}{%
- \begingroup
- \def\@elt##1{%
- \aftergroup\let\expandafter\aftergroup\csname ##1mark\endcsname
- \aftergroup\@gobble
- }%
- \scrlayer@level@list
- \endgroup
- \let\@mkleft\@gobble
- \let\@mkright\@gobble
- \let\@mkdouble\@gobble
- \let\@mkboth\@gobbletwo
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\automark}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} durch \cs{kernel@ifstar}
-% ersetzt}
-% \begin{macro}{\@automark}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% This is the brain knot of the game! I'll try to explain, what I'm doing:
-% First of all the new starred version of \cs{automark} doesn't reset the
-% mark commands. So it works cumulatively. This may be useful e.g. to have
-% chapter marks as long as no section marks have been made etc.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\automark}{%
- \kernel@ifstar{\@automark}{\manualmark\@automark}%
-}
-\newcommand*{\@automark}[2][]{%
- \Ifstr{#2}{}{%
- \Ifstr{#1}{}{%
-% \end{macrocode}
-% \cs{automark[]{}} or \cs{automark{}} has been used. This will activate
-% the low level mark commands, but doesn't change the high level commands. It
-% may be useful or may not, the user should know what he does:
-% \begin{macrocode}
- \automark@basics
- }{%
-% \end{macrocode}
-% \cs{automark[\dots]{}} has been used. This will activate the higher level
-% mark commands and also set up the right mark
-% \begin{macrocode}
- \automark@basics
- \automark@righthigh{#1}%
- }%
- }{%
- \Ifstr{#1}{}{%
-% \end{macrocode}
-% \cs{automark[]{\dots}} or \cs{automark{\dots}} has been used. This
-% will activate the low level mark commands and also set up either the left or
-% both marks.
-% \begin{macrocode}
- \automark@basics
- \automark@leftlow{#2}%
- }{%
-% \end{macrocode}
-% \cs{automark[\dots]{\dots}} has been used. This will activate the low
-% level mark commands and also both high level marks.
-% \begin{macrocode}
- \automark@basics
- \automark@both{#1}{#2}%
- }%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\automark@basics}
-% Activate all low level \cs{@mk\dots} commands:
-% \begin{macrocode}
-\newcommand*{\automark@basics}{%
- \let\@mkleft\markleft
- \let\@mkright\markright
- \let\@mkboth\markboth
- \def\@mkdouble##1{\@mkboth{##1}{##1}}%
-}
-% \end{macrocode}
-% \end{macro}^^A \automark@basics
-% \begin{macro}{\automark@righthigh}
-% Set up the right mark of a higher level, but in single-side layout only if
-% \opt{autooneside} hasn't been used. Note, that with this definition no
-% special handling for \KOMAScript's \cs{addchap} and \cs{addsec} is
-% needed.
-% \begin{macrocode}
-\newcommand*{\automark@righthigh}[1]{%
- \ifscrlayer@level@prepared{#1}{%
- \expandafter\def\csname #1mark\endcsname##1{%
- \begingroup
- \@tempswafalse
- \if@twoside\@tempswatrue
- \else\ifscrlayer@autooneside\else\@tempswatrue\fi\fi
- \expandafter\endgroup
- \if@tempswa
- \@mkright{%
- \MakeMarkcase{%
- \ifnum \c@secnumdepth<\numexpr \csname #1numdepth\endcsname +0\relax
- \else\if@mainmatter \csname #1markformat\endcsname\fi\fi
- ##1%
- }%
- }%
- \fi
- }%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}^^A \automark@righthigh
-% \begin{macro}{\automark@leftlow}
-% Set up the left mark of a low level, but in single-side layout the right
-% mark has to be used.
-% \begin{macrocode}
-\newcommand*{\automark@leftlow}[1]{%
- \ifscrlayer@level@prepared{#1}{%
- \expandafter\def\csname #1mark\endcsname ##1{%
- \if@twoside
-% \end{macrocode}
-% In two-side mode the left high mark has also to clear the right low
-% mark. This would be unwanted, if the left mark is a low mark and the right
-% mark is a high mark. But we cannot detect this if no right mark level has
-% been given. So we simply use:
-% \begin{macrocode}
- \expandafter\@mkboth
- \else
-% \end{macrocode}
-% In single-side mode there's no left high mark without a right low mark. So
-% instead of only a left high mark, we set up both marks.
-% \changes{v3.27}{2019/07/25}{replaced \cs{@empty} by \texttt{\{\}} to avoid
-% \textsf{babel} issue}
-% \begin{macrocode}
- \expandafter\@mkdouble
- \fi
- {%
- \MakeMarkcase{%
- \ifnum \c@secnumdepth<\numexpr \csname #1numdepth\endcsname +0\relax
- \else\if@mainmatter \csname #1markformat\endcsname\fi\fi
- ##1%
- }%
- }{}%
- }%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}^^A \automark@leftlow
-% \begin{macro}{\automark@both}
-% Set up both marks, but in single-side layout depending on
-% \opt{autooneside}.
-% \begin{macrocode}
-\newcommand*{\automark@both}[2]{%
- \ifscrlayer@level@prepared{#1}{%
- \ifscrlayer@level@prepared{#2}{%
- \ifnum \numexpr \csname #1numdepth\endcsname +0\relax
- > \numexpr \csname #2numdepth\endcsname +0\relax
-% \end{macrocode}
-% Level of left mark is greater than level of right mark. e.g., section >
-% chapter. This is unusual. Nevertheless we'll handle it.
-% \begin{macrocode}
- \automark@leftlow{#2}%
- \automark@righthigh{#1}%
- \else \ifnum \numexpr \csname #1numdepth\endcsname +0\relax
- = \numexpr \csname #2numdepth\endcsname +0\relax
-% \end{macrocode}
-% Level of left mark is equal to level of right mark. This is
-% nice and very easy to handle.
-% \begin{macrocode}
- \expandafter\def\csname #2mark\endcsname##1{%
- \@mkdouble{%
- \MakeMarkcase{%
- \ifnum \c@secnumdepth<\numexpr
- \csname #2numdepth\endcsname +0\relax
- \else
- \if@mainmatter \csname #2markformat\endcsname\fi
- \fi
- ##1%
- }%
- }%
- }%
- \else
-% \end{macrocode}
-% Level of left mark is less than level of right mark. This is
-% usual.
-% \begin{macrocode}
- \expandafter\def\csname #1mark\endcsname##1{%
- \begingroup
- \@tempswafalse
- \if@twoside\@tempswatrue
- \else\ifscrlayer@autooneside\else\@tempswatrue\fi\fi
- \expandafter\endgroup
- \if@tempswa
- \@mkleft{%
- \MakeMarkcase{%
- \ifnum \c@secnumdepth
- < \numexpr\csname #1numdepth\endcsname +0\relax
- \else
- \if@mainmatter \csname #1markformat\endcsname\fi
- \fi
- ##1%
- }%
- }%
- \fi
- }%
- \expandafter\def\csname #2mark\endcsname##1{%
- \@mkboth{}{%
- \MakeMarkcase{%
- \ifnum \c@secnumdepth
- < \numexpr \csname #2numdepth\endcsname +0\relax
- \else\if@mainmatter \csname #2markformat\endcsname\fi\fi
- ##1%
- }%
- }%
- }%
- \fi
- \fi
- }{}%
- }{}%
-}
-% \end{macrocode}
-% \begin{macro}{\ifscrlayer@level@prepared}
-% Test, whether or not this level has been prepared.
-% \begin{macrocode}
-\newcommand*{\ifscrlayer@level@prepared}[1]{%
- \typeout{1: \detokenize{#1}}%
- \scr@ifundefinedorrelax{#1numdepth}{%
- \PackageError{scrlayer}{numbering depth of `#1' unknown}{%
- Someone told me to use a section mark for level `#1',\MessageBreak
- but the numbering depth hasn't been declared before. You may solve this
- using\MessageBreak
- \string\DeclareSectionNumberDepth{#1}{NUMBER}.%
- }%
- \@secondoftwo
- }{%
- \@firstoftwo
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \ifscrlayer@level@prepared
-% \end{macro}^^A \automark@both
-% \end{macro}^^A \@automark
-% \end{command}^^A \automark
-%
-% \begin{command}{\DeclareSectionNumberDepth}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{description}
-% \item[\marg{string}:] the name of the section level, e.g.,
-% part, chapter, section etc. (must be fully
-% expandable and expand to a string).
-% \item[\marg{numeric expression}:] the section number depth of the
-% level, e.g., -1 for part, 0 for chapter etc.
-% \end{description}
-% Note that levels part, chapter, section, subsection, sub\dots subsection,
-% paragraph, subparagraph, sub\dots subparagraph, minisec, subminisec,
-% sub\dots subminisec will be recognised either at load time or at
-% \cs{begin}\texttt\{\env{document}\texttt\} automatically if they have the
-% usual levels.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\DeclareSectionNumberDepth}[2]{%
- \expandafter\edef\csname #1numdepth\endcsname{\the\numexpr #2\relax}%
- \@ifundefined{#1mark}{%
- \expandafter\let\csname #1mark\endcsname\@gobble
- }{}%
- \@ifundefined{#1markformat}{%
- \@namedef{#1markformat}{\GenericMarkFormat{#1}}%
- }{}%
- \begingroup
- \@tempswatrue
- \def\@elt##1{\Ifstr{#1}{##1}{\@tempswafalse}{}}%
- \scrlayer@level@list
- \if@tempswa
- \aftergroup\@firstofone
- \else
- \aftergroup\@gobble
- \fi
- \endgroup
- {%
- \l@addto@macro\scrlayer@level@list{\@elt{#1}}%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\scrlayer@level@list,\scrlayer@level@init}
-% Stores all the existing levels.
-% \begin{macrocode}
-\newcommand*{\scrlayer@level@list}{}
-% \end{macrocode}
-% Usually all levels are known on loading this package, but if a package
-% defines additional levels later we'll do an additional test at
-% \cs{begin}\texttt\{\env{document}\texttt\}. But we do not redo the part and
-% the chapter test.
-% \begin{macrocode}
-\scr@ifundefinedorrelax{part}{}{%
- \DeclareSectionNumberDepth{part}{-1}%
-}
-\if@chapter
- \DeclareSectionNumberDepth{chapter}{0}%
-\fi
-\newcommand*{\scrlayer@level@init}{%
- \@tempcnta=1
- \def\reserved@b##1{%
- \@tempswatrue
- \def\reserved@a{##1}%
- \@whilesw \if@tempswa \fi {%
- \scr@ifundefinedorrelax{\reserved@a}{%
- \@tempswafalse
- }{%
- \@ifundefined{\reserved@a numdepth}{%
- \expandafter\DeclareSectionNumberDepth
- \expandafter{\reserved@a}{\@tempcnta}%
- }{%
- \expandafter\DeclareSectionNumberDepth
- \expandafter{\reserved@a}{\csname \reserved@a numdepth\endcsname}%
- }%
- \advance \@tempcnta by \@ne
- \edef\reserved@a{sub\reserved@a}%
- }%
- }%
- }%
- \reserved@b{section}%
- \reserved@b{paragraph}%
- \reserved@b{minisec}%
-}
-\scrlayer@level@init
-\AtBeginDocument{%
- \scrlayer@level@init
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \scrlayer@level@init,\scrlayer@level@list
-% \end{command}^^A DeclareSectionNumberDepth
-%
-%
-% \subsection{Providing Layers}
-%
-% A layer is a virtual sheet of paper stacked behind or above the real sheet
-% of paper. All the virtual and real sheets of one page may been seen
-% simultanous, but material o one sheet may overlap material on sheets below.
-% Layers provided by \pkg*{scrlayer} will not be stacked below or above
-% real sheets unless they are used by a page style.
-%
-% While we use \meta{key}\texttt{=}\meta{value} arguments for several of the
-% layer commands we define a new family with a new member:
-% \begin{macrocode}
-%<*package&body>
-\DefineFamily{KOMAarg}
-\DefineFamilyMember[.definelayer]{KOMAarg}
-%</package&body>
-% \end{macrocode}
-%
-% \begin{command}{\DeclareLayer}
-% \begin{description}
-% \item[\oarg{option list}:] a comma separated list of
-% \texttt{\meta{key}=\meta{value}} pairs.
-% \item[\marg{string}:] the name of the layer (must be fully expandable
-% and expand to a string only).
-% \end{description}
-% Layers are the basic elements of page styles. A layer has a name and several
-% attributes. The attributes may be set as comma separated list at the first,
-% optional argument of \cs{DeclareLayer}. The name must be set by the second,
-% mandatory argument.
-% \begin{macro}{\def@scr@l@pos}
-% And a second helper macro to easily define $x, y, w, h$ of a layer.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\def@scr@l@pos}[4]{%
- \@namedef{scr@l@\scr@current@layer @x}{#1}%
- \@namedef{scr@l@\scr@current@layer @y}{#2}%
- \@namedef{scr@l@\scr@current@layer @w}{#3}%
- \@namedef{scr@l@\scr@current@layer @h}{#4}%
-}
-% \end{macrocode}
-% \end{macro}^^A \def@scr@l@pos
-%
-% There are basic, primitive attributes and compounding attributes. The basic
-% attributes are:
-% \begin{description}
-% \item[\texttt{mode=\meta{command sequence}}:] the mode that should be used
-% to output the \texttt{contents}. A command \cs{layer\meta{command
-% sequence}mode} with one argument need to be defined.
-% \changes{v3.19}{2015/07/30}{new layer attribute \texttt{mode}}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{mode}{%
- \scr@ifundefinedorrelax{layer#1mode}{\FamilyKeyStateUnknownValue}{%
- \@namedef{scr@l@\scr@current@layer @mode}{#1}%
- \FamilyKeyStateProcessed
- }%
-}
-% \end{macrocode}
-% \item[\texttt{hoffset=\meta{dimension expression}}:] offset from the left
-% edge of the paper.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{hoffset}{%
- \@namedef{scr@l@\scr@current@layer @x}{\dimexpr #1\relax}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \item[\texttt{voffset=\meta{dimension expression}}:] offset from the top
-% edge of the paper.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{voffset}{%
- \@namedef{scr@l@\scr@current@layer @y}{\dimexpr #1\relax}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \item[\texttt{width=\meta{dimension expression}}:] width of the layer.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{width}{%
- \@namedef{scr@l@\scr@current@layer @w}{\dimexpr #1\relax}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \item[\texttt{height=\meta{dimension expression}}:] height of the layer.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{height}{%
- \@namedef{scr@l@\scr@current@layer @h}{\dimexpr #1\relax}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \item[\texttt{align=\meta{specification}}:] horizontal and vertical
-% alignment of the layer. The \meta{specification} will interpreted
-% character by character with the following valid characters:
-% \begin{itemize}
-% \item[l] -- align the layer with its left edge to the given horizontal
-% offset. This means, that the layer's width will span right from the
-% given horizontal offset.
-% \item[r] -- align the layer with its right edge to the given horizontal
-% offset. This means, that the layer's width will span left from the given
-% horizontal offset.
-% \item[c] -- align the layer centered to the given horizontal and vertical
-% offset. This means, that the given offsets are at the middle of the
-% layer width and total height.
-% \item[t] -- align the layer with its top edge to the given vertical
-% offset. This means that the layer's contents will span below the given
-% vertical offset.
-% \item[b] -- align the layer with its bottom edge to the given vertical
-% offset. This means, that the layer's contents will span above the given
-% vertical offset.
-% \end{itemize}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{align}{%
- \@namedef{scr@l@\scr@current@layer @align}{#1}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \item[\texttt{contents=\meta{output}}:] whatever should be printed by the
-% layer.
-% \changes{v3.14}{2014/10/20}{\texttt{contents} is \cs{long}}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{contents}{%
- \long\@namedef{scr@l@\scr@current@layer @contents}{#1}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \item[\texttt{background}:] restrict the layer to the page
-% background. This means, that the main contents of the page may overprint
-% the contents of the layer. Note, that this attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{background}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{background}{#1}%
- \csname @scr@l@\scr@current@layer @backgroundtrue\endcsname
- \csname @scr@l@\scr@current@layer @foregroundfalse\endcsname
-}
-% \end{macrocode}
-% \item[\texttt{foreground}:] restrict the layer to the page
-% foreground. This means, that the layer's contents may overprint the main
-% contents of the page. Note, that this attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{foreground}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{foreground}{#1}%
- \csname @scr@l@\scr@current@layer @backgroundfalse\endcsname
- \csname @scr@l@\scr@current@layer @foregroundtrue\endcsname
-}
-% \end{macrocode}
-% \item[\texttt{backandforeground}:] not really useful, but the counterpart of
-% the restrictions above.
-% \changes{v3.18}{2015/05/14}{new layer feature \texttt{backandforeground}}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{backandforeground}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{backandforeground}{#1}%
- \csname @scr@l@\scr@current@layer @backgroundtrue\endcsname
- \csname @scr@l@\scr@current@layer @foregroundtrue\endcsname
-}
-% \end{macrocode}
-% \item[\texttt{oddpage}:] restrict the layer to odd pages only. At
-% two-sided layout only pages with odd page numbers are odd pages. At
-% single-sided layout all pages are odd pages. Note, that this attribute has
-% no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{oddpage}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{oddpage}{#1}%
- \csname @scr@l@\scr@current@layer @oddtrue\endcsname
- \csname @scr@l@\scr@current@layer @evenfalse\endcsname
-}
-% \end{macrocode}
-% \item[\texttt{evenpage}:] restrict the layer to even pages only. At
-% two-sided layout only pages with even page numbers are even pages. At
-% single-sided layout there aren't even pages. Note, that this attribute has
-% no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{evenpage}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{evenpage}{#1}%
- \csname @scr@l@\scr@current@layer @oddfalse\endcsname
- \csname @scr@l@\scr@current@layer @eventrue\endcsname
-}
-% \end{macrocode}
-% \item[\texttt{oddorevenpage}:] do not restrict the layer to odd or even
-% pages.
-% \changes{v3.18}{2015/05/14}{new layer feature \texttt{oddorevenpage}}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{oddorevenpage}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{oddorevenpage}{#1}%
- \csname @scr@l@\scr@current@layer @oddtrue\endcsname
- \csname @scr@l@\scr@current@layer @eventrue\endcsname
-}
-% \end{macrocode}
-% \item[\texttt{evenoroddpage}:] same as \texttt{oddorevenpage}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{evenoroddpage}[\relax]{%
- \PackageWarning{scrlayer}{Option `evenoroddpage' unknown.\MessageBreak
- Using `oddorevenpage' instead}%
- \ExecuteFamilyOptions[.definelayer]{KOMAarg}{oddorevenpage=#1}
-}
-% \end{macrocode}
-% \item[\texttt{oddandevenpages}:] same as \texttt{oddorevenpage}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{oddandevenpages}[\relax]{%
- \PackageWarning{scrlayer}{Option `oddandevenpages' unknown.\MessageBreak
- Using `oddorevenpage' instead}%
- \ExecuteFamilyOptions[.definelayer]{KOMAarg}{oddorevenpage=#1}
-}
-% \end{macrocode}
-% \item[\texttt{evenandoddpages}:] same as \texttt{oddorevenpage}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{evenandoddpages}[\relax]{%
- \PackageWarning{scrlayer}{Option `evenandoddpages' unknown.\MessageBreak
- Using `oddorevenpage' instead}%
- \ExecuteFamilyOptions[.definelayer]{KOMAarg}{oddorevenpage=#1}
-}
-% \end{macrocode}
-% \item[\opt{floatpage}:] restrict the layer to float pages.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{floatpage}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{floatpage}{#1}%
- \csname @scr@l@\scr@current@layer @nonfloatpagefalse\endcsname
- \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname
-}
-% \end{macrocode}
-% \item[\opt{nonfloatpage}:] restrict the layer to pages, which aren't
-% float pages.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{nonfloatpage}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{nonfloatpage}{#1}%
- \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname
- \csname @scr@l@\scr@current@layer @floatpagefalse\endcsname
-}
-% \end{macrocode}
-% \item[\opt{floatornonfloatpage}:] don't restrict the layer to float or
-% non-float pages.
-% \changes{v3.18}{2015/05/14}{new layer feature \texttt{floatornonfloatpage}}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{floatornonfloatpage}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{floatornonfloatpage}{#1}%
- \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname
- \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname
-}
-% \end{macrocode}
-% \item[\opt{nonfloatorfloatpage}:] same as \opt{floatornonfloatpage}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{nonfloatorfloatpage}[\relax]{%
- \PackageWarning{scrlayer}{Option `nonfloatorfloatpage' unknown.\MessageBreak
- Using `floatornonfloatpage' instead}%
- \FamilyExecuteOptions[.definelayer]{KOMAarg}{floatornonfloatpage=#1}%
-}
-% \end{macrocode}
-% \item[\opt{floatandnonfloatpages}:] same as \opt{floatornonfloatpage}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{floatandnonfloatpages}[\relax]{%
- \PackageWarning{scrlayer}{Option `floatandnonfloatpages' unknown.\MessageBreak
- Using `floatornonfloatpage' instead}%
- \FamilyExecuteOptions[.definelayer]{KOMAarg}{floatornonfloatpage=#1}%
-}
-% \end{macrocode}
-% \item[\opt{nonfloatandfloatpages}:] same as \opt{floatornonfloatpage}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{nonfloatandfloatpages}[\relax]{%
- \PackageWarning{scrlayer}{Option `nonfloatandfloatpages' unknown.\MessageBreak
- Using `floatornonfloatpage' instead}%
- \FamilyExecuteOptions[.definelayer]{KOMAarg}{floatornonfloatpage=#1}%
-}
-% \end{macrocode}
-% \item[\opt{everypage}:] remove all odd-, even-, float-, and
-% nonfloat-restrictions.
-% \changes{v3.18}{2015/05/14}{new layer feature \texttt{everypage}}
-% \changes{v3.22}{2016/09/24}{foreground and background condition
-% removed}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{everypage}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{everypage}{#1}%
- \csname @scr@l@\scr@current@layer @oddtrue\endcsname
- \csname @scr@l@\scr@current@layer @eventrue\endcsname
- \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname
- \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname
-}
-% \end{macrocode}
-% \item[\opt{oneside}:] restrict the layer to pages on single-sided
-% layouts.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{oneside}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{oneside}{#1}%
- \csname @scr@l@\scr@current@layer @twosidefalse\endcsname
- \csname @scr@l@\scr@current@layer @onesidetrue\endcsname
-}
-% \end{macrocode}
-% \item[\opt{twoside}:] restrict the layer to pages on two-sided
-% layouts.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{twoside}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{twoside}{#1}%
- \csname @scr@l@\scr@current@layer @twosidetrue\endcsname
- \csname @scr@l@\scr@current@layer @onesidefalse\endcsname
-}
-% \end{macrocode}
-% \item[\opt{everyside}:] remove all one- or two-side restrictions.
-% \changes{v3.18}{2015/05/14}{new layer feature \texttt{everyside}}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{everyside}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{everyside}{#1}%
- \csname @scr@l@\scr@current@layer @twosidetrue\endcsname
- \csname @scr@l@\scr@current@layer @onesidetrue\endcsname
-}
-% \end{macrocode}
-% \item[\opt{unrestricted}:] remove all restrictions
-% \changes{v3.18}{2015/05/14}{new layer feature \texttt{unrestricted}}
-% \changes{v3.22}{2016/09/24}{missing background and foreground
-% condition}
-% \changes{v3.22}{2016/09/24}{nonfloatpage condition fixed}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{unrestricted}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{unrestricted}{#1}%
- \csname @scr@l@\scr@current@layer @oddtrue\endcsname
- \csname @scr@l@\scr@current@layer @eventrue\endcsname
- \csname @scr@l@\scr@current@layer @backgroundtrue\endcsname
- \csname @scr@l@\scr@current@layer @foregroundtrue\endcsname
- \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname
- \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname
- \csname @scr@l@\scr@current@layer @twosidetrue\endcsname
- \csname @scr@l@\scr@current@layer @onesidetrue\endcsname
-}
-% \end{macrocode}
-% \changes{v3.26}{2018/07/14}{new attribute \texttt{beforecontents}}
-% \item[\opt{beforecontents}:] code to be executed immediately before
-% setting the contents. See also modification attribute
-% \texttt{addbeforecontents}.
-% \begin{macrocode}
-\FamilyCSKey[.definelayer]{KOMAarg}{beforecontents}
- {scr@l@\scr@current@layer @precontents@hook}
-% \end{macrocode}
-% \changes{v3.26}{2018/07/14}{new attribute \texttt{aftercontents}}
-% \item[\opt{aftercontents}:] code to be executed immediately before
-% setting the contents. See also modification attribute
-% \texttt{addaftercontents}.
-% \begin{macrocode}
-\FamilyCSKey[.definelayer]{KOMAarg}{aftercontents}
- {scr@l@\scr@current@layer @postcontents@hook}
-% \end{macrocode}
-% \changes{v3.26}{2018/07/14}{new attribute \texttt{artifact}}
-% \item[\opt{artifact}:] reserved for tagging packages. The artifact can
-% either be a boolean or a general value. Boolean false will unset the
-% attribute. Boolean true is the same like empty. All other values will be
-% stored.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{artifact}[true]{%
- \FamilySetBool{KOMAarg}{artifact}{@tempswa}{#1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \if@tempswa
- \expandafter\let\csname scr@l@\scr@current@layer @artifact\endcsname
- \@empty
- \else
- \expandafter\let\csname scr@l@\scr@current@layer @artifact\endcsname
- \relax
- \fi
- \else
- \FamilyKeyStateProcessed
- \@namedef{scr@l@\scr@current@layer @artifact}{#1}%
- \fi
-}
-% \end{macrocode}
-% \end{description}
-%
-% Attribute modifications are attributes, that modify existing basic
-% attributes:
-% \begin{description}
-% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addhoffset}}
-% \item[\texttt{addhoffset=\meta{dimension expression}}:] add to offset from
-% the left edge of the paper.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{addhoffset}{%
- \expandafter\edef\csname scr@l@\scr@current@layer @x\endcsname{%
- \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@l@\scr@current@layer @x\endcsname + (#1)\relax}}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addvoffset}}
-% \item[\texttt{addvoffset=\meta{dimension expression}}:] add to offset from
-% the top edge of the paper.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{addvoffset}{%
- \expandafter\edef\csname scr@l@\scr@current@layer @y\endcsname{%
- \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@l@\scr@current@layer @y\endcsname + (#1)\relax}}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addwidth}}
-% \item[\texttt{addwidth=\meta{dimension expression}}:] add to width of the
-% layer.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{addwidth}{%
- \expandafter\edef\csname scr@l@\scr@current@layer @w\endcsname{%
- \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@l@\scr@current@layer @w\endcsname + (#1)\relax}}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addheight}}
-% \item[\texttt{addheight=\meta{dimension expression}}:] add to height of the
-% layer.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{addheight}{%
- \expandafter\edef\csname scr@l@\scr@current@layer @h\endcsname{%
- \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@l@\scr@current@layer @h\endcsname + (#1)\relax}}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addcontents}}
-% \item[\texttt{addcontents=\meta{output}}:] append to whatever should be
-% printed by the layer.
-% \changes{v3.14}{2014/10/20}{\texttt{contents} is \cs{long}}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{addcontents}{%
- \expandafter\edef\csname scr@l@\scr@current@layer @contents\endcsname{%
- \unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@l@\scr@current@layer @contents\endcsname #1}}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{pretocontents}}
-% \item[\texttt{pretocontents=\meta{output}}:] prefix whatever should be
-% printed by the layer.
-% \changes{v3.14}{2014/10/20}{\texttt{contents} is \cs{long}}
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{pretocontents}{%
- \expandafter\edef\csname scr@l@\scr@current@layer @contents\endcsname{%
- \unexpanded{#1}\unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@l@\scr@current@layer @contents\endcsname}}%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \changes{v3.26}{2018/07/14}{new attribute \texttt{addbeforecontents}}
-% \item[\opt{addbeforecontents}:] code to be executed immediately before
-% setting the contents. The new code will be added before the old code.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{addbeforecontents}{%
- \scr@ifundefinedorrelax{scr@l@\scr@current@layer @precontents@hook}{%
- \expandafter\def
- \csname scr@l@\scr@current@layer @precontents@hook\endcsname{#1}%
- }{%
- \expandafter\edef
- \csname scr@l@\scr@current@layer @precontents@hook\endcsname{%
- \unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@l@\scr@current@layer @precontents@hook\endcsname}%
- \unexpanded{#1}
- }%
- }%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \changes{v3.26}{2018/07/14}{new attribute \texttt{addaftercontents}}
-% \item[\opt{addaftercontents}:] code to be executed immediately before
-% setting the contents. The new code will be added after the old code.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{addaftercontents}{%
- \scr@ifundefinedorrelax{scr@l@\scr@current@layer @postcontents@hook}{%
- \expandafter\def
- \csname scr@l@\scr@current@layer @postcontents@hook\endcsname{#1}%
- }{%
- \expandafter\edef
- \csname scr@l@\scr@current@layer @postcontents@hook\endcsname{%
- \unexpanded{#1}%
- \unexpanded\expandafter\expandafter\expandafter{%
- \csname scr@l@\scr@current@layer @postcontents@hook\endcsname}%
- }%
- }%
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \end{description}
-%
-% Compounding attributes are attributes, that set up several basic attributes
-% with a single compounding attribute:
-% \begin{description}
-% \item[\texttt{page}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values spanning the whole
-% page aligned by the default alignment \texttt{tl}. Note, that this
-% attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{page}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{page}{#1}%
- \def@scr@l@pos{\z@}{\z@}{\paperwidth}{\paperheight}%
- \@namedef{scr@l@\scr@current@layer @align}{tl}%
-}
-% \end{macrocode}
-% \item[\texttt{topmargin}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values vertically spanning the top
-% margin of the page and horizontally spanning the whole page aligned by the
-% default alignment \texttt{tl}. Note, that this attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{topmargin}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{topmargin}{#1}%
- \def@scr@l@pos{\z@}{\z@}{\paperwidth}{\dimexpr \topmargin+1in\relax}%
- \@namedef{scr@l@\scr@current@layer @align}{tl}%
-}
-% \end{macrocode}
-% \item[\texttt{head}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values vertically spanning the page
-% head and horizontally spanning the text area aligned by usual head
-% alignment \texttt{bl}. Note, that this attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{head}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{head}{#1}%
- \def@scr@l@pos{%
- \dimexpr
- \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi
- \else\oddsidemargin\fi
- +1in
- \relax
- }{%
- \dimexpr \topmargin+1in+\headheight\relax
- }{\textwidth}{\headheight}%
- \@namedef{scr@l@\scr@current@layer @align}{bl}%
-}
-% \end{macrocode}
-% \item[\texttt{headsep}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values vertically spanning the area
-% between page head and text area and horizontally spanning the text area
-% aligned by the default alignment \texttt{t}. Note, that this attribute
-% has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{headsep}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{head}{#1}%
- \def@scr@l@pos{%
- \dimexpr
- \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi
- \else\oddsidemargin\fi
- +1in
- \relax
- }{%
- \dimexpr \topmargin+1in+\headheight\relax
- }{\textwidth}{\headsep}%
- \@namedef{scr@l@\scr@current@layer @align}{tl}%
-}
-% \end{macrocode}
-% \item[\texttt{textarea}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values spanning the text area of
-% the page aligned by the default alignment \texttt{t}. Note, that this
-% attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{textarea}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{textarea}{#1}%
- \def@scr@l@pos{%
- \dimexpr
- \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi
- \else\oddsidemargin\fi
- +1in
- \relax
- }{%
- \dimexpr \topmargin+1in+\headheight+\headsep\relax
- }{\textwidth}{\textheight}%
- \@namedef{scr@l@\scr@current@layer @align}{tl}%
-}
-% \end{macrocode}
-% \item[\texttt{foot}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values vertically spanning the page
-% footer and horizontally spanning the text area aligned by the usual footer
-% alignment \texttt{t}. Note, that this attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{foot}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{foot}{#1}%
- \def@scr@l@pos{%
- \dimexpr
- \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi
- \else\oddsidemargin\fi
- +1in
- \relax
- }{%
- \dimexpr \topmargin+1in+\headheight+\headsep+\textheight
- +\footskip+\dp\strutbox-\footheight\relax
- }{\textwidth}{\footheight}%
- \@namedef{scr@l@\scr@current@layer @align}{tl}%
-}
-% \end{macrocode}
-% \item[\texttt{footskip}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values vertically spanning the
-% distance from the text area to the page
-% footer and horizontally spanning the text area aligned by the usual footer
-% alignment \texttt{t}. Note, that this attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{footskip}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{foot}{#1}%
- \def@scr@l@pos{%
- \dimexpr
- \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi
- \else\oddsidemargin\fi
- +1in
- \relax
- }{%
- \dimexpr \topmargin+1in+\headheight+\headsep+\textheight\relax
- }{\textwidth}{\dimexpr\footskip+\dp\strutbox-\footheight\relax}%
- \@namedef{scr@l@\scr@current@layer @align}{tl}%
-}
-% \end{macrocode}
-% \item[\texttt{bottommargin}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values vertically spanning the
-% page's bottom margin below the footer and horizontally spanning the page
-% by the default alignment \texttt{t}. Note, that this attribute has no
-% value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{bottommargin}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{bottommargin}{#1}%
- \def@scr@l@pos{\z@}{%
- \dimexpr \topmargin+1in+\headheight+\headsep
- +\textheight
- +\footskip+\dp\strutbox\relax
- }{\paperwidth}{\dimexpr\paperheight-\layeryoffset\relax}%
- \@namedef{scr@l@\scr@current@layer @align}{tl}%
-}
-% \end{macrocode}
-% \item[\texttt{leftmargin}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values vertically spanning the page
-% and horizontally spanning the left margin of the page by the default
-% alignment \texttt{t}. Note, that this attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{leftmargin}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{leftmargin}{#1}%
- \def@scr@l@pos{\z@}{\z@}{%
- \dimexpr
- \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi
- \else\oddsidemargin\fi
- +1in
- \relax
- }{\paperheight}%
- \@namedef{scr@l@\scr@current@layer @align}{tl}%
-}
-% \end{macrocode}
-% \item[\texttt{rightmargin}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values vertically spanning the page
-% and horizontally spanning the right margin of the page by the default
-% alignment \texttt{t}. Note, that this attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{rightmargin}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{rightmargin}{#1}%
- \def@scr@l@pos{\paperwidth}{\z@}{%
- \dimexpr \paperwidth-1in-\textwidth
- -\if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi
- \else\oddsidemargin\fi\relax
- }{\paperheight}%
- \@namedef{scr@l@\scr@current@layer @align}{tr}%
-}
-% \end{macrocode}
-% \item[\texttt{innermargin}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values vertically spanning the page
-% and horizontally spanning the right margin of even pages and the left
-% margin of odd pages by the default alignment \texttt{t}. See attributes
-% \texttt{oddpage} and \texttt{evenpage} for more information about odd and
-% even pages. Note, that this attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{innermargin}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{innermargin}{#1}%
- \def@scr@l@pos{%
- \if@twoside
- \ifodd\value{page} \z@
- \else \dimexpr \evensidemargin+1in+\textwidth\relax
- \fi
- \else \z@\fi
- }{\z@}{%
- \dimexpr
- \if@twoside\ifodd\value{page} \oddsidemargin+1in
- \else \paperwidth-\layerxoffset\fi
- \else \oddsidemargin+1in\fi
- \relax
- }{\paperheight}%
- \@namedef{scr@l@\scr@current@layer @align}{tl}%
-}
-% \end{macrocode}
-% \item[\texttt{outermargin}:] set up \texttt{hoffset}, \texttt{voffset},
-% \texttt{width}, and \texttt{height} to values vertically spanning the page
-% and horizontally spanning the left margin of even pages and the right
-% margin of odd pages by the default alignment \texttt{t}. See attributes
-% \texttt{oddpage} and \texttt{evenpage} for more information about odd and
-% even pages. Note, that this attribute has no value!
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{outermargin}[\relax]{%
- \FamilyKeyStateProcessed
- \scrlayer@testunexpectedarg{outermargin}{#1}%
- \def@scr@l@pos{%
- \dimexpr
- \if@twoside\ifodd\value{page} \oddsidemargin+1in+\textwidth
- \else \z@\fi
- \else \oddsidemargin+1in+\textwidth\fi
- \relax
- }{\z@}{%
- \dimexpr
- \if@twoside\ifodd\value{page}\paperwidth-\layerxoffset
- \else \evensidemargin+1in\fi
- \else \paperwidth-\layerxoffset\fi
- \relax
- }{\paperheight}%
- \@namedef{scr@l@\scr@current@layer @align}{tl}%
-}
-% \end{macrocode}
-% \item[\texttt{area=\{\meta{hoffset}\}\{\meta{voffset}\}
-% \{\meta{width}\}\{\meta{height}\}}:] set up
-% \texttt{hoffset}, \texttt{voffset}, \texttt{width}, and \texttt{height} to
-% the given values.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{area}{%
- \def@scr@l@pos#1
- \FamilyKeyStateProcessed
-}
-% \end{macrocode}
-% \changes{v3.26}{2018/07/14}{clone code for \texttt{precontents@hook},
-% \texttt{postcontents@hook} and \texttt{artifact} added}^^A
-% \item[\texttt{clone=\meta{layer}}:] set up the new layer by the settings
-% of the given \meta{layer}.
-% \begin{macrocode}
-\DefineFamilyKey[.definelayer]{KOMAarg}{clone}{%
- \scr@ifundefinedorrelax{scr@l@#1@x}{%
- \FamilyKeyStateUnknownValue
- \PackageError{scrlayer}{layer `#1' undefined}{%
- You can clone only already defined layers.\MessageBreak
- If you'll continue, `clone=#1' will be ignored.%
- }%
- }{%
- \FamilyKeyStateProcessed
- \scrlayer@clone@attribute{\scr@current@layer}{#1}{mode}%
- \scrlayer@clone@attribute{\scr@current@layer}{#1}{x}%
- \scrlayer@clone@attribute{\scr@current@layer}{#1}{y}%
- \scrlayer@clone@attribute{\scr@current@layer}{#1}{w}%
- \scrlayer@clone@attribute{\scr@current@layer}{#1}{h}%
- \scrlayer@clone@attribute{\scr@current@layer}{#1}{align}%
- \scrlayer@clone@attribute{\scr@current@layer}{#1}{contents}%
- \scrlayer@clone@switch{\scr@current@layer}{#1}{background}%
- \scrlayer@clone@switch{\scr@current@layer}{#1}{foreground}%
- \scrlayer@clone@switch{\scr@current@layer}{#1}{odd}%
- \scrlayer@clone@switch{\scr@current@layer}{#1}{even}%
- \scrlayer@clone@switch{\scr@current@layer}{#1}{oneside}%
- \scrlayer@clone@switch{\scr@current@layer}{#1}{twoside}%
- \scrlayer@clone@switch{\scr@current@layer}{#1}{floatpage}%
- \scrlayer@clone@switch{\scr@current@layer}{#1}{nonfloatpage}%
- \scrlayer@clone@attribute{\scr@current@layer}{#1}{precontents@hook}%
- \scrlayer@clone@attribute{\scr@current@layer}{#1}{postcontents@hook}%
- \scrlayer@clone@attribute{\scr@current@layer}{#1}{artifact}%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\scrlayer@clone@attribute}
-% \begin{macro}{\scrlayer@clone@switch}
-% Two helpers used at option \texttt{clone} to clone either a macro-based
-% attribute or a if-based attribute.
-% \begin{macrocode}
-\newcommand*{\scrlayer@clone@attribute}[3]{%
- \expandafter\let\csname scr@l@#1@#3\expandafter\endcsname
- \csname scr@l@#2@#3\expandafter\endcsname
-}
-\newcommand*{\scrlayer@clone@switch}[3]{%
- \expandafter\let\csname if@scr@l@#1@#3\expandafter\endcsname
- \csname if@scr@l@#2@#3\expandafter\endcsname
-}
-% \end{macrocode}
-% \end{macro}^^A \scrlayer@clone@switch
-% \end{macro}^^A \scrlayer@clone@attribute
-% \end{description}
-%
-% \changes{v0.9}{2014/08/31}{missing reset of \cs{scr@current@layer} added}
-% \changes{v3.14}{2014/10/20}{\cs{long}}
-% \begin{macrocode}
-\newcommand{\DeclareLayer}[2][]{%
- \def\scr@current@layer{#2}%
- \@namedef{scr@l@#2@mode}{text}%
- \@namedef{scr@l@#2@x}{\z@}%
- \@namedef{scr@l@#2@y}{\z@}%
- \@namedef{scr@l@#2@w}{\paperwidth}%
- \@namedef{scr@l@#2@h}{\paperheight}%
- \@namedef{scr@l@#2@align}{tl}%
- \@namedef{scr@l@#2@contents}{}%
- \expandafter\newif\csname if@scr@l@#2@background\endcsname
- \csname @scr@l@#2@backgroundtrue\endcsname
- \expandafter\newif\csname if@scr@l@#2@foreground\endcsname
- \csname @scr@l@#2@foregroundtrue\endcsname
- \expandafter\newif\csname if@scr@l@#2@odd\endcsname
- \csname @scr@l@#2@oddtrue\endcsname
- \expandafter\newif\csname if@scr@l@#2@even\endcsname
- \csname @scr@l@#2@eventrue\endcsname
- \expandafter\newif\csname if@scr@l@#2@oneside\endcsname
- \csname @scr@l@#2@onesidetrue\endcsname
- \expandafter\newif\csname if@scr@l@#2@twoside\endcsname
- \csname @scr@l@#2@twosidetrue\endcsname
- \expandafter\newif\csname if@scr@l@#2@floatpage\endcsname
- \csname @scr@l@#2@floatpagetrue\endcsname
- \expandafter\newif\csname if@scr@l@#2@nonfloatpage\endcsname
- \csname @scr@l@#2@nonfloatpagetrue\endcsname
- \FamilyExecuteOptions[.definelayer]{KOMAarg}{#1}%
- \let\scr@current@layer\@empty
-}
-% \end{macrocode}
-% \begin{macro}{\scr@current@layer}
-% Helper to hold the current layer and only valid in non recursive calls of
-% \cs{DeclareLayer}.
-% \begin{macrocode}
-\newcommand*{\scr@current@layer}{}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \scr@current@layer
-% \end{command}^^A \DeclareLayer
-%
-% \begin{command}{\IfLayerExists}
-% \begin{description}
-% \item[\marg{string}:] the name of the layer (must be fully expandable
-% and expand to a string only).
-% \item[\marg{then code}:] will be executed, if the layer exists.
-% \item[\marg{else code}:] will be executed, if the layer doesn't exist.
-% \end{description}
-% Note, that we don't known really whether or not a layer exists, but have a
-% heuristic.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\IfLayerExists}[1]{%
- \scr@ifundefinedorrelax{scr@l@#1@mode}{%
- \expandafter\@secondoftwo
- }{%
- \expandafter\@firstoftwo
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \IfLayerExists
-%
-% \begin{command}{\DeclareNewLayer,\ProvideLayer,\RedeclareLayer}
-% \changes{v3.14}{2014/10/20}{\cs{long}}
-% \begin{command}{\ModifyLayer}
-% \changes{v3.14}{2014/10/20}{\cs{long}}
-% \changes{v0.9}{2014/08/31}{missing definition and reset of
-% \cs{scr@current@layer} added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% There are also two commands for declaration of layers, that haven't been
-% declared before, with or without error message for already declared layers,
-% and two commands for changing already declared layers, first one beginning
-% again from scratch, second one for only setting up attributes, that should
-% be changed.
-% \begin{macrocode}
-%<*package&body>
-\newcommand{\DeclareNewLayer}[2][]{%
- \IfLayerExists{#2}{%
- \PackageError{scrlayer}{layer `#2' already defined}{%
- You may declare only layer, that haven't been declared previously
- using\MessageBreak
- \string\DeclareNewLayer. See also the alternatives
- \string\RedeclareLayer,\MessageBreak
- \string\ModifyLayer\space and \string\ProvideLayer.\MessageBreak
- If you'll continue, declaration will be ignored.}%
- }{\DeclareLayer[{#1}]{#2}}%
-}
-\newcommand{\ProvideLayer}[2][]{%
- \IfLayerExists{#2}{%
-%<*trace>
- \PackageInfo{scrlayer}{\string\ProvideLayer{#2} ignored,\MessageBreak
- because of already defined layer}%
-%</trace>
- }{\DeclareNewLayer[{#1}]{#2}}%
-}
-\newcommand{\RedeclareLayer}[2][]{%
- \IfLayerExists{#2}{}{%
- \PackageError{scrlayer}{layer `#2' not yet defined}{%
- You may declare only already declared layers using
- \string\RedeclareLayer.\MessageBreak
- See also the alternatives
- \string\DeclareLayer and \string\ProvideLayer.\MessageBreak
- Nevertheless, if you'll continue, declaration will be done.}%
- }%
- \DeclareLayer[{#1}]{#2}%
-}
-\newcommand{\ModifyLayer}[2][]{%
- \IfLayerExists{#2}{%
- \def\scr@current@layer{#2}%
- \edef\reserved@a{%
- \unexpanded{%
- \FamilyExecuteOptions[.definelayer]{KOMAarg}{#1}%
- \Ifstr{\csname scr@l@#2@mode\endcsname}%
- }{\csname scr@l@#2@mode\endcsname}%
- }\reserved@a{}{%
- \PackageWarning{scrlayer}{%
- change of layer mode could result in unexpected\MessageBreak
- output and errors%
- }%
- }%
- \let\scr@current@layer\@empty
- }{%
- \PackageError{scrlayer}{layer `#2' not yet defined}{%
- You may modify only already declared layers using
- \string\ModifyLayer.\MessageBreak
- See also the alternatives
- \string\DeclareLayer and \string\ProvideLayer.\MessageBreak
- Nevertheless, if you'll continue, declaration will be done.}%
- \DeclareLayer[{#1}]{#2}%
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \ModifyLayer
-% \end{command}^^A \DeclareNewLayer,\ProvideLayer,\RedeclareLayer
-%
-% \begin{command}{\ModifyLayers}
-% \changes{v3.26}{2018/07/14}{added}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added}
-% Like \cs{ModifyLayer} but allows a list of layers instead of only one layer.
-% For the commands \cs{DeclareLayer}, \cs{ProvideLayer} and
-% \cs{RedeclareLayer} this does not make any sense, so there are not similar
-% list commands for these commands.
-% \begin{macrocode}
-%<*package&body>
-\newcommand{\ModifyLayers}[2][]{%
- \edef\scr@current@layer{#2}%
- \@for\scr@current@layer:=\scr@current@layer\do{%
- \scr@trim@spaces\scr@current@layer
- \ifx\scr@current@layer\@emtpy\else
- \edef\scr@current@layer{%
- \unexpanded{\ModifyLayer[{#1}]}{\scr@current@layer}%
- }%
- \scr@current@layer
- \fi
- }%
- \let\scr@current@layer\@empty
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \ModifyLayers
-%
-% \begin{command}{\GetLayerContents}
-% \changes{v3.16}{2015/01/26}{added}
-% \begin{description}
-% \item[\marg{string}:] the name of the layer
-% \end{description}
-% Get the contents of the given layer.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\GetLayerContents}[1]{%
- \IfLayerExists{#1}{\@nameuse{scr@l@#1@contents}}{%
- \PackageError{scrlayer}{unknown layer `#1'}{%
- You can ask only for the contents of an existing layer.}%
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{command}{\DestroyLayer}
-% \changes{v3.26}{2018/07/14}{destroy pre-contents hook, post-contents hook
-% and artifact}
-% \begin{description}
-% \item[\marg{string}:] the name of the layer, that should be
-% destroyed
-% \end{description}
-% Note: Nothing will be done to remove the layer from a page style, but this
-% shouldn't matter, because layers with, e.g.,
-% \cs{if@scr@l@\dots@nonfloatpage}=\cs{relax} and
-% \cs{if@scr@l@\dots@floatpage}=\cs{relax} won't be output ever. This
-% command could be used by interfaces via
-% \cs{scrlayerOnAutoRemoveInterface} to remove the generated
-% layers, if the interface commands wouldn't be depreacted.
-% However, it only destroys existing layers and doesn't care for not
-% existing.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\DestroyLayer}[1]{%
- \IfLayerExists{#1}{%
- \expandafter\let\csname scr@l@#1@mode\endcsname\relax
- \expandafter\let\csname scr@l@#1@x\endcsname\relax
- \expandafter\let\csname scr@l@#1@y\endcsname\relax
- \expandafter\let\csname scr@l@#1@w\endcsname\relax
- \expandafter\let\csname scr@l@#1@h\endcsname\relax
- \expandafter\let\csname scr@l@#1@align\endcsname\relax
- \expandafter\let\csname scr@l@#1@contents\endcsname\relax
- \expandafter\let\csname if@scr@l@#1@background\endcsname\relax
- \expandafter\let\csname @scr@l@#1@backgroundfalse\endcsname\relax
- \expandafter\let\csname @scr@l@#1@backgroundtrue\endcsname\relax
- \expandafter\let\csname if@scr@l@#1@foreground\endcsname\relax
- \expandafter\let\csname @scr@l@#1@foregroundfalse\endcsname\relax
- \expandafter\let\csname @scr@l@#1@foregroundtrue\endcsname\relax
- \expandafter\let\csname if@scr@l@#1@odd\endcsname\relax
- \expandafter\let\csname @scr@l@#1@oddfalse\endcsname\relax
- \expandafter\let\csname @scr@l@#1@oddtrue\endcsname\relax
- \expandafter\let\csname if@scr@l@#1@even\endcsname\relax
- \expandafter\let\csname @scr@l@#1@evenfalse\endcsname\relax
- \expandafter\let\csname @scr@l@#1@eventrue\endcsname\relax
- \expandafter\let\csname if@scr@l@#1@oneside\endcsname\relax
- \expandafter\let\csname @scr@l@#1@onesidefalse\endcsname\relax
- \expandafter\let\csname @scr@l@#1@onesidetrue\endcsname\relax
- \expandafter\let\csname if@scr@l@#1@twoside\endcsname\relax
- \expandafter\let\csname @scr@l@#1@twosidefalse\endcsname\relax
- \expandafter\let\csname @scr@l@#1@twosidetrue\endcsname\relax
- \expandafter\let\csname if@scr@l@#1@floatpage\endcsname\relax
- \expandafter\let\csname @scr@l@#1@floatpagefalse\endcsname\relax
- \expandafter\let\csname @scr@l@#1@floatpagetrue\endcsname\relax
- \expandafter\let\csname if@scr@l@#1@nonfloatpage\endcsname\relax
- \expandafter\let\csname @scr@l@#1@nonfloatpagefalse\endcsname\relax
- \expandafter\let\csname @scr@l@#1@nonfloatpagetrue\endcsname\relax
- \expandafter\let\csname scr@l@#1@precontents@hook\relax
- \expandafter\let\csname scr@l@#1@postcontents@hook\relax
- \expandafter\let\csname scr@l@#1@artifact\relax
- }{%
-%<*trace>
- \PackageInfo{scrlayer}{\string\DestroyLayer{#1} ignored,\MessageBreak
- because that layer doesn't exist\MessageBreak
- (any longer)%
- }%
-%</trace>
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \DestroyLayer
-%
-%
-% \begin{command}{\layercontentsmeasure}
-% \changes{v3.19}{2015/07/27}{\cs{@gobble} eliminated}
-% This may used by used as the only value of the layer option
-% \texttt{contents} to show measure lines around the layer. The left and the
-% top measure line will be in centimeter, the right and the bottom measure
-% line in inch. With option \texttt{draft=true} this also be used
-% automatically and additionally for every layer of a page style.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\layercontentsmeasure}{%
- \smash{\begin{picture}(0,0)
- (0,\LenToUnit{%
- \if t\layervalign -\ht\strutbox
- \else
- \if b\layervalign -\dimexpr\layerheight-\dp\strutbox\relax
- \else -.5\dimexpr\layerheight+\ht\strutbox-\dp\strutbox\relax
- \fi
- \fi})
-% \end{macrocode}
-% 1st horizontal cm
-% \begin{macrocode}
- \setlength{\unitlength}{1mm}%
- \put(0,0){\line(1,0){\LenToUnit{\layerwidth}}}%
- \@tempcnta=\numexpr \dimexpr\layerwidth + .5mm\relax/\dimexpr 1mm\relax\relax
- \multiput(0,0)(1,0){\@tempcnta}{%
- \line(0,-1){1}%
- }%
- \@tempcnta=\numexpr \dimexpr\layerwidth + 2.5mm\relax/\dimexpr 5mm\relax\relax
- \multiput(0,0)(5,0){\@tempcnta}{%
- \line(0,-1){2}%
- }%
- \@tempcnta=\numexpr \dimexpr\layerwidth + .5cm\relax/\dimexpr 1cm\relax\relax
- \multiput(0,0)(10,0){\@tempcnta}{%
- \put(0,0){\line(0,-1){3}}%
- \put(0,-3.5){%
- \makebox(0,0)[ct]{\the\numexpr\@tempcnta-\@multicnt\relax}}%
- }%
-% \end{macrocode}
-% 2nd horizontal in:
-% \begin{macrocode}
- \put(0,\LenToUnit{-\layerheight}){\line(1,0){\LenToUnit{\layerwidth}}}%
- \@tempcnta=\numexpr \dimexpr\layerwidth + .05in\relax/\dimexpr .1in\relax\relax
- \multiput(0,\LenToUnit{-\layerheight})(2.54,0){\@tempcnta}{%
- \line(0,1){1}%
- }%
- \@tempcnta=\numexpr \dimexpr\layerwidth + .25in\relax/\dimexpr .5in\relax\relax
- \multiput(0,\LenToUnit{-\layerheight})(12.7,0){\@tempcnta}{%
- \line(0,1){2}%
- }%
- \@tempcnta=\numexpr \dimexpr\layerwidth + .5in\relax/\dimexpr 1in\relax\relax
- \multiput(0,\LenToUnit{-\layerheight})(25.4,0){\@tempcnta}{%
- \put(0,0){\line(0,1){3}}%
- \put(0,3.5){%
- \makebox(0,0)[cb]{\the\numexpr\@tempcnta-\@multicnt\relax}}%
- }%
-% \end{macrocode}
-% 3rd vertical cm:
-% \begin{macrocode}
- \put(0,0){\line(0,-1){\LenToUnit{\layerheight}}}%
- \@tempcnta\numexpr \dimexpr\layerheight + .5mm\relax/\dimexpr 1mm\relax\relax
- \multiput(0,0)(0,-1){\@tempcnta}{%
- \line(1,0){1}%
- }%
- \@tempcnta\numexpr \dimexpr\layerheight + 2.5mm\relax/\dimexpr 5mm\relax\relax
- \multiput(0,0)(0,-5){\@tempcnta}{%
- \line(1,0){2}%
- }%
- \@tempcnta\numexpr \dimexpr\layerheight + .5cm\relax/\dimexpr 1cm\relax\relax
- \multiput(0,0)(0,-10){\@tempcnta}{%
- \put(0,0){\line(1,0){3}}%
- \put(3.5,0){%
- \makebox(0,0)[cl]{\the\numexpr\@tempcnta-\@multicnt\relax}}%
- }%
-% \end{macrocode}
-% 4th vertical in:
-% \begin{macrocode}
- \put(\LenToUnit{\layerwidth},0){\line(0,-1){\LenToUnit{\layerheight}}}%
- \@tempcnta\numexpr \dimexpr\layerheight + .05in\relax/\dimexpr .1in\relax\relax
- \multiput(\LenToUnit{\layerwidth},0)(0,-2.54){\@tempcnta}{%
- \line(-1,0){1}%
- }%
- \@tempcnta\numexpr \dimexpr\layerheight + .25in\relax/\dimexpr .5in\relax\relax
- \multiput(\LenToUnit{\layerwidth},0)(0,-12.7){\@tempcnta}{%
- \line(-1,0){2}%
- }%
- \@tempcnta\numexpr \dimexpr\layerheight + .5in\relax/\dimexpr 1in\relax\relax
- \multiput(\LenToUnit{\layerwidth},0)(0,-25.4){\@tempcnta}{%
- \put(0,0){\line(-1,0){3}}%
- \put(-3.5,0){%
- \makebox(0,0)[cr]{\the\numexpr\@tempcnta-\@multicnt\relax}}%
- }%
- \end{picture}}%
-}
-% \end{macrocode}
-% \begin{command}{\LenToUnit}
-% \changes{v3.19}{2015/07/27}{added}
-% Due to an incompatibility of package \textsf{curve2e} I've eliminated
-% \cs{@gobble} in the definition of \cs{layercontentsmeasure} and replaced it
-% sometimes by \cs{LenToUnit} with the (not long) definition suggested by
-% \textsf{curve2e} itself.
-% \begin{macrocode}
-\providecommand*{\LenToUnit}[1]{\strip@pt\dimexpr#1*\p@/\unitlength}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \LenToUnit
-% \end{command}^^A \layercontentsmeasure
-%
-%
-% \subsection{Providing Page Styles}
-%
-% Page styles in \LaTeX{} consist of the elements:
-% \begin{itemize}
-% \item a header for odd pages,
-% \item a header for even pages,
-% \item a footer for odd pages,
-% \item a footer for even pages,
-% \end{itemize}
-% and some optional additional commands, that will be expanded, whenever the
-% page style will be activated. Note, that header and footer for even pages
-% will be used only at two-sided mode. At one-sided mode the header and footer
-% for odd pages will be used for all pages.
-%
-% With package \pkg*{scrlayer} layers will be linked to package styles and
-% expanded at the four elements above. Background layers will expand only
-% at the headers. Foreground layers will expand only at the
-% footers. Layers, that haven't been restricted to background or foreground,
-% will expand at both, page headers and page footers.
-%
-% Similar to the expansion of background and foreground layers, odd page
-% layers will only expand in the headers or footers of odd pages and even page
-% layers will only expand in the headers or footers of even pages. Layers,
-% that haven't been restricted to odd or even pages, will expand in the
-% headers or footers of odd pages and also in the headers or footers of even
-% pages.
-%
-% One step more: Single-side layers will only expand in the headers or footers
-% of pages in single-side layouts and two-side layers only in the headers or
-% footers of pages in two-side layout.
-%
-% One more step: float page layers will only expand in the headers or footers
-% of pages, that consists of page floats only, while non-float page layers
-% will only expand in the headers of footers of pages, that doesn't have page
-% floats.
-%
-% \begin{length}{\footheight}
-% For the header \LaTeX{} already defines a length \len{headheight} to be
-% the maximum height of the header. But for footer it only defines the
-% distance of the baseline of the footer from the last baseline of the text
-% area. \pkg*{scrlayer} changes this and also defines a new length
-% \len{footheight}. This length will be initialised with magic value
-% -12345\,sp. But if it is still that magic value at
-% \cs{begin}\texttt\{\env{document}\texttt\} it will be reset to the value of
-% \len{baselineskip}.
-% \begin{macrocode}
-%<*package&init>
-\@ifundefined{footheight}{%
- \newlength{\footheight}%
- \setlength{\footheight}{-12345sp}%
-}{%
-%<*trace>
- \PackageInfo{scrlayer}{Using already defined \string\footheight\MessageBreak
- hoping, that this is a length and\MessageBreak
- not only a macro}%
-%</trace>
-}
-\AtBeginDocument{%
- \ifdim\footheight=-12345sp
-%<*trace>
- \PackageInfo{scrlayer}{Setting magic \string\footheight\space to
- \string\baselineskip\space while\MessageBreak
- \string\begin{document}}%
-%</trace>
- \setlength{\footheight}{\baselineskip}
- \fi
-}
-%</package&init>
-% \end{macrocode}
-% \end{length}^^A \footheight
-%
-%
-% Several of the following commands use \meta{key}=\meta{value} arguments. So
-% we define a family with a new member:
-% \begin{macrocode}
-%<*package&body>
-\DefineFamily{KOMAarg}
-\DefineFamilyMember[.definelayerpagestyle]{KOMAarg}
-%</package&body>
-% \end{macrocode}
-%
-% \begin{command}{\DeclarePageStyleByLayers}
-% \begin{description}
-% \item[\oarg{option list}:] comma separated list of named page
-% style options (see below).
-% \item[\marg{string}:] the name of the page style to be declared (must
-% be expandable and result in a string).
-% \item[\marg{string list}:] comma separated list of layer names (must
-% be expandable and result in strings); first in the list will be added
-% first.
-% \end{description}
-% Page styles may be declared using this command. It has one optional and
-% two mandatory arguments. The first mandatory one is the name of the page
-% style and the second one is a list of layers to be used for this page
-% style. The page style itself will expand all background layers for odd
-% pages in \cs{@oddhead}, all background layers for even pages on
-% \cs{@evenhead}, all foreground layers for odd pages in \cs{@oddfoot}, and
-% all foreground layers for even pages in \cs{@evenfoot}. This may be
-% restricted by additional attributes, e.g., \opt{oneside} and
-% \opt{twoside}.
-%
-% The optional argument may be used to define hooks. There are six named
-% optional arguments to set up six hooks. And there are also \KOMAScript{}
-% options for these, to define global pre-definitions. Note, that you may
-% remove the global pre-definitions by emptying the local hooks. The local
-% argument are named similar, but without ``\texttt{ps}'' after
-% ``\texttt{on}''.
-% \begin{option}{onselect}
-% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}}
-% \begin{option}{onpsselect}
-% \begin{macro}{\@ps@initialhook}
-% \begin{description}
-% \item[\texttt{=\meta{code}}:] executes \meta{code} whenever the
-% page style will be selected, e.g. using \cs{pagestyle} or
-% \cs{thispagestyle} or the low level command defining the page
-% style itself.
-% \end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{onpsselect}{%
- \l@addto@macro{\@ps@initialhook}{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@add{.scrlayer.sty}{onpsselect}{#1}%
-}
-%<package>\scrlayer@@add@inherited@option{onpsselect}
-%<package>\newcommand*{\@ps@initialhook}{}
-%<package>\KOMA@kav@add{.scrlayer.sty}{onpsselect}{}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsselect\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsselect@default\endcsname\relax
-%</interface&body>
-%<*package&body>
-\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onselect}{%
- \expandafter\l@addto@macro
- \csname @ps@\scrlayer@current@pagestyle @initialhook\endcsname
- {#1}%
- \let\scr@opt@marker@initialhook\FamilyKeyStateProcssed
- \FamilyKeyStateProcessed
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@ps@initialhook
-% \end{option}^^A onpsselect
-% \begin{option}{onpsinit}
-% \begin{macro}{\@ps@hook}
-% \begin{description}
-% \item[\texttt{=\meta{code}}:] executes \meta{code} whenever the
-% output of a layer stack is initialised. Note, that \meta{code} must not
-% result in any page output. Otherwise the output of the layer stack will be
-% broken!
-% \end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{onpsinit}{%
- \l@addto@macro{\@ps@hook}{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@add{.scrlayer.sty}{onpsinit}{#1}%
-}
-%<package>\scrlayer@@add@inherited@option{onpsinit}
-%<package>\newcommand*{\@ps@hook}{}
-%<package>\KOMA@kav@add{.scrlayer.sty}{onpsinit}{}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsinit\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsinit@default\endcsname\relax
-%</interface&body>
-%<*package&body>
-\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{oninit}{%
- \expandafter\l@addto@macro
- \csname @ps@\scrlayer@current@pagestyle @hook\endcsname
- {#1}%
- \let\scr@opt@marker@hook\FamilyKeyStateProcssed
- \FamilyKeyStateProcessed
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@ps@hook
-% \end{option}^^A onpsinit
-% \end{option}^^A oninit
-% \begin{option}{ononeside}
-% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}}
-% \begin{option}{onpsoneside}
-% \begin{macro}{\@ps@onesidehook}
-% \begin{description}
-% \item[\opt{=\meta{code}}:] executes \meta{code} after
-% \opt{oninit}'s \meta{code} whenever the output of a layer stack of a
-% page in single-side layout is initialised. Note, that \meta{code} must not
-% result in any page output. Otherwise the output of the layer stack will be
-% broken!
-% \end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{onpsoneside}{%
- \l@addto@macro{\@ps@onesidehook}{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@add{.scrlayer.sty}{onpsoneside}{#1}%
-}
-%<package>\scrlayer@@add@inherited@option{onpsoneside}
-%<package>\newcommand*{\@ps@onesidehook}{}
-%<package>\KOMA@kav@add{.scrlayer.sty}{onpsoneside}{}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsoneside\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsoneside@default\endcsname\relax
-%</interface&body>
-%<*package&body>
-\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{ononeside}{%
- \expandafter\l@addto@macro
- \csname @ps@\scrlayer@current@pagestyle @onesidehook\endcsname
- {#1}%
- \let\scr@opt@marker@onesidehook\FamilyKeyStateProcssed
- \FamilyKeyStateProcessed
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@ps@onesidehook
-% \end{option}^^A onpsoneside
-% \end{option}^^A ononeside
-% \begin{option}{ontwoside}
-% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}}
-% \begin{option}{onpstwoside}
-% \begin{macro}{\@ps@twosidehook}
-% \begin{description}
-% \item[\opt{=\meta{code}}:] executes \meta{code} after
-% \opt{oninit}'s \meta{code} whenever the output of a layer stack of a
-% page in two-side layout is initialised. Note, that \meta{code} must not
-% result in any page output. Otherwise the output of the layer stack will be
-% broken!
-% \end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{onpstwoside}{%
- \l@addto@macro{\@ps@twosidehook}{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@add{.scrlayer.sty}{onpstwoside}{#1}%
-}
-%<package>\scrlayer@@add@inherited@option{onpstwoside}
-%<package>\newcommand*{\@ps@twosidehook}{}
-%<package>\KOMA@kav@add{.scrlayer.sty}{onpstwoside}{}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpstwoside\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpstwoside@default\endcsname\relax
-%</interface&body>
-%<*package&body>
-\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{ontwoside}{%
- \expandafter\l@addto@macro
- \csname @ps@\scrlayer@current@pagestyle @twosidehook\endcsname
- {#1}%
- \let\scr@opt@marker@twosidehook\FamilyKeyStateProcssed
- \FamilyKeyStateProcessed
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@ps@twosidehook
-% \end{option}^^A onpstwoside
-% \end{option}^^A ontwoside
-% \begin{option}{onoddpage}
-% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}}
-% \begin{option}{onpsoddpage}
-% \begin{macro}{\@ps@oddpagehook}
-% \begin{description}
-% \item[\texttt{=\meta{code}}:] executes \meta{code} after
-% \opt{ononeside}'s or \opt{ontwoside}'s \meta{code} whenever the
-% output of a layer stack of an odd page is initialised. Note, that
-% \meta{code} must not result in any page output. Otherwise the output of
-% the layer stack will be broken!
-% \end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{onpsoddpage}{%
- \l@addto@macro{\@ps@oddpagehook}{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@add{.scrlayer.sty}{onpsoddpage}{#1}%
-}
-%<package>\scrlayer@@add@inherited@option{onpsoddpage}
-%<package>\newcommand*{\@ps@oddpagehook}{}
-%<package>\KOMA@kav@add{.scrlayer.sty}{onpsoddpage}{}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsoddpage\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsoddpage@default\endcsname\relax
-%</interface&body>
-%<*package&body>
-\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onoddpage}{%
- \expandafter\l@addto@macro
- \csname @ps@\scrlayer@current@pagestyle @oddpagehook\endcsname
- {#1}%
- \let\scr@opt@marker@oddpagehook\FamilyKeyStateProcssed
- \FamilyKeyStateProcessed
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@ps@oddpagehook
-% \end{option}^^A onpsoddpage
-% \end{option}^^A onoddside
-% \begin{option}{onevenpage}
-% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}}
-% \begin{option}{onpsevenpage}
-% \begin{macro}{\@ps@evenpagehook}
-% \begin{description}
-% \item[\texttt{=\meta{code}}:] executes \meta{code} after
-% \opt{ononeside}'s or \opt{ontwoside}'s \meta{code} whenever the
-% output of a layer stack of an even page is initialised. Note, that
-% \meta{code} must not result in any page output. Otherwise the output of
-% the layer stack will be broken!
-% \end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{onpsevenpage}{%
- \l@addto@macro{\@ps@evenpagehook}{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@add{.scrlayer.sty}{onpsevenpage}{#1}%
-}
-%<package>\scrlayer@@add@inherited@option{onpsevenpage}
-%<package>\newcommand*{\@ps@evenpagehook}{}
-%<package>\KOMA@kav@add{.scrlayer.sty}{onpsevenpage}{}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsevenpage\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsevenpage@default\endcsname\relax
-%</interface&body>
-%<*package&body>
-\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onevenpage}{%
- \expandafter\l@addto@macro
- \csname @ps@\scrlayer@current@pagestyle @evenpagehook\endcsname
- {#1}%
- \let\scr@opt@marker@evenpagehook\FamilyKeyStateProcssed
- \FamilyKeyStateProcessed
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@ps@evenpagehook
-% \end{option}^^A onpsevenpage
-% \end{option}^^A onevenside
-% \begin{option}{onfloatpage}
-% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}}
-% \begin{option}{onpsfloatpage}
-% \begin{macro}{\@ps@floatpagehook}
-% \begin{description}
-% \item[\opt{=\meta{code}}:] executes \meta{code} after
-% \opt{onoddpage}'s or \opt{onevenpage}'s \meta{code} whenever a float
-% column has been made (usually those pages are float pages).
-% \end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{onpsfloatpage}{%
- \l@addto@macro{\@ps@floatpagehook}{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@add{.scrlayer.sty}{onpsfloatpage}{#1}%
-}
-%<package>\scrlayer@@add@inherited@option{onpsfloatpage}
-%<package>\newcommand*{\@ps@floatpagehook}{}
-%<package>\KOMA@kav@add{.scrlayer.sty}{onpsfloatpage}{}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsfloatpage\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsfloatpage@default\endcsname\relax
-%</interface&body>
-%<*package&body>
-\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onfloatpage}{%
- \expandafter\l@addto@macro
- \csname @ps@\scrlayer@current@pagestyle @floatpagehook\endcsname
- {#1}%
- \let\scr@opt@marker@floatpagehook\FamilyKeyStateProcssed
- \FamilyKeyStateProcessed
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@ps@floatpagehook
-% \end{option}^^A onpsfloatpage
-% \end{option}^^A onfloatpage
-% \begin{option}{onnonfloatpage}
-% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}}
-% \begin{option}{onpsnonfloatpage}
-% \begin{macro}{\@ps@nonfloatpagehook}
-% \begin{description}
-% \item[\opt{=\meta{code}}:] executes \meta{code} after
-% \opt{onoddpage}'s or \opt{onevenpage}'s \meta{code} whenever no
-% float column has been made (usually those pages aren't float pages).
-% \end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{onpsnonfloatpage}{%
- \l@addto@macro{\@ps@nonfloatpagehook}{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@add{.scrlayer.sty}{onpsnonfloatpage}{#1}%
-}
-%<package>\scrlayer@@add@inherited@option{onpsnonfloatpage}
-%<package>\newcommand*{\@ps@nonfloatpagehook}{}
-%<package>\KOMA@kav@add{.scrlayer.sty}{onpsnonfloatpage}{}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsnonfloatpage\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsnonfloatpage@default\endcsname\relax
-%</interface&body>
-%<*package&body>
-\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onnonfloatpage}{%
- \expandafter\l@addto@macro
- \csname @ps@\scrlayer@current@pagestyle @nonfloatpagehook\endcsname
- {#1}%
- \let\scr@opt@marker@nonfloatpagehook\FamilyKeyStateProcssed
- \FamilyKeyStateProcessed
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@ps@nonfloatpagehook
-% \end{option}^^A onpsnonfloatpage
-% \end{option}^^A onnonfloatpage
-% \begin{option}{onbackground}
-% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}}
-% \begin{option}{onpsbackground}
-% \begin{macro}{\@ps@backgroundhook}
-% \begin{description}
-% \item[\texttt{=\meta{code}}:] executes \meta{code} after
-% \opt{onfloatpage}'s or \opt{onnonfloatpage}'s \meta{code} whenever
-% the output of a background layer stack is initialised. Note, that
-% \meta{code} must not result in any page output. Otherwise the output of
-% the layer stack will be broken!
-% \end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{onpsbackground}{%
- \l@addto@macro{\@ps@backgroundhook}{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@add{.scrlayer.sty}{onpsbackground}{#1}%
-}
-%<package>\scrlayer@@add@inherited@option{onpsbackground}
-%<package>\newcommand*{\@ps@backgroundhook}{}
-%<package>\KOMA@kav@add{.scrlayer.sty}{onpsbackground}{}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsbackground\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsbackground@default\endcsname\relax
-%</interface&body>
-%<*package&body>
-\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onbackground}{%
- \expandafter\l@addto@macro
- \csname @ps@\scrlayer@current@pagestyle @backgroundhook\endcsname
- {#1}%
- \let\scr@opt@marker@backgroundhook\FamilyKeyStateProcssed
- \FamilyKeyStateProcessed
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@ps@backgroundhook
-% \end{option}^^A onbackground
-% \end{option}^^A onbackground
-% \begin{option}{onforeground}
-% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}}
-% \begin{option}{onpsforeground}
-% \begin{macro}{\@ps@foregroundhook}
-% \begin{description}
-% \item[\texttt{=\meta{code}}:] executes \meta{code} after
-% \opt{onfloatpage}'s or \opt{onnonfloatpage}'s \meta{code} whenever
-% the output of a foreground layer stack is initialised. Note, that
-% \meta{code} must not result in any page output. Otherwise the output of
-% the layer stack will be broken!
-% \end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@key{onpsforeground}{%
- \l@addto@macro{\@ps@foregroundhook}{#1}%
- \FamilyKeyStateProcessed
- \KOMA@kav@add{.scrlayer.sty}{onpsforeground}{#1}%
-}
-%<package>\scrlayer@@add@inherited@option{onpsforeground}
-%<package>\newcommand*{\@ps@foregroundhook}{}
-%<package>\KOMA@kav@add{.scrlayer.sty}{onpsforeground}{}
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsforeground\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @onpsforeground@default\endcsname\relax
-%</interface&body>
-%<*package&body>
-\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onforeground}{%
- \expandafter\l@addto@macro
- \csname @ps@\scrlayer@current@pagestyle @foregroundhook\endcsname
- {#1}%
- \let\scr@opt@marker@foregroundhook\FamilyKeyStateProcssed
- \FamilyKeyStateProcessed
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \@psforegroundhook
-% \end{option}^^A onpsforeground
-% \end{option}^^A onforeground
-% \begin{option}{singlespacing}
-% \changes{v3.24}{2017/05/22}{added}
-% \begin{description}
-% \item[\texttt{=\meta{simple switch}}:] if activated, all page styles will be
-% set with line spread 1. This switch is global. If you want it for some
-% styles only, add \cs{linespread}|{1}|\cs{selectfont} to
-% option \opt{oninit} of only those styles.
-%\end{description}
-% \begin{macrocode}
-%<*options>
-\KOMA@ifkey{singlespacing}{@ps@singlespacing}
-%<package>\scrlayer@@add@inherited@option{singlespacing}
-%</options>
-% \end{macrocode}
-% \end{option}
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\DeclarePageStyleByLayers}[3][]{%
- \edef\scrlayer@current@pagestyle{\GetRealPageStyle{#2}}%
- \expandafter\scrlayer@declare@ps@by@layers\expandafter{%
- \scrlayer@current@pagestyle
- }{#1}{#3}%
-}
-% \end{macrocode}
-% \begin{macro}{\scrlayer@declare@ps@by@layers}
-% \changes{v3.15}{2014/12/28}{fix: \cs{linewidth} replaced by
-% \cs{textwidth}}
-% \changes{v3.18}{2015/06/09}{usage of \cs{parbox[b]} instead of
-% \cs{parbox[t]} because of strange effect with package
-% \textsf{multicol}}
-% \changes{v3.24}{2017/05/22}{test for \cs{if@ps@singlespacing} added}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Needed, because of page style aliases. Same arguments like
-% \cs{DeclarePageStyleByLayers} but, \#1 is the name of the page style, \#2 is
-% the list of options and \#3 is still the list of layers.
-% \begin{macrocode}
-\newcommand*{\scrlayer@declare@ps@by@layers}[3]{%
- \@namedef{@ps@#1@initialhook}{\@ps@initialhook}%
- \@namedef{@ps@#1@hook}{\@ps@hook}%
- \@namedef{@ps@#1@backgroundhook}{\@ps@backgroundhook}%
- \@namedef{@ps@#1@foregroundhook}{\@ps@foregroundhook}%
- \@namedef{@ps@#1@oddpagehook}{\@ps@oddpagehook}%
- \@namedef{@ps@#1@evenpagehook}{\@ps@evenpagehook}%
- \@namedef{@ps@#1@onesidehook}{\@ps@onesidehook}%
- \@namedef{@ps@#1@twosidehook}{\@ps@twosidehook}%
- \@namedef{@ps@#1@floatpagehook}{\@ps@floatpagehook}%
- \@namedef{@ps@#1@nonfloatpagehook}{\@ps@nonfloatpagehook}%
- \FamilyExecuteOptions[.definelayerpagestyle]{KOMAarg}{#2}%
- \@namedef{ps@#1}{%
- \renewcommand*{\currentpagestyle}{#1}%
- \@nameuse{@ps@@everystyle@@initialhook}%
- \@nameuse{@ps@#1@initialhook}%
- \renewcommand*{\currentpagestyle}{#1}%
- \renewcommand*{\@oddhead}{%
- \begingroup
- \let\headmark\rightmark
- \if@ps@singlespacing\linespread{1}\selectfont\fi
- \@nameuse{@ps@@everystyle@@hook}%
- \@nameuse{@ps@#1@hook}%
- \@nameuse{@ps@@everystyle@@\if@twoside two\else one\fi sidehook}%
- \@nameuse{@ps@#1@\if@twoside two\else one\fi sidehook}%
- \@nameuse{@ps@@everystyle@@oddpagehook}%
- \@nameuse{@ps@#1@oddpagehook}%
- \@nameuse{@ps@@everystyle@@\if@fcolmade\else non\fi floatpagehook}%
- \@nameuse{@ps@#1@\if@fcolmade\else non\fi floatpagehook}%
- \@nameuse{@ps@@everystyle@@backgroundhook}%
- \@nameuse{@ps@#1@backgroundhook}%
- \parbox[b][\headheight][t]{\textwidth}{%
- \vskip \dimexpr -\topmargin-1in
- -\ht\strutbox\relax
- \hskip \dimexpr -\oddsidemargin-1in\relax
- \strut\makebox[\z@][l]{%
- \ForEachLayerOfPageStyle{@everystyle@}{%
- \scrlayer@do@page@style@element@layer{background}{odd}%
- {########1}%
- }%
- \ForEachLayerOfPageStyle{#1}{%
- \scrlayer@do@page@style@element@layer{background}{odd}%
- {########1}%
- }%
- }%
- }%
- \endgroup
- }%
- \renewcommand*{\@evenhead}{%
- \begingroup
- \let\headmark\leftmark
- \if@ps@singlespacing\linespread{1}\selectfont\fi
- \@nameuse{@ps@@everystyle@@hook}%
- \@nameuse{@ps@#1@hook}%
- \@nameuse{@ps@@everystyle@@twosidehook}%
- \@nameuse{@ps@#1@twosidehook}%
- \@nameuse{@ps@@everystyle@@evenpagehook}%
- \@nameuse{@ps@#1@evenpagehook}%
- \@nameuse{@ps@@everystyle@@\if@fcolmade\else non\fi floatpagehook}%
- \@nameuse{@ps@#1@\if@fcolmade\else non\fi floatpagehook}%
- \@nameuse{@ps@@everystyle@@backgroundhook}%
- \@nameuse{@ps@#1@backgroundhook}%
- \parbox[b][\headheight][t]{\textwidth}{%
- \vskip \dimexpr -\topmargin-1in
- -\ht\strutbox\relax
- \hskip \dimexpr-\evensidemargin-1in\relax
- \strut\makebox[\z@][l]{%
- \ForEachLayerOfPageStyle{@everystyle@}{%
- \scrlayer@do@page@style@element@layer{background}{even}%
- {########1}%
- }%
- \ForEachLayerOfPageStyle{#1}{%
- \scrlayer@do@page@style@element@layer{background}{even}%
- {########1}%
- }%
- }%
- }%
- \endgroup
- }%
- \renewcommand*{\@oddfoot}{%
- \begingroup
- \let\headmark\rightmark
- \if@ps@singlespacing\linespread{1}\selectfont\fi
- \@nameuse{@ps@@everystyle@@hook}%
- \@nameuse{@ps@#1@hook}%
- \@nameuse{@ps@@everystyle@@\if@twoside two\else one\fi sidehook}%
- \@nameuse{@ps@#1@\if@twoside two\else one\fi sidehook}%
- \@nameuse{@ps@@everystyle@@oddpagehook}%
- \@nameuse{@ps@#1@oddpagehook}%
- \@nameuse{@ps@@everystyle@@\if@fcolmade\else non\fi floatpagehook}%
- \@nameuse{@ps@#1@\if@fcolmade\else non\fi floatpagehook}%
- \@nameuse{@ps@@everystyle@@foregroundhook}%
- \@nameuse{@ps@#1@foregroundhook}%
- \parbox[t][\headheight][t]{\textwidth}{%
- \vskip \dimexpr -\topmargin-1in
- -\headheight
- -\headsep
- -\textheight
- -\footskip
- -\ht\strutbox\relax
- \hskip \dimexpr -\oddsidemargin-1in\relax
- \strut\makebox[\z@][l]{%
- \ForEachLayerOfPageStyle{@everystyle@}{%
- \scrlayer@do@page@style@element@layer{foreground}{odd}%
- {########1}%
- }%
- \ForEachLayerOfPageStyle{#1}{%
- \scrlayer@do@page@style@element@layer{foreground}{odd}%
- {########1}%
- }%
- }%
- }%
- \endgroup
- }%
- \renewcommand*{\@evenfoot}{%
- \begingroup
- \let\headmark\leftmark
- \if@ps@singlespacing\linespread{1}\selectfont\fi
- \@nameuse{@ps@@everystyle@@hook}%
- \@nameuse{@ps@#1@hook}%
- \@nameuse{@ps@@everystyle@@twosidehook}%
- \@nameuse{@ps@#1@twosidehook}%
- \@nameuse{@ps@@everystyle@@evenpagehook}%
- \@nameuse{@ps@#1@evenpagehook}%
- \@nameuse{@ps@@everystyle@@\if@fcolmade\else non\fi floatpagehook}%
- \@nameuse{@ps@#1@\if@fcolmade\else non\fi floatpagehook}%
- \@nameuse{@ps@@everystyle@@foregroundhook}%
- \@nameuse{@ps@#1@foregroundhook}%
- \parbox[t][\headheight][t]{\textwidth}{%
- \vskip \dimexpr -\topmargin-1in
- -\headheight
- -\headsep
- -\textheight
- -\footskip
- -\ht\strutbox\relax
- \hskip \dimexpr-\evensidemargin-1in\relax
- \strut\makebox[\z@][l]{%
- \ForEachLayerOfPageStyle{@everystyle@}{%
- \scrlayer@do@page@style@element@layer{foreground}{even}%
- {########1}%
- }%
- \ForEachLayerOfPageStyle{#1}{%
- \scrlayer@do@page@style@element@layer{foreground}{even}%
- {########1}%
- }%
- }%
- }%
- \endgroup
- }%
- }%
- \@namedef{@ps@#1@layers}{}%
- \@for \reserved@a:=#3\do {%
- \scr@trim@spaces\reserved@a
- \Ifstr\reserved@a\@empty{}{%
- \expandafter\@cons\csname @ps@#1@layers\endcsname{{\reserved@a}}%
- }%
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \scrlayer@declare@ps@by@layers
-%
-% \begin{command}{\ForEachLayerOfPageStyle}
-% \changes{v3.18}{2015/05/14}{star version of the command}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} durch \cs{kernel@ifstar}
-% ersetzt}
-% \begin{description}
-% \item[\marg{string}:] a valid page style (must be fully expandable
-% and expand to the name of a existing page style); note, that currently
-% no exists test will be done.
-% \item[\marg{code}:] any macro definition body with usage of at most
-% one argument (\texttt{\#1}), that will be replaced by the layer's name
-% \end{description}
-% Do the given \meta{code} for each layer of the page style
-% \meta{string}. Note, that the expansion of \meta{code} will be done inside
-% a group. There's also a star version of the command, that delays execution
-% of \meta{code} after the end of the group.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\ForEachLayerOfPageStyle}{%
- \kernel@ifstar {\@s@ForEachLayerOfPageStyle}{\@ForEachLayerOfPageStyle}%
-}
-\newcommand*{\@ForEachLayerOfPageStyle}[2]{%
- \begingroup
- \edef\reserved@a{\GetRealPageStyle{#1}}%
- \def\@elt##1{\ifscrlayer@deactivate@layers\else #2\fi}%
- \@nameuse{@ps@\reserved@a @layers}%
- \endgroup
-}
-\newcommand*{\@s@ForEachLayerOfPageStyle}[2]{%
- \begingroup
- \edef\reserved@a{\GetRealPageStyle{#1}}%
- \def\reserved@b{\endgroup}%
- \def\@elt##1{%
- \l@addto@macro\reserved@b{%
- \ifscrlayer@deactivate@layers\else #2\fi
- }%
- }%
- \@nameuse{@ps@\reserved@a @layers}%
- \reserved@b
-}
-%</package&body>
-% \end{macrocode}
-% \begin{option}{deactivatepagestylelayers}
-% \begin{macro}{\ifscrlayer@deactivate@layers}
-% \begin{description}
-% \item[\marg{simple switch}:] whether or not
-% \cs{ForEachLayerOfPageStyle} should ignore the layers.
-% \end{description}
-% This is a global \KOMAScript{} options. Several other definitions and at
-% least the usage of the page style will ignore the layers if
-% \cs{ForEachLayerOfPageStyle} ignores them. So this is something like:
-% hide the layers. It may also be useful inside the code for the hooks
-% described above, because hooks may used to deactivate the layers with this
-% option too.
-% \begin{macrocode}
-%<*options>
-%<*package>
-\KOMA@ifkey{deactivatepagestylelayers}{scrlayer@deactivate@layers}
-%<package>\scrlayer@@add@inherited@option{deactivatepagestylelayers}
-%</package>
-%<*interface>
-\KOMA@key{deactivatepagestylelayers}[true]{%
- \KOMA@set@ifkey{deactivatepagestylelayers}{scrlayer@deactivate@layers}{#1}%
- \KOMA@kav@replacebool{.scrlayer.sty}{deactivatepagestylelayers}
- {scrlayer@deactivate@layers}%
-}
-%</interface>
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @deactivatepagestylelayers\endcsname
- \relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @deactivatepagestylelayers@default\endcsname
- \relax
-%</interface&body>
-% \end{macrocode}
-% \end{macro}^^A \ifscrlayer@deactivate@layers
-% \end{option}^^A deactivatepagestylelayers
-% \end{command}^^A \ForEachLayerOfPageStyle
-%
-% \begin{macro}{\scrlayer@do@page@style@element@layer}
-% \changes{v3.26}{2018/07/14}{added hooks and artifact code}
-% Helper macro to show one layer. First argument is either ``background'' or
-% ``foreground'', second argument is either ``odd'' or ``even'', and third
-% argument is the name of the layer. Note, that in draft mode for every layer
-% will be shown also a \cs{layercontentsmeasure}.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\scrlayer@do@page@style@element@layer}[3]{%
- \begingroup
- \expandafter\ifx\csname if@scr@l@#3@\if@fcolmade\else non\fi floatpage%
- \expandafter\endcsname\csname iftrue\endcsname
- \expandafter\ifx\csname if@scr@l@#3@\if@twoside two\else one\fi side%
- \expandafter\endcsname\csname iftrue\endcsname
- \expandafter
- \ifx\csname if@scr@l@#3@#1\expandafter\endcsname
- \csname iftrue\endcsname
- \expandafter
- \ifx\csname if@scr@l@#3@#2\expandafter\endcsname
- \csname iftrue\endcsname
- \ifscrlayer@draft
- \scr@layerbox(\csname scr@l@#3@x\endcsname,%
- \csname scr@l@#3@y\endcsname)%
- (\csname scr@l@#3@w\endcsname,%
- \csname scr@l@#3@h\endcsname)%
- [\csname scr@l@#3@align\endcsname]%
- {%
- \scrlayer@predraftmeasure@hook
- \scrlayer@beginartifact{}%
- \layercontentsmeasure
- \scrlayer@endartifact{}%
- \scrlayer@postdraftmeasure@hook
- }%
- \fi
- \scr@layerbox(\csname scr@l@#3@x\endcsname,%
- \csname scr@l@#3@y\endcsname)%
- (\csname scr@l@#3@w\endcsname,%
- \csname scr@l@#3@h\endcsname)%
- [\csname scr@l@#3@align\endcsname]%
- {\csname layer\csname scr@l@#3@mode\endcsname
- mode\expandafter\endcsname{%
- \csname scr@l@#3@precontents@hook\endcsname
- \scr@ifundefinedorrelax{scr@l@#3@artifact}{}{%
- \expandafter\expandafter\expandafter
- \scrlayer@beginartifact
- \expandafter\expandafter\expandafter{%
- \csname scr@l@#3@artifact\endcsname
- }%
- \csname scr@l@#3@contents\endcsname
- \expandafter\expandafter\expandafter
- \scrlayer@endartifact
- \expandafter\expandafter\expandafter{%
- \csname scr@l@#3@artifact\endcsname
- }%
- }{%
- \csname scr@l@#3@contents\endcsname
- }%
- \csname scr@l@#3@postcontents@hook\endcsname
- }%
- }%
- \fi
- \fi
- \fi
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\scrlayer@predraftmeasure@hook}
-% \changes{v3.26}{2018/07/14}{added}
-% The hooks that will be executed before setting the draft measuring.
-% \begin{macrocode}
-\newcommand*{\scrlayer@predraftmeasure@hook}{}
-% \end{macrocode}
-% \begin{command}{\BeforeDraftMeasuringLayer}
-% \changes{v3.26}{2018/07/14}{added}
-% New code will be added in front of the hook.
-% \begin{macrocode}
-\newcommand*{\BeforeDraftMeasuringLayer}[1]{%
- \edef\scrlayer@predraftmeasure@hook{%
- \unexpanded{#1}\unexpanded\expandafter{\scrlayer@predraftmeasure@hook}%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \BeforeDraftMeasuringLayer
-% \end{macro}^^A \scrlayer@predraftmeasure@hook
-% \begin{macro}{\scrlayer@postdraftmeasure@hook}
-% \changes{v3.26}{2018/07/14}{added}
-% The hook that will be executed after setting the draft measuring.
-% \begin{macrocode}
-\newcommand*{\scrlayer@postdraftmeasure@hook}{}
-% \end{macrocode}
-% \begin{command}{\AfterDraftMeasuringLayer}
-% \changes{v3.26}{2018/07/14}{added}
-% New code will be added at the end of the hook.
-% \begin{macrocode}
-\newcommand*{\AfterDraftMeasuringLayer}[1]{%
- \expandafter\def\expandafter\scrlayer@postdraftmeasure@hook\expandafter{%
- \scrlayer@postdraftmeasure@hook #1%
- }%
-}
-% \end{macrocode}
-% \end{command}^^A \AfterDraftMeasuringLayer
-% \end{macro}^^A \scrlayer@postdraftmeasure@hook
-% \begin{macro}{\scr@layerbox}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\scr@@layerbox}
-% \changes{v3.24}{2017/05/08}{\cs{edef} replaced by \cs{protected@edef}}
-% \changes{v3.24}{2017/05/08}{\cs{dimexpr} added to \cs{layer\dots}}
-% \changes{v3.24}{2017/05/08}{\cs{dimexpr} removed from usage of
-% \cs{layer\dots}}
-% The layer box is used to output a layer in \cs{@oddhead}, \cs{@evenhead},
-% \cs{@oddfoot}, or \cs{@evenfoot}. Is has two pairs of arguments: ($x,y$)
-% and ($w,h$), where $x$ is the distance from left paper edge, $y$ is the
-% distance from the topmost edge of paper, $w$ is the width of the box and $h$
-% is the height of the box. The fifth argument is an optional vertical and
-% horizontal alignment of the box. It may be a combination of the alignment
-% characters described above. The sixth and last argument is the contents of
-% the layer, to be placed into the last argument of the innermost
-% \cs{parbox}.
-% \begin{macrocode}
-\def\scr@layerbox(#1,#2)(#3,#4){%
- \kernel@ifnextchar [%]
- {\scr@@layerbox(#1,#2)(#3,#4)}{\scr@@layerbox(#1,#2)(#3,#4)[]}%
-}
-\def\scr@@layerbox(#1,#2)(#3,#4)[#5]#6{%
- \begingroup
- \protected@edef\layerxoffset{\noexpand\dimexpr #1\relax}%
- \protected@edef\layeryoffset{\noexpand\dimexpr #2\relax}%
- \protected@edef\layerwidth{\noexpand\dimexpr #3\relax}%
- \protected@edef\layerheight{\noexpand\dimexpr #4\relax}%
- \def\layervalign{t}%
- \def\layerhalign{l}%
- \edef\reserved@b{#5}%
- \expandafter\@tfor\expandafter\reserved@a\expandafter:\expandafter=%
- \reserved@b\do{%
- \if t\reserved@a
- \def\layervalign{t}%
- \else
- \if c\reserved@a
- \def\layervalign{c}%
- \def\layerhalign{c}%
- \else
- \if b\reserved@a
- \def\layervalign{b}%
- \else
- \if l\reserved@a
- \def\layerhalign{l}%
- \else
- \if r\reserved@a
- \def\layerhalign{r}%
- \else
- \PackageWarning{scrlayer}{%
- Unknown alignment `\reserved@a' ignored}%
- \fi
- \fi
- \fi
- \fi
- \fi
- }%
- \parbox[t][\z@][t]{\z@}{%
- \vskip\layeryoffset
- \if b\layervalign\vskip-\layerheight\fi
- \if c\layervalign\vskip-.5\layerheight\fi
-% \end{macrocode}
-% \changes{3.23a}{2017/04/22}{\textsf{bidi} code added}
-% \changes{v3.24}{2017/05/04}{usage of \textsf{scrbase}'s \cs{IfRTL}}
-% If we are in right-to-left mode of package \textsf{bidi} or
-% \textsf{xepersian} the horizontal output is in the opposite direction. So we
-% need the \cs{makebox} to the right instead of the left and to move the
-% contents additionally by its width.
-% \begin{macrocode}
- \makebox[\z@][\IfRTL{r}{l}]{%
- \hskip\layerxoffset
- \IfRTL{\hskip\layerwidth}{}%
- \makebox[\z@][\layerhalign]{%
- \parbox[\layervalign][\layerheight][\layervalign]{\layerwidth}{%
- \vskip\z@\strut{%
- \ifscrlayer@forceignoreuppercase
- \expandafter\let\csname MakeUppercase \endcsname\@firstofone
- \let\MakeUppercase\@firstofone
- \let\uppercase\@firstofone
- \fi
- #6%
- }\strut\vskip\z@
- }%
- }%
- }%
- }%
- \endgroup
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \scr@@layerbox
-% \end{macro}^^A \scr@layerbox
-%
-% \begin{command}{\layerrawmode,\layertextmode}
-% \changes{v3.19}{2015/07/30}{added}
-% This is the command to output layers in raw mode. This is very simple:
-% \begin{macrocode}
-%<*package&body>
-\newcommand{\layerrawmode}[1]{#1}
-\newcommand{\layertextmode}[1]{#1}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \layerrawmode,\layertextmode
-%
-% \begin{command}{\layerpicturemode}
-% \changes{v3.19}{2015/07/30}{added}
-% \changes{v3.24}{2017/05/08}{redundant \cs{dimexpr} removed}
-% This is a bit more complicated. It is the layer output for \texttt{picture}
-% layers. In this case we use a picture environment and internally define some
-% additional commands.
-% \begin{macrocode}
-%<*package&body>
-\newcommand{\layerpicturemode}[1]{%
- \begin{picture}(0,0)
- (0,\LenToUnit{%
- \if t\layervalign \dimexpr\layerheight-\ht\strutbox\relax
- \else
- \if b\layervalign \dp\strutbox
- \else .5\dimexpr\layerheight-\ht\strutbox+\dp\strutbox\relax
- \fi
- \fi})
- \long\def\putLL##1{\put(0,0){##1}}%
- \long\def\putUL##1{\put(0,\LenToUnit{\layerheight}){##1}}%
- \long\def\putLR##1{\put(\LenToUnit{\layerwidth},0){##1}}%
- \long\def\putUR##1{\put(\LenToUnit{\layerwidth},%
- \LenToUnit{\layerheight}){##1}}%
- \long\def\putC##1{\put(\LenToUnit{.5\layerwidth},%
- \LenToUnit{.5\layerheight}){##1}}%
- #1%
- \end{picture}%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \layerpicturemode
-%
-% \begin{option}{draft}
-% \begin{macro}{\ifscrlayer@draft,\scrlayer@drafttrue,\scrlayer@draftfalse}
-% \begin{description}
-% \item[\marg{simple switch}:] whether or not to use the draft mode,
-% that, i.e., activates visualisation of the layers.
-% \end{description}
-% When option is set, every layer is shown twice: one time with it's own
-% contents and one time with contents \cs{layercontentsmeasure}.
-% \begin{macrocode}
-%<*options>
-%<*package>
-\KOMA@ifkey{draft}{scrlayer@draft}
-%<package>\scrlayer@@add@inherited@option{draft}
-%</package>
-%<*interface>
-\KOMA@key{draft}[true]{%
- \KOMA@set@ifkey{draft}{scrlayer@draft}{#1}%
- \KOMA@kav@replacebool{.scrlayer.sty}{draft}{scrlayer@draft}%
-}
-%</interface>
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @draft\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @draft@default\endcsname\relax
-%</interface&body>
-% \end{macrocode}
-% \end{macro}^^A \ifscrlayer@draft
-% \end{option}^^A draft
-% \end{macro}^^A \scrlayer@do@page@style@element@layer
-% \end{command}^^A \DeclarePageStyleByLayers
-%
-%
-% \begin{command}{\DeclareNewPageStyleByLayers}
-% Arguments like \cs{DeclarePageStyleByLayers}; results in error if the page
-% style has been defined (or declared) already.
-% \begin{command}{\ProvidePageStyleByLayers}
-% Arguments like \cs{DeclarePageStyleByLayers}; doesn't define anything it
-% the page style has been defined (or declared) already.
-% \begin{command}{\RedeclarePageStyleByLayers}
-% Arguments like \cs{DeclarePageStyleByLayers}; results in error if the page
-% style hasn't been defined (or declared) already.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\DeclareNewPageStyleByLayers}[2][]{%
- \@ifundefined{ps@#2}{}{%
- \PackageError{scrlayer}{%
- Page style `#2' already defined%
- }{%
- You may use \string\DeclareNewPageStyleByLayers\space to declare a new
- page style only\MessageBreak
- if that page style hasn't been declared or defined before.\MessageBreak
- You may use either \string\ProvidePageStyleByLayers\space to declare the
- page style only\MessageBreak
- if it hasn't been declared or defined before, or
- \string\RedeclarePageStyleByLayers\MessageBreak
- to overwrite the former
- declaration or definition of the page style%
- \@ifundefined{@ps@#2@layers}{}{,\MessageBreak
- or \string\AddLayersToPageStyle\space to add further layers to the
- already declared\MessageBreak
- page style, or \string\RemoveLayersFromPageStyle\space to remove
- layers from the\MessageBreak
- already declared page style}.\MessageBreak
- Nevertheless, if you'll continue, the page style will be
- overwritten\MessageBreak
- by the new declaration.%
- }%
- }%
- \DeclarePageStyleByLayers[{#1}]{#2}%
-}
-\newcommand*{\ProvidePageStyleByLayers}[3][]{%
- \@ifundefined{ps@#2}{%
- \DeclarePageStyleByLayers[{#1}]{#2}{#3}%
- }{%
-%<*trace>
- \PackageInfo{scrlayer}{%
- \string\ProvidePageStyleByLayers{#2}{#3} ignored,\MessageBreak
- because page style `#2'\MessageBreak
- already exists%
- }%
-%</trace>
- }%
-}
-\newcommand*{\RedeclarePageStyleByLayers}[2][]{%
- \@ifundefined{ps@#2}{%
- \PackageError{scrlayer}{%
- Page style `#2' not yet defined%
- }{%
- You may use \string\RedeclarePageStyleByLayers\space to declare a page
- style only\MessageBreak
- if that page style has already been declared or defined.\MessageBreak
- You may use either \string\DeclareNewPageStyleByLayers,
- \string\DeclarePageStyleByLayers,\MessageBreak
- or \string\ProvidePageStyleByLayers\space to declare that not yet
- defined page style.\MessageBreak
- Nevertheless, if you'll continue, the page style will be declared.%
- }%
- }{}%
- \DeclarePageStyleByLayers[{#1}]{#2}%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \RedeclarePageStyleByLayers
-% \end{command}^^A \ProvidePageStyleByLayers
-% \end{command}^^A \DeclareNewPageStyleByLayers
-%
-% \begin{pgstyle}{@everystyle@,empty}
-% We also declare page style \pstyle{@everystyle@} by default. You should
-% not use this page style as an real page style (even not as the empty
-% one). The layers of this page style will be used by every other layer page
-% style. An we re-declare \pstyle{empty} to be a layer page style.
-% \begin{macrocode}
-%<*package&final>
-\DeclareNewPageStyleByLayers{@everystyle@}{}
-\RedeclarePageStyleByLayers{empty}{}
-%</package&final>
-% \end{macrocode}
-% \end{pgstyle}
-%
-% \begin{command}{\AddLayersToPageStyle}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{command}{\AddLayersAtBeginOfPageStyle,\AddLayersAtEndOfPageStyle}
-% \begin{command}{\RemoveLayersFromPageStyle}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{description}
-% \item[\marg{string}:] the name of the page style to be modified (must
-% be expandable and result in a string).
-% \item[\marg{string list}:] comma separated list of layer names (must
-% be expandable and result in strings); first in the list will be added
-% first.
-% \end{description}
-% Change the layer list of a given page style. The differences between the
-% commands are:
-% \begin{description}
-% \item[\cs{AddLayersToPageStyle}:] first in the \meta{string list} will
-% be added first at the end.
-% \item[\cs{AddLayersAtBeginOfPageStyle}:] first in the \meta{string list}
-% will be added first at the start. Note, that this will result in changing
-% the order of the layers in \meta{string list}.
-% \item[\cs{AddLayerAtEndOfPageStyle}:] same like
-% \cs{AddLayerToPageStyle}.
-% \item[\cs{RemoveLayersFromPageStyle}:] remove the layers from the page
-% style's layer list.
-% \end{description}
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\AddLayersToPageStyle}[2]{%
- \edef\reserved@b{\GetRealPageStyle{#1}}%
- \IfLayerPageStyleExists{\reserved@b}{%
- \@for \reserved@a:=#2\do {%
- \scr@trim@spaces\reserved@a
- \Ifstr\reserved@a\@empty{}{%
- \expandafter\@cons\csname @ps@\reserved@b @layers\endcsname
- {{\reserved@a}}%
- }%
- }%
- }{%
- \scrlayer@lpm@error{#1}{adding layers}%
- }%
-}
-\newcommand*{\AddLayersAtEndOfPageStyle}{%
- \AddLayersToPageStyle
-}
-\newcommand*{\AddLayersAtBeginOfPageStyle}[2]{%
- \begingroup
- \let\@cons\@snoc
- \AddLayersToPageStyle{#1}{#2}%
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\@snoc}
-% \cs{@snoc} is a helper macro similar to \cs{@cons} from \LaTeX{} kernel, but
-% it appends at the front instead of the end.
-% \begin{macrocode}
-\newcommand*{\@snoc}[2]{%
- \begingroup\let\@elt\relax\xdef#1{\@elt #2#1}\endgroup
-}
-% \end{macrocode}
-% \end{macro}^^A \@snoc
-% \begin{macrocode}
-\newcommand*{\RemoveLayersFromPageStyle}[2]{%
- \edef\reserved@b{\GetRealPageStyle{#1}}%
- \IfLayerPageStyleExists{#1}{%
- \@for \reserved@a:=#2\do {%
- \scr@trim@spaces\reserved@a
- \Ifstr\reserved@a\@empty{}{%
- \expandafter\remove@layer@from@page@style\expandafter{\reserved@a}%
- {\reserved@b}%
- }%
- }%
- }{%
- \scrlayer@lpm@error{#1}{removing layers}%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\remove@layer@from@page@style}
-% \changes{v0.9}{2014/07/25}{cleaning of layer list must be global}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Helper macro to remove exactly one layer (arg 1) from a page style (arg 2).
-% \begin{macrocode}
-\newcommand*{\remove@layer@from@page@style}[2]{%
- \begingroup
- \expandafter\let\expandafter\reserved@a\csname @ps@#2@layers\endcsname
- \expandafter\global\expandafter\let\csname @ps@#2@layers\endcsname\@empty
- \def\@elt##1{%
- \Ifstr{#1}{##1}{}{%
- \expandafter\@cons\csname @ps@#2@layers\endcsname{{##1}}%
- }%
- }\reserved@a
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}^^A \remoce@layer@from@page@style
-% \begin{macro}{\scrlayer@lpm@error}
-% \begin{description}
-% \item[\marg{string}:] the name of the page style to be modified (must
-% be expandable and result in a string).
-% \item[\marg{string}:] the kind of modification, that isn't allowed
-% (must be expandable and result in a string).
-% \end{description}
-% Show an error because of page style it either not a defined or not a layer
-% page style.
-% \begin{macrocode}
-\newcommand*{\scrlayer@lpm@error}[2]{%
- \PackageError{scrlayer}{`#1' is not a layer page style}{%
- \scr@ifundefinedorrelax{ps@#1}{%
- Page style `#1' is not defined,
- }{%
- Page style `#1' is not a layer page style,
- }%
- but #2\MessageBreak
- may be used only for layer page styles declared using\MessageBreak
- \string\DeclarePageStyleByLayers,
- \string\DeclareNewPageStyleByLayers,\MessageBreak
- of \string\ProvidePageStyleByLayers.\MessageBreak
- If you'll continue, your operation will be ignored.%
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \scrlayer@lpm@error
-% \end{command}^^A \RemoveLayersFromPageStyle
-% \end{command}^^A \AddLayersAtBeginOfPageStyle,\AddLayersAtEndOfPageStyle
-% \end{command}^^A \AddLayersToPageStyle
-%
-% \begin{command}{\AddLayersToPageStyleBeforeLayer,
-% \AddLayersToPageStyleAfterLayer}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added}
-% \begin{description}
-% \item[\marg{string}:] the name of the page style to be modified (must
-% be expandable and result in a string).
-% \item[\marg{string list}:] comma separated list of layer names (must
-% be expandable and result in strings); first in the list will be added
-% first.
-% \item[\marg{string}:] the name of the layer before
-% (\cs{AddLayersToPageStyleBeforeLayer}) or after
-% (\cs{AddLayersToPageStyleAfterLayer}) that the layers of the list
-% should be added.
-% \end{description}
-% Note: If the layer from third argument is not part of the page style's layer
-% list, the new layers won't be added anywhere.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\AddLayersToPageStyleAfterLayer}[3]{%
- \edef\reserved@b{\GetRealPageStyle{#1}}%
- \IfLayerPageStyleExists{\reserved@b}{%
- \begingroup
- \expandafter\let\expandafter\reserved@a
- \csname @ps@\reserved@b @layers\endcsname
- \@namedef{@ps@\reserved@b @layers}{}%
- \def\@elt##1{%
- \Ifstr{##1}\@empty{}{%
- \expandafter\@cons\csname @ps@\reserved@b @layers\endcsname{{##1}}%
- \Ifstr{##1}{#3}{%
- \@for \reserved@a:=#2\do {%
- \scr@trim@spaces\reserved@a
- \Ifstr\reserved@a\@empty{}{%
- \expandafter\@cons\csname @ps@\reserved@b @layers\endcsname
- {{\reserved@a}}%
- }%
- }%
- }{}%
- }%
- }%
- \reserved@a
- \endgroup
- }{%
- \scrlayer@lpm@error{#1}{adding layers}%
- }%
-}
-\newcommand*{\AddLayersToPageStyleBeforeLayer}[3]{%
- \edef\reserved@b{\GetRealPageStyle{#1}}%
- \IfLayerPageStyleExists{\reserved@b}{%
- \begingroup
- \expandafter\let\expandafter\reserved@a
- \csname @ps@\reserved@b @layers\endcsname
- \@namedef{@ps@\reserved@b @layers}{}%
- \def\@elt##1{%
- \Ifstr{##1}\@empty{}{%
- \Ifstr{##1}{#3}{%
- \@for \reserved@a:=#2\do {%
- \scr@trim@spaces\reserved@a
- \Ifstr\reserved@a\@empty{}{%
- \expandafter\@cons\csname @ps@\reserved@b @layers\endcsname
- {{\reserved@a}}%
- }%
- }%
- }{}%
- \expandafter\@cons\csname @ps@#1@layers\endcsname{{##1}}%
- }%
- }%
- \reserved@a
- \endgroup
- }{%
- \scrlayer@lpm@error{#1}{adding layers}%
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \AddLayersToPageStyleBeforeLayer,
-% ^^A \AddLayersToPageStyleAfterLayer
-%
-%
-% \begin{command}{\UnifyLayersAtPageStyle}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{description}
-% \item[\marg{string}:] the name of the page style to be unified (must
-% be expandable and result in a string).
-% \end{description}
-% Remove doublets of layers from a page style.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\UnifyLayersAtPageStyle}[1]{%
- \edef\reserved@b{\GetRealPageStyle{#1}}%
- \IfLayerPageStyleExists{\reserved@b}{%
- \expandafter\let\expandafter\reserved@a
- \csname @ps@\reserved@b @layers\endcsname
- \@namedef{@ps@\reserved@b @layers}{}%
- \begingroup
- \def\@elt##1{%
- \Ifstr{##1}\@empty{}{%
- \remove@layer@from@page@style{##1}{\reserved@b}%
- \expandafter\@cons\csname @ps@\reserved@b @layers\endcsname{{##1}}%
- }%
- }%
- \reserved@a
- \endgroup
- }{%
- \scrlayer@lpm@error{#1}{unifying}%
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \UnifyLayersAtPageStyle
-%
-% \begin{command}{\ModifyLayerPageStyleOptions,\AddToLayerPageStyleOptions}
-% \begin{description}
-% \item[\marg{string}:] the name of the page style to be modified (must
-% be expandable and result in a string).
-% \item[\marg{option list}:] comma separated list of named page
-% style options. You may use any of the options provided for
-% \cs{DeclarePageStyle}.
-% \end{description}
-% \cs{ModifyLayerPageStyleOptions} replaces the options and only the
-% options from the list by their new
-% values. \cs{AddToLayerPageStyleOptions} adds the new values to the
-% already given.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\ModifyLayerPageStyleOptions}[2]{%
- \edef\reserved@a{\GetRealPageStyle{#1}}%
- \IfLayerPageStyleExists{#1}{%
- \expandafter\scrlayer@modify@layer@ps@options\expandafter{%
- \reserved@a
- }{#2}%
- }{%
- \scrlayer@lpm@error{#1}{modifying}%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\scrlayer@modify@layer@ps@options}
-% \changes{v3.28}{2019/11/28}{usage of marker makros}
-% Helper needed because of alias page styles. Same parameters like
-% \cs{ModifyLayerPageStyleOptions}
-% \begin{macrocode}
-\newcommand*{\scrlayer@modify@layer@ps@options}[2]{%
- \begingroup
- \def\scrlayer@current@pagestyle{#1}%
- \@namedef{@ps@#1@initialhook}{}%
- \@namedef{@ps@#1@hook}{}%
- \@namedef{@ps@#1@backgroundhook}{}%
- \@namedef{@ps@#1@foregroundhook}{}%
- \@namedef{@ps@#1@oddpagehook}{}%
- \@namedef{@ps@#1@evenpagehook}{}%
- \@namedef{@ps@#1@onesidehook}{}%
- \@namedef{@ps@#1@twosidehook}{}%
- \@namedef{@ps@#1@floatpagehook}{}%
- \@namedef{@ps@#1@nonfloatpagehook}{}%
- \let\scr@opt@marker@initialhook\@empty
- \let\scr@opt@marker@hook\@empty
- \let\scr@opt@marker@backgroundhook\@empty
- \let\scr@opt@marker@foregroundhook\@empty
- \let\scr@opt@marker@oddpagehook\@empty
- \let\scr@opt@marker@evenpagehook\@empty
- \let\scr@opt@marker@onesidehook\@empty
- \let\scr@opt@marker@twosidehook\@empty
- \let\scr@opt@marker@floatpagehook\@empty
- \let\scr@opt@marker@nonfloatpagehook\@empty
- \FamilyExecuteOptions[.definelayerpagestyle]{KOMAarg}{#2}%
- \def\reserved@a{\endgroup}%
- \def\@sls@##1{%
- \expandafter\ifx \csname scr@opt@marker@##1hook\endcsname\@empty\else
- \expandafter\let\expandafter\reserved@b\csname @ps@#1@##1hook\endcsname
- \l@addto@macro\reserved@a{\@namedef{@ps@#1@##1hook}}%
- \expandafter\l@addto@macro\expandafter\reserved@a\expandafter{%
- \expandafter{%
- \reserved@b
- }%
- }%
- \fi
- }%
- \@sls@{initial}%
- \@sls@{}%
- \@sls@{background}%
- \@sls@{foreground}%
- \@sls@{oddpage}%
- \@sls@{evenpage}%
- \@sls@{oneside}%
- \@sls@{twoside}%
- \@sls@{floatpage}%
- \@sls@{nonfloatpage}%
- \reserved@a
-}
-% \end{macrocode}
-% \end{macro}^^A \scrlayer@modify@layer@ps@options
-% \begin{macrocode}
-\newcommand*{\AddToLayerPageStyleOptions}[2]{%
- \IfLayerPageStyleExists{#1}{%
- \def\scrlayer@current@pagestyle{#1}%
- \FamilyExecuteOptions[.definelayerpagestyle]{KOMAarg}{#2}%
- }{%
- \scrlayer@lpm@error{#1}{modifying}%
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \ModifyLayerPageStyleOptions,\AddToLayerPageStyleOptions
-%
-%
-% \begin{macro}{\scrlayer@beginartifact,\scrlayer@endartifact}
-% \changes{v3.26}{2018/07/14}{new (semi internal)}
-% These macros are reserved for tagging packages. The first one is executed
-% after the initial contents hook, the last one is executed after the final
-% contents hook. Both executions are done only, if the \texttt{artifact}
-% option of the layer has been used an was not boolean false. With boolean
-% true the argument will be empty. All other values will be passed as
-% argument.
-%
-% In case of package \textsf{tagpdf} the following definition would be
-% usefull (here automatically done after loading the package, if the package
-% does not do its own definitions):
-% \begin{macrocode}
-%<*package&body>
-\RequirePackage{scrlfile}
-\BeforePackage{tagpdf}{%
-% \end{macrocode}
-% Deactivation of the two commands before loading \textsf{tagpdf}, so that
-% after loading the package \cs{providecommand} can be used to do a new
-% default definition.
-% \begin{macrocode}
- \let\scrlayer@beginartifact\relax
- \let\scrlayer@endartifact\relax
-}
-\AfterPackage*{tagpdf}{%
- \providecommand*{\scrlayer@beginartifact}[1]{%
- \Ifstr{#1}{}{%
- \tagmcbegin{artifact}%
- }{%
- \tagmcbegin{artifact=#1}%
- }%
- }%
- \providecommand*{\scrlayer@endartifact}[1]{%
- \tagmcend
- }%
-}
-% \end{macrocode}
-% But the default definition (if \textsf{tagpdf} has not already been loaded)
-% are simple dummies:
-% \begin{macrocode}
-\providecommand*{\scrlayer@beginartifact}[1]{}
-\providecommand*{\scrlayer@endartifact}[1]{}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \scrlayer@beginartifact,\scrlayer@endartifact
-%
-% \begin{command}{\DeclarePageStyleAlias,\DeclareNewPageStyleAlias,
-% \ProvidePageStyleAlias,\RedeclarePageStyleAlias}
-% \begin{description}
-% \item[\marg{string}:] The name of the page style to be declared
-% (must be expandable and result in a string).
-% \item[\marg{string}:] The name of the existing page style
-% (must be expandable and result in a string).
-% \end{description}
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\DeclarePageStyleAlias}[2]{%
- \edef\reserved@a{\GetRealPageStyle{#2}}%
- \scr@ifundefinedorrelax{ps@\reserved@a}{%
- \PackageError{scrlayer}{unknown real page style `#2'}{%
- You've tried to declare an alias for page style `#2',\MessageBreak
- but the real page style of `#2' is undefined.\MessageBreak
- You can define aliases, only if the real page style has been
- defined.\MessageBreak
- If you'll continue, the declaration will be ignored.%
- }%
- \DestroyRealLayerPageStyle{#1}%
- \DestroyLayerAlias{#1}%
- }{%
- \@namedef{@ps@#1@alias}{#2}%
- \@namedef{ps@#1}{\pagestyle{\@nameuse{@ps@#1@alias}}}%
- }%
-}
-\newcommand*{\DeclareNewPageStyleAlias}[1]{%
- \@ifundefined{ps@#1}{}{%
- \PackageError{scrlayer}{%
- Page style `#1' already defined%
- }{%
- You may use \string\DeclareNewPageStyleAlias\space to declare a new
- page style only\MessageBreak
- if that page style hasn't been declared or defined before.\MessageBreak
- You may use either \string\ProvidePageStyleAlias\space to declare the
- page style only\MessageBreak
- if it hasn't been declared or defined before, or
- \string\RedeclarePageStyleAlias\MessageBreak
- to overwrite the former declaration or definition of the page
- style\MessageBreak
- Nevertheless, if you'll continue, the page style will be
- overwritten\MessageBreak
- by the new alias.%
- }%
- }%
- \DeclarePageStyleAlias{#1}%
-}
-\newcommand*{\ProvidePageStyleAlias}[2]{%
- \@ifundefined{ps@#1}{%
- \DeclarePageStyleAlias{#1}{#2}%
- }{%
-%<*trace>
- \PackageInfo{scrlayer}{%
- \string\ProvidePageStyleAlias{#1}{#2} ignored,\MessageBreak
- because page style `#1' already\MessageBreak
- exists%
- }%
-%</trace>
- }%
-}
-\newcommand*{\RedeclarePageStyleAlias}[1]{%
- \@ifundefined{ps@#1}{%
- \PackageError{scrlayer}{%
- Page style `#1' not yet defined%
- }{%
- You may use \string\RedeclarePageStyleAlias\space to declare a page
- style only\MessageBreak
- if that page style has already been declared or defined.\MessageBreak
- You may use either \string\DeclareNewPageStyleAlias,
- \string\DeclarePageStyleAlias,\MessageBreak
- or \string\ProvidePageStyleAlias\space to declare that not yet
- defined page style.\MessageBreak
- Nevertheless, if you'll continue, the page style will be declared.%
- }%
- }{}%
- \DeclarePageStyleAlias{#1}%
-}
-% \end{macrocode}
-% \end{command}^^A \DeclarePageStyleAlias …
-%
-% \begin{command}{\DestroyPageStyleAlias}
-% \begin{description}
-% \item[\marg{string}:] the name of a page style (must be
-% expandable and result in a string).
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\DestroyPageStyleAlias}[1]{%
- \scr@ifundefinedorrelax{@ps@#1@alias}{}{%
- \expandafter\let\csname @ps@#1@alias\endcsname\relax
- \expandafter\let\csname ps@#1\endcsname\relax
- }%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\GetRealPageStyle}
-% \begin{description}
-% \item[\marg{string}:] the name of a page style (must be
-% expandable and result in a string).
-% \end{description}
-% Get the real name of the page style.
-% \begin{macrocode}
-\newcommand*{\GetRealPageStyle}[1]{%
- \scr@ifundefinedorrelax{@ps@#1@alias}{#1}{%
- \expandafter\GetRealPageStyle\expandafter{%
- \expandafter\csname @ps@#1@alias\expandafter\endcsname\expandafter}%
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\IfLayerPageStyleExists,\IfRealLayerPageStyleExists}
-% \begin{description}
-% \item[\marg{string}:] the name of the page style to be tested (must
-% be expandable and result in a string).
-% \item[\marg{code}:] whatever code should be expanded, if the test
-% result is true.
-% \item[\marg{code}:] whatever code should be expanded, if the test
-% result is false.
-% \end{description}
-% Test, whether or not the page style is a declared layer page style.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\IfLayerPageStyleExists}[1]{%
- \scr@ifundefinedorrelax{ps@#1}{%
- \expandafter\@secondoftwo
- }{%
- \scr@ifundefinedorrelax{@ps@#1@layers}{%
- \scr@ifundefinedorrelax{@ps@#1@alias}{%
- \expandafter\@secondoftwo
- }{%
- \expandafter\IfLayerPageStyleExists\expandafter{%
- \expandafter\csname @ps@#1@alias\expandafter\endcsname\expandafter}%
- }%
- }{%
- \expandafter\@firstoftwo
- }%
- }%
-}
-\newcommand*{\IfRealLayerPageStyleExists}[1]{%
- \scr@ifundefinedorrelax{ps@#1}{%
- \expandafter\@secondoftwo
- }{%
- \scr@ifundefinedorrelax{@ps@#1@layers}{%
- \expandafter\@secondoftwo
- }{%
- \expandafter\@firstoftwo
- }%
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \IfLayerPageStyleExists,\IfRealLayerPageStyleExists
-%
-% \begin{command}{\IfLayerAtPageStyle,\IfSomeLayersAtPageStyle}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{command}{\IfLayersAtPageStyle}
-% \begin{description}
-% \item[\marg{string}:] the name of the page style to be tested (must
-% be expandable and result in a string).
-% \item[\marg{string}:] the name(s) of the layer(s) to be tested (must be
-% expandable and result in a string).
-% \item[\marg{code}:] whatever code should be expanded, if the test
-% result is true.
-% \item[\marg{code}:] whatever code should be expanded, if the test
-% result is false.
-% \end{description}
-% Tests:
-% \begin{description}
-% \item[\cs{IfLayerAtPageStyle}:] Test, whether or not the page style has a
-% layer. The second argument is the name of one layer only!
-% \item[\cs{IfSomeLayersAtPageStyle}:] Test, whether or not the page style
-% has at least one layer of a list of layers. The second argument is a comma
-% separated list of layer names.
-% \item[\cs{IfLayersAtPageStyle}:] Test, whether or not the page style has
-% every layer of a list of layers. The second argument is a comma separated
-% list of layer names.
-% \end{description}
-% Note, that testing an page style, that is not a layer page style will result
-% in an error and neither the third nor the fourth argument will be expanded.
-% Note, that layers with empty name are only part of a layer page style
-% without any layers.
-%
-% Note also, that with active \opt{deactivatepagestylelayers} layers are
-% logically not longer part of the page styles.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\IfLayerAtPageStyle}[2]{%
- \IfLayerPageStyleExists{#1}{%
- \begingroup
- \edef\reserved@a{\GetRealPageStyle{#1}}%
- \@tempswafalse
- \Ifstr{#2}{}{%
- \expandafter\ifx\csname @ps@\reserved@a @layers\endcsname\@empty
- \@tempswatrue
- \fi
- }{%
- \expandafter\ForEachLayerOfPageStyle\expandafter{%
- \reserved@a}{\Ifstr{##1}{#2}{\aftergroup\@tempswatrue}{}}%
- }%
- \if@tempswa \aftergroup\@firstoftwo \else \aftergroup\@secondoftwo \fi
- \expandafter\endgroup
- }{%
- \scrlayer@lpm@error{#1}{testing for layers}%
- \expandafter\@gobbletwo
- }%
-}
-\newcommand*{\IfSomeLayersAtPageStyle}[2]{%
- \IfLayerPageStyleExists{#1}{%
- \begingroup
- \@tempswafalse
- \@for \reserved@a:=#2\do {%
- \scr@trim@spaces\reserved@a
- \edef\reserved@a{\noexpand\IfLayerAtPageStyle{#1}{\reserved@a}}%
- \reserved@a{\@tempswatrue}{}%
- }%
- \if@tempswa \aftergroup\@firstoftwo \else \aftergroup\@secondoftwo \fi
- \expandafter\endgroup
- }{%
- \scrlayer@lpm@error{#1}{testing for layers}%
- \expandafter\@gobbletwo
- }%
-}
-\newcommand*{\IfLayersAtPageStyle}[2]{%
- \IfLayerPageStyleExists{#1}{%
- \begingroup
- \@tempswatrue
- \Ifstr{#2}{}{%
- \edef\reserved@a{\GetRealPageStyle{#1}}%
- \expandafter\ifx\csname @scr@\reserved@a @layers\endcsname\@empty \else
- \@tempswafalse
- \fi
- }{%
- \@for \reserved@a:=#2\do {%
- \scr@trim@spaces\reserved@a
- \edef\reserved@a{\noexpand\IfLayerAtPageStyle{#1}{\reserved@a}}%
- \reserved@a{}{\@tempswafalse}%
- }%
- }%
- \if@tempswa \aftergroup\@firstoftwo \else \aftergroup\@secondoftwo \fi
- \expandafter\endgroup
- }{%
- \scrlayer@lpm@error{#1}{testing for layers}%
- \expandafter\@gobbletwo
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \IfLayersAtPageStyle
-% \end{command}^^A \IfLayerAtPageStyle,\IfSomeLayersAtPageStyle
-%
-%
-% \begin{command}{\DestroyRealLayerPageStyle}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% \begin{description}
-% \item[\marg{string}:] name of the layer page style to be destroyed.
-% \end{description}
-% Destroys the given layer page style but not the layers! If the page style is
-% the current page style, the empty page style an empty page style will be
-% activated. If the special page style is valid an the destroyed one, this
-% will be removed. This command could be used, e.g., at
-% \cs{scrlayerOnAutoRemoveInterface} after destroying the layers. However,
-% the interface commands are deprecated.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\DestroyRealLayerPageStyle}[1]{%
- \IfRealLayerPageStyleExists{#1}{%
- \expandafter\let\csname @ps@#1@initialhook\endcsname\relax
- \expandafter\let\csname @ps@#1@hook\endcsname\relax
- \expandafter\let\csname @ps@#1@backgroundhook\endcsname\relax
- \expandafter\let\csname @ps@#1@foregroundhook\endcsname\relax
- \expandafter\let\csname @ps@#1@oddpagehook\endcsname\relax
- \expandafter\let\csname @ps@#1@evenpagehook\endcsname\relax
- \expandafter\let\csname @ps@#1@onesidehook\endcsname\relax
- \expandafter\let\csname @ps@#1@twosidehook\endcsname\relax
- \expandafter\let\csname @ps@#1@floatpagehook\endcsname\relax
- \expandafter\let\csname @ps@#1@nonfloatpagehook\endcsname\relax
- \expandafter\let\csname @ps@#1@layers\endcsname\relax
- \expandafter\let\csname ps@#1\endcsname\relax
- \Ifstr{\currentpagestyle}{#1}{%
- \def\currentpagestyle{scrlayer@empty}%
- \let\@oddhead\@empty\let\@evenhead\@empty
- \let\@oddfoot\@empty\let\@evenfoot\@empty
- }{}%
- \if@specialpage
- \Ifstr{\@specialstyle}{#1}{%
- \global\let\@specialstyle\relax
- \global\@specialpagefalse
- }{}%
- \fi
- }{%
-%<*trace>
- \PackageInfo{scrlayer}{%
- \string\DestroyRealLayerPageStyle{#1} ignored,\MessageBreak
- because the layer page style isn't\MessageBreak
- defined (any longer)%
- }%
-%</trace>
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \DestroyRealLayerPageStyle
-%
-%
-% \subsection{Kernel Patches}
-%
-% This package as so many others need to patch the \LaTeX{} kernel. This will
-% be done, because we need information about the current active package style.
-%
-% \begin{command}{\pagestyle}
-% \begin{command}{\currentpagestyle}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% We save the current page style. Note, that this doesn't work for special
-% page styles\footnote{Special page styles are set by
-% \cs{thispagestyle}.} that hasn't been defined using
-% \pkg*{scrlayer}. As long as \cs{currentpagestyle} is empty, the
-% current page style is unknown. And we add two hooks into page style
-% selection: one before an one after the selection.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\currentpagestyle}{}
-\PackageInfo{scrlayer}{patching LaTeX kernel macro \string\pagestyle}
-\def\reserved@a{%
- \iftoplevelpagestyle\edef\toplevelpagestyle{##1}\toplevelpagestylefalse\fi
- \scrlayer@exec@before@pagestyle@hook{##1}%
-}
-\expandafter\expandafter\expandafter\renewcommand
-\expandafter\expandafter\expandafter*%
-\expandafter\expandafter\expandafter\pagestyle
-\expandafter\expandafter\expandafter[%
-\expandafter\expandafter\expandafter1%
-\expandafter\expandafter\expandafter]%
-\expandafter\expandafter\expandafter{%
- \expandafter\reserved@a
- \pagestyle{#1}%
- \edef\currentpagestyle{\GetRealPageStyle{#1}}%
- \scrlayer@exec@after@pagestyle@hook{#1}%
- \toplevelpagestyletrue
-}
-\newif\iftoplevelpagestyle\toplevelpagestyletrue
-\AtBeginDocument{%
- \begingroup
- \let\scrlayer@exec@before@pagestyle@hook\@gobble
- \let\scrlayer@exec@after@pagestyle@hook\@gobble
- \def\ps@test{}%
- \pagestyle{test}%
- \Ifstr{\currentpagestyle}{test}{}{%
- \PackageError{scrlayer}{package incompatibility detected}{%
- Another package redefines \string\pagestyle\space incompatible with
- scrlayer.\MessageBreak
- This disables setting of \string\currentpagestyle\space and may
- be serious.\MessageBreak
- Maybe you could prevent this loading package scrlayer
- later.\MessageBreak
- If not you should either not use scrlayer or not the other
- package,\MessageBreak
- that redefines \string\pagestyle.%
- }%
- }%
- \endgroup
-}
-%</package&body>
-% \end{macrocode}
-% \end{command}^^A \currentpagestyle
-%
-% \begin{command}{\BeforeSelectAnyPageStyle,\AfterSelectAnyPageStyle}
-% \begin{macro}{\scrlayer@exec@before@pagestyle@hook,
-% \scrlayer@exec@after@pagestyle@hook}
-% We have two macros to locally add code to be executed whenever a page style
-% changes using \cs{pagestyle}. The first one executes the code before the
-% page style will be changed, the second one after the page style has been
-% changed. Note, that you may use \#1 as a placeholder of the argument of
-% \cs{pagestyle}.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\BeforeSelectAnyPageStyle}[1]{%
- \expandafter\renewcommand\expandafter*%
- \expandafter\scrlayer@exec@before@pagestyle@hook
- \expandafter[\expandafter1\expandafter]\expandafter{%
- \scrlayer@exec@before@pagestyle@hook{##1}#1}%
-}
-\newcommand*{\scrlayer@exec@before@pagestyle@hook}[1]{}
-\newcommand*{\AfterSelectAnyPageStyle}[1]{%
- \expandafter\renewcommand\expandafter*%
- \expandafter\scrlayer@exec@after@pagestyle@hook
- \expandafter[\expandafter1\expandafter]\expandafter{%
- \scrlayer@exec@after@pagestyle@hook{##1}#1}%
-}
-\newcommand*{\scrlayer@exec@after@pagestyle@hook}[1]{}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \scrlayer@exec@after@pagestyle@hook …
-% \end{command}^^A \BeforeSelectAnyPageStyle,\AfterSelectAnyPageStyle
-% \end{command}^^A \pagestyle
-%
-%
-% \subsection{Deprecated declaration of end user interfaces}
-%
-% \changes{v3.32}{2020/09/11}{the interface commands are deprecated}
-%
-% All commands of this subsection are deprecated. So they are declared as
-% internal independent from their name.
-%
-% \begin{macro}{\scrlayerAddToInterface,\scrlayerAddCsToInterface}
-% \begin{description}
-% \item[\texttt{\{\meta{command}\textbar\meta{command sequence}\}}:] the
-% command (with backslash) or the command sequence of the command (without
-% backslash) of the command, that should be added to the interface.
-% \item[\marg{code}:] will be executed, only if the command could be
-% added to the interface.
-% \end{description}
-% Add either a command sequence or a command to the user interface.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\scrlayerAddToInterface}[2][\@currname.\@currext]{%
- \scrlayer@report@deprecated{#1}{\scrlayerAddToInterface}%
- \begingroup
- \edef\reserve@a{%
- \noexpand\scrlayerAddCsToInterface[#1]{\expandafter\@gobble\string #2}%
- }%
- \expandafter\endgroup\reserve@a
-}
-\newcommand{\scrlayerAddCsToInterface}[3][\@currname.\@currext]{%
- \scrlayer@report@deprecated{#1}{\scrlayerAddCsToInterface}%
- \@ifundefined{scrlayer@#1@commandlist}{%
- \PackageError{scrlayer}{unkown interface `#1'}{%
- I've been told to add a command sequence to an interface, that hasn't
- been\MessageBreak
- defined yet. Please initialise every interface using
- \string\InitInterface\space before\MessageBreak
- trying to add command sequences to it.\MessageBreak
- If you'll continue, the command will be ignored.%
- }%
- }{%
- \@ifundefined{#2}{%
- \scrlayer@AddCsToInterface[#1]{#2}#3%
- }{%
- \@ifundefined{scrlayer@command@#2}{%
- \ifscrlayer@forceoverwrite
- \PackageWarning{scrlayer}{%
- Overloading `\@backslashchar#2'!\MessageBreak
- scrlayer detected, that the given command\MessageBreak
- has been defined already, when\MessageBreak
- `#1' tried to define it again.\MessageBreak
- Nevertheless, while scrlayer is in force overwrite\MessageBreak
- mode currently, the original definition will be\MessageBreak
- removed%
- }%
- \expandafter\let\csname #2\endcsname\relax
- \scrlayer@AddCsToInterface[#1]{#2}#3%
- \else
- \PackageError{scrlayer}{cannot define `\@backslashchar#2'}{%
- scrlayer interface `#1' has tried to
- define command\MessageBreak
- `\@backslashchar#2', but this has already been defined\MessageBreak
- and is not part of another interface. So it cannot be
- defined.\MessageBreak
- Before continuing you should solve this conflict.\MessageBreak
- Nevertheless, you may use option `forceoverwrite' to get only a
- warning instead\MessageBreak
- of an error. But this wouldn't solve the problem at
- all!\MessageBreak
- This error is almost fatal, so you should abort the LaTeX
- run.%
- }%
- \fi
- }{%
- \ifscrlayer@autoremoveinterfaces
- \PackageInfo{scrlayer}{%
- already define interface command\MessageBreak
- `\@backslashchar#2' detected.\MessageBreak
- Command has been defined by interface\MessageBreak
- `\@nameuse{scrlayer@command@#2}'.\MessageBreak
- To continue installation of interface\MessageBreak
- `#1', interface\MessageBreak
- `\@nameuse{scrlayer@command@#2}' will\MessageBreak
- be removed%
- }%
- \@nameuse{scrlayer@\@nameuse{scrlayer@command@#2}@onremove}%
- \begingroup
- \def\@elt##1{%
- \aftergroup\let\aftergroup##1\aftergroup\relax
- }%
- \@nameuse{scrlayer@\@nameuse{scrlayer@command@#2}@commandlist}%
- \endgroup
- \expandafter\let\csname
- scrlayer@\@nameuse{scrlayer@command@#2}@commandlist\endcsname\relax
- \expandafter\let\csname
- scrlayer@\@nameuse{scrlayer@command@#2}@onremove\endcsname\relax
- \expandafter\let\csname #2\endcsname\relax
- \scrlayer@AddCsToInterface[#1]{#2}#3%
- \else
- \PackageError{scrlayer}{cannot define `\@backslashchar#2'}{%
- Interface command `\@backslashchar#2' has already
- been\MessageBreak
- defined by interface
- `\@nameuse{scrlayer@command@#2}'.\MessageBreak
- So it cannot be defined again.\MessageBreak
- You may try scrlayer option `autoremoveinterfaces' to
- automatically remove\MessageBreak
- older interfaces in such conflict situations.\MessageBreak
- For now, it's recommended so solve the problem before you'll
- continue.%
- }%
- \fi
- }%
- }%
- }%
-}%
-% \end{macrocode}
-% \begin{macro}{\scrlayer@AddCsToInterface}
-% Little helper, to avoid repeating this \cs{expandafter} orgy.
-% \begin{description}
-% \item[\oarg{string}:] the interface name (must be expandable and
-% expand to a string)
-% \item[\marg{command sequence}] the command sequence of the command to
-% be added.
-% \end{description}
-% \begin{macrocode}
-\newcommand*\scrlayer@AddCsToInterface[2][\@currname.\@currext]{%
- \scrlayer@report@deprecated{#1}{\scrlayer@AddCsToInterface}%
- \expandafter\expandafter\expandafter\def\expandafter
- \csname scrlayer@#1@commandlist\expandafter\expandafter\expandafter\endcsname
- \expandafter\expandafter\expandafter{%
- \csname scrlayer@#1@commandlist\expandafter\endcsname
- \expandafter\@elt\csname #2\endcsname
- }%
- \@namedef{scrlayer@command@#2}{#1}%
-}
-%</package&body>
-% \end{macrocode}
-% \begin{option}{forceoverwrite}
-% \begin{macro}{\ifscrlayer@forceoverwrite}
-% \begin{description}
-% \item[\marg{simple switch}:] whether or not to overwrite already
-% defined command. Note: If true, there will still be a warning.
-% \end{description}
-% \begin{macrocode}
-%<*options>
-%<*package>
-\KOMA@ifkey{forceoverwrite}{scrlayer@forceoverwrite}
-%<package>\scrlayer@@add@inherited@option{forceoverwrite}
-%</package>
-%<*interface>
-\KOMA@key{forceoverwrite}[true]{%
- \KOMA@set@ifkey{forceoverwrite}{scrlayer@forceoverwrite}{#1}%
- \KOMA@kav@replacebool{.scrlayer.sty}{forceoverwrite}{scrlayer@forceoverwrite}%
-}
-%</interface>
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @forceoverwrite\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @forceoverwrite@default\endcsname\relax
-%</interface&body>
-% \end{macrocode}
-% \end{macro}^^A \ifscrlayer@forceoverwrite
-% \end{option}^^A forceoverwrite
-%
-% \begin{option}{autoremoveinterfaces}
-% \begin{macro}{\ifscrlayer@autoremoveinterfaces}
-% \begin{description}
-% \item[\marg{simple switch}:] whether or not older interfaces may be
-% automatically removed in conflict cases.
-% \end{description}
-% \begin{macrocode}
-%<*options>
-%<*package>
-\KOMA@ifkey{autoremoveinterfaces}{scrlayer@autoremoveinterfaces}
-%<package>\scrlayer@@add@inherited@option{autoremoveinterfaces}
-%</package>
-%<*interface>
-\KOMA@key{autoremoveinterfaces}[true]{%
- \scrlayer@report@deprecated{#1}{autoremoveinterface}%
- \KOMA@set@ifkey{autoremoveinterfaces}{scrlayer@autoremoveinterfaces}{#1}%
- \KOMA@kav@replacebool{.scrlayer.sty}{autoremoveinterfaces}
- {scrlayer@autoremoveinterfaces}%
-}
-%</interface>
-%</options>
-%<*interface&body>
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @autoremoveinterfaces\endcsname\relax
-\expandafter\let
- \csname KV@KOMA.\@currname.\@currext @autoremoveinterfaces@default\endcsname
- \relax
-%</interface&body>
-% \end{macrocode}
-% \end{macro}^^A \ifscrlayer@autoremoveinterfaces
-% \end{option}^^A autoremoveinterfaces
-% \end{macro}^^A \scrlayer@AddCsToInterface
-% \end{macro}^^A \scrlayerAddToInterface,\scrlayerAddCsToInterface
-%
-% \begin{macro}{\scrlayerInitInterface}
-% \begin{description}
-% \item[\oarg{string}:] the name of the interface. Generally this is
-% the file name of the package or class, that defines the interface
-% (default: \texttt{\cs{@currname}.\cs{@currext}}).
-% \end{description}
-% This registers a new user interface.
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\scrlayerInitInterface}[1][\@currname.\@currext]{%
- \scrlayer@report@deprecated{#1}{\scrlayerInitInterface}%
- \@ifundefined{scrlayer@#1@commandlist}{%
- \@namedef{scrlayer@#1@commandlist}{}%
- }{%
- \begingroup
- \def\@elt##1{\space\space\string##1\MessageBreak}%
- \PackageError{scrlayer}{interface `#1' already initialised}{%
- You've tried to initialise scrlayer interface `#1',\MessageBreak
- but an interface of this name has been initialised
- already.\MessageBreak
- Here's a list of all macros of the already initialised
- interface:\MessageBreak
- \@nameuse{scrlayer@#1@commandlist}.%
- If you'll continue, this re-initialisation will be ignored.%
- }%
- \endgroup
- }%
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \scrlayerInitInterface
-%
-% \begin{macro}{\scrlayerOnAutoRemoveInterface}
-% \begin{description}
-% \item[\oarg{string}:] the name of the interface. Generally this is
-% the file name of the package or class, that defines the interface
-% (default: \texttt{\cs{@currname}.\cs{@currext}}).
-% \item[\marg{code}:] will be executed if the interface will be removed
-% automatically (see option \opt{autoremoveinterfaces}).
-% \end{description}
-% \begin{macrocode}
-%<*package&body>
-\newcommand*{\scrlayerOnAutoRemoveInterface}[2][\@currname.\@currext]{%
- \scrlayer@report@deprecated{#1}{\scrlayerOnAutoRemoveInterface}%
- \@ifundefined{scrlayer@#1@onremove}{\@namedef{scrlayer@#1@onremove}{}}{}%
- \expandafter\l@addto@macro\csname scrlayer@#1@onremove\endcsname{#2}%
-}
-%</package&body>
-% \end{macrocode}
-% \end{macro}^^A \scrlayerOnAutoRemoveInterface
-%
-% \begin{macro}{\scrlayer@report@deprecated}
-% \changes{v3.32}{2020/09/11}{added}
-% Report that the deprecated interface commands are used but should not. But
-% report this only once per interface.
-% \begin{macrocode}
-%<*package&init>
-\newcommand*{\scrlayer@report@deprecated}[2]{%
- \@ifundefined{scrlayer@deprecated@reported@for@#1}{%
- \PackageWarning{scrlayer}{%
- Deprecated interface detected for `#1'.\MessageBreak
- There isn't any support for using, e.g.,\MessageBreak
- `\string #2'%
- }%
- \@namedef{scrlayer@deprecated@reported@for@#1}{\string #2}%
- }{}%
-}
-%</package&init>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-%</package|interface|class>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrlfile-hook.dtx b/macros/latex/contrib/koma-script/source/scrlfile-hook.dtx
deleted file mode 100644
index d58f529904..0000000000
--- a/macros/latex/contrib/koma-script/source/scrlfile-hook.dtx
+++ /dev/null
@@ -1,707 +0,0 @@
-% \iffalse^^A meta-comment
-% ======================================================================
-% scrlfile-hook.dtx
-% Copyright (c) Markus Kohm, 2021-2022
-%
-% This file is part of the work `scrlfile' which is part of the LaTeX2e
-% KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%
-%%% From File: $Id: scrlfile-hook.dtx$
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-29 08:27:55 +0200 (Tue, 29 Mar 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3773 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrlfile-hook.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script package source
- }%
-\reserved@a
-%</dtx>
-%<package&current>\ProvidesPackage{scrlfile-hook}[%
-%<package&3.34>\ProvidesPackage{scrlfile-hook-3.34}[%
-%!KOMAScriptVersion
-%<package> package
- (using LaTeX hooks)]
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2002}
- \generate{\usepreamble\defaultpreamble
- \file{scrlfile-hook.sty}{%
- \from{scrlfile-hook.dtx}{package,current}%
- \from{scrlogo.dtx}{logo}%
- }%
- \file{scrlfile-hook-3.34.sty}{%
- \from{scrlfile-hook.dtx}{package,3.34}%
- \from{scrlogo.dtx}{logo}%
- }%
- }%
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{l3doc}% Using class for documentation of expl3 style packages.
-\usepackage{babel}
-\expandafter\let\expandafter\nodriver\csname iffalse\endcsname
-\expandafter\let\expandafter\endnodriver\csname fi\endcsname
-\makeatletter\input{scrlogo.dtx}\makeatother
-\CodelineIndex
-
-\begin{document}
- \DocInput{scrlfile-hook.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v3.32}{2020/08/25}{new (sub-)package}
-% \changes{v3.36}{2022/02/03}{use new documentation style}
-% \changes{v3.36}{2022/02/03}{using \file{scrlogo.dtx} to define the logo}
-%
-% \GetFileInfo{scrlfile-hook.dtx}
-% \title{\pkg{scrlfile} \KOMAScript{} Sub-Packages \pkg{scrlfile-hook} and
-% \pkg{scrlfile-hook-3.34}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% This package provides hooks before and after loading files, packages or
-% classes. It also provides a hook after the last \cs{clearpage} of the
-% document. It allowes to replace files, packages and classes by other
-% files, packages and classes. It is inteded to be used by package and class
-% authors but may also be used by \LaTeX{} users.
-% \end{abstract}
-% \tableofcontents
-%
-%
-% \section{User Manual}
-%
-% \pkg{scrlfile-hook} implements the \LaTeX-hook-based part of
-% \pkg{scrlfile}. \pkg{scrlfile-hook-3.34} is a variant for \LaTeX{} kernel
-% versions before 2021/06/01.
-%
-% There isn't any user manual for the user level \LaTeXe{} commands in this
-% file. Please see the manual of \pkg{scrlfile} for more information about
-% \pkg{scrlfile-hook} and \pkg{scrlfile-hook-3.34}.
-%
-% This section, however, contains the user manual of the \LaTeX3{} package
-% author commands.
-%
-% \begin{function}[TF, added = 2020-08-26]
-% {\scrlfile_if_class_loaded:n,\scrlfile_if_package_loaded:n}
-% \begin{syntax}
-% \cs{scrlfile_if_class_loaded:nTF} \Arg{class name} \Arg{true code} \Arg{false code}
-% \cs{scrlfile_if_package_loaded:nTF} \Arg{package name} \Arg{true code} \Arg{false code}
-% \end{syntax}
-% Tests if the class \meta{class name} resp. the package \meta{package name}
-% has been loaded completely. It runs the \Arg{true code} only, if the input
-% of the class file with the name \meta{class
-% name}\file{.}\cs{@clsextension} resp. the package file with the name
-% \meta{package name}\file{.}\cs{@pkgextension} has already been
-% finished. It runs the \Arg{false code}, if the class or package has not
-% been loaded or the input of the class or package file is still in
-% progress.
-% \end{function}
-%
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of \pkg{scrlfile-hook}}
-%
-% \begin{macrocode}
-%<@@=scrlfile>
-% \end{macrocode}
-%
-% Test whether the used \LaTeX{} provides all commands we need.
-% \changes{v3.34}{2021/04/21}{make it more robust agains not recommended
-% direct usage}
-% \changes{v3.35}{2021/10/31}{new file version because \LaTeX{} kernel
-% 2021/11/15 has changed the field order of gerneric hooks}
-% \changes{v3.36}{2022/02/03}{package name in messages fixed}
-% \begin{macrocode}
-\@ifundefined{IfFormatAtLeastTF}{%
- \PackageError{scrlfile-hook}{not recommended usage of package}{%
- It seems this package has been loaded directly using a LaTeX
- version\MessageBreak
- prior to 2020-10-01. This is not recommended. Please always load
- package\MessageBreak
- scrlfile instead of scrlfile-hook.\MessageBreak
- If you would continue, I will try to load scrlfile-patcholdlatex%
- }%
- \RequirePackage{scrlfile-patcholdlatex}\endinput
-}{%
- \IfFormatAtLeastTF{2020/10/01}{%
- \IfFormatAtLeastTF{2021/11/15}{%
-%<*3.34>
- \PackageError{scrlfile-hook-3.34}{LaTeX too new for this package}{%
- It seems this package has ben loaded directly using a LaTeX
- version\MessageBreak
- newer than 2021-06-01. This is not recommended. Please always load
- package\MessageBreak
- scrlfile instead of scrlfile-hook-3.34.\MessageBreak
- If you would continue, I will try to load scrlfile-hook%
- }%
- \RequirePackage{scrlfile-hook}\endinput
-%</3.34>
- }{%
-%<*current>
- \PackageError{scrlfile-hook}{LaTeX too old for this package}{%
- It seems this package has been loaded directly using LaTeX
- version\MessageBreak
- prior to 2021-11-15. This is not recommended. Please always load
- package\MessageBreak
- scrlfile instead of scrlfile-hook.\MessageBreak
- If you would continue, I will try to load scrlfile-hook-3.34%
- }%
- \RequirePackage{scrlfile-hook-3.34}\endinput
-%</current>
- }%
- }{%
- \PackageError{scrlfile-hook}{LaTeX too old for this package}{%
- It seems this package has been loaded directly using a LaTeX
- version\MessageBreak
- prior to 2020-10-01. This is not recommended. Please always load
- package\MessageBreak
- scrlfile instead of scrlfile-hook.\MessageBreak
- If you would continue, I will try to load scrlfile-patcholdlatex%
- }%
- \RequirePackage{scrlfile-patcholdlatex}\endinput
- }%
-}
-% \end{macrocode}
-%
-%
-% \subsection{Before and After Commands}
-%
-% The hook implementation is based on a \LaTeX{} version that provides
-% \LaTeX3. So it makes sense to use it.
-%
-% \begin{macrocode}
-\ExplSyntaxOn
-% \end{macrocode}
-%
-% \begin{macro}[updated = 2021-10-31]{\BeforeFile}
-% The hook version of this command is just a wrapper to the corresponding
-% \LaTeX{} file hooks. It supports a mandatory \meta{file} argument, an
-% optional \meta{label} argument and a mandatory \meta{hook code} argument.
-% From \LaTeX{} kernel version 2021/11/15 the hook has
-% been changed from \texttt{file/before/\meta{file name}} to
-% \texttt{file/\meta{file name}/before}.
-% \begin{macrocode}
-\NewDocumentCommand \BeforeFile { m }
- {
-%<3.34> \AddToHook { file / before / #1 }
-%<current> \AddToHook { file / #1 / before }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[updated = 2021-10-31]{\AfterFile}
-% The hook version of this command is just a wrapper to the corresponding
-% \LaTeX{} file hooks. It supports a mandatory \meta{file} argument, an
-% optional \meta{label} argument and a mandatory \meta{hook code} argument.
-% From \LaTeX{} kernel version 2021/11/15 the hook has
-% been changed from \texttt{file/after/\meta{file name}} to
-% \texttt{file/\meta{file name}/after}.
-% \begin{macrocode}
-\NewDocumentCommand \AfterFile { m }
- {
-%<3.34> \AddToHook { file / after / #1 }
-%<current> \AddToHook { file / #1 / after }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\BeforeClass,\BeforePackage}
-% The hook version of these commands are also wrappers to the
-% \texttt{file/before} hooks, because the \meta{code} should also be executed
-% already in the class or package context.
-% \begin{macrocode}
-\NewDocumentCommand \BeforeClass { m }
- {
- \BeforeFile { #1.\@clsextension }
- }
-\NewDocumentCommand \BeforePackage { m }
- {
- \BeforeFile { #1.\@pkgextension }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[updated = 2021-10-31, updated = 2021-11-09]
-% {\AfterAtEndOfClass,\AfterAtEndOfPackage}
-% \changes{v3.35}{2021/10/31}{field order of generic hooks changed in
-% \LaTeX{} 2021/11/15}
-% \changes{v3.35}{2021/11/09}{hooks became one-time hooks in
-% \LaTeX{} 2021/11/15}
-% With version 3.32 the syntax of these commands have been changed. Now, there
-% is also a star variant, that runs the \meta{code} immediately if the class
-% or package has already been loaded completely. Otherwise and in the normal
-% variant the \meta{code} is added to the \texttt{class/after} or
-% \texttt{package/after} hook, because this hook is used outside the context
-% of the class or package and after the \cs{AtEndOfClass} or
-% \cs{AtEndOfPackage} code.
-% From \LaTeX{} kernel version 2021/11/15 the hooks has
-% been changed from \texttt{class/after/\meta{class name}} to
-% \texttt{class/\meta{class name}/after} and from
-% \texttt{package/after/\meta{package name}} to
-% \texttt{package/\meta{package name}/after}. Additionally the hooks became
-% one-time hooks. So they are executed immediately, if the class or package
-% has already been loaded. Because of this, we additionally have to test this
-% case in the non star variant.
-% \begin{macrocode}
-\NewDocumentCommand \AfterAtEndOfClass { s m o +m }
- {
- \IfBooleanTF { #1 }
- {
- \scrlfile_if_class_loaded:nTF { #2 }
- { #4 }
-%<3.34> { \hook_gput_code:nnn { class / after / #2 } { #3 } { #4 } }
-%<current> { \hook_gput_code:nnn { class / #2 / after } { #3 } { #4 } }
- }
-%<3.34> { \hook_gput_code:nnn { class / after / #2 } { #3 } { #4 } }
-%<*current>
- {
- \scrlfile_if_class_loaded:nF
- { #2 }
- { \hook_gput_code:nnn { class / #2 / after } { #3 } { #4 } }
- }
-%</current>
- }
-\NewDocumentCommand \AfterAtEndOfPackage { s m o +m }
- {
- \IfBooleanTF { #1 }
- {
- \scrlfile_if_package_loaded:nTF { #2 }
- { #4 }
-%<3.34> { \hook_gput_code:nnn { package / after / #2 } { #3 } { #4 } }
-%<current> { \hook_gput_code:nnn { package / #2 / after } { #3 } { #4 } }
- }
-%<3.34> { \hook_gput_code:nnn { package / after / #2 } { #3 } { #4 } }
-%<*current>
- {
- \scrlfile_if_package_loaded:nF
- { #2 }
- { \hook_gput_code:nnn { package / #2 / after } { #3 } { #4 } }
- }
-%</current>
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{variable}[added = 2020-06-26,
-% updated = 2021-01-01]{\g__scrlfile_input_file_seq}
-% \changes{3.33}{2021/01/01}{message definition moved outside function}
-% \cs{g__scrlfile_input_file_seq} is a sequence of active file inputs (without
-% path information). Two global hooks are used to setup the sequence. The new
-% conditional tests if a file is in the sequence. And a message is defined for
-% the case of more pops than pushs to the stack.
-% \begin{macrocode}
-\seq_new:N \g__scrlfile_input_file_seq
-\hook_gput_code:nnn { file / before } { . }
- { \seq_gpush:Nx \g__scrlfile_input_file_seq { \CurrentFile } }
-\msg_new:nnn { scrlfile-hook } { too-many-pops }
- {
- More~file~names~popped~from~stack~than~put~to.~
- This~should~never~happen.~
- However,~it~could~happen~if~scrlfile-hook~is~loaded~by~another~
- package~or~class.~In~this~case~some~packages~or~classes~are~not~
- recognised~correctly.
- }
-\hook_gput_code:nnn { file / after } { . }
- {
- \seq_gpop:NNF \g__scrlfile_input_file_seq \l_tmpa_seq
- {
- \msg_warning:nn { scrlfile-hook } { too-many-pops }
- }
- }
-% \end{macrocode}
-% Unfortunately we need an ugly hack to initialise the stack using an internal
-% kernel variable. This is a no go but I do not know a better solution for
-% this, because loading of the package could be done late.
-% \begin{description}
-% \item[ToDo:] Decide, if the second or fourth token is correct. If fourth,
-% \cs{CurrentFile} has to be used always instead of \cs{CurrentFileUsed}.
-% \end{description}
-% \begin{macrocode}
-\cs_if_exist:NTF \g__filehook_input_file_seq
- {
- \seq_map_inline:Nn \g__filehook_input_file_seq
- {
- \seq_gput_right:Nx \g__scrlfile_input_file_seq
- { \tl_item:nn { #1 } { 2 } }
- }
- }
- {
- \seq_gpush:Nx \g__scrlfile_input_file_seq { }
- \cs_if_exist:NTF \CurrentFileUsed
- { \seq_gpush:Nx \g__scrlfile_input_file_seq { \CurrentFileUsed } }
- { \seq_gpush:Nx \g__scrlfile_input_file_seq { \CurrentFile } }
- }
-% \end{macrocode}
-% \end{variable}
-% \begin{function}[TF, added = 2020-06-26]{\@@_if_loading:n}
-% Test if the file name is in the file name list.
-% \begin{macrocode}
-\prg_new_protected_conditional:Npnn \__scrlfile_if_loading:n #1 { T, F, TF }
- {
- \str_set:Nx \l_tmpa_str { #1 }
- \seq_if_in:NxTF \g__scrlfile_input_file_seq { \str_use:N \l_tmpa_str }
- { \prg_return_true: }
- { \prg_return_false: }
- }
-% \end{macrocode}
-% \end{function}
-%
-% \begin{function}[TF, added = 2020/08/22]
-% {\scrlfile_if_class_loaded:n,\scrlfile_if_package_loaded:n}
-% \cs{scrlfile_if_class_loaded:nTF} is similar to \cs{@ifclassloaded} and
-% \cs{scrlfile_if_package_loaded:nTF} is similar to \cs{@ifpackageloaded} but in
-% opposite to those they test, if the class or package has been loaded
-% completely.
-% \begin{macrocode}
-\prg_new_protected_conditional:Npnn \scrlfile_if_class_loaded:n #1 { T, F, TF }
- {
- \@ifclassloaded { #1 }
- {
- \__scrlfile_if_loading:nTF { #1.\@clsextension }
- { \prg_return_false: }
- { \prg_return_true: }
- }
- {
- \prg_return_false:
- }
- }
-\prg_new_protected_conditional:Npnn \scrlfile_if_package_loaded:n #1 { T, F, TF }
- {
- \@ifpackageloaded { #1 }
- {
- \__scrlfile_if_loading:nTF { #1.\@pkgextension }
- { \prg_return_false: }
- { \prg_return_true: }
- }
- {
- \prg_return_false:
- }
- }
-% \end{macrocode}
-% \end{function}
-%
-% \begin{macro}[updated = 2021-10-31]{\AfterClass,\AfterPackage}
-% With version 3.32 these do not support plus or exclamation mark variants,
-% but only the normal and the star variants. Instead of the plus or
-% exclamation mark variants users should use the star variant of
-% \cs{AfterAtEndOfClass} and \cs{AfterAtEndOfPackage}. The commands use the
-% \texttt{file/after} hook, because the user manual declares, that \meta{code}
-% is used before the code of \cs{AtEndOfClass} or \cs{AtEndOfPackage}.
-% From \LaTeX{} kernel version 2021/11/15 the hook has
-% been changed from \texttt{file/after/\meta{file name}} to
-% \texttt{file/\meta{file name}/after}.
-% \begin{macrocode}
-\NewDocumentCommand \scrlfile@AfterClass { s m o +m }
- {
- \IfBooleanTF { #1 }
- {
- \@ifclassloaded{ #2 }
- { #4 }
- {
- \hook_gput_code:nnn
-%<3.34> { file / after / #2.\@clsextension }
-%<current> { file / #2.\@clsextension / after }
- { #3 }
- { #4 }
- }
- }
- {
-%<3.34> \hook_gput_code:nnn { file / after / #2.\@clsextension } { #3 } { #4 }
-%<current> \hook_gput_code:nnn { file / #2.\@clsextension / after } { #3 } { #4 }
- }
- }
-\NewDocumentCommand \AfterClass { } { \scrlfile@AfterClass }
-\NewDocumentCommand \scrlfile@AfterPackage { s m o +m }
- {
- \IfBooleanTF { #1 }
- {
- \@ifpackageloaded{ #2 }
- { #4 }
- {
- \hook_gput_code:nnn
-%<3.34> { file / after / #2.\@pkgextension }
-%<current> { file / #2.\@pkgextension / after }
- { #3 }
- { #4 }
- }
- }
- {
-%<3.34> \hook_gput_code:nnn { file / after / #2.\@pkgextension } { #3 } { #4 }
-%<current> \hook_gput_code:nnn { file / #2.\@pkgextension / after } { #3 } { #4 }
- }
- }
-\NewDocumentCommand \AfterPackage { } { \scrlfile@AfterPackage }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{File Substitution}
-%
-% With new file hooks the substitutions are so easy we even do not need
-% \LaTeX3 syntax to implement them.
-%
-% \begin{macro}{\ReplaceInput}
-% This is only the simplest wrapper to \cs{declare@file@substitution}.
-% \begin{macrocode}
-\NewDocumentCommand{\ReplaceInput}{}{\declare@file@substitution}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ReplaceClass}
-% \begin{macro}{\ReplacePackage}
-% These are also wrappers to \cs{declare@file@substitution}. But in this case
-% we also have to add the extension.
-% \begin{macrocode}
-\NewDocumentCommand\ReplaceClass{mm}{%
- \declare@file@substitution{#1.\@clsextension}{#2.\@clsextension}%
-}
-\NewDocumentCommand\ReplacePackage{mm}{%
- \declare@file@substitution{#1.\@pkgextension}{#2.\@pkgextension}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\UnReplaceInput}
-% This is the simplest wrapper to \cs{undeclare@file@substitution}.
-% \begin{macrocode}
-\NewDocumentCommand{\UnReplaceInput}{}{\undeclare@file@substitution}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\UnReplaceClass}
-% \begin{macro}{\UnReplacePackage}
-% Also very simple but again we have to add the extension.
-% \begin{macrocode}
-\NewDocumentCommand\UnReplaceClass{m}{%
- \undeclare@file@substitution{#1.\@clsextension}%
-}
-\NewDocumentCommand\UnReplacePackage{mm}{%
- \undeclare@file@substitution{#1.\@pkgextension}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Prevent Package from Loading}
-%
-% To store and reset the hole list of prevents we use a comma separated
-% list. So we need again use \LaTeX3.
-%
-% \begin{variable}[added = 2020-09-02]{\g__scrlfile_prevents_clist}
-% This local variable stores the list of files, that should be prevented from
-% loading. It is needed to stay compatible with old \file{scrlfile}. Without
-% this compatibility purpose we would be able to use simple wrappers to
-% \cs{disable@package@load} and \cs{reenable@package@load}.
-% \begin{macrocode}
-\clist_new:N \g__scrlfile_prevent_clist
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{macro}{\PreventPackageFromLoading}
-% This is more than a wrapper to \cs{disable@package@load} because we have to
-% manage an internal list and it is documented, that the re-enabling does not
-% undefine the \meta{alternate-code} setting but only disables it. So we have
-% to extra store it. Note: Local loading of packages does not make sense, so
-% local changes of the prevent list also does not make sense. Therefore this
-% is a global acting command!
-% \begin{macrocode}
-\NewDocumentCommand \PreventPackageFromLoading { s +o m }
- {
- \clist_set:Nx \l__scrlfile_package_clist { #3 }
- \clist_map_inline:Nn \l__scrlfile_package_clist
- {
- \@ifpackageloaded { ##1 }
- {
- \IfBooleanTF { #1 } { \msg_info:nnn } { \msg_warning:nnn }
- { scrlfile } { no-prevent-for-already-loaded } { ##1 }
- }
- {
- \clist_if_in:NnF \g__scrlfile_prevent_clist { ##1 }
- { \clist_gput_right:Nn \g__scrlfile_prevent_clist { ##1 } }
- \tl_if_exist:cF { g__scrlfile_exclude_package_##1_tl }
- {
- \tl_new:c { g__scrlfile_exclude_package_##1_tl }
- }
- \IfValueT { #2 }
- {
- \tl_gput_right:cn { g__scrlfile_exclude_package_##1_tl } { #2 }
- }
- \disable@package@load { ##1 }
- { \tl_use:c { g__scrlfile_exclude_package_##1_tl } }
- }
- }
- \clist_clear:N \l__scrlfile_package_clist
- }
-% \end{macrocode}
-%
-% \begin{macro}{\l__scrlfile_package_clist}
-% One local variable is used to process the \meta{package-list} argument of
-% \cs{PreventPackageFromLoading}.
-% \begin{macrocode}
-\clist_new:N \l__scrlfile_package_clist
-% \end{macrocode}
-% \end{macro}
-%
-% And here comes the message, that could be used either as a warning or as an
-% info.
-% \begin{macrocode}
-\msg_new:nnn { scrlfile } { no-prevent-for-already-loaded }
- {
- Cannot~prevent~package~`#1'~from~being~loaded,~
- because~it~has~been~loaded~already~before~line~\msg_line_number:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\StorePreventPackageFromLoading}
-% This simply copies the internal \texttt{clist} to a macro.
-% \begin{macrocode}
-\NewDocumentCommand \StorePreventPackageFromLoading { m }
- { \edef #1 { \clist_use:Nn \g__scrlfile_prevent_clist { , } } }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ResetPreventPackageFromLoading}
-% Map the internal list to a function that re-enables the package. At the end
-% the internal list is cleared.
-% \begin{macrocode}
-\NewDocumentCommand \ResetPreventPackageFromLoading {}
- {
- \clist_map_function:NN \g__scrlfile_prevent_clist \reenable@package@load
- \clist_gclear:N \g__scrlfile_prevent_clist
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\UnPreventPackageFromLoading}
-% Here again the argument is a \meta{package-list} not only one
-% \meta{package}. So we have to build a local \texttt{clist} and walk through
-% it.
-% \begin{macrocode}
-\NewDocumentCommand \UnPreventPackageFromLoading { s m }
- {
- \clist_set:Nx \l__scrlfile_package_clist { #2 }
- \clist_map_inline:Nn \l__scrlfile_package_clist
- {
- \clist_if_in:NnT \g__scrlfile_prevent_clist { ##1 }
- {
- \clist_gremove_all:Nn \g__scrlfile_prevent_clist { ##1 }
- \reenable@package@load { ##1 }
- \IfBooleanT { #1 }
- { \cs_undefine:c { g__scrlfile_exclude_package_##1_tl } }
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Extra Document Hooks}
-%
-% \begin{macro}{\BeforeClosingMainAux}
-% \changes{v3.32}{2020/09/10}{optional argument added}
-% Here we cannot simply wrap this to the hook
-% \texttt{enddocument/afterlastpage}, because it is documented, that inside
-% the \meta{code} \cs{protected@write} is replaced by
-% \cs{immediate@protected@write}. So we have to take extra care to it.
-% \begin{macrocode}
-\NewDocumentCommand \BeforeClosingMainAux { o m }
- {
- \hook_gput_code:nnn { enddocument / afterlastpage } { #1 }
- {
- \debug_suspend:
- \RenewDocumentCommand \BeforeClosingMainAux { m } { ##1 }
- \cs_set_eq:NN \__scrlfile_protected@write:Nnn \protected@write
- \cs_set_eq:NN \protected@write \protected@immediate@write
- #2
- \cs_set_eq:NN \protected@write \__scrlfile_protected@write:Nnn
- \debug_resume:
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\AfterReadingMainAux}
-% \changes{v3.32}{2020/09/10}{optional argument added}
-% Here we the exact same problem as with \cs{BeforeClosingMainAux}.
-% \begin{macrocode}
-\NewDocumentCommand \AfterReadingMainAux { o m }
- {
- \hook_gput_code:nnn { enddocument / afteraux } { #1 }
- {
- \debug_suspend:
- \RenewDocumentCommand \AfterReadingMainAux { m } { ##1 }
- \cs_set_eq:NN \__scrlfile_protected@write:Nnn \protected@write
- \cs_set_eq:NN \protected@write \protected@immediate@write
- #2
- \cs_set_eq:NN \protected@write \__scrlfile_protected@write:Nnn
- \debug_resume:
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\ExplSyntaxOff
-% \end{macrocode}
-%
-% \subsection{Kernel Extensions not Using \LaTeX3}
-%
-% \begin{macro}{\protected@immediate@write}
-% Like \LaTeX{} kernel's |\protected@write| but using |\immediate\write|. In
-% this case it is even not a good idea to protect |\thepage|!
-% \begin{macrocode}
-\ProvideDocumentCommand\protected@immediate@write{m+m+m}
- {%
- \begingroup
- #2%
- \let\protect\@unexpandable@protect
- \edef\reserved@a{\immediate\write#1{#3}}%
- \reserved@a
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \Finale
-% \PrintChanges
-%
-% \endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrlfile-patcholdlatex.dtx b/macros/latex/contrib/koma-script/source/scrlfile-patcholdlatex.dtx
deleted file mode 100644
index d30a0c45a0..0000000000
--- a/macros/latex/contrib/koma-script/source/scrlfile-patcholdlatex.dtx
+++ /dev/null
@@ -1,1251 +0,0 @@
-% \iffalse^^A meta-comment
-% ======================================================================
-% scrlfile-patcholdlatex.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the work `scrlfile' which is part of the LaTeX2e
-% KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrlfile-patcholdlatex.dtx 3773 2022-03-29 06:27:55Z kohm $
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-03-29 08:27:55 +0200 (Tue, 29 Mar 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3773 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrlfile-patcholdlatex.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script package source
- }%
-\reserved@a
-%</dtx>
-%<package>\ProvidesPackage{scrlfile-patcholdlatex}[%
-%!KOMAScriptVersion
-%<package> package
- (patching old LaTeX kernels)]
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2002}
- \generate{\usepreamble\defaultpreamble
- \file{scrlfile-patcholdlatex.sty}{%
- \from{scrlfile-patcholdlatex.dtx}{package}%
- \from{scrlogo.dtx}{logo}%
- }%
- }
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\begin{document}
- \DocInput{scrlfile-patcholdlatex.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v2.95}{2002/06/11}{First version split from hugh scrclass.dtx}
-% \changes{v3.24}{2017/05/06}{standalone manual removed}
-% \changes{v3.32}{2020/09/02}{new (sub)-package}
-% \changes{v3.36}{2022/02/03}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/03}{using \file{scrlogo.dtx} to define the logo}
-%
-% \GetFileInfo{scrlfile-patcholdlatex.dtx}
-% \title{\pkg*{scrlfile} \KOMAScript{} Sub-Package \pkg*{scrlfile-patcholdlatex}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% This package provides hooks before and after loading files, packages or
-% classes. It also provides a hook after the last \cs{clearpage} of the
-% document. It allowes to replace files, packages and classes by other
-% files, packages and classes. It is inteded to be used by package and class
-% authors but may also be used by \LaTeX{} users.
-% \end{abstract}
-% \tableofcontents
-%
-%
-% \section{User Manual}
-%
-% \pkg*{scrlfile-patcholdlatex} implements the part of \pkg*{scrlfile}
-% that patches old \LaTeX{} kernels.
-%
-% There isn't any user manual for the user level \LaTeXe{} commands in this
-% file. Please see the manual of \pkg*{scrlfile} for more information about
-% \pkg*{scrlfile-patcholdlatex}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of \pkg*{scrlfile-patcholdlatex}}
-%
-%
-% \subsection{Patching \LaTeX{} Kernel Macros}
-%
-% Test whether the used \LaTeX{} is old enough.
-% \changes{v3.34}{2021/04/21}{make it more robust agains not recommended
-% direct usage}
-% \changes{3.35}{2021/10/31}{\LaTeX{} kernel change results in new variant of
-% \pkg*{scrfile-hook}}
-% \begin{macrocode}
-\@ifundefined{IfFormatAtLeastTF}{}{%
- \IfFormatAtLeastTF{2020/10/01}{%
- \PackageError{scrlfile-hook}{LaTeX too young for this package}{%
- It seems this package has been loaded directly using a LaTeX
- version\MessageBreak
- 2020-10-01 or newer. This is not recommended. Please always load
- package\MessageBreak
- scrlfile instead of scrlfile-patcholdlatex.\MessageBreak
- If you would continue, I will try to load scrlfile-hook%
- \IfFormatAtLeast{2021/11/15}{}{-3.34}%
- }%
- \IfFormatAtLeastTF{2021/11/15}{%
- \RequirePackage{scrlfile-hook}%
- }{%
- \RequirePackage{scrlfile-hook-3.34}%
- }%
- \endinput
- }{}%
-}
-% \end{macrocode}
-%
-% \begin{command}{\InputIfFileExists}
-% \changes{v2.96}{2006/07/19}{replacement code added}
-% \LaTeX{} uses this macro for loading files with
-% \cs{input}\marg{filename}, \cs{include}, \cs{LoadClass},
-% \cs{LoadClassWithOptions}, \cs{documentclass}, \cs{documentstyle},
-% \cs{RequirePackage}, \cs{usepackage}. Only
-% \cs{input}~\meta{filename} loads \meta{filename} without using
-% \cs{InputIfFileExists}.
-%
-% Because of this, it's very easy to add stuff before and after
-% loading a file. We simply change this macro and add to
-% macros\,---\,one before loading the file and one after loading the
-% file. But before we redefine the macro, we test, if the macro was
-% defined like we expected. \LaTeX{} will warn, if not.
-% \changes{v3.27}{2019/10/06}{\LaTeX{} 2019-10-01 changed the definition}
-%
-% \changes{v3.28}{2019/11/21}{support for \cls{memoir}}
-% With \cls{memoir} their is a special case. It also redefines
-% \cs{InputIfFileExists}. As shown in the source of the class it does so
-% because \pkg*{scrlfile} does it. However it does it not compatible with
-% \pkg*{scrlfile} and it does not emulate \pkg*{scrlfile} as it do for
-% other packages. So if you try to use \pkg*{scrlfile} with memoir,
-% \pkg*{scrbase} has to take care to \cls{memoir}. And in oposit to
-% \pkg*{scrlfile} \cls{memoir} does not always fix the argument order bug
-% of \LaTeX{} but do so only for the implementation of \LaTeX{} 2019-10-01.
-% So in case of \cls{memoir} we just patch every version of it without
-% testing.
-% \begin{macrocode}
-\@ifclassloaded{memoir}{%
- \PackageInfo{scrlfile}{class `memoir' detected.\MessageBreak
- Using a compatible redefinition of \string\InputIfFileExists,\MessageBreak
- but always robust and with the fix of the\MessageBreak
- argument order bug even for old versions of the\MessageBreak
- LaTeX kernel%
- }%
-}{%
- \long\def\reserved@a#1#2{%
- \IfFileExists{#1}%
- {#2\@addtofilelist{#1}\@@input \@filef@und}}%
- \ifx\reserved@a\InputIfFileExists\else
- \expandafter\CheckCommand\expandafter*\expandafter\InputIfFileExists
- \expandafter{%
- \expandafter\protect\csname InputIfFileExists \endcsname
- }%
- \expandafter\CheckCommand \csname InputIfFileExists \endcsname[2]{%
- \IfFileExists {#1}{%
- \expandafter \@swaptwoargs \expandafter {\@filef@und }%
- {#2\@addtofilelist {#1}\@@input }%
- }%
- }%
- \fi
-}
-% \end{macrocode}
-% Now we can redefine the macro like described above:
-% \begin{macrocode}
-\expandafter\renewcommand\expandafter*\expandafter\InputIfFileExists
-\expandafter{\expandafter
- \protect\csname InputIfFileExists \endcsname}%
-\expandafter\long\expandafter\def\csname InputIfFileExists \endcsname#1#2{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #1-@alias\endcsname\relax
- \expandafter\@secondoftwo
- \else
- \scr@replacefile@msg{\csname #1-@alias\endcsname}{#1}%
- \expandafter\@firstoftwo
- \fi
- {%
- \expandafter\InputIfFileExists\expandafter{\csname
- #1-@alias\endcsname}{#2}%
- }%
- {\IfFileExists{#1}{%
- \expandafter\scr@input@withhook\expandafter{\@filef@und}{#1}{#2}%
- }}%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@input@withhook}
-% \changes{v3.27}{2019/03/28}{added}
-% \changes{v3.28}{2019/11/21}{support for \cls{memoir}}
-% We need a new internal, because of expanding \cs{@file@und} before inputting
-% the file.
-% \begin{macrocode}
-\@ifclassloaded{memoir}{%
- \newcommand{\scr@input@withhook}[3]{%
- \scr@load@hook{before}{#2}%
- #3\@addtofilelist{#2}%
- \@ifundefined{m@matbeginf}{}{\m@matbeginf{#2}}%
- \@@input #1%
- \@ifundefined{m@matendf}{}{\m@matendf{#2}}%
- \@ifundefined{killm@matf}{}{\killm@matf{#2}}%
- \scr@load@hook{after}{#2}%
- }%
-}{%
- \newcommand{\scr@input@withhook}[3]{%
- \scr@load@hook{before}{#2}%
- #3\@addtofilelist{#2}%
- \@@input #1%
- \scr@load@hook{after}{#2}%
- }%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@input@withhook
-% \end{command}^^A \InputIfFileExists
-%
-% \begin{macro}{\@loadwithoptions}
-% \changes{v2.96}{2006/07/19}{re-implementation}
-% \begin{macro}{\scr@loadwithoptions}
-% \changes{v2.96}{2006/07/19}{added}
-% \begin{macro}{\scr@@loadwithoptions}
-% \changes{v2.97a}{2007/03/07}{added}
-% \LaTeX{} uses this macro for loading classes and packages using
-% \cs{LoadClassWithOptions} or \cs{RequirePackageWithOptions}. We simply say
-% now: if the class or package should be replaced by another, try it again
-% with the replacement name. The stack is used. This will result in an
-% error if the replacements are nested too deep. This should be, because it
-% will also result in an error using ring replacements.
-% \begin{macrocode}
-\newcommand*{\scr@@loadwithoptions}{}
-\newcommand*{\scr@loadwithoptions}{}
-\let\scr@loadwithoptions\@loadwithoptions
-\renewcommand*{\@loadwithoptions}[3]{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #3.#1-@aliasname\endcsname\relax
- \def\scr@@loadwithoptions{\scr@loadwithoptions{#1}{#2}{#3}}%
- \else
- \scr@replacefile@msg{\csname #3.#1-@aliasname\endcsname.#1}{#3.#1}%
- \def\scr@@loadwithoptions{%
- \@loadwithoptions{#1}{#2}{\csname #3.#1-@aliasname\endcsname}%
- }%
- \fi
- \scr@@loadwithoptions
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@@loadwithoptions
-% \end{macro}^^A \scr@loadwithoptions
-% \end{macro}^^A \@loadwithoptions
-%
-% \begin{macro}{\@onefilewithoption}
-% \changes{v2.96}{2006/07/19}{re-implementation}
-% \begin{macro}{\scr@onefilewithoption}
-% \changes{v2.96}{2006/07/19}{added}
-% \begin{macro}{\scr@@onefilewithoption}
-% \changes{v2.98}{2007/12/18}{added}
-% \LaTeX{} uses this macro for loading classes and packages using
-% \cs{LoadClass}, \cs{documentclass}, \cs{RequirePackage}, and
-% \cs{usepackage}. We simply say now: if the class or package should be
-% replaced by another, try it again with the replacement name. The stack is
-% used. This will result in an error if the replacements are nested too
-% deep. This should be, because it will also result in an error using ring
-% replacements.
-% \begin{macrocode}
-\newcommand*{\scr@onefilewithoptions}{}
-\let\scr@onefilewithoptions\@onefilewithoptions
-\def\@onefilewithoptions#1[#2][#3]#4{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #1.#4-@aliasname\endcsname\relax
-% \end{macrocode}
-% Do this ridiculous definition and call outside of \cs{ifx}\dots\cs{fi}
-% because of some errornous packages like some versions of
-% \pkg{breakurl}. This does not avoid an error, but the message about
-% unclosed \cs{if} will be outside of \pkg*{scrlfile}.
-% \begin{macrocode}
- \def\scr@@onefilewithoptions{\scr@onefilewithoptions{#1}}%
- \else
- \scr@replacefile@msg{\csname #1.#4-@aliasname\endcsname.#4}{#1.#4}%
- \edef\scr@@onefilewithoptions{%
- \noexpand\@onefilewithoptions{\csname #1.#4-@aliasname\endcsname}}%
- \fi
- \scr@@onefilewithoptions[{#2}][{#3}]{#4}%
- \scr@load@hook{lateafter}{#1.#4}%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@@onefilewithoption
-% \end{macro}^^A \scr@onefilewithoption
-% \end{macro}^^A \@onefilewithoption
-%
-% \begin{macro}{\scr@replacefile@msg}
-% \changes{v2.96}{2006/07/19}{added}
-% \changes{v2.98}{2007/12/18}{spellfix}
-% Last but not least \pkg*{scrlfile} will write a message to the log file at
-% every replacement.
-% \begin{macrocode}
-\newcommand*{\scr@replacefile@msg}[2]{%
- \PackageInfo{scrlfile}{inputing `#1' instead of `#2'}%
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@replacefile@msg
-%
-% \begin{macro}{\scr@load@hook}
-% \changes{v3.27a}{2019/10/16}{workaround for strange handling of
-% \cs{AtEndOfPackage} hook in \cs{@onefilewithoptions}}
-% This macro simply calls a load-file-hook, either the \emph{before}
-% or the \emph{after} one, if the hook exists. After calling the hook
-% it will be deleted. First argument is the type of hook
-% (\meta{before} or \meta{after}), second argument is a filename.
-% \begin{macrocode}
-\newcommand*{\scr@load@hook}[2]{%
-% \end{macrocode}
-% \begin{macro}{\scrlfile@cmp@hook}
-% \changes{v3.27a}{2019/10/23}{renamed}
-% \begin{macro}{\scrlfile@hookname}
-% \changes{v3.27a}{2019/10/23}{renamed}
-% \changes{v3.29}{2020/06/01}{do the class and package load hooks only in the
-% document preamble}^^A --> https://komascript.de/node/2274
-% Workaround for strange handling of the \cs{AtEndOfPackage} hook in
-% \cs{@onefilewithoptions} (becomes \cs{@empty}, if the package already has
-% been loaded and is not loaded again). This workaround is not nice but
-% smart. Before loading a file it defines a marker macro and undefines it
-% later. To decide whether to define or remove the marker, two local macros
-% are used \cs{scrlfile@hookname} and \cs{scrlfile@cmp@hook}. The first has
-% the name of the current hook from the first argument. The other is a compare
-% string. The first one is also valid while processing the hook, but only in
-% the document preamble. The names are very unique, so we do not reserve them
-% using \cs{newcommand} outside. The name of the marker is less
-% unique. Nevertheless it is not reserved.
-% Note: For recursive loading of files this does not work. But this also does
-% not matter, because it is needed only for packages and classes, which are
-% never loaded recursive. For the same reason from \KOMAScript{} 3.29 this is
-% only used inside the document preamble. After the document preamble it can
-% be dangerous, e.g., inside a |tabular| or |array|.
-% \begin{macrocode}
- \ifx\@begindocumenthook\@undefined\else
- \edef\scrlfile@hookname{#1}%
- \def\scrlfile@cmp@hook{before}%
- \ifx\scrlfile@hookname\scrlfile@cmp@hook
- \expandafter\def\csname #2-l@ading\endcsname{#2}%
- \fi
- \let\scrlfile@cmp@hook\@undefined
- \fi
- \@ifundefined{#2-@#1}{}{%
- \@nameuse{#2-@#1}%
- \expandafter\let\csname #2-@#1\endcsname\relax
- }%
-% \end{macrocode}
-% The hook could destroy \cs{scrlfile@hookname} so define it again:
-% \begin{macrocode}
- \ifx\@begindocumenthook\@undefined\else
- \edef\scrlfile@hookname{#1}%
- \def\scrlfile@cmp@hook{after}%
- \ifx\scrlfile@hookname\scrlfile@cmp@hook
- \expandafter\let\csname #2-l@ading\endcsname\@undefined
- \fi
- \let\scrlfile@cmp@hook\@undefined
- \let\scrlfile@hookname\@undefined
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \scrlfile@hookname
-% \end{macro}^^A \scrlfile@cmp@hook
-% \end{macro}^^A \scr@load@hook
-%
-% \begin{macro}{\scr@set@load@hook}
-% This command adds stuff to a load-file-hook, either the
-% \emph{before} or the \emph{after} one. First argument is the type of
-% hook (\meta{before} or \meta{after}), second is a filename. There's
-% a third argument not parsed by the macro itself but
-% \cs{g@addto@macro}. This third argument is the stuff, which will be
-% added to the hook. Because of using \cs{g@addto@macro} the hook must
-% be defined. So we define it, if it isn't.
-% \begin{description}
-% \item[ToDo:] Handling/ignoring an optional argument to make it more
-% compatible with \LaTeX's new \cs{AddToHook}.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\scr@set@load@hook}[2]{%
- \@ifundefined{#2-@#1}{\@namedef{#2-@#1}{}}{}%
- \expandafter\g@addto@macro\csname #2-@#1\endcsname
-}
-% \end{macrocode}
-% \end{macro}^^A \scr@set@load@hook
-%
-%
-% \subsection{Before and After Commands}
-%
-% \begin{command}{\BeforeFile,\AfterFile}
-% Just add code to the \emph{before} or \emph{after} hook of a file. The
-% arguments are:
-% \begin{description}
-% \item[\meta{file name}:] mandatory argument with the file name as given by
-% \cs{InputIfFileExists}.
-% \item[\meta{code}:] this argument is not processed by \cs{BeforeFile} or
-% \cs{AfterFile} but the internal \cs{scr@set@load@hook}. It is the code
-% that should be added to either the \emph{before} or the \emph{after} hook.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\BeforeFile}{\scr@set@load@hook{before}}
-\newcommand*{\AfterFile}{\scr@set@load@hook{after}}
-% \end{macrocode}
-% \end{command}^^A \BeforeFile,\AfterFile
-%
-% \begin{command}{\BeforeClass}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% This is quite simple. It only has to add code to the \emph{before} hook
-% already known by \cs{BeforeFile}. The arguments are:
-% \begin{description}
-% \item[\meta{package name}:] mandatory argument.
-% \item[\meta{code}:] this argument is processed not by \cs{BeforeClass} but
-% by the internal \cs{scr@set@load@hook} (see above), that will add the code
-% to the \emph{before} hook of file \meta{code}\texttt{.cls} (or whatever the
-% package extension is).
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\BeforeClass}[1]{%
- \scr@set@load@hook{before}{#1.\@clsextension}%
-}
-% \end{macrocode}
-% \end{command}^^A \BeforeClass
-%
-% \begin{command}{\AfterClass}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \changes{v3.32}{2020/09/02}{plus and exclamation mark variants removed}
-% \begin{command}{\AfterAtEndOfClass}
-% \changes{v3.32}{2020/09/02}{star variant replaces the exclamation mark
-% variant of \cs{AfterClass}}
-% These are more complicated. There are four forms:
-% \begin{description}
-% \item[\cs{AfterClass}] corresponds to \cs{AfterFile}. So the code will be
-% added to the usual \emph{after} hook and the code is exexuted before code
-% added by the class itself using \cs{AtEndOfClass}. Argument procession
-% will be done by \cs{@AfterClass}.
-% \item[\cs{AfterAtEndOfClass}] This uses the \emph{lateafter} hook, which
-% is executed after the class has been loaded completely inclusive the
-% execution of \cs{AtEndOfClass} code. However, the code will never be
-% executed, if the class will not be loaded (again). But it does nothing,
-% if the class has already been loaded. The arguments are:
-% \begin{description}
-% \item[\meta{class name}] mandatory argument
-% \item[\meta{code}:] this argument is processed not by \cs{BeforeClass}
-% but by the internal \cs{scr@set@load@hook} (see above), that will add
-% the code to the \emph{lateafter} hook of file \meta{code}\texttt{.cls}
-% (or whatever the class extension is), or by \cs{@gobble}.
-% \end{description}
-% \item[\cs{AfterClass*}] like \cs{AfterClass}, but if loading of the
-% class has already began, the code will be executed immediately. So, if
-% the command is used inside the class it is simply
-% \cs{@firstofone}. Argument procession will be done by \cs{@sAfterClass}.
-% \item[\cs{AfterAtEndOfClass*}] like \cs{AfterClass*}, but the code will be
-% executed immediately only if the class already has been loaded
-% completely. Inside \cs{AtEndOfClass} the code is executed after every all
-% the \cs{AtEndOfClass} code. Argument procession will be done by
-% \cs{@xAfterClass}.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\scrlfile@AfterClass}{%
- \kernel@ifstar \@sAfterClass\@AfterClass
-}
-\newcommand*{\AfterClass}{\scrlfile@AfterClass}
-% \end{macrocode}
-% \begin{macro}{\@AfterClass}
-% \cs{AfterClass}\marg{class name}\marg{code}.
-% It uses \cs{scr@set@load@hook} to add \meta{code} to the
-% \emph{after} hook. The second argument will be processed by
-% \cs{scr@set@load@hook}.
-% \begin{macrocode}
-\newcommand*{\@AfterClass}[1]{%
- \scr@set@load@hook{after}{#1.\@clsextension}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@AfterClass
-% \begin{macro}{\@sAfterClass}
-% \changes{v3.27a}{2019/10/16}{group removed}
-% This is the internal implementation of:
-% \cs{AfterClass*}\marg{class name}\marg{code}.
-% It tests, whether or not \LaTeX{} thinks that the class
-% has already been loaded, but this only means whether or not the class
-% loading has already been started. If so, it immediately executes the next
-% argument. If not, is uses \cs{@AfterClass} to execute the \meta{code}
-% after loading the class.
-% \begin{macrocode}
-\newcommand*{\@sAfterClass}[1]{%
- \@ifclassloaded{#1}{%
- \@secondoftwo
- }{%
- \@AfterClass
- }%
- {#1}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@sAfterClass
-% \begin{macrocode}
-\newcommand*{\AfterAtEndOfClass}{%
- \kernel@ifstar \@sAfterAtEndOfClass\@AfterAtEndOfClass
-}
-% \end{macrocode}
-% \begin{macro}{\@AfterAtEndOfClass}
-% \changes{v3.32}{2020/09/02}{added}
-% Note that \cs{AfterAtEndOfClass} executed the \meta{code} after each try
-% to load a class, even if the class has already been loaded and you try
-% to load it again.
-% \begin{macrocode}
-\newcommand*{\@AfterAtEndOfClass}[1]{%
- \scr@set@load@hook{lateafter}{#1.\@clsextension}%
-}
-% \end{macrocode}
-% \begin{macro}{\@sAfterAtEndOfClass}
-% \changes{v3.09}{2011/03/09}{added}
-% \changes{v3.27}{2019/08/26}{using inside class fixed}
-% \changes{v3.27a}{2019/10/15}{renamed from \cs{@@@AfterClass}}
-% \changes{v3.27a}{2019/10/16}{usage of \emph{l@ading} marker}
-% \changes{v3.27a}{2019/10/16}{group removed}
-% \changes{v3.32}{2020/09/02}{renamed from \cs{@xAfterClass}}
-% This is the internal implementation of:
-% \cs{AfterClass!}\marg{class name}\marg{code}. Note, that the exclamation
-% mark has not already read. So the arguments are:
-% \begin{description}
-% \item[\texttt{!}:] static exclamation mark, to be ignored.
-% \item[\meta{class name}] mandatory argument
-% \item[\meta{code}:] this argument is processed not by \cs{BeforeClass} but
-% by the internal \cs{@sAfterClass} or \cs{@AfterClass} (see above).
-% \end{description}
-% There are two differences to \cs{@pAfterClass}:
-% \begin{enumerate}
-% \item In case of \cs{\meta{class name}.cls-l@ading} is defined (and not
-% \cs{relax}), while loading a class, it used \cs{AfterAtEndOfClass}
-% instead of \cs{AfterClass} to add \meta{code} to the \emph{lateafter}
-% hook instead of the \emph{after} hook.
-% \item In case of \cs{\meta{class name}.cls-l@ading} is undefined (or
-% \cs{relax}) it also has to test, whether or not the class has already
-% been loaded. If so, it uses \cs{@sAfterClass} to execute the \meta{code}
-% immediately, otherwise it uses \cs{AfterAtEndOfClass} to add the
-% \meta{code} to the \emph{lateafter} hook.
-% \end{enumerate}
-% So it is more like (the not existing) \cs{AfterAtEndOfClass+} than
-% \cs{AfterAtEndOfClass*}.
-% \begin{macrocode}
-\newcommand*{\@sAfterAtEndOfClass}[1]{%
- \@ifundefined{#1.\@clsextension-l@ading}{%
- \@ifclassloaded{#1}{%
- \@secondoftwo
- }{%
- \@AfterAtEndOfClass
- }%
- }{%
- \@AfterAtEndOfClass
- }%
- {#1}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@sAfterAtEndOfClass
-% \end{macro}^^A \@AfterAtEndOfClass
-% \end{command}^^A \AfterAtEndOfClass
-% \end{command}^^A \AfterClass
-%
-% \begin{command}{\BeforePackage}
-% This is quite simple. It only has to add code to the \emph{before} hook
-% already known by \cs{BeforeFile}. The arguments are:
-% \begin{description}
-% \item[\meta{package name}:] mandatory argument.
-% \item[\meta{code}:] this argument is processed not by \cs{BeforePackage} but
-% by the internal \cs{scr@set@load@hook} (see above), that will add the code
-% to the \emph{before} hook of file \meta{code}\texttt{.sty} (or whatever the
-% package extension is).
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\BeforePackage}[1]{%
- \scr@set@load@hook{before}{#1.\@pkgextension}%
-}
-% \end{macrocode}
-% \end{command}^^A \BeforePackage
-%
-% \begin{command}{\AfterPackage}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{command}{\AfterAtEndOfPackage}
-% These are more complicated. There are four forms:
-% \begin{description}
-% \item[\cs{AfterPackage}] corresponds to \cs{AfterFile}. So the code will be
-% added to the usual \emph{after} hook and the code is exexuted before code
-% added by the package itself using \cs{AtEndOfPackage}. Argument procession
-% will be done by \cs{@AfterPackage}.
-% \item[\cs{AfterAtEndOfPackage}] This uses the \emph{lateafter} hook, which
-% is executed after the package has been loaded completely inclusive the
-% execution of \cs{AtEndOfPackage} code. However, the code will never be
-% executed, if the package will not be loaded (again). But it does nothing,
-% if the package has already been loaded. The arguments are:
-% \begin{description}
-% \item[\meta{package name}] mandatory argument
-% \item[\meta{code}:] this argument is processed not by \cs{BeforePackage}
-% but by the internal \cs{scr@set@loaf@hook} (see above), that will add
-% the code to the \emph{lateafter} hook of file \meta{code}\texttt{.sty}
-% (or whatever the package extension is), or by \cs{@gobble}.
-% \end{description}
-% \item[\cs{AfterPackage*}] like \cs{AfterPackage}, but if loading of the
-% package has already began, the code will be executed immediately. So, if
-% the command is used inside the package it is simply
-% \cs{@firstofone}..
-% \item[\cs{AfterAtEndOfPackage*}] like \cs{AfterPackage*}, but the code will
-% be executed immediately only if the package already has been loaded
-% completely. Inside \cs{AtEndOfPackage} the code is executed after every
-% all the \cs{AtEndOfPackage} code.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\scrlfile@AfterPackage}{%
- \kernel@ifstar \@sAfterPackage\@AfterPackage
-}
-\newcommand*{\AfterPackage}{\scrlfile@AfterPackage}
-% \end{macrocode}
-% \begin{macro}{\@AfterPackage}
-% This is the internal implementation of:
-% \cs{AfterPackage}\marg{package name}\marg{code}.
-% It uses \cs{scr@set@load@hook} to add \meta{code} to the
-% \emph{after} hook. The second argument will be processed by
-% \cs{scr@set@load@hook}.
-% \begin{macrocode}
-\newcommand*{\@AfterPackage}[1]{%
- \scr@set@load@hook{after}{#1.\@pkgextension}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@AfterPackage
-% \begin{macro}{\@sAfterPackage}
-% \changes{v3.27a}{2019/10/16}{group removed}
-% This is the internal implementation of:
-% \cs{AfterPackage*}\marg{package name}\marg{code}.
-% It tests, whether or not \LaTeX{} thinks that the package
-% has already been loaded, but this only means whether or not the package
-% loading has already been started. If so, it immediately executes the next
-% argument. If not, is uses \cs{@AfterPackage} to execute the \meta{code}
-% after loading the package.
-% \begin{macrocode}
-\newcommand*{\@sAfterPackage}[1]{%
- \@ifpackageloaded{#1}{%
- \@secondoftwo
- }{%
- \@AfterPackage
- }%
- {#1}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@sAfterPackage
-% \begin{macrocode}
-\newcommand*{\AfterAtEndOfPackage}{%
- \kernel@ifstar \@sAfterAtEndOfPackage\@AfterAtEndOfPackage
-}
-% \end{macrocode}
-% \begin{macro}{\@sAfterAtEndOfPackage}
-% \changes{v3.09}{2011/03/09}{added}
-% \changes{v3.27}{2019/08/26}{using inside package fixed}
-% \changes{v3.27a}{2019/10/15}{renamed from \cs{@@@AfterPackage}}
-% \changes{v3.27a}{2019/10/16}{usage of \emph{l@ading} marker}
-% \changes{v3.27a}{2019/10/16}{group removed}
-% \changes{v3.32}{2020/09/02}{renamed from \cs{@xAfterPackage}}
-% This is the internal implementation of:
-% \cs{AfterAtEndOfPackage*}\marg{package name}\marg{code}.
-% \begin{macrocode}
-\newcommand*{\@sAfterAtEndOfPackage}[1]{%
- \@ifundefined{#1.\@pkgextension-l@ading}{%
- \@ifpackageloaded{#1}{%
- \@secondoftwo
- }{%
- \@@AfterAtEndOfPackage
- }%
- }{%
- \@@AfterAtEndOfPackage
- }%
- {#1}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@sAfterAtEndOfPackage
-% \begin{macro}{\@AfterAtEndOfPackage}
-% \changes{v3.32}{2020/09/02}{added}
-% \begin{macro}{\@@AfterAtEndOfPackage}
-% \changes{v3.27a}{2019/10/15}{added}
-% \changes{v3.27a}{2019/10/16}{group removed}
-% \changes{v3.32}{2020/09/02}{renamed from \cs{@AfterAtEndOfPackage}}
-% Note that until 3.27a \cs{AfterAtEndOfPackage} executed the \meta{code}
-% after each try to load a package, even if the package has already been
-% loaded and you've try to load it again. Since 3.27a this is the
-% functionality of \cs{@AfterAtEndOfPackage}. \cs{AfterAtEndOfPackage} now
-% does not do anything for already loaded packages or while loading the
-% package.
-% \begin{macrocode}
-\newcommand*{\@AfterAtEndOfPackage}[1]{%
- \@ifpackageloaded{#1}{%
- \@ifundefined{#1.\@pkgextension-l@ading}{%
- \@gobbletwo
- }{%
- \@@AfterAtEndOfPackage
- }%
- }{%
- \@@AfterAtEndOfPackage
- }%
- {#1}%
-}
-\newcommand*{\@@AfterAtEndOfPackage}[1]{%
- \scr@set@load@hook{lateafter}{#1.\@pkgextension}%
-}
-% \end{macrocode}
-% \end{macro}^^A \@@AfterAtEndOfPackage
-% \end{macro}^^A \@AfterEndOfPackage
-% \end{command}^^A \AfterAtEndOfPackage
-% \end{command}^^A \AfterPackage
-%
-%
-% \subsection{File Substitution}
-%
-% \begin{command}{\ReplaceInput}
-% \changes{v2.96}{2006/07/19}{added}
-% \changes{v3.12}{2013/11/15}{implemented}
-% Defining the replacement by definition of \cs{\#1-@alias}.
-% \begin{macrocode}
-\newcommand*{\ReplaceInput}[2]{%
- \expandafter\edef\csname #1-@alias\endcsname{#2}%
-}
-% \end{macrocode}
-% \begin{command}{\ReplaceFile}
-% \changes{v2.96}{2006/07/19}{added}
-% \changes{v3.12}{2013/11/15}{throw error}
-% Sorry, but I've implemented the wrong command some time ago.
-% \begin{macrocode}
-\newcommand*{\ReplaceFile}{%
- \PackageError{scrlfile}{%
- usage of not documented command `\string\ReplaceFile'%
- }{%
- Command `\string\ReplaceFile' has been implemented accidentally in
- KOMA-Script 2.96\MessageBreak
- and replaced by `\string\ReplaceInput' in KOMA-Script 3.12.\MessageBreak
- You should replace `\string\ReplaceFile' by `\string\ReplaceInput' to
- avoid this error\MessageBreak
- message%
- }%
- \ReplaceInput
-}
-% \end{macrocode}
-% \end{command}^^A \ReplaceFile
-% \end{command}^^A \ReplaceInput
-%
-% \begin{command}{\UnReplaceInput}
-% \changes{v3.12}{2013/11/15}{added}
-% Do not longer replace a file.
-% \begin{macrocode}
-\newcommand*{\UnReplaceInput}[1]{%
- \ifcsname #1-@alias\endcsname
- \expandafter\let\csname #1-@alias\endcsname\relax
- \fi
-}
-% \end{macrocode}
-% \end{command}^^A \UnReplaceInput
-%
-% \begin{command}{\ReplacePackage,\ReplaceClass}
-% \changes{v2.96}{2006/07/19}{added}
-% \begin{macro}{\@replacefilewithext}
-% \changes{v2.96}{2006/07/19}{added}
-% \changes{v3.32}{2020/09/09}{works global}
-% Note that replacing a package or class will not replace the input of the
-% file of the package or class but only the input of package or class.
-% \begin{macrocode}
-\newcommand*{\@replacefilewithext}[3]{%
- \expandafter\xdef\csname #1.#3-@aliasname\endcsname{#2}%
-}
-\newcommand*{\ReplacePackage}[2]{%
- \@replacefilewithext{#1}{#2}\@pkgextension
-}
-\newcommand*{\ReplaceClass}[2]{%
- \@replacefilewithext{#1}{#2}\@clsextension
-}
-% \end{macrocode}
-% \end{macro}^^A \@replacefilewithext
-% \end{command}^^A\ReplacePackage,\ReplaceClass
-%
-% \begin{command}{\UnReplacePackage,\UnReplaceClass}
-% \changes{v3.12}{2013/11/15}{added}
-% \begin{macro}{\@unreplacefilewithext}
-% \changes{v3.12}{2013/11/15}{added}
-% \changes{v3.32}{2020/09/09}{works global}
-% Do not nolonger replace a class or package.
-% \begin{macrocode}
-\newcommand*{\@unreplacefilewithext}[2]{%
- \ifcsname #1.#2-@aliasname\endcsname
- \expandafter\global\expandafter\let\csname #1.#2-@aliasname\endcsname\relax
- \fi
-}
-\newcommand*{\UnReplacePackage}[1]{%
- \@unreplacefilewithext{#1}\@pkgextension
-}
-\newcommand*{\UnReplaceClass}[1]{%
- \@unreplacefilewithext{#1}\@clsextension
-}
-% \end{macrocode}
-% \end{macro}^^A \@unreplacefilewithext
-% \end{command}^^A \UnReplacePackage,\UnReplaceClass
-%
-%
-% \subsection{Prevent Package from Loading}
-%
-% \begin{command}{\PreventPackageFromLoading}
-% \changes{v3.08}{2010/11/04}{added}
-% \changes{v3.11a}{2012/06/13}{write fault error in \cs{MessageBreak} fixed}
-% \changes{v3.12}{2012/06/15}{new star version allowes empty argument with
-% info instead of warning}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \changes{v3.32}{2020/09/09}{works global}
-% \begin{macro}{\@PreventPackageFromLoading}
-% \changes{v3.12}{2012/06/15}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@PreventPackageFromLoading}
-% \changes{v3.12}{2013/11/22}{added}
-% \changes{v3.12}{2013/11/22}{\cs{usepackage} before \cs{documentclass}
-% fixed}
-% \begin{macro}{\scrlfile@excludedpackages}
-% \changes{v3.08}{2010/11/04}{added}
-% \begin{macro}{\scrlfile@saved@RequirePackage}
-% \changes{v3.08}{2010/11/04}{added}
-% \begin{macrocode}
-\newcommand*{\scrlfile@excludedpackages}{}
-\let\scrlfile@excludedpackages\@empty
-\newcommand*{\scrlfile@saved@RequirePackage}{}
-\newcommand*{\PreventPackageFromLoading}{%
- \kernel@ifstar{\@PreventPackageFromLoading\PackageInfo}%
- {\@PreventPackageFromLoading\PackageWarning}%
-}
-\newcommand*{\@PreventPackageFromLoading}[1]{%
- \kernel@ifnextchar [%]
- {\@@PreventPackageFromLoading#1}{\@@PreventPackageFromLoading#1[]}%
-}
-\newcommand*{\@@PreventPackageFromLoading}{}
-\def\@@PreventPackageFromLoading#1[#2]#3{%
-% \end{macrocode}
-% We do nothing, if the argument was empty:
-% \begin{macrocode}
- \edef\reserved@b{\zap@space#3 \@empty}%
- \ifx \reserved@b\@empty
- #1{scrlfile}{%
- \string\PreventPackageFromLoading\space with empty packages\MessageBreak
- argument ignored%
- }%
- \else
-% \end{macrocode}
-% If the argument was not empty we first need to patch \cs{RequirePackage} and
-% maybe \cs{usepackage} too.
-% \begin{macrocode}
- \ifx\scrlfile@excludedpackages\@empty
- \global\let\scrlfile@saved@RequirePackage\RequirePackage
- \global\let\RequirePackage\scrlfile@RequirePackage
- \def\reserved@a##1##{%
- \@latex@error
- {\noexpand \usepackage before \string\documentclass}%
- {\noexpand \usepackage may only appear in the document
- preamble, i.e.,\MessageBreak
- between \noexpand\documentclass and
- \string\begin{document}.}%
- \@gobble}%
- \ifx\reserved@a\usepackage\else
- \ifx\usepackage\scrlfile@saved@RequirePackage\else
- \PackageWarning{scrlfile}{%
- Maybe serious problem: unexpected definition of\MessageBreak
- \string\usepackage
- }%
- \fi
- \global\let\usepackage\RequirePackage
- \fi
- \fi
-% \end{macrocode}
-% We have to test, if a package was already loaded. Only not yet loaded
-% packages will be added to the exclusion list. Empty arguments will be
-% ignored.
-% \changes{v3.11a}{2012/06/11}{missing \cs{scrlfile@excludedpackages} at
-% redefinition of \cs{scrlfile@excludedpackages} added}
-% \changes{v3.26}{2018/08/29}{spurious \cs{expandafter} removed}
-% \begin{macrocode}
- \@for\reserved@a:=\reserved@b\do {%
- \ifx\reserved@a\@empty
- #1{scrlfile}{%
- empty package argument for
- \string\PreventPackageFromLoading\MessageBreak
- ignored%
- }%
- \else
- \expandafter\@ifpackageloaded\expandafter{\reserved@a}{%
- #1{scrlfile}{%
- package `\reserved@a' already loaded.\MessageBreak
- Cannot prevent it from beeing loaded%
- }%
- }{%
- \ifx\scrlfile@excludedpackages\@empty
- \global\let\scrlfile@excludedpackages\reserved@a
- \else
- \xdef\scrlfile@excludedpackages{\scrlfile@excludedpackages,%
- \reserved@a}%
- \fi
- \if\relax\detokenize{#2}\relax\else
- \@ifundefined{scrlfile@exclude@package@\reserved@a @do}{%
- \@namedef{scrlfile@exclude@package@\reserved@a @do}{}%
- }{}%
- \expandafter\gdef
- \csname scrlfile@exclude@package@\reserved@a
- @do\expandafter\expandafter\expandafter\endcsname
- \expandafter\expandafter\expandafter{%
- \csname scrlfile@exclude@package@\reserved@a @do\endcsname
- #2%
- }%
- \fi
- }%
- \fi
- }%
-% \end{macrocode}
-% If the exclusion list is still empty (because all packages has been loaded
-% already), remove the patch:
-% \begin{macrocode}
- \ifx\scrlfile@excludedpackages\@empty
- \ResetPreventPackageFromLoading
- \fi
- \fi
-}
-\@onlypreamble\PreventPackageFromLoading
-% \end{macrocode}
-% \begin{command}{\ResetPreventPackageFromLoading}
-% \changes{v3.08}{2010/11/04}{added}
-% \changes{v3.32}{2020/09/09}{works global}
-% \begin{command}{\StorePreventPackageFromLoading}
-% \changes{v3.08}{2010/11/04}{added}
-% These two are very simple
-% \begin{macrocode}
-\newcommand*{\ResetPreventPackageFromLoading}{%
- \global\let\scrlfile@excludedpackages\@empty
- \ifx\RequirePackage\scrlfile@RequirePackage
- \ifx\usepackage\RequirePackage
- \global\let\usepackage\scrlfile@saved@RequirePackage
- \fi
- \global\let\RequirePackage\scrlfile@saved@RequirePackage
- \fi
-}
-\@onlypreamble\ResetPreventPackageFromLoading
-\newcommand*{\StorePreventPackageFromLoading}[1]{%
- \let#1\scrlfile@excludedpackages
-}
-\@onlypreamble\StorePreventPackageFromLoading
-% \end{macrocode}
-% \begin{command}{\UnPreventPackageFromLoading}
-% \changes{v3.12}{2013/11/22}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} durch \cs{kernel@ifstar}
-% ersetzt}
-% \changes{v3.32}{2020/09/09}{works global}
-% \begin{macro}{\@UnPreventPackageFromLoading}
-% \changes{v3.12}{2013/11/22}{added}
-% This removes packages from the prevent exclude list. The star variant also
-% undefines the instead code.
-% \begin{macrocode}
-\newcommand*{\UnPreventPackageFromLoading}{%
- \kernel@ifstar {\@tempswatrue\@UnPreventPackageFromLoading}%
- {\@tempswafalse\@UnPreventPackageFromLoading}%
-}
-\newcommand*{\@UnPreventPackageFromLoading}[1]{%
- \edef\reserved@b{\zap@space#1 \@empty}%
- \if@tempswa
- \@for\reserved@a:=\reserved@b\do {%
- \ifx\reserved@a\@empty \else
- \ifcsname scrlfile@exclude@package@\reserved@a @do\endcsname
- \expandafter\let
- \csname scrlfile@exclude@package@\reserved@a @do\endcsname
- \undefined
- \fi
- \fi
- }%
- \fi
- \ifcsname scrlfile@excludedpackages\endcsname
- \let\reserved@a\scrlfile@excludedpackages
- \let\scrlfile@excludedpackages\@empty
- \expandafter\@for\expandafter\reserved@c
- \expandafter:\expandafter=\reserved@a
- \do{%
- \ifx\reserved@c\@empty\else
- \@expandtwoargs\in@{,\reserved@c,}{,\reserved@b,}%
- \ifin@
- \else
- \ifx\scrlfile@excludepackages\@empty
- \global\let\scrlfile@excludepackages\reserved@c
- \else
- \xdef\scrlfile@excludedpackages{%
- \scrlfile@excludedpackages,\reserved@c
- }%
- \fi
- \fi
- \fi
- }%
- \ifx\scrlfile@excludedpackages\@empty\ResetPreventPackageFromLoading\fi
- \fi
-}
-% \end{macrocode}
-% \end{macro}^^A \@UnPreventPackageFromLoading
-% \end{command}^^A \UnPreventPackageFromLoading
-% \begin{macro}{\scrlfile@RequirePackage}
-% \changes{v3.08}{2010/11/04}{added}
-% \changes{v3.12}{2013/11/22}{tolerate spaces}
-% \changes{v3.12}{2013/11/22}{execute the optional argument of
-% \cs{PreventPackageFromLoading}}
-% This macro will replace \cs{RequirePackage} whenever the exlude list is not
-% empty
-% \begin{macrocode}
-\newcommand*{\scrlfile@RequirePackage}[2][]{%
- \let\reserved@c\@empty
- \let\reserved@d\@empty
- \edef\reserved@b{\zap@space#2 \@empty}%
- \expandafter\@for\expandafter\reserved@b\expandafter:\expandafter=\reserved@b
- \do {%
- \begingroup
- \@tempswatrue
- \@for\reserved@a:=\scrlfile@excludedpackages\do {%
- \ifx\reserved@a\reserved@b
- \@tempswafalse
- \fi
- }%
- \if@tempswa
- \xdef\reserved@c{\reserved@c,\reserved@b}%
- \else
- \ifx\reserved@b\@empty\else
- \PackageInfo{scrlfile}{Excluding package `\reserved@b'\MessageBreak
- from loading}%
- \@ifundefined{scrlfile@exclude@package@\reserved@b @do}{%
- }{%
- \expandafter\g@addto@macro\expandafter\reserved@d
- \csname scrlfile@exclude@package@\reserved@b @do\endcsname
- }%
- \fi
- \fi
- \endgroup
- }%
- \ifx\reserved@c\@empty
- \let\reserved@a\scr@gobbleopt
- \else
- \edef\reserved@a{\noexpand\scrlfile@saved@RequirePackage[#1]{%
- \expandafter\@gobble\reserved@c\@empty}}%
- \fi
- \expandafter\reserved@d
- \reserved@a
-}
-% \end{macrocode}
-% \end{macro}^^A \scrlfile@RequirePackage
-% \end{command}^^A \StorePreventPackageFromLoading
-% \end{command}^^A \ResetPreventPackageFromLoading
-% \end{macro}^^A \scrlfile@saved@RequirePackage
-% \end{macro}^^A \scrlfile@excludedpackages
-% \end{macro}^^A \@@PreventPackageFromLoading
-% \end{macro}^^A \@PreventPackageFromLoading
-% \end{command}^^A \PreventPackageFromLoading
-%
-% \begin{macro}{\scr@gobbleopt}
-% \changes{v3.08}{2010/11/04}{added}
-% \changes{v3.08a}{2011/02/11}{\cs{@gobbleopt} renamed due to compaibility
-% problems with \texttt{ntheorem}}
-% Eat the optional argument if it exists.
-% \begin{macrocode}
-\providecommand{\scr@gobbleopt}[1][]{}
-% \end{macrocode}
-% \end{macro}^^A \scr@gobbleopt
-%
-% \begin{macro}{\kernel@ifstar}
-% \changes{v3.20}{2016/04/12}{added}
-% I hope, the \LaTeX{} kernel will define this command in future. But
-% nevertheless, there are \LaTeX{} kernels in real live without this
-% command. So I do it again if needed:
-% \begin{macrocode}
-\providecommand*\kernel@ifstar[1]{\kernel@ifnextchar*{\@firstoftwo{#1}}}
-% \end{macrocode}
-% \end{macro}^^A \kernel@ifstar
-%
-%
-% \subsection{Extra Document Hooks}
-%
-% \begin{command}{\BeforeClosingMainAux}
-% \changes{v2.95}{2002/09/03}{added}
-% \begin{command}{\AfterReadingMainAux}
-% \changes{v3.03}{2009/03/25}{added}
-% These are completly different. First we have to establish a new hook
-% at \cs{end\{document\}}, just after closing the group and after the
-% final \cs{clearpage}.
-% \begin{description}
-% \item[ToDo:] Handling/ignoring an optional argument to make them more
-% compatible with \LaTeX's new \cs{AddToHook}.
-% \end{description}
-% \begin{macrocode}
-\AtEndDocument{%
- \let\scr@saved@checkend=\@checkend
- \renewcommand*{\@checkend}[1]{%
- \def\reserved@a{#1}\def\reserved@b{document}%
- \scr@saved@checkend{#1}%
- \ifx\reserved@a\reserved@b
- \let\scr@saved@clearpage=\clearpage
- \renewcommand*{\clearpage}{\scr@saved@clearpage
- \scr@hook@bcma
- \scr@restore@newpage
- \let\clearpage=\scr@saved@clearpage}%
- \fi%
- \let\scr@saved@dofilelist\@dofilelist
- \def\@dofilelist{%
- \scr@hook@acma
- \let\@dofilelist\scr@saved@dofilelist
- \scr@saved@dofilelist
- }%
- }%
-}
-% \end{macrocode}
-% \begin{macro}{\scr@saved@checkend}
-% \changes{v2.95}{2002/09/03}{added}
-% \begin{macro}{\scr@saved@dofilelist}
-% \changes{v3.03}{2009/03/25}{added}
-% You may see above, that we need save-to macros.
-% \begin{macrocode}
-\newcommand*{\scr@saved@checkend}{}
-\newcommand*{\scr@saved@dofilelist}{}
-% \end{macrocode}
-% \end{macro}^^A \scr@saved@dofilelist
-% \end{macro}^^A \scr@saved@checkend
-% \begin{macro}{\scr@redefine@newpage}
-% \changes{v3.00}{2008/07/09}{added}
-% Some classes (e.g. \cls{letter}) write output to the aux file.
-% Because of this, redefinition of \cs{newpage} will only be done, if
-% \cs{BeforeClosingMainAux} is used.
-% \begin{macro}{\scr@saved@newpage}
-% \changes{v3.00}{2008/07/09}{added}
-% And \cs{newpage} will be restored after the hook.
-% \begin{macro}{\scr@restore@newpage}
-% \begin{macrocode}
-\newcommand*{\scr@redefine@newpage}{%
- \let\scr@saved@newpage\newpage
- \def\scr@restore@newpage{%
- \renewcommand*{\newpage}{%
- \PackageWarningNoLine{%
- scrlfile%
- }{%
- \string\newpage\space at main aux file!\MessageBreak
- You have output material at the main aux file.\MessageBreak
- Note, that the \string\BeforeClosingMainAux\space commands\MessageBreak
- are processed before the output from aux file%
- }%
- \let\newpage\scr@saved@newpage
- \newpage
- }%
- }%
- \renewcommand*{\newpage}{%
- \PackageError{%
- scrlfile%
- }{%
- \string\newpage\space at \string\BeforeClosingMainAux
- }{%
- You should never use \string\newpage\space or
- \string\clear(double)page or other output material at the\MessageBreak
- argument of \string\BeforeClosingMainAux!\MessageBreak
- If you'll continue, the \string\newpage\space will be ignored to
- avoid corruption of\MessageBreak
- every prior use of \string\BeforeClosingMainAux.
- }%
- }%
-}
-\newcommand*{\scr@restore@newpage}{}
-% \end{macrocode}
-% \end{macro}^^A \scr@restore@newpage
-% \end{macro}^^A \scr@saved@newpage
-% \end{macro}^^A \scr@redefine@newpage
-% \begin{macro}{\scr@hook@bcma}
-% \changes{v2.95}{2002/09/03}{added}
-% \begin{macro}{\scr@hook@acma}
-% \changes{v3.03}{2009/03/25}{added}
-% We also need macros, that saves the commands at the hooks and are
-% extendable using \cs{g@addto@macro}.
-% \begin{macrocode}
-\newcommand*{\scr@hook@bcma}{}
-\newcommand*{\scr@hook@acma}{}
-% \end{macrocode}
-% \end{macro}^^A \scr@hook@acma
-% \end{macro}^^A \scr@hook@bcma
-% Now we are able to write the user command. Here we also warn, if we detect
-% one more \cs{newpage}\,---\,maybe at a \cs{clearpage} or
-% \cs{cleardoublepage}.
-% \begin{macrocode}
-\newcommand*{\BeforeClosingMainAux}{%
- \ifx\scr@hook@bcma\@empty
- \gdef\scr@hook@bcma{%
- \renewcommand*{\BeforeClosingMainAux}[1]{####1}%
- \let\protected@write\protected@immediate@write
- \scr@redefine@newpage
- }%
- \fi
- \g@addto@macro\scr@hook@bcma%
-}
-\newcommand*{\AfterReadingMainAux}{%
- \ifx\scr@hook@acma\@empty
- \gdef\scr@hook@acma{%
- \renewcommand*{\AfterReadingMainAux}[1]{####1}%
- \let\protected@write\protected@immediate@write
- }%
- \fi
- \g@addto@macro\scr@hook@acma%
-}
-% \end{macrocode}
-% \end{command}^^A \AfterReadingMainAux
-% \end{command}^^A \BeforeClosingMainAux
-%
-% \begin{macro}{\protected@immediate@write}
-% Like \LaTeX{} kernel's |\protected@write| but using |\immediate\write|. In
-% this case it is even not a good idea to protect |\thepage|!
-% \begin{macrocode}
-\long\def\protected@immediate@write#1#2#3{%
- \begingroup
- #2%
- \let\protect\@unexpandable@protect
- \edef\reserved@a{\immediate\write#1{#3}}%
- \reserved@a
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \Finale
-% \PrintChanges
-% \endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrlfile.dtx b/macros/latex/contrib/koma-script/source/scrlfile.dtx
deleted file mode 100644
index a9a65ef46a..0000000000
--- a/macros/latex/contrib/koma-script/source/scrlfile.dtx
+++ /dev/null
@@ -1,273 +0,0 @@
-% \iffalse^^A meta-comment
-% ======================================================================
-% scrlfile.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the work `scrlfile' which is part of the LaTeX2e
-% KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrlfile.dtx 3688 2022-02-10 08:26:37Z kohm $
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-10 09:26:37 +0100 (Do, 10. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3688 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrlfile.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script package source
- }%
-\reserved@a
-%</dtx>
-%<package>\ProvidesPackage{scrlfile}[%
-%!KOMAScriptVersion
-%<package> package
- (file load hooks)]
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2002}
- \generate{\usepreamble\defaultpreamble
- \file{scrlfile.sty}{%
- \from{scrlfile.dtx}{package}%
- \from{scrlogo.dtx}{logo}%
- }%
- }
- \batchinput{scrlfile-hook.dtx}
- \batchinput{scrlfile-patcholdlatex.dtx}
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{1}
-\begin{document}
- \DocInput{scrlfile.dtx}
-\end{document}
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v2.95}{2002/06/11}{First version split from hugh scrclass.dtx}
-% \changes{v3.24}{2017/05/06}{standalone manual removed}
-% \changes{v3.32}{2020/09/11}{new implementation based on
-% \pkg*{scrlfile-hook} and \pkg*{scrlfile-patcholdlatex}}
-% \changes{v3.36}{2022/02/03}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/03}{using \file{scrlogo.dtx} to define the logo}
-%
-% \GetFileInfo{scrlfile.dtx}
-% \title{File Loading Hooks with \href{https://komascript.de}{\KOMAScript}
-% Package \pkg*{scrlfile}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% This package is the compatibility layer over \texttt{scrlfile-hook} and
-% \texttt{scrlfile-patcholdlatex}. It provides package and class hook
-% handling independent from the used \LaTeX{} release.
-% \end{abstract}
-% \tableofcontents
-%
-%
-% \section{User Manual}
-%
-% You can find the user manual of \pkg*{scrlfile} in the \KOMAScript{} manual,
-% either the German \file{scrguide} or the English \file{scrguien}.
-% Here you can find interim documentation only (before it is added to the
-% \KOMAScript{} manual).
-%
-% \DescribeOption{withdeprecated}
-% Package option \opt{withdeprecated} enables the definition of deprecated
-% commands \cs{AfterClass+}, \cs{AfterPackage+}, \cs{AfterClass!} and
-% \cs{AfterPackage!}. All of them will be emulated by \cs{AfterAtEndOClass*}
-% and \cs{AfterAtEndOfPackage*} so they are not completely compatible with the
-% original deprecated commands.
-%
-% Users of classes or package, that use such deprecated commands can load
-% \pkg*{scrlfile} already before the class using:
-%\begin{verbatim}
-% \RequirePackage[withdeprecated]{scrlfile}
-%\end{verbatim}%
-% or adding option \opt{withdeprecated} to the global options of
-% \cs{documentclass}. Note, this is not a key-value option. It cannot be
-% changed after loading \pkg*{scrlfile}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of \pkg*{scrlfile}}
-%
-% We need to load one of the packages \pkg*{scrlfile-hook},
-% \pkg*{scrlfile-kook-3.34}, \pkg*{scrlfile-patcholdlatex}.
-% \changes{v3.33}{2021/02/09}{do not test for existence of \cs{AddToHook} any
-% longer, but \cs{IfFormatAtLeastTF} and the format version}%
-% We cannot do the decision by testing the existence of macro \cs{AddToHook},
-% because package \pkg{latexrelease} does not rollback to prior format
-% versions good enough. Instead of undefining the macro and so really
-% reverting to the definition of \LaTeX{} kernels prior to 2020/10/01 it only
-% redefines it to a do-nothing macro. Because of this and similar issues with
-% \pkg{latexrelease} cannot (or only with provision) be used to simulate a
-% real old \LaTeX{} kernel, i.e. for testing. So the only valid test for the
-% existence of the wanted \cs{AddToHook} would be to test the definite
-% definition of \cs{AddToHook} and the existence of the hooks we are
-% using. But, because this is to much effort, we simply test the format
-% version. Nevertheless, we know, this may fail!
-% \begin{macrocode}
-\@ifundefined{IfFormatAtLeastTF}{%
- \RequirePackage{scrlfile-patcholdlatex}%
- \RequirePackage{xparse}%
-% \end{macrocode}
-% \changes{v3.33}{2021/02/16}{workaround for \pkg{latexrelease} bug}
-% Explicitly switch of \pkg{expl3} syntax because of a
-% \pkg{latexrelease} bug related to the usage of \pkg{xparse-2020-10-01} in
-% version 2020-02-02.
-% \changes{v3.35}{2021/10/31}{new variant because of \LaTeX{} kernel change}
-% \begin{macrocode}
- \ExplSyntaxOff
-}{%
- \IfFormatAtLeastTF{2020/10/01}{%
- \IfFormatAtLeastTF{2021/11/15}{%
- \RequirePackage{scrlfile-hook}%
- }{%
- \RequirePackage{scrlfile-hook-3.34}%
- }%
- }{%
- \RequirePackage{scrlfile-patcholdlatex}%
- \RequirePackage{xparse}%
-% \end{macrocode}
-% Explicitly switch of \pkg{expl3} syntax because of a
-% \pkg{latexrelease} bug in version 2020-02-02.
-% \begin{macrocode}
- \ExplSyntaxOff
- }%
-}
-% \end{macrocode}
-%
-% \begin{option}{withdeprecated}
-% \changes{v3.32}{2020/09/11}{added}
-% Depending on this option we implement addition deprecated commands.
-% \begin{macrocode}
-\DeclareOption{withdeprecated}{%
-% \end{macrocode}
-%
-% \begin{command}[noindex]{\AfterClass+,\AfterClass!}
-% \cs{scrlfile@AfterClass} is used in the sub-packages to store the original
-% \cs{AfterClass} and can be used to redefine \cs{AfterClass} to handle the
-% plus and the exclamation mark variant.
-% \begin{macrocode}
- \RenewDocumentCommand\AfterClass{}{%
-% \end{macrocode}
-%^^A Hack for correct line numbers in the index:
-%^^A - end environment,
-%^^A - do index entries
-%^^A - fix vertical spaces
-%^^A - restart environment without printing and indexing
-% \end{command}
-% \SpecialMainCommandIndex{\AfterClass+}
-% \SpecialMainCommandIndex{\AfterClass\quotechar!}
-% \vskip-\dimexpr 2.2\baselineskip+\parskip\relax
-% \begin{command}[noindex,noprint]{\AfterClass+,\AfterClass!}
-% \begin{macrocode}
- \kernel@ifnextchar +%
- {\scrlfile@emulatedeprecated{Class}}%
- {%
- \kernel@ifnextchar !%
- {\scrlfile@emulatedeprecated{Class}}%
- \scrlfile@AfterClass
- }%
- }
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}[noindex]{\AfterPackage+,\AfterPackage!}
-% \cs{scrlfile@AfterPackage} is used in the sub-packages to store the original
-% \cs{AfterPackage} and can be used to redefine \cs{AfterPackage} to handle
-% the plus and the exclamation mark variant.
-% \begin{macrocode}
- \RenewDocumentCommand\AfterPackage{}{%
-% \end{macrocode}
-%^^A Hack for correct line numbers in the index:
-%^^A - end environment,
-%^^A - do index entries
-%^^A - fix vertical spaces
-%^^A - restart environment without printing and indexing
-% \end{command}
-% \SpecialMainCommandIndex{\AfterPackage+}
-% \SpecialMainCommandIndex{\AfterPackage\quotechar!}
-% \vskip-\dimexpr 2.2\baselineskip+\parskip\relax
-% \begin{command}[noindex,noprint]{\AfterPackage+,\AfterPackage!}
-% \begin{macrocode}
- \kernel@ifnextchar +%
- {\scrlfile@emulatedeprecated{Package}}%
- {%
- \kernel@ifnextchar !%
- {\scrlfile@emulatedeprecated{Package}}%
- \scrlfile@AfterPackage
- }%
- }
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macro}{\scrlfile@emulatedeprecated}
-% \changes{v3.32}{2020/09/11}{added}
-% This emulates \cs{AfterClass+}, \cs{AfterPackage+}, \cs{AfterClass!} and
-% \cs{AfterPackage!} using \cs{AfterAtEndOfClass} or
-% \cs{AfterAtEndOfPackage}. Note, that both, the plus and the exclamation mark
-% variants, are emulated by the star variant of \cs{AfterAtEndOfClass}
-% resp. \cs{AfterAtEndOfPackage}. So the emulation is not perfect.
-% \begin{macrocode}
- \newcommand*{\scrlfile@emulatedeprecated}[2]{%
- \PackageWarning{scrlfile}{%
- emulating deprecated \expandafter\string\csname After#1#2\endcsname
- \space by\MessageBreak
- \expandafter\string\csname AfterAtEndOf#1*\endcsname.\MessageBreak
- Note, this may fail, so you should not use\MessageBreak
- \expandafter\string\csname After#1#2\endcsname
- }%
- \csname AfterAtEndOf#1\endcsname*%
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-}
-% \end{macrocode}
-% \end{option}
-%
-% Now, we just have to execute and process the options.
-% \begin{macrocode}
-\ExecuteOptions{}
-\ProcessOptions\relax
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-% \endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrlogo.dtx b/macros/latex/contrib/koma-script/source/scrlogo.dtx
deleted file mode 100644
index c2c05f1705..0000000000
--- a/macros/latex/contrib/koma-script/source/scrlogo.dtx
+++ /dev/null
@@ -1,138 +0,0 @@
-% \iffalse^^A meta-comment
-% ======================================================================
-% scrlogo.dtx
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of the file `scrlogo.dtx' at least.
-% ======================================================================
-%
-%%% From File: $Id: scrlogo.dtx 3688 2022-02-10 08:26:37Z kohm $
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-10 09:26:37 +0100 (Do, 10. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 2631 $
- \edef\reserved@a{%
- \noexpand\endgroup
- \noexpand\ProvidesFile{scrlogo.dtx}%
- [\filedate\space\filerevision\space
- KOMA-Script package source
- }%
-\reserved@a
-%</dtx>
-%<*dtx|package>
-%<package>\ProvidesPackage{scrlogo}[%
-%!KOMAScriptVersion
-%<package> package
- (logo)]
-%</dtx|package>
-%<*dtx>
-\ifx\documentclass\undefined
- \ifx\ifTopLevel\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2002}
- \generate{\usepreamble\defaultpreamble
- \file{scrlogo.sty}{\from{scrlogo.dtx}{package,logo}}%
- }
- \@@input scrstrop.inc
- \fi
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-% Make it possible to load scrlogo.dtx directly.
-\csname nodriver\endcsname
-\expandafter\let\csname endnodriver\endcsname\relax
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
- \DocInput{scrlogo.dtx}
-\end{document}
-\endnodriver
-%</dtx>
-% \fi^^A meta-comment
-%
-% \changes{v3.36}{2022/02/02}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/02}{whole implementation documentation in English}
-%
-% \GetFileInfo{scrlogo.dtx}
-% \title{\href{https://komascript.de}{\KOMAScript} \partname\ \file{\filename}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% This part of \KOMAScript{} provides not only the \cs{KOMAScript} command
-% for all \KOMAScript{} classes and packages, but also a standalone package
-% to provide the logo.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user manual of \pkg*{scrlogo} in the \KOMAScript{} manual,
-% either the German \file{scrguide} or the English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation of the \KOMAScript{} Logo}
-%
-% \begin{command}{\KOMAScript}
-% \changes{v3.36}{2022/02/02}{respect \pkg{hyperref}}
-% \changes{v3.36}{2022/02/02}{other packages and classes load \pkg*{scrlogo}
-% instead of defining the command itself}
-% From version~3.36, the letter spacing of the upper case letters is not used
-% in PDF context of package \pkg{hyperref}.
-% \begin{macrocode}
-%<*logo>
-%<forcedefine>\IfFileExists{scrlogo.sty}{%
-%<!package>\RequirePackage{scrlogo}
-%<forcedefine>}{}%
-%<*(package|forcedefine)&logo>
-\@ifundefined{KOMAScript}{%
- \DeclareRobustCommand*{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
- M\kern.05em A\kern.1em-\kern.1em Script}}%
- \@ifundefined{pdfstringdefPreHook}{%
- \def
- }{%
- \g@addto@macro
- }%
- \pdfstringdefPreHook{%
- \def\KOMAScript{KOMA-Script}%
- \expandafter\def\csname KOMAScript \endcsname{KOMA-Script}%
- }%
-}{}
-%</(package|forcedefine)&logo>
-%</logo>
-% \end{macrocode}
-% \end{command}
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
-
diff --git a/macros/latex/contrib/koma-script/source/scrmain.ins b/macros/latex/contrib/koma-script/source/scrmain.ins
deleted file mode 100644
index 0a7c568745..0000000000
--- a/macros/latex/contrib/koma-script/source/scrmain.ins
+++ /dev/null
@@ -1,457 +0,0 @@
-% ======================================================================
-% scrmain.ins
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-
-% $Id: scrmain.ins 3696 2022-02-11 09:45:27Z kohm $
-
-% ---------- KOMA-Script default docstrip declarations -----------------
-
-\input scrdocstrip.tex
-\@@input scrkernel-version.dtx
-\@@input scrstrip.inc
-
-% ---------- File generation -------------------------------------------
-
-\generate{\usepreamble\defaultpreamble
- \file{scrextend.sty}{%
- \from{scrextend.dtx}{package,extend,preidentify}%
- \from{scrkernel-version.dtx}{package,extend}%
- \from{scrextend.dtx}{package,extend,identify,prepare}%
- \from{scrkernel-basics.dtx}{package,load}%
- \from{scrkernel-sections.dtx}{package,extend,prepare}%
- \from{scrkernel-compatibility.dtx}{package,extend,init}%
-% \from{scrkernel-typearea.dtx}{package,extend,init}%
- \from{scrextend.dtx}{package,extend,option}%
- \from{scrkernel-compatibility.dtx}{package,extend,option}%
- \from{scrkernel-miscellaneous.dtx}{package,extend,option}%
- \from{scrkernel-fonts.dtx}{package,extend,option}%
-% \from{scrkernel-typearea.dtx}{package,extend,option}%
-% \from{scrkernel-paragraphs.dtx}{package,extend,option}%
- \from{scrkernel-title.dtx}{package,extend,option}%
- \from{scrkernel-sections.dtx}{package,extend,option}%
- \from{scrkernel-pagestyles.dtx}{package,extend,option}%
- \from{scrkernel-floats.dtx}{package,extend,option}%
- \from{scrkernel-footnotes.dtx}{package,extend,option}%
-% \from{scrkernel-listsof.dtx}{package,extend,option}%
-% \from{scrkernel-bibliography.dtx}{package,extend,option}%
-% \from{scrkernel-index.dtx}{package,extend,option}%
- \from{scrkernel-listsandtabulars.dtx}{package,extend,option}%
- \from{scrkernel-sections.dtx}{package,extend,execoption}%
- \from{scrkernel-miscellaneous.dtx}{package,extend,execoption}%
- \from{scrkernel-compatibility.dtx}{package,extend,body}%
- \from{scrkernel-fonts.dtx}{package,extend,body}%
-% \from{scrkernel-typearea.dtx}{package,extend,body}%
-% \from{scrkernel-paragraphs.dtx}{package,extend,body}%
- \from{scrkernel-title.dtx}{package,extend,body}%
- \from{scrkernel-sections.dtx}{package,extend,body}%
- \from{scrkernel-miscellaneous.dtx}{package,extend,body}%
- \from{scrkernel-pagestyles.dtx}{package,extend,body}%
- \from{scrkernel-floats.dtx}{package,extend,body}%
- \from{scrkernel-footnotes.dtx}{package,extend,body}%
-% \from{scrkernel-listsof.dtx}{package,extend,body}%
-% \from{scrkernel-bibliography.dtx}{package,extend,body}%
-% \from{scrkernel-index.dtx}{package,extend,body}%
- \from{scrkernel-listsandtabulars.dtx}{package,extend,body}%
- \from{scrlogo.dtx}{logo}%
- }%
-}
-
-\generate{\usepreamble\defaultpreamble
-% \file{scrbook.cls}{% commented (long version is same as short version below)
-% \from{scrkernel-version.dtx}{class,book,long}%
-% }%
- \file{scrreport.cls}{%
- \from{scrkernel-version.dtx}{class,report,long}%
- }%
- \file{scrarticle.cls}{%
- \from{scrkernel-version.dtx}{class,article,long}%
- }%
- \file{scrletter.cls}{%
- \from{scrkernel-version.dtx}{class,letter,long}%
- }%
-}
-
-\generate{\usepreamble\defaultpreamble
- \file{scrbook.cls}{%
- \from{scrkernel-version.dtx}{class,book}%
- \from{scrkernel-basics.dtx}{class,load}%
- \from{scrkernel-listsof.dtx}{class,book,prepare}%
- \from{scrkernel-tocstyle.dtx}{class,book,prepare}%
- \from{scrkernel-sections.dtx}{class,book,prepare}%
- \from{scrkernel-compatibility.dtx}{class,book,init}%
- \from{scrkernel-typearea.dtx}{class,book,init}%
- \from{scrkernel-compatibility.dtx}{class,book,option}%
- \from{scrkernel-miscellaneous.dtx}{class,book,option}%
- \from{scrkernel-language.dtx}{class,book,option}%
- \from{scrkernel-fonts.dtx}{class,book,option}%
- \from{scrkernel-typearea.dtx}{class,book,options}%
- \from{scrkernel-paragraphs.dtx}{class,book,option}%
- \from{scrkernel-title.dtx}{class,book,option}%
- \from{scrkernel-tocstyle.dtx}{class,book,option}%
- \from{scrkernel-sections.dtx}{class,book,option}%
- \from{scrkernel-pagestyles.dtx}{class,book,option}%
- \from{scrkernel-floats.dtx}{class,book,option}%
- \from{scrkernel-footnotes.dtx}{class,book,option}%
- \from{scrkernel-listsof.dtx}{class,book,option}%
- \from{scrkernel-bibliography.dtx}{class,book,option}%
- \from{scrkernel-index.dtx}{class,book,option}%
- \from{scrkernel-listsandtabulars.dtx}{class,book,option}%
- \from{scrkernel-sections.dtx}{class,book,execoption}%
- \from{scrkernel-miscellaneous.dtx}{class,book,execoption}%
- \from{scrkernel-compatibility.dtx}{class,book,body}%
- \from{scrkernel-fonts.dtx}{class,book,body}%
- \from{scrkernel-language.dtx}{class,book,body}%
- \from{scrkernel-typearea.dtx}{class,book,body}%
- \from{scrkernel-paragraphs.dtx}{class,book,body}%
- \from{scrkernel-title.dtx}{class,book,body}%
- \from{scrkernel-tocstyle.dtx}{class,book,body}%
- \from{scrkernel-tocstyle.dtx}{class,book,style,part}%
- \from{scrkernel-tocstyle.dtx}{class,book,style,chapter}%
- \from{scrkernel-tocstyle.dtx}{class,book,style,section}%
- \from{scrkernel-tocstyle.dtx}{class,book,style,default}%
- \from{scrkernel-sections.dtx}{class,book,body}%
- \from{scrkernel-miscellaneous.dtx}{class,book,body}%
- \from{scrkernel-pagestyles.dtx}{class,book,body}%
- \from{scrlayer.dtx}{class,book,body}%
- \from{scrkernel-floats.dtx}{class,book,body}%
- \from{scrkernel-footnotes.dtx}{class,book,body}%
- \from{scrkernel-listsof.dtx}{class,book,body}%
- \from{scrkernel-bibliography.dtx}{class,book,body}%
- \from{scrkernel-index.dtx}{class,book,body}%
- \from{scrkernel-listsandtabulars.dtx}{class,book,body}%
- \from{scrlogo.dtx}{logo}%
- }%
- \file{scrreprt.cls}{%
- \from{scrkernel-version.dtx}{class,report}%
- \from{scrkernel-basics.dtx}{class,load}%
- \from{scrkernel-listsof.dtx}{class,report,prepare}%
- \from{scrkernel-tocstyle.dtx}{class,report,prepare}%
- \from{scrkernel-sections.dtx}{class,report,prepare}%
- \from{scrkernel-compatibility.dtx}{class,report,init}%
- \from{scrkernel-typearea.dtx}{class,report,init}%
- \from{scrkernel-compatibility.dtx}{class,report,option}%
- \from{scrkernel-miscellaneous.dtx}{class,report,option}%
- \from{scrkernel-language.dtx}{class,report,option}%
- \from{scrkernel-fonts.dtx}{class,report,option}%
- \from{scrkernel-typearea.dtx}{class,report,options}%
- \from{scrkernel-paragraphs.dtx}{class,report,option}%
- \from{scrkernel-title.dtx}{class,report,option}%
- \from{scrkernel-tocstyle.dtx}{class,report,option}%
- \from{scrkernel-sections.dtx}{class,report,option}%
- \from{scrkernel-pagestyles.dtx}{class,report,option}%
- \from{scrkernel-floats.dtx}{class,report,option}%
- \from{scrkernel-footnotes.dtx}{class,report,option}%
- \from{scrkernel-listsof.dtx}{class,report,option}%
- \from{scrkernel-bibliography.dtx}{class,report,option}%
- \from{scrkernel-index.dtx}{class,report,option}%
- \from{scrkernel-listsandtabulars.dtx}{class,report,option}%
- \from{scrkernel-sections.dtx}{class,report,execoption}%
- \from{scrkernel-miscellaneous.dtx}{class,report,execoption}%
- \from{scrkernel-compatibility.dtx}{class,report,body}%
- \from{scrkernel-fonts.dtx}{class,report,body}%
- \from{scrkernel-language.dtx}{class,report,body}%
- \from{scrkernel-typearea.dtx}{class,report,body}%
- \from{scrkernel-paragraphs.dtx}{class,report,body}%
- \from{scrkernel-title.dtx}{class,report,body}%
- \from{scrkernel-tocstyle.dtx}{class,report,body}%
- \from{scrkernel-tocstyle.dtx}{class,report,style,part}%
- \from{scrkernel-tocstyle.dtx}{class,report,style,chapter}%
- \from{scrkernel-tocstyle.dtx}{class,report,style,section}%
- \from{scrkernel-tocstyle.dtx}{class,report,style,default}%
- \from{scrkernel-sections.dtx}{class,report,body}%
- \from{scrkernel-miscellaneous.dtx}{class,report,body}%
- \from{scrkernel-pagestyles.dtx}{class,report,body}%
- \from{scrlayer.dtx}{class,report,body}%
- \from{scrkernel-floats.dtx}{class,report,body}%
- \from{scrkernel-footnotes.dtx}{class,report,body}%
- \from{scrkernel-listsof.dtx}{class,report,body}%
- \from{scrkernel-bibliography.dtx}{class,report,body}%
- \from{scrkernel-index.dtx}{class,report,body}%
- \from{scrkernel-listsandtabulars.dtx}{class,report,body}%
- \from{scrlogo.dtx}{logo}%
- }%
- \file{scrartcl.cls}{%
- \from{scrkernel-version.dtx}{class,article}%
- \from{scrkernel-basics.dtx}{class,load}%
- \from{scrkernel-listsof.dtx}{class,article,prepare}%
- \from{scrkernel-tocstyle.dtx}{class,article,prepare}%
- \from{scrkernel-sections.dtx}{class,article,prepare}%
- \from{scrkernel-compatibility.dtx}{class,article,init}%
- \from{scrkernel-typearea.dtx}{class,article,init}%
- \from{scrkernel-compatibility.dtx}{class,article,option}%
- \from{scrkernel-miscellaneous.dtx}{class,article,option}%
- \from{scrkernel-language.dtx}{class,article,option}%
- \from{scrkernel-fonts.dtx}{class,article,option}%
- \from{scrkernel-typearea.dtx}{class,article,options}%
- \from{scrkernel-paragraphs.dtx}{class,article,option}%
- \from{scrkernel-title.dtx}{class,article,option}%
- \from{scrkernel-tocstyle.dtx}{class,article,option}%
- \from{scrkernel-sections.dtx}{class,article,option}%
- \from{scrkernel-pagestyles.dtx}{class,article,option}%
- \from{scrkernel-floats.dtx}{class,article,option}%
- \from{scrkernel-footnotes.dtx}{class,article,option}%
- \from{scrkernel-listsof.dtx}{class,article,option}%
- \from{scrkernel-bibliography.dtx}{class,article,option}%
- \from{scrkernel-index.dtx}{class,article,option}%
- \from{scrkernel-listsandtabulars.dtx}{class,article,option}%
- \from{scrkernel-sections.dtx}{class,article,execoption}%
- \from{scrkernel-miscellaneous.dtx}{class,article,execoption}%
- \from{scrkernel-compatibility.dtx}{class,article,body}%
- \from{scrkernel-fonts.dtx}{class,article,body}%
- \from{scrkernel-language.dtx}{class,article,body}%
- \from{scrkernel-typearea.dtx}{class,article,body}%
- \from{scrkernel-paragraphs.dtx}{class,article,body}%
- \from{scrkernel-title.dtx}{class,article,body}%
- \from{scrkernel-tocstyle.dtx}{class,article,body}%
- \from{scrkernel-tocstyle.dtx}{class,article,style,part}%
- \from{scrkernel-tocstyle.dtx}{class,article,style,section}%
- \from{scrkernel-tocstyle.dtx}{class,article,style,subsection}%
- \from{scrkernel-tocstyle.dtx}{class,article,style,default}%
- \from{scrkernel-sections.dtx}{class,article,body}%
- \from{scrkernel-miscellaneous.dtx}{class,article,body}%
- \from{scrkernel-pagestyles.dtx}{class,article,body}%
- \from{scrlayer.dtx}{class,article,body}%
- \from{scrkernel-floats.dtx}{class,article,body}%
- \from{scrkernel-footnotes.dtx}{class,article,body}%
- \from{scrkernel-listsof.dtx}{class,article,body}%
- \from{scrkernel-bibliography.dtx}{class,article,body}%
- \from{scrkernel-index.dtx}{class,article,body}%
- \from{scrkernel-listsandtabulars.dtx}{class,article,body}%
- \from{scrlogo.dtx}{logo}%
- }%
-}%
-
-\generate{\usepreamble\defaultpreamble
- \file{scrsize10pt.clo}{%
- \from{scrkernel-version.dtx}{clo,10pt}%
- \from{scrkernel-fonts.dtx}{clo,10pt}%
- \from{scrkernel-paragraphs.dtx}{clo,10pt}%
- }%
- \file{scrsize11pt.clo}{%
- \from{scrkernel-version.dtx}{clo,11pt}%
- \from{scrkernel-fonts.dtx}{clo,11pt}%
- \from{scrkernel-paragraphs.dtx}{clo,11pt}%
- }%
- \file{scrsize12pt.clo}{%
- \from{scrkernel-version.dtx}{clo,12pt}%
- \from{scrkernel-fonts.dtx}{clo,12pt}%
- \from{scrkernel-paragraphs.dtx}{clo,12pt}%
- }%
-}%
-
-\generate{\usepreamble\defaultpreamble
- \file{scrfontsizes.sty}{%
- \from{scrkernel-version.dtx}{package}%
- \from{scrkernel-fonts.dtx}{package,generator,identify}%
- \from{scrkernel-fonts.dtx}{package,generator,option}%
- \from{scrkernel-fonts.dtx}{package,generator,body}%
- \from{scrlogo.dtx}{logo}%
- }%
-}%
-
-\generate{\usepreamble\defaultpreamble
- \file{scrlttr2.cls}{%
- \from{scrkernel-version.dtx}{class,letter}%
- \from{scrkernel-basics.dtx}{class,load}%
- \from{scrkernel-compatibility.dtx}{class,letter,init}%
- \from{scrkernel-typearea.dtx}{class,scrlttr2,init}%
- \from{scrkernel-compatibility.dtx}{class,letter,option}%
- \from{scrkernel-miscellaneous.dtx}{class,letter,option}%
- \from{scrkernel-letterclassoptions.dtx}{class,letter,option}%
- \from{scrkernel-language.dtx}{class,letter,option}%
- \from{scrkernel-fonts.dtx}{class,letter,option}%
- \from{scrkernel-variables.dtx}{class,letter,option}%
- \from{scrkernel-pseudolengths.dtx}{class,letter,option}%
- \from{scrkernel-typearea.dtx}{class,letter,options}%
- \from{scrkernel-paragraphs.dtx}{class,letter,option}%
- \from{scrkernel-pagestyles.dtx}{class,letter,option}%
- \from{scrkernel-floats.dtx}{class,letter,option}%
- \from{scrkernel-footnotes.dtx}{class,letter,option}%
- \from{scrkernel-listsandtabulars.dtx}{class,letter,option}%
- \from{scrkernel-notepaper.dtx}{class,letter,option}%
- \from{scrkernel-addressfiles.dtx}{class,letter,option}%
- \from{scrkernel-miscellaneous.dtx}{class,letter,execoption}%
- \from{scrkernel-compatibility.dtx}{class,letter,body}%
- \from{scrkernel-fonts.dtx}{class,letter,body}%
- \from{scrkernel-miscellaneous.dtx}{class,letter,body}%
- \from{scrkernel-letterclassoptions.dtx}{class,letter,body}%
- \from{scrkernel-language.dtx}{class,letter,body}%
- \from{scrkernel-variables.dtx}{class,letter,body}%
- \from{scrkernel-pseudolengths.dtx}{class,letter,body}%
- \from{scrkernel-typearea.dtx}{class,letter,body}%
- \from{scrkernel-paragraphs.dtx}{class,letter,body}%
- \from{scrkernel-pagestyles.dtx}{class,letter,body}%
- \from{scrkernel-floats.dtx}{class,letter,body}%
- \from{scrkernel-footnotes.dtx}{class,letter,body}%
- \from{scrkernel-listsandtabulars.dtx}{class,letter,body}%
- \from{scrkernel-notepaper.dtx}{class,letter,body}%
- \from{scrkernel-addressfiles.dtx}{class,letter,body}%
- \from{scrlogo.dtx}{logo}%
- }%
-}
-
-\generate{\usepreamble\defaultpreamble
- \file{scrletter.sty}{%
- \from{scrkernel-version.dtx}{package,letter}%
- \from{scrkernel-basics.dtx}{package,load}%
- \from{scrkernel-miscellaneous.dtx}{package,letter,init}%
-% \from{scrkernel-compatibility.dtx}{package,letter,init}%
- \from{scrkernel-typearea.dtx}{package,letter,init}%
-% \from{scrkernel-compatibility.dtx}{package,letter,option}%
- \from{scrkernel-miscellaneous.dtx}{package,letter,option}%
- \from{scrkernel-letterclassoptions.dtx}{package,letter,option}%
- \from{scrkernel-language.dtx}{package,letter,option}%
- \from{scrkernel-fonts.dtx}{package,letter,option}%
- \from{scrkernel-variables.dtx}{package,letter,option}%
- \from{scrkernel-pseudolengths.dtx}{package,letter,option}%
-% \from{scrkernel-typearea.dtx}{package,letter,option}%
-% \from{scrkernel-paragraphs.dtx}{package,letter,option}%
- \from{scrkernel-pagestyles.dtx}{package,letter,option}%
-% \from{scrkernel-floats.dtx}{package,letter,option}%
-% \from{scrkernel-footnotes.dtx}{package,letter,option}%
-% \from{scrkernel-listsandtabulars.dtx}{package,letter,option}%
- \from{scrkernel-notepaper.dtx}{package,letter,option}%
- \from{scrkernel-addressfiles.dtx}{package,letter,option}%
- \from{scrkernel-miscellaneous.dtx}{package,letter,execoption}%
-% \from{scrkernel-compatibility.dtx}{package,letter,body}%
- \from{scrkernel-fonts.dtx}{package,letter,body}%
- \from{scrkernel-miscellaneous.dtx}{package,letter,body}%
- \from{scrkernel-letterclassoptions.dtx}{package,letter,body}%
- \from{scrkernel-language.dtx}{package,letter,body}%
- \from{scrkernel-variables.dtx}{package,letter,body}%
- \from{scrkernel-pseudolengths.dtx}{package,letter,body}%
-% \from{scrkernel-typearea.dtx}{package,letter,body}%
-% \from{scrkernel-paragraphs.dtx}{package,letter,body}%
- \from{scrkernel-pagestyles.dtx}{package,letter,body}%
-% \from{scrkernel-floats.dtx}{package,letter,body}%
-% \from{scrkernel-footnotes.dtx}{package,letter,body}%
-% \from{scrkernel-listsandtabulars.dtx}{package,letter,body}%
- \from{scrkernel-notepaper.dtx}{package,letter,body}%
- \from{scrkernel-addressfiles.dtx}{package,letter,body}%
- \from{scrlogo.dtx}{logo}%
- }%
-}%
-
-\generate{\usepreamble\defaultpreamble
- \file{visualize.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,visualize,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,visualize,body}%
- \from{scrkernel-notepaper.dtx}{lco,visualize,body}%
- }%
- \file{KOMAold.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,KOMAold,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,KOMAold,body}%
- \from{scrkernel-notepaper.dtx}{lco,KOMAold,body}%
- }%
- \file{DIN.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,DIN,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,DIN,body}%
- }%
- \file{DINmtext.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,DINmoretext,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,DINmoretext,body}%
- }%
- \file{DIN5008A.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,5008,A,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,5008,A,body}%
- }%
- \file{DIN5008B.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,5008,B,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,5008,B,body}%
- }%
- \file{SN.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,SN,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,SN,body}%
- }%
- \file{SNleft.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,SwissLeft,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,SwissLeft,body}%
- }%
- \file{NF.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,NF,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,NF,body}%
- }%
- \file{UScommercial9.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,UScommercial9,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,UScommercial9,body}%
- }%
- \file{UScommercial9DW.lco}{%
- \from{scrkernel-version.dtx}{trace}%
- \from{scrkernel-letterclassoptions.dtx}{lco,UScommercial9DW,head}%
- \from{scrkernel-letterclassoptions.dtx}{lco,UScommercial9DW,body}%
- }%
-}%
-
-% \generate{\usepreamble\defaultpreamble
-% \file{USletter2w.lco}{%
-% \from{scrkernel-version.dtx}{trace}%
-% \from{scrkernel-letterclassoptions.dtx}{lco,USletter2w,head}%
-% \from{scrkernel-letterclassoptions.dtx}{lco,USletter2w,body}%
-% }%
-% }
-
-\generate{\usepreamble\defaultpreamble
- \file{scrkbase.sty}{%
- \from{scrkernel-version.dtx}{package,scrkbase}%
- \from{scrkernel-basics.dtx}{package,prepare,koma}%
- \from{scrkernel-basics.dtx}{package,option,koma}%
- \from{scrkernel-fonts.dtx}{package,option,scrkbase}%
- \from{scrkernel-basics.dtx}{package,body,koma}%
- \from{scrkernel-fonts.dtx}{package,body,scrkbase}%
- \from{scrlogo.dtx}{logo}%
- }%
-}
-
-% --- additional package batches (maybe used with other classes, too) --
-
-\batchinput{japanlco.dtx}% several Japanese lco-files
-\batchinput{scrlogo.dtx}% scrlogo.sty
-\batchinput{scrkernel-typearea.dtx}% typearea.sty
-\batchinput{scrkernel-basics.dtx}% scrbase.sty
-\batchinput{scrhack.dtx}% scrhack.sty and the hak files
-\batchinput{scrtime.dtx}% scrtime.sty, scrdate.sty
-\batchinput{scrlfile.dtx}% scrlfile.sty
-\batchinput{scraddr.dtx}% scraddr.sty
-\batchinput{tocbasic.dtx}% tocbasic.sty
-\batchinput{scrlayer.dtx}% scrlayer.sty, scrlayer-scrpage.sty ...
-\batchinput{scrwfile.dtx}% scrwfile.sty
-\batchinput{scrjura.dtx}% scrjura.sty
-
-% ---------- end of docstrip process -----------------------------------
-
-\@@input scrstrop.inc
-
-\endbatchfile
-
-%
-% end of file `scrmain.ins'
-%%% Local Variables:
-%%% mode: TeX
-%%% TeX-master: t
-%%% End:
diff --git a/macros/latex/contrib/koma-script/source/scrsource.tex b/macros/latex/contrib/koma-script/source/scrsource.tex
deleted file mode 100644
index 9bd9db4675..0000000000
--- a/macros/latex/contrib/koma-script/source/scrsource.tex
+++ /dev/null
@@ -1,137 +0,0 @@
-% ======================================================================
-% scrsource.tex
-% Copyright (c) Markus Kohm, 2002-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-% $Id: scrsource.tex 3748 2022-03-09 10:02:51Z kohm $
-
-% Try to get the version of KOMA-Script from scrkernel-version.dtx.
-\begingroup
- \def\ProvidesFile#1[#2]{\csname endinput\endcsname}%
- \input scrkernel-version.dtx
- \newcommand*{\ParseKOMAScriptVersion}{}
- \def\ParseKOMAScriptVersion#1/#2/#3 v#4 #5\ParseKOMAScriptVersion{%
- \gdef\filedate{#1\kern1pt-\kern0pt#2\kern1pt-\kern0pt#3}%
- \gdef\fileversion{#4}%
- }
- \expandafter
- \ParseKOMAScriptVersion\KOMAScriptVersion\ParseKOMAScriptVersion
- \gdef\filename{\jobname.tex}
-\endgroup
-
-\edef\releaselink{https://sf.net/p/koma-script/code/HEAD/tree/tags/release-\fileversion}
-\edef\releaseurl{\noexpand\url{\releaselink}}
-
-\ProvidesFile{scrsource.tex}[\KOMAScriptVersion (source)]
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{alltt}
-
-\title{\KOMAScript\,---\,The Source}
-\date{Version \fileversion{} of \filedate}
-\author{Markus Kohm}
-
-\begin{document}
-\maketitle
-\begin{abstract}
- Formerly this was the implementation documentation of the whole
- \KOMAScript. But currently it is a dummy only, that explains how to make the
- implementation documentation from \KOMAScript{} v3.36 or newer.
-\end{abstract}
-
-\addsec{How to Make the Implementation Documentation}
-
-To make the implementation documentation you either can use \file{l3build} to
-make all files at once or do all the work step by step manually.
-
-To be able to use \file{l3build} you need the original sources from
-SourceForge. Best is, to use \file{subversion} to check out the sources of the
-release you are currently using. If you, e.g., use \KOMAScript{} v\fileversion
-you can checkout \releaseurl{} using:
-\begin{alltt}\small
-svn co \releaseurl koma-script-\fileversion
-\end{alltt}
-within a terminal window. Note: You have to make sure, that the Subversion
-command line client \file{svn} is installed before.
-
-This will copy the whole source of the release to a new directory
-\file{koma-script-\fileversion}. Change to the directory and run:
-\begin{verbatim}
-l3build doc
-\end{verbatim}
-This will make a lot of new PDF files with the implementation documentation of
-all the source files of \KOMAScript.
-
-If you cannot use \file{l3build}, e.g., because you cannot checkout the
-sources from SourceForge, you can just use an already installed legal
-distribution of \KOMAScript. In this case:
-\begin{itemize}
-\item Copy all \file{*.dtx} files from the source directory of the installed
- \KOMAScript{} to a new directory where you have the right to write to.
-\item Open the first of these files, e.g., \file{koma-script-source-doc.dtx},
- into your preferred \LaTeX{} editor and \emph{compile} the file using
- \file{lualatex-dev}. If you have already installed \LaTeX{} 2022/06/01 you
- can also use \file{lualatex} instead of \file{lualatex-dev}.
-
- Instead of using your \LaTeX{} editor, you can also use
-\begin{verbatim}
-lualatex-dev koma-script-source-doc.dtx
-\end{verbatim}
- from a terminal. If you get an error because of missing
- \file{koma-script-source-doc.cls}, you do not have a correctly installed
- \KOMAScript. However, you can generate the class using
-\begin{verbatim}
-tex koma-script-source-doc.dtx
-\end{verbatim}
- Note: You really have to use either \file{tex}, \file{pdftex}, \file{luatex}
- or \file{xetex} for this step and not \file{latex}, \file{pdflatex},
- \file{lualatex} or \file{xelatex}!
-
- If you want the index and the changes, you also have to run
-\begin{verbatim}
-makeindex -s gind.ist koma-script-source-doc
-makeindex -s gglo.ist -o koma-script-source-doc.gls koma-script-source.doc.glo
-\end{verbatim}
- and also repeat the \file{lualatex-dev} and the two \file{makeindex} runs at
- least three or four times.
-\item Repeat the last step for every \file{*.dtx} file replacing the
- \file{koma-script-source-doc} by the base name of the corresponding
- \file{*.dtx} file.
-\end{itemize}
-
-As you can see, using \file{l3build} is much easier.
-
-\addsec{How to Make the Implementation Documentation \KOMAScript{} before 3.36}
-
-In case of using an older \KOMAScript{} release, you have to check out the
-older release (see above) and run:
-\begin{verbatim}
-make scrsource.pdf
-\end{verbatim}
-But this can be used with a Linux like build system using GNU make only. And
-note: The implementation documentation of \KOMAScript{} up to version 3.35 was
-generally in German.
-
-\end{document}
-% Local Variables:
-% mode: latex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrstrip.inc b/macros/latex/contrib/koma-script/source/scrstrip.inc
deleted file mode 100644
index 6c6d7a1bb4..0000000000
--- a/macros/latex/contrib/koma-script/source/scrstrip.inc
+++ /dev/null
@@ -1,119 +0,0 @@
-% ======================================================================
-% scrstrip.inc
-% Copyright (c) Markus Kohm, 2002-2019
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% In particular, NO PERMISSION is granted to modify the contents of this
-% file since it contains the legal notices that are placed in the files
-% it generates.
-%
-% This work consists of all files listed in manifest.txt.
-% ----------------------------------------------------------------------
-% scrstrip.inc
-% Copyright (c) Markus Kohm, 2002-2021
-%
-% Diese Datei ist Teil des LaTeX2e-KOMA-Script-Pakets.
-%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
-% Version 1.3c, verteilt und/oder veraendert werden.
-% Die neuste Version dieser Lizenz ist
-% http://www.latex-project.org/lppl.txt
-% und Version 1.3c ist Teil aller Verteilungen von LaTeX
-% Version 2005/12/01 oder spaeter und dieses Werks.
-%
-% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
-% (allein durch den Autor verwaltet).
-%
-% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
-%
-% Als Besonderheit: Es NICHT GESTATTET den Inhalt dieser Datei zu
-% aendern, da sie rechtliche Hinweise enthaelt, die in die erzeugten
-% Dateien eingefuegt werden.
-%
-% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
-% ======================================================================
-%
-% This file will be included at startup of every KOMA-Script
-% docstrip batch file.
-%
-
-% ---------- start of docstrip -----------------------------------------
-
-\KOMAdefVariable{AUTHOR}{Markus Kohm}
-\KOMAdefVariable{EMAIL}{[komascript at gmx info]}
-\KOMAdefVariable{COPYRIGHTFROM}{1994}
-\KOMAdefVariable{COPYRIGHTTILL}{2021}
-
-\let\ifbeta=\iffalse % with = will be replaced by release process
-
-\ifToplevel{%
- \Msg{+======================================================================}
- \Msg{| KOMA-Script}
- \Msg{| a versatile LaTeX2e bundle}
- \Msg{+----------------------------------------------------------------------}
- \Msg{| This batchfile will unpack some or all parts of KOMA-Script.}
- \Msg{| On errors press either `h' or ask an expert for help after reading}
- \Msg{| `README'.}
- \Msg{+----------------------------------------------------------------------}
-% ---------- some docstrip switchs -------------------------------------
- \keepsilent
- \askforoverwritefalse
-% ---------- validity --------------------------------------------------
- \KOMAvalidityTest{manifest.txt}
-}
-
-% ---------- defining preambles ----------------------------------------
-
-\preamble
-
-\noexpand\KOMAuseVariable{COPYRIGHT}
-
-This file was generated from file(s) of the KOMA-Script bundle.
----------------------------------------------------------------
-
-It may be distributed under the conditions of the
-LaTeX Project Public License in the version distributed together
-with KOMA-Script, see file `lppl.txt' or `lppl-de.txt'.
-
-This file may only be distributed together with a copy of the
-KOMA-Script bundle. You may however distribute the
-KOMA-Script bundle without all such generated files. See also
-`lppl.txt' or `lppl-de.txt' for additional information.
-
-The list of files belonging to KOMA-Script distribution is given in
-the file `manifest.txt'. See also `lppl.txt' or `lppl-de.txt' for
-additional information.
-
-If this file is a beta version, you may not be allowed to distribute
-it. Look at the comments below to see if this is the case.
-
-English and German manuals are part of KOMA-Script bundle.
-----------------------------------------------------------
-
-See `README'.
-
-The KOMA-Script bundle (but maybe not this file) was based upon the
-LaTeX 2.09 Script family created by Frank Neukam 1993 and the LaTeX2e
-standard classes created by The LaTeX3 Project 1994-1996. You can
-find a complete unmodified copy of LaTeX2e at
-<http://mirror.ctan.org/tex-archive/macros/latex/base/>.
-
-\endpreamble
-
-\endinput
-
-%%% Local Variables:
-%%% mode: latex
-%%% End:
diff --git a/macros/latex/contrib/koma-script/source/scrstrop.inc b/macros/latex/contrib/koma-script/source/scrstrop.inc
deleted file mode 100644
index 715acaedaa..0000000000
--- a/macros/latex/contrib/koma-script/source/scrstrop.inc
+++ /dev/null
@@ -1,67 +0,0 @@
-% ======================================================================
-% scrstrop.inc
-% Copyright (c) Markus Kohm, 2002-2012
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ----------------------------------------------------------------------
-% scrstrop.inc
-% Copyright (c) Markus Kohm, 2002-2012
-%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
-% Version 1.3c, verteilt und/oder veraendert werden.
-% Die neuste Version dieser Lizenz ist
-% http://www.latex-project.org/lppl.txt
-% und Version 1.3c ist Teil aller Verteilungen von LaTeX
-% Version 2005/12/01 oder spaeter und dieses Werks.
-%
-% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
-% (allein durch den Autor verwaltet).
-%
-% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
-%
-% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
-% ======================================================================
-%
-% This file will be included at end of every KOMA-Script
-% docstrip batch file.
-%
-
-% ---------- end of docstrip -----------------------------------------
-
-\ifToplevel{%
- \Msg{| Unpacking finished successfully.}
- \Msg{+----------------------------------------------------------------------}
- \ifbeta
- \Msg{| YOU SHOULD NOTE, THAT THIS IS NOT AN OFFICIAL RELEASE!}
- \Msg{| THIS VERSION IS INTENDED TO BE USED FOR TESTING ONLY!}
- \Msg{| USAGE FOR PURPOSES OTHER THAN INDENTED IS DANGEROUS!}
- \Msg{| DON'T EXPECT ANY SUPPORT FOR THIS VERSION!}
- \else
- \Msg{| To finish the installation you have to move some files into}
- \Msg{| a directory searched by TeX, e.g., `tex/latex/koma-script/'}
- \Msg{| of a local or personal TEXMF tree.}
- \Msg{| See `INSTALL.txt' (English) or `INSTALLD.txt' (German)}
- \Msg{| for additional information about the installation and}
- \Msg{| the user manual.}
- \fi
- \Msg{+======================================================================}
-}
-
-\endinput
-
-%%% Local Variables:
-%%% mode: latex
-%%% End:
diff --git a/macros/latex/contrib/koma-script/source/scrtime.dtx b/macros/latex/contrib/koma-script/source/scrtime.dtx
deleted file mode 100644
index 5626f14692..0000000000
--- a/macros/latex/contrib/koma-script/source/scrtime.dtx
+++ /dev/null
@@ -1,765 +0,0 @@
-% \iffalse
-% ======================================================================
-% scrtime.dtx
-% Copyright (c) Markus Kohm, 1995-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrtime.dtx 3688 2022-02-10 08:26:37Z kohm $
-%<package&identify>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
-%<*driver>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-10 09:26:37 +0100 (Do, 10. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3688 $
-\endgroup
-\ProvidesFile{scrtime.dtx}[\filedate\space\filerevision\space
-%</driver>
-%<*driver|package>
-%<identify&scrtime>\ProvidesPackage{scrtime}[%
-%<identify&scrdate>\ProvidesPackage{scrdate}[%
-%<*driver|identify>
-%!KOMAScriptVersion
- package
-%</driver|identify>
-%<identify&scrtime> (time of LaTeX run)%
-%<identify&scrdate> (day of the week)%
-%<*driver|identify>
-]
-%</driver|identify>
-%</driver|package>
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHFROM}{1995}
- \generate{\usepreamble\defaultpreamble
- \file{scrtime.sty}{%
- \from{scrkernel-version.dtx}{package,scrtime}%
- \from{scrtime.dtx}{package,scrtime,identify}%
- \from{scrkernel-basics.dtx}{load}%
- \from{scrtime.dtx}{package,scrtime,option}%
- \from{scrtime.dtx}{package,scrtime,body}%
- \from{scrlogo.dtx}{logo}%
- } %
- \file{scrdate.sty}{%
- \from{scrkernel-version.dtx}{package,scrdate}%
- \from{scrtime.dtx}{package,scrdate,identify}%
- \from{scrkernel-basics.dtx}{load}%
- \from{scrtime.dtx}{package,scrdate,option}%
- \from{scrtime.dtx}{package,scrdate,body}%
- \from{scrlogo.dtx}{logo}%
- } %
- }
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-%</dtx>
-%<*driver>
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
- \DocInput{scrtime.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \changes{v3.36}{2022/02/07}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/07}{require package \pkg*{scrlogo} instead of
-% defining \cs{KOMAScript}}
-%
-% \GetFileInfo{scrtime.dtx}
-% \title{The Current Time and Name of the Day with
-% \href{https://komascript.de}{\KOMAScript} Packages \pkg*{scrtime} and
-% \pkg*{scrdate}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% This bundle includes a package \pkg*{scrtime} defining some macros to
-% handle compilation-time. It's a very simple implementation similar to
-% \pkg{time}. I've tried to not use additional registers.
-%
-% The second package \pkg*{scrdate} defines some macros to handle the name
-% of the day!
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user manuals of \pkg*{scrtime} and \pkg*{scrdate} in the
-% \KOMAScript{} manual, either the German \file{scrguide} or the English
-% \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-% \section{Implementation}
-%
-% \subsection{Options}
-%
-% Since version~1.2 both packages use \pkg*{scrkbase} for options and
-% additional features. This is loaded by the \file{ins}-file, so we don't need
-% to load it here.
-%
-% \begin{macrocode}
-%<*option>
-% \end{macrocode}
-%
-%
-% \subsubsection{Options of \pkg*{scrtime}}
-%
-% \begin{macrocode}
-%<*scrtime>
-% \end{macrocode}
-%
-% \begin{option}{12h}
-% \changes{v1.1b}{1995/02/15}{Option \opt{12h} added.}
-% \changes{v1.2}{2010/03/10}{Option uses \pkg*{scrkbase}.}
-% \begin{option}{24h}
-% \changes{v1.1b}{1995/02/15}{Option \opt{24h} added.}
-% \changes{v1.2}{2010/03/10}{Option is deprecated.}
-% \begin{macro}{\if@Hxii,\@Hxiitrue,\@Hxiifalse}
-% \changes{v1.1b}{1995/02/15}{new switch}
-% There are two the two Options |24h| and |12h|. We need a switch to
-% distinguish.
-% \begin{macrocode}
-\newif\if@Hxii
-% \end{macrocode}
-% \end{macro}
-% So the options are simple.
-% \begin{macrocode}
-\KOMA@ifkey{12h}{@Hxii}
-\KOMA@DeclareDeprecatedOption[scrtime]{24h}{12h=false}
-% \end{macrocode}
-% \end{option}
-% \end{option}
-%
-% Currently only \pkg*{scrtime} uses options, so only \pkg*{scrtime} needs
-% to process them.
-% \begin{macrocode}
-\KOMAProcessOptions\relax
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</scrtime>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</option>
-% \end{macrocode}
-%
-%
-% \subsection{Commands and Macros}
-%
-% \begin{macrocode}
-%<*body>
-% \end{macrocode}
-%
-% \subsubsection{Commands and Macros of \pkg*{scrtime}}
-%
-% \begin{macrocode}
-%<*scrtime>
-% \end{macrocode}
-%
-% \begin{command}{\thistime}
-% \changes{v1.1b}{1995/02/15}{\cs{thistime*} added}
-% \changes{v1.1b}{1995/02/15}{\cs{thistime} fixed}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% First we have to decide, is it a star-version ore not.
-% \begin{macrocode}
-\def\thistime{%
- \kernel@ifstar
- {\let\@tempif\iffalse\@thistime}
- {\let\@tempif\iftrue\@thistime}}
-% \end{macrocode}
-% \begin{macro}{\@thistime}
-% \changes{v1.1b}{1995/02/15}{added}
-% Know we have to calculate the hours and minutes. \cs{@tempcnta} are the
-% hours and \cs{@tempcntb} are the minutes. We use a group to encapsulate the
-% usage of the two local counters of from the \LaTeX{} kernel.
-% \begin{macrocode}
-\newcommand*{\@thistime}[1][:]{%
- \begingroup
- \@tempcnta\time\divide\@tempcnta60\multiply\@tempcnta60
- \@tempcntb\time\advance\@tempcntb-\@tempcnta
- \divide\@tempcnta60
-% \end{macrocode}
-% If we use 12h-mode, we have to cut the houres.
-% \changes{v1.1d}{1996/01/14}{space added at \cs{@thistime} between -12
-% and \cs{fi} (Martin Schroeder)}
-% \begin{macrocode}
- \if@Hxii\ifnum\@tempcnta>12 \advance\@tempcnta-12 \fi\fi
-% \end{macrocode}
-% Know we have to compose the value. If the minutes are less than 10
-% maybe there has to be an additional 0.
-% \begin{macrocode}
- \the\@tempcnta{#1}\@tempif\ifnum\@tempcntb<10 0\fi\fi\the\@tempcntb%
- \endgroup}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\settime}
-% \changes{v1.1b}{1995/02/15}{redefines \cs{@thistime}}
-% \changes{v1.1c}{1995/05/24}{missing macrocode-environment inserted}
-% We simply have to set \cs{@thistime}.
-% \begin{macrocode}
-\newcommand*{\settime}[1]{\renewcommand*{\@thistime}[1][]{#1}}
-% \end{macrocode}
-% \end{command}
-%
-%
-% \begin{macrocode}
-%</scrtime>
-% \end{macrocode}
-%
-%
-% \subsubsection{Commands and Macros of \pkg*{scrdate}}
-%
-% \begin{macrocode}
-%<*scrdate>
-% \end{macrocode}
-%
-% \changes{v1.1a}{1995/02/12}{changed all but the user-interface}
-% \changes{v3.05a}{2010/03/10}{changed everything}
-% With version~3.05a \pkg*{scrdate} was rewritten. First step was to make
-% more macros full expandable to provide \cs{MakeUppercase} and
-% \cs{MakeLowercase}. Second was to extend the user interface by some new
-% functionality.
-%
-% \begin{command}{\CenturyPart}
-% \changes{v3.05a}{2010/03/10}{added}
-% This is the century part of a year number and so only a shortcut to
-% |\XdivY{...}{100}|, that is defined at \pkg*{scrbase}.
-% \begin{macrocode}
-\newcommand*{\CenturyPart}[1]{\XdivY{#1}{100}}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\DecadePart}
-% \changes{v3.05a}{2010/03/10}{added}
-% This is the year number withoud the century part and therefrso only a
-% shortcut to |\XmodY{...}{100}|, that is defined at \pkg*{scrbase}.
-% \begin{macrocode}
-\newcommand*{\DecadePart}[1]{\XmodY{#1}{100}}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macro}{\@GaussYear}
-% \changes{v3.05a}{2010/03/10}{added}
-% At the Gauss calculation of the day of the week January and February relates
-% to the year before. This macro does the correction for any date.
-% \begin{macrocode}
-\newcommand*{\@GaussYear}[3]{%
- \ifcase #2
- \PackageError{scrdate}{month out of range}{%
- You've asked for the Gauss year of ISO date #1-#2-#3,\MessageBreak
- this means, that month hat invalid value '#2'.}%
- \or
- \numexpr #1 - 1\relax
- \or
- \numexpr #1 - 1\relax
- \else
- #1
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\DayNumber}
-% \changes{v3.05a}{2010/03/10}{added}
-% Returns the numerical value of the day of week. Note, that Sunday is 0,
-% Monday is 1, \dots, Saturday is 6. We use the Gauss calculation of the day
-% of the week. First argument is the year, second the month and last the day
-% of the month.
-% \begin{macrocode}
-\newcommand*{\DayNumber}[3]{%
- \XmodY{%
- \numexpr #3
- + \ifcase #2
- \PackageError{scrdate}{month out of range}{%
- You've asked for the dayname of ISO date #1-#2-#3,\MessageBreak
- this means, that month hat invalid value '#2'.}%
- \or 28 \or 31 \or 2 \or 5 \or 7 \or 10 \or 12 \or 15 \or 18
- \or 20 \or 23 \or 25
- \else
- \PackageError{scrdate}{month out of range}{%
- You've asked for the dayname of ISO date #1-#2-#3,\MessageBreak
- this means, that month hat invalid value '#2'.}%
- \fi
- + \DecadePart{\@GaussYear{#1}{#2}{#3}}
- + \XdivY{\DecadePart{\@GaussYear{#1}{#2}{#3}}}{4}
- + \XdivY{\CenturyPart{\@GaussYear{#1}{#2}{#3}}}{4}
- - 2 * \CenturyPart{\@GaussYear{#1}{#2}{#3}} \relax
- }{7}%
-}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\ISODayNumber}
-% \changes{v3.05a}{2010/03/10}{added}
-% The same like \cs{DayNumber} but with ISO date argument.
-% \begin{macrocode}
-\newcommand*{\ISODayNumber}[1]{\expandafter\@IsoDayNumber#1\@nil}
-% \end{macrocode}
-% \begin{macro}{\@IsoDayNumber}
-% \changes{v3.05a}{2010/03/10}{added}
-% \begin{macrocode}
-\newcommand*{\@IsoDayNumber}{}
-\def\@IsoDayNumber#1-#2-#3\@nil{\DayNumber{#1}{#2}{#3}}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\DayName}
-% \changes{v3.05a}{2010/03/10}{added}
-% Returns the name of the day of the week. Arguments like \cs{DayNumber}.
-% \begin{macrocode}
-\newcommand*{\DayName}[3]{\@dayname{\DayNumber{#1}{#2}{#3}}}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\ISODayName}
-% \changes{v3.05a}{2010/03/10}{added}
-% The same like \cs{DayName} but with ISO date argument.
-% \begin{macrocode}
-\newcommand*{\ISODayName}[1]{\@dayname{\ISODayNumber{#1}}}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\DayNameByNumber}
-% \changes{v3.05a}{2010/03/10}{added}
-% Returns the name of the day of the week. The argument is a number that will
-% be transposed to the range 0\dots6.
-% \begin{macrocode}
-\newcommand*{\DayNameByNumber}[1]{%
- \@dayname{\XmodY{#1}{7}}%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\ISOToday}
-% \changes{v3.05a}{2010/03/10}{added}
-% Returns the ISO date.
-% \begin{macrocode}
-\newcommand*{\ISOToday}{%
- \the\year-\ifnum \month<10 0\fi\the\month-\ifnum \day<10 0\fi\the\day%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\IsoToday}
-% \changes{v3.05a}{2010/03/10}{added}
-% Returns the ISO date.
-% \begin{macrocode}
-\newcommand*{\IsoToday}{%
- \the\year-\the\month-\the\day%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\todaysname}
-% \changes{v3.05a}{2010/03/10}{re-implemented}
-% Using \cs{DayName} this is very, very simple.
-% \begin{macrocode}
-\newcommand*{\todaysname}{\DayName{\year}{\month}{\day}}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\todaysnumber}
-% \changes{v3.05a}{2010/03/11}{added}
-% Using \cs{DayNumber} this is very, very simple.
-% \begin{macrocode}
-\newcommand*{\todaysnumber}{\DayNumber{\year}{\month}{\day}}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\nameday}
-% \changes{v3.05a}{2010/03/10}{no longer \cs{long}}
-% We simply have to redefine \cs{todaysname}.
-% \begin{macrocode}
-\newcommand\nameday[1]{\renewcommand*{\todaysname}{#1}}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\newdaylanguage}
-% \changes{v3.05a}{2010/03/10}{Sunday is 0}
-% We write a macro to define the name of the days.
-% \begin{macro}{\scrdate@languagenamewarning}
-% But before this, we have to define a once only warning.
-% \begin{macrocode}
-\newcommand*\scrdate@languagenamewarning{%
- \PackageWarningNoLine{scrdate}
- {\string\languagename\space not
- defined, using \string\language.\MessageBreak
- This may result in use of wrong language!\MessageBreak
- You should use a compatible language
- package\MessageBreak
- (e.g. `babel', `german', `french', ...)}%
- \let\scrdate@languagenamewarning\relax
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-\newcommand\newdaylanguage[8]{%
-% \end{macrocode}
-% First we check, if the language is defined at the format, the user uses.
-% If it is not defined, we do not define the name of the days and warn.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{l@#1}{%
- \PackageInfoNoLine{scrdate}{Language #1\space not defined.\MessageBreak
- \protect\dayname@#1\space skipped}%
-% \end{macrocode}
-% \changes{v1.1c}{1995/05/24}{missing \cs{end\{macrocode\}} added}
-% If it is defined, we define the name-selection-macro
-% \cs{dayname@\meta{language}}.
-% First we define the new macro \cs{dayname@\meta{language}}:
-% \changes{v3.05a}{2010/03/10}{group removed}
-% \changes{v3.15}{2014/12/11}{more robust \cs{ifcase}}
-% \begin{macrocode}
- }{%
- \@namedef{dayname@#1}##1{%
- \ifcase\numexpr \XmodY{##1}{7}\relax
- #8\or #2\or #3\or #4\or #5\or #6\or #7\fi%
- }%
-% \end{macrocode}
-% Then we define, what to do at \cs{begin\{document\}}:
-% \begin{macrocode}
- \AtBeginDocument{%
-% \end{macrocode}
-% There we first have to test, if \cs{date\meta{language}} is defined
-% (e.g. using package \pkg{german}). If not, we have to warn once more.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{date#1}{%
- \PackageInfoNoLine{scrdate}
- {\protect\date#1\space not defined.\MessageBreak
- \protect\todaysname\space probably cannot use
- \protect\dayname@#1}%
-% \end{macrocode}
-% But if it is defined, we can use it
-% \begin{macrocode}
- }{%
-% \end{macrocode}
-% There we first save \cs{date\meta{language}} as \cs{D@date\meta{language}}.
-% \begin{macrocode}
- \expandafter\let\csname D@date#1\expandafter\endcsname
- \csname date#1\endcsname
-% \end{macrocode}
-% Now we redefine \cs{date\meta{language}}. It first defines \cs{@dayname} and
-% then calls saved macro.
-% \begin{macrocode}
- \@namedef{date#1}{%
- \expandafter\let\expandafter\@dayname\csname dayname@#1\endcsname
- \@nameuse{D@date#1}}%
-% \end{macrocode}
-% Last we have to select this new \cs{date\meta{language}}.
-% \changes{v1.1j}{2000/01/20}{use of \cs{languagename} if defined}
-% \changes{v3.08b}{2011/03/31}{one \% added}
-% \begin{macrocode}
- \@ifundefined{languagename}{%
- \scrdate@languagenamewarning
- \ifnum\language=\@nameuse{l@#1}
- \@nameuse{date#1}%
- \fi
- }{%
- \@ifundefined{date\languagename}%
- {}%
- {\@nameuse{date\languagename}}%
- }%
- }%
- }%
- }%
-}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macro}{\@dayname}
-% This should be named selecting the language. Since I changed the definitions
-% package \pkg{german} and equal may be loaded before or after \pkg*{scrdate}
-% or not.
-%
-% First we define the usual languages using \cs{newdaylanguage}:
-% \begin{macro}{\dayname@german}
-% \begin{macrocode}
-\newdaylanguage{german}{Montag}{Dienstag}{Mittwoch}
- {Donnerstag}{Freitag}{Samstag}{Sonntag}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@ngerman}
-% \changes{v1.1i}{1999/10/09}{new language ``ngerman''.}
-% \begin{macrocode}
-\newdaylanguage{ngerman}{Montag}{Dienstag}{Mittwoch}
- {Donnerstag}{Freitag}{Samstag}{Sonntag}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@naustrian}
-% \changes{v3.08b}{2011/02/22}{new language ``naustrian''.}
-% \begin{macrocode}
-\newdaylanguage{naustrian}{Montag}{Dienstag}{Mittwoch}
- {Donnerstag}{Freitag}{Samstag}{Sonntag}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@austrian}
-% \changes{v3.08b}{2011/02/22}{new language ``austrian''.}
-% \begin{macrocode}
-\newdaylanguage{austrian}{Montag}{Dienstag}{Mittwoch}
- {Donnerstag}{Freitag}{Samstag}{Sonntag}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@swissgerman}
-% \changes{v3.13}{2014/01/23}{new language ``swissgerman''.}
-% \begin{macrocode}
-\newdaylanguage{swissgerman}{Montag}{Dienstag}{Mittwoch}
- {Donnerstag}{Freitag}{Samstag}{Sonntag}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@nswissgerman}
-% \changes{v3.13}{2014/01/23}{new language ``nswissgerman''.}
-% \begin{macrocode}
-\newdaylanguage{nswissgerman}{Montag}{Dienstag}{Mittwoch}
- {Donnerstag}{Freitag}{Samstag}{Sonntag}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dayname@american}
-% \changes{v3.13}{2014/01/23}{new language ``american''.}
-% \begin{macrocode}
-\newdaylanguage{american}{Monday}{Tuesday}{Wednesday}
- {Thursday}{Friday}{Saturday}{Sunday}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@australian}
-% \changes{v3.13}{2014/01/23}{new language ``australian''.}
-% \begin{macrocode}
-\newdaylanguage{australian}{Monday}{Tuesday}{Wednesday}
- {Thursday}{Friday}{Saturday}{Sunday}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@british}
-% \changes{v3.13}{2014/01/23}{new language ``british''.}
-% \begin{macrocode}
-\newdaylanguage{british}{Monday}{Tuesday}{Wednesday}
- {Thursday}{Friday}{Saturday}{Sunday}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@canadian}
-% \changes{v3.13}{2014/01/23}{new language ``canadian''.}
-% \begin{macrocode}
-\newdaylanguage{canadian}{Monday}{Tuesday}{Wednesday}
- {Thursday}{Friday}{Saturday}{Sunday}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@english}
-% \changes{v1.1g}{1997/06/21}{correct name is ``tuesday''.}
-% \begin{macrocode}
-\newdaylanguage{english}{Monday}{Tuesday}{Wednesday}
- {Thursday}{Friday}{Saturday}{Sunday}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@newzealand}
-% \changes{v3.13}{2014/01/23}{new language ``newzealand''.}
-% \begin{macrocode}
-\newdaylanguage{newzealand}{Monday}{Tuesday}{Wednesday}
- {Thursday}{Friday}{Saturday}{Sunday}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@UKenglish}
-% \changes{v3.13}{2014/01/23}{new language ``UKenglish''.}
-% \begin{macrocode}
-\newdaylanguage{UKenglish}{Monday}{Tuesday}{Wednesday}
- {Thursday}{Friday}{Saturday}{Sunday}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@ukenglish}
-% \changes{v3.24}{2017/05/29}{new language ``ukenglish''.}
-% \begin{macrocode}
-\newdaylanguage{ukenglish}{Monday}{Tuesday}{Wednesday}
- {Thursday}{Friday}{Saturday}{Sunday}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@USenglish}
-% \changes{v1.1g}{1997/06/21}{correct name is ``tuesday''.}
-% \begin{macrocode}
-\newdaylanguage{USenglish}{Monday}{Tuesday}{Wednesday}
- {Thursday}{Friday}{Saturday}{Sunday}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@usenglish}
-% \changes{v3.24}{2017/05/29}{new language ``usenglish''.}
-% \begin{macrocode}
-\newdaylanguage{usenglish}{Monday}{Tuesday}{Wednesday}
- {Thursday}{Friday}{Saturday}{Sunday}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dayname@acadian}
-% \changes{v3.13}{2014/01/23}{new language ``acadian''.}
-% \begin{macrocode}
-\newdaylanguage{acadian}{Lundi}{Mardi}{Mercredi}
- {Jeudi}{Vendredi}{Samedi}{Dimanche}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@canadien}
-% \changes{v3.13}{2014/01/23}{new language ``canadien''.}
-% \begin{macrocode}
-\newdaylanguage{canadien}{Lundi}{Mardi}{Mercredi}
- {Jeudi}{Vendredi}{Samedi}{Dimanche}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@francais}
-% \changes{v3.13}{2014/01/23}{new language ``francais''.}
-% \begin{macrocode}
-\newdaylanguage{francais}{Lundi}{Mardi}{Mercredi}
- {Jeudi}{Vendredi}{Samedi}{Dimanche}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@french}
-% \begin{macrocode}
-\newdaylanguage{french}{Lundi}{Mardi}{Mercredi}
- {Jeudi}{Vendredi}{Samedi}{Dimanche}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@italian}
-% \changes{v1.1f}{1997/06/06}{New (thanks to Lorenzo M.\ Catucci)}
-% \begin{macrocode}
-\newdaylanguage{italian}{Luned\`\i}{Marted\`\i}{Mercoled\`\i}
- {Gioved\`\i}{Venerd\`\i}{Sabato}{Domenica}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@spanish}
-% \changes{v1.1h}{1997/07/26}{New (thanks to Ralph J.\ Hangleiter)}
-% \begin{macrocode}
-\newdaylanguage{spanish}{Lunes}{Martes}{Mi\'ercoles}
- {Jueves}{Viernes}{S\'abado}{Domingo}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@croatian}
-% \changes{v1.1l}{2001/10/05}{New (thanks to Branka Lon\v{c}arevi\'{c})}
-% \begin{macrocode}
-\newdaylanguage{croatian}{Ponedjeljak}{Utorak}{Srijeda}
- {\v{C}etvrtak}{Petak}{Subota}{Nedjelja}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\dayname@dutch}
-% \changes{v1.1m}{2002/02/02}{New (thanks to Henk Jongbloets)}
-% \changes{v1.1p}{2009/01/01}{fixed to upper case}
-% \begin{macrocode}
-\newdaylanguage{dutch}{Maandag}{Dinsdag}{Woensdag}
- {Donderdag}{Vrijdag}{Zaterdag}{Zondag}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dayname@finnish}
-% \changes{v1.1n}{2005/02/07}{New (thanks to Hannu V\"ais\"anen)}
-% \begin{macrocode}
-\newdaylanguage{finnish}{Maanantai}{Tiistai}{Keskiviikko}
- {Torstai}{Perjantai}{Lauantai}{Sunnuntai}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dayname@norsk}
-% \changes{v1.1p}{2009/01/01}{New (thank to Sveinung Heggen)}
-% \begin{macrocode}
-\newdaylanguage{norsk}{Mandag}{Tirsdag}{Onsdag}
- {Torsdag}{Fredag}{L\o{}rdag}{S\o{}ndag}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dayname@danish}
-% \changes{v3.08}{2011/01/18}{New (thanks to Benjamin Hell)}
-% \begin{macrocode}
-\newdaylanguage{danish}{Mandag}{Tirsdag}{Onsdag}
- {Torsdag}{Fredag}{L\o{}rdag}{S\o{}ndag}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dayname@swedish}
-% \changes{v3.08}{2011/01/18}{New (thanks to Benjamin Hell)}
-% \begin{macrocode}
-\newdaylanguage{swedish}{M\aa{}ndag}{Tisdag}{Onsdag}
- {Torsdag}{Fredag}{L\"ordag}{S\"ondag}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dayname@polish}
-% \changes{v3.13}{2014/01/07}{New (thanks to Blandyna Bogdol)}
-% \changes{v3.13}{2014/01/23}{Fixed (thanks to Elke Schubert)}
-% \begin{macrocode}
-\newdaylanguage{polish}{Poniedzia\l{}ek}{Wtorek}{\'Sroda}
- {Czwartek}{Pi\aob{}tek}{Sobota}{Niedziela}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dayname@czech}
-% \changes{v3.13}{2014/01/23}{New (thanks to Elke Schubert)}
-% \begin{macrocode}
-\newdaylanguage{czech}{Pond\v{e}l\'\i}{\'Uter\'y}{St\v{r}eda}
- {\v{C}tvrtek}{P\'atek}{Sobota}{Ned\v{e}le}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dayname@slovak}
-% \changes{v3.13}{2014/02/26}{New (thanks to Elke Schubert)}
-% \begin{macrocode}
-\newdaylanguage{slovak}{Pondelok}{Utorok}{Streda}
- {\v{S}tvrtok}{Piatok}{Sobota}{Nede\v{l}a}
-% \end{macrocode}
-% \end{macro}
-%
-% If there are no language-definitions, we simply want the US-english names
-% of the days.
-% \changes{v1.1g}{1997/06/21}{correct name is ``tuesday''.}
-% \changes{v3.15}{2014/12/11}{default language definition fixed.}
-% \begin{macrocode}
-\let\@dayname\dayname@english
-% \end{macrocode}
-% \end{macro}
-%
-% Last but not least file \file{scrdate.cfg} has to be included,
-% if it exists.
-% \begin{macrocode}
-\InputIfFileExists{scrdate.cfg}
- {\typeout{*************************************^^J%
- * Local config file scrdate.cfg used^^J%
- *************************************}}
- {}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</scrdate>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</body>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-% \endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/scrwfile.dtx b/macros/latex/contrib/koma-script/source/scrwfile.dtx
deleted file mode 100644
index 5da27e5ee0..0000000000
--- a/macros/latex/contrib/koma-script/source/scrwfile.dtx
+++ /dev/null
@@ -1,502 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% scrwfile.dtx
-% Copyright (c) Markus Kohm, 2010-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: scrwfile.dtx 3773 2022-03-29 06:27:55Z kohm $
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\ProvidesFile{scrwfile.dtx}
-%</dtx>
-%<(package&identify)|driver>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
-%<package&identify>\ProvidesPackage{scrwfile}
-%<driver>\ProvidesFile{scrwfile.drv}
-%<*dtx|(package&identify)|driver>
- [2021/05/30 v0.1.10 KOMA-Script package (write and clone files)]
-%</dtx|(package&identify)|driver>
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2010}
-
- \generate{\usepreamble\defaultpreamble
- \file{scrwfile.sty}{%
- \from{scrwfile.dtx}{package,trace,scrwfile,identify,option,body}%
- \from{scrlogo.dtx}{logo}%
- }%
- }
-
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-%</dtx>
-%<*driver>
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\usepackage{hvlogos}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{scrwfile.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \changes{v0.1}{2010/10/01}{start of new package}
-% \changes{v0.1.7}{2014/10/13}{manual moved to \KOMAScript{} manual}
-% \changes{v0.1.9}{2021/05/30}{version number scheme changed}
-% \changes{v0.1.10}{2022/02/05}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-%
-% \GetFileInfo{scrwfile.dtx}
-% \title{Saving Write Handles with the Experimental
-% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrwfile}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Version \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% The \TeX{} engines \TeX, \pdfTeX, and \XeTeX{} (but not \LuaTeX) do
-% provide only 16 handles for simultaneously write open files. Some of them
-% are already used by \LaTeX{}. Moreover, for every file using
-% \cs{@starttoc} \LaTeX{} keeps a write file open from usage of
-% \cs{@starttoc}, e.g., inside \cs{tableofcontents}, \cs{listoffigures}
-% etc., until the end of the document. Additional write files are used for
-% the index, glossary etc. So sometimes it happens, that there are not
-% enough handles to open another one. \pkg*{scrwfile} was made to change the
-% \LaTeX{} internal handling of all the helper files bases on \cs{@starttoc}
-% to not keep them open simultaneously, but use only one file handle for all
-% of them. So you should never run out of write file handles.
-% \end{abstract}
-%
-% \section{User Manual}
-%
-% You can find the user manual of \pkg*{scrwfile} in the \KOMAScript{} manual,
-% either the German \file{scrguide} or the English \file{scrguien}. But please
-% note:
-% \begin{quote}\bfseries
-% This is an experimental package. Usage of this package is on your own
-% risk. There is no support, if you are using this package, not only for
-% this package but also for the class you are using or other packages, that
-% use \cs{@starttoc} or \cs{@writefile} like \pkg{caption}, \pkg{float},
-% \pkg*{tocbasic}, \pkg{listings} and many more.
-% \end{quote}
-%
-% \MaybeStop{\PrintIndex}
-%
-%
-% \section{Implementation of \pkg*{scrwfile}}
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*identify>
-\PackageWarningNoLine{scrwfile}{%
- THIS IS AN EXPERIMENTAL PACKAGE!\MessageBreak
- USAGE OF THIS PACKAGE IS ON YOUR OWN RISK!\MessageBreak
- EVERYTHING MAY HAPPEN!\MessageBreak
- EVERYTHING MAY CHANGE IN FUTURE!\MessageBreak
- THERE IS NO SUPPORT, IF YOU USE THIS PACKAGE!\MessageBreak
- Maybe, it would be better not to load this package%
-}
-%</identify>
-% \end{macrocode}
-%\iffalse
-%\fi
-%
-% \subsection{Options}
-% \iffalse
-%<*option>
-% \fi
-% Currently we don't need options.
-% \iffalse
-%</option>
-% \fi
-%
-% \subsection{Body}
-% \begin{macrocode}
-%<*body>
-% \end{macrocode}
-%
-% \subsubsection{Needed Packages}
-%
-% Package \pkg*{scrbase} is needed, because of using several \KOMAScript{}
-% basic commands.
-% \begin{macrocode}
-\RequirePackage{scrbase}[2010/09/17]
-% \end{macrocode}
-%
-% Package \pkg*{scrlfile} is needed because of the \file{aux}-file
-% handling and \cs{protected@immediate@write}.
-% \begin{macrocode}
-\RequirePackage{scrlfile}[2010/09/30]
-% \end{macrocode}
-%
-% \changes{v0.1.10}{2022/02/04}{\pkg{iftex} is required}
-% Package \pkg{iftex} is used to detect Lua\LaTeX.
-% \begin{macrocode}
-\RequirePackage{iftex}
-% \end{macrocode}
-%
-% \subsubsection{Is is needed?}
-%
-% \changes{v0.1.9}{2021/05/30}{with Lua\LaTeX{} using is not recommended}
-% \changes{v0.1.10}{2022/02/04}{using \cs{ifluatex}}
-% \changes{v0.1.10}{2022/02/04}{\cs{PackageInfoNoLine} replaced by
-% \cs{PackageWarningNoLine}}
-% If the user uses Lua\LaTeX{} usage of \pkg*{scrwfile} should not be
-% needed.
-% \begin{macrocode}
-\ifluatex
- \PackageWarningNoLine{scrwfile}{LuaLaTeX detected.\MessageBreak
- With LuaLaTeX you should never get an error message:\MessageBreak
- \space\space`No room for a new \string\write'.\MessageBreak
- So scrwfile could make much more harm than benefit\MessageBreak
- and using it is not recommended}%
-\fi
-% \end{macrocode}
-%
-% \subsubsection{\LaTeX{} Kernel Patchs}
-%
-% For some features we need to patch \LaTeX{} kernel macros. Those features
-% and macros are:
-% \begin{description}
-% \item[Single handle feature] means, that \LaTeX{} will no longer need a file
-% handle for every help file, but only one for all files. We will patch
-% \cs{@starttoc} and \cs{@writefile} to do so.
-% \item[Clone file feature] means, that every write to one file may be done to
-% another file, too. We will patch \cs{@writefile} to do so.
-% \end{description}
-% Every patch should be minimum invasive, so that files, that are not under
-% \pkg*{scrwfile}'s control are changed as little as possible.
-%
-% \begin{macro}{\scrwfile@if@only}
-% First of all we check, if the file should be handled by \pkg*{scrwfile}.
-% \begin{macrocode}
-\newcommand*{\scrwfile@if@only}[1]{%
- \begingroup
- \scr@ifundefinedorrelax{scrwfile@only}{\@tempswatrue}{%
- \@tempswafalse
- \edef\reserved@b{#1}%
- \@for\reserved@a:=\scrwfile@only\do
- {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
- }%
- \if@tempswa
- \scr@ifundefinedorrelax{scrwfile@never}{}{%
- \edef\reserved@b{#1}%
- \@for\reserved@a:=\scrwfile@never\do
- {\ifx\reserved@a\reserved@b\@tempswafalse\fi}%
- }%
- \fi
- \expandafter\endgroup
- \if@tempswa
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\scrwfile@starttoc,\scrwfile@@starttoc}
-% This is the internal redefinition of \cs{@starttoc}. First of all test, if it
-% should be used, then use it or not.
-% \begin{macrocode}
-\newcommand*{\scrwfile@starttoc}[1]{%
- \scrwfile@if@only{#1}{\scrwfile@@starttoc}{\scrwfile@saved@starttoc}{#1}%
-}
-\newcommand*{\scrwfile@@starttoc}[1]{%
-%<trace> \PackageInfo{scrwfile}{%
-%<trace> Using my own \string\@starttoc\space for `#1'}%
- \begingroup
- \if@filesw
- \xdef\scrwfile@writefilelist{\scrwfile@writefilelist,#1}%
- \fi
- \@fileswfalse
- \scrwfile@saved@starttoc{#1}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\scrwfile@writefile,\scrwfile@@writefile,\scrwfile@wrtout,
-% \scrwfile@writefilelist}
-% This is the internal redefinition of \cs{@writefile}. First of all test, if
-% it should be used, then use it or not.
-% \begin{macrocode}
-\newcommand*{\scrwfile@writefile}[1]{%
- \scrwfile@if@only{#1}{\scrwfile@@writefile}{\scrwfile@saved@writefile}{#1}%
-}
-\newcommand{\scrwfile@@writefile}[2]{%
-%<trace> \PackageInfo{scrwfile}{%
-%<trace> Using my own \string\@writefile\space for `#1'}%
- \ifnum\scrwfile@wrtout>0
- \begingroup
- \@temptokena{#2}%
- \immediate\write\scrwfile@wrtout{%
- \string\@writefile{#1}{\the\@temptokena}%
- }%
-% \end{macrocode}
-% This was the entry for the real file. But we also may have clone files:
-% \begin{macrocode}
- \scrwfile@process@clones{#1}%
- \endgroup
- \fi
-}
-\chardef\scrwfile@wrtout\z@
-\newcommand*{\scrwfile@writefilelist}{}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@writefile,\scrwfile@saved@writefile}
-% We have to add the single handle feature and the clone file feature to
-% \cs{@writefile} and therefore save the original
-% definition. \cs{scrwfile@saved@writefile} is used, whenever a file is not
-% under \pkg*{scrwfile}'s control.
-% \begin{macrocode}
-\newcommand*{\scrwfile@saved@writefile}{}
-\BeforeClosingMainAux{%
- \ifx\scrwfile@writefilelist\@empty\else
- \let\scrwfile@saved@writefile\@writefile
- \let\scrwfile@wrtout\@partaux
- \immediate\openout\scrwfile@wrtout \jobname.wrt
- \let\@writefile\scrwfile@writefile
- \fi
-}
-\AfterReadingMainAux{%
- \ifx\scrwfile@writefilelist\@empty\else
- \immediate\closeout\scrwfile@wrtout
- \chardef\scrwfile@wrtout\z@
- \begingroup
- \let\@writefile\scrwfile@saved@writefile
- \@for\@currext:=\scrwfile@writefilelist\do{%
- \begingroup
- \ifx\@currext\@empty\else
- \scr@ifundefinedorrelax{tf@\@currext}{%
-%<trace> \typeout{Process extension: `\@currext'}
- \immediate\openout\@partaux \jobname.\@currext
- \expandafter\let\csname tf@\@currext\endcsname\@partaux
- \@input@{\jobname.wrt}%
- \immediate\closeout\@partaux
- }{}%
- \fi
- \endgroup
- }%
- \endgroup
- \fi
-}
-% \end{macrocode}
-% \changes{v0.1.8}{2021/05/30}{added order rule for
-% \pkg*{scrlayer-notecolumn}}
-% Note: Here we use a \LaTeX{} version test, because a do-nothing-definition
-% like the one of \pkg{latexrelease} wouldn't be correct, if the command is
-% not supported by the current \LaTeX{} kernel version setting.
-% \begin{macrocode}
-\IfLTXAtLeastTF{2020/10/01}{%
- \DeclareHookRule{enddocument/afteraux}%
- {scrwfile}{before}{scrlayer-notecolumn}%
-}{%
- \@ifpackageloaded{scrlayer-notecolumn}{%
- \PackageWarningNoLine{scrwfile}{%
- Dangerous package order detected!\MessageBreak
- As a general rule, you should load scrwfile as soon\MessageBreak
- as possible, maybe even before `\string\documentclass'\MessageBreak
- (using `\string\RequirePackage' instead of
- `\string\usepackage').\MessageBreak
- Following packages should be loaded after scrwfile:\MessageBreak
- \space - scrlayer-notecolumn}%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@starttoc,\scrwfile@saved@starttoc}
-% We have to add the single handle feature to \cs{@starttoc} and therefore
-% save the original definition.
-% \changes{v0.1.5}{2013/07/24}{take care for unfriendly \textsl{hyperref}}
-% \cs{scrwfile@saved@starttoc} is be used, whenever the file is not under
-% \pkg*{scrwfile}'s control. Because of package \textsl{hyperref}, that does
-% a hard redefinition without any care for changed definitions, we have to
-% take care for that unfriendly package and cannot do a simple
-% \begin{verbatim}
-% \let\scrwfile@saved@starttoc\@starttoc
-% \let\@starttoc\scrwfile@starttoc
-% \end{verbatim}
-% \begin{macrocode}
-\newcommand*{\scrwfile@saved@starttoc}{}
-\AtBeginDocument{%
- \begingroup
- \@ifpackageloaded{hyperref}{%
- \scr@ifundefinedorrelax{Hy@AtBeginDocument}{%
- \PackageWarning{scrwfile}{%
- Incompatible `hyperref` package detected!\MessageBreak
- You are using a `hyperref` version, that\MessageBreak
- doesn't provide `\string\Hy@AtBeginDocument`.\MessageBreak
- This may or may not work.\MessageBreak
- Using immediate redefinition%
- }%
- \aftergroup\@firstofone
- }{%
- \def\reserved@a{\AtBeginDocument}%
- \ifx\Hy@AtBeginDocumentHook\@undefined
- \PackageInfo{scrwfile}{%
- Using immediate redefinition%
- }%
- \aftergroup\@firstofone
- \else
- \PackageInfo{scrwfile}{%
- Using `\string\Hy@AtBeginDocument`%
- }%
- \aftergroup\Hy@AtBeginDocument
- \fi
- }%
- }{%
- \aftergroup\@firstofone
- }%
- \endgroup
- {%
- \PackageInfo{scrwfile}{%
- Extending `\string\@starttoc`
- }%
- \let\scrwfile@saved@starttoc\@starttoc
- \let\@starttoc\scrwfile@starttoc
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Clone TOC Feature}
-%
-% \pkg*{scrwfile} may clone a TOC, that means, every entry to one file will
-% be copied to other files, too. You must not clone recursively!
-%
-% \begin{description}
-% \item[ToDo:]The whole feature should be moved to \pkg*{tocbasic}. But this
-% would need a complete re-implementation and would result in one more write
-% handle for every cloned file. So maybe it wouldn't be a really good idea
-% to do so.
-% \end{description}
-%
-% \begin{macro}{\scrwfile@process@clones}
-% \begin{macrocode}
-\newcommand*{\scrwfile@process@clones}[1]{%
- \scr@ifundefinedorrelax{scrwfile@clone@#1}{}{%
- \begingroup
- \let\@@protect\protect\let\protect\@empty\afterassignment\restore@protect
- \edef\reserved@b{\csname scrwfile@clone@#1\endcsname}%
- \edef\reserved@c{,#1}%
- \@for \reserved@a:=\reserved@b\do {%
- \@tempswatrue
- \@for \reserved@d:=\reserved@c\do {%
- \ifx\reserved@d\reserved@a\@tempswafalse\fi
- }%
- \if@tempswa
-%<trace> \typeout{clone entry from `#1' to `\reserved@a'}%
- \immediate\write\scrwfile@wrtout{%
- \string\@writefile{\reserved@a}{\the\@temptokena}%
- }%
- \edef\reserved@c{\reserved@c,\reserved@a}%
- \fi
- }%
- \endgroup
- }%
-}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\TOCclone}
-% \changes{v0.1.8}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}
-% \changes{v0.1.8}{2019/11/19}{\cs{ifattoclist} replaced by \cs{Ifattoclist}}
-% \changes{v0.1.8}{2019/11/19}{\cs{iftocfeature} replaced by
-% \cs{Iftocfeature}}
-% \changes{v0.1.8}{2020/02/25}{spurious space in warning message removed}
-% \changes{v0.1.9}{2021/05/30}{requires package \pkg*{tocbasic}}
-% \changes{v0.1.9}{2021/05/30}{can be used only in preamble}
-% Clone the entries from the second (first mandatory) argument TOC to the
-% third (second mandatory) argument TOC. If the first (optional) argument was
-% given, define |\listof#3name| to this and also define |\listof#3| and clone
-% the toc features \texttt{leveldown}, \texttt{numbered}, \texttt{onecolumn}
-% and \texttt{totoc} of |#2| to |#3|. The toc feature \texttt{nobabel} will
-% always be set, because the babel entries at TOC |#3| will be cloned from TOC
-% |#2|.
-% \begin{description}
-% \item{Note:} We use owner \texttt{TOCclone} for all cloned extensions.
-% \end{description}
-% \begin{macrocode}
-\newcommand*{\TOCclone}[3][]{%
- \RequirePackage{tocbasic}%
- \scr@ifundefinedorrelax{scrwfile@clone@#2}{%
- \expandafter\protected@edef\csname scrwfile@clone@#2\endcsname{%
- #3,\protect\csname scrwfile@clone@#3\endcsname
- }%
- }{%
- \edef\reserved@b{\csname scrwfile@clone@#2\endcsname}%
- \expandafter\protected@edef\csname scrwfile@clone@#2\endcsname{%
- \csname scrwfile@clone@#2\endcsname,%
- #3,%
- \protect\csname scrwfile@clone@#3\endcsname
- }%
- }%
- \scr@ifundefinedorrelax{scrwfile@clone@#3}{%
- \expandafter\let\csname scrwfile@clone@#3\endcsname\@empty
- }{}%
- \Ifattoclist{#3}{%
- \PackageWarning{scrwfile}{`#3' already under control of
- tocbasic.\MessageBreak
- Nevertheless features will be set%
- }%
- }{%
- \addtotoclist[TOCclone]{#3}%
- }%
- \setuptoc{#3}{nobabel}%
- \Ifstr{#1}{}{%
- }{%
- \@namedef{listof#3name}{#1}%
- \@namedef{listof#3}{\listoftoc{#3}}%
- \Iftocfeature{#2}{leveldown}{\setuptoc{#3}{leveldown}}{}%
- \Iftocfeature{#2}{numbered}{\setuptoc{#3}{numbered}}{}%
- \Iftocfeature{#2}{onecolumn}{\setuptoc{#3}{leveldownonecolumn}}{}%
- \Iftocfeature{#2}{totoc}{\setuptoc{#3}{totoc}}{}%
- }%
-}
-\@onlypreamble\TOCClone
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-% \Finale
-% \PrintChanges
-%
-% \endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End:
diff --git a/macros/latex/contrib/koma-script/source/tocbasic.dtx b/macros/latex/contrib/koma-script/source/tocbasic.dtx
deleted file mode 100644
index 70d19e7ec1..0000000000
--- a/macros/latex/contrib/koma-script/source/tocbasic.dtx
+++ /dev/null
@@ -1,2002 +0,0 @@
-% \iffalse meta-comment
-% ======================================================================
-% tocbasic.dtx
-% Copyright (c) Markus Kohm, 2008-2022
-%
-% This file is part of the LaTeX2e KOMA-Script bundle.
-%
-% This work may be distributed and/or modified under the conditions of
-% the LaTeX Project Public License, version 1.3c of the license.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later and of this work.
-%
-% This work has the LPPL maintenance status "author-maintained".
-%
-% The Current Maintainer and author of this work is Markus Kohm.
-%
-% This work consists of all files listed in manifest.txt.
-% ======================================================================
-%%% From File: $Id: tocbasic.dtx 3689 2022-02-10 09:53:38Z kohm $
-%<identify>%%% (run: identify)
-%<prepare>%%% (run: prepare)
-%<option>%%% (run: option)
-%<execoption>%%% (run: execoption)
-%<body>%%% (run: body)
-%<exit>%%% (run: exit)
-%<*dtx>
-\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\begingroup
- \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2022-02-10 10:53:38 +0100 (Do, 10. Feb 2022) $
- \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3689 $
-\endgroup
-\ProvidesFile{tocbasic.dtx}[\filedate\space\filerevision\space
-%</dtx>
-%<package&identify>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-%<package&identify>\ProvidesPackage{tocbasic}[%
-%<*dtx|(package&identify)>
-%!KOMAScriptVersion
- package
-%<*dtx>
- source
-%</dtx>
-%</dtx|(package&identify)>
-%<package&identify> (handling toc-files)%
-%<*dtx>
- (dtx)%
-%</dtx>
-%<*dtx|(package&identify)>
-]
-%</dtx|(package&identify)>
-%<*dtx>
-\ifx\documentclass\undefined
- \input scrdocstrip.tex
- \@@input scrkernel-version.dtx
- \@@input scrstrip.inc
- \KOMAdefVariable{COPYRIGHTFROM}{2008}
- \generate{\usepreamble\defaultpreamble
- \file{tocbasic.sty}{%
- \from{tocbasic.dtx}{package,identify}%
- \from{tocbasic.dtx}{package,prepare}%
- \from{scrkernel-tocstyle.dtx}{package,prepare}%
- \from{tocbasic.dtx}{package,option}%
- \from{scrkernel-tocstyle.dtx}{package,option}%
- \from{tocbasic.dtx}{package,body}%
- \from{scrkernel-tocstyle.dtx}{package,body}%
- \from{scrkernel-tocstyle.dtx}{package,style,gobble}%
- \from{scrkernel-tocstyle.dtx}{package,style,dottedtocline}%
- \from{scrkernel-tocstyle.dtx}{package,style,undottedtocline}%
- \from{scrkernel-tocstyle.dtx}{package,style,largetocline}%
- \from{scrkernel-tocstyle.dtx}{package,style,tocline}%
- \from{scrkernel-tocstyle.dtx}{package,style,toctext}%
- \from{scrkernel-tocstyle.dtx}{package,style,default}%
- \from{tocbasic.dtx}{package,exit}%
- \from{scrlogo.dtx}{logo}%
- }%
- }%
- \@@input scrstrop.inc
-\else
- \let\endbatchfile\relax
-\fi
-\endbatchfile
-\documentclass[USenglish]{koma-script-source-doc}
-\usepackage{babel}
-\setcounter{StandardModuleDepth}{2}
-\begin{document}
-\DocInput{tocbasic.dtx}
-\end{document}
-%</dtx>
-% \fi
-%
-% \changes{v3.36}{2022/02/10}{switch over from \cls*{scrdoc} to
-% \cls*{koma-script-source-doc}}
-% \changes{v3.36}{2022/02/10}{require package \pkg*{scrlogo} instead of
-% defining \cs{KOMAScript}}
-%
-% \GetFileInfo{tocbasic.dtx}
-% \title{Handling of Tables and Lists of Contents with
-% \href{https://komascript.de}{\KOMAScript} Package \pkg*{tocbasic}}
-% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
-% \date{Revision \fileversion{} of \filedate}
-% \maketitle
-% \begin{abstract}
-% The main purpose of package \pkg*{tocbasic} is to provide features for
-% authors of classes and packages to create own tables or lists of contents
-% like the list of figures and the list of tables and thereby allow other
-% classes or packages some types of control over these. For examples package
-% \pkg*{tocbasic} delegates language control of all these tables and lists
-% of contents to package \pkg{babel}. So automatic change of language
-% will be provided inside all these tables and lists of contents. Using
-% \pkg*{tocbasic} will exculpate authors of classes and packages from
-% implementation of such features.
-%
-% \KOMAScript{} classes use \pkg*{tocbasic} not only for the table of
-% contents but also for the already mentioned lists of figures and tables.
-% \end{abstract}
-% \tableofcontents
-%
-% \section{User Manual}
-%
-% You can find the user manuals of \pkg*{tocbasic} in the \KOMAScript{}
-% manual, either the German \file{scrguide} or the English \file{scrguien}.
-%
-% \MaybeStop{\PrintIndex}
-%
-%
-% \section{Implementation}
-% \label{sec:implementation}
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% All macros with prefix \cs{tb@} or \cs{@} are internal macros and should not
-% be used by package and class authors. Macros with prefix \cs{tocbasic@} are
-% internal macros, that may be used by class and packages authors. Macros
-% without \texttt{@} are interface commands and may be used by class and
-% package authors and users.
-%
-% Note: Parts of the implementation of package \pkg*{tocbasic} are
-% out-sourced into file \file{scrkernel-tocbasic.dtx}.
-%
-%
-% \subsection{Options}
-% \label{sec:options}
-%
-% There are no options because the package should be used by class and package
-% authors not by users. So the package will be loaded using
-% \cs{RequirePackage}. Using different options by different packages would
-% result in an option clash. Nevertheless, the not existing options are
-% processed.
-% \begin{macrocode}
-%<*option>
-\ProcessOptions\relax
-%</option>
-% \end{macrocode}
-%
-%
-% \subsection{Required packages}
-% \label{sec:packages}
-%
-% Package \pkg*{scrbase} is needed to process all macro options. As long as
-% no package options are provided, the \texttt{body}-run is early enough to
-% load it.
-% \begin{macrocode}
-%<*body>
-\RequirePackage{scrbase}
-%</body>
-% \end{macrocode}
-% We load it after processing the options, because we don't need it for
-% processing options.
-%
-%
-%
-% \subsection{Unwanted packages}
-% \label{sec:unpackages}
-%
-% There are packages, that are not recommended to be used together with
-% \pkg*{tocbasic}:
-% \begin{macrocode}
-%<*body>
-% \end{macrocode}
-% \begin{description}
-% \item[\pkg{multitoc}:] This package implements multi-column ToCs using
-% \pkg{multicol}. Unfortunately there is a bug in that package, that
-% disables all extensions but \file{toc}, \file{lof} and \file{lot} and
-% even these if the corresponding option has not been set.
-% \begin{macrocode}
-\AfterPackage*{multitoc}{%
- \@ifpackagelater{multitoc}{2022/02/10}{}{%
- \PackageWarningNoLine{tocbasic}{%
- Usage of package `multitoc' is not recommended!\MessageBreak
- Note, this package generally results in empty ToCs\MessageBreak
- for all extension but `toc', `lof' and `lot' and\MessageBreak
- even for these extensions if you do not use the\MessageBreak
- corresponding multitoc options.\MessageBreak
- It is recommended to use:\MessageBreak
- \space\space\string\usepackage{multicol}\MessageBreak
- \space\space\string\BeforeStartingTOC{\string\begin{multicols}{2}}%
- \MessageBreak
- \space\space\string\AfterStartingTOC{\string\end{multicols}}%
- \MessageBreak
- instead of loading package `multitoc'.\MessageBreak
- See the KOMA-Script manual for more information\MessageBreak
- about using \string\BeforeStartingTOC\space and
- \string\AfterStartingTOC\MessageBreak
- and the multicol manual for more information\MessageBreak
- about the `multicols' environment%
- }%
- }%
-}
-% \end{macrocode}
-% \end{description}
-% \begin{macrocode}
-%</body>
-% \end{macrocode}
-%
-%
-% \subsection{Having a list of all toc-files}
-% \label{sec:listoftocs}
-%
-% If we have a list of all toc-files we may do commands for all
-% toc-files. Somethimes it may be usefull to known the package, that created
-% the toc-file, so this information will be stored additionally.
-%
-% \begin{macro}{\tb@listoftocs}
-% This is the list of toc-files. The list will be:
-% \begin{quote}
-% \cs{do}\marg{extension}\marg{class or
-% package}\cs{do}\marg{extension}\marg{class or package}\dots
-% \end{quote}
-% With this, adding and processing the list will be very fast but removing
-% an element will be very slow.
-%
-% The initial state of the list will be \emph{empty}.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\tb@listoftocs}{}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\ifattoclist,\Ifattoclist}
-% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} renamed to \cs{Ifattoclist}}
-% This command tests, if an extension is already at the list of toc-files. The
-% extension has to be the first argument. The second argument will be done, if
-% the extension is already at the list of toc-files. The third argument will
-% be done, if the extension is at the list of toc-files not yet.
-% \begin{macrocode}
-\providecommand*{\ifattoclist}{%
- \PackageWarning{tocbasic}{Usage of deprecated command
- `\string\ifattoclist'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\ifattoclist' by `\string\Ifattoclist'%
- }%
- \Ifattoclist
-}
-\newcommand{\Ifattoclist}[1]{%
- \begingroup
- \def\do##1##2{%
- \edef\reserved@a{##1}%
- \ifx\reserved@a\reserved@b\@tempswatrue\fi
- }%
- \edef\reserved@b{#1}\@tempswafalse\tb@listoftocs
- \if@tempswa\aftergroup\@firstoftwo\else\aftergroup\@secondoftwo\fi
- \endgroup
-}
-% \end{macrocode}
-% \end{command}^^A \ifattoclist,\Ifattoclist
-%
-% \begin{command}{\addtotoclist}
-% \changes{v3.06a}{2010/09/14}{expand the arguments while adding them to the
-% internal list}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@addtotoclist,\scr@addtotoclist}
-% \changes{v1.0a}{2008/11/11}{\cs{@addtotoclist} renamed to
-% \cs{scr@addtotoclist} because of package \pkg{flowfram}}
-% \begin{macro}{\@@addtotoclist,\scr@@addtotoclist}
-% \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}}
-% This command adds an extension to the list of toc-files. The first,
-% optional argument is the class or package name with the corresponding
-% extension of class or package files. If this argument was omitted
-% \pkg*{tocbasic} tries to get it automatically. This should be
-% successfull while loading a class or package but not while processing any
-% command of a class or package after loading the class or package. The
-% 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}
-\newcommand*{\addtotoclist}{%
- \kernel@ifnextchar [%]
- \scr@@addtotoclist\scr@addtotoclist
-}
-\newcommand*{\scr@addtotoclist}{%
- \ifx\@currname\@empty
- \def\reserved@a{\scr@@addtotoclist[]}%
- \else
- \edef\reserved@a{\noexpand\scr@@addtotoclist[\@currname.\@currext]}%
- \fi
- \reserved@a
-}
-\newcommand*{\scr@@addtotoclist}[2][]{%
- \Ifattoclist{#2}{%
- \PackageError{tocbasic}{%
- file extension `#2' cannot be used twice
- }{%
- File extension `#2' is already used by a toc-file, while
- \ifx\relax#1\relax someone\else #2\fi\MessageBreak
- tried to use it again for a toc-file.\MessageBreak
- This may be either an incompatibility of packages, an error at a
- package,\MessageBreak
- or a mistake by the user.\MessageBreak
- }%
- }{%
- \begingroup
- \protected@edef\reserved@a{%
- \noexpand\g@addto@macro\noexpand\tb@listoftocs{%
- \noexpand\do{#2}{#1}}}\reserved@a
- \endgroup
- \ifx\relax #1\relax\else
- \@ifundefined{tb@#1@add@hook}{}{%
- \edef\reserved@a{%
- \noexpand\def\noexpand\@currext{#2}%
- \noexpand\@nameuse{tb@#1@add@hook}%
- \noexpand\def\noexpand\@currext{\@currext}%
- }\reserved@a
- }%
- \fi
- \edef\reserved@a{%
- \noexpand\def\noexpand\@currext{#2}%
- \noexpand\@nameuse{tb@@add@hook}%
- \noexpand\def\noexpand\@currext{\@currext}%
- }\reserved@a
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\owneroftoc}
-% \changes{v3.22}{2016/08/09}{added}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% Returns the owner of a TOC or uses the owner of a TOC as argument of the
-% optional argument, if it exists.
-% \begin{macrocode}
-\newcommand*{\owneroftoc}[2][\@firstofone]{%
- \begingroup
- \let\reserved@a\endgroup
- \def\do##1##2{\Ifstr{#2}{##1}{\def\reserved@a{\endgroup#1{##2}}}{}}%
- \tb@listoftocs
- \reserved@a
-}
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\categoryoftoc}
-% \changes{v3.27}{2019/05/12}{added}
-% Synonym for \cs{owneroftoc}.
-% \begin{macrocode}
-\newcommand*{\categoryoftoc}{\owneroftoc}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\AtAddToTocList}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@AtAddToTocList,\@@AtAddToTocList}
-% Action to be done, when adding a toc-file of a known owner. The first
-% optional argument is the owner. The second, mandatory argument is the
-% action. While doing the action \cs{@currext} will be the extension of the
-% added toc-file. If the first argument was omitted \pkg*{tocbasic} tries
-% to get it automatically. This should be successfull while loading a class
-% or package but not while processing any command of a class or package
-% after loading the class or package. The second, mandatory argument is the
-% extension of the toc-file. NOTE: An empty first argument is not the same
-% like omitting the first argument, but set's up the general hook. The
-% general hook will be done for every adding after the individual hook (this
-% means, you may dactivate features at the individual hook before processing
-% the general hook). But the individual hook will not be processed for
-% toc-files without any owner!
-% \begin{macrocode}
-\newcommand*{\AtAddToTocList}{%
- \kernel@ifnextchar [%]
- \@@AtAddToTocList\@AtAddToTocList
-}
-\newcommand*{\@AtAddToTocList}{%
- \ifx\@currname\@empty
- \def\reserved@a{\@@AtAddToTocList[]}%
- \else
- \edef\reserved@a{\noexpand\@@AtAddToTocList[\@currname.\@currext]}%
- \fi
- \reserved@a
-}
-\newcommand*{\@@AtAddToTocList}[1][]{%
- \@ifundefined{tb@#1@add@hook}{\@namedef{tb@#1@add@hook}{}}{}%
- \expandafter\g@addto@macro\csname tb@#1@add@hook\endcsname
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{macro}{\tocbasic@extend@babel}
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
-% \cs{Iftocfeature}}
-% NOTE: To extend the original \cs{bbl@set@language} the argument of
-% \cs{tocbasic@extend@babel} must not be a local macro (like \cs{@currext})
-% \begin{macrocode}
-\newcommand*{\tocbasic@extend@babel}[1]{%
- \scr@ifundefinedorrelax{bbl@set@language}{%
- \PackageInfo{tocbasic}{babel extension for `#1' omitted\MessageBreak
- because of missing \string\bbl@set@language}%
- }{%
- \Iftocfeature{#1}{nobabel}{%
- \PackageInfo{tocbasic}{omitting babel extension for `#1'\MessageBreak
- because of feature `nobabel' available\MessageBreak
- for `#1'}%
- }{%
-% \end{macrocode}
-% \changes{v3.23}{2017/02/23}{using \cs{BabelContentsFiles} if available}
-% Since version 3.9a provides adding extensions to the language switch
-% preparation. So it is used if it is available.
-% \begin{macrocode}
- \scr@ifundefinedorrelax{BabelContentsFiles}{%
- \PackageInfo{tocbasic}{setting babel extension for `#1'}%
- \expandafter\gdef\expandafter\bbl@set@language
- \expandafter##\expandafter1%
- \expandafter{%
- \bbl@set@language{##1}%
- \addtocontents{#1}{\xstring\select@language{\languagename}}%
- }%
- }{%
- \@expandtwoargs\in@{,#1,}{,\BabelContentsFiles,}%
- \ifin@
- \PackageInfo{tocbasic}{omitting babel extension for
- `#1'\MessageBreak
- because it is already in \string\BabelContentsFiles}%
- \else
- \PackageInfo{tocbasic}{setting babel extension for `#1'}%
- \xdef\BabelContentsFiles{\BabelContentsFiles,#1}%
- \fi
- }%
- }%
- }%
-}
-% \end{macrocode}
-% This feature should be used for all toc-files (unless feature
-% \opt{nobabel} was set for the toc-file).
-% \begin{macrocode}
-\AtAddToTocList[]{\expandafter\tocbasic@extend@babel\expandafter{\@currext}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{command}{\removefromtoclist}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\scr@removefromtoclist,\@removefromtoclist}
-% \changes{v3.22}{2016/09/06}{missing \cs{global} added}
-% \changes{v3.28}{2019/11/22}{\cs{@removefromtoclist} renamed to
-% \cs{scr@removefromtoclist}}
-% \begin{macro}{\scr@@removefromtoclist,\@@removefromtoclist}
-% \changes{v3.22}{2016/09/06}{missing \cs{global} added}
-% \changes{v3.28}{2019/11/22}{\cs{@@removefromtoclist} renamed to
-% \cs{scr@removefromtoclist}}
-% This command will remove an extension from the list of toc-files. If the
-% first, optional argument is given, the extension will only be removed, if
-% it was added by the given owner. NOTE: An empty first argument is not the
-% same like omitting the first argument!
-% \begin{macrocode}
-\newcommand*{\removefromtoclist}{%
- \kernel@ifnextchar [%]
- \scr@removefromtoclist\scr@@removefromtoclist
-}
-\newcommand*{\scr@removefromtoclist}[2][]{%
- \begingroup
- \let\tb@oldlist\tb@listoftocs
- \def\do##1##2{%
- \edef\reserved@a{##1}%
- \ifx\reserved@a\reserved@b
- \begingroup
- \edef\@currext{##2}%
- \edef\reserved@b{#1}%
- \ifx\@currext\reserved@b
- \else
- \g@addto@macro\tb@listoftocs{\do{##1}{##2}}%
- \fi
- \endgroup
- \else
- \g@addto@macro\tb@listoftocs{\do{##1}{##2}}%
- \fi
- }%
- \edef\reserved@b{#2}\global\let\tb@listoftocs\@empty
- \tb@oldlist
- \endgroup
-}
-\newcommand*{\scr@@removefromtoclist}[1]{%
- \begingroup
- \let\tb@oldlist\tb@listoftocs
- \def\do##1##2{%
- \edef\reserved@a{##1}%
- \ifx\reserved@a\reserved@b
- \else
- \g@addto@macro\tb@listoftocs{\do{##1}{##2}}%
- \fi
- }%
- \edef\reserved@b{#1}\global\let\tb@listoftocs\@empty
- \tb@oldlist
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\doforeachtocfile}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@doforeachtocfile,\@@doforeachtocfile}
-% \changes{v3.09}{2011/03/01}{\cs{@currext} defined using \cs{edef} instead
-% of \cs{def}}
-% This command does the second, mandatory argument for each toc-file at the
-% list of toc-files. If the first, optional argument was given this will be
-% done only for the toc-files of that owner. NOTE: An empty first argument
-% is not the same like omitting the first argument!
-%
-% While processing the second argument \cs{@currext} is the extension of
-% the toc-file. The second argument will be processed with increased group
-% level!
-%
-% See \cs{addtoeachtocfile} for an example of usage of
-% \cs{doforeachtocfile}.
-% \begin{macrocode}
-\newcommand{\doforeachtocfile}{%
- \kernel@ifnextchar [%]
- \@doforeachtocfile\@@doforeachtocfile
-}
-\newcommand{\@doforeachtocfile}[2][]{%
- \def\do##1##2{%
- \edef\reserved@a{#1}\edef\reserved@b{##2}\ifx\reserved@a\reserved@b
- \edef\@currext{##1}#2%
- \fi
- }%
- \edef\reserved@a{%
- \noexpand\tb@listoftocs
- \noexpand\def\noexpand\@currext{\@currext}%
- }\reserved@a
- \let\do\relax
-}
-\newcommand{\@@doforeachtocfile}[1]{%
- \def\do##1##2{%
- \edef\@currext{##1}#1%
- }%
- \edef\reserved@a{%
- \noexpand\tb@listoftocs
- \noexpand\def\noexpand\@currext{\@currext}%
- }\reserved@a
- \let\do\relax
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\addtoeachtocfile}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@addtoeachtocfile,\@@addtoeachtocfile}
-% \changes{v3.03b}{2009/06/08}{typo fix at usage of \cs{doforeachtocfile}}
-% This command calls \cs{addtocontents} with the section, mandatory
-% argument for each toc-file at the list of toc-files. If the first,
-% optional argument was given this will be done only for the toc-files of
-% that owner. NOTE: An empty first argument is not the same like omitting
-% the first argument! And don't forget to protect the commands, that should
-% not be expanded, at the mandatory argument.
-% \begin{macrocode}
-\newcommand{\addtoeachtocfile}{%
- \kernel@ifnextchar [%]
- \@addtoeachtocfile\@@addtoeachtocfile
-}
-\newcommand{\@addtoeachtocfile}[2][]{%
- \doforeachtocfile[{#1}]{\addtocontents{\@currext}{#2}}%
-}
-\newcommand{\@@addtoeachtocfile}[1]{%
- \doforeachtocfile{\addtocontents{\@currext}{#1}}%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \subsection{Adding entries into toc-files}
-%
-% We have a new general command to add entries to several toc-files at
-% once. And we have some special commands for the table of contents.
-%
-% \begin{command}{\addcontentslinetoeachtocfile}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@addcontentslinetoeachtocfile,\@@addcontentslinetoeachtocfile}
-% Something like a combination of \cs{addtoeachtocfile} and
-% \cs{addcontentsline}.
-% \begin{macrocode}
-%<*body>
-\newcommand{\addcontentslinetoeachtocfile}{%
- \kernel@ifnextchar [%]
- \@addcontentslinetoeachtocfile\@@addcontentslinetoeachtocfile
-}
-\newcommand{\@addcontentslinetoeachtocfile}[3][]{%
- \doforeachtocfile[{#1}]{\addcontentsline{\@currext}{#2}{#3}}%
-}
-\newcommand{\@@addcontentslinetoeachtocfile}[2]{%
- \doforeachtocfile{\addcontentsline{\@currext}{#1}{#2}}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\addxcontentsline}
-% \changes{v3.12}{2013/09/24}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@addxcontentsline}
-% \changes{v3.12}{2013/09/24}{added}
-% This will be used instead of \cs{addcontentsline} to generate numbered or
-% not numbered entries to a toc-file. First argument is the toc-file, second
-% the entry type, e.g., |chapter|, the third is the entry number or empty and
-% the fourth and last is the entry text.
-% \begin{macrocode}
-\newcommand*{\addxcontentsline}[2]{%
- \kernel@ifnextchar [%]
- {\@addxcontentsline{#1}{#2}}%
- {\@addxcontentsline{#1}{#2}[]}%
-}
-\newcommand*{\@addxcontentsline}{}
-\def\@addxcontentsline#1#2[#3]#4{%
- \scr@ifundefinedorrelax{add#2#1entry}{%
- \tocbasic@addxcontentsline{#1}{#2}{#3}{#4}%
- }{%
- \@nameuse{add#2#1entry}{#3}{#4}%
- }%
-}
-% \end{macrocode}
-% \begin{command}{\nonumberline}
-% \changes{v3.12}{2013/09/24}{added}
-% Either \cs{relax} or \cs{numberline} depending on the feature
-% \opt{numberline}.
-% \begin{macrocode}
-\newcommand*{\nonumberline}{}%
-% \end{macrocode}
-% \end{command}
-% \begin{command}{\addxcontentsline}
-% This may be used to either use a heading type command or the general default
-% one. You are not allowed to use it in the definition of a heading type
-% command like \cs{addchaptertocentry}! You may use
-% \cs{tocbasic@addxcontentsline} at the definition of those commands.
-% \begin{macrocode}
-\newcommand*{\tocbasic@addxcontentsline}[4]{%
- \if\relax\detokenize{#3}\relax
- \addcontentsline{#1}{#2}{\protect\nonumberline#4}%
- \else
- \addcontentsline{#1}{#2}{\protect\numberline{#3}#4}%
- \fi
-}
-% \end{macrocode}
-% \end{command}
-% \end{macro}
-% \end{command}
-%
-% \begin{command}{\addxcontentslinetoeachtocfile}
-% \changes{v3.12}{2013/09/24}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@addxcontentslinetoeachtocfile,
-% \@@addxcontentslinetoeachtocfile}
-% \changes{v3.12}{2013/09/24}{added}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@@@addxcontentslinetoeachtocfile,
-% \@@@@addxcontentslinetoeachtocfile}
-% \changes{v3.12}{2013/09/24}{added}
-% Similar to \cs{addcontentslinetoeachtocfile} using
-% \cs{addxcontentsline} instead of \cs{addcontentsline}.
-% \begin{macrocode}
-\newcommand{\addxcontentslinetoeachtocfile}{%
- \kernel@ifnextchar [%]
- \@addxcontentslinetoeachtocfile\@@addxcontentslinetoeachtocfile
-}
-\newcommand{\@addxcontentslinetoeachtocfile}[2][]{%
- \kernel@ifnextchar [%]
- {\@@@addxcontentslinetoeachtocfile[{#1}]{#2}}%
- {\@@@addxcontentslinetoeachtocfile[{#1}]{#2}[]}
-}
-\newcommand*{\@@@addxcontentslinetoeachtocfile}{}
-\def\@@@addxcontentslinetoeachtocfile[#1]#2[#3]#4{%
- \doforeachtocfile[{#1}]{\addxcontentsline{\@currext}{#2}[#3]{#4}}%
-}
-\newcommand{\@@addxcontentslinetoeachtocfile}[1]{%
- \kernel@ifnextchar [%]
- {\@@@@addxcontentslinetoeachtocfile{#1}}%
- {\@@@@addxcontentslinetoeachtocfile{#1}[]}%
-}
-\newcommand*{\@@@@addxcontentslinetoeachtocfile}{}
-\def\@@@@addxcontentslinetoeachtocfile#1[#2]#3{%
- \doforeachtocfile{\addxcontentsline{\@currext}{#1}[{#2}]{#3}}%
-}
-%</body>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{command}
-%
-%
-% \subsection{Show list of toc-file}
-% \label{sec:showlistoftocfile}
-%
-% If you have a toc-file you want a list-of-command for this toc-file,
-% too. Here are basics and high level commands for this.
-%
-% \begin{macro}{\tocbasic@starttoc}
-% \changes{v3.17}{2015/03/23}{usage of feature \opt{noparskipfake}}
-% \changes{v3.27}{2019/07/08}{hack to add \cs{par} at end of (main) file}
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
-% \cs{Iftocfeature}}
-% \changes{v3.32}{2020/08/25}{replace \cs{par} hack by \cs{par} solution}
-% \changes{v3.32}{2020/08/25}{reentrant warning}
-% Some basics are done like setting up \cs{parskip}, \cs{parindent} and
-% \cs{parfillskip}, a general hook will be called, an individual hook will
-% be called, the toc will be started, an individual hook will be called, an
-% general hook wil be called, that's it.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\tocbasic@starttoc}[1]{%
- \begingroup
- \tocbasic@reentrant@warning
- \def\tocbasic@reentrant@warning{%
- \PackageWarning{tocbasic}{%
- Loading one auxiliary file inside the setup context\MessageBreak
- of another auxiliary file is not recommended.\MessageBreak
- In this case settings for `\@currext' could also influence\MessageBreak
- settings of `#1' and local states of `#1' can also\MessageBreak
- influence local states of `\@currext'%
- }%
- }%
- \edef\@currext{#1}%
- \Iftocfeature{\@currext}{noparskipfake}{}{%
- \ifvmode
- \@tempskipa\lastskip
- \vskip-\lastskip
- \addtolength{\@tempskipa}{\parskip}%
- \vskip\@tempskipa
- \fi
- }%
- \setlength{\parskip}{\z@}%
- \setlength{\parindent}{\z@}%
- \setlength{\parfillskip}{\z@\@plus 1fil}%
- \csname tocbasic@@before@hook\endcsname
- \csname tb@#1@before@hook\endcsname
- \@starttoc{#1}%
- \BeforeClosingMainAux{%
- \addtocontents{#1}{%
- \string\providecommand\string\tocbasic@end@toc@file{}%
- \string\tocbasic@end@toc@file
- }%
- }%
- \edef\@currext{#1}%
- \csname tb@#1@after@hook\endcsname
- \csname tocbasic@@after@hook\endcsname
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{tocbasic@end@toc@file}
-% \changes{v3.32}{2020/08/25}{added}
-% \begin{macrocode}
-\newcommand*{\tocbasic@end@toc@file}{\par}
-% \end{macrocode}
-% \end{macro}^^A \tocbasic@end@toc@file
-% \begin{macro}{\tocbasic@reentrant@warning}
-% \changes{v3.32}{2020/08/25}{added}
-% \begin{macrocode}
-\newcommand*{\tocbasic@reentrant@warning}{}
-% \end{macrocode}
-% \end{macro}^^A \tocbasic@reentrant@warning
-% \begin{macro}{\tocbasic@@before@hook,\tocbasic@@after@hook}
-% These are the general hooks. They may be used by classes and packages for
-% commands, that should be used for all lists of not only the own lists of,
-% e.\,g., \KOMAScript{} may use it to handle option \opt{tocleft}.
-% \begin{macrocode}
-\newcommand*{\tocbasic@@before@hook}{}
-\newcommand*{\tocbasic@@after@hook}{}
-% \end{macrocode}
-% \end{macro}^^A \tocbasic@@before@hook,\tocbasic@@after@hook
-% \begin{command}{\BeforeStartingTOC,\AfterStartingTOC}
-% \changes{v3.04b}{2010/01/05}{fix:define the hook if not already defined}
-% \changes{v3.06}{2010/06/09}{fix: using \cs{@ifundefined} instead of
-% undefined \cs{scr@ifundefinedorrelax}}
-% \changes{v3.26}{2018/08/10}{message moved to \texttt{trace}}
-% These are the commands to add code to the general or individual hooks. If
-% the first, optional argument was given, the second, mandatory argument
-% will be added to the individual hook, otherwise the general hook will be
-% extended.
-% \begin{macrocode}
-\newcommand{\BeforeStartingTOC}[2][]{%
- \ifx\relax#1\relax
- \g@addto@macro\tocbasic@@before@hook{#2}%
- \else
- \@ifundefined{tb@#1@before@hook}{%
-%<trace> \PackageInfo{tocbasic}{defining new hook before starting `#1'}%
- \expandafter\global\expandafter\let\csname tb@#1@before@hook\endcsname
- \@empty
- }{}%
- \expandafter\g@addto@macro\csname tb@#1@before@hook\endcsname{#2}%
- \fi
-}
-\newcommand{\AfterStartingTOC}[2][]{%
- \ifx\relax#1\relax
- \g@addto@macro\tocbasic@@after@hook{#2}%
- \else
- \@ifundefined{tb@#1@after@hook}{%
-%<trace> \PackageInfo{tocbasic}{defining new hook after starting `#1'}%
- \expandafter\global\expandafter\let\csname tb@#1@after@hook\endcsname
- \@empty
- }{}%
- \expandafter\g@addto@macro\csname tb@#1@after@hook\endcsname{#2}%
- \fi
-}
-% \end{macrocode}
-% \end{command}^^A \BeforeStartingTOC,\AfterStartingTOC
-% \end{macro}^^A \tocbasic@starttoc
-%
-% \begin{command}{\listoftoc}
-% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
-% \begin{macro}{\@listoftoc}
-% \changes{v1.0a}{2008/11/12}{\cs{twocolumn} fixed}
-% \changes{v1.01}{2008/11/13}{new feature \opt{onecolumn}}
-% \changes{v3.09}{2011/03/01}{\cs{@currext} defined using \cs{edef} instead
-% of \cs{def}}
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
-% \cs{Iftocfeature}}
-% \changes{v3.31}{2020/07/08}{use one time expansion of local
-% \cs{list@fname}}
-% Command to handle the hole list of something. There are additional hooks
-% for this. The first optional argument is the title for this list. If the
-% optional argument was omitted \cs{listof\#2name} will be used. The star
-% version does not set up a heading or switch the column number!
-% \begin{macrocode}
-\newcommand*{\listoftoc}{%
- \kernel@ifstar \tocbasic@starttoc\@listoftoc
-}
-\newcommand*{\@listoftoc}[2][]{%
- \begingroup
- \def\list@fname{#1}%
- \@ifundefined{listof#2name}{%
- \ifx\list@fname\@empty
- \PackageWarning{tocbasic}{%
- You should either define \expandafter\string\csname
- listof#2name\endcsname\MessageBreak
- or use the optional argument of \string\listoftoc\space\MessageBreak
- to set the term to be used for the\MessageBreak
- heading of list of #2}%
- \def\list@fname{\listofname~#2}%
- \fi
- }{%
- \expandafter\let\expandafter\list@fname\csname listof#2name\endcsname
- }%
- \edef\@currext{#2}%
- \Iftocfeature{\@currext}{onecolumn}{%
- \Iftocfeature{\@currext}{leveldown}{}{%
- \if@twocolumn
- \aftergroup\twocolumn\onecolumn
- \fi
- }%
- }{}%
- \Iftocfeature{\@currext}{numberline}{\def\nonumberline{\numberline{}}}{}%
- \expandafter\tocbasic@listhead\expandafter{\list@fname}%
- \scr@ifundefinedorrelax{microtypesetup}{}{%
- \Iftocfeature{\@currext}{noprotrusion}{}{%
- \microtypesetup{protrusion=false}%
- \PackageInfo{tocbasic}{%
- character protrusion at \@currext\space deactivated}%
- }%
- }%
- \tocbasic@starttoc{#2}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \changes{v3.25}{2017/11/21}{\pkg{tocbibind} warning added}
-% 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}
-\@ifpackageloaded{tocbibind}{}{%
- \AtBeginDocument{%
- \@ifpackageloaded{tocbibind}{%
- \PackageInfo{tocbasic}{usage of `tocbibind' detected}%
- \newcommand*{\tb@tocbibindpatch}[3]{%
- \long\def\reserved@a{\tocfile{#2}{#1} }%
- \ifx #3\reserved@a
- \PackageWarningNoLine{tocbasic}{%
- `tocbibind' redefinition of `\string#3'\MessageBreak
- detected.\MessageBreak
- Note: Loading `tocbibind' without option `not#1'\MessageBreak
- can break several features of `tocbasic'%
- \scr@ifundefinedorrelax{KOMAClassName}{%
- .\MessageBreak
- Loading `tocbibind' before `tocbasic' would avoid\MessageBreak
- this warning message%
- }{}%
- }%
- \fi
- }%
- \tb@tocbibindpatch{toc}{\contentsname}{\tableofcontents}%
- \tb@tocbibindpatch{lof}{\listfigurename}{\listoffigures}%
- \tb@tocbibindpatch{lot}{\listtablename}{\listoftables}%
- }{}%
- }%
-}
-% \end{macrocode}
-%
-% \begin{command}{\listofname}
-% While this is only an emergency command, we don't support languages.
-% \begin{macrocode}
-\newcommand*{\listofname}{List of}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\listofeachtoc}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \begin{macro}{\@listofeachtoc,\@@listofeachtoc}
-% \changes{v3.03b}{2009/06/08}{typo fix at usage of \cs{doforeachtocfile}}
-% Another example of using \cs{doforeachtocfile}.
-% \begin{macrocode}
-\newcommand*{\listofeachtoc}{%
- \kernel@ifnextchar [%]
- \@listofeachtoc\@@listofeachtoc
-}
-\newcommand{\@listofeachtoc}[1][]{%
- \doforeachtocfile[{#1}]{\listoftoc{\@currext}}%
-}
-\newcommand{\@@listofeachtoc}[1]{%
- \doforeachtocfile{\listoftoc{\@currext}}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-% \begin{macro}{\ext@toc}
-% \changes{v3.23}{2017/02/23}{use indirect extension for toc}
-% We do not longer hard code extension \file{toc} for the table of
-% contents. This allowes users to change it. Classes or other packages may
-% also define it. So it seems to be better to \cs{providecommand} instead of
-% \cs{newcommand} here.
-% \begin{macrocode}
-\providecommand*{\ext@toc}{toc}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\tocbasic@listhead}
-% \changes{v3.02a}{2009/01/20}{no explicite marks if ``numbered''}
-% \changes{v3.09a}{2011/04/12}{again no explicite marks if ``numbered''}
-% \changes{v3.12}{2013/09/24}{usage of new \cs{tocbasic@addxcontentsline}}
-% \changes{v3.15}{2014/12/10}{moved \cs{@mkboth} inside \cs{chapter*}}
-% \changes{v3.15}{2014/12/10}{usage of \cs{addsec} if available}
-% \changes{v3.15}{2014/12/10}{usage of \cs{@mkright} if available}
-% \changes{v3.17}{2015/03/08}{moved \cs{@mkboth} outside \cs{chapter*}}
-% \changes{v3.17}{2015/03/08}{usage of \cs{@mkdouble} if available}
-% \changes{v3.17}{2015/03/25}{penalty and skip reconstruction after
-% \cs{@mkright}, \cs{@mkboth}, or \cs{@mkdouble}}
-% \changes{v3.26}{2018/06/22}{removed spurious group}
-% \changes{v3.26}{2018/09/03}{usage of \cs{addsecmark} or \cs{sectionmark}
-% instead of \cs{@mkright} or \cs{markright}}
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
-% \cs{Iftocfeature}}
-% Setting the headings of a list of something. The heading is the only
-% argument.
-% \begin{macrocode}
-\newcommand*{\tocbasic@listhead}[1]{%
- \@ifundefined{tocbasic@listhead@\@currext}{%
- \scr@ifundefinedorrelax{chapter}{%
- \expandafter\def\csname tocbasic@listhead@\@currext\endcsname##1{%
- \Iftocfeature{\@currext}{leveldown}{%
- \Iftocfeature{\@currext}{numbered}{%
- \subsection[##1]{##1}%
- }{%
- \subsection*{##1}%
- \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
- \begingroup
- \Iftocfeature{\@currext}{totoc}{%
- \expandafter\addxcontentsline\expandafter{\ext@toc}%
- {subsection}{##1}%
- }{}%
- \c@secnumdepth=-\maxdimen
- \subsectionmark{##1}%
- \endgroup
- \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
- }%
- }{%
- \Iftocfeature{\@currext}{numbered}{%
- \section[##1]{##1}%
- }{%
- \section*{##1}%
- \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
- \begingroup
- \Iftocfeature{\@currext}{totoc}{%
- \expandafter\addxcontentsline\expandafter{\ext@toc}%
- {section}{##1}%
- }{}%
- \@ifundefined{@mkdouble}{%
- \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}%
- }{%
- \@mkdouble{\MakeMarkcase{##1}}%
- }%
- \endgroup
- \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
- }%
- }%
- }%
- }{%
- \expandafter\def\csname tocbasic@listhead@\@currext\endcsname##1{%
- \Iftocfeature{\@currext}{leveldown}{%
- \Iftocfeature{\@currext}{numbered}{%
- \section{##1}%
- }{%
- \Iftocfeature{\@currext}{totoc}{%
- \@ifundefined{addsec}{%
- \section*{##1}%
- \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
- \begingroup
- \@ifundefined{@mkright}{%
- \IfActiveMkBoth{\markright{\MakeMarkcase{##1}}}{}%
- }{%
- \@mkright{\MakeMarkcase{##1}}%
- }%
- \expandafter\addxcontentsline\expandafter{\ext@toc}%
- {section}{##1}%
- \endgroup
- \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
- }{%
- \addsec{##1}%
- }%
- }{%
- \section*{##1}%
- \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
- \begingroup
- \@ifundefined{addsecmark}{%
- \c@secnumdepth=-\maxdimen
- \sectionmark{##1}%
- }{%
- \addsecmark{##1}%
- }%
- \endgroup
- \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
- }%
- }%
- }{%
- \Iftocfeature{\@currext}{numbered}{%
- \chapter[##1]{##1}%
- }{%
- \chapter*{##1}%
- \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
- \begingroup
- \@ifundefined{@mkdouble}{%
- \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}%
- }{%
- \@mkdouble{\MakeMarkcase{##1}}%
- }%
- \Iftocfeature{\@currext}{totoc}{%
- \expandafter\addxcontentsline\expandafter{\ext@toc}%
- {chapter}{##1}%
- }{}%
- \endgroup
- \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
- }%
- }%
- }%
- }%
- }{}%
- \csname tb@@beforehead@hook\endcsname
- \csname tb@\@currext @beforehead@hook\endcsname
- \csname tocbasic@listhead@\@currext\endcsname{#1}%
- \csname tb@\@currext @afterhead@hook\endcsname
- \csname tb@@afterhead@hook\endcsname
-}
-% \end{macrocode}
-% \begin{command}{\BeforeTOCHead,\AfterTOCHead}
-% \changes{v3.04b}{2010/01/05}{fix: define the hook if not already defined}
-% \changes{v3.06}{2010/06/09}{fix: using \cs{@ifundefined} instead of
-% undefined \cs{scr@ifundefinedorrelax}}
-% \changes{v3.26}{2018/08/10}{message moved to \texttt{trace}}
-% These are the commands to add code to the general or individual hooks. If
-% the first, optional argument was given, the second, mandatory argument
-% will be added to the individual hook, otherwise the general hook will be
-% extended.
-% \begin{macrocode}
-\newcommand{\BeforeTOCHead}[2][]{%
- \@ifundefined{tb@#1@beforehead@hook}{%
-%<trace> \PackageInfo{tocbasic}{defining new hook before heading of `#1'}%
- \expandafter\global\expandafter\let\csname tb@#1@beforehead@hook\endcsname
- \@empty
- }{}%
- \expandafter\g@addto@macro\csname tb@#1@beforehead@hook\endcsname{#2}%
-}
-\newcommand{\AfterTOCHead}[2][]{%
- \@ifundefined{tb@#1@afterhead@hook}{%
-%<trace> \PackageInfo{tocbasic}{defining new hook after heading of `#1'}%
- \expandafter\global\expandafter\let\csname tb@#1@afterhead@hook\endcsname
- \@empty
- }{}%
- \expandafter\g@addto@macro\csname tb@#1@afterhead@hook\endcsname{#2}%
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-% \end{macro}
-%
-% \begin{command}{\MakeMarkcase}
-% Use upper-case or not?
-% \begin{macrocode}
-%<*exit>
-\AtBeginDocument{%
- \@ifundefined{MakeMarkcase}{%
- \scr@ifundefinedorrelax{KOMAClassName}{%
- \let\MakeMarkcase\MakeUppercase
- }{%
- \let\MakeMarkcase\@firstofone
- }%
- }{}%
-}
-%</exit>
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\deftocheading}
-% Define a toc headings command with one argument (the title).
-% \begin{macrocode}
-%<*body>
-\newcommand*{\deftocheading}[1]{%
- \@namedef{tocbasic@listhead@#1}##1}
-% \end{macrocode}
-% \end{command}
-%
-% \begin{command}{\setuptoc,\unsettoc}
-% \changes{v3.26}{2018/08/29}{using \cs{scr@trim@spaces} instead of
-% \cs{tb@@sp@def}}
-% Known features are:
-% \begin{description}
-% \item[\opt{totoc}] writes the title of the list of to the table of
-% contents
-% \item[\opt{numberline}] redefines \cs{nonumberline} to use
-% \cs{numberline}
-% \item[\opt{numbered}] uses a numbered headings for the list of
-% \item[\opt{leveldown}] uses not the top level heading (e.\,g.,
-% \cs{chapter} with book) but the first sub level (e.\,g., \cs{section} with
-% book).
-% \item[\opt{nobabel}] prevents the extension to be added to the babel
-% handling of toc-files. To make this work, you have to set the feature
-% before adding the extension to the list of known extension.
-% \item[\opt{noprotrusion}] prevents disabling character protrusion at
-% the toc.
-% \end{description}
-% Other features may be package dependent. You may test the feature using:
-% \begin{quote}
-% \cs{@ifundefined}\texttt{\{tocbasic@\meta{toc}@feature@\meta{feature}\}}\\
-% \phantom{\cs{@ifundefined}}\marg{do if feature not set}\\
-% \phantom{\cs{@ifundefined}}\marg{do if feature set}
-% \end{quote}
-% See \cs{tocbasic@listhead} for an example of this.
-% \begin{macrocode}
-\newcommand*{\setuptoc}[2]{%
- \@for\@tempa:=#2\do{%
- \scr@trim@spaces\@tempa
- \@namedef{tocbasic@#1@feature@\@tempa}{}%
- }%
-}
-\newcommand*{\unsettoc}[2]{%
- \@for\@tempa:=#2\do{%
- \scr@trim@spaces\@tempa
- \expandafter\let\csname tocbasic@#1@feature@\@tempa\endcsname\relax
- }%
-}
-% \end{macrocode}
-% Do not add the files, that babel handles by default.
-% \begin{macrocode}
-\setuptoc{toc}{nobabel}
-\setuptoc{lof}{nobabel}
-\setuptoc{lot}{nobabel}
-% \end{macrocode}
-% \begin{command}{\Iftocfeature,\iftocfeature}
-% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} renamed to \cs{Iftocfeature}}
-% We need a test for the features
-% \begin{macrocode}
-\providecommand*{\iftocfeature}{%
- \PackageWarning{tocbasic}{Usage of deprecated command
- `\string\iftocfeature'.\MessageBreak
- The command has been renamed because of a\MessageBreak
- recommendation of The LaTeX Project Team.\MessageBreak
- Please replace `\string\iftocfeature' by `\string\Iftocfeature'%
- }%
- \Iftocfeature
-}
-\newcommand*{\Iftocfeature}[2]{%
- \scr@ifundefinedorrelax{tocbasic@#1@feature@#2}{%
- \expandafter\@secondoftwo
- }{%
- \expandafter\@firstoftwo
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-% \end{command}
-%
-% \begin{command}{\tocbasicautomode}
-% \changes{v1.0a}{2008/11/11}{use of \cs{addtotoclist} instead of
-% internal}
-% \changes{v3.07a}{2010/11/25}{fix: added missing
-% \cs{let}\cs{@starttoc}\cs{tocbasic@starttoc}}
-% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} replaced by
-% \cs{Ifattoclist}}
-% \pkg*{tocbasic} can overtake \cs{@starttoc} to automaticly add all
-% used extensions to the list of known extensions and use
-% \cs{tocbasic@starttoc} instead of \cs{@starttoc} from \LaTeX{}
-% kernel. Please note, that we don't need a fix for the unfriendly
-% redefinition of \cs{@starttoc} by \pkg{hyperref}, because hyperref
-% does it only at the first \LaTeX{} run. So this action of \pkg{hyperref}
-% may only result in the need of one more \LaTeX{} run, but not in a permanent
-% mistake.
-% \begin{macrocode}
-%<*body>
-\newcommand*{\tocbasicautomode}{%
- \let\tb@saved@starttoc\@starttoc
- \let\@starttoc\tocbasic@starttoc
- \BeforeStartingTOC{%
- \let\@starttoc\tb@saved@starttoc
- \expandafter\Ifattoclist\expandafter{\@currext}{}{%
- \addtotoclist[tocbasicautomode]{\@currext}%
- }%
- }%
-}
-%</body>
-% \end{macrocode}
-% \end{command}
-%
-%
-% \subsection{High level interface for generating new ToCs and floats}
-% \label{sec:newfloats}
-%
-% \begin{command}{\DeclareNewTOC}
-% \changes{v3.06}{2010/06/01}{added}
-% \changes{v3.18}{2015/06/20}{\cs{tb@nt@types} and \cs{tb@nt@listname} are
-% initialised \cs{relax}}
-% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}
-% \changes{v3.26a}{2018/12/30}{fixed usage of \cs{kernel@ifnextchar}}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% This command defines only a new TOC and a new caption command for this
-% TOC. It does not define a new foat unless option float was set! It does
-% not define a new nonfloat unless option nonfloat was set! The optional
-% argument is used to set up several settings using \pkg{keyval}. The
-% mandatory argument is the shortcut. The default type is the shortcut.
-% The extension is the shortcut. The default owner is ``\texttt{float}''.
-% \begin{macrocode}
-%<*body>
-\DefineFamily{KOMAarg}
-\DefineFamilyMember[.toc]{KOMAarg}
-\newcommand*{\DeclareNewTOC}[2][]{%
- \newif\iftb@nt@float
- \newif\iftb@nt@nonfloat
- \newif\iftb@nt@forcenames
- \def\tb@nt@floattype{\tb@nt@autofloattype}%
- \def\tb@nt@floatpos{tbp}%
- \def\tb@nt@ext{#2}%
- \edef\tb@nt@type{#2}%
- \let\tb@nt@types\relax
- \def\tb@nt@owner{float}%
- \def\tb@nt@name{\expandafter\protect\expandafter\MakeUppercase\tb@nt@type}%
- \let\tb@nt@listname\relax
- \let\tb@nt@counterwithin\@empty
- \let\tb@nt@atbegin\@empty
- \let\tb@nt@atend\@empty
- \def\tb@nt@tocentrystyle{default}%
-% \end{macrocode}
-% \changes{v3.20}{2016/04/29}{need more initialization for empty optional
-% argument}
-% \begin{macrocode}
- \def\tb@nt@tocstyle@options{level=1}%
- \IfArgIsEmpty{#1}{%
-% \end{macrocode}
-% Also need to call the style init code, to set the defaults for options
-% \opt{numwidth} and \opt{indent}.
-% \begin{macrocode}
- \begingroup
- \let\scr@dte@current\tb@nt@type
- \@ExecuteTOCEntryStyleInitCode{\tb@nt@tocentrystyle}{\tb@nt@type}%
- \def\do@endgroup{\endgroup}%
- \def\do##1{%
- \Ifstr{##1}{numwidth}{%
- \l@addto@macro\do@endgroup{%
- \l@addto@macro{\tb@nt@tocstyle@options}{,numwidth=1.5em}%
- }%
- }{%
- \Ifstr{##1}{indent}{%
-%<trace> \PackageInfo{tocbasic}{%
-%<trace> TRACE \string\DeclareNewTOC[...]{#2}:
-%<trace> set default indent 1em}%
- \l@addto@macro\do@endgroup{%
- \l@addto@macro{\tb@nt@tocstyle@options}{,indent=1em}%
- }%
- }{}%
- }%
- \kernel@ifnextchar[%]
- {\@dodefault}%
- {}%
- }%
- \def\@dodefault[##1]{}%
- \scr@dte@doopts
- \do@endgroup
- }{%
- \let\tb@nt@extra@relax@opts\@empty
-% \end{macrocode}
-% After initialisation of the local values we need to know the style of the
-% toc entry, to define style dependend options.
-% \begin{macro}{\tb@nt@type}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% The type of list is used for environment and counter names and as part of
-% several internal and user macros. It is needed before defining the style
-% dependend options. So we use a first run to set it up.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{type}{%
- \tb@ifvalueisnotempty{##1}{\edef\tb@nt@type{##1}}%
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tb@nt@tocentrystyle}
-% \changes{v3.20}{2015/12/16}{added}
-% The style of the toc entry. It is needed before defining the style
-% dependend options. So we use a first run to set it up.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{tocentrystyle}[default]{%
- \IfArgIsEmpty{##1}{%
- \edef\tb@nt@tocentrystyle{##1}%
- \FamilyKeyStateProcessed
- }{%
- \scr@ifundefinedorrelax{scr@dte@def@l@##1}{%
- \FamilyKeyStateUnknownValue
- }{%
- \edef\tb@nt@tocentrystyle{##1}%
- \FamilyKeyStateProcessed
- }%
- }%
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tb@nt@ext}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% \changes{v3.25}{2017/11/20}{moved to pass 1}
-% Don't tell the user, that the mandatory argument of the command may be
-% overloaded by this option. This was only done to simplify the definition.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{extension}{%
- \tb@ifvalueisnotempty{##1}{\edef\tb@nt@ext{##1}}%
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tb@nt@owner}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% \changes{v3.26}{2018/06/09}{moved to pass 1}
-% \changes{v3.27}{2019/05/12}{\opt{category} is a synonym for \opt{owner}}
-% The owner of the new list extension.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{owner}{%
- \tb@ifvalueisnotempty{##1}{\edef\tb@nt@owner{##1}}%
- }%
- \DefineFamilyKey[.toc]{KOMAarg}{category}{%
- \tb@ifvalueisnotempty{##1}{\edef\tb@nt@owner{##1}}%
- }%
-% \end{macrocode}
-% \end{macro}
-% After this we define pseudo option \opt{@else@} to ignore all currently
-% not needed options. After this we do the first option execution run.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{@else@}{\FamilyKeyStateProcessed}%
- \FamilyExecuteOptions[.toc]{KOMAarg}{#1}%
- \RelaxFamilyKey[.toc]{KOMAarg}{@else@}%
-% \end{macrocode}
-% \changes{v3.26}{2018/06/09}{add extension already after first pass}
-% First of all, every TOC needs an extension, that should be added to the
-% list of known extensions. This has to be done also, if no options has been
-% given!
-% \begin{macrocode}
- }%
- \expandafter\newcommand\csname ext@\tb@nt@type\endcsname{}%
- \expandafter\let\csname ext@\tb@nt@type\endcsname\tb@nt@ext
- \addtotoclist[\tb@nt@owner]{\csname ext@\tb@nt@type\endcsname}%
- \IfArgIsEmpty{#1}{}{%
-% \end{macrocode}
-% For the second option pass we do not need to set up these options
-% again. So define it as no-opt.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{type}{\FamilyKeyStateProcessed}%
- \DefineFamilyKey[.toc]{KOMAarg}{tocentrystyle}{\FamilyKeyStateProcessed}%
- \DefineFamilyKey[.toc]{KOMAarg}{extension}{\FamilyKeyStateProcessed}%
- \DefineFamilyKey[.toc]{KOMAarg}{category}{\FamilyKeyStateProcessed}%
-% \end{macrocode}
-% \changes{v3.20}{2015/12/16}{defining toc style depending options}
-% \changes{v3.20}{2016/06/12}{using prefix \opt{tocentry} instead of
-% \opt{toc}}
-% \changes{v3.27}{2019/10/02}{additional \opt{:}-options}
-% If the toc style is empty we won't define any \cs{l@\dots}. Otherwise we
-% need to define additional options.
-% \begin{macrocode}
- \Ifstr{\tb@nt@tocentrystyle}{}{}{%
- \begingroup
- \let\scr@dte@current\tb@nt@type
- \@ExecuteTOCEntryStyleInitCode{\tb@nt@tocentrystyle}{\tb@nt@type}%
- \def\do@endgroup{\endgroup}%
- \def\do##1{%
- \l@addto@macro\do@endgroup{%
- \l@addto@macro\tb@nt@extra@relax@opts{%
- \RelaxFamilyKey[.toc]{KOMAarg}{toc##1}%
- \RelaxFamilyKey[.toc]{KOMAarg}{tocentry##1}%
- \RelaxFamilyKey[.toc]{KOMAarg}{tocentry##1:}%
- }%
- }%
- \kernel@ifnextchar[%]
- {\@dodefault{##1}}%
- {\@donodefault{##1}}%
- }%
- \def\@donodefault##1{%
- \l@addto@macro\do@endgroup{%
- \DefineFamilyKey[.toc]{KOMAarg}{toc##1}{%
- \PackageWarning{tocbasic}{you should use `tocentry##1'
- instead\MessageBreak
- of `toc##1'}%
- \l@addto@macro{\tb@nt@tocstyle@options}{,##1={####1}}%
- \FamilyKeyStateProcessed
- }%
- \DefineFamilyKey[.toc]{KOMAarg}{tocentry##1}{%
- \l@addto@macro{\tb@nt@tocstyle@options}{,##1={####1}}%
- \FamilyKeyStateProcessed
- }%
- \DefineFamilyKey[.toc]{KOMAarg}{tocentry##1:}{%
- \l@addto@macro{\tb@nt@tocstyle@options}{,##1:={####1}}%
- }%
- }%
- }%
- \def\@dodefault##1[##2]{%
- \l@addto@macro\do@endgroup{%
- \DefineFamilyKey[.toc]{KOMAarg}{toc##1}[##2]{%
- \PackageWarning{tocbasic}{you should use `tocentry##1'
- instead\MessageBreak
- of `toc##1'}%
- \l@addto@macro{\tb@nt@tocstyle@options}{,##1={####1}}%
- \FamilyKeyStateProcessed
- }%
- \DefineFamilyKey[.toc]{KOMAarg}{tocentry##1}[##2]{%
- \l@addto@macro{\tb@nt@tocstyle@options}{,##1={####1}}%
- \FamilyKeyStateProcessed
- }%
- \DefineFamilyKey[.toc]{KOMAarg}{tocentry##1:}{%
- \l@addto@macro{\tb@nt@tocstyle@options}{,##1:={####1}}%
- }%
- }%
- }%
- \scr@dte@doopts
- \do@endgroup
- }%
-% \end{macrocode}
-% After this, we need to define all the other options and do the real option
-% execution.
-% \begin{macro}{\tb@nt@atbegin}
-% \changes{v3.09}{2011/03/01}{new optional identifier \opt{atbegin}}
-% \changes{v3.11c}{2013/02/01}{\opt{atbegin} argument may be empty}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% Additional code executed at the begin of a new defined environment.
-% \begin{macrocode}
- \FamilyStringKey[.toc]{KOMAarg}{atbegin}{\tb@nt@atbegin}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tb@nt@atend}
-% \changes{v3.09}{2011/03/01}{new optional identifier \opt{atbend}}
-% \changes{v3.11c}{2013/02/01}{\opt{atend} argument may be empty}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% Additional code executed at the end of a new defined environment.
-% \begin{macrocode}
- \FamilyStringKey[.toc]{KOMAarg}{atend}{\tb@nt@atend}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tb@nt@counterwithin}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% If a counter will be defined, this counter may depend on another counter
-% (like figure counter depends on chapter counter at book classes). If the
-% value is empty, the counter does not depend on any other counter.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{counterwithin}{%
- \edef\tb@nt@counterwithin{##1}\FamilyKeyStateProcessed
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\iftb@nt@float}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% \changes{v3.06}{2010/06/01}{added}
-% This boolean indicates, that float environments should also be defined.
-% \begin{macrocode}
- \FamilyBoolKey[.toc]{KOMAarg}{float}{tb@nt@float}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tb@nt@floatpos}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% Simply the value for the |\fps@...| macro.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{floatpos}{%
- \tb@ifvalueisnotempty{##1}{\edef\tb@nt@floatpos{##1}}%
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tb@nt@floattype}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% Simply the value for the |\ftype@...| macro. It has to be
-% $1<=\textrm{value}<=31$.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{floattype}{%
- \FamilySetCounterMacro{KOMAarg}{floattype}{\reserved@d}{##1}%
- \ifx\FamilyKeyState\FamilyKeyStateProcessed
- \ifnum 0=
- \ifnum\reserved@d<1 0 \else\ifnum\reserved@d>31 0 \else 1 \fi\fi
- \FamilyKeyStateUnknownValue
- \else
- \let\tb@nt@floattype\reserved@d
- \fi
- \fi
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\iftb@nt@forcenames}
-% \changes{v3.06}{2010/06/01}{added}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% The |\...name| commands will only be defined, if they are not already
-% defined. But some users may want to define their own names even if there
-% are already definitions. So this boolean option may switch to force the
-% definition.
-% \begin{macrocode}
- \FamilyBoolKey[.toc]{KOMAarg}{forcenames}{tb@nt@forcenames}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}[noprint]{\tb@nt@hang}
-% \changes{v3.20}{2015/12/16}{removed}
-% \end{macro}
-% 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}
- \DefineFamilyKey[.toc]{KOMAarg}{hang}{%
- \scr@ifundefinedorrelax{KV@KOMAarg.toc@tocnumwidth}{%
- \PackageWarning{tocbasic}{%
- deprecated option `hang'.\MessageBreak
- Option will be ignored, because toc entry style\MessageBreak
- `\tb@nt@tocentrystyle' does not provide option `numwidth'%
- }%
- }{%
- \PackageWarning{tocbasic}{%
- deprecated option `hang'.\MessageBreak
- You should replace option `hang' by option\MessageBreak
- `tocentrynumwidth'%
- }%
- \l@addto@macro\tb@nt@tocstyle@options{,numwidth={##1}}%
- }%
- \FamilyKeyStateProcessed
- }%
- \scr@ifundefinedorrelax{KV@KOMAarg.toc@tocnumwidth}{}{%
- \l@addto@macro\tb@nt@tocstyle@options{,numwidth=1.5em}%
- }%
-% \end{macrocode}
-% \begin{macro}[noprint]{\tb@nt@indent}
-% \changes{v3.20}{2015/12/16}{removed}
-% \end{macro}
-% 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}
- \DefineFamilyKey[.toc]{KOMAarg}{indent}{%
- \scr@ifundefinedorrelax{KV@KOMAarg.toc@tocindent}{%
- \PackageWarning{tocbasic}{%
- deprecated option `indent'.\MessageBreak
- Option will be ignored, because toc entry style\MessageBreak
- `\tb@nt@tocentrystyle' does not provide option `indent'%
- }%
- }{%
- \PackageWarning{tocbasic}{%
- deprecated option `indent'.\MessageBreak
- You should replace option `indent' by option\MessageBreak
- `tocentryindent'%
- }%
- \l@addto@macro\tb@nt@tocstyle@options{,indent={##1}}%
- }%
- \FamilyKeyStateProcessed
- }%
- \scr@ifundefinedorrelax{KV@KOMAarg.toc@tocindent}{}{%
-%<trace> \PackageInfo{tocbasic}{%
-%<trace> TRACE \string\DeclareNewTOC[...]{#2}: set default indent 1em}%
- \l@addto@macro\tb@nt@tocstyle@options{,indent=1em}%
- }%
-% \end{macrocode}
-% \begin{macro}[noprint]{\tb@nt@level}
-% \changes{v3.20}{2015/12/16}{removed}
-% \end{macro}
-% \changes{v3.30}{2020/02/25}{spurious space in warning message removed}
-% Each entry to a TOC/list of has a numeric level. You may set up your own
-% level.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{level}{%
- \PackageWarning{tocbasic}{%
- deprecated option `level'.\MessageBreak
- You should replace option `level' by option\MessageBreak
- `tocentrylevel'%
- }%
- \l@addto@macro\tb@nt@tocstyle@options{,level={##1}}%
- \FamilyKeyStateProcessed
- }%
-% \end{macrocode}
-% \begin{macro}{\tb@nt@listname}
-% \changes{v3.18}{2015/06/20}{using \cs{def} instead of \cs{edef}}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% The list itself has a heading. A |\list<type>name| will also be defined.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{listname}{%
- \tb@ifvalueisnotempty{##1}{\def\tb@nt@listname{##1}}%
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tb@nt@name}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% We need a name/term for the entries of the new list. This may e.\,g. be used
-% for |caption| output. A |\<type>name| will also be defined.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{name}{%
- \tb@ifvalueisnotempty{##1}{\edef\tb@nt@name{##1}}%
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\iftb@nt@nonfloat}
-% \changes{v3.06}{2010/06/01}{added}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% This boolean indicates, that non-float environment should also be
-% defined. The environment has the postfix ``-''.
-% \begin{macrocode}
- \FamilyBoolKey[.toc]{KOMAarg}{nonfloat}{tb@nt@nonfloat}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tb@nt@types}
-% \changes{v3.20}{2015/12/16}{locally valid only}
-% Sometimes the plural of the type is needed and may be defined by a
-% seperate option.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{types}{%
- \tb@ifvalueisnotempty{##1}{\edef\tb@nt@types{##1}}%
- }%
-% \end{macrocode}
-% \end{macro}
-% \changes{v3.25}{2017/11/20}{option \opt{setup} added}
-% The new option \opt{setup} allowes to setup ToC features provided by
-% \cs{setuptoc}. Note, currently there is no test whether or not a feature
-% does exist!
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{setup}{%
- \setuptoc\tb@nt@ext{##1}%
- }%
-% \end{macrocode}
-% \changes{v3.25}{2017/11/20}{option \opt{unset} added}
-% The new option \opt{unset} allowes to unset ToC features provided
-% by \cs{unsettoc}. Note, currently there is no test whether or not a
-% feature does exist!
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{unset}{%
- \unsettoc\tb@nt@ext{##1}%
- }%
-% \end{macrocode}
-% Last but not least we have to execute the options and reset the option
-% definitions.
-% \changes{v3.25}{2017/09/27}{\opt{nonfloat} fixed}
-% \changes{v3.26}{2018/06/09}{added missing reset of \opt{unset} and
-% \opt{setup}}
-% \begin{macrocode}
- \FamilyExecuteOptions[.toc]{KOMAarg}{#1}%
- \RelaxFamilyKey[.toc]{KOMAarg}{unset}%
- \RelaxFamilyKey[.toc]{KOMAarg}{setup}%
- \RelaxFamilyKey[.toc]{KOMAarg}{types}%
- \RelaxFamilyKey[.toc]{KOMAarg}{nonfloat}%
- \RelaxFamilyKey[.toc]{KOMAarg}{name}%
- \RelaxFamilyKey[.toc]{KOMAarg}{listname}%
- \RelaxFamilyKey[.toc]{KOMAarg}{level}%
- \RelaxFamilyKey[.toc]{KOMAarg}{indent}%
- \RelaxFamilyKey[.toc]{KOMAarg}{hang}%
- \RelaxFamilyKey[.toc]{KOMAarg}{forcenames}%
- \RelaxFamilyKey[.toc]{KOMAarg}{floatpos}%
- \RelaxFamilyKey[.toc]{KOMAarg}{float}%
- \RelaxFamilyKey[.toc]{KOMAarg}{counterwithin}%
- \RelaxFamilyKey[.toc]{KOMAarg}{atend}%
- \RelaxFamilyKey[.toc]{KOMAarg}{atbegin}%
- \tb@nt@extra@relax@opts
- \RelaxFamilyKey[.toc]{KOMAarg}{category}%
- \RelaxFamilyKey[.toc]{KOMAarg}{owner}%
- \RelaxFamilyKey[.toc]{KOMAarg}{extension}%
- \RelaxFamilyKey[.toc]{KOMAarg}{tocentrystyle}%
- \RelaxFamilyKey[.toc]{KOMAarg}{type}%
- }%
-% \end{macrocode}
-% We save the type of the extension at \cs{tb@nt@type@\meta{extension}}
-% for later usage.
-% \begin{macrocode}
- \expandafter\let\csname tb@nt@type@\tb@nt@ext\endcsname\tb@nt@type
-% \end{macrocode}
-% Then we need the TOC itself with a name:
-% \changes{v3.25}{2017/10/10}{use \cs{ext@\dots} instead of the extension
-% itself in definition of \cs{listof\dots}}
-% \begin{macrocode}
- \scr@ifundefinedorrelax{tb@nt@types}{%
- \edef\tb@nt@types{\tb@nt@type s}%
- }{}%
- \scr@ifundefinedorrelax{tb@nt@listname}{%
- \protected@edef\tb@nt@listname{List of \protect\MakeUppercase\tb@nt@types}%
- }{}%
- \@ifundefined{\tb@nt@type name}{%
- \expandafter\protected@edef\csname \tb@nt@type name\endcsname{\tb@nt@name}%
- }{%
- \iftb@nt@forcenames
- \expandafter\protected@edef\csname \tb@nt@type name\endcsname
- {\tb@nt@name}%
- \fi
- }%
- \@ifundefined{list\tb@nt@type name}{%
- \expandafter\let\csname list\tb@nt@type name\endcsname\tb@nt@listname
- }{%
- \iftb@nt@forcenames
- \expandafter\let\csname list\tb@nt@type name\endcsname\tb@nt@listname
- \fi
- }%
- \expandafter\newcommand\csname listof\tb@nt@ext name\expandafter\endcsname
- \expandafter{\csname list\tb@nt@type name\endcsname}%
- \begingroup\edef\@tempa{\endgroup
- \noexpand\newcommand*\csname listof\tb@nt@types\endcsname{%
- \noexpand\listoftoc{%
- \expandafter\noexpand\csname ext@\tb@nt@type\endcsname}%
- }%
- }\@tempa
-% \end{macrocode}
-% The list entry:
-% \changes{v3.20}{2016/04/05}{warning if \cs{l@\dots} is undefined}
-% \begin{macrocode}
- \Ifstr{\tb@nt@tocentrystyle}{}{%
- \@ifundefined{l@\tb@nt@type}{%
- \PackageWarning{tocbasic}{%
- \expandafter\string\csname l@\tb@nt@type\endcsname\space
- undefined!\MessageBreak
- I hope you know, what you are doing, but\MessageBreak
- maybe it would be better to use proper\MessageBreak
- `tocentrystyle' settings%
- }%
- }{}%
- }{%
- \edef\reserved@a{%
- \noexpand\DeclareTOCStyleEntry[%
- {\unexpanded\expandafter{\tb@nt@tocstyle@options}}%
- ]{\tb@nt@tocentrystyle}{\tb@nt@type}%
- }%
- \reserved@a
- }%
-% \end{macrocode}
-% \changes{v3.12}{2013/05/03}{fixed: definition of
-% \cs{listof\meta{type}entryname} added as explained in the manual}
-% \begin{macrocode}
- \@ifundefined{listof\tb@nt@ext entryname}{%
- \expandafter\let\csname listof\tb@nt@ext entryname\endcsname\tb@nt@name
- }{}%
-% \end{macrocode}
-% The setup command:
-% \begin{macrocode}
- \begingroup\edef\@tempa{\endgroup
- \noexpand\newcommand*\csname setup\tb@nt@types\endcsname{%
- \noexpand\setuptoc{\tb@nt@ext}%
- }%
- }\@tempa
- \@tempswafalse
-% \end{macrocode}
-% 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}
-% \begin{macrocode}
- \iftb@nt@float
- \expandafter\newcommand\expandafter*\csname fps@\tb@nt@type\expandafter
- \endcsname\expandafter{\tb@nt@floatpos}%
- \expandafter\newcommand\expandafter*\csname ftype@\tb@nt@type\expandafter
- \endcsname\expandafter{\tb@nt@floattype}%
- \begingroup
- \edef\@tempa{%
- \noexpand\endgroup
- \noexpand\newenvironment{\tb@nt@type}{%
- \noexpand\kernel@ifnextchar[%]
- {\noexpand\tb@atbegin@after\noexpand\@float{\tb@nt@type}}%
- {\noexpand\edef\noexpand\reserved@a{%
- \noexpand\noexpand\noexpand\tb@atbegin@after
- \noexpand\noexpand\noexpand\@float{\tb@nt@type}%
- [\noexpand\csname fps@\tb@nt@type\noexpand\endcsname]}%
- \noexpand\reserved@a}%
- }{%
- \noexpand\csname \tb@nt@type @atend\noexpand\endcsname
- \noexpand\end@float
- }%
- \noexpand\newenvironment{\tb@nt@type*}{%
- \noexpand\kernel@ifnextchar[%]
- {\noexpand\tb@atbegin@after\noexpand\@dblfloat{\tb@nt@type}}%
- {\noexpand\edef\noexpand\reserved@a{%
- \noexpand\noexpand\noexpand\tb@atbegin@after
- \noexpand\noexpand\noexpand\@dblfloat{\tb@nt@type}%
- [\noexpand\csname fps@\tb@nt@type\noexpand\endcsname]}%
- \noexpand\reserved@a}%
- }{%
- \noexpand\csname \tb@nt@type @atend\noexpand\endcsname
- \noexpand\end@dblfloat
- }%
- }%
- \@tempa
- \@tempswatrue
- \fi
-% \end{macrocode}
-% The nonfloat environment:
-% \begin{macrocode}
- \iftb@nt@nonfloat
- \begingroup
- \edef\@tempa{%
- \noexpand\endgroup
- \noexpand\newenvironment{\tb@nt@type-}{%
- \noexpand\trivlist\noexpand\item\noexpand\relax
- \noexpand\minipage{\noexpand\linewidth}%
- \noexpand\def\noexpand\@captype{\tb@nt@type}%
- \noexpand\csname \tb@nt@type @atbegin\noexpand\endcsname
- }{%
- \noexpand\csname \tb@nt@type @atend\noexpand\endcsname
- \noexpand\endminipage\noexpand\endtrivlist
- }%
- }%
- \@tempa
- \@tempswatrue
- \fi
-% \end{macrocode}
-% The counter and hooks of float and nonfloat environments:
-% \changes{v3.10b}{2012/04/04}{\cs{noexpand} added to fix problems using
-% \cs{autodot}}
-% \changes{v3.13}{2014/07/31}{add \cs{autodot} only to hierachical
-% counters}
-% \changes{v3.35}{2021/10/12}{ignore \opt{counterwithin} if it is
-% ``\texttt{chapter}'' resp. ``\texttt{section}'' and \cs{ifmainmatter} is
-% not \cs{iffalse} and the counterwithin counter is < 1}
-% \begin{macrocode}
- \if@tempswa
- \@ifundefined{c@\tb@nt@type}{%
- \newcounter{\tb@nt@type}%
- }{%
- \PackageWarning{tocbasic}{using already defined counter `\tb@nt@type'}%
- }%
- \ifx\tb@nt@counterwithin\@empty\else
- \@addtoreset{\tb@nt@type}{\tb@nt@counterwithin}%
- \begingroup
- \def\reserved@c{section}%
- \@ifundefined{chapter}{}{%
- \@ifundefined{c@chapter}{}{%
- \@ifundefined{l@chapter}{}{%
- \def\reserved@c{chapter}}}}%
- \expandafter\Ifstr\expandafter{\reserved@c}{\tb@nt@counterwithin}{%
- \edef\@tempa{%
- \noexpand\endgroup
- \noexpand\renewcommand*\expandafter\noexpand
- \csname the\tb@nt@type\endcsname{%
- \unexpanded{%
- \expandafter\ifx\csname ifmainmatter\expandafter\endcsname
- \csname iffalse\endcsname\else
- }%
- \noexpand\ifnum
- \expandafter\noexpand\csname c@\tb@nt@counterwithin\endcsname
- >\noexpand\z@
- \expandafter\noexpand\csname the\tb@nt@counterwithin\endcsname
- .%
- \noexpand\fi
- \noexpand\fi
- \noexpand\arabic{\tb@nt@type}%
- }%
- }%
- }{%
- \edef\@tempa{%
- \noexpand\endgroup
- \noexpand\renewcommand*\expandafter\noexpand
- \csname the\tb@nt@type\endcsname{%
- \expandafter\noexpand\csname the\tb@nt@counterwithin\endcsname
- .%
- \noexpand\arabic{\tb@nt@type}%
- }%
- }%
- }%
- \@tempa
- \fi
- \begingroup
- \edef\@tempa{%
- \noexpand\endgroup
- \noexpand\newcommand*\expandafter\noexpand
- \csname \tb@nt@type format\endcsname{%
- \expandafter\noexpand\csname \tb@nt@type name\endcsname
- \noexpand\nobreakspace
- \expandafter\noexpand\csname the\tb@nt@type\endcsname
- \ifx\tb@nt@counterwithin\@empty\else
- \noexpand\csname autodot\endcsname
- \fi
- }%
- \noexpand\newcommand*\expandafter\noexpand
- \csname fnum@\tb@nt@type\endcsname{%
- \expandafter\noexpand\csname \tb@nt@type format\endcsname
- }%
- }%
- \@tempa
- \expandafter\newcommand\expandafter*\csname \tb@nt@type @atbegin\expandafter
- \endcsname\expandafter{\tb@nt@atbegin}%
- \expandafter\newcommand\expandafter*\csname \tb@nt@type @atend\expandafter
- \endcsname\expandafter{\tb@nt@atend}%
- \fi
-}
-% \end{macrocode}
-% \begin{macro}{\tb@atbegin@after}
-% \changes{v3.09a}{2011/05/30}{added}
-% Processes command \#1 with argument \#2 and optional argument \#3 and than
-% \verb|\csname #2@atbegin\endcsname|. This is used to add
-% \verb|csname #2@atbegin\endcsname| at begin part of a float (but after
-% optional argument of the float).
-% \begin{macrocode}
-\newcommand*{\tb@atbegin@after}[3]{}
-\def\tb@atbegin@after#1#2[#3]{%
- #1{#2}[#3]%
- \csname #2@atbegin\endcsname
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tb@ifvalueisnotempty}
-% \changes{v3.06}{2010/05/21}{added}
-% \changes{v3.20}{2015/12/16}{simpler definition}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
-% This is only a helper for defining some of the keys.
-% \begin{macrocode}
-\newcommand*{\tb@ifvalueisnotempty}[1]{%
- \Ifstr{#1}{}{%
- \FamilyKeyStateUnknownValue
- \expandafter\@gobble
- }{%
- \FamilyKeyStateProcessed
- \expandafter\@firstofone
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}[noprint]{\tb@boolkey,\tb@dimkey,\tb@numkey}
-% \changes{v3.06}{2010/05/21}{added}
-% \changes{v3.20}{2015/12/16}{removed}
-% \end{macro}
-% \begin{macro}{\tb@nt@autofloattype}
-% \changes{v3.06}{2010/06/01}{added}
-% This macro saves the float type for auto generated float types.
-% \begin{macrocode}
-\newcommand*{\tb@nt@autofloattype}{16}
-%</body>
-% \end{macrocode}
-% \end{macro}
-% \end{command}
-%
-%
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-% \subsection{Loading the package}
-% Used at \KOMAScript{} packages and classes to load the package.
-% \begin{macrocode}
-%<*load>
-\RequirePackage{tocbasic}[%
-%!KOMAScriptVersion
-]
-%</load>
-% \end{macrocode}
-%
-%
-% \Finale
-% \PrintChanges
-%
-\endinput
-% Local Variables:
-% mode: doctex
-% ispell-local-dictionary: "en_US"
-% eval: (flyspell-mode 1)
-% TeX-master: t
-% TeX-engine: luatex-dev
-% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
-% End: