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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
%%
%% This is file `adrdir.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% adrconv.dtx (with options: `dir')
%% Copyright 2006, 2010 Axel Kielhorn
%%
%% This file will generate fast loadable files from adrconv.dtx when
%% run through LaTeX or TeX.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This file is part of the adrconv bundle.
%%
%% The adrconv bundle consists at least of the files adrconv.dtx,
%% adrconv.ins and adrguide.tex.
%%
%% adrguide.dtx
%% Copyright 2006, 2010 Axel Kielhorn
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\ProvidesFile{%
adrdir%
.tex%
}
[2010/04/02 v1.3 LaTeX2e
Interactive address directory generation]
\documentclass[headsepline,10pt,twoside,pagesize]{scrartcl}
\newcommand*\jj {j}
\newcommand*\ja {ja}
\newcommand*\y {y}
\newcommand*\yes{yes}
\newread\ttyin
\newcommand*{\gobble}[1]{}
\def\iden#1{#1}
\def\strip#1#2 \gobble{\def #1{#2}}
\def\defpar{\par}
\def\Ask#1#2{%
\message{#2}\read\ttyin to #1\ifx#1\defpar\def#1{}\else
\iden{\expandafter\strip\expandafter#1#1\gobble\gobble}
\gobble\fi}
\newif\ifGerman
\newif\ifRunningHead
\newif\ifEmail
\newdimen\leftfield
\newdimen\rightfield
\newdimen\adrindent
\oddsidemargin -1in
\evensidemargin -1in
\newcommand*\adrfile{}
\newcommand*\adrtitle{}
\typeout{^^J%
*** dir.tex v2.0 by Frank Neukam <01 Dec 1993>^^J%
*** LaTeX2e-changes by Markus Kohm 1994/10/29^^J%
*** ADRconv-changes by Axel Kielhorn 1999^^J%
*** ngerman-changes by Markus Kohm 2001^^J%
^^J%
To create a address-directory just answer the questions:^^J%
^^J}
\Ask\answer{Use german? [y/n]^^J%
Mit deutscher Sprachanpassung? [j/n]}
\ifx\jj\answer\Germantrue\else
\ifx\ja\answer\Germantrue\else
\ifx\y\answer\Germantrue\else
\ifx\yes\answer\Germantrue\else
\Germanfalse\fi\fi\fi\fi
\ifGerman
\def\germanpackage{ngerman}
\Ask\answer{Mit alter deutscher Rechtschreibung? [j/n]}
\ifx\jj\answer\def\germanpackage{german}\else
\ifx\ja\answer\def\germanpackage{german}\else
\ifx\y\answer\def\germanpackage{german}\else
\ifx\yes\answer\def\germanpackage{german}\fi\fi\fi\fi
\usepackage{\germanpackage}
\fi
\Ask\answer{^^JPrint email? [y/n]^^J%
E-Mail ausgeben? [j/n]}
\ifx\jj\answer\Emailtrue\else
\ifx\ja\answer\Emailtrue\else
\ifx\y\answer\Emailtrue\else
\ifx\yes\answer\Emailtrue\else
\Emailfalse\fi\fi\fi\fi
\ifEmail
\usepackage{url}
\fi
\InputIfFileExists{dir.cfg}{%
\typeout{Load local configuration-file.}}{%
\typeout{No local configuration-file found.}}
\Ask\adrfile{^^J%
Name of address-file (without .adr)?^^J%
Name der Adressdatei (ohne .adr)?}
\Ask\adrtitle{^^J%
Title of directory/list?^^J%
Titel des Verzeichnisses?}
\Ask\adrformat{^^J%
Name of the layout^^J%
Layoutname?}
\Ask\answer{^^J%
With running head? [y/n]^^J%
Namen in der Kopfzeile? [j/n]}
\ifx\jj\answer\RunningHeadtrue\else
\ifx\ja\answer\RunningHeadtrue\else
\ifx\y\answer\RunningHeadtrue\else
\ifx\yes\answer\RunningHeadtrue\else
\RunningHeadfalse\fi\fi\fi\fi
\ifRunningHead
\usepackage{scrpage}
\renewpagestyle{headings}{%
(0pt,0pt)%
{\strut\rightmark\ -- \leftmark\hfil}%
{\hfil\strut\rightmark\ -- \leftmark}%
{\hfil\strut\rightmark\ -- \leftmark\hfil}%
(\textwidth,.4pt)%
}{%
(0pt,0pt)%
{\pagemark\hfill}%
{\hfill\pagemark}%
{\hfill\pagemark\hfill}%
(0pt,0pt)}
\fi
\def\headfont{\sffamily\bfseries}
\ifx\adrformat\empty
\def\adrformat{adrdir}
\fi
\InputIfFileExists{\adrformat.cfg}{}{%
\typeout{^^J%
*** File \adrformat.cfg not found!^^J%
*** Datei \adrformat.cfg nicht gefunden!^^J%
^^J}
}
\begin{document}
\ifRunningHead
\def\adrchar#1{\typeout{#1}}
\else
\def\adrchar#1{\clearpage\typeout{#1}\markboth{#1}{#1}}
\fi
\def\adrentry#1#2#3#4#5#6#7#8{\hspace{\adrindent}%
\parbox[b]{\leftfield}
{\raggedright \hspace{-\adrindent}{\sc #1}%
\def\tempa{#1}\ifx \tempa\empty \else , #2\fi%
\def\tempa{#3}\ifx \tempa\empty \else \par #3\fi%
\ifEmail
\def\tempa{#5}\ifx \tempa\empty \else \par \url{#5}\fi%
\fi
\def\tempa{#7}\ifx \tempa\empty \else \par (#7)\fi%
}%
\hfill%
\parbox[b]{\rightfield}
{\raggedleft%
\def\tempa{#8}\ifx \tempa\empty \else {\scriptsize #8}\par \fi
{\small #4}%
}\par%
\ifRunningHead
\markboth{#1}{#1}
\fi
}
\ifx\adrfile\empty \else
\InputIfFileExists{\adrfile.adr}{%
\pagestyle{empty}
\null\vfil
\begin{center}
{\Large \sfb \adrtitle\par}
\end{center}
\vfil\vfil\null
\cleardoublepage
\raggedbottom
\pagestyle{headings}
}{%
\typeout{^^J%
*** File \adrfile.adr not found!^^J%
*** Datei \adrfile.adr nicht gefunden!^^J%
^^J}
}
\fi
\end{document}
\endinput
%%
%% End of file `adrdir.tex'.
|