texlive[71479] Master: standardsectioning (7jun24)
commits+karl at tug.org
commits+karl at tug.org
Mon Jun 10 23:06:06 CEST 2024
Revision: 71479
https://tug.org/svn/texlive?view=revision&revision=71479
Author: karl
Date: 2024-06-10 23:06:06 +0200 (Mon, 10 Jun 2024)
Log Message:
-----------
standardsectioning (7jun24)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/libexec/ctan2tds
trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/standardsectioning/
trunk/Master/texmf-dist/doc/latex/standardsectioning/LICENSE.md
trunk/Master/texmf-dist/doc/latex/standardsectioning/README.md
trunk/Master/texmf-dist/doc/latex/standardsectioning/standardsectioning.pdf
trunk/Master/texmf-dist/source/latex/standardsectioning/
trunk/Master/texmf-dist/source/latex/standardsectioning/standardsectioning.dtx
trunk/Master/texmf-dist/tex/latex/standardsectioning/
trunk/Master/texmf-dist/tex/latex/standardsectioning/standardsectioning.sty
trunk/Master/tlpkg/tlpsrc/standardsectioning.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/standardsectioning/LICENSE.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/standardsectioning/LICENSE.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/standardsectioning/LICENSE.md 2024-06-10 21:06:06 UTC (rev 71479)
@@ -0,0 +1,19 @@
+----------------------------------------------------------------------------
+
+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 2005/12/01
+or later. This work has the LPPL maintenance status “maintained”.
+The current maintainer and author of this work is Markus Kohm.
+
+----------------------------------------------------------------------------
+
+Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
+in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
+Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
+Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
+oder später. Dieses Werk hat den LPPL-Verwaltungs-Status „maintained”
+Der aktuelle Verwalter und Autor dieses Werks ist Markus Kohm.
+
+----------------------------------------------------------------------------
Property changes on: trunk/Master/texmf-dist/doc/latex/standardsectioning/LICENSE.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/standardsectioning/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/standardsectioning/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/standardsectioning/README.md 2024-06-10 21:06:06 UTC (rev 71479)
@@ -0,0 +1,174 @@
+# Package `standardsectioning`
+
+Copyright © 2019–2024 Markus Kohm
+
+Release: 2024-06-06 v0.9
+
+License: LPPL 1.3c
+
+KOMA presents the `standardsectioning` micro package to force the usage of
+the sectioning command definition of the standard classes also when using
+other classes like the [KOMA-Script](https://www.ctan.org/pkg/koma-script)
+classes.
+
+----------------------------------------------------------------------------
+
+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.
+
+This work has the LPPL maintenance status "maintained".
+
+The Current Maintainer and author of this work is Markus Kohm.
+
+----------------------------------------------------------------------------
+
+# Abstract
+
+A long time ago [KOMA-Script](https://www.sourceforge.net/project/koma-script)
+was more or less just a collection of replacements for the three standard
+classes `article`, `book` and `report`. Replacing a standard class with a
+[KOMA-Script](https://www.sourceforge.net/project/koma-script) class was easy,
+even if users used a lot of additional packages. Over the years, KOMA has
+added many new features and user interfaces to the classes. This also led to
+completely different implementation of the sectioning commands. But some
+packages depend on an implementation similar to the standard classes.
+
+Package `standardsectioning` implements these commands with the code of the
+standard classes. If used with a KOMA-Script class, it also deactivates parts
+of the KOMA-Script user interface, which should not be used with these
+changes. These are more or less all commands to configure sectioning
+commands. It also undefines some internal macros of KOMA-Script.
+
+# Note
+
+Using package `standardsectioning` is only a kind of first-aid
+workaround. Usually it is better not to use the incompatible package with
+KOMA-Script similar classes.
+
+This package is also a replacement of the `standardsections.hak` of
+`scrhack` before version 3.42.
+
+# Installation for Users
+
+If you are a user, you should wait until the package has been added to your
+preferred TeX distribution. Then you can use the package manager of your TeX
+distribution to install all the packages.
+
+# Unpacking for Distributors
+
+Distributors should download [the distribution from
+CTAN](https://www.ctan.org/pkg/standardsectioning). This consists in:
+
+* `standardsectioning.dtx`
+* `README.md`
+* `LICENSE.md`
+* `standardsectioning.pdf`
+
+If distributors also want to distribute `standardsectioning.sty`, they can
+unpack it using
+
+ tex standardsectioning.dtx
+
+Note, that you have to use `tex` not `latex`, `pdflatex`, `xelatex` or
+`lualatex`!
+
+Note also, that a legal distribution consists at least in:
+
+* `standardsectioning.dtx`
+* `README.md`
+
+The following files are optionally, but must not be distributed without the
+previous ones:
+
+* `LICENSE.md`
+* `standardsectioning.sty`
+* `standardsectioning.pdf`
+
+
+# Unpacking and Installation for Developers
+
+Developers who want the current developer version of the code to be installed
+for testing, should clone [the `third-party-enhancements`
+repository](https://github.com/komascript/third-party-enhancements), e.g.,
+using
+
+ git clone https://github.com/komascript/third-party-enhancements.git
+
+You can than either unpack and install all the third-party enhancements using:
+
+ l3build install --full
+
+from within the main directory of the cloned respository. For installation of
+`standardsectioning` only run the same command from within the
+`standardsectioning` subdirectory. For installation without the manual omit
+option `--full`, but this is not recommended for developers.
+
+# How to get the Manual
+
+After installation you should get the user manual using:
+
+ texdoc standardsectioning
+
+See the manual of your TeX distribution for more information.
+
+Developers or distributors can also build the manual from the source using:
+
+ l3build doc
+
+# How to Contribute
+
+To become a contributor, e.g., do heavy testing. If you find an issue, please
+report it using [the issue
+tracker](https://github.com/komascript/third-party-enhancements/issues).
+Please note, however, that the loss of class features as a result of using
+this package is generally an intended side effect and does not necessarily
+constitute an issue.
+
+You can also become a developer and, e.g., make new test files to the
+packages. See the [`l3build`](https://ctan.org/pkg/l3build) manual for more
+information about tests. If you've created a new test and think that it would
+be useful. Please either do a pull request or [add a new
+issue](https://github.com/komascript/third-party-enhancements/issues/new/choose)
+and include your test file.
+
+Another kind of contribution would be to contact the author of the package,
+that depends on the sectioning implementation of the standard classes and is
+therefore incompatible with the class you are using to convince her or him to
+make his package compatible.
+
+# How to Report Issues
+
+If you think you have found a bug (or another kind of issue) using
+`setspaceenhanced` you should use [the issue
+tracker](https://github.com/komascript/third-party-enhancements/issues). Please
+first search for similar issues already reported and maybe also already fixed
+and closed. Maybe the replies to such a similar report would help you too.
+Please also note, however, that the loss of class features as a result of using
+this package is generally an intended side effect and does not necessarily
+constitute a bug.
+
+If your issue is new, you should report it also using [the issue
+tracker](https://github.com/komascript/third-party-enhancements/issues). Please
+be kind, not only when writing the report but also when reading replies and
+commenting or answering. And please always add a minimal working example and
+usually the relevant parts of the `log`-file to your report. Please use the
+[markdown for
+code](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)
+to add such files into the text of your report. The correct language
+identifier for LaTeX code would be `latex`. For `log`-files you won't need any
+language identifier. Usually you should not use attachments for code or
+`log`-files unless you've been asked to do so. And please note, reports should
+always be self-containing. External links often break and so the report become
+useles.
+
+# How to Say Thank You for my Work
+
+Hey, I'm doing this as a hobby. So no need to say thank you. But I'm a vain
+fop, so I'm certainly up for a quick thank you by email. On komascript.de you
+can find an [explanation of my wishes](https://komascript.de/wunschliste) if
+you want to give more. If you don't understand German, just click to links at
+that page.
Property changes on: trunk/Master/texmf-dist/doc/latex/standardsectioning/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/standardsectioning/standardsectioning.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/standardsectioning/standardsectioning.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/standardsectioning/standardsectioning.pdf 2024-06-10 21:04:37 UTC (rev 71478)
+++ trunk/Master/texmf-dist/doc/latex/standardsectioning/standardsectioning.pdf 2024-06-10 21:06:06 UTC (rev 71479)
Property changes on: trunk/Master/texmf-dist/doc/latex/standardsectioning/standardsectioning.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/standardsectioning/standardsectioning.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/standardsectioning/standardsectioning.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/standardsectioning/standardsectioning.dtx 2024-06-10 21:06:06 UTC (rev 71479)
@@ -0,0 +1,929 @@
+% \iffalse meta-comment
+% ======================================================================
+% standardsectioning.dtx
+% Copyright © 2008–2024 Markus Kohm
+%
+% This work is a KOMA-Script spin-off. For the original sources of
+% KOMA-Script's `float.hak' see file `scrhack.dtx' in the KOMA-Script
+% sources at <https://sourceforge.net/p/koma-script/code/>.
+%
+% Development is taking place as part of `scrhack' at
+% <https://github.com/komascript/third-party-enhancements>. New issues
+% should be reported there as well as known issues can be found.
+%
+% 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 "maintained".
+%
+% The Current Maintainer and author of this work is Markus Kohm.
+%
+% This work consists of the files `standardsectioning.dtx' and
+% `README.md'.
+%
+% This work also uses code derived from the standard LaTeX classes.
+% These classes have been released under the LaTeX Project Public
+% License. For the copyright of the original code see `classes.dtx'
+% <https://ctan.org/tex-archive/macros/latex/base/classes.dtx>.
+% Note: For support of the derived code, do not contact the authors of
+% the original code! They are not responsible for this work.
+%
+% The recommended way to install `standardsectioning' is to use
+% the package manager of your TeX distribution.
+% ======================================================================
+%
+%<*dtx>
+\ifx\ProvidesExplFile\undefined\def\ProvidesExplFile#1#2#3#4{}\fi
+\ProvidesExplFile{standardsectioning.dtx}
+%</dtx>
+%<*dtx|package>
+%<package>\ProvidesExplPackage{standardsectioning}
+ {2024-06-06}{0.9}
+ {%
+%<*dtx>
+ sources and unpack driver of
+%</dtx>
+ forcing standard class sectioning definitions%
+ }
+%</dtx|package>
+%<*dtx>
+\ifx\documentclass\undefined
+ \input docstrip.tex
+ \generate{%
+ \file{standardsectioning.sty}{%
+ \from{standardsectioning.dtx}{package}%
+ }%
+ }%
+\else
+ \let\endbatchfile\ExplSyntaxOff
+\fi
+\endbatchfile
+\documentclass[ngerman,USenglish]{koma-script-source-doc}
+\NewDocElement[%
+ macrolike = true,
+ toplevel = true,
+ idxtype = \textit{var.},
+ idxgroup = Variable,
+ printtype = \textit{var.},
+]{Variable}{Variable}
+\setcounter{IndexColumns}{2}
+\usepackage{babel}
+\usepackage{csquotes}
+\usepackage[style=alphabetic]{biblatex}
+\begin{filecontents}[force]{\jobname.bib}
+ at manual{pkg:scrhack:manual,
+ author={Markus Kohm},
+ version={3.42},
+ date={2023-07-26},
+ title={Emulating Former \KOMAScript{} Package \pkg*{scrhack}},
+ url={https://mirrors.ctan.org/macros/latex/contrib/scrhack/scrhack.pdf},
+ urldate={2023-07-26},
+}
+ at online{pkg:koma-script,
+ author={Markus Kohm},
+ version={3.41},
+ date={2023-07-07},
+ title={{\KOMAScript} --- A bundle of versatile classes and packages},
+ url={https://ctan.org/pkg/koma-script},
+ urldate={2023-07-14},
+ note={The \KOMAScript{} bundle provides replacements for the \pkg*{article},
+ \pkg*{report}, and \pkg*{book} classes with emphasis on typography and
+ versatility. There is also a letter class.},
+}
+ at manual{pkg:koma-script:manual:de,
+ author={Markus Kohm},
+ date={2023-06-16},
+ title={{\KOMAScript}},
+ subtitle={Die Anleitung},
+ url={http://mirrors.ctan.org/macros/latex/contrib/koma-script/scrguide-de.pdf},
+ urldate={2023-07-04},
+}
+ at manual{pkg:koma-script:manual:en,
+ author={Markus Kohm},
+ date={2023-06-16},
+ title={{\KOMAScript}},
+ subtitle={The Guide},
+ url={http://mirrors.ctan.org/macros/latex/contrib/koma-script/scrguide-en.pdf},
+ urldate={2023-07-14},
+}
+\end{filecontents}
+\addbibresource{\jobname.bib}
+\setcounter{StandardModuleDepth}{2}
+\begin{document}
+ \nocite{pkg:koma-script,pkg:koma-script:manual:en,pkg:koma-script:manual:de}
+ \DocInput{standardsectioning.dtx}
+\end{document}
+%</dtx>
+%\fi
+%
+% \changes{v0.1}{2023/06/01}{start of \KOMAScript{} spin-off}
+% \changes{v0.9}{2024/06/06}{first release}
+%
+% \GetFileInfo{standardsectioning.dtx}
+% \title{Using the Sectioning Command Code of the Standard Classes}
+% \author{\href{mailto:komascript at gmx.info}{Markus Kohm}}
+% \date{Version \filedate{} \fileversion}
+% \maketitle
+% \begin{abstract}
+% A long time ago
+% \href{https://www.sourceforge.net/project/koma-script}{\KOMAScript} was
+% more or less just a collection of replacements for the three standard
+% classes \cls*{article}, \cls*{book} and \cls*{report}. Replacing a
+% standard class with a
+% \href{https://www.sourceforge.net/project/koma-script}{\KOMAScript} class
+% was easy, even if users used a lot of additional packages. Over the years,
+% the author has added many new features and user interfaces to the
+% classes. This also led to completely different implementation of the
+% sectioning commands. But some packages depend on an implementation similar
+% to the standard classes.
+%
+% Package \pkg*{standardsectioning} implements these commands with the code
+% of the standard classes and also deactivates parts of the
+% \href{https://www.sourceforge.net/project/koma-script}{\KOMAScript} user
+% interface, which should not be used with these changes. These are more or
+% less all commands to configure sectioning commands. It also reverts some
+% internal macros of
+% \href{https://www.sourceforge.net/project/koma-script}{\KOMAScript}.
+% \end{abstract}
+%
+% \tableofcontents
+%
+%\iffalse
+%<*doc>
+%\fi
+\section{What are the typical reasons for using package
+ \texorpdfstring{\pkg*{standardsectioning}}{standardsectioning} and how to do
+ it?}
+\label{sec:reasons}
+
+Sometimes replacing a standard class by a
+\href{https://komascript.de/}{\KOMAScript} class results in new errors,
+because of incompatibility of some of the packages or the already existing
+preamble code with these classes. In such a case, you first should try out
+package \pkg{scrhack} without passing any option to that package. Package
+\pkg{scrhack} should be the first package after loading the document class, or
+even be loaded \emph{before} the document class using \cs{RequirePackage}
+instead of \cs{usepackage}. If this already fixes the issue, you can try to
+find out which of the replacements and enhancements loaded by \pkg{scrhack}
+solved the issue and load only these.
+
+Only if you cannot fix the issue this kind you can try loading
+\pkg*{standardsectioning} either also using \pkg{scrhack} with
+corresponding options (see \cite{pkg:scrhack:manual}) or just loading
+\pkg*{standardsectioning}.
+
+Such errors happen, e.g., because
+\pkg{titlesec}\index{Packages:>\pkg{titlesec}} makes assumptions about the
+definition of the sectioning commands that simply do not apply to the
+\href{https://komascript.de/}{\KOMAScript} classes. This leads, e.g., in the
+following example:
+\begin{verbatim}
+ \documentclass{scrartcl}
+ \usepackage{titlesec}
+ \begin{document}
+ \section{Test Section}
+ Test text.
+ \end{document}
+\end{verbatim}
+to the error message:
+\begin{verbatim}
+ Package titlesec Error: No format for this command.
+
+ See the titlesec package documentation for explanation.
+ Type H <return> for immediate help.
+ ...
+
+ l.4 \section{Test Section}
+\end{verbatim}
+Several other errors can happen with combinations of \pkg{titlesec} and
+\href{https://komascript.de/}{\KOMAScript} classes. Best solution for this,
+would be to not use \pkg{titlesec} and instead use the class' interface to
+configure the sectioning commands, e.g., \cs{RedeclareSectionCommand},
+\cs{setkomafont}, or redefining \cs{sectionlinesformat}. See
+\cite{pkg:koma-script:manual:en} or \cite{pkg:koma-script:manual:de} for more
+information. But if you do not use any of the enhanced sectioning features of
+the \href{https://komascript.de/}{\KOMAScript} classes, a first-aid workaround
+would be to load package \pkg*{standardsectioning} immediately \emph{after}
+the class:
+\begin{verbatim}
+ \documentclass{scrartcl}
+ \usepackage{standardsectioning}
+ \usepackage{titlesec}
+ \begin{document}
+ \section{Test Section}
+ Test text.
+ \end{document}
+\end{verbatim}
+Among other things, this redefines the sectioning commands to be compatible
+with the standard classes.
+\begin{description}\sloppy
+\item[But note:] \leavevmode
+ \marginline{\raisebox{\dimexpr\ht\strutbox-\height\relax}{\Huge\textcolor{red}{!}}}%
+ This also means, that all the enhancements to these commands are broken! You
+ cannot use \cs{DeclareSectionCommand}, \cs{RedeclareSectionCommand},
+ \cs{DeclareNewSectionCommand}, \cs{ProvideSectionCommand},
+ \cs{DeclareSectionCommands}, \cs{RedeclareSectionCommands},
+ \cs{DeclareNewSectionCommands}, or \cs{ProvideSectionCommands} any
+ longer. Other commands like \cs{partformat}, \cs{chapterformat},
+ \cs{sectionformat}, \cs{subsectionformat}, \cs{subsubsectionformat},
+ \cs{paragraphformat}, \cs{subparagraphformat} and many more are not used
+ anymore.
+\end{description}
+
+Sometimes a wrapper classes loads a \href{https://komascript.de/}{\KOMAScript}
+class and than also loads a package like \pkg{titlesec}. To load
+\pkg*{standardsections} immediately after the class, you should use the
+generic class hook available from \LaTeX{} 2020-10-01:
+\begin{verbatim}
+ \AddToHook{class/scrartcl/after}{\RequirePackage{standardsectioning}}
+ \AddToHook{class/scrbook/after}{\RequirePackage{standardsectioning}}
+ \AddToHook{class/scrreprt/after}{\RequirePackage{standardsectioning}}
+\end{verbatim}
+These lines should be placed \texttt{before} \cs{documentclass}. If you are
+using an older \LaTeX{} version you can use
+\href{https://komascript.de/}{\KOMAScript} package \pkg{scrlfile} to do the
+same:
+\begin{verbatim}
+ \RequirePackage{scrlfile}
+ \AfterClass{scrartcl}{\RequirePackage{standardsectioning}}
+ \AfterClass{scrbook}{\RequirePackage{standardsectioning}}
+ \AfterClass{scrreport}{\RequirePackage{standardsectioning}}
+\end{verbatim}
+also \emph{before} loading the class.
+
+\section{How to select the correct sectioning code, if the automatism fails?}
+\label{sec:options}
+
+By default, the package uses an automatism to decide which code of which
+standard class should be used. If the \KOMAScript{} class \cls{scrartcl} is
+detected, automatically the code of \cls{article} is used. If the
+\KOMAScript{} class \cls{scrreprt} is detected, automatically the code of
+\cls{report} is used. If the \KOMAScript{} class \cls{scrbook} is detected,
+automatically the code of \cls{book} is used. If none of these classes is
+detected, the existence of two commands is used. If \cs{chapter} is not
+defined, the code of \cls{article} is used. If \cs{chapter} is defined, but
+\cs{frontmatter} is not defined, the code of \cls{report} is used. If both
+\cs{chapter} and \cs{frontmatter} are defined, the code of \cls{book} is used.
+
+%\DescribeOption{article}
+%\DescribeOption{book}
+%\DescribeOption{report}
+Very seldom this automatism fails and the wrong code is used, which results in
+error messages or printing mistakes. In this case you can load package
+\pkg*{standardsectioning} with one of the options \opt{article}, \opt{report}
+or \opt{book} to force the usage of the sectioning code of either
+\cls{article}, \cls{report}, or \cls{book}. This could, e.g., be needed, if
+you are using a class, that defines \cs{chapter} and \cs{frontmatter} but not
+\cs{if at mainmatter}. In this case, you should use
+\begin{verbatim}
+ \usepackage[report]{standardsectioning}
+\end{verbatim}
+instead of
+\begin{verbatim}
+ \usepackage{standardsectioning}
+\end{verbatim}
+because otherwise the not defined \cs{if at mainmatter} will result in errors,
+when using \cs{chapter}.
+% \iffalse
+%</doc>
+% \fi
+%
+% \MaybeStop{\printbibliography[heading=bibintoc]\PrintIndex}
+%
+% \iffalse
+%<*package>
+%<@@=standardsectioning>
+% \fi
+% \section{Implementation}
+% \label{sec:implementation}
+%
+% \subsection{Messages}
+% \label{ssec:messages}
+%
+% There are some messages, that may be used several times:
+% \begin{macrocode}
+\msg_new:nnnn { standardsectioning } { wrong-package-order }
+ {
+ wrong~package~order~detected.
+ }
+ {
+ You've~loaded~this~package~after~package~#1.\iow_newline:
+ But~this~cannot~work.\iow_newline:
+ Loading aborted!
+ }
+
+\msg_new:nnn { standardsectioning } { deactivate-extended-section-commands }
+ {
+ extended~sectioning~option~handling~deactivated.
+ }
+
+\msg_new:nnn { standardsectioning } { no-force-with-KOMA-Script-class }
+ {
+ package~option~`#1'~is~ignored~due~to~usage~of~KOMA-Script~class~\KOMAClassName.
+ }
+% \end{macrocode}
+%
+% \subsection{Package order}
+% \label{ssec:packageorder}
+%
+% \pkg{hyperref} must not be loaded, because otherwise deactivation of
+% \cs{scr at chapter@after at hyperref@patch} would not work.
+% \begin{macrocode}
+\@ifpackageloaded { hyperref }
+ {
+ \msg_critical:nnn { standardsectioning } { wrong-package-order }
+ { hyperref }
+ } { }
+% \end{macrocode}
+% \pkg{titlesec} must not be loaded, because otherwise the re-definitions
+% would overwrite the definitions of this package.
+% \begin{macrocode}
+\@ifpackageloaded { titlesec }
+ {
+ \msg_critical:nnn { standardsectioning } { wrong-package-order }
+ { titlesec }
+ } { }
+% \end{macrocode}
+% \pkg{sectsty} must not be loaded, because otherwise the re-definitions
+% would overwrite the definitions of this package.
+% \begin{macrocode}
+\@ifpackageloaded { sectsty }
+ {
+ \msg_critical:nnnn { standardsectioning } { wrong-package-order }
+ { sectsty }
+ } { }
+% \end{macrocode}
+%
+% \subsection{\KOMAScript{} deactivation code}
+% \label{ssec:deactivationcode}
+%
+% \ExplSyntaxOn
+% \begin{macro}{\@@_common_komascript_deactivation_code:}
+% \ExplSyntaxOff
+% Some deactivation code is common for all \KOMAScript{} classes and
+% therefore we use an auxiliary function to not need to copy it several
+% times.
+% \begin{macrocode}
+\cs_new:Nn \@@_common_komascript_deactivation_code:
+ {
+% \end{macrocode}
+% \begin{macro}{\@startsection}
+% \KOMAScript{} classes redefine this internal \LaTeX{} kernel macro. In this
+% case \cs{scr at 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}
+ \RenewCommandCopy \@startsection \scr at saved@startsection
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@sect,\@ssect,\@xsect}
+% All these should be resetted to their original definitions stored in
+% \cs{scr at latex@\dots}.
+% \begin{macrocode}
+ \RenewCommandCopy\@sect\scr at latex@sect
+ \RenewCommandCopy\@ssect\scr at latex@ssect
+ \RenewCommandCopy\@xsect\scr at latex@xsect
+% \end{macrocode}
+% \end{macro}
+% \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}
+ \cs_undefine:N \DeclareSectionCommand
+ \cs_undefine:N \DeclareSectionCommands
+ \cs_undefine:N \RedeclareSectionCommand
+ \cs_undefine:N \RedeclareSectionCommands
+ \cs_undefine:N \DeclareNewSectionCommand
+ \cs_undefine:N \DeclareNewSectionCommands
+ \cs_undefine:N \ProvideSectionCommand
+ \cs_undefine:N \ProvideSectionCommands
+% \end{macrocode}
+% \end{command}
+% \begin{macro}{\minisec}
+% This also has to be undefined, because it also uses internal \KOMAScript{}
+% definitions, which are deactivated.
+% \begin{macrocode}
+ \cs_undefine:N \minisec
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\scr at chapter@before at hyperref@patch,
+% \scr at chapter@after at 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}
+ \cs_gset_eq:NN \scr at chapter@before at hyperref@patch \relax
+ \cs_gset_eq:NN \scr at chapter@after at hyperref@patch \relax
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\scr at 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}
+ \int_if_zero:nF { \scr at osectarg }
+ {
+ \msg_warning:nn { standardsectioning }
+ { deactivate-extended-section-commands }
+ \cs_gset_eq:NN \scr at osectarg \c_zero_int
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\scr at activate@xsection}
+% Further changing of the value has to be deactivated.
+% \begin{macrocode}
+ \renewcommand*{\scr at activate@xsection}[1]{%
+ \int_if_zero:nF { ##1 }
+ {
+ \msg_warning:nn { standardsectioning }
+ { deactivate-extended-section-commands }
+ \cs_gset_eq:NN \scr at osectarg \c_zero_int
+ }
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{command}{\partlineswithprefixformat,
+% \sectionlinesformat,\sectioncatchphraseformat}
+% These \KOMAScript{} commands are not used any longer. To detect errors,
+% because of redefining them, we undefine them.
+% \begin{macrocode}
+ \cs_undefine:N \partlineswithprefixformat
+ \cs_undefine:N \sectionlinesformat
+ \cs_undefine:N \sectioncatchphraseformat
+% \end{macrocode}
+% \end{command}
+% \begin{option}{headings}
+% The \KOMAScript{} option does not make sense any longer. So it is
+% deactivated and usage will throw an error.
+% \begin{macrocode}
+ \RelaxFamilyKey[.\KOMAClassFileName]{KOMA}{headings}%
+ \KOMA at kav@removekey{\KOMAClassFileName}{headings}%
+% \end{macrocode}
+% \end{option}
+% \begin{macro}{\scr at class@titlesec at warning}
+% The warning about loading \pkg{titlesec} has to be removed, because we do
+% not expect errors any longer.
+% \begin{macrocode}
+ \cs_undefine:N \scr at class@titlesec at warning
+% \end{macrocode}
+% \begin{macrocode}
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \ExplSyntaxOff
+%
+% \subsection{Sectioning code of the standard classes}
+% \label{ssec:standardsectioningcommands}
+%
+% \begin{command}{\part,\chapter,\section,\subsection,\subsubsection,
+% \paragraph,\subparagraph}
+% These commands are redefined using code from
+% \href{https://ctan.org/tex-archive/macros/latex/base/classes.dtx}
+% {\file{classes.dtx}}
+% 2024/02/08 v1.4n.
+% Only \cs{newcommand} is replaced by \cs{def} and \texttt{\#} are
+% doubled. Depending on the class, we use different code:
+% \ExplSyntaxOn
+% \begin{macro}{\@@_article_sectioning_code:,\@@_book_sectioning_code:,
+% \@@_report_sectioning_code:}
+% \ExplSyntaxOff
+% \begin{macrocode}
+\cs_new:Nn \@@_article_sectioning_code:
+ {
+ \def\part{%
+ \if at noskipsec \leavevmode \fi
+ \par
+ \addvspace{4ex}%
+ \@afterindentfalse
+ \secdef\@part\@spart}%
+ \def\@part[##1]##2{%
+ \ifnum \c at secnumdepth >\m at ne
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\thepart\hspace{1em}##1}%
+ \else
+ \addcontentsline{toc}{part}{##1}%
+ \fi
+ {\parindent \z@ \raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \ifnum \c at secnumdepth >\m at 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}}%
+ }
+
+\cs_new:Nn \@@_report_sectioning_code:
+ {
+ \def\part{%
+ \if at openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \thispagestyle{plain}%
+ \if at twocolumn
+ \onecolumn
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \null\vfil
+ \secdef\@part\@spart}
+
+ \def\@part[##1]##2{%
+ \ifnum \c at 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 at 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 at twoside
+ \if at openright
+ \null
+ \thispagestyle{empty}%
+ \newpage
+ \fi
+ \fi
+ \if at tempswa
+ \twocolumn
+ \fi}
+ \def\chapter{\if at openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{plain}%
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\@chapter\@schapter}
+ \def\@chapter[##1]##2{\ifnum \c at secnumdepth >\m at 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 at twocolumn
+ \@topnewpage[\@makechapterhead{##2}]%
+ \else
+ \@makechapterhead{##2}%
+ \@afterheading
+ \fi}
+ \def\@makechapterhead##1{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright \normalfont
+ \ifnum \c at secnumdepth >\m at 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 at 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}}
+ }
+
+\cs_new:Nn \@@_book_sectioning_code:
+ {
+ \def\part{%
+ \if at openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \thispagestyle{plain}%
+ \if at twocolumn
+ \onecolumn
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \null\vfil
+ \secdef\@part\@spart}
+
+ \def\@part[##1]##2{%
+ \ifnum \c at 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 at 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 at twoside
+ \if at openright
+ \null
+ \thispagestyle{empty}%
+ \newpage
+ \fi
+ \fi
+ \if at tempswa
+ \twocolumn
+ \fi}
+ \def\chapter{\if at openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{plain}%
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\@chapter\@schapter}
+ \def\@chapter[##1]##2{\ifnum \c at secnumdepth >\m at ne
+ \if at 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 at twocolumn
+ \@topnewpage[\@makechapterhead{##2}]%
+ \else
+ \@makechapterhead{##2}%
+ \@afterheading
+ \fi}
+ \def\@makechapterhead##1{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright \normalfont
+ \ifnum \c at secnumdepth >\m at ne
+ \if at 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 at 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}
+% \end{macro}
+% \end{command}
+%
+% \subsection{Class dependent deactivation and implemention}
+% \label{ssec:doit}
+%
+% If a \KOMAScript{} class has been loaded we need use the common deactivation
+% code and the \cls*{article} sectioning code.
+% \ExplSyntaxOn
+% \begin{macro}{\@@_acticvation_code:}
+% \ExplSyntaxOff
+% \begin{macrocode}
+\cs_new:Nn \@@_activation_code:
+ {
+ \@ifclassloaded { scrartcl }
+ {
+ \@@_common_komascript_deactivation_code:
+ \@@_article_sectioning_code:
+ }
+ {
+% \end{macrocode}
+% \begin{command}{\chapterlineswithprefixformat,\chapterlinesformat}
+% For \cls*{scrbook} and \cls*{scrreprt} we need additional deactivation
+% code and the \cls*{book} resp. \cls*{report} sectioning code.
+% \begin{macrocode}
+ \@ifclassloaded { scrbook }
+ {
+ \@@_common_komascript_deactivation_code:
+ \cs_undefine:N \chapterlineswithprefixformat
+ \cs_undefine:N \chapterlinesformat
+ \@@_book_sectioning_code:
+ }
+ {
+ \@ifclassloaded { scrreprt }
+ {
+ \@@_common_komascript_deactivation_code:
+ \cs_undefine:N \chapterlineswithprefixformat
+ \cs_undefine:N \chapterlinesformat
+ \@@_report_sectioning_code:
+ }
+ {
+% \end{macrocode}
+% \end{command}
+% For all other classes, we use a heuristic to either use the sectioning code
+% of \cls*{article}, \cls*{book}, or \cls*{report}
+% \begin{macrocode}
+ \cs_if_exist:NTF \chapter
+ {
+ \cs_if_exist:cTF { frontmatter }
+ {
+ \@@_book_sectioning_code:
+ }
+ {
+ \@@_report_sectioning_code:
+ }
+ }
+ {
+ \@@_article_sectioning_code:
+ }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \ExplSyntaxOff
+%
+% \begin{option}{book,article,report}
+% These options can be used to force the usage of one of the selection
+% codes, but only if no \KOMAScript{} class has been used. So in the code
+% section we first have to test for a \KOMAScript{} class and either throw a
+% warning or do the redefinition of \cs{@@\_activation\_code:}.
+% \begin{macrocode}
+\DeclareKeys
+ {
+ article .meta:nn = { @@/internal } { force=article },
+ article .usage = load,
+ book .meta:nn = { @@/internal } { force=book },
+ book .usage = load,
+ report .meta:nn = { @@/internal } { force=report },
+ report .usage = load,
+ }
+\keys_define:nn { @@/internal }
+ {
+ force .code =
+ {
+ \cs_if_exist:NTF \KOMAClassName
+ {
+ \msg_warning:nnn { standardsectioning }
+ { no-force-with-KOMA-Script-class }
+ { #1 }
+ }
+ {
+ \cs_set_eq:Nc \@@_activation_code: { @@_#1_sectioning_code: }
+ }
+ }
+ }
+\ProcessKeyOptions
+\@@_activation_code:
+% \end{macrocode}
+% \end{option}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+% \PrintChanges
+%
+% \endinput
+% Local Variables:
+% mode: doctex
+% ispell-local-dictionary: "en_US"
+% eval: (flyspell-mode 1)
+% TeX-master: t
+% End:
Property changes on: trunk/Master/texmf-dist/source/latex/standardsectioning/standardsectioning.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/standardsectioning/standardsectioning.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/standardsectioning/standardsectioning.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/standardsectioning/standardsectioning.sty 2024-06-10 21:06:06 UTC (rev 71479)
@@ -0,0 +1,478 @@
+%%
+%% This is file `standardsectioning.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% standardsectioning.dtx (with options: `package')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from standardsectioning.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file standardsectioning.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+\ProvidesExplPackage{standardsectioning}
+ {2024-06-06}{0.9}
+ {%
+ forcing standard class sectioning definitions%
+ }
+\msg_new:nnnn { standardsectioning } { wrong-package-order }
+ {
+ wrong~package~order~detected.
+ }
+ {
+ You've~loaded~this~package~after~package~#1.\iow_newline:
+ But~this~cannot~work.\iow_newline:
+ Loading aborted!
+ }
+
+\msg_new:nnn { standardsectioning } { deactivate-extended-section-commands }
+ {
+ extended~sectioning~option~handling~deactivated.
+ }
+
+\msg_new:nnn { standardsectioning } { no-force-with-KOMA-Script-class }
+ {
+ package~option~`#1'~is~ignored~due~to~usage~of~KOMA-Script~class~\KOMAClassName.
+ }
+\@ifpackageloaded { hyperref }
+ {
+ \msg_critical:nnn { standardsectioning } { wrong-package-order }
+ { hyperref }
+ } { }
+\@ifpackageloaded { titlesec }
+ {
+ \msg_critical:nnn { standardsectioning } { wrong-package-order }
+ { titlesec }
+ } { }
+\@ifpackageloaded { sectsty }
+ {
+ \msg_critical:nnnn { standardsectioning } { wrong-package-order }
+ { sectsty }
+ } { }
+\cs_new:Nn \__standardsectioning_common_komascript_deactivation_code:
+ {
+ \RenewCommandCopy \@startsection \scr at saved@startsection
+ \RenewCommandCopy\@sect\scr at latex@sect
+ \RenewCommandCopy\@ssect\scr at latex@ssect
+ \RenewCommandCopy\@xsect\scr at latex@xsect
+ \cs_undefine:N \DeclareSectionCommand
+ \cs_undefine:N \DeclareSectionCommands
+ \cs_undefine:N \RedeclareSectionCommand
+ \cs_undefine:N \RedeclareSectionCommands
+ \cs_undefine:N \DeclareNewSectionCommand
+ \cs_undefine:N \DeclareNewSectionCommands
+ \cs_undefine:N \ProvideSectionCommand
+ \cs_undefine:N \ProvideSectionCommands
+ \cs_undefine:N \minisec
+ \cs_gset_eq:NN \scr at chapter@before at hyperref@patch \relax
+ \cs_gset_eq:NN \scr at chapter@after at hyperref@patch \relax
+ \int_if_zero:nF { \scr at osectarg }
+ {
+ \msg_warning:nn { standardsectioning }
+ { deactivate-extended-section-commands }
+ \cs_gset_eq:NN \scr at osectarg \c_zero_int
+ }
+ \renewcommand*{\scr at activate@xsection}[1]{%
+ \int_if_zero:nF { ##1 }
+ {
+ \msg_warning:nn { standardsectioning }
+ { deactivate-extended-section-commands }
+ \cs_gset_eq:NN \scr at osectarg \c_zero_int
+ }
+ }%
+ \cs_undefine:N \partlineswithprefixformat
+ \cs_undefine:N \sectionlinesformat
+ \cs_undefine:N \sectioncatchphraseformat
+ \RelaxFamilyKey[.\KOMAClassFileName]{KOMA}{headings}%
+ \KOMA at kav@removekey{\KOMAClassFileName}{headings}%
+ \cs_undefine:N \scr at class@titlesec at warning
+ }
+\cs_new:Nn \__standardsectioning_article_sectioning_code:
+ {
+ \def\part{%
+ \if at noskipsec \leavevmode \fi
+ \par
+ \addvspace{4ex}%
+ \@afterindentfalse
+ \secdef\@part\@spart}%
+ \def\@part[##1]##2{%
+ \ifnum \c at secnumdepth >\m at ne
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\thepart\hspace{1em}##1}%
+ \else
+ \addcontentsline{toc}{part}{##1}%
+ \fi
+ {\parindent \z@ \raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \ifnum \c at secnumdepth >\m at 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}}%
+ }
+
+\cs_new:Nn \__standardsectioning_report_sectioning_code:
+ {
+ \def\part{%
+ \if at openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \thispagestyle{plain}%
+ \if at twocolumn
+ \onecolumn
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \null\vfil
+ \secdef\@part\@spart}
+
+ \def\@part[##1]##2{%
+ \ifnum \c at 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 at 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 at twoside
+ \if at openright
+ \null
+ \thispagestyle{empty}%
+ \newpage
+ \fi
+ \fi
+ \if at tempswa
+ \twocolumn
+ \fi}
+ \def\chapter{\if at openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{plain}%
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\@chapter\@schapter}
+ \def\@chapter[##1]##2{\ifnum \c at secnumdepth >\m at 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 at twocolumn
+ \@topnewpage[\@makechapterhead{##2}]%
+ \else
+ \@makechapterhead{##2}%
+ \@afterheading
+ \fi}
+ \def\@makechapterhead##1{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright \normalfont
+ \ifnum \c at secnumdepth >\m at 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 at 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}}
+ }
+
+\cs_new:Nn \__standardsectioning_book_sectioning_code:
+ {
+ \def\part{%
+ \if at openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \thispagestyle{plain}%
+ \if at twocolumn
+ \onecolumn
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \null\vfil
+ \secdef\@part\@spart}
+
+ \def\@part[##1]##2{%
+ \ifnum \c at 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 at 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 at twoside
+ \if at openright
+ \null
+ \thispagestyle{empty}%
+ \newpage
+ \fi
+ \fi
+ \if at tempswa
+ \twocolumn
+ \fi}
+ \def\chapter{\if at openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{plain}%
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\@chapter\@schapter}
+ \def\@chapter[##1]##2{\ifnum \c at secnumdepth >\m at ne
+ \if at 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 at twocolumn
+ \@topnewpage[\@makechapterhead{##2}]%
+ \else
+ \@makechapterhead{##2}%
+ \@afterheading
+ \fi}
+ \def\@makechapterhead##1{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright \normalfont
+ \ifnum \c at secnumdepth >\m at ne
+ \if at 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 at 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}}
+ }
+\cs_new:Nn \__standardsectioning_activation_code:
+ {
+ \@ifclassloaded { scrartcl }
+ {
+ \__standardsectioning_common_komascript_deactivation_code:
+ \__standardsectioning_article_sectioning_code:
+ }
+ {
+ \@ifclassloaded { scrbook }
+ {
+ \__standardsectioning_common_komascript_deactivation_code:
+ \cs_undefine:N \chapterlineswithprefixformat
+ \cs_undefine:N \chapterlinesformat
+ \__standardsectioning_book_sectioning_code:
+ }
+ {
+ \@ifclassloaded { scrreprt }
+ {
+ \__standardsectioning_common_komascript_deactivation_code:
+ \cs_undefine:N \chapterlineswithprefixformat
+ \cs_undefine:N \chapterlinesformat
+ \__standardsectioning_report_sectioning_code:
+ }
+ {
+ \cs_if_exist:NTF \chapter
+ {
+ \cs_if_exist:cTF { frontmatter }
+ {
+ \__standardsectioning_book_sectioning_code:
+ }
+ {
+ \__standardsectioning_report_sectioning_code:
+ }
+ }
+ {
+ \__standardsectioning_article_sectioning_code:
+ }
+ }
+ }
+ }
+ }
+\DeclareKeys
+ {
+ article .meta:nn = { __standardsectioning/internal } { force=article },
+ article .usage = load,
+ book .meta:nn = { __standardsectioning/internal } { force=book },
+ book .usage = load,
+ report .meta:nn = { __standardsectioning/internal } { force=report },
+ report .usage = load,
+ }
+\keys_define:nn { __standardsectioning/internal }
+ {
+ force .code =
+ {
+ \cs_if_exist:NTF \KOMAClassName
+ {
+ \msg_warning:nnn { standardsectioning }
+ { no-force-with-KOMA-Script-class }
+ { #1 }
+ }
+ {
+ \cs_set_eq:Nc \__standardsectioning_activation_code: { __standardsectioning_#1_sectioning_code: }
+ }
+ }
+ }
+\ProcessKeyOptions
+\__standardsectioning_activation_code:
+\endinput
+%%
+%% End of file `standardsectioning.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/standardsectioning/standardsectioning.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2024-06-10 21:04:37 UTC (rev 71478)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2024-06-10 21:06:06 UTC (rev 71479)
@@ -790,7 +790,8 @@
sphack sphdthesis splines splitbib splitindex
spot spotcolor spreadtab spverbatim
sr-vorl srbook-mem srbtiks srcltx srdp-mathematik srcredact sseq sslides
- stack stackengine stage standalone stanli starfont startex
+ stack stackengine stage standalone standardsectioning stanli
+ starfont startex
statex statex2 statistics statistik statmath staves starray
stdclsdv stdpage stealcaps steinmetz
stellenbosch stellenbosch-2 step stepgreek stex
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2024-06-10 21:04:37 UTC (rev 71478)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2024-06-10 21:06:06 UTC (rev 71479)
@@ -3404,6 +3404,7 @@
'sillypage' => 'etex',
'skdoc' => 'tex',
'spath3' => 'etex',
+ 'standardsectioning' => etex,
'stix2-type1' => 'tex',
'svg' => 'etex',
'svn-multi' => 'latex', # interaction for .pl
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2024-06-10 21:04:37 UTC (rev 71478)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2024-06-10 21:06:06 UTC (rev 71479)
@@ -1304,6 +1304,7 @@
depend stack
depend stackengine
depend standalone
+depend standardsectioning
depend starray
depend stdclsdv
depend stdpage
Added: trunk/Master/tlpkg/tlpsrc/standardsectioning.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.