summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex/bst/adrconv/email.bst
blob: f063a7c2ae78641e9e2b35285d7f3c673a6e59ac (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
%%
%% This is file `email.bst',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% adrconv.dtx  (with options: `bst,email')
%% Copyright 2006 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.
%% 
%% You are NOT ALLOWED to change this file.
%% 
%% You are NOT ALLOWED to distribute this file without adrconv.dtx,
%% adrconv.ins or adrguide.tex.
%% adrguide.dtx
%% Copyright 2006 Axel Kielhorn
ENTRY
  { name
   sortas
    title
    organization
    city
    zip
    country
    street
    phone
    mobile
    fax
    url
    email
    note
    key
    birthday
    nbirthday
  }
  {}
  { adr.char }
INTEGERS { cur.adr.char }
FUNCTION {get.names}
{ name empty$
   { organization empty$
      { "{}{}" }
      { organization "{}" * }
     if$
   }
   { "{" name #1 "{ll}" format.name$ "}" * *
     "{" name #1 "{ff}{ vv}" format.name$ "}" * * *
   }
   if$
}
FUNCTION {print.adrchr}
{ adr.char chr.to.int$ cur.adr.char >
  { newline$ "\adrchar{" adr.char "}" * * write$ newline$
    adr.char chr.to.int$ 'cur.adr.char :=
  }
  'skip$
  if$
}
FUNCTION{address}
{
    print.adrchr
    "\adrentry" write$
    get.names write$ newline$
    "{"
    street empty$
      { "" }
      { street " \\ " *}
    if$
    *
    zip empty$
      { "" }
      { zip }
    if$
    " " * *
    city empty$
      { "" }
      { city }
    if$
    "}{" * *
    email empty$
      { "" }
      { email }
    if$
    "}{}{}{}{" * *
    key empty$
      { "" }
      { key }
    if$
    "}" * * write$ newline$
}
FUNCTION{presort}
{
  sortas empty$
  { name empty$
    { organization empty$
      { key empty$
        { "No name, organization, or key to sort " cite$ * warning$
          "???"
        }
        { key }
        if$
      }
      { organization }
      if$
    }
    { name #1 "{ll},{f }{v }{, j}" format.name$ }
    if$
  }
  { sortas }
  if$
  duplicate$
  'sort.key$ :=
  #1 #1 substring$
  'adr.char :=
}
READ
ITERATE {presort}
SORT
FUNCTION {begin.bib}
{
  "\def\sbscrpt{\_} \catcode`\_=\active \let_=\sbscrpt"
  write$ newline$
  preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  #0 'cur.adr.char :=
}
EXECUTE {begin.bib}
ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$ }
EXECUTE {end.bib}