summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx')
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx1006
1 files changed, 478 insertions, 528 deletions
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx b/macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx
index 1759c2990d..fb9d791ef0 100644
--- a/macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx
+++ b/macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx
@@ -1,8 +1,7 @@
-% \CheckSum{1774}
% \iffalse meta-comment
% ======================================================================
% scrkernel-letterclassoptions.dtx
-% Copyright (c) Markus Kohm, 2006-2020
+% Copyright (c) Markus Kohm, 2006-2022
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
@@ -18,118 +17,103 @@
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in manifest.txt.
-% ----------------------------------------------------------------------
-% scrkernel-letterclassoptions.dtx
-% Copyright (c) Markus Kohm, 2006-2020
-%
-% 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-letterclassoptions.dtx 3453 2020-02-25 07:33:30Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 3730 2022-02-26 14:38:06Z kohm $
%<option>%%% (run: option)
%<head>%%% (run: head)
%<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: 2020-02-25 08:33:30 +0100 (Tue, 25 Feb 2020) $
+ \filedate$Date: 2022-02-26 15:38:06 +0100 (Sa, 26. Feb 2022) $
\def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3453 $
+ \filerevision$Revision: 3730 $
\endgroup
\ProvidesFile{scrkernel-letterclassoptions.dtx}
[\filedate\space \filerevision\space
- KOMA-Script source (letter class options)]
-% \iffalse
-\documentclass{scrdoc}
-\usepackage[english,ngerman]{babel}
-\CodelineIndex
-\RecordChanges
-\GetFileInfo{scrkernel-letterclassoptions.dtx}
-\title{\KOMAScript{} \partname\ \texttt{\filename}%
- \footnote{Dies ist Version \fileversion\ von Datei \texttt{\filename}.}}
-\date{\filedate}
-\author{Markus Kohm}
-
+ KOMA-Script source (letter configuration options)]
+\documentclass[USenglish]{koma-script-source-doc}
+\usepackage{babel}
+\setcounter{StandardModuleDepth}{2}
\begin{document}
- \maketitle
- \tableofcontents
- \DocInput{\filename}
+\DocInput{scrkernel-letterclassoptions.dtx}
\end{document}
%</dtx>
% \fi
%
-% \selectlanguage{ngerman}
+% \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}
%
-% \changes{v2.95}{2006/03/22}{%
-% erste Version aus der Aufteilung von \textsf{scrclass.dtx}}
%
-% \section{Optionendateien für Briefe}
+% \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
%
-% Bei der Briefklasse tritt eine Besonderheit ein. Hier ist es
-% möglich, spezielle \texttt{lco}-Dateien zu definieren, die über
-% Optionen geladen werden können. Die unterschiedlichen Brieftypen
-% sind ein Fall für solche \emph{\textbf{l}etter \textbf{c}lass
-% \textbf{o}ption} Dateien.
+% \section{User Manual}
%
-% \StopEventually{\PrintIndex\PrintChanges}
+% 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}
%
-% \iffalse
-%<*letter>
-% \fi
+% \section{Implementation of the Handling of Letter Configuration Options}
%
-% \iffalse
-%<*option>
-% \fi
+% We need this feature only with letter classes and packages.
+%
+% \begin{macrocode}
+%<*(class|package)&letter>
+% \end{macrocode}
%
-% \subsection{Optionen für Letter-Class-Options}
+%
+% \subsection{Options for the letter configuration option files}
%
% \begin{macro}{\lco@test}
-% \changes{v2.95}{2006/03/22}{Neu}%^^A
-% \changes{v2.97c}{2007/09/12}{an neue Optionenabarbeitung angepasst}%^^A
-% Letter-Class-Optionen können auch für jede per |\documentclass| angegebene
-% keyval-Option oder sonstige scan-Option (das sind Optionen, die nicht per
-% |\DeclareOption| definiert wurden) geladen werden. Dabei wird die
-% Abarbeitung der Option nicht unterbrochen. Dazu wird dieses Makro in den
-% scan-Vorgang eingebaut
+% \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}{%
- \expandafter
-%<class> \AtEndOfClass
-%<package> \AtEndOfPackage
- \expandafter{%
+ \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{%
@@ -139,41 +123,41 @@
}%
}{}%
}
+%</class&option>
% \end{macrocode}
% \end{macro}
%
-% Als Voreinstellung wird am Ende schon einmal die Datei \texttt{DIN.lco}
-% geladen.
+% \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}
%
-% \iffalse
-%</option>
-%<*body>
-% \fi
%
% \subsection{Makros für Letter-Class-Options}
%
-% \begin{macro}{\LoadLetterOption}
-% \changes{v2.8q}{2001/10/08}{Neu}%^^A
-% \changes{v3.14}{2014/10/04}{Leerzeichen werden ignoriert}%^^A
-% \changes{v3.26}{2018/08/29}{Verwendung von \cs{scr@sp@def} statt
-% \cs{KV@@sp@def}}%^^A
-% Bei der neuen Briefklasse existiert eine Anweisung, mit der eine
-% \emph{\textbf{l}etter-\texttt{c}lass-\texttt{o}ption}-Datei geladen
-% werden kann. Das Laden wird mit entsprechender Information in der
-% \texttt{log}-Datei vermerkt. Damit in der Datei interne Makros
-% verwendet werden können, muss der catcode von "`@"' entsprechend
-% gesetzt sein. Damit der Befehl sowohl in der Präambel als auch in
-% weiteren Optionen-Dateien oder in der Klasse selbst verwendet werden
-% kann, muss der catcode am Ende wieder restauriert werden. Dabei muss
-% etwas trickreich gearbeitet werden, damit tatsächlich eine
-% Schachtelung möglich ist. So erfolgt die Umschaltung des catcodes
-% immer nur beim ersten Aufruf innerhalb einer Schachtel.
+% \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@}{}%
@@ -215,14 +199,13 @@
}%
% \end{macrocode}
% \changes{v3.18}{2015/06/03}{manage \cs{RequirePackage} and \cs{usepackage}
-% inside \texttt{lco}-files after \cs{begin\{document\}}}%^^A
-% \changes{v3.28}{2019/11/24}{Tippfehler bezüglich \cs{usepackage}
-% beseitigt}%^^A
-% Ehrlich gesagt, glaube ich nicht, dass das folgende wirklich sinnvoll
-% funktioniert, wie es vermutlich gedacht war. Aber das eigentlich auch egal,
-% weil \cs{usepackage} und \cs{RequirePackage} in \texttt{lco}-Dateien, die im
-% Dokument geladen werden, ohnehin nicht funktioniert. Das sollte man gar
-% nicht erst probieren.
+% 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{%
@@ -256,18 +239,12 @@
}
% \end{macrocode}
% \begin{macro}{\lco@RequirePackage}
-% \changes{v3.18}{2015/06/03}{neue Anweisung (intern)}%^^A
-% \changes{v3.26}{2018/08/29}{Verwendung von \cs{scr@trim@spaces} statt
-% \cs{KV@@sp@def}}%^^A
-% Da \texttt{lco}-Dateien auch noch nach \cs{begin\{document\}} geladen werden
-% können, wird hier sinnvoll auf die Anforderung von Paketen in diesem Fall
-% reagiert. In der ersten Ausbaustufe wird eine sinnvolle Fehlermeldung
-% ausgegeben. Irgend wann einmal später könnte man sich eventuell noch etwas
-% besseres einfallen lassen.
-% Das erste, optionale Argument sind ggf. Optionen. Diese werden jedoch an
-% dieser Stelle einfach ignoriert. Das zweitem, obligatorische Argument ist
-% eine Liste von Paketen. Das dritte, optionale Argument ist die Version der
-% Pakete, die an dieser Stelle ebenfalls ignoriert wird.
+% \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
@@ -290,16 +267,16 @@
\scr@gobbleopt
}
% \end{macrocode}
-% \end{macro}%^^A \lco@RequirePackage
-% \end{macro}%^^A \LoadLetterOption
-% \begin{macro}{\LoadLetterOptions}
-% \changes{v3.14}{2014/10/04}{Neue Anweisung}%^^A
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} eingefügt und damit
-% Leerzeichen zwischen den Einträgen erlaubt}%^^A
-% \changes{v3.26}{2018/08/29}{Behandlung für (nicht mehr mögliche)
-% Leerzeicheneinträge entfernt}%^^A
-% Funktioniert prinzipiell wie \cs{LoadLetterOption}, aber es werden mehrere,
-% durch Komma getrennte Optionen unterstützt.
+% \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
@@ -314,28 +291,24 @@
\reserved@a
}
% \end{macrocode}
-% \end{macro}%^^A \LoadLetterOptions
+% \end{command}^^A \LoadLetterOptions
%
-% \begin{macro}{\LetterOptionNeedsPapersize}
-% \changes{v2.8q}{2001/10/17}{Neu}%^^A
-% Es besteht die Möglichkeit, in \texttt{lco}-Dateien eine bestimmte
-% Papiergröße zu fordern. Dazu wird der Name der \texttt{lco}-Datei
-% und die geforderte Papiergröse als Parameter übergeben. Stimmt die
-% Papiergröße nicht überein, so wird bei \cs{opening} eine Warnung
-% ausgegeben.
+% \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}{Neu (intern)}%^^A
-% \changes{v3.12}{2013/11/05}{Abweichung von 1\,mm nach unten und oben
-% erlaubt}%^^A
-% \changes{v3.23}{2017/02/22}{Verwendung des neuen \cs{PaperNameToSize}}%^^A
-% \begin{macro}{\@@PapersizeWarning}
-% \changes{v2.8q}{2002/03/25}{Neu (intern)}%^^A
-% \begin{macro}{\LOPNP@size}
-% \changes{v2.8q}{2002/03/25}{Neu (intern)}%^^A
-% \begin{macro}{\LOPNP@option}
-% \changes{v2.8q}{2002/03/25}{Neu (intern)}%^^A
-% Zur einfacheren Realisierung wird mit vier internen Hilfsmakros
-% gearbeitet.
+% \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}{}
@@ -413,54 +386,43 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
% \begin{macrocode}
\newcommand*{\LetterOptionNeedsPapersize}[2]{%
\edef\LOPNP@size{#2}\edef\LOPNP@option{#1}%
}
-% \end{macrocode}
-% \end{macro}
-%
-% \iffalse
%</body>
-%</letter>
-% \fi
+% \end{macrocode}
+% \end{command}
%
-% \subsection{Die Letter-Class-Optionen}
+% \begin{macrocode}
+%</(class|package)&letter>
+% \end{macrocode}
+%
+% \section{Implementation of the Letter Configuration Option Files}
%
-% Die Letter-Class-Optionen selbst werden wie bereits erwähnt über Dateien
-% realisiert. In den vorgefertigen Dateien für unterschiedliche Arten von
-% Briefen werden in erster Linie Pseudo-Längen passend gesetzt. In einigen
-% Fällen werden aber auch zusätzlich Befehle umdefiniert.
+% 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.
%
-% \iffalse
+% \begin{macrocode}
%<*lco>
-% \fi
-%
-% \subsubsection{Der Datei Kopf}
-%
-% \iffalse
-%<*head>
-% \fi
+% \end{macrocode}
+%
+% \subsection{The file header}
%
-% Im Kopf ist natürlich die Datei zu deklarieren:
-% \changes{v3.04}{2009/04/21}{neue LCO \texttt{NF} von Jean-Marie Pacquet
-% übernommen und ergänzt}%^^A
-% \changes{v3.04}{2009/06/26}{neue LCO \texttt{USletter2w} in Zusammenarbeit
-% mit Engelbert Buxbaum und Richard Ar\`es geschaffen}%^^A
-% \changes{v3.04}{2009/06/29}{neue LCO \texttt{UScommercial9DW} für Papier im
-% Format letter oder legal in Umschlägen im Format commercial No.\,9 mit
-% zwei Fenstern}%^^A
-% \changes{v3.04}{2009/06/30}{neue LCO \texttt{UScommercial9} für Papier im
-% Format letter oder legal in Umschlägen im Format commercial No.\,9 mit
-% einem Fenster auf Basis von
-% \texttt{http://www.envelopesuperstore.com/}}%^^A
-% \changes{v3.04}{2009/06/26}{seit langem existierende LCO \texttt{visualize}%^^A
-% zur Visualisierung einiger Pseudolängen aufgenommen}%^^A
-% \changes{v3.17}{2015/02/17}{neue LCOs \texttt{DIN5008A} und
-% \texttt{DIN5008B}}%^^A
+% 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%
@@ -479,7 +441,7 @@
.lco}[\KOMAScriptVersion\space letter-class-option]
% \end{macrocode}
%
-% Manche \texttt{LCO}-Dateien bauen auf anderen auf:
+% Some of the \file{LCO} files need others:
% \begin{macrocode}
%<*5008>
\LoadLetterOption{%
@@ -489,55 +451,51 @@
%</5008>
% \end{macrocode}
%
-% \begin{macro}{\LCOWarningNoLine}
-% \changes{v2.95}{2006/03/24}{Neu}%^^A
-% \begin{macro}{\LCOWarning}
-% \changes{v2.95}{2006/03/24}{Neu}%^^A
-% Außerdem wird ein Makro benötigt, das analog zu |\ClassWarningNoLine| oder
-% |\PackageWarningNoLine| funktioniert.
+% \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
+ (#1)\@spaces\@spaces\@spaces\@spaces\@spaces\@spaces\@spaces\@spaces
}{%
- Letter class option #1 Warning: #2%
+ Letter configuration option #1 Warning: #2%
}%
}
%</!5008>
-% \end{macro}
-% \end{macro}
-%
-% \iffalse
%</head>
-%<*body>
-%<*!visualize>
-% \fi
+% \end{macrocode}
+% \end{command}
+%
%
-% \subsubsection{Der Hauptteil}
+% \subsection{Main part of layout option files}
%
-% Die Maße für einige Optionen wurden nicht von mir selbst recherchiert:
+% The dimensions of some of the options has been researched by others:
% \begin{center}
% \begin{tabular}{ll}
-% \texttt{lco}-Datei & Recherchiert von \\\hline\\[-1.6ex]
-% DIN & mir \\
-% DINmtext & mir \\
-% DIN5008A & mir \\
-% DIN5008B & mir \\
-% KOMAold & mir \\
+% \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 & mir \\
-% UScommercial9DW & mir \\
-% \end{tabular}{ll}
+% UScommercial9 & me \\
+% UScommercial9DW & me \\
+% \end{tabular}
% \end{center}
%
-% Zunächst wird geprüft, ob überhaupt die richtige Klasse geladen ist.
+% Test for the correct class or package:
% \begin{macrocode}
+%<*body&!visualize>
%<*!5008>
\@ifundefined{scr@fromname@var}{%
\LCOWarningNoLine{%
@@ -552,7 +510,7 @@
%<UScommercial9> UScommercial9%
%<UScommercial9DW> UScommercial9DW%
}{%
- This letter class option file was made only\MessageBreak
+ 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
@@ -561,7 +519,7 @@
}{}
% \end{macrocode}
%
-% Dann wird geprüft, ob das richtige Papierformat vorhanden ist.
+% Make sure, the correct paper size has been used:
% \begin{macrocode}
\LetterOptionNeedsPapersize{%
%<DIN> DIN%
@@ -582,11 +540,9 @@
%</USletter2w|UScommercial9|UScommercial9DW>
% \end{macrocode}
%
-% Dann werden die Werte gesetzt.
-% \begin{description}
-% \item[ZIP-Code]
-% \changes{v3.03}{2009/03/04}{Bezeichner der Variablen \texttt{fromzipcode}%^^A
-% wird gesetzt}
+% 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}
@@ -594,29 +550,35 @@
%<NF> F}
%<USletter2w|UScommercial9|UScommercial9DW> US}
% \end{macrocode}
-% \item[Faltmarken]
-% \changes{v2.97e}{2007/11/20}{Die neuen Faltmarken werden berücksichtigt.}%^^A
+% \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}{%
+\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}{%
+\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@}
+\setplength{lfoldmarkhpos}{\z@}
% \end{macrocode}
-% \item[Anschrift]
+% \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}{%
+\setplength{toaddrvpos}{%
%<DIN|SN> 45mm}
%<DINmoretext> 27mm}
%<SwissLeft> 35.5mm}
@@ -624,16 +586,16 @@
%<NF> 35mm}
%<USletter2w> 1.8in}
%<UScommercial9|UScommercial9DW> 2.1875in}
-\@setplength{toaddrhpos}{%
+\setplength{toaddrhpos}{%
%<DIN|DINmoretext|SwissLeft> 20mm}
%<SN> -8mm}
%<KOMAold> 1in}
-%<KOMAold>\@addtoplength{toaddrhpos}{\oddsidemargin}
+%<KOMAold>\addtoplength{toaddrhpos}{\oddsidemargin}
%<NF> -10mm}
%<USletter2w> .73in}
%<UScommercial9> 0.6875in}
%<UScommercial9DW> .5625in}
-\@setplength{toaddrwidth}{%
+\setplength{toaddrwidth}{%
%<DIN|DINmoretext> 85mm}
%<SN> 90mm}
%<SwissLeft|NF> 100mm}
@@ -641,47 +603,45 @@
%<USletter2w> 3.11in}
%<UScommercial9> 4.5in}
%<UScommercial9DW> 3.625in}
-% \end{macrocode}
-% \changes{v3.03}{2009/06/25}{Anschriftfeld enthält laut Doku die
-% Rücksendeadresse, also machen wir das jetzt auch so}%^^A
-% \begin{macrocode}
-\@setplength{toaddrheight}{%
+\setplength{toaddrheight}{%
%<DIN|DINmoretext|SN|SwissLeft|KOMAold|NF> 45mm}
%<USletter2w> 1.17in}
%<UScommercial9|UScommercial9DW> 1.125in}
%</!5008>
-\@setplength{toaddrindent}{%
+\setplength{toaddrindent}{%
%<DIN|DINmoretext|SN|SwissLeft|KOMAold|USletter2w|UScommercial9|UScommercial9DW> \z@}
-%<*5008>
- 5mm}
-\@setplength{locvpos}{%
- \dimexpr\useplength{toaddrvpos}+\useplength{backaddrheight}}
-%</5008>
-%<*!5008>
+%<5008> 5mm}
%<NF> 10mm}
-\@setplength{backaddrheight}{%
+%<*!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}
+\setplength{specialmailindent}{\fill}
+\setplength{specialmailrightindent}{1em}
%</!5008>
%<*5008>
-\@setplength{specialmailindent}{\useplength{toaddrindent}}
-\@setplength{specialmailrightindent}{\z@}
+\setplength{specialmailindent}{\useplength{toaddrindent}}
+\setplength{specialmailrightindent}{\z@}
%</5008>
% \end{macrocode}
-% \item[Absenderergänzung]
+% \end{pseudolength}
+% \begin{pseudolength}{locvpos,locwidth,lochpos}
% \begin{macrocode}
-\@setplength{locwidth}{%
+%<*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>\setplength{lochpos}{10mm}
%<*!5008>
% \end{macrocode}
-% \item[Kopf]
+% \end{pseudolength}
+% \begin{pseudolength}{firstheadvpos,firstheadhpos,firstheadwidth}
% \begin{macrocode}
-\@setplength{firstheadvpos}{%
+\setplength{firstheadvpos}{%
%<DIN|DINmoretext|SN|SwissLeft> 8mm}
%<KOMAold> 6mm}
%<NF> 15mm}
@@ -689,59 +649,61 @@
%<UScommercial9|UScommercial9DW> .4375in}
%</!5008>
%<*5008>
-\@setplength{firstheadhpos}{%
+\setplength{firstheadhpos}{%
\dimexpr \useplength{toaddrhpos}+\useplength{toaddrindent}}
%</5008>
-\@setplength{firstheadwidth}{%
+\setplength{firstheadwidth}{%
%<KOMAold> \textwidth}
%<NF> 170mm}
%<*DIN|DINmoretext|SN|SwissLeft|UScommercial9>
\paperwidth}
\ifdim \useplength{toaddrhpos}>\z@
- \@addtoplength[-2]{firstheadwidth}{\useplength{toaddrhpos}}
+ \addtoplength[-2]{firstheadwidth}{\useplength{toaddrhpos}}
\else
- \@addtoplength[2]{firstheadwidth}{\useplength{toaddrhpos}}
+ \addtoplength[2]{firstheadwidth}{\useplength{toaddrhpos}}
\fi
%</DIN|DINmoretext|SN|SwissLeft|UScommercial9>
%<5008> \dimexpr 125mm-\useplength{firstheadhpos}}
%<*USletter2w>
\paperwidth}
-\@addtoplength[-]{firstheadwidth}{.68in}
+\addtoplength[-]{firstheadwidth}{.68in}
%</USletter2w>
%<*UScommercial9DW>
\paperwidth}
-\@addtoplength[-]{firstheadwidth}{.25in}
+\addtoplength[-]{firstheadwidth}{.25in}
%</UScommercial9DW>
% \end{macrocode}
-% \item[Fuß]
-% \changes{v2.9u}{2005/03/05}{Der Fuß hat optional eine feste Position 16\,mm
-% über der unteren Papierkante.}%^^A
+% \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{firstfootwidth}{\useplength{firstheadwidth}}
%<*5008>
-\@setplength{firstfoothpos}{%
+\setplength{firstfoothpos}{%
\dimexpr\useplength{toaddrhpos}+\useplength{toaddrindent}}%
-\@setplength{firstfootwidth}{%
+\setplength{firstfootwidth}{%
\dimexpr \paperwidth-\useplength{toaddrhpos}-\useplength{firstfoothpos}}%
%</5008>
-%<KOMAold>\@setplength{firstfootvpos}{\paperheight}
-%<KOMAold>\@addtoplength{firstfootvpos}{-2cm}
+%<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> \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> \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}
+%<NF>\setplength{firstfootvpos}{266.679mm}
% \end{macrocode}
-% \item[Geschäftszeile]
+% \end{pseudolength}
+% \begin{pseudolength}{refvpos,refaftervskip,refwidth}
% \begin{macrocode}
-%<!(5008&B)>\@setplength{refvpos}{%
+%<!(5008&B)>\setplength{refvpos}{%
%<DIN|SN> 98.5mm}
%<DINmoretext> 80.5mm}
%<5008&A> 79.4mm}
@@ -750,52 +712,45 @@
%<NF> \useplength{tfoldmarkvpos}}
%<USletter2w> 3.1in}
%<UScommercial9|UScommercial9DW> 3.4375in}
-\@setplength{refaftervskip}{%
+\setplength{refaftervskip}{%
%<!KOMAold&!5008> \baselineskip}
%<KOMAold> 2\baselineskip}
%<5008> 8.46mm}
%<*!5008>
% \end{macrocode}
-% Bei der Breite der Geschäftszeile brauchen wir wieder eine Sonderlösung,
-% damit die Option "`wide"' auch später noch gesetzt werden kann. Also
-% verwenden wir hier den Wert 0 als mit der Bedeutung "`ist bei \cs{opening}
-% zu berechnen.
+% 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}
+\setplength{refwidth}{0pt}
% \end{macrocode}
-% \item[Signature]
+% \end{pseudolength}
+% \begin{pseudolength}{sigindent,sigbeforevskip}
% \begin{macrocode}
-\@setplength{sigindent}{0mm}
-\@setplength{sigbeforevskip}{2\baselineskip}
+\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{description}
+% \end{pseudolength}
% \begin{macro}{\scr@default@firsthead@fromaddress@hook}
-% Einst folgte hier die Definition eines Hooks in der Form
-% \changes{v3.13b}{2014/10/04}{\cs{@firsthead} existiert nicht mehr, daher nun
-% mit einem neu geschaffenen \emph{hook}}%^^A
-% \changes{v3.27}{2019/04/02}{\emph{hook} entfernt}%^^A
-% \begin{macrocode}
-%<*DINmoretext&ignorethis>
-\def\scr@default@firsthead@fromaddress@hook{\def\\{,\ \@gobble}}
-%</DINmoretext&ignorethis>
-% \end{macrocode}
-% Da diese Definition fehlerhaft ist, korrekt wäre etwas wie:
-% \begin{macrocode}
-%<*DINmoretext&ignorethis>
-\def\scr@default@firsthead@fromaddress@hook{%
- \renewcommand*\\[1][]{,\ \ignorespaces}%
-}
-%</DINmoretext&ignorethis>
-% und das in 15 Jahren niemandem aufgefallen ist, wird davon ausgegangen, dass
-% davon nie jemand Gebrauch gemacht hat und wir deshalb einfach darauf
-% verzichten können.
-% \end{macrocode}
+% \changes{v3.13b}{2014/04/02}{added}
+% \changes{v3.27}{2019/04/02}{removed}
% \end{macro}
%
-% Außerdem gibt es noch die Kompatibilitätseinstellungen, die ebenfalls von
-% \texttt{KOMAold} aktiviert werden.
+% \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}}
@@ -834,6 +789,12 @@
\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}%
@@ -841,15 +802,6 @@
\Ifkomavarempty{fromaddress}{}{%
\strut\ignorespaces\usekomavar{fromaddress}}%
}
-% \end{macrocode}
-% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} durch \cs{Ifkomavarempty}
-% ersetzt}%^^A
-% Aufgrund der Änderung bezüglich \cs{ifkomavarempty}/\cs{Ifkomavarempty} wird
-% hier aus Kompatibilitätsgründen vorerst zweigleisig gefahren. Es kann aber
-% an dieser Stelle tatsächlich zu einer Inkompatibilität kommen, wenn jemand
-% den Code kopiert hat und jetzt eine neue Version von \KOMAScript{}
-% verwendet.
-% \begin{macrocode}
\ifx\@tempa\scr@backaddress@var%
\setkomavar{backaddress}{}
\else
@@ -892,16 +844,20 @@
\@ObsoleteCommand{\subjectafteroff}{subject=beforeopening}}
%</KOMAold>
% \end{macrocode}
+% \end{variable}
+% \end{macro}
+% \end{command}
%
-% Und für \texttt{DIN5008} braucht es dann noch einige zusätzliche
-% Einstellungen:
-% \changes{v3.30}{2020/02/25}{unerwünschtes Leerzeichen am Ende der Warnungen
-% beseitigt}%^^A
+%
+% \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}
+\newplength{specialmailheight}
+\setplength{specialmailheight}{12.7mm}
\areaset[5mm]{165mm}{233mm}
\KOMAoptions{%
fromalign=locationleft,
@@ -947,10 +903,12 @@
\endgroup
}
% \end{macrocode}
+% \end{macro}
+% \end{pseudolength}
% \begin{macro}{\backaddr@format}
-% \changes{v3.25}{2017/11/15}{Verwendung von \cs{scr@endstrut} statt
-% \cs{unskip}\cs{strut}}%^^A
-% Nicht unterstrichene, mehrzeilig oben ausgerichtete Rücksendeadresse.
+% \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]%
@@ -960,9 +918,9 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\specialmail@format}
-% \changes{v3.25}{2017/11/15}{Verwendung von \cs{scr@endstrut} statt
-% \cs{unskip}\cs{strut}}%^^A
-% Mehrzeilig oben ausgerichtete Versandart.
+% \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]%
@@ -973,7 +931,8 @@
}
% \end{macrocode}
% \end{macro}
-% Und Schrifteinstellungen:
+% \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}
@@ -983,33 +942,32 @@
\setkomafont{refvalue}{\sffamily\fontsize{10pt}{12pt}\selectfont}
\let\raggedsignature\raggedright
%</5008>
+%</body&!visualize>
% \end{macrocode}
+% \end{fontelement}
%
-% \iffalse
-%</!visualize>
-%<*visualize>
-% \fi
%
-% \subsection{Makros zur Visualisierung diverser Felder in einem Brief}
+% \subsection{Visualizing several fields of a letter}
%
-% Diese Makros werden nur von \texttt{visualize.lco} verwendet und stellen den
-% Hauptteil dieser LCO dar.
+% These macros are using be \file{visualize.lco} only.
%
-% Das Paket benötigt \textsf{eso-pic}.
-% \changes{v3.18}{2015/06/03}{lade \textsf{eso-pic} unbedingt}%^^A
+% 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{macro}{\showfields}
-% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} eingefügt}%^^A
-% Diese Anweisung erlaubt es, eine Reihe von Felder zu visualisieren. Dazu
-% gibt man die gewünschten Felder als Komma separierte Liste im ersten und
-% einzigen Argument der Anweisung an. Gibt man ein unbekanntes Feld an, so
-% wird nicht etwa ein Fehler, sondern nur eine Warnung ausgegeben. Die
-% Visualisierung erfolgt im Hintergrund. Dies wird mit Hilfe des Pakets
-% \textsf{eso-pic} erreicht. Wichtig ist noch, dass die Anweisung nicht
-% zurückgenommen werden kann.
+% \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{%
@@ -1035,33 +993,33 @@
}%
}
% \end{macrocode}
-% \begin{KOMAfont}{field}
-% Die Visualisierung erfolgt dabei in einer wählbaren Farbe, die über das
-% Element \cs{field} definiert ist. Voreingestellt ist dabei
-% \cs{normalcolor}.
+% \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{KOMAfont}
-% \end{macro}
+% \end{fontelement}
+% \end{command}
%
-% \begin{macro}{\showfield}
-% Die Visualisierung der einzelnen Felder erfolgt über eigene Anweisungen des
-% Aufbaus \cs{showfield@\emph{Feldname}}. In der Regel sind die Felder
-% rechteckig. Zur Visualisierung solcher Felder können daher einheitliche
-% Anweisungen verwendet werden. Diese besitzen vier Argumente:
-% \begin{enumerate}
-% \item Abstand vom linken Rand (x-Koordinate des Rahmens)
-% \item Abstand vom oberen Rand (y-Koordinate des Rahmens)
-% \item Breite des Feldes
-% \item Höhe des Feldes; ist dieser Wert negativ gibt es keine feste Höhe,
-% sondern nur eine Art unbestimmte Ausdehnung mit einer Mindesthöhe
-% \end{enumerate}
+% \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}
-% Diese Anweisung visualisiert ein rechteckiges Feld durch Rahmen. Bei einer
-% negativen Höhe wird ein unten offener Rahmen gezeichnet, bei dem die
-% vertikalen Linien als Pfeile nach unten ausgeführt werden.
+% 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
@@ -1088,9 +1046,12 @@
% \end{macro}
%
% \begin{macro}{\showfield@by@edges}
-% Diese Anweisung visualisert ein rechteckiges Feld, indem es die Ecken des
-% Feldes durch kleine Striche markiert. Bei negativer Höhe entfallen die
-% unteren Eckmarkierungen.
+% 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
@@ -1108,19 +1069,21 @@
\fi
}
% \end{macrocode}
-% \begin{macro}{\edgesize}
-% Die Länge der Ecklinien wird über dieses Makro bestimmt. Voreingestellt ist
-% 1\,ex.
+% \begin{command}{\edgesize}
+% The size of the edges is 1\,ex by default.
% \begin{macrocode}
\newcommand*{\edgesize}{1ex}
% \end{macrocode}
-% \end{macro}
+% \end{command}
% \end{macro}
%
% \begin{macro}{\showfield@by@rule}
-% Diese Anweisung visualisiert ein rechteckiges Feld, indem es das komplette
-% Feld einfärbt. Es wird hier nicht zwischen unten offenen und geschlossenen
-% Feldern unterschieden.
+% 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@
@@ -1132,16 +1095,21 @@
% \end{macrocode}
% \end{macro}
%
-% Die Voreinstellung für die Visualsierung ist mit Rahmen:
+% \begin{command}{\showfield}
+% The default is to use a frame.
% \begin{macrocode}
\newcommand*{\showfield}{}
\let\showfield\showfield@by@frame
% \end{macrocode}
+% \end{command}
%
-% \begin{macro}{\setshowstyle}
-% Dieser Stil der Visualisierung kann per Anweisung umgeschaltet
-% werden. Existiert ein Stil nicht, so wird kein Fehler gemldet, sondern
-% lediglich eine Warnung und der Standardstil verwendet:
+% \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}{%
@@ -1155,12 +1123,12 @@
}%
}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
+% \end{command}
+% \end{command}
%
-% Die folgenden Felder werden derzeit unterstützt:
+% Currently following fields are available:
% \begin{macro}{\showfield@test}
-% ein Testfeld \texttt{test} mit den Koordinaten:
+% \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}{%
@@ -1169,9 +1137,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\showfield@head}
-% \changes{v3.05}{2009/11/09}{neue Pseudo-Länge \texttt{firstheadhpos}%^^A
-% beachtet}
-% das Feld \texttt{head} für den Kopfbereich des Briefbogens:
+% \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
@@ -1199,9 +1166,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\showfield@foot}
-% \changes{v3.05}{2009/11/09}{neue Pseudo-Länge \texttt{firstfoothpos}%^^A
-% beachtet}
-% das Feld \texttt{foot} für den Fußbereich des Briefbogens:
+% \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
@@ -1229,9 +1195,9 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\showfield@address}
-% \changes{v3.07a}{2011/01/10}{Implementierung der Höhe an die Änderung in
-% \textsf{scrlttr}~3.03b angepasst.}
-% das Feld \texttt{address} für das Feld mit der Anschrift:
+% \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}%
@@ -1246,34 +1212,34 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\showfield@location}
-% \changes{v3.07a}{2011/01/10}{Implementierung der Höhe an die Änderung in
-% \textsf{scrlttr}~3.03b angepasst.}
-% das Feld \texttt{location} mit der Absenderergänzung:
+% \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}%
+ \setplength{locwidth}{\paperwidth}%
\ifdim \useplength{toaddrhpos}>\z@
- \@addtoplength[-2]{locwidth}{\useplength{toaddrhpos}}%
+ \addtoplength[-2]{locwidth}{\useplength{toaddrhpos}}%
\else
- \@addtoplength[2]{locwidth}{\useplength{toaddrhpos}}%
+ \addtoplength[2]{locwidth}{\useplength{toaddrhpos}}%
\fi
- \@addtoplength[-1]{locwidth}{\useplength{toaddrwidth}}%
+ \addtoplength[-1]{locwidth}{\useplength{toaddrwidth}}%
\if@bigloc%
- \@setplength[.66667]{locwidth}{\useplength{locwidth}}%
+ \setplength[.66667]{locwidth}{\useplength{locwidth}}%
\else%
- \@setplength[.5]{locwidth}{\useplength{locwidth}}%
+ \setplength[.5]{locwidth}{\useplength{locwidth}}%
\fi%
\fi%
\ifdim \useplength{lochpos}=\z@%
- \@setplength{lochpos}{\useplength{toaddrhpos}}%
+ \setplength{lochpos}{\useplength{toaddrhpos}}%
\fi
\ifdim \useplength{locvpos}=\z@%
- \@setplength{locvpos}{\useplength{toaddrvpos}}%
+ \setplength{locvpos}{\useplength{toaddrvpos}}%
\fi
\ifdim \useplength{locheight}=\z@%
- \@setplength{locheight}{\useplength{toaddrheight}}%
+ \setplength{locheight}{\useplength{toaddrheight}}%
\fi
\setlengthtoplength[-]{\@tempskipa}{lochpos}%
\ifdim \@tempskipa<\z@
@@ -1289,23 +1255,23 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\showfield@refline}
-% das Feld mit der Geschäftszeile:
+% \texttt{refline} is the reference line.
% \begin{macrocode}
\newcommand*{\showfield@refline}{%
\begingroup
\ifdim\useplength{refwidth}=\z@
\if@refwide
- \@setplength{refwidth}{\paperwidth}%
+ \setplength{refwidth}{\paperwidth}%
\ifdim \useplength{toaddrhpos}>\z@
- \@setplength{refhpos}{\useplength{toaddrhpos}}%
+ \setplength{refhpos}{\useplength{toaddrhpos}}%
\else
- \@setplength[-]{refhpos}{\useplength{toaddrhpos}}%
+ \setplength[-]{refhpos}{\useplength{toaddrhpos}}%
\fi
- \@addtoplength[-2]{refwidth}{\useplength{refhpos}}%
+ \addtoplength[-2]{refwidth}{\useplength{refhpos}}%
\else
- \@setplength{refwidth}{\textwidth}%
- \@setplength{refhpos}{\oddsidemargin}%
- \@addtoplength{refhpos}{1in}%
+ \setplength{refwidth}{\textwidth}%
+ \setplength{refhpos}{\oddsidemargin}%
+ \addtoplength{refhpos}{1in}%
\fi
\else\ifdim\useplength{refhpos}=\z@
\begingroup
@@ -1322,7 +1288,7 @@
\divide\@tempdima by\@tempdimc
\fi
\edef\@tempa{\noexpand\endgroup
- \noexpand\@setplength{refhpos}{\the\@tempdima}}%
+ \noexpand\setplength{refhpos}{\the\@tempdima}}%
\@tempa
\fi\fi
\showfield{\useplength{refhpos}}{\useplength{refvpos}}%
@@ -1332,19 +1298,24 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\showenvelope}
+% \begin{command}{\showenvelope}
% \begin{macro}{\@showenvelope}
% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}%^^A
-% \begin{macro}{\@@showenvelope}
-% \begin{macro}{\@@@showenvelope}
+% \cs{kernel@ifnextchar}}
+% \begin{macro}{\@@showenvelope,\@@@showenvelope}
% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
-% \cs{kernel@ifnextchar}}%^^A
-% Es kann auch ein Briefumschlag angezeigt werden. Dazu müssen verschiedene
-% Parameter des Umschlags bekannt sein. Der Umschlag wird immer hochkant auf
-% der aktuellen Seite angezeigt. Hierfür wird das Paket \textsf{graphicx}
-% benötigt.
-% \changes{v3.18}{2015/06/03}{lade \textsf{graphicx} unbedingt}%^^A
+% \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}{}
@@ -1400,14 +1371,6 @@
}
\def\@@showenvelope(#1,#2)(#3,#4)[#5]{%
% \end{macrocode}
-% Die Argumente sind:
-% \begin{enumerate}
-% \item Breite des Umschlags,
-% \item Höhe des Umschlags,
-% \item Abstand des Briefbogens vom linken und rechten Rand des Umschlags,
-% \item Abstand des Briefbogens vom oberen und unteren Rand des Umschlags,
-% \item optionale weitere Anweisungen, zum Setzen von Elementen.
-% \end{enumerate}
% \begin{macrocode}
\newpage
\vspace*{\fill}
@@ -1508,20 +1471,21 @@
\newpage
}
% \end{macrocode}
-% \begin{KOMAfont}{envelope}
-% Farbe des Umschlagrahmens.
+% \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{KOMAfont}
-% \begin{KOMAfont}{letter}
-% Farbe des getrichelten Briefbogens im Umschlag
+% \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{KOMAfont}
-% \begin{macro}{\unmeasuredFrame}
-% Ein Rahmen ohne Maßlinien.
+% \end{fontelement}
+% \begin{command}{\unmeasuredFrame}
+% Show a frame without measuring.
% \begin{macrocode}
\newcommand*{\unmeasuredFrame}{}
\def\unmeasuredFrame(#1,#2){%
@@ -1531,12 +1495,10 @@
\put(0,\LenToUnit{#2}){\line(0,-1){\LenToUnit{#2}}}%
}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\measuredFrameLB}
-% \begin{macro}{\measuredFrameLT}
-% \begin{macro}{\measuredFrameRB}
-% \begin{macro}{\measuredFrameRT}
-% Die Maßlinien für ein Rechteck.
+% \end{command}
+% \begin{command}{\measuredFrameLB,\measuredFrameLT,\measuredFrameRB,
+% \measuredFrameRT}
+% Show the measuring of a frame.
% \begin{macrocode}
\newcommand*{\measuredFrameLB}{}
\def\measuredFrameLB(#1,#2){%
@@ -1563,15 +1525,12 @@
\put(0,\LenToUnit{\expandafter\dimexpr #2+.5mm\relax}){\measureLineHT{#1}}%
}
% \end{macrocode}
+% \end{command}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\measureLineV}
-% Vertikale Maßlinie ohne Beschriftung:
+% \end{command}
+% \begin{command}{\measureLineV}
+% Vertical measuring without text.
% \begin{macrocode}
\newcommand*{\measureLineV}[1]{%
\begin{picture}(0,0)
@@ -1582,10 +1541,9 @@
\end{picture}
}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\measureLineVL}
-% \begin{macro}{\measureLineVR}
-% Vertikale Maßlinie mit Beschriftung links bzw. rechts.
+% \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)
@@ -1602,10 +1560,8 @@
\end{picture}
}
% \end{macrocode}
-% \begin{macro}{\ValPerUnit}
-% \begin{macro}{\unitfactor}
-% Zeige die Längen in \cs{unitlength} mit einer Genauigkeit von
-% 1/\cs{unitfactor} an.
+% \begin{command}{\ValPerUnit,\unitfactor}
+% Shows a length in \len{unitlength} with a accuracy of 1/\cs{unitfactor}.
% \begin{macrocode}
\newcommand*{\ValPerUnit}[1]{%
\begingroup
@@ -1617,12 +1573,9 @@
}
\newcommand*{\unitfactor}{1}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\measureLineH}
-% Horizontale Maßlinie ohne Beschriftung:
+% \end{command}
+% \begin{command}{\measureLineH}
+% Horizontal measuring without text.
% \begin{macrocode}
\newcommand*{\measureLineH}[1]{%
\begin{picture}(0,0)
@@ -1632,10 +1585,9 @@
\end{picture}
}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\measureLineHB}
-% \begin{macro}{\measureLineHT}
-% Horizontale Maßlinie mit Beschriftung darunter bzw. oben.
+% \end{command}
+% \begin{command}{\measureLineHB,\measureLineHT}
+% Horizontal measuring with text below or above.
% \begin{macrocode}
\newcommand*{\measureLineHB}[1]{%
\begin{picture}(0,0)
@@ -1654,19 +1606,18 @@
\end{picture}
}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{KOMAfont}{measure}
-% Farbe der Maßlinien.
+% \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{KOMAfont}
-% \end{macro}
+% \end{fontelement}
+% \end{command}
%
-% \begin{macro}{\showISOenvelope}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A
-% Zeigt einen DIN/ISO C4, C5, DL=C5/6, C6/5 Umschlag.
+% \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}{%
@@ -1696,11 +1647,11 @@
}%
}
% \end{macrocode}
-% \end{macro}
+% \end{command}
%
-% \begin{macro}{\showUScommercial}
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A
-% Zeige ein US commercial Umschlag der Nummer 9 und 10
+% \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}{%
@@ -1714,29 +1665,27 @@
}%
}
% \end{macrocode}
-% \end{macro}
+% \end{command}
%
-% \begin{macro}{\showUScheck}
-% Zeige einen US check Umschag.
+% \begin{command}{\showUScheck}
+% Show a US check envelope.
% \begin{macrocode}
\newcommand*{\showUScheck}{%
\showenvelope(8.625in,3.625in)%
}
+%</visualize&body>
% \end{macrocode}
-% \end{macro}
+% \end{command}
%
-% \iffalse
-%</visualize>
-%<*!visualize>
-% \fi
%
-% \begin{macro}{\showUSletterCixDW}
-% Ein Umschlag im Format commercial No. 9 mit 2 Fenstern,
-% Absenderfenster $3\frac{1}{2}\,\mathrm{in}\times\frac{7}{8}\,\mathrm{in}$,
-% $\frac{5}{16}\,\mathrm{in}$ von links und $2\frac{1}{2}\,\mathrm{in}$ von
-% unten.
+% \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}
-%<*UScommercial9DW>
+%<*!visualize&UScommercial9DW&body>
\newcommand*{\showUSletterCixDW}{%
\showUScommercial9[{%
\thicklines
@@ -1748,22 +1697,23 @@
(3.5in,.875in)%
}]%
}
-%</UScommercial9DW>
+%</!visualize&UScommercial9DW&body>
% \end{macrocode}
-% \end{macro}
+% \end{command}
%
-% \iffalse
-%</!visualize>
-%</body>
+% \begin{macrocode}
%</lco>
-% \fi
-%
+% \end{macrocode}
+%
% \Finale
-%
+% \PrintChanges
+%
\endinput
-%
-% end of file `scrkernel-letterclassoptions.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: