summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/koma-script/source/scrkernel-addressfiles.dtx
blob: 8cdaa70be60154b9f225cb4058df45de557d44e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
% \iffalse meta-comment
% ======================================================================
% scrkernel-addressfiles.dtx
% Copyright (c) Markus Kohm, 2006-2022
%
% 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.txt.
% ======================================================================
%%% From File: $Id: scrkernel-addressfiles.dtx 3697 2022-02-11 09:48:02Z 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: 2022-02-11 10:48:02 +0100 (Fr, 11. Feb 2022) $
  \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
  \filerevision$Revision: 3697 $
  \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}
%
% \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} or the English
% \file{scrguien}.
%
% \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: