]> git.lyx.org Git - lyx.git/blob - lib/doc/biblio/alphadin.bst
remerge he.po
[lyx.git] / lib / doc / biblio / alphadin.bst
1 %%  ALPHADIN.BST            Ausgabe [8]  10/10/00
2 %%  (C) Klaus F. Lorenzen, Hamburg  email: lorenzen.marxen@t-online.de
3 %%  ersetzt ALPHADIN.BST   Ausgabe [7,1]  vom 23/11/99
4 %%  ersetzt DinAlpha.BST  von 1994
5 %%  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 %%  ALPHADIN.BST wurde entwickelt aus BibTeX standard bibliography style 
7 %% `alpha'.Mit ALPHADIN.BST werden Literaturverzeichnisse gemaess der deutschen 
8 %%  Zitiernorm DIN 1505 Teil 2 formatiert.
9 %%  Analog zu den 4 US standard styles wird ein vollstaendiger Satz von 
10 %%  4 DIN-gerechten bst-style Dateien veroeffentlicht (alphadin.bst,
11 %%  plaindin.bst, unsrtdin.bst, abbrvdin.bst). Die gueltige Version
12 %%  ist am schnellsten aus dem WWW ueber folgende URL zu beziehen
13 %%            http://www.fh-hamburg.de/pers/Lorenzen/bibtex/
14 %%            Stand: 16/6/99
15 %%  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 %%  WAS IST ALPHADIN.BST ?
17 %%  Dieser style produziert "deutsche" Literaturzitate in Literaturverzeichnis-
18 %%  sen gemaess der deutschen Norm DIN 1505, Teil 2 vom Jan. 1984.
19 %%  Die Literaturzitate werden alphabetisch nach Verfassern sortiert
20 %%  und sind durch abgekuerzte Verfasserbuchstaben plus Erscheinungsjahr in 
21 %%  eckigen Klammern gekennzeichnet.
22 %%  Es gibt Unterschiede zwischen der US- und der deutschen Zitierkonvention,
23 %%  was die bibliographischen Typen und die verschiedenen Trennzeichen zwischen
24 %%  den Feldern angeht. Daher ist auch keine 100%ige Abbildung der beiden 
25 %%  Regelwerke aufeinander moeglich. Dies ist aber immer durch eine achtsame 
26 %%  Erfassung beherrschbar! Die vorliegenden DIN-styles versuchen einige 
27 %%  bibliographische Beschraenkungen der Originalstyles zu ueberwinden.
28 %%  Es laesst sich in fast allen Faellen problemlos ein Original-bib-file
29 %%  (d.i. die Datenbank, die die bibliographischen Informationen enthaelt)
30 %%  wahlweise nach US-Norm oder deutscher DIN-Norm verarbeiten. 
31 %%  [Beispiel: Produzieren Sie mit der XAMPL.bib-Datenbank aus dem Original-
32 %%  paket 2 verschiedene Literaturverzeichnisse.]     Zu Gunsten
33 %%  der Allgemeingueltigkeit von bib-files ist bei den Publikationstypen
34 %%  (entry-types) und den bibliographischen Kategorien (fields) in Zweifels-
35 %%  faellen immer die originale US-Bedeutung beibehalten worden. 
36 %%  Bei der Erfassung von Literaturquellen in bib-files 
37 %%  gelten folglich die in der TEX-Literatur veroeffentlichten Regeln.
38 %%  Kommt es dennoch zu kleineren "Schoenheitsfehlern" im fertig gesetzten 
39 %%  output, so koennen diese so gut wie immer durch eine leicht veraenderte 
40 %%  Erfassung im bib-inputfile beseitigt werden. Last but not least koennen
41 %%  Sie im output-file < *.bbl > noch letzte Hand zur Korrektur ansetzen.
42 %
43 %%  UMGANG MIT FEHLERMELDUNGEN
44 %%  Noch nicht alle ueberfluessigen Fehlermeldungen des Original-style sind 
45 %%  ausgemerzt. Die meisten Warnmeldungen beruhen auf
46 %%  den andersartigen bibliographischen Regeln nach DIN 1505 und dem damit
47 %%  verbundenen Ermessensspielraum, sind also in Wahrheit keine "Fehler". 
48 %%  Dennoch sollten Sie diese Warnungen beachten, um herauszufinden, ob 
49 %%  evtl. eine unzulaessige Kombination von Publikationstyp (=entry-type) und 
50 %%  "fields" vorgenommen worden ist. Das fuehrt mitunter zu Wasserfallartigen 
51 %%  Fehlermeldungen: meistens duerfen Sie das einfach ignorieren.
52 %%
53 %%  DANKSAGUNG
54 %%  Hartmut Lueddecke, FH Hamburg  habe ich fuer viele Verbesserungsvorschlaege 
55 %%  und stete Unterstuetzung zu danken. Vielen an dieser Stelle ungenannt
56 %%  bleibenden Anwendern gilt mein Dank, die in den vergangenen Jahren durch 
57 %%  ihre Aufmerksamkeit dazu beigetragen haben, Fehler auszumerzen und 
58 %%  Verbesserungen vorzunehmen.
59 %%
60 %%  HINWEIS:  es gibt eine Kombination von ALPHADIN.BST mit dem NATBIB-Stil 
61 %%            von Patrick W.Daly), womit Literaturverzeichnisse komplett nach
62 %%            DIN 1505 Teil 2 UND Teil 3 formatiert werden koennen. Naeheres
63 %%            per URL http://www.fh-hamburg.de/pers/Lorenzen/bibtex/
64 %%
65 %%  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66 %%  Eine ausfuehrliches Internet-Tutorial mit Beispielen ist in Vorbereitung. 
67 %%  Fuer den Anfang ist diese Datei schon etwas kommentiert!
68 %%          Kritik, Vorschlaege usw. bitte an :
69 %%          FH Hamburg,  Klaus F. Lorenzen, Grindelhof 30, 20146 Hamburg
70 %%          e-mail: lorenzen.marxen@t-online.de
71 %%                             16/6/99
72 %%  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 % version 0.99c for BibTeX versions 0.99c or later, LaTeX2e 
74 % Copyright (C) 1985, all rights reserved.
75 % Copying of this file is authorized only if either
76 % (1) you make absolutely no changes to your copy, including name, or
77 % (2) if you do make changes, you name it something other than
78 % bstdin.doc, plaindin.bst, unsrtdin.bst, alphadin.bst, and abbrvdin.bst.
79 % This restriction helps ensure that all standard styles are identical.
80 %% ==>  The file btxbst.doc has the original documentation for style 'alpha'.
81 %%      
82
83 ENTRY
84   { address      %%  Verlagsort
85     author       %%  persoenlicher Urheber eines Werkes
86     booktitle    %%  a) Gesamttitel eines mehrbaendigen Werkes 
87 %                %%  b) Titel des Sammelwerks, das einzelne selbstaendige
88 %                %%     Beitraege mit eigenem Titel enthaelt (->incollection)
89     chapter      %%  Kapitel in einem Buch (Monographie)
90     edition      %%  Auflagevermerk
91     editor       %%  Persoenl.Herausgeber oder Koerperschaftlicher Herausgeber
92     howpublished %%  beliebiger Verlegervermerk: von wem, wo 
93     institution  %%  Institution, die e.Verlagsfreie Veroeffentlichung betreibt
94     isbn         %%  Standardnr fuer Buecher
95     issn         %%  - " -    :      Zeitschriften u. Serien
96     journal      %%  Titel einer Zeitschrift
97     key          %%  Zusaetzlich vergebener Sortierschluessel, mitunter notwend.
98     month        %%  naehere Bestimmung des Erscheinungsjahres (-> macro 's)
99     note         %%  freies Eingabefeld fuer zusaetzliche Informationen
100     number       %%  Mehrfachbedeutung in Abhaengigkeit vom Eingabetyp
101     organization %%  a) Name der Organisation/des Veranstalters e. Tagung,Konferenz
102 %                %%  b) Name einer Firma/Gesellschaft, die ein ->manual herausgab
103     pages        %%  Umfangsangaben, meist Seitenzahlen
104     publisher    %%  Verlag
105     school       %%  Hochschule/Universitaet, die eine Dipl.-Arb./Dissertation veroeff.
106     series       %%  Titel e.Reihe, in der ein best. Buchtitel erschienen ist
107     title        %%  Titel einer (namentlich gekennzeichneten) Veroeffentlichung
108     type         %%  Zusatzfeld z.Kennzeichnung e.besonderen Publikationstyps
109     volume       %%  a) Zaehlung bei einem mehrbaendigen Werk (-> book)
110 %                %%  b) Jahrgang einer Zeitschrift (-> article
111     year         %%  Erscheinungsjahr
112   }
113   {}
114   { label extra.label sort.label }
115
116 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
117
118 %% die folg. BOOLE'sche VAR steuern d. Ausg. ": " nach Urheber-Feldern
119 %%    und ". - " vor ISBN oder Anmerkungen (NOTE)
120
121 INTEGERS { colon.after  period.dash }
122
123 FUNCTION {init.state.consts}
124 { #0 'before.all :=
125   #1 'mid.sentence :=
126   #2 'after.sentence :=
127   #3 'after.block :=
128   #4 'colon.after :=
129   #5 'period.dash :=
130 }
131 INTEGERS { zahl  lang }  
132
133 STRINGS { h s t u v }    
134
135 %% neue DIN-Funktion, 16/2/94
136
137 FUNCTION {output.nonnull}
138 { 's :=
139   output.state after.block =
140       { add.period$  write$
141         newline$
142         "\newblock " write$
143       }
144       { output.state before.all =
145           {  write$ }     
146           {  output.state colon.after =
147                { ": " * write$
148                  newline$
149                  "\newblock " write$
150                }
151                { output.state period.dash =
152                    { ". -- " *  write$
153                      newline$
154                      "\newblock " write$
155                    }
156                    { output.state mid.sentence =
157                        { ", " * write$ }
158                        { write$ 
159                          newline$
160                          "\newblock " write$ 
161                        }
162                      if$
163                    }
164                 if$
165                }
166             if$
167            }     
168          if$
169          after.block 'output.state :=
170        }
171      if$
172      s 
173 }
174
175 FUNCTION {output}
176 { duplicate$ empty$
177     'pop$
178     'output.nonnull
179   if$
180 }
181
182 FUNCTION {output.check}
183 { 't :=
184   duplicate$ empty$
185     { pop$ "empty " t * " in " * cite$ * warning$ }
186     'output.nonnull
187   if$
188 }
189
190 FUNCTION {output.bibitem}
191 { newline$
192   "\bibitem[" write$
193   label write$
194   "]{" write$
195   cite$ write$
196   "}" write$
197   newline$
198   ""
199   before.all 'output.state :=
200 }
201
202 FUNCTION {fin.entry}   %%$$$  nach DIN neu 16/2/94
203 { write$
204   newline$
205 }
206
207 FUNCTION {set.period.dash}    %% Wenn ein ". - " die Satzteile trennen soll.!
208 { output.state before.all =
209     'skip$
210     { period.dash  'output.state := }
211   if$
212 }
213
214 %%   neu 16/2/94
215 %%   prueft, ob PAGES, ISBN- oder NOTE-Feld vh. ist und setzt dann ". - " davor.
216
217 FUNCTION {set.period.dash.check}  
218 { empty$                            
219     'skip$
220     'set.period.dash  
221   if$
222 }
223
224 FUNCTION {set.colon.after}   %%$$$ Wenn ein ": " d. Satzteile trennen soll!
225 { output.state before.all =
226     'skip$
227     { colon.after 'output.state  := }
228   if$
229 }
230
231 %% neu / alt 17/2/94          Wenn ein " " die Satzteile trennen soll.!
232 FUNCTION {new.sentence}
233 { output.state before.all =
234      'skip$
235      { after.sentence 'output.state := }
236   if$
237 }
238
239 %% neu 17/2/94                 Wenn ein ", " die Satzteile trennen soll.!
240 FUNCTION { part.of.sentence }
241 { output.state before.all =
242      'skip$
243      { mid.sentence 'output.state := }
244   if$
245 }
246
247
248 FUNCTION {not}
249 {   { #0 }
250     { #1 }
251   if$
252 }
253
254 FUNCTION {and}
255 {   'skip$
256     { pop$ #0 }
257   if$
258 }
259
260 FUNCTION {or}
261 {   { pop$ #1 }
262     'skip$
263   if$
264 }
265
266 FUNCTION {new.sentence.checka}
267 { empty$
268     'skip$
269     'new.sentence
270   if$
271 }
272
273 FUNCTION {field.or.null}
274 { duplicate$ empty$
275     { pop$ "" }
276     'skip$
277   if$
278 }
279
280 INTEGERS { nameptr namesleft numnames }
281
282 STRINGS { fkt }
283
284 FUNCTION {emphasize}
285 { duplicate$ empty$
286     { pop$ "" }
287     { "\emph{" swap$ * "}" * }
288   if$
289 }
290
291 %% neu, setzt Autor/Hrsg. in Kapitaelchen 9/3/94
292 FUNCTION { capitalize }
293  { duplicate$ empty$
294     { pop$ "" }
295     { "\textsc{" swap$ * "}" * }
296   if$
297 }
298
299 %%$$$ DIN-Quellenangabe : spezieller unselbst. Teil ist erschienen "In: " 
300 %%                        dem bibliogr. selbst. Werk, z.B. Zeitschrift, Buch
301
302 %% 1/4/96
303 FUNCTION {article.in.journal}
304 { duplicate$ empty$
305     { pop$ "" }
306     { author missing$
307         { title missing$
308             { emphasize " " * * }%% wenn ein Zs-Heft als ganzes zitiert wird
309             { emphasize "{In: }" swap$ " " * * }        
310           if$
311         }
312         { emphasize "{In: }" swap$ " " * * }
313       if$
314      }
315   if$
316 }
317
318 %% nach Vorschlag von H.Lueddecke, um Adelspraedikate beim Sortieren
319 %% nach den(m) Vornamen aufzufuehren. Lo, 2/11/94
320 FUNCTION {format.names}
321 { 's :=
322   "" 'u  :=
323   #1 'nameptr :=
324   s num.names$ 'numnames :=
325   numnames 'namesleft :=
326     { namesleft #0 > }
327     {
328        s nameptr "{vv~}{ll}" format.name$ 't :=%% das ergibt DIN-Ansetzung
329        %% Lue's Vorschlag   s nameptr "{ll}" format.name$ 't :=
330        t capitalize 't :=
331        s nameptr "{, ff}" format.name$ 'u := 
332        %% Lue's Vorschlag   s nameptr "{, ff}{ vv}" format.name$ 'u := 
333        u  text.length$  'lang :=     
334        #1 'zahl :=
335        "" 'v :=
336          {  zahl  lang  <  }
337          {  u  zahl  #1  substring$  "~"  =  
338                {  v  ""  =
339                      {  u  #1  zahl  #1  -  substring$  'v :=  }
340                      'skip$
341                   if$
342                   v  u  zahl  #2  substring$  *  "."  *  'v :=  }
343                'skip$
344             if$
345             zahl  #1  +  'zahl :=  }
346       while$
347       v  ""  =
348          {  u  'v :=  }
349          'skip$
350       if$
351 %%    der string fkt enthaelt " (Hrsg.)", wenn Editorfeld nicht leer ist
352       t  v  *  fkt  *  't :=  %% Komma nach Nachnamen wird oben erledigt!
353                               %% t enthaelt nun d. formatierten Nnamen, Vnamen
354       nameptr #1 >
355          { namesleft #1 >
356              { " ; " * t * }
357              { numnames #2 >
358                   { " " * }
359                   'skip$
360                if$
361 %%                                %% n. schindle's hinweis 12/1/96 erweitert
362                t "\textsc{others}" = t "\textsc{others} (Hrsg.)" = or
363                     { " [u.~a.]" * }%%   13/2/94
364 %%%%                  { "et~al." * } %% Geschmackssache, waehle eins von beiden
365                     { " ; " * t * }
366                if$
367                }
368             if$  %% Ende der namesleft-Pruefung
369           }
370             't    
371            %% hierdurch wird bei jed. Schleifendurchgang das sich komplet-
372            %% tierende Zwischen-Namensergebnis wieder auf den stack gelegt 
373
374        if$  %%  Ende der nameptr-Pruefung
375
376       nameptr #1 + 'nameptr :=
377       namesleft #1 -  'namesleft :=
378     }
379   while$  %%  Ende von { namesleft #0 > } ganz oben
380   "" 'fkt :=  %% fkt wird zurueckgesetzt
381 }
382
383 %%$$$ geaendert 14/2/94
384  
385 FUNCTION {format.authors}
386 { author empty$
387     { "" }
388     { author format.names }
389   if$
390 }
391
392 %%$$$ geaend. 20/2/94 Anpassung an DIN, wonach Autor + Hrsg. zusammen vorkom-
393 %%                    men duerfen.!!
394
395 FUNCTION {format.editors}
396 { editor empty$
397    { author empty$
398        { "Weder Verfasser noch Hrsg. in " cite$ * warning$ }
399        'skip$ 
400      if$
401     }
402     { author empty$
403         { " (Hrsg.)" 'fkt :=  
404           editor format.names 
405         }
406         { " (Hrsg.)" 'fkt :=  
407           " ; " * editor format.names *
408         }
409       if$
410      }
411    if$
412  } 
413
414 %% Lo, 12/5/99 neue Funktion fuer proceedings, misc usw.
415
416 FUNCTION { format.editors.organization }
417 { organization empty$
418     'skip$
419     { type$ "misc" =
420         { organization }
421         { " ; " * organization " (Veranst.)" *}
422       if$
423     }
424   if$
425 }
426
427 %%$$$  Sonderfall: Herausgeber bei Typ incollection, 21/2/94
428 FUNCTION {format.ed.incoll}
429 { editor empty$
430      { "" }
431      { " (Hrsg.)" 'fkt :=  
432        editor format.names 
433      }
434   if$
435
436
437 FUNCTION {format.title}
438 { title empty$
439     { "" }
440     { title }  %% Text so wie er dasteht im Feld title
441   if$
442 }
443
444 FUNCTION {n.dashify}
445 { 't :=
446   ""
447     { t empty$ not }
448     { t #1 #1 substring$ "-" =
449         { t #1 #2 substring$ "--" = not
450             { "--" *
451               t #2 global.max$ substring$ 't :=
452             }
453             {   { t #1 #1 substring$ "-" = }
454                 { "-" *
455                   t #2 global.max$ substring$ 't :=
456                 }
457               while$
458             }
459           if$
460         }
461         { t #1 #1 substring$ *
462           t #2 global.max$ substring$ 't :=
463         }
464       if$
465     }
466   while$
467 }
468
469 %% geaendert 24/2/94
470 FUNCTION {format.date}
471 { year empty$
472     { month empty$
473         { "" }
474         { "there's a month but no year in " cite$ * warning$
475           month
476         }
477       if$
478     }
479     { month empty$  %% b. Buechern nur Jahr, ohne Monat ausgeb. im Impressum
480           'year
481           { month " " * year * }
482       if$
483     }
484   if$
485 }
486
487 %%
488 %%$$$  neue Fkt., 16/2/94 u. 14/3/94       das sog. Impressum
489 FUNCTION {format.address.publisher.year}
490 {  publisher empty$
491       { address empty$
492           { year empty$  
493               { "" }
494               { year } 
495             if$
496           }
497           { "Es gibt einen Verlagsort, aber keinen Verlag in " cite$ * warning$
498               address ", " * format.date * 
499           }
500         if$
501       }
502       { address empty$
503           { year empty$
504              { "Es gibt nur eine Verlagsangabe in " cite$ * warning$ 
505                 publisher
506              }
507              { publisher ", " * format.date * }
508             if$
509           }
510           { year empty$
511               { address " : " * publisher * }
512               { address " : " * publisher * ", " * format.date * }
513             if$
514           }
515         if$
516       }
517   if$
518 }
519
520 FUNCTION {format.btitle}
521 { title emphasize
522 }
523
524
525 FUNCTION {tie.or.space.connect}
526 { duplicate$ text.length$ #3 <
527     { "~" }
528     { " " }
529   if$
530   swap$ * *
531 }
532
533 FUNCTION {either.or.check}
534 { empty$
535     'pop$
536     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
537   if$
538 }
539
540 %% neu 8/3/94 in dieser Funkt. steckt im volume empty-Teil noch ein bug, der
541 %%            aber ignoriert werden kann; das Ergebnis ist ok.
542 FUNCTION {format.btitle.vol}
543 { number empty$
544    { series empty$
545      { volume empty$
546         { title emphasize }
547         { title emphasize ". Bd." * volume tie.or.space.connect }
548        if$
549      }
550      { volume empty$
551         { title emphasize }%% ein Buch, das zusaetzl. SERIES=Reihentitel besitzt
552     %% jetzt kommt d. Fall des mehrbaendigen Werkes mit Gesamttitel=SERIES
553     %% Zaehlung=VOLUME und Bandtitel=TITLE; 
554         { series emphasize ". Bd." * volume tie.or.space.connect  
555                                  ": " * "{\emph{" * title * "}}" * } 
556        if$
557      }
558      if$%% series-test
559    }
560    { title emphasize }%% wenn number ex., dann immer title-Feld
561   if$%% Ende number-test
562 }
563
564 %%$$$ neu 16/2/94
565 %%   Serien- / Reihentitel werden im Feld series gespeichert. Weist die
566 %%   Serie eine Zaehlung der Einzeltitel auf, gibt man entweder nach DIN alles 
567 %%   in das Feld series so ein: ---> TITEL DER SERIE  NR. (der Vorlage) <---
568 %%   z. B.  SERIES= { Mensch und Computer 12 }. 
569 %%   [ Die Nummer der Vorlage darf auch durch " ; " abgesetzt werden. ]
570 %%   oder:
571 %%   man gibt die Zaehlung in das Feld NUMBER ein, z.B. NUMBER = {12}.
572 %%   Achtung!!
573 %%   Bei mehrbaendigen Werken steht d. Gesamttitel im Feld SERIES und die
574 %%   Bandzaehlung im Feld VOLUME; NUMBER darf dann nicht besetzt sein!
575 %%   Anderenfalls liegt ein Erfassungsfehler vor, da sich Reihe u. mehrbd.
576 %%   Werk gegenseitig ausschliessen.
577
578 FUNCTION {format.series.number.din}
579 { volume empty$
580     { number empty$
581           { series empty$
582                { "" }%%   Ausstieg mit Nullstring
583                { "(" series * ")" * } %% d. Seriennr koennte auch gleich hier
584                                       %% im SERIES-Feld miterfasst werden
585             if$
586           }      
587           { series empty$
588                { "(" number tie.or.space.connect ")" * 
589                  "there's a number but no series in " cite$ * warning$ 
590                }
591                { "(" series * number tie.or.space.connect ")" * }
592             if$
593           }
594        if$
595      }
596      { series empty$
597           { "" }
598           { type$ "proceedings" =  %% Sonderfall, es darf VOLUME und NUMBER ex. !
599                 { number empty$  
600                     { "(" series * ")" * }
601                     { "(" series * number tie.or.space.connect ")" * }
602                   if$
603                 }
604                 { "" }%%   Ausstieg mit Nullstring, s. Kommentar
605             if$
606           }%% bei gezaehlten Reihen MUSS die Reihennr. im Feld NUMBER stehen!
607        if$ %% wenn also d. Feld VOLUME nicht leer ist, dann liegt ausser bei 
608            %% Typ PROCEEDINGS falsche
609       }     %% Erfassung vor und es erfolgt d. Ausstieg mit d. Nullstring!
610   if$ 
611 }
612
613 %% seltener Fall bei MISC: Ausgabe einer Serie; die Nummer der Serie muss
614 %%  in SERIES miterfasst werden  16/6/99
615
616 FUNCTION {format.misc.series}
617 { series empty$
618     { "" }
619     { "(" series * ")" * }
620   if$
621 }
622
623
624 %%$$$ 16/2/94
625 %%  Auflagenvermerke gibt man komplett, einschliesslich Abkuerzungen in 
626 %%  das Feld edition ein: ---> EDITION= { 3., erw. und verb. Aufl. }
627 %%  oder fremdsprachlich:      EDITION= { 2nd edition }
628
629 FUNCTION {format.edition}
630 { edition empty$
631     { "" }
632     { edition } 
633   if$
634 }
635
636 %%$$$ neu, 18/3/94
637 FUNCTION { format.isbn.issn }
638 { isbn empty$
639      { issn empty$
640           { "" }
641           { "ISSN" issn n.dashify tie.or.space.connect }
642        if$
643      }
644      { "ISBN" isbn n.dashify tie.or.space.connect }
645   if$
646 }
647
648 %%$$$ geaendert, 21/2/94  gibt Seitenzahl bei BOOK-Typ und verwandten T. aus
649 FUNCTION {format.pages.book}
650 { pages empty$
651     { "" } 
652     { "" pages n.dashify tie.or.space.connect " S" *} %% 17/12/95
653   if$
654 }
655
656 %%$$$  alle anderen Seitenang. zB. Zeitschrft., INBOOK usw. a la Orig., 9/3/94
657 FUNCTION {format.pages}
658 { pages empty$
659     { "" }
660     { "S." pages n.dashify  tie.or.space.connect } 
661   if$
662 }
663
664 %%    Angaben v. Jahrgang, Jahr, Heftnr., Seiten bei Artikel-Typ
665 %%    14/3/94, 26/2/97
666
667 FUNCTION {format.vol.year.num.pages}
668 { volume field.or.null
669     year empty$
670       { "Es gibt einen Jahrgang, aber kein Jahr in " cite$ * warning$ }
671       { " (" year * ")" * * }
672     if$
673     month empty$
674     'skip$
675     { ", " month * * }
676     if$
677     number empty$
678     'skip$
679     { ", Nr. " number * * }
680     if$
681     pages empty$%%  Lo, 26/2/97
682       'skip$
683       { ", " format.pages * *}%% 
684     if$
685
686 %%    pages empty$%%  das war die Fass. Nov. 96, die auch ging
687 %%      'skip$
688 %%      { duplicate$ empty$
689 %%        { pop$ format.pages }%% da pages leer, wird nur "" auf stack gelegt
690 %%          { ", " format.pages * *}
691 %%        if$
692 %%      }
693 %%    if$
694
695 }
696
697 %% geaendert 21/2/94
698 FUNCTION {format.chapter.pages}
699 { chapter empty$
700     'format.pages
701     { type empty$
702         { "Kapitel " }
703         { type }
704       if$
705       chapter tie.or.space.connect
706       pages empty$
707         'skip$
708         { ", " * format.pages * }
709       if$
710     }
711   if$
712 }
713
714 %%$$$  geaendert 21/2/94
715 FUNCTION {format.in.ed.booktitle.din}
716 { booktitle empty$
717     { "" }
718     { editor empty$
719         { volume empty$
720             { "{In: }" booktitle emphasize * }%% n. Belieben fettes In:
721             { "{In: }" booktitle emphasize *  %%      - " -
722               " Bd." volume tie.or.space.connect * 
723             }
724           if$
725         }
726         { volume empty$
727             { "{In: }" format.ed.incoll * ": " * booktitle emphasize * }
728             { "{In: }" format.ed.incoll * ": " * booktitle emphasize * 
729               " Bd." volume tie.or.space.connect * 
730             }
731           if$
732         }
733       if$
734     }
735   if$
736 }
737
738 %% geaendert 1/3/94
739 FUNCTION {format.thesis.type}
740 { type empty$
741     'skip$
742     { pop$
743       type 
744     }
745   if$
746 }
747
748 %% geaendert 23/2/94    i.Orig. wird zuerst die number, dann der type getestet
749 FUNCTION {format.tr.number.din}
750 { type empty$
751      { number empty$
752          { " -- Forschungsbericht" }   %%  bei Minimalangaben besser ohne "."!
753          { "(" number tie.or.space.connect "). -- Forschungsbericht" * }
754        if$
755      }
756      { number empty$
757          { " -- " type * }             %%  bei Minimalangaben besser ohne "."!
758          { "(" number tie.or.space.connect "). -- " * type * }
759        if$
760      }
761   if$
762 }
763
764
765 FUNCTION {format.article.crossref}
766 { key empty$
767     { journal empty$
768         { "need key or journal for " cite$ * " to crossref " * crossref *
769           warning$
770           ""
771         }
772         { "{In: }{\em " journal * "\/}" * }%% 
773       if$
774     }
775     { "{In: }" key * }%%  
776   if$
777   "{\cite{" * crossref * "}" * "}" * ", " * format.pages *
778 %%  " (siehe \cite{" * crossref * "}" * "), " * format.pages *
779 }
780
781 %%geaendert 7/3/94 und noch einmal nach Lueddecke, s.o.
782 FUNCTION {format.crossref.editor}
783 %vorher,Lue  { editor #1 "{vv~}{ll}" format.name$ " (Hrsg.)" *
784  { editor #1 "{ll}" format.name$ " (Hrsg.)" *
785    editor num.names$ duplicate$
786    #2 >
787     { pop$ " [u.~a.]" * }
788 %%    { pop$ " et~al." * }
789     { #2 <
790         'skip$
791         { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
792             { " [u.~a.]" }
793 %%          { " et~al." * }
794             { " ; " * editor #2 "{vv~}{ll}" format.name$ * " (Hrsg.)" * }
795           if$
796         }
797       if$
798     }
799   if$
800 }
801
802
803 FUNCTION {format.book.crossref}
804 { volume empty$
805     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
806       "{\texttt{siehe}} "
807 %%      "(siehe "
808     }
809     { ". -- Bd." volume tie.or.space.connect
810       " von " *
811     }
812   if$
813   editor empty$
814   editor field.or.null author field.or.null =
815   or
816     { key empty$
817         { series empty$
818             { "need editor, key, or series for " cite$ * " to crossref " *
819               crossref * warning$
820               "" *
821             }
822             { "" * }%% dadurch kommt nach der Bandzaehl. gleich das label 2/6/99
823 %%          { "{\emph{" * series * "}} {\texttt{siehe}}" * }
824           if$
825         }
826         { key * }
827       if$
828     }
829     { "" * }%% nach der Bandzaehlung kommt gleich das label; Lo 2/6/99
830 %%    { format.crossref.editor * }
831   if$
832   "{\cite{" * crossref * "}" * "}" * 
833 %%  "{\cite{" * crossref * "}" * "}" * %%"), " * format.pages *
834 }
835
836 FUNCTION {format.incoll.inproc.crossref}
837 { editor empty$
838   editor field.or.null author field.or.null =
839   or
840     { key empty$
841         { booktitle empty$
842             { "need editor, key, or booktitle for " cite$ * " to crossref " *
843               crossref * warning$
844               ""
845             }
846             { "{In: }{\emph " booktitle * "}" * }%%  fettes In: n. Belieben
847           if$
848         }
849         { "{In: }" }%% 26/5/99
850 %%           { "{In: }" key * }
851       if$
852     }
853 %%    { "{In: }{\em " booktitle * "\/}" * }%%
854     { "{In: }" }%% Lo, 10/2/99 es sieht der reine Bezug (Referenz) besser aus!
855   if$
856 %%  " (siehe \cite{" * crossref * "}" * "), " * format.pages *
857   "{\cite{" * crossref * "}" * "}" * ", " * format.pages *%% das fette label, Lo 23/2/99
858 %% alte Vers. bis  27/2/97 " (siehe \cite{" * crossref * "}" * ")" *
859 }
860
861 %%geaendert
862 FUNCTION {article}
863 { output.bibitem
864   format.authors "author" output.check
865   set.colon.after
866   format.title "title" output.check
867   crossref missing$
868     { journal article.in.journal output.nonnull %   26/2/97
869       new.sentence 
870       format.vol.year.num.pages output
871     }
872     { format.article.crossref output.nonnull }
873   if$
874   note set.period.dash.check
875   note output
876   issn set.period.dash.check
877   format.isbn.issn output
878   fin.entry
879 }
880
881 %%$$$   geaendert, 20/2/94
882 FUNCTION {book}
883 { output.bibitem
884   author empty$
885     { format.editors "author and editor" output.check }
886     { format.authors  format.editors output.nonnull }
887   if$
888   set.colon.after
889   crossref missing$
890     { format.btitle.vol "title" output.check }
891     { format.btitle "title" output.check }
892   if$
893   format.edition "edition" output.check  
894   format.address.publisher.year "publisher" output.check
895   new.sentence
896   crossref missing$
897     { format.series.number.din  output 
898       pages set.period.dash.check%%  19/5/99 wie bei adinat.bst
899       format.pages.book output  
900     }
901     { format.book.crossref output.nonnull 
902       pages set.period.dash.check
903       format.pages.book output  
904     }
905   if$
906   note set.period.dash.check
907   note output 
908   isbn set.period.dash.check
909   format.isbn.issn output
910   fin.entry
911 }
912
913 %% geaendert 23/2/94
914 FUNCTION {inbook}
915 { output.bibitem
916 %% unselbst. Teile eines Buches werden am Anf. genannt, dann d selbst. Quelle 
917   chapter empty$
918     { "Es fehlen die Kapitelangaben in " cite$ * warning$ }
919     { type empty$
920          { "Kap. " }%%  d.i. die Standardvorgabe
921          { type }%%  wenn man keine bes. Typform angeben will, koennte ein kl.
922 %%                   Zwischenraum gewaehlt werden, z.B. " \, "
923       if$
924       chapter tie.or.space.connect " {In: }" * * %% n. Belieben fettes In:
925      }
926   if$
927
928 %%   -------- jetzt kommt der bibliogr. selbst. Teil
929   author empty$
930     { format.editors "author and editor" output.check }
931     { format.authors output.nonnull
932     }
933   if$
934   set.colon.after
935   format.btitle.vol "title" output.check
936   crossref missing$
937     { format.edition output
938       format.address.publisher.year "publisher" output.check
939       new.sentence
940       format.series.number.din  output 
941 %% vorher note ...
942       part.of.sentence
943       format.pages "pages" output.check
944       note set.period.dash.check
945       note output 
946     }
947     { format.book.crossref output.nonnull
948       note set.period.dash.check
949       note output 
950     }
951   if$
952   isbn set.period.dash.check
953   format.isbn.issn output
954   fin.entry
955 }
956
957 %%  geaenderte Seitenzahlausgabe, wenn crossref-Feld benutzt wird, 27/2/97
958 FUNCTION {incollection}
959 { output.bibitem
960   format.authors "author" output.check
961   set.colon.after
962   format.title "title" output.check
963   crossref missing$
964     { format.in.ed.booktitle.din "booktitle" output.check
965       format.edition output
966       format.address.publisher.year "publisher" output.check
967       new.sentence
968       format.series.number.din output
969       note set.period.dash.check
970       note output 
971       isbn set.period.dash.check
972       issn set.period.dash.check
973       format.isbn.issn output
974       part.of.sentence
975       format.chapter.pages "pages" output.check
976     }
977     { format.incoll.inproc.crossref output.nonnull 
978       note set.period.dash.check
979       note output 
980       isbn set.period.dash.check
981       issn set.period.dash.check
982       format.isbn.issn output
983     }
984     if$
985  fin.entry
986 }
987
988 %%  geaendert 22/2/94, 15/11/96 (Hinweis v. Alin Shindun, Uni Siegen)
989 FUNCTION {inproceedings}
990 { output.bibitem
991   format.authors "author" output.check
992   set.colon.after
993   format.title "title" output.check
994   crossref missing$
995     { format.in.ed.booktitle.din "booktitle" output.check
996       address empty$
997         { organization new.sentence.checka
998           organization output
999           part.of.sentence
1000           format.address.publisher.year output
1001         }
1002         { format.address.publisher.year "publisher" output.check }
1003       if$
1004       new.sentence
1005       series empty$ %%neu nach Hinweis v. Alin Shindun, 15/11/96
1006         'skip$
1007         { format.series.number.din output }
1008       if$
1009       note set.period.dash.check
1010       note output 
1011       isbn set.period.dash.check
1012       issn set.period.dash.check
1013       format.isbn.issn output
1014       part.of.sentence
1015       format.pages output
1016     }
1017     { format.incoll.inproc.crossref output.nonnull 
1018       note set.period.dash.check
1019       note output 
1020       isbn set.period.dash.check
1021       issn set.period.dash.check
1022       format.isbn.issn output
1023     }
1024     if$ 
1025  fin.entry
1026 }
1027
1028 FUNCTION {conference} { inproceedings }%% nach Patashnik, wg US-Kompatibilitaet
1029
1030 %% geaendert, 11/6/99
1031 FUNCTION {manual}
1032 { output.bibitem
1033   author empty$
1034     { organization empty$
1035         { title empty$
1036             'skip$
1037             {format.btitle "title" output.check }
1038           if$
1039         }
1040         { organization output.nonnull
1041           set.colon.after
1042           format.btitle "title" output.check
1043         }
1044       if$
1045     }
1046     { format.authors output.nonnull 
1047       set.colon.after
1048       format.btitle "title" output.check
1049     }
1050   if$
1051   format.edition "edition" output.check
1052   author empty$
1053     { organization empty$
1054         { address output
1055           part.of.sentence
1056         }
1057         'skip$
1058       if$
1059     }
1060     { address ": " *  organization * output
1061       part.of.sentence
1062     }
1063   if$
1064   format.date output
1065   pages set.period.dash.check
1066   format.pages.book output
1067   note set.period.dash.check
1068   note output
1069   fin.entry
1070 }
1071
1072 %%  MASTERSTHESIS ersetzt zugleich PHDTHESIS !!  KFL, 17/2/94 
1073 %%  Ausgabe-Standard ist "Diplomarbeit", fuer andere Abschlussarbeiten
1074 %%  bei der Erfassung TYPE="anderer Typ" eingeben.
1075 %%  z.B. TYPE={Dissertation}, TYPE={Diss.}, TYPE={Habil.}, TYPE={Magisterarb.}
1076 %%  
1077 FUNCTION {mastersthesis}
1078 { output.bibitem
1079   format.authors "author" output.check
1080   set.colon.after
1081   format.btitle "title" output.check
1082   address output
1083   part.of.sentence 
1084   school "school" output.check
1085   part.of.sentence
1086   "Diplomarbeit" format.thesis.type output.nonnull
1087   part.of.sentence
1088   format.date "year" output.check
1089 %%  pages new.sentence.checka
1090   pages set.period.dash.check
1091   format.pages.book output
1092   note set.period.dash.check
1093   note output
1094   fin.entry
1095 }
1096
1097 FUNCTION {phdthesis} %%  {mastersthesis}% ist identisch bis auf Standardwert, s.o.
1098 { output.bibitem
1099   format.authors "author" output.check
1100   set.colon.after
1101   format.btitle "title" output.check
1102   address output
1103   part.of.sentence 
1104   school "school" output.check
1105   part.of.sentence
1106   "Diss." format.thesis.type output.nonnull % koennte auch `Dissertation' sein
1107   part.of.sentence
1108   format.date "year" output.check
1109   pages set.period.dash.check
1110   format.pages.book output
1111   note set.period.dash.check
1112   note output
1113   fin.entry
1114 }
1115
1116 %% hiermit werden u.a. Normen erfasst
1117 FUNCTION {misc}
1118 { output.bibitem
1119   note empty$
1120      { title empty$ 
1121           { "" }
1122           { format.authors format.editors output.nonnull
1123             format.btitle output
1124             howpublished output
1125             format.date output 
1126           } 
1127         if$
1128       }
1129       { note duplicate$ #1 #4 substring$ "Norm" =
1130            { output new.sentence 
1131              format.date output 
1132              format.title output
1133            }
1134            { pop$ ""
1135              author empty$
1136               { editor empty$
1137                 { organization empty$
1138                   { 'skip$ }
1139                   { format.editors.organization output.nonnull 
1140                     set.colon.after }
1141                   if$
1142                 }   
1143                 { format.editors format.editors.organization output.nonnull 
1144                   set.colon.after }
1145                if$
1146               }              
1147               { format.authors format.editors output.nonnull 
1148                  set.colon.after }
1149              if$
1150              format.btitle output
1151              howpublished output
1152              format.date output 
1153              new.sentence
1154              format.misc.series output%%  neu 16/6/99
1155              note set.period.dash.check
1156              note output
1157            }
1158          if$
1159        }
1160    if$
1161   fin.entry
1162 }
1163
1164 FUNCTION {booklet} {misc}%% booklet ist nach dt. Vorgehensweise oft ueberfluessig
1165
1166 %% geaendert 21/5/99
1167 FUNCTION {proceedings}
1168 { output.bibitem
1169     editor empty$
1170       { organization empty$
1171            { "" } 
1172            { organization " (Veranst.)" * output }
1173         if$
1174       }
1175       { format.editors format.editors.organization output.nonnull }
1176     if$
1177   set.colon.after
1178   format.btitle "title" output.check
1179   volume empty$
1180     { "" output.nonnull } 
1181     { "{\textnormal{Bd.}}" volume tie.or.space.connect emphasize "volume" output.check }
1182   if$
1183   format.address.publisher.year "publisher" output.check
1184   new.sentence
1185   format.series.number.din output.nonnull
1186   pages set.period.dash.check
1187   format.pages.book output
1188   note set.period.dash.check
1189   note output 
1190   isbn set.period.dash.check
1191   issn set.period.dash.check
1192   format.isbn.issn output
1193   fin.entry
1194 }
1195
1196 %% geaendert 23/2/94 auch fuer Firmenschriften u."a. zu benutzen
1197 FUNCTION {techreport}
1198 { output.bibitem
1199   author empty$
1200     { format.editors "author and editor" output.check }
1201     { format.authors  format.editors output.nonnull }
1202   if$
1203   set.colon.after
1204   format.title "title" output.check
1205   institution new.sentence.checka
1206   institution empty$
1207      'skip$
1208      { " / " institution *  output.nonnull }
1209   if$
1210   format.address.publisher.year output
1211   number new.sentence.checka
1212   format.tr.number.din "number" output.check
1213 %%  new.sentence
1214   pages set.period.dash.check
1215   format.pages.book output
1216   note "note" output.check
1217   isbn set.period.dash.check
1218   issn set.period.dash.check
1219   format.isbn.issn output
1220   fin.entry
1221 }
1222
1223 FUNCTION {unpublished} {misc}%% author, title, note muessen sein! howpublished
1224 %%                           %% entfaellt natuerlich 
1225 FUNCTION {default.type} { misc }
1226
1227 MACRO {jan} {"Januar"}
1228
1229 MACRO {feb} {"Februar"}
1230
1231 MACRO {mar} {"M{\^^b a}rz"}
1232 %% nach Bernd Raichle, Febr. 1999
1233
1234 MACRO {apr} {"April"}
1235
1236 MACRO {mai} {"Mai"}
1237
1238 MACRO {may} {"Mai"}
1239
1240 MACRO {jun} {"Juni"}
1241
1242 MACRO {jul} {"Juli"}
1243
1244 MACRO {aug} {"August"}
1245
1246 MACRO {sep} {"September"}
1247
1248 MACRO {okt} {"Oktober"}
1249
1250 MACRO {oct} {"Oktober"}
1251
1252 MACRO {nov} {"November"}
1253
1254 MACRO {dez} {"Dezember"}
1255
1256 MACRO {dec} {"Dezember"}
1257
1258 %%  stillgelegte Beispiele fuer den Gebrauch von Kuerzeln (hier Zs-Titel).
1259
1260 %%MACRO {acmcs} {"ACM Computing Surveys"}
1261
1262 %%MACRO {acta} {"Acta Informatica"}
1263
1264 %%MACRO {cacm} {"Communications of the ACM"}
1265
1266 %%MACRO {ibmjrd} {"IBM Journal of Research and Development"}
1267
1268 %%MACRO {ibmsj} {"IBM Systems Journal"}
1269
1270 %%MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
1271
1272 %%MACRO {ieeetc} {"IEEE Transactions on Computers"}
1273
1274 %%MACRO {ieeetcad}
1275 %% {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
1276
1277 %%MACRO {ipl} {"Information Processing Letters"}
1278
1279 %%MACRO {jacm} {"Journal of the ACM"}
1280
1281 READ
1282
1283 FUNCTION {sortify}
1284 { purify$
1285   "l" change.case$
1286 }
1287
1288 INTEGERS { len }
1289
1290 FUNCTION {chop.word}
1291 { 's :=
1292   'len :=
1293   s #1 len substring$ =
1294     { s len #1 + global.max$ substring$ }
1295     's
1296   if$
1297 }
1298
1299 INTEGERS { et.al.char.used }
1300
1301 FUNCTION {initialize.et.al.char.used}
1302 { #0 'et.al.char.used :=
1303 }
1304
1305 EXECUTE {initialize.et.al.char.used}
1306
1307 FUNCTION {format.lab.names}
1308 { 's :=
1309   s num.names$ 'numnames :=
1310   numnames #1 >
1311     { numnames #4 >
1312         { #3 'namesleft := }
1313         { numnames 'namesleft := }
1314       if$
1315       #1 'nameptr :=
1316       ""
1317         { namesleft #0 > }
1318         { nameptr numnames =
1319             { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1320 %%              { "\," *  %% kein besonderes Zeichen fuer "others" i. label
1321                 { "{\etalchar{+}}" *   %% ein plus-Zeichen (+) fuer "others"!
1322                   #1 'et.al.char.used :=
1323                 }
1324 %%              { s nameptr "{v{}}{l{}}" format.name$ * }
1325                 { s nameptr "{l{}}" format.name$ * }
1326               if$
1327             }
1328 %%          { s nameptr "{v{}}{l{}}" format.name$ * }
1329             { s nameptr "{l{}}" format.name$ * }
1330           if$
1331           nameptr #1 + 'nameptr :=
1332           namesleft #1 - 'namesleft :=
1333         }
1334       while$
1335       numnames #4 >
1336 %%        { "\," *  %%  s. Bemerkung oben
1337         { "{\etalchar{+}}" *
1338           #1 'et.al.char.used :=
1339         }
1340         'skip$
1341       if$
1342     }
1343 %%  { s #1 "{v{}}{l{}}" format.name$
1344     { s #1 "{l{}}" format.name$
1345       duplicate$ text.length$ #2 <
1346         { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ } %%  vgl. Anmerkung!
1347         'skip$
1348       if$
1349     }
1350   if$
1351 }
1352 %% Anmerkung, Lo 14/12/95:
1353 %% wenn man in der letzten label-Bearbeitung #4 statt #3 setzt, dann werden
1354 %% auch Umlaute oder Ã¡ an 3. Stelle im Namen korrekt in das label genommen.
1355 %% Tip: Aendere diese Zahl nur, wenn in einer Lit.-Liste der Umlautsonderfall
1356 %% stoerend auffaellt.
1357
1358 FUNCTION {author.key.label}
1359 { author empty$
1360     { key empty$
1361         { cite$ #1 #3 substring$ }
1362         { key #3 text.prefix$ }
1363       if$
1364     }
1365     { author format.lab.names }
1366   if$
1367 }
1368
1369 FUNCTION {author.editor.key.label}
1370 { author empty$
1371     { editor empty$
1372         { key empty$
1373             { cite$ #1 #3 substring$ }
1374             { key #3 text.prefix$ }
1375           if$
1376         }
1377         { editor format.lab.names }
1378       if$
1379     }
1380     { author format.lab.names }
1381   if$
1382 }
1383
1384 FUNCTION {author.key.organization.label}
1385 { author empty$
1386     { key empty$
1387         { organization empty$
1388             { cite$ #1 #3 substring$ }
1389             { "The " #4 organization chop.word #3 text.prefix$ }
1390           if$
1391         }
1392         { key #3 text.prefix$ }
1393       if$
1394     }
1395     { author format.lab.names }
1396   if$
1397 }
1398 %% neu 19/5/99 damit eigene labels fuer Konferenzen erzeugt werden koennen,
1399 %%             darf man zusaetzlich auch ein key-Feld eingeben. Das produziert
1400 %%             dann vorrangig das label.
1401 FUNCTION {editor.key.organization.label}
1402 { editor empty$
1403     { key empty$
1404         { organization empty$
1405             { cite$ #1 #3 substring$ }
1406             { "The " #4 organization chop.word organization } %% Lo, 26/1/98
1407 %%          { "The " #4 organization chop.word #3 text.prefix$ }
1408           if$
1409         }
1410         { key #5 text.prefix$ }%%  man kann Laenge des key einstellen
1411       if$
1412     }
1413     { key empty$%%  wenn key vh., dann macht er das label! Lo,18/5/99
1414         { editor format.lab.names }
1415         { key #5 text.prefix$ }
1416       if$
1417     }
1418   if$
1419 }
1420
1421 FUNCTION {calc.label}
1422 { type$ "book" =
1423   type$ "inbook" =
1424   or
1425     'author.editor.key.label
1426     { type$ "proceedings" =
1427         'editor.key.organization.label
1428         { type$ "manual" =
1429             'author.key.organization.label
1430             'author.key.label
1431           if$
1432         }
1433       if$
1434     }
1435   if$
1436   duplicate$
1437   year field.or.null purify$ #-1 #2 substring$
1438   *
1439   'label :=
1440   year field.or.null purify$ #-1 #4 substring$
1441   *
1442   sortify 'sort.label :=
1443 }
1444
1445 FUNCTION {sort.format.names}
1446 { 's :=
1447   #1 'nameptr :=
1448   ""
1449   s num.names$ 'numnames :=
1450   numnames 'namesleft :=
1451     { namesleft #0 > }
1452     { nameptr #1 >
1453         { "   " * }
1454         'skip$
1455       if$
1456 %     s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
1457 %
1458 %     Zeile geaendert, damit die Namenszusaetze wie von, de usw nach deutscher
1459 %     Norm richtig einsortiert werden.   27.10.94 Lueddecke
1460 %
1461       s nameptr "{ll{ }}{  ff{ }}{ vv{ }}{  jj{ }}" format.name$ 't :=
1462       nameptr numnames = t "others" = and
1463         { "[u.~a.]" * }
1464          %%             { "et al" * }% Geschmackssache
1465         { t sortify * }
1466       if$
1467       nameptr #1 + 'nameptr :=
1468       namesleft #1 - 'namesleft :=
1469     }
1470   while$
1471 }
1472
1473 FUNCTION {sort.format.title}
1474 { 't :=
1475   "A " #2
1476     "An " #3
1477       "Der " #4
1478         "Die " #4
1479           "Das " #4
1480             "Ein " #4
1481               "Eine " #5 
1482                   "The " #4 t chop.word
1483                chop.word
1484              chop.word
1485            chop.word
1486          chop.word
1487        chop.word
1488     chop.word
1489   chop.word
1490   sortify
1491   #1 global.max$ substring$
1492 }
1493
1494 FUNCTION {author.sort}
1495 { author empty$
1496     { key empty$
1497         { "to sort, need author or key in " cite$ * warning$
1498           ""
1499         }
1500         { key sortify }
1501       if$
1502     }
1503     { author sort.format.names }
1504   if$
1505 }
1506
1507 FUNCTION {author.editor.sort}
1508 { author empty$
1509     { editor empty$
1510         { key empty$
1511             { "to sort, need author, editor, or key in " cite$ * warning$
1512               ""
1513             }
1514             { key sortify }
1515           if$
1516         }
1517         { editor sort.format.names }
1518       if$
1519     }
1520     { author sort.format.names }
1521   if$
1522 }
1523
1524 FUNCTION {author.organization.sort}
1525 { author empty$
1526     { organization empty$
1527         { key empty$
1528             { "to sort, need author, organization, or key in " cite$ * warning$
1529               ""
1530             }
1531             { key sortify }
1532           if$
1533         }
1534         { "The " #4 organization chop.word sortify }
1535       if$
1536     }
1537     { author sort.format.names }
1538   if$
1539 }
1540
1541 FUNCTION {editor.organization.sort}
1542 { editor empty$
1543     { organization empty$
1544         { key empty$
1545             { "to sort, need editor, organization, or key in " cite$ * warning$
1546               ""
1547             }
1548             { key sortify }
1549           if$
1550         }
1551         { "The " #4 organization chop.word sortify }
1552       if$
1553     }
1554     { editor sort.format.names }
1555   if$
1556 }
1557
1558 FUNCTION {presort}
1559 { calc.label
1560   sort.label
1561   "    "
1562   *
1563   type$ "book" =
1564   type$ "inbook" =
1565   or
1566     'author.editor.sort
1567     { type$ "proceedings" =
1568         'editor.organization.sort
1569         { type$ "manual" =
1570             'author.organization.sort
1571             'author.sort
1572           if$
1573         }
1574       if$
1575     }
1576   if$
1577   *
1578   "    "
1579   *
1580   year field.or.null sortify
1581   *
1582   "    "
1583   *
1584   title field.or.null
1585   sort.format.title
1586   *
1587   #1 entry.max$ substring$
1588   'sort.key$ :=
1589 }
1590
1591 ITERATE {presort}
1592
1593 SORT
1594
1595 STRINGS { longest.label last.sort.label next.extra }
1596
1597 INTEGERS { longest.label.width last.extra.num }
1598
1599 FUNCTION {initialize.longest.label}
1600 { "" 'longest.label :=
1601   #0 int.to.chr$ 'last.sort.label :=
1602   "" 'next.extra :=
1603   #0 'longest.label.width :=
1604   #0 'last.extra.num :=
1605 }
1606
1607 FUNCTION {forward.pass}
1608 { last.sort.label sort.label =
1609     { last.extra.num #1 + 'last.extra.num :=
1610       last.extra.num int.to.chr$ 'extra.label :=
1611     }
1612     { "a" chr.to.int$ 'last.extra.num :=
1613       "" 'extra.label :=
1614       sort.label 'last.sort.label :=
1615     }
1616   if$
1617 }
1618
1619 FUNCTION {reverse.pass}
1620 { next.extra "b" =
1621     { "a" 'extra.label := }
1622     'skip$
1623   if$
1624   label extra.label * 'label :=
1625   label width$ longest.label.width >
1626     { label 'longest.label :=
1627       label width$ 'longest.label.width :=
1628     }
1629     'skip$
1630   if$
1631   extra.label 'next.extra :=
1632 }
1633
1634 EXECUTE {initialize.longest.label}
1635
1636 ITERATE {forward.pass}
1637
1638 REVERSE {reverse.pass}
1639
1640 FUNCTION {begin.bib}%%lt. Original wiederhergestellt 4/1/96
1641 { et.al.char.used
1642     { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
1643     'skip$
1644   if$
1645   preamble$ empty$
1646     'skip$
1647     { preamble$ write$ newline$ }
1648   if$
1649   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
1650 }
1651
1652 EXECUTE {begin.bib}
1653
1654 EXECUTE {init.state.consts}
1655
1656 ITERATE {call.type$}
1657
1658 FUNCTION {end.bib}
1659 { newline$
1660   "\end{thebibliography}" write$ newline$
1661 }
1662
1663 EXECUTE {end.bib}
1664
1665 %% Ende von ALPHADIN.BST  KFL, 23/11/99