wzl.bbx 6.91 KB
Newer Older
1
\ProvidesFile{wzl.bbx}[2018/09/28]
Lukas Janek Körfer's avatar
Lukas Janek Körfer committed
2

3
\RequireBibliographyStyle{alphabetic}
Lukas Janek Körfer's avatar
Lukas Janek Körfer committed
4

5
6
7
% Fix end of entries
\renewcommand*{\finentrypunct}{}

8
9
% New strings
\NewBibliographyString{standard}
10
11
12
\NewBibliographyString{series}
\NewBibliographyString{organizer}
\NewBibliographyString{journal-volume}
13
14

% German strings
Lukas Janek Körfer's avatar
Lukas Janek Körfer committed
15
\DefineBibliographyStrings{ngerman}{
16
17
    bibliography = {Literaturverzeichnis},
    standard = {Norm},
18
19
20
    organizer = {Veranst.},
    journal-volume = {Jg},
    series = {Reihe},
21
22
23
24
    patent = {Schutzrecht},
    part = {Teil},
    url = {URL},
    urlseen = {Stand},
25
    % Months
26
27
28
29
30
31
32
33
34
35
36
37
    january = {Januar},
    february = {Februar},
    march = {März},
    april = {April},
    may = {Mai},
    june = {Juni},
    july = {Juli},
    august = {August},
    september = {September},
    october = {Oktober},
    november = {November},
    december = {December}
Lukas Janek Körfer's avatar
Lukas Janek Körfer committed
38
39
40
}

% Name format
41
42
43
44
45
\DeclareNameFormat{default}{%
    \usebibmacro{name:family-given}%
        {\namepartfamily}{\namepartgiveni}%
        {\namepartprefix}{\namepartsuffix}%
}
Lukas Janek Körfer's avatar
Lukas Janek Körfer committed
46
47
48
49
50
51

% Name delimiters
\renewcommand{\labelnamepunct}{\addcolon\space}
\renewcommand{\multinamedelim}{\addsemicolon\space}
\renewcommand{\finalnamedelim}{\addsemicolon\space}

52
53
54
55
56
57
58
59
60
% Title format
\DeclareFieldFormat*{title}{#1\isdot}
\DeclareFieldFormat*{journaltitle}{#1\isdot}
\DeclareFieldFormat*{booktitle}{#1\isdot}
\DeclareFieldFormat*{issuetitle}{#1\isdot}
\DeclareFieldFormat*{maintitle}{#1\isdot}
\DeclareFieldFormat*{thesistitle}{#1\isdot}

% URL format
61
\DeclareFieldFormat*{url}{\bibstring{url}\addcolon\addspace\url{#1}}
62
63
64
65
\DeclareFieldFormat*{urldate}{\mkbibbrackets{\bibstring{urlseen}\addcolon\addspace#1}}

% Series format
\DeclareFieldFormat*{series}{\bibstring{series}\addcolon\addspace#1}
66

67
% Part format
68
\DeclareFieldFormat*{part}{\bibstring{part}\addspace#1}
69

70
71
72
73
74
75
76
77
78
79
80
81
82
% 
\DeclareFieldFormat[article]{volume}{#1\adddot\addspace\bibstring{journal-volume}\adddot}
\DeclareFieldFormat[article]{number}{\bibstring{number}\adddot\addspace#1}

% Fix editor string
\renewbibmacro*{editor}{\printnames{editor}\addspace\mkbibparens{\bibstring{editor}}}

% 
\newbibmacro*{organizer}{\printlist{organization}\addspace\mkbibparens{\bibstring{organizer}}}

% Drivers

\DeclareBibliographyDriver{book}{%
83
84
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
85
86
    \iffieldundef{author}{\usebibmacro{editor}}{\usebibmacro{author}}%
    \setunit{\addcolon\addspace}%
87
    \usebibmacro{title}%
88
89
    \newunit{\adddot\addspace}\newblock%
    \usebibmacro{book-info}%
90
91
92
    \usebibmacro{finentry}%
}

93
\DeclareBibliographyDriver{inbook}{%
94
95
96
97
98
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author}%
    \setunit{\addcolon\addspace}%
    \usebibmacro{title}%
99
100
101
102
103
104
105
106
107
108
    \newunit{\adddot\addspace}\newblock%
    \usebibmacro{in:}%
    \newunit{\addspace}%
    \usebibmacro{editor}%
    \newunit{\addcolon\addspace}%
    \usebibmacro{booktitle}%
    \newunit{\adddot\addspace}%
    \usebibmacro{book-info}%
    \newunit{\addcomma\addspace}%
    \printfield{pages}%
109
110
111
    \usebibmacro{finentry}%
}

112
113
114
115
116
117
118
119
120
121
122
123
124
\newbibmacro*{book-info}{%
    \iffieldundef{series}{}{\mkbibparens{\printfield{series}\addcomma\addspace\printfield{volume}}}%
    \newunit{\adddot\addspace}%
    \printfield{edition}%
    \newunit{\addspace}%
    \printlist{location}%
    \newunit{\addcolon\addspace}%
    \printlist{publisher}%
    \newunit{\addcomma\addspace}%
    \printfield{year}%
}

\DeclareBibliographyDriver{article}{%
125
126
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
127
    \usebibmacro{author}%
128
129
130
    \setunit{\addcolon\addspace}%
    \usebibmacro{title}%
    \setunit{\adddot\addspace}%
131
132
    \newunit\newblock%
    \usebibmacro{in:}%
133
    \setunit{\addspace}%
134
135
136
137
138
139
140
141
142
    \printfield{journaltitle}%
    \setunit{\adddot\addspace}%
    \printfield{volume}%
    \setunit{\addcomma\addspace}%
    \printdate%
    \setunit{\addcomma\addspace}%
    \iffieldundef{issue}{\printfield{number}}{\printfield{issue}}
    \setunit{\addcomma\addspace}%
    \printfield{pages}%
143
144
145
    \usebibmacro{finentry}%
}

146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
\DeclareBibliographyDriver{misc}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author}%
    \setunit{\addcolon\addspace}%
    \usebibmacro{title}%
    \setunit{\adddot\addspace}%
    \printlist{location}%
    \setunit{\addcomma\addspace}%
    \printfield{year}%
    \setunit{\adddot\addspace}%
    \printfield{type}%
    \usebibmacro{finentry}%
}

161
162
163
164
165
166
167
\DeclareBibliographyDriver{proceedings}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \printfield{eventtitle}%
    \setunit{\adddot\addspace}%
    \usebibmacro{proceedings-info}%
    \usebibmacro{finentry}%
168
169
}

170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
\DeclareBibliographyDriver{inproceedings}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \iffieldundef{author}{\usebibmacro{organizer}}{\usebibmacro{author}}%
    \setunit{\addcolon\addspace}
    \usebibmacro{title}%
    \newunit{\adddot\addspace}\newblock%
    \usebibmacro{in:}%
    \newunit{\addspace}%
    \printfield{eventtitle}%
    \newunit{\adddot\addspace}%
    \usebibmacro{proceedings-info}%
    \newunit{\addcomma\addspace}%
    \printfield{pages}%
    \usebibmacro{finentry}%
185
186
}

187
188
189
190
191
192
193
194
195
196
197
\newbibmacro*{proceedings-info}{%
    \newunit\newblock%
    \printfield{venue}%
    \newunit{\addcomma\addspace}%
    \printeventdate%
    \newunit{\adddot\addspace}%
    \printlist{location}%
    \newunit{\addcolon\addspace}%
    \iflistundef{publisher}{\usebibmacro{organizer}}{\printlist{publisher}}%
    \newunit{\addcomma\addspace}%
    \printfield{year}%
198
199
}

200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
\DeclareBibliographyDriver{thesis}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author}%
    \setunit{\addcolon\addspace}%
    \usebibmacro{title}%
    \setunit{\adddot\addspace}%
    \printfield{type}%
    \setunit{\adddot\addspace}%
    \printlist{institution}%
    \setunit{\addspace}%
    \printfield{year}%
    \usebibmacro{finentry}%
}

\DeclareBibliographyDriver{online}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author}%
    \setunit{\addcolon\addspace}%
    \usebibmacro{title}%
    \setunit{\adddot\addspace}%
    \printfield{url}%
    \setunit{\addspace}%
    \usebibmacro{urldate}%
    \usebibmacro{finentry}%
}

\DeclareBibliographyDriver{patent}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \bibstring{patent}%
    \setunit{\addspace}%
    \printlist{location}
    \setunit{\addspace}%
    \printfield{number}%
    \addspace%
    \mkbibparens{\usebibmacro{date}}%
    \setunit{\adddot\addspace}%
    \usebibmacro{author}%
    \setunit{\addcolon\addspace}%
    \usebibmacro{title}%
    \usebibmacro{finentry}%
}

\DeclareBibliographyDriver{standard}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \iffieldundef{type}{\bibstring{standard}}{\printfield{type}}%
    \setunit{\addspace}%
    \printlist{institution}%
    \setunit{\addspace}%
    \printfield{number}%
    \newunit{\addspace}%
    \printfield{part}%
    \setunit{\addspace}\newblock%
    \mkbibparens{\mkbibmonth{\thefield{month}}\addspace\printfield{year}}%
    \setunit{\adddot\addspace}%
    \usebibmacro{title}%
    \usebibmacro{finentry}%
260
261
}

Lukas Janek Körfer's avatar
Lukas Janek Körfer committed
262
\endinput