1 |
%% plainhtml.bst |
2 |
%% |
3 |
%% Part of bibhtml, version 1.3, released 2006 October 31 |
4 |
%% See <http://purl.org/nxg/dist/bibhtml> |
5 |
%% |
6 |
%% Copyright 1999, 2005, 2006, Norman Gray <norman@astro.gla.ac.uk> |
7 |
% |
8 |
% $Id: plainhtml.bst,v 1.1 2007/09/15 01:17:49 norman Exp $ |
9 |
% |
10 |
% Released under the terms of the GNU General Public Licence -- |
11 |
% see the file LICENCE, included in the distribution. |
12 |
% |
13 |
% Version history: |
14 |
% 1.3 31 October 2006: added 'hrefprefix' variable; minor code tidups |
15 |
% 1.2 19 September 2005: added `webpage' entry type, and |
16 |
% `lastchecked' field. |
17 |
% 1.1 6 June 1999. Tidied documenation, clarified licence. |
18 |
% 1.0b3 April 1998, added support for eprint field |
19 |
% (in article, techreport, misc, inproceedings, unpublished) |
20 |
% 1.0b2 December 1996, added the above exhortation! |
21 |
% 1.0b1 Original version |
22 |
% |
23 |
% Modification of... |
24 |
% BibTeX standard bibliography style `plain' |
25 |
% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09. |
26 |
% Copyright (C) 1985, all rights reserved. |
27 |
% Copying of this file is authorized only if either |
28 |
% (1) you make absolutely no changes to your copy, including name, or |
29 |
% (2) if you do make changes, you name it something other than |
30 |
% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst. |
31 |
% This restriction helps ensure that all standard styles are identical. |
32 |
% The file btxbst.doc has the documentation for this style. |
33 |
% ... to make it produce HTML, and add the url field |
34 |
% |
35 |
% this produces a file which is a <dl>...</dl>, which should be incorporated |
36 |
% into another html file somehow. |
37 |
% There will still be ~ and -- within the output file (it's too difficult |
38 |
% to get rid of them here). A post-processor should turn these |
39 |
% into either and &enspace; or ' ' and '-' as required. |
40 |
|
41 |
ENTRY |
42 |
{ address |
43 |
author |
44 |
booktitle |
45 |
chapter |
46 |
edition |
47 |
editor |
48 |
howpublished |
49 |
institution |
50 |
journal |
51 |
key |
52 |
month |
53 |
note |
54 |
number |
55 |
organization |
56 |
pages |
57 |
publisher |
58 |
school |
59 |
series |
60 |
title |
61 |
type |
62 |
volume |
63 |
year |
64 |
url |
65 |
lastchecked |
66 |
eprint |
67 |
%EDIT1 |
68 |
} |
69 |
{} |
70 |
{ label } |
71 |
|
72 |
INTEGERS { output.state before.all mid.sentence after.sentence after.block |
73 |
close.link } |
74 |
|
75 |
STRINGS { s t xxxmirror hrefprefix } |
76 |
|
77 |
% Initialise state constants, and location of nearest XXX mirror (for eprints) |
78 |
FUNCTION {init.state.consts} |
79 |
{ #0 'before.all := |
80 |
#1 'mid.sentence := |
81 |
#2 'after.sentence := |
82 |
#3 'after.block := |
83 |
#0 'close.link := |
84 |
|
85 |
"" 'hrefprefix := % "ref:" is a good alternative |
86 |
"xxx.arxiv.org" 'xxxmirror := |
87 |
} |
88 |
|
89 |
FUNCTION {output.nonnull} |
90 |
{ 's := |
91 |
output.state mid.sentence = |
92 |
{ ", " * write$ } |
93 |
{ output.state after.block = |
94 |
{ add.period$ write$ |
95 |
% close the <dt> after the end of the first block |
96 |
% and set closelink false |
97 |
close.link |
98 |
{ "</a></dt> <dd>" write$ |
99 |
#0 'close.link := } |
100 |
'skip$ |
101 |
if$ |
102 |
newline$ |
103 |
" " write$ |
104 |
} |
105 |
{ output.state before.all = |
106 |
'write$ |
107 |
{ add.period$ " " * write$ } |
108 |
if$ |
109 |
} |
110 |
if$ |
111 |
mid.sentence 'output.state := |
112 |
} |
113 |
if$ |
114 |
s |
115 |
} |
116 |
|
117 |
FUNCTION {output} |
118 |
{ duplicate$ empty$ |
119 |
'pop$ |
120 |
'output.nonnull |
121 |
if$ |
122 |
} |
123 |
|
124 |
FUNCTION {output.check} |
125 |
{ 't := |
126 |
duplicate$ empty$ |
127 |
{ pop$ "empty " t * " in " * cite$ * warning$ } |
128 |
'output.nonnull |
129 |
if$ |
130 |
} |
131 |
|
132 |
FUNCTION {output.bibitem} |
133 |
{ newline$ |
134 |
"<dt><a name=" quote$ * hrefprefix * write$ |
135 |
cite$ write$ |
136 |
quote$ ">[" * cite$ * "] " * write$ |
137 |
% the <dt> is closed within output.nonnull, as long as close.link is true |
138 |
#1 'close.link := |
139 |
% newline$ |
140 |
"" |
141 |
before.all 'output.state := |
142 |
} |
143 |
|
144 |
FUNCTION {fin.entry} |
145 |
{ add.period$ |
146 |
write$ |
147 |
newline$ |
148 |
"</dd>" write$ |
149 |
newline$ |
150 |
} |
151 |
|
152 |
FUNCTION {new.block} |
153 |
{ output.state before.all = |
154 |
'skip$ |
155 |
{ after.block 'output.state := } |
156 |
if$ |
157 |
} |
158 |
|
159 |
FUNCTION {new.sentence} |
160 |
{ output.state after.block = |
161 |
'skip$ |
162 |
{ output.state before.all = |
163 |
'skip$ |
164 |
{ after.sentence 'output.state := } |
165 |
if$ |
166 |
} |
167 |
if$ |
168 |
} |
169 |
|
170 |
FUNCTION {not} |
171 |
{ { #0 } |
172 |
{ #1 } |
173 |
if$ |
174 |
} |
175 |
|
176 |
FUNCTION {and} |
177 |
{ 'skip$ |
178 |
{ pop$ #0 } |
179 |
if$ |
180 |
} |
181 |
|
182 |
FUNCTION {or} |
183 |
{ { pop$ #1 } |
184 |
'skip$ |
185 |
if$ |
186 |
} |
187 |
|
188 |
FUNCTION {new.block.checka} |
189 |
{ empty$ |
190 |
'skip$ |
191 |
'new.block |
192 |
if$ |
193 |
} |
194 |
|
195 |
FUNCTION {new.block.checkb} |
196 |
{ empty$ |
197 |
swap$ empty$ |
198 |
and |
199 |
'skip$ |
200 |
'new.block |
201 |
if$ |
202 |
} |
203 |
|
204 |
FUNCTION {new.sentence.checka} |
205 |
{ empty$ |
206 |
'skip$ |
207 |
'new.sentence |
208 |
if$ |
209 |
} |
210 |
|
211 |
FUNCTION {new.sentence.checkb} |
212 |
{ empty$ |
213 |
swap$ empty$ |
214 |
and |
215 |
'skip$ |
216 |
'new.sentence |
217 |
if$ |
218 |
} |
219 |
|
220 |
FUNCTION {field.or.null} |
221 |
{ duplicate$ empty$ |
222 |
{ pop$ "" } |
223 |
'skip$ |
224 |
if$ |
225 |
} |
226 |
|
227 |
FUNCTION {emphasize} |
228 |
{ duplicate$ empty$ |
229 |
{ pop$ "" } |
230 |
{ "<em>" swap$ * "</em>" * } |
231 |
if$ |
232 |
} |
233 |
|
234 |
INTEGERS { nameptr namesleft numnames } |
235 |
|
236 |
FUNCTION {format.names} |
237 |
{ 's := |
238 |
#1 'nameptr := |
239 |
s num.names$ 'numnames := |
240 |
numnames 'namesleft := |
241 |
{ namesleft #0 > } |
242 |
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := |
243 |
nameptr #1 > |
244 |
{ namesleft #1 > |
245 |
{ ", " * t * } |
246 |
{ numnames #2 > |
247 |
{ "," * } |
248 |
'skip$ |
249 |
if$ |
250 |
t "others" = |
251 |
{ " et~al." * } |
252 |
{ " and " * t * } |
253 |
if$ |
254 |
} |
255 |
if$ |
256 |
} |
257 |
't |
258 |
if$ |
259 |
nameptr #1 + 'nameptr := |
260 |
namesleft #1 - 'namesleft := |
261 |
} |
262 |
while$ |
263 |
} |
264 |
|
265 |
FUNCTION {format.authors} |
266 |
{ author empty$ |
267 |
{ "" } |
268 |
{ author format.names } |
269 |
if$ |
270 |
} |
271 |
|
272 |
FUNCTION {format.editors} |
273 |
{ editor empty$ |
274 |
{ "" } |
275 |
{ editor format.names |
276 |
editor num.names$ #1 > |
277 |
{ ", editors" * } |
278 |
{ ", editor" * } |
279 |
if$ |
280 |
} |
281 |
if$ |
282 |
} |
283 |
|
284 |
%FUNCTION {format.title} |
285 |
%{ title empty$ |
286 |
% { "" } |
287 |
% { title "t" change.case$ } |
288 |
% if$ |
289 |
%} |
290 |
|
291 |
% format the title, and surround it with the URL if one is defined |
292 |
FUNCTION {format.title} |
293 |
{ title empty$ |
294 |
{ "" } |
295 |
{ url empty$ |
296 |
{ title "t" change.case$ } |
297 |
{ "<a href=" quote$ * url * quote$ * " >" * |
298 |
title "t" change.case$ * "</a>" * } |
299 |
if$ |
300 |
} |
301 |
if$ |
302 |
} |
303 |
|
304 |
% format the eprint number, and surround it with a URL pointing to |
305 |
% one of the XXX mirrors |
306 |
FUNCTION {format.eprint} |
307 |
{ eprint empty$ |
308 |
{ "" } |
309 |
{ "eprint <a href=" quote$ * "http://" * xxxmirror * "/abs/" * eprint * |
310 |
quote$ * " >" * eprint * "</a>" * } |
311 |
if$ |
312 |
} |
313 |
|
314 |
FUNCTION {n.dashify} |
315 |
{ 't := |
316 |
"" |
317 |
{ t empty$ not } |
318 |
{ t #1 #1 substring$ "-" = |
319 |
{ t #1 #2 substring$ "--" = not |
320 |
{ "-" * |
321 |
t #2 global.max$ substring$ 't := |
322 |
} |
323 |
{ { t #1 #1 substring$ "-" = } |
324 |
{ "-" * |
325 |
t #2 global.max$ substring$ 't := |
326 |
} |
327 |
while$ |
328 |
} |
329 |
if$ |
330 |
} |
331 |
{ t #1 #1 substring$ * |
332 |
t #2 global.max$ substring$ 't := |
333 |
} |
334 |
if$ |
335 |
} |
336 |
while$ |
337 |
} |
338 |
|
339 |
FUNCTION {format.date} |
340 |
{ year empty$ |
341 |
{ month empty$ |
342 |
{ "" } |
343 |
{ "there's a month but no year in " cite$ * warning$ |
344 |
month |
345 |
} |
346 |
if$ |
347 |
} |
348 |
{ month empty$ |
349 |
'year |
350 |
{ month " " * year * } |
351 |
if$ |
352 |
} |
353 |
if$ |
354 |
} |
355 |
|
356 |
%FUNCTION {format.btitle} |
357 |
%{ title emphasize |
358 |
%} |
359 |
|
360 |
FUNCTION {format.btitle} |
361 |
{ title empty$ |
362 |
{ booktitle empty$ |
363 |
{ "need title or booktitle in format.btitle" warning$ } |
364 |
{ booktitle 's := } |
365 |
if$ |
366 |
} |
367 |
{ title 's := } |
368 |
if$ |
369 |
url empty$ |
370 |
{ s emphasize } |
371 |
{ "<a href=" quote$ * url * quote$ * " >" * |
372 |
s emphasize * "</a>" * } |
373 |
if$ |
374 |
} |
375 |
|
376 |
FUNCTION {tie.or.space.connect} |
377 |
{ duplicate$ text.length$ #3 < |
378 |
{ "~" } |
379 |
{ " " } |
380 |
if$ |
381 |
swap$ * * |
382 |
} |
383 |
|
384 |
FUNCTION {either.or.check} |
385 |
{ empty$ |
386 |
'pop$ |
387 |
{ "can't use both " swap$ * " fields in " * cite$ * warning$ } |
388 |
if$ |
389 |
} |
390 |
|
391 |
FUNCTION {format.bvolume} |
392 |
{ volume empty$ |
393 |
{ "" } |
394 |
{ "volume" volume tie.or.space.connect |
395 |
series empty$ |
396 |
'skip$ |
397 |
{ " of " * series emphasize * } |
398 |
if$ |
399 |
"volume and number" number either.or.check |
400 |
} |
401 |
if$ |
402 |
} |
403 |
|
404 |
FUNCTION {format.number.series} |
405 |
{ volume empty$ |
406 |
{ number empty$ |
407 |
{ series field.or.null } |
408 |
{ output.state mid.sentence = |
409 |
{ "number" } |
410 |
{ "Number" } |
411 |
if$ |
412 |
number tie.or.space.connect |
413 |
series empty$ |
414 |
{ "there's a number but no series in " cite$ * warning$ } |
415 |
{ " in " * series * } |
416 |
if$ |
417 |
} |
418 |
if$ |
419 |
} |
420 |
{ "" } |
421 |
if$ |
422 |
} |
423 |
|
424 |
FUNCTION {format.edition} |
425 |
{ edition empty$ |
426 |
{ "" } |
427 |
{ output.state mid.sentence = |
428 |
{ edition "l" change.case$ " edition" * } |
429 |
{ edition "t" change.case$ " edition" * } |
430 |
if$ |
431 |
} |
432 |
if$ |
433 |
} |
434 |
|
435 |
INTEGERS { multiresult } |
436 |
|
437 |
FUNCTION {multi.page.check} |
438 |
{ 't := |
439 |
#0 'multiresult := |
440 |
{ multiresult not |
441 |
t empty$ not |
442 |
and |
443 |
} |
444 |
{ t #1 #1 substring$ |
445 |
duplicate$ "-" = |
446 |
swap$ duplicate$ "," = |
447 |
swap$ "+" = |
448 |
or or |
449 |
{ #1 'multiresult := } |
450 |
{ t #2 global.max$ substring$ 't := } |
451 |
if$ |
452 |
} |
453 |
while$ |
454 |
multiresult |
455 |
} |
456 |
|
457 |
FUNCTION {format.pages} |
458 |
{ pages empty$ |
459 |
{ "" } |
460 |
{ pages multi.page.check |
461 |
{ "pages" pages n.dashify tie.or.space.connect } |
462 |
{ "page" pages tie.or.space.connect } |
463 |
if$ |
464 |
} |
465 |
if$ |
466 |
} |
467 |
|
468 |
FUNCTION {format.vol.num.pages} |
469 |
%{ volume field.or.null |
470 |
{ volume empty$ % allow this... |
471 |
{ "" } |
472 |
{ "<b>" volume * "</b>" * } |
473 |
if$ |
474 |
number empty$ |
475 |
'skip$ |
476 |
{ " no. " number * * |
477 |
volume empty$ |
478 |
{ "there's a number but no volume in " cite$ * warning$ } |
479 |
'skip$ |
480 |
if$ |
481 |
} |
482 |
if$ |
483 |
pages empty$ |
484 |
'skip$ |
485 |
{ duplicate$ empty$ |
486 |
{ pop$ format.pages } |
487 |
{ " pp. " * pages n.dashify * } |
488 |
if$ |
489 |
} |
490 |
if$ |
491 |
} |
492 |
|
493 |
FUNCTION {format.chapter.pages} |
494 |
{ chapter empty$ |
495 |
'format.pages |
496 |
{ type empty$ |
497 |
{ "chapter" } |
498 |
{ type "l" change.case$ } |
499 |
if$ |
500 |
chapter tie.or.space.connect |
501 |
pages empty$ |
502 |
'skip$ |
503 |
{ ", " * format.pages * } |
504 |
if$ |
505 |
} |
506 |
if$ |
507 |
} |
508 |
|
509 |
FUNCTION {format.in.ed.booktitle} |
510 |
{ booktitle empty$ |
511 |
{ "" } |
512 |
{ editor empty$ |
513 |
{ "In " booktitle emphasize * } |
514 |
{ "In " format.editors * ", " * booktitle emphasize * } |
515 |
if$ |
516 |
} |
517 |
if$ |
518 |
} |
519 |
|
520 |
FUNCTION {empty.misc.check} |
521 |
{ author empty$ title empty$ howpublished empty$ |
522 |
month empty$ year empty$ note empty$ |
523 |
and and and and and |
524 |
key empty$ not and |
525 |
{ "all relevant fields are empty in " cite$ * warning$ } |
526 |
'skip$ |
527 |
if$ |
528 |
} |
529 |
|
530 |
FUNCTION {format.thesis.type} |
531 |
{ type empty$ |
532 |
'skip$ |
533 |
{ pop$ |
534 |
type "t" change.case$ |
535 |
} |
536 |
if$ |
537 |
} |
538 |
|
539 |
FUNCTION {format.tr.number} |
540 |
{ type empty$ |
541 |
{ "Technical Report" } |
542 |
'type |
543 |
if$ |
544 |
number empty$ |
545 |
{ "t" change.case$ } |
546 |
{ number tie.or.space.connect } |
547 |
if$ |
548 |
} |
549 |
|
550 |
% surround the journal name with a link pointing to the crossref |
551 |
FUNCTION {format.article.crossref} |
552 |
{ key empty$ |
553 |
{ journal empty$ |
554 |
{ "need key or journal for " cite$ * " to crossref " * crossref * |
555 |
warning$ |
556 |
"" |
557 |
} |
558 |
{ "In <em><a href=" quote$ * "#" * hrefprefix * crossref * quote$ * ">" * |
559 |
journal * "</a></em>" * } |
560 |
% { "In <em>" journal * "</em>" * } |
561 |
if$ |
562 |
} |
563 |
{ "In " key * } |
564 |
if$ |
565 |
} |
566 |
|
567 |
% if there is indeed a crossref, make the reference a link |
568 |
FUNCTION {format.crossref.editor} |
569 |
{ crossref empty$ |
570 |
{ editor #1 "{vv~}{ll}" format.name$ |
571 |
editor num.names$ duplicate$ |
572 |
#2 > |
573 |
{ pop$ " et~al." * } |
574 |
{ #2 < |
575 |
'skip$ |
576 |
{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
577 |
{ " et~al." * } |
578 |
{ " and " * editor #2 "{vv~}{ll}" format.name$ * } |
579 |
if$ |
580 |
} |
581 |
if$ |
582 |
} |
583 |
if$ |
584 |
} |
585 |
{ "<a href=" quote$ * "#" * hrefprefix * crossref * quote$ * " >[" * |
586 |
crossref * "]</a>" * |
587 |
} |
588 |
if$ |
589 |
} |
590 |
|
591 |
FUNCTION {format.book.crossref} |
592 |
{ volume empty$ |
593 |
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$ |
594 |
"In " |
595 |
} |
596 |
{ "Volume" volume tie.or.space.connect |
597 |
" of " * |
598 |
} |
599 |
if$ |
600 |
editor empty$ |
601 |
editor field.or.null author field.or.null = |
602 |
or |
603 |
{ key empty$ |
604 |
{ series empty$ |
605 |
{ "need editor, key, or series for " cite$ * " to crossref " * |
606 |
crossref * warning$ |
607 |
"" * |
608 |
} |
609 |
{ "<em>" * series * "</em>" * } |
610 |
if$ |
611 |
} |
612 |
{ key * } |
613 |
if$ |
614 |
} |
615 |
{ format.crossref.editor * } |
616 |
if$ |
617 |
% "<a href=#" * crossref * ">" * crossref * "</a>" * |
618 |
} |
619 |
|
620 |
FUNCTION {format.incoll.inproc.crossref} |
621 |
{ editor empty$ |
622 |
editor field.or.null author field.or.null = |
623 |
or |
624 |
{ key empty$ |
625 |
{ booktitle empty$ |
626 |
{ "need editor, key, or booktitle for " cite$ * " to crossref " * |
627 |
crossref * warning$ |
628 |
"" |
629 |
} |
630 |
{ "In <em>" booktitle * "</em>" * } |
631 |
if$ |
632 |
} |
633 |
{ "In " key * } |
634 |
if$ |
635 |
} |
636 |
{ "In " format.crossref.editor * } |
637 |
if$ |
638 |
% "<a href=#" * crossref * ">" * crossref * "</a>" * |
639 |
% " \cite{" * crossref * "}" * |
640 |
} |
641 |
|
642 |
FUNCTION {format.online} |
643 |
{ url empty$ |
644 |
{ "" } |
645 |
{ lastchecked empty$ |
646 |
{ "[Online]" } |
647 |
{ "[Online, cited " lastchecked * "]" * } |
648 |
if$ |
649 |
} |
650 |
if$ |
651 |
} |
652 |
|
653 |
FUNCTION {article} |
654 |
{ output.bibitem |
655 |
format.authors "author" output.check |
656 |
new.block |
657 |
format.title "title" output.check |
658 |
new.block |
659 |
crossref missing$ |
660 |
{ journal emphasize "journal" output.check |
661 |
format.vol.num.pages output |
662 |
format.date "year" output.check |
663 |
} |
664 |
{ format.article.crossref output.nonnull |
665 |
format.pages output |
666 |
} |
667 |
if$ |
668 |
format.eprint output |
669 |
new.block |
670 |
note output |
671 |
new.block format.online output |
672 |
fin.entry |
673 |
} |
674 |
|
675 |
FUNCTION {book} |
676 |
{ output.bibitem |
677 |
author empty$ |
678 |
{ format.editors "author and editor" output.check } |
679 |
{ format.authors output.nonnull |
680 |
crossref missing$ |
681 |
{ "author and editor" editor either.or.check } |
682 |
'skip$ |
683 |
if$ |
684 |
} |
685 |
if$ |
686 |
new.block |
687 |
format.btitle "title" output.check |
688 |
crossref missing$ |
689 |
{ format.bvolume output |
690 |
new.block |
691 |
format.number.series output |
692 |
new.sentence |
693 |
publisher "publisher" output.check |
694 |
address output |
695 |
} |
696 |
{ new.block |
697 |
format.book.crossref output.nonnull |
698 |
} |
699 |
if$ |
700 |
format.edition output |
701 |
format.date "year" output.check |
702 |
new.block |
703 |
note output |
704 |
new.block format.online output |
705 |
fin.entry |
706 |
} |
707 |
|
708 |
FUNCTION {booklet} |
709 |
{ output.bibitem |
710 |
format.authors output |
711 |
new.block |
712 |
format.title "title" output.check |
713 |
howpublished address new.block.checkb |
714 |
howpublished output |
715 |
address output |
716 |
format.date output |
717 |
new.block |
718 |
note output |
719 |
new.block format.online output |
720 |
fin.entry |
721 |
} |
722 |
|
723 |
FUNCTION {inbook} |
724 |
{ output.bibitem |
725 |
author empty$ |
726 |
{ format.editors "author and editor" output.check } |
727 |
{ format.authors output.nonnull |
728 |
crossref missing$ |
729 |
{ "author and editor" editor either.or.check } |
730 |
'skip$ |
731 |
if$ |
732 |
} |
733 |
if$ |
734 |
new.block |
735 |
format.btitle "title" output.check |
736 |
crossref missing$ |
737 |
{ format.bvolume output |
738 |
format.chapter.pages "chapter and pages" output.check |
739 |
new.block |
740 |
format.number.series output |
741 |
new.sentence |
742 |
publisher "publisher" output.check |
743 |
address output |
744 |
} |
745 |
{ format.chapter.pages "chapter and pages" output.check |
746 |
new.block |
747 |
format.book.crossref output.nonnull |
748 |
} |
749 |
if$ |
750 |
format.edition output |
751 |
format.date "year" output.check |
752 |
new.block |
753 |
note output |
754 |
new.block format.online output |
755 |
fin.entry |
756 |
} |
757 |
|
758 |
FUNCTION {incollection} |
759 |
{ output.bibitem |
760 |
format.authors "author" output.check |
761 |
new.block |
762 |
format.title "title" output.check |
763 |
new.block |
764 |
crossref missing$ |
765 |
{ format.in.ed.booktitle "booktitle" output.check |
766 |
format.bvolume output |
767 |
format.number.series output |
768 |
format.chapter.pages output |
769 |
new.sentence |
770 |
publisher "publisher" output.check |
771 |
address output |
772 |
format.edition output |
773 |
format.date "year" output.check |
774 |
} |
775 |
{ format.incoll.inproc.crossref output.nonnull |
776 |
format.chapter.pages output |
777 |
} |
778 |
if$ |
779 |
new.block |
780 |
note output |
781 |
new.block format.online output |
782 |
fin.entry |
783 |
} |
784 |
|
785 |
FUNCTION {inproceedings} |
786 |
{ output.bibitem |
787 |
format.authors "author" output.check |
788 |
new.block |
789 |
format.title "title" output.check |
790 |
new.block |
791 |
crossref missing$ |
792 |
{ format.in.ed.booktitle "booktitle" output.check |
793 |
format.bvolume output |
794 |
format.number.series output |
795 |
format.pages output |
796 |
address empty$ |
797 |
{ organization publisher new.sentence.checkb |
798 |
organization output |
799 |
publisher output |
800 |
format.date "year" output.check |
801 |
format.eprint output |
802 |
} |
803 |
{ address output.nonnull |
804 |
format.date "year" output.check |
805 |
format.eprint output |
806 |
new.sentence |
807 |
organization output |
808 |
publisher output |
809 |
} |
810 |
if$ |
811 |
} |
812 |
{ format.incoll.inproc.crossref output.nonnull |
813 |
format.pages output |
814 |
} |
815 |
if$ |
816 |
new.block |
817 |
note output |
818 |
new.block format.online output |
819 |
fin.entry |
820 |
} |
821 |
|
822 |
FUNCTION {conference} { inproceedings } |
823 |
|
824 |
FUNCTION {manual} |
825 |
{ output.bibitem |
826 |
author empty$ |
827 |
{ organization empty$ |
828 |
'skip$ |
829 |
{ organization output.nonnull |
830 |
address output |
831 |
} |
832 |
if$ |
833 |
} |
834 |
{ format.authors output.nonnull } |
835 |
if$ |
836 |
new.block |
837 |
format.btitle "title" output.check |
838 |
author empty$ |
839 |
{ organization empty$ |
840 |
{ address new.block.checka |
841 |
address output |
842 |
} |
843 |
'skip$ |
844 |
if$ |
845 |
} |
846 |
{ organization address new.block.checkb |
847 |
organization output |
848 |
address output |
849 |
} |
850 |
if$ |
851 |
format.edition output |
852 |
format.date output |
853 |
new.block |
854 |
note output |
855 |
new.block format.online output |
856 |
fin.entry |
857 |
} |
858 |
|
859 |
FUNCTION {mastersthesis} |
860 |
{ output.bibitem |
861 |
format.authors "author" output.check |
862 |
new.block |
863 |
format.title "title" output.check |
864 |
new.block |
865 |
"Master's thesis" format.thesis.type output.nonnull |
866 |
school "school" output.check |
867 |
address output |
868 |
format.date "year" output.check |
869 |
new.block |
870 |
note output |
871 |
new.block format.online output |
872 |
fin.entry |
873 |
} |
874 |
|
875 |
FUNCTION {misc} |
876 |
{ output.bibitem |
877 |
format.authors output |
878 |
title howpublished new.block.checkb |
879 |
format.title output |
880 |
howpublished new.block.checka |
881 |
howpublished output |
882 |
format.date output |
883 |
format.eprint output |
884 |
new.block |
885 |
note output |
886 |
new.block format.online output |
887 |
fin.entry |
888 |
empty.misc.check |
889 |
} |
890 |
|
891 |
FUNCTION {phdthesis} |
892 |
{ output.bibitem |
893 |
format.authors "author" output.check |
894 |
new.block |
895 |
format.btitle "title" output.check |
896 |
new.block |
897 |
"PhD thesis" format.thesis.type output.nonnull |
898 |
school "school" output.check |
899 |
address output |
900 |
format.date "year" output.check |
901 |
new.block |
902 |
note output |
903 |
new.block format.online output |
904 |
fin.entry |
905 |
} |
906 |
|
907 |
FUNCTION {proceedings} |
908 |
{ output.bibitem |
909 |
editor empty$ |
910 |
{ organization output } |
911 |
{ format.editors output.nonnull } |
912 |
if$ |
913 |
new.block |
914 |
format.btitle "title" output.check |
915 |
format.bvolume output |
916 |
format.number.series output |
917 |
address empty$ |
918 |
{ editor empty$ |
919 |
{ publisher new.sentence.checka } |
920 |
{ organization publisher new.sentence.checkb |
921 |
organization output |
922 |
} |
923 |
if$ |
924 |
publisher output |
925 |
format.date "year" output.check |
926 |
} |
927 |
{ address output.nonnull |
928 |
format.date "year" output.check |
929 |
new.sentence |
930 |
editor empty$ |
931 |
'skip$ |
932 |
{ organization output } |
933 |
if$ |
934 |
publisher output |
935 |
} |
936 |
if$ |
937 |
new.block |
938 |
note output |
939 |
new.block format.online output |
940 |
fin.entry |
941 |
} |
942 |
|
943 |
FUNCTION {techreport} |
944 |
{ output.bibitem |
945 |
format.authors "author" output.check |
946 |
new.block |
947 |
format.title "title" output.check |
948 |
new.block |
949 |
format.tr.number output.nonnull |
950 |
institution "institution" output.check |
951 |
address output |
952 |
format.date "year" output.check |
953 |
format.eprint output |
954 |
new.block |
955 |
note output |
956 |
new.block format.online output |
957 |
fin.entry |
958 |
} |
959 |
|
960 |
FUNCTION {unpublished} |
961 |
{ output.bibitem |
962 |
format.authors "author" output.check |
963 |
new.block |
964 |
format.title "title" output.check |
965 |
new.block |
966 |
note "note" output.check |
967 |
format.date output |
968 |
format.eprint output |
969 |
new.block format.online output |
970 |
fin.entry |
971 |
} |
972 |
|
973 |
FUNCTION {webpage} |
974 |
{ output.bibitem |
975 |
author empty$ |
976 |
{ % Need to put something here -- if the title were put here, |
977 |
% we'd have a <a> inside a <a> |
978 |
key empty$ |
979 |
{ "" } |
980 |
{ key } |
981 |
if$ |
982 |
"author and key" output.check |
983 |
} |
984 |
{ format.authors "author" output.check } |
985 |
if$ |
986 |
new.block |
987 |
format.title "title" output.check |
988 |
new.block |
989 |
new.block format.online output |
990 |
fin.entry |
991 |
} |
992 |
|
993 |
FUNCTION {default.type} { misc } |
994 |
|
995 |
MACRO {jan} {"January"} |
996 |
|
997 |
MACRO {feb} {"February"} |
998 |
|
999 |
MACRO {mar} {"March"} |
1000 |
|
1001 |
MACRO {apr} {"April"} |
1002 |
|
1003 |
MACRO {may} {"May"} |
1004 |
|
1005 |
MACRO {jun} {"June"} |
1006 |
|
1007 |
MACRO {jul} {"July"} |
1008 |
|
1009 |
MACRO {aug} {"August"} |
1010 |
|
1011 |
MACRO {sep} {"September"} |
1012 |
|
1013 |
MACRO {oct} {"October"} |
1014 |
|
1015 |
MACRO {nov} {"November"} |
1016 |
|
1017 |
MACRO {dec} {"December"} |
1018 |
|
1019 |
MACRO {acmcs} {"ACM Computing Surveys"} |
1020 |
|
1021 |
MACRO {acta} {"Acta Informatica"} |
1022 |
|
1023 |
MACRO {cacm} {"Communications of the ACM"} |
1024 |
|
1025 |
MACRO {ibmjrd} {"IBM Journal of Research and Development"} |
1026 |
|
1027 |
MACRO {ibmsj} {"IBM Systems Journal"} |
1028 |
|
1029 |
MACRO {ieeese} {"IEEE Transactions on Software Engineering"} |
1030 |
|
1031 |
MACRO {ieeetc} {"IEEE Transactions on Computers"} |
1032 |
|
1033 |
MACRO {ieeetcad} |
1034 |
{"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} |
1035 |
|
1036 |
MACRO {ipl} {"Information Processing Letters"} |
1037 |
|
1038 |
MACRO {jacm} {"Journal of the ACM"} |
1039 |
|
1040 |
MACRO {jcss} {"Journal of Computer and System Sciences"} |
1041 |
|
1042 |
MACRO {scp} {"Science of Computer Programming"} |
1043 |
|
1044 |
MACRO {sicomp} {"SIAM Journal on Computing"} |
1045 |
|
1046 |
MACRO {tocs} {"ACM Transactions on Computer Systems"} |
1047 |
|
1048 |
MACRO {tods} {"ACM Transactions on Database Systems"} |
1049 |
|
1050 |
MACRO {tog} {"ACM Transactions on Graphics"} |
1051 |
|
1052 |
MACRO {toms} {"ACM Transactions on Mathematical Software"} |
1053 |
|
1054 |
MACRO {toois} {"ACM Transactions on Office Information Systems"} |
1055 |
|
1056 |
MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} |
1057 |
|
1058 |
MACRO {tcs} {"Theoretical Computer Science"} |
1059 |
|
1060 |
READ |
1061 |
|
1062 |
FUNCTION {sortify} |
1063 |
{ purify$ |
1064 |
"l" change.case$ |
1065 |
} |
1066 |
|
1067 |
INTEGERS { len } |
1068 |
|
1069 |
FUNCTION {chop.word} |
1070 |
{ 's := |
1071 |
'len := |
1072 |
s #1 len substring$ = |
1073 |
{ s len #1 + global.max$ substring$ } |
1074 |
's |
1075 |
if$ |
1076 |
} |
1077 |
|
1078 |
FUNCTION {sort.format.names} |
1079 |
{ 's := |
1080 |
#1 'nameptr := |
1081 |
"" |
1082 |
s num.names$ 'numnames := |
1083 |
numnames 'namesleft := |
1084 |
{ namesleft #0 > } |
1085 |
{ nameptr #1 > |
1086 |
{ " " * } |
1087 |
'skip$ |
1088 |
if$ |
1089 |
s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := |
1090 |
nameptr numnames = t "others" = and |
1091 |
{ "et al" * } |
1092 |
{ t sortify * } |
1093 |
if$ |
1094 |
nameptr #1 + 'nameptr := |
1095 |
namesleft #1 - 'namesleft := |
1096 |
} |
1097 |
while$ |
1098 |
} |
1099 |
|
1100 |
FUNCTION {sort.format.title} |
1101 |
{ 't := |
1102 |
"A " #2 |
1103 |
"An " #3 |
1104 |
"The " #4 t chop.word |
1105 |
chop.word |
1106 |
chop.word |
1107 |
sortify |
1108 |
#1 global.max$ substring$ |
1109 |
} |
1110 |
|
1111 |
FUNCTION {author.sort} |
1112 |
{ author empty$ |
1113 |
{ key empty$ |
1114 |
{ "to sort, need author or key in " cite$ * warning$ |
1115 |
"" |
1116 |
} |
1117 |
{ key sortify } |
1118 |
if$ |
1119 |
} |
1120 |
{ author sort.format.names } |
1121 |
if$ |
1122 |
} |
1123 |
|
1124 |
FUNCTION {author.editor.sort} |
1125 |
{ author empty$ |
1126 |
{ editor empty$ |
1127 |
{ key empty$ |
1128 |
{ "to sort, need author, editor, or key in " cite$ * warning$ |
1129 |
"" |
1130 |
} |
1131 |
{ key sortify } |
1132 |
if$ |
1133 |
} |
1134 |
{ editor sort.format.names } |
1135 |
if$ |
1136 |
} |
1137 |
{ author sort.format.names } |
1138 |
if$ |
1139 |
} |
1140 |
|
1141 |
FUNCTION {author.organization.sort} |
1142 |
{ author empty$ |
1143 |
{ organization empty$ |
1144 |
{ key empty$ |
1145 |
{ "to sort, need author, organization, or key in " cite$ * warning$ |
1146 |
"" |
1147 |
} |
1148 |
{ key sortify } |
1149 |
if$ |
1150 |
} |
1151 |
{ "The " #4 organization chop.word sortify } |
1152 |
if$ |
1153 |
} |
1154 |
{ author sort.format.names } |
1155 |
if$ |
1156 |
} |
1157 |
|
1158 |
FUNCTION {editor.organization.sort} |
1159 |
{ editor empty$ |
1160 |
{ organization empty$ |
1161 |
{ key empty$ |
1162 |
{ "to sort, need editor, organization, or key in " cite$ * warning$ |
1163 |
"" |
1164 |
} |
1165 |
{ key sortify } |
1166 |
if$ |
1167 |
} |
1168 |
{ "The " #4 organization chop.word sortify } |
1169 |
if$ |
1170 |
} |
1171 |
{ editor sort.format.names } |
1172 |
if$ |
1173 |
} |
1174 |
|
1175 |
FUNCTION {presort.by.author} |
1176 |
{ type$ "book" = |
1177 |
type$ "inbook" = |
1178 |
or |
1179 |
'author.editor.sort |
1180 |
{ type$ "proceedings" = |
1181 |
'editor.organization.sort |
1182 |
{ type$ "manual" = |
1183 |
'author.organization.sort |
1184 |
'author.sort |
1185 |
if$ |
1186 |
} |
1187 |
if$ |
1188 |
} |
1189 |
if$ |
1190 |
" " |
1191 |
* |
1192 |
year field.or.null sortify |
1193 |
* |
1194 |
" " |
1195 |
* |
1196 |
title field.or.null |
1197 |
sort.format.title |
1198 |
* |
1199 |
#1 entry.max$ substring$ |
1200 |
'sort.key$ := |
1201 |
} |
1202 |
|
1203 |
FUNCTION {presort.by.year} |
1204 |
{ year field.or.null sortify |
1205 |
%EDIT2 |
1206 |
" " |
1207 |
* |
1208 |
type$ "book" = |
1209 |
type$ "inbook" = |
1210 |
or |
1211 |
'author.editor.sort |
1212 |
{ type$ "proceedings" = |
1213 |
'editor.organization.sort |
1214 |
{ type$ "manual" = |
1215 |
'author.organization.sort |
1216 |
'author.sort |
1217 |
if$ |
1218 |
} |
1219 |
if$ |
1220 |
} |
1221 |
if$ |
1222 |
* |
1223 |
" " |
1224 |
* |
1225 |
title field.or.null |
1226 |
sort.format.title |
1227 |
* |
1228 |
#1 entry.max$ substring$ |
1229 |
'sort.key$ := |
1230 |
} |
1231 |
|
1232 |
FUNCTION {presort.by.cite} |
1233 |
{ |
1234 |
cite$ 'sort.key$ := |
1235 |
} |
1236 |
|
1237 |
%ITERATE {presort.by.author} |
1238 |
ITERATE {presort.by.cite} |
1239 |
|
1240 |
SORT |
1241 |
|
1242 |
STRINGS { longest.label } |
1243 |
|
1244 |
INTEGERS { number.label longest.label.width } |
1245 |
|
1246 |
FUNCTION {initialize.longest.label} |
1247 |
{ "" 'longest.label := |
1248 |
#1 'number.label := |
1249 |
#0 'longest.label.width := |
1250 |
} |
1251 |
|
1252 |
FUNCTION {longest.label.pass} |
1253 |
{ number.label int.to.str$ 'label := |
1254 |
number.label #1 + 'number.label := |
1255 |
label width$ longest.label.width > |
1256 |
{ label 'longest.label := |
1257 |
label width$ 'longest.label.width := |
1258 |
} |
1259 |
'skip$ |
1260 |
if$ |
1261 |
} |
1262 |
|
1263 |
EXECUTE {initialize.longest.label} |
1264 |
|
1265 |
ITERATE {longest.label.pass} |
1266 |
|
1267 |
FUNCTION {begin.bib} |
1268 |
{ preamble$ empty$ |
1269 |
'skip$ |
1270 |
{ preamble$ write$ newline$ } |
1271 |
if$ |
1272 |
"<dl>" write$ newline$ |
1273 |
} |
1274 |
|
1275 |
EXECUTE {begin.bib} |
1276 |
|
1277 |
EXECUTE {init.state.consts} |
1278 |
|
1279 |
ITERATE {call.type$} |
1280 |
|
1281 |
FUNCTION {end.bib} |
1282 |
{ newline$ |
1283 |
"</dl>" write$ newline$ |
1284 |
} |
1285 |
|
1286 |
EXECUTE {end.bib} |
1287 |
|