Debian Codegraph @

texmf-dist/source/bibtex/bibtools/subset-dfk.bst

raw
1 % BibTeX bibliography style `subset'
2 % by David Kotz [email protected]
3 % August 1992, May 1993, February 1999
4 % This takes an aux file and produces an unusual .bbl file,
5 % that is actually in .bib format -- but it has all of the references,
6 % and strings expanded. Thus, it becomes a complete, portable .bib
7 % file. Crossrefs are retained but redundant.
8 % adds my name to the comment field
9 % modified from
10 % BibTeX bibliography style `abstract'
11 % by David Kotz [email protected]
12 % March 1989
13 % modified from
14 % BibTeX standard bibliography style `alpha'
15 % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
16 % Copyright (C) 1985, all rights reserved.
17 % Copying of this file is authorized only if either
18 % (1) you make absolutely no changes to your copy, including name, or
19 % (2) if you do make changes, you name it something other than
20 % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
21 % This restriction helps ensure that all standard styles are identical.
22 % The file btxbst.doc has the documentation for this style.
23
24 % DFK added abstract, comment, keyword to standard set
25 % 5/93 DFK added private, ignored when subsetting
26 % 7/94 DFK added URL
27 ENTRY
28 { abstract
29 address
30 author
31 booktitle
32 category
33 chapter
34 comment
35 earlier
36 edition
37 editor
38 howpublished
39 institution
40 journal
41 key
42 keyword
43 later
44 month
45 note
46 number
47 organization
48 pages
49 private
50 publisher
51 school
52 series
53 title
54 type
55 URL
56 volume
57 year
58 }
59 {}
60 { label extra.label sort.label }
61
62 STRINGS { s t }
63
64 % output a field; the top is the text, the next to top is the name of
65 % the field, and we know that the text is nonnull.
66 % we start by finishing the previous line
67 FUNCTION {output.field}
68 {
69 ", " write$ % write comma and newline
70 newline$
71 " " write$ % and a respectable indentation
72
73 swap$ % now field name is on top
74 " = {" * % put = {
75 swap$ * % now text is back on top; concatenate
76 "}" * % put }
77 write$
78 }
79
80 % output if top not empty; below the top is the name of the field
81 FUNCTION {output}
82 { duplicate$ empty$
83 { pop$ pop$ }
84 'output.field
85 if$
86 }
87
88 % special for "comment"
89 % output if top not empty; below the top is the name of the field
90 FUNCTION {output.comment}
91 { duplicate$ empty$
92 { pop$ pop$ }
93 { " [[email protected]]" * output.field }
94 if$
95 }
96
97 % prints each field
98 FUNCTION {output.bibfields}
99 {
100 % The fields, in what seems to be a good order
101 "key" key output
102 "author" author output
103 "title" title output
104
105 "journal" journal output
106 "booktitle" booktitle output
107
108 "chapter" chapter output
109 "edition" edition output
110 "editor" editor output
111
112 crossref missing$
113 { }
114 { "crossref" crossref output }
115 if$
116
117 "year" year output
118 "month" month output
119 "series" series output
120 "volume" volume output
121 "number" number output
122 "type" type output
123
124 "pages" pages output
125
126 "institution" institution output
127 "school" school output
128 "organization" organization output
129 "publisher" publisher output
130 "howpublished" howpublished output
131 "address" address output
132
133 "category" category output
134
135 "note" note output
136
137 "earlier" earlier output
138 "later" later output
139
140 "URL" URL output
141 "keyword" keyword output
142 "abstract" abstract output
143 "comment" comment output.comment
144 }
145
146 % Takes name of type as argument, and prints @ line
147 % then it prints each field
148 FUNCTION {output.bibitem}
149 {
150 % write the @ line
151 "@" swap$ * write$ % @type
152 "{" cite$ * write$ % {citekey
153
154 output.bibfields
155
156 % finish entry
157 newline$
158 "}" write$
159 newline$
160 newline$
161 }
162
163 FUNCTION {article}{ "Article" output.bibitem }
164
165 FUNCTION {book}{ "Book" output.bibitem }
166
167 FUNCTION {booklet}{ "Booklet" output.bibitem }
168
169 FUNCTION {inbook}{ "InBook" output.bibitem }
170
171 FUNCTION {incollection}{ "InCollection" output.bibitem }
172
173 FUNCTION {inproceedings}{ "InProceedings" output.bibitem }
174
175 FUNCTION {conference}{ "Conference" output.bibitem }
176
177 FUNCTION {manual}{ "Manual" output.bibitem }
178
179 FUNCTION {mastersthesis}{ "MastersThesis" output.bibitem }
180
181 FUNCTION {misc}{ "Misc" output.bibitem }
182
183 FUNCTION {phdthesis}{ "PhdThesis" output.bibitem }
184
185 FUNCTION {proceedings}{ "Proceedings" output.bibitem }
186
187 FUNCTION {techreport}{ "TechReport" output.bibitem }
188
189 FUNCTION {unpublished}{ "Unpublished" output.bibitem }
190
191 FUNCTION {default.type} { misc }
192
193 MACRO {jan} {"January"}
194
195 MACRO {feb} {"February"}
196
197 MACRO {mar} {"March"}
198
199 MACRO {apr} {"April"}
200
201 MACRO {may} {"May"}
202
203 MACRO {jun} {"June"}
204
205 MACRO {jul} {"July"}
206
207 MACRO {aug} {"August"}
208
209 MACRO {sep} {"September"}
210
211 MACRO {oct} {"October"}
212
213 MACRO {nov} {"November"}
214
215 MACRO {dec} {"December"}
216
217 MACRO {acmcs} {"ACM Computing Surveys"}
218
219 MACRO {acta} {"Acta Informatica"}
220
221 MACRO {cacm} {"Communications of the ACM"}
222
223 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
224
225 MACRO {ibmsj} {"IBM Systems Journal"}
226
227 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
228
229 MACRO {ieeetc} {"IEEE Transactions on Computers"}
230
231 MACRO {ieeetcad}
232 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
233
234 MACRO {ipl} {"Information Processing Letters"}
235
236 MACRO {jacm} {"Journal of the ACM"}
237
238 MACRO {jcss} {"Journal of Computer and System Sciences"}
239
240 MACRO {scp} {"Science of Computer Programming"}
241
242 MACRO {sicomp} {"SIAM Journal on Computing"}
243
244 MACRO {tocs} {"ACM Transactions on Computer Systems"}
245
246 MACRO {tods} {"ACM Transactions on Database Systems"}
247
248 MACRO {tog} {"ACM Transactions on Graphics"}
249
250 MACRO {toms} {"ACM Transactions on Mathematical Software"}
251
252 MACRO {toois} {"ACM Transactions on Office Information Systems"}
253
254 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
255
256 MACRO {tcs} {"Theoretical Computer Science"}
257
258 READ
259
260 % DFK use cite$ for sort key
261 FUNCTION {presort}
262 {
263 cite$
264 #1 entry.max$ substring$
265 'sort.key$ :=
266 }
267
268 ITERATE {presort}
269
270 SORT
271
272 FUNCTION {begin.bib}
273 {
274 "% BibTeX bibliography file" write$
275 newline$
276 newline$
277 }
278
279 EXECUTE {begin.bib}
280
281 ITERATE {call.type$}