publ-imp-author.mkvi /size: 9457 b    last modification: 2021-10-28 13:50
1
% TODO: MAKE default
2 3
%D \module
4
%D [ file=publ-imp-author,
5
%D version=2014.06.23,
6
%D title=\CONTEXT\ Publication Support,
7
%D subtitle=Authors,
8
%D author=Hans Hagen,
9
%D date=\currentdate,
10
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
11
%C
12
%C This module is part of the \CONTEXT\ macro||package and is
13
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
14
%C details.
15 16
\unprotect
17 18
% these can be used instead of the macros and they accept manipulator prefixes
19
%
20
% \currentbtxinitials : \btxauthorfield{initials}
21
% \currentbtxfirstnames : \btxauthorfield{firstnames}
22
% \currentbtxvons : \btxauthorfield{vons}
23
% \currentbtxsurnames : \btxauthorfield{surnames}
24
% \currentbtxjuniors : \btxauthorfield{juniors}
25 26
\starttexdefinition
mutable
protected
\s!btx
:
\s!cite
:
\s!author
:
\s!de
27
\ifx
\currentbtxlanguage
\s!de
28
\setmode
{
\s!btx
:
\s!de
}
29
\fi
30
\stoptexdefinition
31 32
\startsetups
\s!btx
:
\s!cite
:
\s!author
:
concat
33
\ifcase
\currentbtxoverflow
34
\btxparameter
{
\c!separator
:
names
:
\number
\currentbtxconcat
}
35
\else
\ifnum
\currentbtxauthorindex
>
\plusone
36
\btxparameter
{
\c!separator
:
names
:
2
}
37
\fi
\fi
38
\stopsetups
39 40
\startsetups
\s!btx
:
\s!cite
:
\s!author
:
others
41
\ifcase
\currentbtxoverflow
\else
42
\btxparameter
\c!otherstext
43
\fi
44
\stopsetups
45 46
\startsetups
\s!btx
:
\s!cite
:
\s!author
:
normal
47
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
concat
}
48
\ifx
\currentbtxfirstnames
\empty
\else
49
\currentbtxfirstnames
50
\btxparameter
{
\c!separator
:
firstnames
}
51
\fi
52
\ifx
\currentbtxvons
\empty
\else
53
\currentbtxvons
54
\ifx
\currentbtxsurnames
\empty
\else
55
\btxparameter
{
\c!separator
:
vons
}
56
\fi
57
\fi
58
\ifx
\currentbtxsurnames
\empty
\else
59
\currentbtxsurnames
60
\ifx
\currentbtxjuniors
\empty
\else
61
\btxparameter
{
\c!separator
:
juniors
}
62
\currentbtxjuniors
63
\fi
64
\fi
65
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
others
}
66
\stopsetups
67 68
\startsetups
\s!btx
:
\s!cite
:
\s!author
:
normalshort
69
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
concat
}
70
\ifx
\currentbtxinitials
\empty
\else
71
\currentbtxinitials
72
\btxparameter
{
\c!separator
:
initials
}
73
\fi
74
\ifx
\currentbtxvons
\empty
\else
75
\currentbtxvons
76
\ifx
\currentbtxsurnames
\empty
\else
77
\btxparameter
{
\c!separator
:
vons
}
78
\fi
79
\fi
80
\ifx
\currentbtxsurnames
\empty
\else
81
\currentbtxsurnames
82
\ifx
\currentbtxjuniors
\empty
\else
83
\btxparameter
{
\c!separator
:
juniors
}
84
\currentbtxjuniors
85
\fi
86
\fi
87
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
others
}
88
\stopsetups
89 90
\startsetups
\s!btx
:
\s!cite
:
\s!author
:
inverted
91
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
concat
}
92
\ifx
\currentbtxvons
\empty
\else
93
\texdefinition
{
\s!btx
:
\s!cite
:
\s!author
:
\s!de
}
94
\doifmode
{
\s!btx
:
\s!de
}
{
95
\currentbtxvons
96
\btxparameter
{
\c!separator
:
vons
}
97
}
98
\fi
99
\ifx
\currentbtxsurnames
\empty
\else
100
\currentbtxsurnames
101
\ifx
\currentbtxjuniors
\empty
\else
102
\btxparameter
{
\c!separator
:
juniors
}
103
\currentbtxjuniors
104
\fi
105
\fi
106
\ifx
\currentbtxfirstnames
\empty
107
% firstnames are optional
108
\else
109
\btxparameter
{
\c!separator
:
invertedfirstnames
}
110
\currentbtxfirstnames
111
\fi
112
\ifx
\currentbtxvons
\empty
\else
113
\doifnotmode
{
\s!btx
:
\s!de
}
{
114
\btxparameter
{
\c!separator
:
vons
}
115
\currentbtxvons
116
}
117
\fi
118
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
others
}
119
\stopsetups
120 121
\startsetups
\s!btx
:
\s!cite
:
\s!author
:
invertedfirst
122
\ifnum
\currentbtxauthorindex
>
\plusone
123
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
normal
}
124
\else
125
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
inverted
}
126
\fi
127
\stopsetups
128 129
\startsetups
\s!btx
:
\s!cite
:
\s!author
:
invertedshort
130
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
concat
}
131
\ifx
\currentbtxvons
\empty
\else
132
\texdefinition
{
\s!btx
:
\s!cite
:
\s!author
:
\s!de
}
133
\doifnotmode
{
\s!btx
:
\s!de
}
{
134
\currentbtxvons
135
\btxparameter
{
\c!separator
:
vons
}
136
}
137
\fi
138
\ifx
\currentbtxsurnames
\empty
\else
139
\currentbtxsurnames
140
\ifx
\currentbtxjuniors
\empty
\else
141
\btxparameter
{
\c!separator
:
juniors
}
142
\currentbtxjuniors
143
\fi
144
\fi
145
\ifx
\currentbtxinitials
\empty
146
% initials are optional
147
\else
148
\btxparameter
{
\c!separator
:
invertedinitials
}
149
\currentbtxinitials
150
\fi
151
\ifx
\currentbtxvons
\empty
\else
152
\doifmode
{
\s!btx
:
\s!de
}
{
153
\btxparameter
{
\c!separator
:
vons
}
154
\currentbtxvons
155
}
156
\fi
157
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
others
}
158
\stopsetups
159 160
\startsetups
\s!btx
:
\s!cite
:
\s!author
:
name
161
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
concat
}
162
% is this treated differently in german?
163
\ifx
\currentbtxvons
\empty
\else
164
\currentbtxvons
165
\btxparameter
{
\c!separator
:
vons
}
166
\fi
167
\currentbtxsurnames
168
\ifcase
\currentbtxauthorstate
\else
169
% potential clash of names so we force initials
170
\ifx
\currentbtxinitials
\empty
\else
171
\btxparameter
{
\c!separator
:
invertedinitials
}
172
\currentbtxinitials
173
\fi
174
\fi
175
\fastsetup
{
\s!btx
:
\s!cite
:
\s!author
:
others
}
176
\stopsetups
177 178
% list (mostly the same)
179 180
\startsetups
\s!btx
:
\s!list
:
\s!author
:
concat
181
\ifcase
\currentbtxoverflow
182
\btxparameter
{
\c!separator
:
names
:
\number
\currentbtxconcat
}
183
\else
\ifnum
\currentbtxauthorindex
>
\plusone
184
\btxparameter
{
\c!separator
:
names
:
2
}
185
\fi
\fi
186
\stopsetups
187 188
\startsetups
\s!btx
:
\s!list
:
\s!author
:
others
189
\ifcase
\currentbtxoverflow
\else
190
\btxparameter
\c!otherstext
191
\fi
192
\stopsetups
193 194
\startsetups
\s!btx
:
\s!list
:
\s!author
:
normal
195
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
concat
}
196
\ifx
\currentbtxfirstnames
\empty
\else
197
\currentbtxfirstnames
198
\btxparameter
{
\c!separator
:
firstnames
}
199
\fi
200
\ifx
\currentbtxvons
\empty
\else
201
\currentbtxvons
202
\ifx
\currentbtxsurnames
\empty
\else
203
\btxparameter
{
\c!separator
:
vons
}
204
\fi
205
\fi
206
\ifx
\currentbtxsurnames
\empty
\else
207
\currentbtxsurnames
208
\ifx
\currentbtxjuniors
\empty
\else
209
\btxparameter
{
\c!separator
:
juniors
}
210
\currentbtxjuniors
211
\fi
212
\fi
213
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
others
}
214
\stopsetups
215 216
\startsetups
\s!btx
:
\s!list
:
\s!author
:
normalshort
217
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
concat
}
218
\ifx
\currentbtxinitials
\empty
\else
219
\currentbtxinitials
220
\btxparameter
{
\c!separator
:
initials
}
221
\fi
222
\ifx
\currentbtxvons
\empty
\else
223
\currentbtxvons
224
\ifx
\currentbtxsurnames
\empty
\else
225
\btxparameter
{
\c!separator
:
vons
}
226
\fi
227
\fi
228
\ifx
\currentbtxsurnames
\empty
\else
229
\currentbtxsurnames
230
\ifx
\currentbtxjuniors
\empty
\else
231
\btxparameter
{
\c!separator
:
juniors
}
232
\currentbtxjuniors
233
\fi
234
\fi
235
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
others
}
236
\stopsetups
237 238
\startsetups
\s!btx
:
\s!list
:
\s!author
:
inverted
239
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
concat
}
240
\ifx
\currentbtxvons
\empty
\else
241
\texdefinition
{
\s!btx
:
\s!cite
:
\s!author
:
\s!de
}
242
\doifnotmode
{
\s!btx
:
\s!de
}
{
243
\currentbtxvons
244
\btxparameter
{
\c!separator
:
vons
}
245
}
246
\fi
247
\ifx
\currentbtxsurnames
\empty
\else
248
\currentbtxsurnames
249
\ifx
\currentbtxjuniors
\empty
\else
250
\btxparameter
{
\c!separator
:
juniors
}
251
\currentbtxjuniors
252
\fi
253
\fi
254
\ifx
\currentbtxfirstnames
\empty
255
% firstnames are optional
256
\else
257
\btxparameter
{
\c!separator
:
invertedfirstnames
}
258
\currentbtxfirstnames
259
\fi
260
\ifx
\currentbtxvons
\empty
\else
261
\doifmode
{
\s!btx
:
\s!de
}
{
262
\btxparameter
{
\c!separator
:
vons
}
263
\currentbtxvons
264
}
265
\fi
266
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
others
}
267
\stopsetups
268 269
\startsetups
\s!btx
:
\s!list
:
\s!author
:
invertedfirst
270
\ifnum
\currentbtxauthorindex
>
\plusone
271
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
normal
}
272
\else
273
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
inverted
}
274
\fi
275
\stopsetups
276 277
\startsetups
\s!btx
:
\s!list
:
\s!author
:
invertedshort
278
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
concat
}
279
\ifx
\currentbtxvons
\empty
\else
280
\texdefinition
{
\s!btx
:
\s!cite
:
\s!author
:
\s!de
}
281
\doifnotmode
{
\s!btx
:
\s!de
}
{
282
\currentbtxvons
283
\btxparameter
{
\c!separator
:
vons
}
284
}
285
\fi
286
\ifx
\currentbtxsurnames
\empty
\else
287
\currentbtxsurnames
288
\ifx
\currentbtxjuniors
\empty
\else
289
\btxparameter
{
\c!separator
:
juniors
}
290
\currentbtxjuniors
291
\fi
292
\fi
293
\ifx
\currentbtxinitials
\empty
294
% initials are optional
295
\else
296
\btxparameter
{
\c!separator
:
invertedinitials
}
297
\currentbtxinitials
298
\fi
299
\ifx
\currentbtxvons
\empty
\else
300
\doifmode
{
\s!btx
:
\s!de
}
{
301
\btxparameter
{
\c!separator
:
vons
}
302
\currentbtxvons
303
}
304
\fi
305
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
others
}
306
\stopsetups
307 308
\startsetups
\s!btx
:
\s!list
:
\s!author
:
name
309
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
concat
}
310
% is this treated differently in german?
311
\ifx
\currentbtxvons
\empty
\else
312
\currentbtxvons
313
\btxparameter
{
\c!separator
:
vons
}
314
\fi
315
\currentbtxsurnames
316
\fastsetup
{
\s!btx
:
\s!list
:
\s!author
:
others
}
317
\stopsetups
318 319
\protect
320