Debian Codegraph @

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

raw
1 %%
2 %% This is file `adrfax.bst',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% adrconv.dtx (with options: `bst,fax')
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.fax}
71 { phone empty$
72 { "" }
73 { phone }
74 if$
75 fax empty$
76 'skip$
77 { phone empty$
78 { fax * }
79 { "\\Fax:\\" fax * * }
80 if$
81 }
82 if$
83 }
84 FUNCTION{address}
85 {
86 print.adrchr
87 "\adrentry" write$
88 get.names write$ newline$
89 "{"
90 street empty$
91 { "" * }
92 { street " \\ " * *}
93 if$
94 zip empty$
95 { "" * }
96 { zip " " * *}
97 if$
98 city empty$
99 { "" * }
100 { city * }
101 if$
102 "}{" *
103 format.phone.and.fax
104 "}" * *
105 email empty$
106 { "{}" * }
107 { "{" email "}" * * * }
108 if$
109 organization empty$
110 { "{}" * }
111 { "{" organization "}" * * *}
112 if$
113 note empty$
114 { "{}" * }
115 { "{" note "}" * * * }
116 if$
117 "{" *
118 key empty$
119 { "" }
120 { key }
121 if$
122 "}" * * write$ newline$
123 }
124 FUNCTION{presort}
125 {
126 sortas empty$
127 { name empty$
128 { organization empty$
129 { key empty$
130 { "No name, organization, or key to sort " cite$ * warning$
131 "???"
132 }
133 { key }
134 if$
135 }
136 { organization }
137 if$
138 }
139 { name #1 "{ll},{f }{v }{, j}" format.name$ }
140 if$
141 }
142 { sortas }
143 if$
144 duplicate$
145 'sort.key$ :=
146 #1 #1 substring$
147 'adr.char :=
148 }
149 READ
150 ITERATE {presort}
151 SORT
152 FUNCTION {begin.bib}
153 {
154 preamble$ empty$
155 'skip$
156 { preamble$ write$ newline$ }
157 if$
158 #0 'cur.adr.char :=
159 }
160 EXECUTE {begin.bib}
161 ITERATE {call.type$}
162 FUNCTION {end.bib}
163 { newline$ }
164 EXECUTE {end.bib}