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