Debian Codegraph @

texmf-dist/bibtex/bst/adrconv/adrconv.bst

raw
1 %%
2 %% This is file `adrconv.bst',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% adrconv.dtx (with options: `bst,conv')
8 %% Copyright 2006, 2010, 2018 Axel Kielhorn
9 %%
10 %% This file will generate fast loadable files from adrconv.dtx when
11 %% run through LaTeX or TeX.
12 %%
13 %% This work may be distributed and/or modified under the
14 %% conditions of the LaTeX Project Public License, either version 1.3
15 %% of this license or (at your option) any later version.
16 %% The latest version of this license is in
17 %% http://www.latex-project.org/lppl.txt
18 %% and version 1.3 or later is part of all distributions of LaTeX
19 %% version 2003/12/01 or later.
20 %%
21 %% This file is part of the adrconv bundle.
22 %%
23 %% The adrconv bundle consists at least of the files adrconv.dtx,
24 %% adrconv.ins and adrguide.tex.
25 %%
26 %% adrguide.dtx
27 %% Copyright 2006, 2010, 2018 Axel Kielhorn
28 ENTRY
29 { name
30 sortas
31 title
32 organization
33 city
34 zip
35 country
36 street
37 phone
38 mobile
39 fax
40 url
41 email
42 note
43 key
44 birthday
45 nbirthday
46 }
47 {}
48 { adr.char }
49 INTEGERS { cur.adr.char }
50 FUNCTION {get.names}
51 { name empty$
52 { organization empty$
53 { "{}{}" }
54 { organization "{}" * }
55 if$
56 }
57 { "{" name #1 "{ll}" format.name$ "}" * *
58 "{" name #1 "{ff}{ vv}" format.name$ "}" * * *
59 }
60 if$
61 }
62 FUNCTION {print.adrchr}
63 { adr.char chr.to.int$ cur.adr.char >
64 { newline$ "\adrchar{" adr.char "}" * * write$ newline$
65 adr.char chr.to.int$ 'cur.adr.char :=
66 }
67 'skip$
68 if$
69 }
70 FUNCTION{format.phone.and.mobile}
71 { phone empty$
72 {
73 mobile empty$
74 { "" }
75 { mobile }
76 if$
77 }{
78 mobile empty$
79 { phone }
80 { phone "\\" mobile * * }
81 if$
82 }
83 if$
84 }
85 FUNCTION{address}
86 {
87 print.adrchr
88 "\adrentry" write$
89 get.names write$ newline$
90 "{"
91 street empty$
92 { "" * }
93 { street " \\ " * *}
94 if$
95 zip empty$
96 { "" * }
97 { zip " " * *}
98 if$
99 city empty$
100 { "" * }
101 { city * }
102 if$
103 "}{" *
104 format.phone.and.mobile
105 "}" * *
106 email empty$
107 { "{}" * }
108 { "{" email "}" * * * }
109 if$
110 organization empty$
111 { "{}" * }
112 { "{" organization "}" * * *}
113 if$
114 note empty$
115 { "{}" * }
116 { "{" note "}" * * * }
117 if$
118 "{" *
119 key empty$
120 { "" }
121 { key }
122 if$
123 "}" * * write$ newline$
124 }
125 FUNCTION{presort}
126 {
127 sortas empty$
128 { name empty$
129 { organization empty$
130 { key empty$
131 { "No name, organization, or key to sort " cite$ * warning$
132 "???"
133 }
134 { key }
135 if$
136 }
137 { organization }
138 if$
139 }
140 { name #1 "{ll},{f }{v }{, j}" format.name$ }
141 if$
142 }
143 { sortas }
144 if$
145 duplicate$
146 'sort.key$ :=
147 #1 #1 substring$
148 'adr.char :=
149 }
150 READ
151 ITERATE {presort}
152 SORT
153 FUNCTION {begin.bib}
154 {
155 preamble$ empty$
156 'skip$
157 { preamble$ write$ newline$ }
158 if$
159 #0 'cur.adr.char :=
160 }
161 EXECUTE {begin.bib}
162 ITERATE {call.type$}
163 FUNCTION {end.bib}
164 { newline$ }
165 EXECUTE {end.bib}