Debian Codegraph @

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