% \iffalse meta-comment
% ======================================================================
% scrkernel-addressfiles.dtx
% Copyright (c) Markus Kohm, 2006-2023
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, version 1.3c of the license.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX 
% version 2005/12/01 or later and of this work.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in MANIFEST.md.
% ======================================================================
%%% From File: $Id: scrkernel-addressfiles.dtx 4032 2023-04-17 09:45:11Z kohm $
%<option>%%%            (run: option)
%<body>%%%            (run: body)
%<*dtx>
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
  \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
  \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $
  \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
  \filerevision$Revision: 4032 $
  \edef\reserved@a{%
    \noexpand\endgroup
    \noexpand\ProvidesFile{scrkernel-addressfiles.dtx}%
                          [\filedate\space\filerevision\space
                           KOMA-Script source
                           (circular letters)]%
  }%
\reserved@a
\documentclass[USenglish]{koma-script-source-doc}
\usepackage{babel}
\setcounter{StandardModuleDepth}{2}
\begin{document}
\DocInput{scrkernel-addressfiles.dtx}
\end{document}
%</dtx>
% \fi
%
% \changes{v2.95}{2006/03/22}{first version by splitting of \file{scrclass.dtx}}
% \changes{v3.36}{2022/02/11}{switch over from \cls*{scrdoc} to
%   \cls*{koma-script-source-doc}}
% \changes{v3.36}{2022/02/11}{whole implementation documentation in English}
% \changes{v3.40}{2023/04/17}{guide names changed}
%
% \GetFileInfo{scrkernel-addressfiles.dtx}
% \title{Circular Letters and Address Files as Part of
%   \href{https://komascript.de}{\KOMAScript} Class \cls*{scrlttr2} and
%   \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrletter}}
% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
% \date{Revision \fileversion{} of \filedate}
% \maketitle
% \begin{abstract}
%   \filename{} is used to generate \cls*{scrlttr2} and \pkg*{scrletter}. It
%   provides features for handling address files with well defined address
%   data. This can be used to print circular letters from one master document.
% \end{abstract}
% \tableofcontents
%
% \section{User Manual}
%
% You can find the user documentation of the commands implemented here in the
% \KOMAScript{} manual, either the German \file{scrguide-de.pdf} or the English
% \file{scrguide-en.pdf}.
%
% \MaybeStop{\PrintIndex}
%
% \section{Implementation of the Address File Feature}
%
%    \begin{macrocode}
%<*letter>
%    \end{macrocode}
%
% \subsection{Options}
% We do not have any options for this feature
%
%
% \subsection{Macros and commands for address files}
%
% \begin{command}{\adrentry}
% \changes{v2.8q}{2002/05/19}{\cs{adrentry} uses new \cs{addrentry}}
% \changes{v3.36}{2022/02/11}{deprecated}
% \begin{command}{\addrentry}
% \changes{v2.8n}{2001/09/06}{added}
% The basic feature of \cs{addrentry} is to read nine arguments. The first
% argument is interpreted as family name, the second as first name. The first
% name is optional, the family name should be given. Alternatively the first
% argument can be a company name or similar (and the second can be
% empty). The third argument should be the postal address. Then a command with
% the name of the ninth argument is defines, containing name and address as
% expected by \cls*{scrlttr2}'s or \pkg*{scrletter}'s \env{letter}
% environment. To be able to do so, only character sequence characters should
% be used for argument number 9. For more information about the recommended
% meaning of the other arguments, see one of the \KOMAScript{} manuals.
% \cs{adrentry} is the former version of \cs{addrentry}. It does only have eight
% argument. So it sets an empty argument number 8. This implementation does
% read only seven arguments immediately. The last argument is read by
% \cs{addrentry}.
%    \begin{macrocode}
%<*body>
\newcommand*{\adrentry}[7]{%
%<class>  \ClassWarning{\KOMAClassName}{%
%<package>  \PackageWarning{scrletter}{%
    command `\string\adrentry' is deprecated.\MessageBreak
    You should use `\string\addrentry' with additional\MessageBreak
    empty 8th argument}%
  \addrentry{#1}{#2}{#3}{#4}{#5}{#6}{#7}{}}
\newcommand*{\addrentry}[9]{\def\@tempa{#1}\ifx \@tempa\@empty \else
 \def\@tempa{#2}\ifx \@tempa\@empty
  \expandafter\def\csname #9\endcsname{#1\\#3}%
 \else
  \expandafter\def\csname #9\endcsname{#2 #1\\#3}%
 \fi \fi}
%    \end{macrocode}
% \end{command}
% \end{command}
%
% \begin{command}{\adrchar}
% \changes{v2.8q}{2002/05/19}{\cs{adrchar} used new \cs{addrchar}}
% \changes{v3.36}{2022/02/11}{deprecated}
% \begin{command}{\addrchar}
% \changes{v2.8n}{2001/09/06}{added}
% Address files should be organized in alphabetic order. To be able to
% generate dictionaries or lists of the addresses, it is useful mark the
% beginning of a new letter. We have \cs{addrchar} to do so. The argument is
% the new letter, but ignored by the default implementation. The default of
% deprecated \cs{adrchar} is to use \cs{addrchar}.
%    \begin{macrocode}
\newcommand*{\adrchar}{%
%<class>  \ClassWarning{\KOMAClassName}{%
%<package>  \PackageWarning{scrletter}{%
    command `\string\adrchar' is deprecated.\MessageBreak
    You should use `\string\addrchar'}
  \addrchar}
\newcommand*{\addrchar}[1]{}
%</body>
%    \end{macrocode}
% \end{command}
% \end{command}
%
%
%    \begin{macrocode}
%</letter>
%    \end{macrocode}
% 
% \Finale
% \PrintChanges
%
\endinput
% Local Variables:
% mode: doctex
% ispell-local-dictionary: "en_US"
% eval: (flyspell-mode 1)
% TeX-master: t
% TeX-engine: luatex-dev
% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
% End:
