diff options
Diffstat (limited to 'macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx')
-rw-r--r-- | macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx | 771 |
1 files changed, 328 insertions, 443 deletions
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx b/macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx index 10282eecd2..9c65fcd6bd 100644 --- a/macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx +++ b/macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % ====================================================================== % scrkernel-paragraphs.dtx -% Copyright (c) Markus Kohm, 2002-2021 +% Copyright (c) Markus Kohm, 2002-2022 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -17,54 +17,17 @@ % The Current Maintainer and author of this work is Markus Kohm. % % This work consists of all files listed in manifest.txt. -% ---------------------------------------------------------------------- -% scrkernel-paragraphs.dtx -% Copyright (c) Markus Kohm, 2002-2021 -% -% 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. % ====================================================================== -% \fi -% -% \CharacterTable -% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} -% -% \iffalse -%%% From File: $Id: scrkernel-paragraphs.dtx 3596 2021-05-17 12:53:41Z kohm $ +%%% From File: $Id: scrkernel-paragraphs.dtx 3745 2022-03-07 09:14:34Z kohm $ %<option>%%% (run: option) %<body>%%% (run: body) %<*dtx> -% \fi \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2021-05-17 14:53:41 +0200 (Mon, 17 May 2021) $ + \filedate$Date: 2022-03-07 10:14:34 +0100 (Mo, 07. Mär 2022) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 1872 $ + \filerevision$Revision: 3745 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrkernel-paragraphs.dtx}% @@ -73,63 +36,120 @@ (paragraphs)] }% \reserved@a -% \iffalse -\documentclass[parskip=half-]{scrdoc} -\usepackage[english,ngerman]{babel} -\CodelineIndex -\RecordChanges -\GetFileInfo{scrkernel-paragraphs.dtx} -\title{\KOMAScript{} \partname\ \texttt{\filename}% - \footnote{Dies ist Version \fileversion\ von Datei \texttt{\filename}.}} -\date{\filedate} -\author{Markus Kohm} - +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\setcounter{StandardModuleDepth}{3} \begin{document} - \maketitle - \tableofcontents - \DocInput{\filename} +\DocInput{scrkernel-paragraphs.dtx} \end{document} %</dtx> % \fi % -% \selectlanguage{ngerman} +% \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} % -% \changes{v2.95}{2002/06/25}{% -% erste Version aus der Aufteilung von \texttt{scrclass.dtx}} +% \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{Absatzformatierung und -umbruch} +% \section{User Manual} % -% In diesen Bereich gehört alles, was die Absatzformatierung selbst -% betrifft. Dazu kommen dann noch einige Kleinigkeiten aus dem -% Seitenumbruch. +% You can find the user documentation the commands implemented here in the +% \KOMAScript{} manual, either the German \file{scrguide} or the English +% \file{scrguien}. % -% \StopEventually{\PrintIndex\PrintChanges} +% \MaybeStop{\PrintIndex} % +% \section{Implementation of Paragraphs and Pages} % -% \iffalse +% Almost all of this code is for the classes only. +% \begin{macrocode} %<*class> -%<*option> -% \fi +% \end{macrocode} % -% \subsection{Optionen für das Absatzlayout} -% -% Ab Version 2.8i können wir auch mit Absatzlayouts umgehen, die einen -% Absatzabstand statt einem Absatzeinzug verlangen. Gesteuert wird -% dies über Optionen und Schalter. -% -% \begin{macro}{\setparsizes} -% \changes{v2.95}{2004/11/05}{neues Macro}%^^A -% \changes{v3.17}{2015/03/10}{löscht diverse \texttt{parskip}-Einstellungen -% aus der internen Liste}%^^A -% \changes{v3.19}{2015/07/29}{\cs{par@update} darf erst nach -% \cs{begin{document}} wieder \cs{default@par@update} werden}%^^A -% Über dieses Makro wird die Änderung der Absatzparameter |\parskip|, -% |\parindent|, |\parfillskip| gesetzt. Das erste Argument ist der Einzug, das -% zweite der Abstand und das dritte die Füllung. Aktiviert werden die -% Änderungen wie bei |\fontsize| über |\selectfont|. Obwohl in der -% Voreinstellung absolut gearbeitet wird, wird hier intern -% |\par@updaterelative| verwendet. +% \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}% @@ -152,145 +172,123 @@ \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{half+}% \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{half*}% } -% \end{macrocode} -% \begin{macro}{\f@parindent} -% \changes{v2.95}{2004/11/05}{neu (intern)}%^^A -% Eingestellter Absatzeinzug. -% \begin{macro}{\f@parskip} -% \changes{v2.8i}{2001/07/22}{neu (intern)}%^^A -% \changes{v2.95}{2004/11/05}{Bedeutung geändert}%^^A -% Eingestellter Absatzabstand. -% \begin{macro}{\f@parfillskip} -% \changes{v2.8i}{2001/07/22}{neu (intern)}%^^A -% \changes{v2.95}{2004/11/05}{Bedeutung geändert}%^^A -% Eingestellte Absatzfüllung. -% -% Diese drei Werte werden automatisch bei der Font-Initialisierung eingestellt -% und sind vorher ungültig! -% \begin{macrocode} \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}% } -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\par@update} -% \changes{v2.95}{2004/11/05}{neues internes Macro}%^^A -% \changes{v3.20}{2016/02/22}{wird möglichst früh \cs{AtBeginDocument} -% ausgeführt}%^^A -% Dieses Makro wird später in |\selectfont| die Änderung vornehmen. -% \begin{macro}{\default@par@update} -% \changes{v2.95}{2004/11/05}{neues internes Macro}%^^A -% In der Voreinstellung findet keine Änderung statt. Dies wird jedoch durch -% die Auswahl einer entsprechenden Option geändert. -% \begin{macrocode} \newcommand*{\par@update}{} \let\par@update\relax \newcommand*{\default@par@update}{} \let\default@par@update\relax \AtBeginDocument{\par@update} +%</option> % \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{option}{parskip} -% \changes{v2.8i}{2001/07/22}{neue Option}%^^A -% \changes{v2.95}{2006/03/11}{primäre \textsf{keyval}-Option}%^^A -% \changes{v3.08}{2010/12/14}{neuer Wert \texttt{never}}%^^A -% \changes{v3.12}{2013/03/05}{Nutzung der Status-Signalisierung mit -% \cs{FamilyKeyState}.}%^^A -% \changes{v3.17}{2015/03/10}{Wert wird gespeichert}%^^A -% \changes{v3.26b}{2019/02/01}{\cs{baselineskip} durch 1\cs{baselineskip} -% ersetzt}%^^A -% \begin{option}{parskip-} -% \changes{v2.8l}{2001/08/16}{neue Option}%^^A -% \changes{v2.95}{2006/03/11}{obsolet}%^^A -% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} durch \cs{PackageInfoNoLine} -% ersetzt}%^^A -% \changes{v3.01a}{2008/11/20}{deprecated}%^^A -% \begin{option}{parskip+} -% \changes{v2.8i}{2001/07/22}{neue Option}%^^A -% \changes{v2.95}{2006/03/11}{obsolet}%^^A -% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} durch \cs{PackageInfoNoLine} -% ersetzt}%^^A -% \changes{v3.01a}{2008/11/20}{deprecated}%^^A -% \begin{option}{parskip*} -% \changes{v2.8i}{2001/07/22}{neue Option}%^^A -% \changes{v2.95}{2006/03/11}{obsolet}%^^A -% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} durch \cs{PackageInfoNoLine} -% ersetzt}%^^A -% \changes{v3.01a}{2008/11/20}{deprecated}%^^A -% \begin{option}{halfparskip} -% \changes{v2.8i}{2001/07/22}{neue Option}%^^A -% \changes{v2.95}{2006/03/11}{obsolet}%^^A -% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} durch \cs{PackageInfoNoLine} -% ersetzt}%^^A -% \changes{v3.01a}{2008/11/20}{deprecated}%^^A -% \begin{option}{halfparskip-} -% \changes{v2.8l}{2001/08/16}{neue Option}%^^A -% \changes{v2.95}{2006/03/11}{obsolet}%^^A -% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} durch \cs{PackageInfoNoLine} -% ersetzt}%^^A -% \changes{v3.01a}{2008/11/20}{deprecated}%^^A -% \begin{option}{halfparskip+} -% \changes{v2.8i}{2001/07/22}{neue Option}%^^A -% \changes{v2.95}{2006/03/11}{obsolet}%^^A -% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} durch \cs{PackageInfoNoLine} -% ersetzt}%^^A -% \changes{v3.01a}{2008/11/20}{deprecated}%^^A -% \begin{option}{halfparskip*} -% \changes{v2.8i}{2001/07/22}{neue Option}%^^A -% \changes{v2.95}{2006/03/11}{obsolet}%^^A -% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} durch \cs{PackageInfoNoLine} -% ersetzt}%^^A -% \changes{v3.01a}{2008/11/20}{deprecated}%^^A -% \begin{option}{parindent} -% \changes{v2.8i}{2001/07/22}{neue Option}%^^A -% \changes{v2.95}{2006/03/11}{obsolet}%^^A -% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} durch \cs{PackageInfoNoLine} -% ersetzt}%^^A -% \changes{v3.01a}{2008/11/20}{deprecated}%^^A -% Diese neun Optionen steuern die Umschaltung zwischen den Modi. Dabei -% schalten alle \texttt{parskip}-Optionen einen Absatzabstand ein, -% wohingegen die \texttt{parindent}-Option den Absatzeinzug -% einschaltet. Die \texttt{+}-Variante sorgt außerdem dafür, dass -% die letzte Zeile eines Absatzes maximal zu zwei Dritteln gefüllt -% wird. Entsprechend sorgt die \texttt{*}-Variante für eine maximale -% Füllung von drei Vierteln. Die normale Variante sorgt lediglich -% für einen freien Raum von 1\,em. Die \texttt{-}-Variante sorgt für -% überhaupt nichts. -% \begin{macro}{\scr@parindent} -% \changes{v2.95}{2004/11/05}{neu (intern)}%^^A -% Der einzustellende Absatzeinzug. -% \begin{macro}{\scr@parskip} -% \changes{v2.8i}{2001/07/22}{neu (intern)}%^^A -% \changes{v2.95}{2004/11/05}{Bedeutung geändert}%^^A -% Der einzustellende Absatzabstand. -% \begin{macro}{\scr@parfillskip} -% \changes{v2.8i}{2001/07/22}{neu (intern)}%^^A -% \changes{v2.95}{2004/11/05}{Bedeutung geändert}%^^A -% Die einzustellende Absatzfüllung. +% 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} -\newcommand*{\scr@parindent}{1em} -\newcommand*{\scr@parskip}{\z@} -\newcommand*{\scr@parfillskip}{\z@ \@plus 1fil} +%<*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} -% \end{macro} -% \end{macro} +% \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 % -% Neu bei \KOMAScript-3 ist, dass die Optionen wie bei \textsf{scrlttr2} über -% eine eingzige \textsf{keyval} gesetzt werden können. +% \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}{% @@ -417,59 +415,41 @@ \KOMA@DeclareDeprecatedOption{parindent}{parskip=false} \KOMA@kav@add{.\KOMAClassFileName}{parskip}{false} \KOMA@kav@add{.\KOMAClassFileName}{parskip}{absolute} -% \end{macrocode} -% \end{option} -% \end{option} -% \end{option} -% \end{option} -% \end{option} -% \end{option} -% \end{option} -% \end{option} -% \end{option} -% -% Hierfür\marginline{Geplant!} sollte eine keyval-Option mit Werten definiert -% werden. Dazu dann neue Werte für absolutes oder relatives Verhalten. -% -% \iffalse %</option> -%<*body> -% \fi -% +% \end{macrocode} +% \end{option}^^A parindent … halfparskip* +% \end{option}^^A parskip % -% \subsection{Abatzformatierung} +% \changes{v2.8i}{2001/07/22}{don't change \cs{baselinestretch}} % -% \changes{v2.8i}{2001/07/22}{\cs{baselinestretch} wird nicht -% umdefiniert} -% \begin{Length}{lineskip} -% \begin{Length}{normallineskip} -% Minimaler Zeilenabstand: +% \begin{length}{\lineskip,\normallineskip} +% The minimum line skip. % \begin{macrocode} +%<*body> \setlength{\lineskip}{\p@} \setlength{\normallineskip}{\p@} % \end{macrocode} -% \end{Length} -% \end{Length} -% -% \begin{Length}{columnsep} -% \begin{Length}{columnseprule} -% Spaltenabstand und Spaltentrennlinie (nicht bei Briefen): -% \begin{macrocode} -%<*!letter> -\setlength{\columnsep}{10\p@} -\setlength{\columnseprule}{\z@} -%</!letter> -% \end{macrocode} -% \end{Length} -% \end{Length} +% \end{length} % -% \selectlanguage{english} -% \begin{macro}{\selectfont} +% \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} -% Note, we use 2021/05/01 instead of the official \LaTeX{} release date, -% because there were relevant earlier \LaTeX{} developer releases with that -% date. +% 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}% @@ -503,25 +483,6 @@ }% }% }{% -% \end{macrocode} -% \selectlanguage{ngerman} -% \changes{v2.95}{2004/11/05}{neue Änderung} -% Spätestens ab Version~3.0 soll die Möglichkeit bestehen, |\parskip|, -% |\parindent| und |\parfillskip| mit der Schriftgröße automatisch -% anzupassen. Dazu muss |\selectfont| entsprechend erweitert werden. -% \begin{macro}{\scr@selectfont} -% \changes{v2.95}{2006/04/14}{neue Erweiterung} -% \changes{v3.10}{2010/09/28}{\textsf{everysel}-Behandlung korrigiert} -% \changes{v3.10}{2010/09/28}{\textsf{tracefnt}-Behandlung hinzugefügt} -% \begin{macro}{\scr@new@selectfont} -% \changes{v2.95}{2006/04/14}{neue Erweiterung} -% \changes{v3.10}{2010/09/28}{\textsf{everysel}-Behandlung korrigiert} -% \changes{v3.10}{2010/09/28}{\textsf{tracefnt}-Behandlung hinzugefügt} -% \changes{v3.10b}{2011/03/13}{\textsf{everysel} kann jetzt auch während -% \cs{begin}\marg{document} geladen werden} -% Damit das auch bei Verwendung des \textsf{everysel}-Pakets funktioniert, -% wird hier zusätzliche Vorsorge getroffen. -% \begin{macrocode} \newcommand*{\scr@selectfont}{} \expandafter\let\expandafter\scr@selectfont\csname selectfont \endcsname \BeforePackage{everysel}{% @@ -535,12 +496,6 @@ }% \AfterPackage{everysel}{% \scr@ifundefinedorrelax{@EverySelectfont@Init}{% -% \end{macrocode} -% Jetzt gibt es zwei Möglichkeiten: Entweder wurde ein \textsf{everysel} -% verwendet, bei dem alles anders funktioniert, oder es wurde während -% \cs{begin}\marg{document} geladen. In beiden Fällen versuchen wir einen -% direkten Patch: -% \begin{macrocode} \expandafter\ifx\csname selectfont \endcsname\scr@new@selectfont \ClassWarningNoLine{\KOMAClassName}{% \string\selectfont\space already changed}% @@ -550,9 +505,6 @@ \csname selectfont \endcsname \fi }{% -% \end{macrocode} -% In diesem Fall muss hingegen indirekt gepatcht werden. -% \begin{macrocode} \g@addto@macro\@EverySelectfont@Init{% \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}% \expandafter\let\expandafter\scr@new@selectfont @@ -570,106 +522,22 @@ \expandafter\let\expandafter\scr@new@selectfont\csname selectfont \endcsname } % \end{macrocode} -% \end{macro} -% \end{macro} -% \begin{macro}{\par@updaterelative} -% \changes{v2.95}{2004/11/05}{neues internes Macro}%^^A -% Die eigentliche Änderung verbirgt sich in |\par@updaterelative|. Ggf. wird -% |\par@update| zu |\par@updaterelative|. -% \begin{macrocode} -\newcommand*{\par@updaterelative}{% -% \end{macrocode} -% Die neuen Werte werden nur gesetzt, wenn die bisherigen Werten den -% erwarteten Werten entsprechen. Sonst lassen wir lieber die Finger davon, -% weil wir dann davon ausgehen, dass der Anwender die so setzen wollte. -% \begin{macrocode} - \begingroup - \edef\@tempa{\the\parindent}\ifx\@tempa\f@parindent - \aftergroup\parindent@update -%<*trace> - \else - \ClassInfo{\KOMAClassName}{\string\parindent\space not changed}% -%</trace> - \fi - \edef\@tempa{\the\parskip}\ifx\@tempa\f@parskip - \aftergroup\parskip@update -%<*trace> - \else - \ClassInfo{\KOMAClassName}{\string\parskip\space not changed}% -%</trace> - \fi - \edef\@tempa{\the\parfillskip}\ifx\@tempa\f@parfillskip - \aftergroup\parfillskip@update -%<*trace> - \else - \ClassInfo{\KOMAClassName}{\string\parfillskip\space not changed}% -%</trace> - \fi - \endgroup -} -% \end{macrocode} -% \begin{macro}{\parindent@update} -% \changes{v2.95}{2004/11/05}{neues internes Macro}%^^A -% \begin{macro}{\parskip@update} -% \changes{v2.95}{2004/11/05}{neues internes Macro}%^^A -% \begin{macro}{\parfillskip@update} -% \changes{v2.95}{2004/11/05}{neues internes Macro}%^^A -% Ein paar Hilfsmakros. -% \begin{macrocode} -\newcommand*{\parindent@update}{% - \scr@defaultunits\parindent\scr@parindent - \begingroup - \let\@tempb\endgroup - \edef\@tempa{\the\parindent}\ifx\@tempa\f@parindent\else - \def\@tempb{\endgroup\edef\f@parindent{\the\parindent}}% -%<trace> \ClassInfo{\KOMAClassName}{\string\parindent=\the\parindent}% - \fi - \@tempb -} -\newcommand*{\parskip@update}{% - \scr@defaultunits\parskip\scr@parskip - \begingroup - \let\@tempb\endgroup - \edef\@tempa{\the\parskip}\ifx\@tempa\f@parskip\else - \def\@tempb{\endgroup\edef\f@parskip{\the\parskip}}% -%<trace> \ClassInfo{\KOMAClassName}{\string\parskip=\the\parskip}% - \fi - \@tempb -} -\newcommand*{\parfillskip@update}{% - \scr@defaultunits\parfillskip\scr@parfillskip - \begingroup - \let\@tempb\endgroup - \edef\@tempa{\the\parfillskip}\ifx\@tempa\f@parfillskip\else - \def\@tempb{\endgroup\edef\f@parfillskip{\the\parfillskip}}% -%<trace> \ClassInfo{\KOMAClassName}{\string\parfillskip=\the\parfillskip}% - \fi - \@tempb -} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} +% \end{macro}^^A \scr@selectfont,\scr@new@selectfont +% \end{command}^^A \selectfont % % \begin{macro}{\scr@defaultunits} -% \changes{v2.95}{2004/11/05}{neues internes Macro}%^^A -% \changes{v3.19}{2015/08/22}{\cs{setlength} wegen \textsf{tikz} -% eliminiert}%^^A +% \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}{neues internes Macro}%^^A +% \changes{v2.95}{2004/11/05}{added} % \begin{macro}{\scr@@@defaultunits} -% \changes{v2.95}{2004/11/05}{neues internes Macro}%^^A -% \changes{v3.19}{2015/08/22}{\cs{setlength} und \cs{addtolength} wegen -% \textsf{tikz} eliminiert}%^^A -% Damit |\par@updaterelative| überhaupt funktionieren kann, wird -% |\scr@defaultunits| benötigt. Dieses Makro arbeitet prinzipiell wie -% |\@defaultunits| bekommt aber Dimension bzw. Skip als erstes und den Wert -% als zweites Argument. Als Besonderheit dürften im Wert auch andere -% Dimensions bzw. Skips vor und nach \texttt{plus} und \texttt{minus} -% verwendet werden. Es sind also auch Angaben der Art "`\texttt{12 plus 1 -% minus 2}"' sowie -% "`\texttt{\string\baselineskip\string\@plus.1\string\baselineskip}"' -% gültig. +% \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 @@ -702,23 +570,27 @@ \advance#1\@tempskipa \fi } +%</body> % \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} +% \end{macro}^^A \scr@@@defaultunits +% \end{macro}^^A \scr@@defaultunits +% \end{macro}^^A \scr@defaultunits +% +% \subsection{Extra list code} % -% Absatzabstand und Absatzeinzug: % \begin{macro}{\@list@extra} -% \changes{v2.8q}{2001/11/06}{neu (intern)}%^^A -% \changes{v2.95c}{2006/08/03}{\cs{parsep} fixed} +% \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}{neu (intern)}%^^A -% Ab Version 2.8i wird hier optionsabhängig gearbeitet. Dabei müssen -% auch die Befehle bei der Umschaltung der Schriftgröße für \cs{small} -% und \cs{footnotesize} geändert werden. +% \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 } @@ -726,20 +598,27 @@ \expandafter\let\csname #1@listi\endcsname=\@listi \def\@listi{\csname #1@listi\endcsname\@list@extra}% } +%</body> % \end{macrocode} -% \end{macro} -% \end{macro} +% \end{macro}^^A \@list@extra +% \end{macro}^^A \add@extra@listi +% +% \subsection{Patching other packages} % -% \selectlanguage{english} -% \begin{macro}{\deferred@thm@head}%^^A -% \changes{v3.27}{2019/02/10}{new patch of \textsf{amsthm}}%^^A -% Unfortunatly \Package{amsthm} has a problem if a class handles \cs{topsep} -% this way, because it is only prepared for the case, that \cs{parskip} and -% \cs{parsep} are changed manually without influence to \cs{topsep}. So the +% \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}}{}{% @@ -753,37 +632,33 @@ }% }% } +%</body> % \end{macrocode} % \end{macro} -% \selectlanguage{ngerman} -% \iffalse -%</body> -%</class> -%<*class|clo> -%<*body|10pt|11pt|12pt> -% \fi -% \changes{v2.98c}{2008/03/26}{Umstellung für die pt-Dateien}%^^A -% \changes{v3.17}{2015/03/25}{Aktualisierung der Absatzeinstellungen}%^^A +% +% \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} durch \cs{l@addto@macro} -% ersetzt} +% \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} -% \changes{v2.98c}{2008/03/27}{\cs{g@addto@macro} durch \cs{l@addto@macro} -% ersetzt} -% \begin{macro}{\@listiii} -% \changes{v2.98c}{2008/03/27}{\cs{g@addto@macro} durch \cs{l@addto@macro} -% ersetzt} -% \begin{macro}{\footnotesize} -% \changes{v2.9h}{2002/09/03}{etwas robuster}%^^A -% \changes{v2.98c}{2008/03/27}{\cs{g@addto@macro} durch \cs{l@addto@macro} -% ersetzt} -% \begin{macro}{\small} -% \changes{v2.9h}{2002/09/03}{etwas robuster}%^^A -% \changes{v2.98c}{2008/03/27}{\cs{g@addto@macro} durch \cs{l@addto@macro} -% ersetzt} +% \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}% @@ -794,46 +669,56 @@ \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} -% \end{macro} -% \end{macro} -% \end{macro} -% \iffalse -%</body|10pt|11pt|12pt> -%</class|clo> -%<*class> -%<*body> -% \fi % % -% \subsection{Umbruchsteuerung} +% \subsection{Page layout parameters} % -% Für die Umbruchsteuerung sind einige Penalties zuständig. Diese sind -% im \LaTeX-Kern definiert. Leider sind \cs{@lowpenalty}, -% \cs{@medpenalty} und \cs{@highpenalty} aber nicht mit -% Voreinstellungen versehen, besitzen einheitlich die Voreinstellung -% 0. Hier werden deshalb die Werte aus den Standardklassen übernommen: +% \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} % % -% \iffalse -%</body> +% \begin{macrocode} %</class> -% \fi -% +% \end{macrocode} +% % \Finale -% +% \PrintChanges +% \endinput -% -% end of file `scrkernel-paragraphs.dtx' -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: +% 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: + |