summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/koma-script/source/scraddr.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/koma-script/source/scraddr.dtx')
-rw-r--r--macros/latex/contrib/koma-script/source/scraddr.dtx325
1 files changed, 118 insertions, 207 deletions
diff --git a/macros/latex/contrib/koma-script/source/scraddr.dtx b/macros/latex/contrib/koma-script/source/scraddr.dtx
index e1c03e46d8..f01483bf59 100644
--- a/macros/latex/contrib/koma-script/source/scraddr.dtx
+++ b/macros/latex/contrib/koma-script/source/scraddr.dtx
@@ -1,8 +1,7 @@
-% \CheckSum{146}
% \iffalse meta-comment
% ======================================================================
% scraddr.dtx
-% Copyright (c) Markus Kohm, 2006-2019
+% Copyright (c) Markus Kohm, 2006-2022
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
@@ -18,44 +17,8 @@
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in manifest.txt.
-% ----------------------------------------------------------------------
-% scraddr.dtx
-% Copyright (c) Markus Kohm, 2006-2019
-%
-% 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: scraddr.dtx 3262 2019-10-10 08:25:29Z kohm $
+%%% From File: $Id: scraddr.dtx 3688 2022-02-10 08:26:37Z kohm $
%<*dtx>
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\ProvidesFile{scraddr.dtx}
@@ -64,7 +27,7 @@
%<driver>\ProvidesFile{scraddr.drv}
%<scraddr>\ProvidesPackage{scraddr}
%<*dtx|scraddr|driver>
- [2013/09/30 v1.1c KOMA-Script
+ [2022/01/24 v1.1d KOMA-Script
%</dtx|scraddr|driver>
%<scraddr> package]
%<*dtx|driver>
@@ -72,8 +35,8 @@
%</dtx|driver>
%<*dtx>
\ifx\documentclass\undefined
- \input docstrip.tex
- \@@input scrdocstrip.tex
+ \input scrdocstrip.tex
+ \@@input scrkernel-version.dtx
\@@input scrstrip.inc
\KOMAdefVariable{COPYRIGHTFROM}{2006}
\generate{\usepreamble\defaultpreamble
@@ -89,54 +52,44 @@
\endbatchfile
%</dtx>
%<*driver>
-\documentclass{scrdoc}
-\usepackage[english,ngerman]{babel}
-\CodelineIndex
-\RecordChanges
-\GetFileInfo{scraddr.dtx}
-\title{Das scraddr\thanks{Diese Datei hat die Versionsnummer
- \fileversion, letzte Änderung vom \filedate.}-Paket zur
- Auswertung von Adressdateien}
-\author{Markus Kohm \and Jens-Uwe Morawski}
-\date{\filedate}
-
+\documentclass{koma-script-source-doc}
+\usepackage[USenglish]{babel}
\begin{document}
- \maketitle
- \tableofcontents
\DocInput{scraddr.dtx}
\end{document}
%</driver>
% \fi
%
-% \changes{v1.1a}{2002/05/19}{Erste Version, die von \texttt{scrlettr}
-% losgelöst ist.}
-%
-% \section{Anleitung}
-%
-% \subsection{Rechtliches}
-% Es wird keinerlei Haftung übernommen für irgendwelche Schäden,
-% die aus der Benutzung der Programme und Dateien des hier
-% beschriebenen Paketes folgen.
-%
-% \subsection{Das \textsf{KOMA-Script} Paket}
-%
-% Das gesamte \textsf{KOMA-Script} Paket besteht aus mehreren Teilen.
-% Der Teil |scrclass.dtx| beinhaltet die Haupt-classes |scrartcl.cls|,
-% |scrreprt.cls| und |scrbook.cls| und |scrlttr2.cls| sowie das von
-% diesen benötigte package |typearea.sty|.
-%
-% Das ursprünglich in |scrlettr.dtx| enthaltene
-% \texttt{scraddr}-Paket liegt nun hier als |scraddr.dtx| separat
-% vor. Dies wurde erforderlich, das ansonsten in |scrlettr.dtx| nur
-% noch obsolete Teile enthalten sind.
-%
-% Die Anleitung zu diesem Paket ist in der Anleitung zu
-% \textsf{KOMA-Script} zu finden. Diese liegt in Deutsch und in
-% Englisch vor.
-%
-% \StopEventually{\PrintIndex\PrintChanges}
-%
-% \section{Implementierung}
+% \changes{v1.1a}{2002/05/19}{first version, separated from \cls{scrlettr}}
+% \changes{v1.1d}{2022/01/24}{switched from \cls{scrdoc} to
+% \cls{koma-script-source-doc}}
+% \changes{v1.1d}{2022/01/24}{whole implementation documentation in English}
+%
+% \GetFileInfo{scraddr.dtx}
+% \title{Parsing Address Files \\
+% Using Package \pkg*{scraddr}}
+% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}
+% \and Jens-Uwe Morawski}
+% \date{Version \fileversion{} of \filedate}
+% \maketitle
+% \begin{abstract}
+% Address files are not only of interest for letters using the \KOMAScript{}
+% class \cls*{scrlttr2} or the \KOMAScript{} package \pkg*{scrletter}. Other
+% applications such as the creation of address books or telephone directories
+% are also quite common. In addition, it can also be useful to access not only
+% the addressee's record in a letter, but also other records in an address
+% file. This is exactly the task of the \pkg*{scraddr} package.
+% \end{abstract}
+% \tableofcontents
+%
+% \section{User Manual}
+%
+% You can find the user manual of \pkg*{scraddr} in the \KOMAScript{} manual,
+% either the German \file{scrguide} or the English \file{scrguien}.
+%
+% \MaybeStop{\PrintIndex}
+%
+% \section{Implementation}
%
%\iffalse
% \begin{macrocode}
@@ -151,40 +104,34 @@
%</scraddr>
%\fi
%
+% \changes{v1.0}{1996/01/22}{New package \pkg*{scraddr}}
%
-% \changes{v1.0}{1996/01/22}{Neues Package scraddr.}
% \begin{macrocode}
%<*scraddr>
% \end{macrocode}
-% Dieses Paket liest beliebige - auch mehrere - Adressdateien im oben
-% beschriebenen Format ein und legt für jeden Eintrag eine Reihe von
-% Markos an. Bedingung dafür ist, dass das achte Element jedes
-% |\adrentry|-Eintrags - der Kürzeleintrag - nichtleer ist.
-% Dies gilt in gleicher Weise auch für das neunte Element neuerer
-% |\addrentry|-Einträge.
-% Im Falle von
-% identischen Kürzeleinträgen überschreiben spätere Einträge
-% frühere. Die Inhalte können dann über spezielle Befehle ermittelt
-% werden.
-%
-% \subsection{Optionen}
%
-% \begin{option}{adrFreeIVempty}
-% \changes{v1.1a}{2002/05/19}{Neue Option}
-% \begin{option}{adrFreeIVshow}
-% \changes{v1.1a}{2002/05/19}{Neue Option}
-% \begin{option}{adrFreeIVwarn}
-% \changes{v1.1a}{2002/05/19}{Neue Option}
-% \begin{option}{adrFreeIVstop}
-% \changes{v1.1a}{2002/05/19}{Neue Option}
-% \begin{macro}{\@adrFIVerror}
-% \changes{v1.1a}{2002/05/19}{Neue (intern)}
-% Die neuen Optionen dienen der Wahl, ob die Verwendung von
-% \verb|\FreeIV| für einen Eintrag, der mit \verb|\adrentry|
-% definiert wurde, ignoriert wird, durch eine Ausgabe im Text
-% angezeigt wird, zu einer Warnung oder einem Fehler führt. Im Makro
-% wird die Einstellung gespeichert. Voreingestellt ist
-% \texttt{adrFreeIVshow}.
+% \subsection{Options}
+%
+% Preliminary note: \pkg*{scraddr} is a very, very old package from the early
+% days of \KOMAScript. Therefore it does not support \emph{key=value} options
+% as other \KOMAScript{} packages do.
+%
+% \begin{option}{adrFreeIVempty}
+% \changes{v1.1a}{2002/05/19}{new}
+% \begin{option}{adrFreeIVshow}
+% \changes{v1.1a}{2002/05/19}{new}
+% \begin{option}{adrFreeIVwarn}
+% \changes{v1.1a}{2002/05/19}{new}
+% \begin{option}{adrFreeIVstop}
+% \changes{v1.1a}{2002/05/19}{new}
+% \begin{macro}{\@adrFIVerror}
+% \changes{v1.1a}{2002/05/19}{new}
+% The options allow the choice whether \cs{FreeIV}, defined by \cs{adrentry},
+% should be ignored, output, result in a warning or an error message. Default
+% is \opt{adrFreeIVshow}. The selected choice is stored as a number in
+% \cs{@adrFIVerror} (0 = \opt{adrFreeIVempty}, 1 = \opt{adrFreeIVshow},
+% 2 = \opt{adrFreewarn}, 3 = \opt{adrFreeIVstop}). Unknown values should
+% be handled as \opt{adrFreeIVstop} too, but are not recommended.
% \begin{macrocode}
\newcommand*{\@adrFIVerror}{}
\DeclareOption{adrFreeIVempty}{\renewcommand*{\@adrFIVerror}{0}}
@@ -198,25 +145,21 @@
% \end{option}
% \end{option}
%
-% \changes{v1.0a}{2001/08/07}{\cs{ExecuteOption}\cs{relax} korrigiert}
-% \changes{v1.1a}{2002/05/19}{Option \texttt{adrFreeIVshow} ist
-% Voreinstellung}
+% \changes{v1.0a}{2001/08/07}{\cs{ExecuteOption}\cs{relax} fixed}
+% \changes{v1.1a}{2002/05/19}{\texttt{adrFreeIVshow} is default}
% \begin{macrocode}
\ExecuteOptions{adrFreeIVshow}
\ProcessOptions\relax
% \end{macrocode}
%
-% \subsection{Adressdatei einlesen}
-% \begin{macro}{\InputAdressFile}
-% Mit Hilfe des Befehls |\InputAddressFile| wird die angegebene
-% Adressdatei eingelesen und in Adressmakros gewandelt, die dann beliebig
-% verwendet werden können. Die Adressmakros werden global generiert.
-% Andere Makros insbesondere die Definitionen von |\adrentry| und
-% |\addrentry| bleiben erhalten.
-% \changes{v1.1}{2002/05/18}{Erweitert auf \cs{addrentry}
-% Einträge}
-% \changes{v1.1b}{2002/06/02}{Falls erforderlich werden auch
-% \cs{addrchar} und \cs{adrchar} definiert}
+% \subsection{Reading address files}
+% \begin{command}{\InputAdressFile}
+% This command reads the address file given as mandatory argument. While
+% reading global internal macros are generated for every \cs{adrentry} or
+% \cs{addrentry}. To do so, these two macros are redefined locally only.
+% \changes{v1.1}{2002/05/18}{extended by \cs{addrentry} handling}
+% \changes{v1.1b}{2002/06/02}{\cs{addrchar} and \cs{adrchar} are defined also
+% if undefined}
% \begin{macrocode}
\newcommand{\InputAddressFile}[1]{\begingroup
\ifcase\@adrFIVerror
@@ -255,8 +198,7 @@
\expandafter\gdef\csname ##9.FIV\endcsname{##8}
\fi}
% \end{macrocode}
-% Existiert die Datei nicht, so wird ein Fehler ausgegeben, ansonsten
-% wird die Ladeaktion angezeigt.
+% Not existing files result in an error message. Found files are only noted.
% \begin{macrocode}
\InputIfFileExists{#1.adr}
{\typeout{Load addressfile: #1.adr.}}
@@ -266,120 +208,89 @@
available}}
\endgroup}
% \end{macrocode}
-% \end{macro}
+% \end{command}
%
-% \subsection{Zugriff auf die Elemente der eingelesenen Adressdatei}
+% \subsection{Using an element of an address file}
%
-% Da keine Vorschriften existieren, wie genau das Kürzel aufgebaut sein
-% muss, können innerhalb des Kürzels theoretisch auch solche Zeichen
-% enthalten sein, die für Makronamen normalerweise ungeeignet sind.
-% Deshalb existiert ein Satz von Befehlen, über den auf die zu einem
-% Kürzel gehörenden Elemente zugegriffen werden kann. Dabei wird davon
-% ausgegangen, dass die Adressdatei dem zuvor vorgeschlagenen Aufbau
-% entspricht.
+% Selecting the elements by names instead of cryptic macros, could be
+% easier. So we use well named macros for the selection. All these macros have
+% exactly one mandatory argument: the \meta{shortcut} which is argument 8 of
+% \cs{adrentry} resp. argument 9 of \cs{addrentry} in the address file.
%
-% \begin{macro}{\Name}
-% Der Name wird aus dem Vornamen (Firstname) und Nachnamen (Lastname)
-% zusammengesetzt, wobei einfach ein Leerzeichen dazwischen geklemmt
-% wird.
+% \begin{command}{\Name}
+% The \cs{Name} is a combination of \cs{Firstname} and \cs{Lastname} with a
+% normal word separator space in between.
% \begin{macrocode}
\newcommand*{\Name}[1]{\FirstName{#1}\ \LastName{#1}}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\FirstName}
-% Der Vorname (Firstname) ist mit \emph{Kürzel}|.FN| codiert.
+% \end{command}
+% \begin{command}{\FirstName}
+% Firstname or given from internal macro \cs{\meta{shortcut}.FN}.
% \begin{macrocode}
\newcommand*{\FirstName}[1]{\csname #1.FN\endcsname}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LastName}
-% Der Nachname (Lastname) ist mit \emph{Kürzel}|.LN| codiert.
+% \end{command}
+% \begin{command}{\LastName}
+% Lastname from internal macro \cs{\meta{shortcut}.LN}.
% \begin{macrocode}
\newcommand*{\LastName}[1]{\csname #1.LN\endcsname}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\Address}
-% Die Adresse (Address) ist mit \emph{Kürzel}|.A| codiert.
+% \end{command}
+% \begin{command}{\Address}
+% Address from internal macro \cs{\meta{shortcut}.A}.
% \begin{macrocode}
\newcommand*{\Address}[1]{\csname #1.A\endcsname}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\Telephone}
-% Die Telephonnummer (Telephone/Phone) ist mit \emph{Kürzel}|.P|
-% codiert.
+% \end{command}
+% \begin{command}{\Telephone}
+% Telephone number from internal macro \cs{\meta{shortcut}.P}.
% \begin{macrocode}
\newcommand*{\Telephone}[1]{\csname #1.P\endcsname}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\FreeI}
-% \begin{macro}{\FreeII}
-% Es existieren zwei freie Einträge, die mit \emph{Kürzel}|.FI| und
-% \emph{Kürzel}.|FII| codiert sind.
+% \end{command}
+% \begin{command}{\FreeI,\FreeII}
+% Two free entries from internal macros \cs{\meta{shortcut}.FI} and
+% \cs{\meta{shortcut}.FII}.
% \begin{macrocode}
\newcommand*{\FreeI}[1]{\csname #1.FI\endcsname}
\newcommand*{\FreeII}[1]{\csname #1.FII\endcsname}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\Comment}
-% \begin{macro}{\FreeIII}
-% Das dritte freie Element ist über zwei Makros erreichbar.
-% Das Makro |\Comment| dient zur Kompatibilität mit älteren
-% |\adrentry|-Einträgen, da hier der vorletzte Parameter als
-% Kommentar gekennzeichnet war.
-% Das Makro |\FreeIII| ist passend zur Definition des Makros
-% |\addrentry| benannt.
-% Die Daten sind im Makro mit \emph{Kürzel}|.FIII| kodiert.
-% \changes{v1.1}{2002/05/18}{Erweitert auf addrentry Einträge}
+% \end{command}
+% \begin{command}{\Comment,\FreeIII}
+% The third free element is available by two commands, because originally it
+% was specified as \meta{comment}. It is stored in the internal macro
+% \cs{\meta{shortcut}.FIII}.
+% \changes{v1.1}{2002/05/18}{extended to \cs{addrentry}}
% \begin{macrocode}
\newcommand*{\Comment}{}
\newcommand*{\FreeIII}[1]{\csname #1.FIII\endcsname}
\let\Comment\FreeIII
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\FreeIV}
-% Das letzte Makro gibt ebenfalls Zugriff auf ein freies Element, das mit
-% \emph{Kürzel}|.FIV| codiert ist. Dies wurde ebenfalls für
-% neue |\addrentry| Einträgen eingeführt. Bei älteren |\adrentry|
-% Einträgen, führt die Benutzung dieses Macros zu einer Warnung im Text.
-% \changes{v1.1}{2002/05/18}{Erweitert auf addrentry Einträge}
+% \end{command}
+% \begin{command}{\FreeIV}
+% Forth free entry from internal macro \cs{\meta{shortcut}.FIV} only available
+% with \cs{addrentry} but not woth \cs{adreentry}.
+% \changes{v1.1}{2002/05/18}{extended to \cs{addrentry}}
% \begin{macrocode}
\newcommand*{\FreeIV}[1]{\csname #1.FIV\endcsname}
% \end{macrocode}
-% \end{macro}
+% \end{command}
%
-% \subsection{Ende des Pakets}
+% \subsection{Ende of package}
% \begin{macrocode}
%</scraddr>
% \end{macrocode}
%
-% \IndexPrologue{\clearpage
-% \section*{Index}
-% \markboth{Index}{Index}
-% Die kursiven Zahlen geben die Seiten an, auf denen
-% der entsprechende Eintrag beschrieben ist.
-% Die unterstrichenden Zahlen geben die Stelle der
-% Definition des Eintrags an.
-% Alle anderen Zahlen benennen Stellen, an denen der
-% entsprechende Eintrag verwendet ist.
-% \vspace{1em}\noindent}
-%
-% \GlossaryPrologue{\section*{Änderungsverzeichnis}
-% \markboth{Änderungsverzeichnis}{Änderungsverzeichnis}
-% \addcontentsline{toc}{section}{Änderungsverzeichnis}
-% Die erste Version des \textsf{KOMA-Script} Pakets
-% stammt vom 7.\,Juli~1994. Es werden nur die
-% Änderungen ab diesem Zeitpunkt dokumentiert.\par%
-% \vspace{1em}\noindent}
-%
% \Finale
+% \PrintChanges
%
\endinput
-%
-% Ende der Datei `scraddr.dtx'
+% 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:
-%%% Local Variables:
-%%% mode: doctex
-%%% TeX-master: t
-%%% End: