1 | % |
---|
2 | % THIS IS AN ALPHA VERSION!!! |
---|
3 | % |
---|
4 | % USE AT YOUR OWN RISK |
---|
5 | % |
---|
6 | % This should work for articles...I don't know if it works well for |
---|
7 | % books, etc (give it a try and see!). |
---|
8 | % |
---|
9 | % PLEASE COMPARE RESULTS WITH THE INSTRUCTIONS FOR AUTHORS FOR THE |
---|
10 | % JOURNAL YOU ARE SUBMITTING FOR...I CANNOT ACCEPT RESPONSIBILITY |
---|
11 | % FOR REJECTED MANUSCRIPTS (but I will try to fix it if you point out |
---|
12 | % a bug) |
---|
13 | % |
---|
14 | % AMA Manual of Style (JAMA, Cancer, many others..) |
---|
15 | % -Up to 6 authors, otherwise 3 authors et al. |
---|
16 | % -Title in italics |
---|
17 | % -numeric labels |
---|
18 | % -order-of-reference. |
---|
19 | % |
---|
20 | % Author L, Author S, Author D, et al. Title. Journal. |
---|
21 | % YYYY;VOL(NUM):PPP-PPP. |
---|
22 | % |
---|
23 | % |
---|
24 | % History |
---|
25 | % 9/30/85 (HWT) IEETR Original version, by Howard Trickey. |
---|
26 | % 1/29/88 (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik; |
---|
27 | % 3/27/02 IEETR style used as framework. Formats heavily changed by |
---|
28 | % Eric Kort (eric.kort@vai.org) |
---|
29 | % |
---|
30 | % THIS VERSION DOES NOT WORK WITH BIBTEX 0.98i. |
---|
31 | % |
---|
32 | |
---|
33 | ENTRY |
---|
34 | { address |
---|
35 | author |
---|
36 | booktitle |
---|
37 | chapter |
---|
38 | edition |
---|
39 | editor |
---|
40 | howpublished |
---|
41 | institution |
---|
42 | journal |
---|
43 | key |
---|
44 | month |
---|
45 | note |
---|
46 | number |
---|
47 | organization |
---|
48 | pages |
---|
49 | publisher |
---|
50 | school |
---|
51 | series |
---|
52 | title |
---|
53 | type |
---|
54 | volume |
---|
55 | year |
---|
56 | } |
---|
57 | {} |
---|
58 | { label } |
---|
59 | |
---|
60 | INTEGERS { output.state before.all mid.sentence after.quote after.sentence |
---|
61 | after.quoted.block after.block } |
---|
62 | |
---|
63 | FUNCTION {init.state.consts} |
---|
64 | { #0 'before.all := |
---|
65 | #1 'mid.sentence := |
---|
66 | #2 'after.quote := |
---|
67 | #3 'after.sentence := |
---|
68 | #4 'after.quoted.block := |
---|
69 | #5 'after.block := |
---|
70 | } |
---|
71 | |
---|
72 | STRINGS { s t } |
---|
73 | |
---|
74 | FUNCTION {output.nonnull} |
---|
75 | { 's := |
---|
76 | output.state mid.sentence = |
---|
77 | { "" * write$ } |
---|
78 | { output.state after.quote = |
---|
79 | { " " * write$ } |
---|
80 | { output.state after.block = |
---|
81 | { add.period$ write$ |
---|
82 | newline$ |
---|
83 | "\newblock " write$ |
---|
84 | } |
---|
85 | { output.state before.all = |
---|
86 | 'write$ |
---|
87 | { output.state after.quoted.block = |
---|
88 | { write$ |
---|
89 | newline$ |
---|
90 | "\newblock " write$ |
---|
91 | } |
---|
92 | { add.period$ " " * write$ } |
---|
93 | if$ |
---|
94 | } |
---|
95 | if$ |
---|
96 | } |
---|
97 | if$ |
---|
98 | } |
---|
99 | if$ |
---|
100 | mid.sentence 'output.state := |
---|
101 | } |
---|
102 | if$ |
---|
103 | s |
---|
104 | } |
---|
105 | |
---|
106 | FUNCTION {output} |
---|
107 | { duplicate$ empty$ |
---|
108 | 'pop$ |
---|
109 | 'output.nonnull |
---|
110 | if$ |
---|
111 | } |
---|
112 | |
---|
113 | FUNCTION {output.check} |
---|
114 | { 't := |
---|
115 | duplicate$ empty$ |
---|
116 | { pop$ "empty " t * " in " * cite$ * warning$ } |
---|
117 | 'output.nonnull |
---|
118 | if$ |
---|
119 | } |
---|
120 | |
---|
121 | FUNCTION {output.bibitem} |
---|
122 | { newline$ |
---|
123 | "\bibitem{" write$ |
---|
124 | cite$ write$ |
---|
125 | "}" write$ |
---|
126 | newline$ |
---|
127 | "" |
---|
128 | before.all 'output.state := |
---|
129 | } |
---|
130 | |
---|
131 | FUNCTION {blank.sep} |
---|
132 | { after.quote 'output.state := |
---|
133 | } |
---|
134 | |
---|
135 | FUNCTION {fin.entry} |
---|
136 | { output.state after.quoted.block = |
---|
137 | 'skip$ |
---|
138 | 'add.period$ |
---|
139 | if$ |
---|
140 | write$ |
---|
141 | newline$ |
---|
142 | } |
---|
143 | |
---|
144 | FUNCTION {new.block} |
---|
145 | { output.state before.all = |
---|
146 | 'skip$ |
---|
147 | { output.state after.quote = |
---|
148 | { after.quoted.block 'output.state := } |
---|
149 | { after.block 'output.state := } |
---|
150 | if$ |
---|
151 | } |
---|
152 | if$ |
---|
153 | } |
---|
154 | |
---|
155 | FUNCTION {new.sentence} |
---|
156 | { output.state after.block = |
---|
157 | 'skip$ |
---|
158 | { output.state before.all = |
---|
159 | 'skip$ |
---|
160 | { after.sentence 'output.state := } |
---|
161 | if$ |
---|
162 | } |
---|
163 | if$ |
---|
164 | } |
---|
165 | |
---|
166 | FUNCTION {not} |
---|
167 | { { #0 } |
---|
168 | { #1 } |
---|
169 | if$ |
---|
170 | } |
---|
171 | |
---|
172 | FUNCTION {and} |
---|
173 | { 'skip$ |
---|
174 | { pop$ #0 } |
---|
175 | if$ |
---|
176 | } |
---|
177 | |
---|
178 | FUNCTION {or} |
---|
179 | { { pop$ #1 } |
---|
180 | 'skip$ |
---|
181 | if$ |
---|
182 | } |
---|
183 | |
---|
184 | FUNCTION {new.block.checka} |
---|
185 | { empty$ |
---|
186 | 'skip$ |
---|
187 | 'new.block |
---|
188 | if$ |
---|
189 | } |
---|
190 | |
---|
191 | FUNCTION {new.block.checkb} |
---|
192 | { empty$ |
---|
193 | swap$ empty$ |
---|
194 | and |
---|
195 | 'skip$ |
---|
196 | 'new.block |
---|
197 | if$ |
---|
198 | } |
---|
199 | |
---|
200 | FUNCTION {new.sentence.checka} |
---|
201 | { empty$ |
---|
202 | 'skip$ |
---|
203 | 'new.sentence |
---|
204 | if$ |
---|
205 | } |
---|
206 | |
---|
207 | FUNCTION {field.or.null} |
---|
208 | { duplicate$ empty$ |
---|
209 | { pop$ "" } |
---|
210 | 'skip$ |
---|
211 | if$ |
---|
212 | } |
---|
213 | |
---|
214 | FUNCTION {emphasize} |
---|
215 | { duplicate$ empty$ |
---|
216 | { pop$ "" } |
---|
217 | { "{\it " swap$ * "}" * } |
---|
218 | if$ |
---|
219 | } |
---|
220 | |
---|
221 | INTEGERS { nameptr namesleft numnames etal} |
---|
222 | |
---|
223 | FUNCTION {format.names} |
---|
224 | { 's := % push the name s, pop s and author (already on stack), assign author to s |
---|
225 | #1 'nameptr := |
---|
226 | #0 'etal := |
---|
227 | |
---|
228 | s num.names$ 'numnames := |
---|
229 | |
---|
230 | numnames #6 > |
---|
231 | {#3 'numnames := |
---|
232 | #1 'etal := |
---|
233 | } |
---|
234 | {} |
---|
235 | %end if |
---|
236 | if$ |
---|
237 | |
---|
238 | numnames 'namesleft := |
---|
239 | { namesleft #0 > } |
---|
240 | |
---|
241 | {s nameptr "{ll~}{ff}" format.name$ 't := |
---|
242 | namesleft #1 > |
---|
243 | {t * ", " * } |
---|
244 | {t} |
---|
245 | %end if |
---|
246 | if$ |
---|
247 | nameptr #1 + 'nameptr := |
---|
248 | namesleft #1 - 'namesleft := |
---|
249 | } |
---|
250 | while$ |
---|
251 | |
---|
252 | etal |
---|
253 | {", et al. "} |
---|
254 | {". "} |
---|
255 | if$ |
---|
256 | * |
---|
257 | } |
---|
258 | |
---|
259 | FUNCTION {format.editors.names} |
---|
260 | { 's := % push the name s, pop s and author (already on stack), assign author to s |
---|
261 | #1 'nameptr := |
---|
262 | #0 'etal := |
---|
263 | |
---|
264 | s num.names$ 'numnames := |
---|
265 | |
---|
266 | numnames #6 > |
---|
267 | {#3 'numnames := |
---|
268 | #1 'etal := |
---|
269 | } |
---|
270 | {} |
---|
271 | %end if |
---|
272 | if$ |
---|
273 | |
---|
274 | numnames 'namesleft := |
---|
275 | { namesleft #0 > } |
---|
276 | |
---|
277 | {s nameptr "{ll~}{ff}" format.name$ 't := |
---|
278 | namesleft #1 > |
---|
279 | {t * ", " * } |
---|
280 | {t} |
---|
281 | %end if |
---|
282 | if$ |
---|
283 | nameptr #1 + 'nameptr := |
---|
284 | namesleft #1 - 'namesleft := |
---|
285 | } |
---|
286 | while$ |
---|
287 | |
---|
288 | etal |
---|
289 | {", et al. "} |
---|
290 | {""} |
---|
291 | if$ |
---|
292 | * |
---|
293 | } |
---|
294 | |
---|
295 | FUNCTION {format.authors} |
---|
296 | { author empty$ |
---|
297 | { "" } |
---|
298 | { author format.names } |
---|
299 | if$ |
---|
300 | } |
---|
301 | |
---|
302 | FUNCTION {format.editors} |
---|
303 | { editor empty$ |
---|
304 | { "" } |
---|
305 | { editor format.editors.names |
---|
306 | editor num.names$ #1 > |
---|
307 | { ", eds." * } |
---|
308 | { ", ed." * } |
---|
309 | if$ |
---|
310 | } |
---|
311 | if$ |
---|
312 | } |
---|
313 | |
---|
314 | FUNCTION {format.title} |
---|
315 | { title empty$ |
---|
316 | { "" } |
---|
317 | { title ". " *}% modified by SPi-Global on 12Jun2017 |
---|
318 | if$ |
---|
319 | } |
---|
320 | |
---|
321 | FUNCTION {format.journal} |
---|
322 | { journal empty$ |
---|
323 | { "" } |
---|
324 | { journal ". " *} |
---|
325 | if$ |
---|
326 | } |
---|
327 | |
---|
328 | FUNCTION {format.title.p} |
---|
329 | { title empty$ |
---|
330 | { "" } |
---|
331 | { title " " *} |
---|
332 | if$ |
---|
333 | } |
---|
334 | |
---|
335 | FUNCTION {n.dashify} |
---|
336 | { 't := |
---|
337 | "" |
---|
338 | { t empty$ not } |
---|
339 | { t #1 #1 substring$ "-" = |
---|
340 | { t #1 #2 substring$ "--" = not |
---|
341 | { "--" * |
---|
342 | t #2 global.max$ substring$ 't := |
---|
343 | } |
---|
344 | { { t #1 #1 substring$ "-" = } |
---|
345 | { "-" * |
---|
346 | t #2 global.max$ substring$ 't := |
---|
347 | } |
---|
348 | while$ |
---|
349 | } |
---|
350 | if$ |
---|
351 | } |
---|
352 | { t #1 #1 substring$ * |
---|
353 | t #2 global.max$ substring$ 't := |
---|
354 | } |
---|
355 | if$ |
---|
356 | } |
---|
357 | while$ |
---|
358 | } |
---|
359 | |
---|
360 | FUNCTION {format.date} |
---|
361 | { year empty$ |
---|
362 | { "" } |
---|
363 | { " " * year } |
---|
364 | if$ |
---|
365 | } |
---|
366 | |
---|
367 | FUNCTION {inproformat.date} |
---|
368 | { year empty$ |
---|
369 | { "" } |
---|
370 | { "; " * year } |
---|
371 | if$ |
---|
372 | } |
---|
373 | |
---|
374 | FUNCTION {format.btitle} |
---|
375 | %%{ title emphasize |
---|
376 | { title % modified by SPi-Global on 12Jun2017 |
---|
377 | } |
---|
378 | |
---|
379 | FUNCTION {tie.or.space.connect} |
---|
380 | { duplicate$ text.length$ #3 < |
---|
381 | { "~" } |
---|
382 | { " " } |
---|
383 | if$ |
---|
384 | swap$ * * |
---|
385 | } |
---|
386 | |
---|
387 | FUNCTION {either.or.check} |
---|
388 | { empty$ |
---|
389 | 'pop$ |
---|
390 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } |
---|
391 | if$ |
---|
392 | } |
---|
393 | |
---|
394 | FUNCTION {format.bvolume} |
---|
395 | { volume empty$ |
---|
396 | { "" } |
---|
397 | { series empty$ |
---|
398 | 'skip$ |
---|
399 | { " " * series * ", vol. " volume * ": " *} |
---|
400 | if$ |
---|
401 | "volume and number" number either.or.check |
---|
402 | } |
---|
403 | if$ |
---|
404 | } |
---|
405 | |
---|
406 | FUNCTION {format.number.series} |
---|
407 | { volume empty$ |
---|
408 | { number empty$ |
---|
409 | { series field.or.null } |
---|
410 | { output.state mid.sentence = |
---|
411 | { "no.~" } |
---|
412 | { "No.~" } |
---|
413 | if$ |
---|
414 | number * |
---|
415 | series empty$ |
---|
416 | { "there's a number but no series in " cite$ * warning$ } |
---|
417 | { " in " * series * } |
---|
418 | if$ |
---|
419 | } |
---|
420 | if$ |
---|
421 | } |
---|
422 | { "" } |
---|
423 | if$ |
---|
424 | } |
---|
425 | |
---|
426 | FUNCTION {format.edition} |
---|
427 | { edition empty$ |
---|
428 | { "" } |
---|
429 | { edition "l" change.case$ "~ed." * } |
---|
430 | if$ |
---|
431 | } |
---|
432 | |
---|
433 | INTEGERS { multiresult } |
---|
434 | |
---|
435 | FUNCTION {multi.page.check} |
---|
436 | { 't := |
---|
437 | #0 'multiresult := |
---|
438 | { multiresult not |
---|
439 | t empty$ not |
---|
440 | and |
---|
441 | } |
---|
442 | { t #1 #1 substring$ |
---|
443 | duplicate$ "-" = |
---|
444 | swap$ duplicate$ "," = |
---|
445 | swap$ "+" = |
---|
446 | or or |
---|
447 | { #1 'multiresult := } |
---|
448 | { t #2 global.max$ substring$ 't := } |
---|
449 | if$ |
---|
450 | } |
---|
451 | while$ |
---|
452 | multiresult |
---|
453 | } |
---|
454 | |
---|
455 | FUNCTION {format.pages} |
---|
456 | { pages empty$ |
---|
457 | { "" } |
---|
458 | {":" pages *} |
---|
459 | if$ |
---|
460 | } |
---|
461 | |
---|
462 | FUNCTION {incollecformat.pages} |
---|
463 | { pages empty$ |
---|
464 | { "" } |
---|
465 | {" (pp. " pages * ")" *} |
---|
466 | if$ |
---|
467 | } |
---|
468 | |
---|
469 | FUNCTION {format.volume} |
---|
470 | { volume empty$ |
---|
471 | { "" } |
---|
472 | { "" volume * } |
---|
473 | if$ |
---|
474 | } |
---|
475 | |
---|
476 | FUNCTION {format.number} |
---|
477 | { number empty$ |
---|
478 | { "" } |
---|
479 | { "(" number * ")" *} |
---|
480 | if$ |
---|
481 | } |
---|
482 | |
---|
483 | FUNCTION {format.chapter.pages} |
---|
484 | { chapter empty$ |
---|
485 | 'format.pages |
---|
486 | { type empty$ |
---|
487 | { "ch.~" chapter * } |
---|
488 | { type "l" change.case$ chapter tie.or.space.connect } |
---|
489 | if$ |
---|
490 | pages empty$ |
---|
491 | 'skip$ |
---|
492 | { ", " * format.pages * } |
---|
493 | if$ |
---|
494 | } |
---|
495 | if$ |
---|
496 | } |
---|
497 | |
---|
498 | FUNCTION {format.in.ed.booktitle} |
---|
499 | { booktitle empty$ |
---|
500 | { "In: " } |
---|
501 | { "In: " |
---|
502 | editor empty$ |
---|
503 | { booktitle emphasize * } |
---|
504 | { " " * format.editors * " " * booktitle emphasize * ", " * } |
---|
505 | if$ |
---|
506 | } |
---|
507 | if$ |
---|
508 | } |
---|
509 | |
---|
510 | FUNCTION {format.thesis.type} |
---|
511 | { type empty$ |
---|
512 | 'skip$ |
---|
513 | { pop$ |
---|
514 | output.state after.block = |
---|
515 | { type "t" change.case$ } |
---|
516 | { type "l" change.case$ } |
---|
517 | if$ |
---|
518 | } |
---|
519 | if$ |
---|
520 | } |
---|
521 | |
---|
522 | FUNCTION {empty.misc.check} |
---|
523 | { author empty$ title empty$ howpublished empty$ |
---|
524 | month empty$ year empty$ note empty$ |
---|
525 | and and and and and |
---|
526 | { "all relevant fields are empty in " cite$ * warning$ } |
---|
527 | 'skip$ |
---|
528 | if$ |
---|
529 | } |
---|
530 | |
---|
531 | FUNCTION {format.tr.number} |
---|
532 | { type empty$ |
---|
533 | %%{ "Tech. Rep." }% modified by SPi-Global - 16Jun2017 |
---|
534 | { "" } |
---|
535 | 'type |
---|
536 | if$ |
---|
537 | number empty$ |
---|
538 | { "l" change.case$ } |
---|
539 | { number tie.or.space.connect } |
---|
540 | if$ |
---|
541 | } |
---|
542 | |
---|
543 | FUNCTION {format.addr.pub} |
---|
544 | { publisher empty$ |
---|
545 | { "" } |
---|
546 | { address empty$ |
---|
547 | { "" } |
---|
548 | { address ": " * } |
---|
549 | if$ |
---|
550 | publisher * " " * |
---|
551 | } |
---|
552 | if$ |
---|
553 | } |
---|
554 | |
---|
555 | FUNCTION {format.book.addr.pub} |
---|
556 | { publisher empty$ |
---|
557 | { "" } |
---|
558 | { address empty$ |
---|
559 | { "" } |
---|
560 | { address ": " * } |
---|
561 | if$ |
---|
562 | publisher * "; " * |
---|
563 | } |
---|
564 | if$ |
---|
565 | } |
---|
566 | |
---|
567 | FUNCTION {format.paddress} |
---|
568 | { address empty$ |
---|
569 | { "" } |
---|
570 | { "(" address * ")" * } |
---|
571 | if$ |
---|
572 | } |
---|
573 | |
---|
574 | FUNCTION {format.ppaddress} |
---|
575 | { address empty$ |
---|
576 | { "" } |
---|
577 | { "; " address * "" * } |
---|
578 | if$ |
---|
579 | } |
---|
580 | |
---|
581 | FUNCTION {format.article.crossref} |
---|
582 | { key empty$ |
---|
583 | { journal empty$ |
---|
584 | { "need key or journal for " cite$ * " to crossref " * crossref * |
---|
585 | warning$ |
---|
586 | "" |
---|
587 | } |
---|
588 | { "in {\em " journal * "\/}" * } |
---|
589 | if$ |
---|
590 | } |
---|
591 | { "in " key * } |
---|
592 | if$ |
---|
593 | " \cite{" * crossref * "}" * |
---|
594 | } |
---|
595 | |
---|
596 | FUNCTION {format.crossref.editor} |
---|
597 | { editor #1 "{vv~}{ll}" format.name$ |
---|
598 | editor num.names$ duplicate$ |
---|
599 | #2 > |
---|
600 | { pop$ " {\em et~al.}" * } |
---|
601 | { #2 < |
---|
602 | 'skip$ |
---|
603 | { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
---|
604 | { " {\em et~al.}" * } |
---|
605 | { " and " * editor #2 "{vv~}{ll}" format.name$ * } |
---|
606 | if$ |
---|
607 | } |
---|
608 | if$ |
---|
609 | } |
---|
610 | if$ |
---|
611 | } |
---|
612 | |
---|
613 | FUNCTION {format.book.crossref} |
---|
614 | { volume empty$ |
---|
615 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ |
---|
616 | "In " |
---|
617 | } |
---|
618 | { "Vol.~" volume * |
---|
619 | " of " * |
---|
620 | } |
---|
621 | if$ |
---|
622 | editor empty$ |
---|
623 | editor field.or.null author field.or.null = |
---|
624 | or |
---|
625 | { key empty$ |
---|
626 | { series empty$ |
---|
627 | { "need editor, key, or series for " cite$ * " to crossref " * |
---|
628 | crossref * warning$ |
---|
629 | "" * |
---|
630 | } |
---|
631 | { "{\em " * series * "\/}" * } |
---|
632 | if$ |
---|
633 | } |
---|
634 | { key * } |
---|
635 | if$ |
---|
636 | } |
---|
637 | { format.crossref.editor * } |
---|
638 | if$ |
---|
639 | " \cite{" * crossref * "}" * |
---|
640 | } |
---|
641 | |
---|
642 | FUNCTION {format.incoll.inproc.crossref} |
---|
643 | { editor empty$ |
---|
644 | editor field.or.null author field.or.null = |
---|
645 | or |
---|
646 | { key empty$ |
---|
647 | { booktitle empty$ |
---|
648 | { "need editor, key, or booktitle for " cite$ * " to crossref " * |
---|
649 | crossref * warning$ |
---|
650 | "" |
---|
651 | } |
---|
652 | { "in {\em " booktitle * "\/}" * } |
---|
653 | if$ |
---|
654 | } |
---|
655 | { "in " key * } |
---|
656 | if$ |
---|
657 | } |
---|
658 | { "in " format.crossref.editor * } |
---|
659 | if$ |
---|
660 | " \cite{" * crossref * "}" * |
---|
661 | } |
---|
662 | |
---|
663 | FUNCTION {no.blank.or.punct} |
---|
664 | { "" * before.all 'output.state := |
---|
665 | } |
---|
666 | |
---|
667 | FUNCTION {add.semicolon} |
---|
668 | { |
---|
669 | ";" * |
---|
670 | no.blank.or.punct |
---|
671 | } |
---|
672 | |
---|
673 | FUNCTION {add.colon} |
---|
674 | { |
---|
675 | ": " * |
---|
676 | no.blank.or.punct |
---|
677 | } |
---|
678 | |
---|
679 | FUNCTION {add.space} |
---|
680 | { |
---|
681 | " " * |
---|
682 | no.blank.or.punct |
---|
683 | } |
---|
684 | |
---|
685 | FUNCTION {article} |
---|
686 | { output.bibitem |
---|
687 | format.authors "author" output.check |
---|
688 | format.title "title" output.check |
---|
689 | blank.sep |
---|
690 | crossref missing$ |
---|
691 | { format.journal emphasize "journal" output.check |
---|
692 | format.date add.semicolon "year" output.check |
---|
693 | format.volume output |
---|
694 | format.number output |
---|
695 | format.pages output |
---|
696 | } |
---|
697 | { format.article.crossref output.nonnull |
---|
698 | format.pages output |
---|
699 | } |
---|
700 | if$ |
---|
701 | new.block |
---|
702 | note output |
---|
703 | fin.entry |
---|
704 | } |
---|
705 | |
---|
706 | FUNCTION {book} |
---|
707 | { output.bibitem |
---|
708 | author empty$ |
---|
709 | { format.editors "author and editor" output.check } |
---|
710 | { format.authors output.nonnull |
---|
711 | crossref missing$ |
---|
712 | { "author and editor" editor either.or.check } |
---|
713 | 'skip$ |
---|
714 | if$ |
---|
715 | } |
---|
716 | if$ |
---|
717 | format.btitle emphasize "title" output.check |
---|
718 | crossref missing$ |
---|
719 | { format.bvolume output |
---|
720 | new.block |
---|
721 | format.number.series output |
---|
722 | format.book.addr.pub "publisher" output.check |
---|
723 | } |
---|
724 | { new.block |
---|
725 | format.book.crossref output.nonnull |
---|
726 | } |
---|
727 | if$ |
---|
728 | format.edition output |
---|
729 | format.date "year" output.check |
---|
730 | new.block |
---|
731 | note output |
---|
732 | fin.entry |
---|
733 | } |
---|
734 | |
---|
735 | FUNCTION {booklet} |
---|
736 | { output.bibitem |
---|
737 | format.authors output |
---|
738 | title empty$ |
---|
739 | { "empty title in " cite$ * warning$ |
---|
740 | howpublished new.sentence.checka |
---|
741 | } |
---|
742 | { howpublished empty$ not |
---|
743 | address empty$ month empty$ year empty$ and and |
---|
744 | or |
---|
745 | { format.title.p output.nonnull } |
---|
746 | { format.title output.nonnull } |
---|
747 | if$ |
---|
748 | blank.sep |
---|
749 | } |
---|
750 | if$ |
---|
751 | howpublished output |
---|
752 | address output |
---|
753 | format.date output |
---|
754 | new.block |
---|
755 | note output |
---|
756 | fin.entry |
---|
757 | } |
---|
758 | |
---|
759 | FUNCTION {inbook} |
---|
760 | { output.bibitem |
---|
761 | author empty$ |
---|
762 | { format.editors "author and editor" output.check } |
---|
763 | { format.authors output.nonnull |
---|
764 | crossref missing$ |
---|
765 | { "author and editor" editor either.or.check } |
---|
766 | 'skip$ |
---|
767 | if$ |
---|
768 | } |
---|
769 | if$ |
---|
770 | format.btitle "title" output.check |
---|
771 | crossref missing$ |
---|
772 | { format.bvolume output |
---|
773 | format.chapter.pages "chapter and pages" output.check |
---|
774 | new.block |
---|
775 | format.number.series output |
---|
776 | format.addr.pub "publisher" output.check |
---|
777 | } |
---|
778 | { format.chapter.pages "chapter and pages" output.check |
---|
779 | new.block |
---|
780 | format.book.crossref output.nonnull |
---|
781 | } |
---|
782 | if$ |
---|
783 | format.edition output |
---|
784 | format.date "year" output.check |
---|
785 | new.block |
---|
786 | note output |
---|
787 | fin.entry |
---|
788 | } |
---|
789 | |
---|
790 | FUNCTION {incollection} |
---|
791 | { output.bibitem |
---|
792 | format.authors "author" output.check |
---|
793 | format.title "title" output.check |
---|
794 | blank.sep |
---|
795 | crossref missing$ |
---|
796 | { format.in.ed.booktitle "booktitle" output.check |
---|
797 | format.number.series add.period$ add.space output |
---|
798 | format.bvolume output |
---|
799 | format.addr.pub "publisher" output.check |
---|
800 | format.edition output |
---|
801 | format.date "year" output.check |
---|
802 | %%format.chapter.pages output |
---|
803 | incollecformat.pages output |
---|
804 | } |
---|
805 | { format.incoll.inproc.crossref output.nonnull |
---|
806 | format.chapter.pages output |
---|
807 | } |
---|
808 | if$ |
---|
809 | new.block |
---|
810 | note output |
---|
811 | fin.entry |
---|
812 | } |
---|
813 | |
---|
814 | FUNCTION {inproceedings} |
---|
815 | { output.bibitem |
---|
816 | format.authors "author" output.check |
---|
817 | format.title "title" output.check |
---|
818 | blank.sep |
---|
819 | crossref missing$ |
---|
820 | { format.in.ed.booktitle "booktitle" output.check |
---|
821 | blank.sep |
---|
822 | format.bvolume output |
---|
823 | format.number.series output |
---|
824 | new.block |
---|
825 | format.pages output |
---|
826 | organization output |
---|
827 | publisher output |
---|
828 | inproformat.date "year" output.check |
---|
829 | format.ppaddress output |
---|
830 | } |
---|
831 | { format.incoll.inproc.crossref output.nonnull |
---|
832 | format.pages output |
---|
833 | } |
---|
834 | if$ |
---|
835 | new.block |
---|
836 | note output |
---|
837 | fin.entry |
---|
838 | } |
---|
839 | |
---|
840 | FUNCTION {conference} { inproceedings } |
---|
841 | |
---|
842 | FUNCTION {manual} |
---|
843 | { output.bibitem |
---|
844 | author empty$ |
---|
845 | { new.block organization empty$ |
---|
846 | 'skip$ |
---|
847 | { new.block organization output.nonnull |
---|
848 | new.block address output |
---|
849 | } |
---|
850 | if$ |
---|
851 | } |
---|
852 | { format.authors output.nonnull } |
---|
853 | if$ |
---|
854 | format.btitle "title" output.check |
---|
855 | author empty$ |
---|
856 | { new.block organization empty$ |
---|
857 | { new.block address new.block.checka |
---|
858 | address output |
---|
859 | } |
---|
860 | 'skip$ |
---|
861 | if$ |
---|
862 | } |
---|
863 | { new.block organization new.block address new.block.checkb |
---|
864 | organization output |
---|
865 | address output |
---|
866 | } |
---|
867 | if$ |
---|
868 | new.block |
---|
869 | format.edition output |
---|
870 | new.block |
---|
871 | format.date output |
---|
872 | new.block |
---|
873 | note output |
---|
874 | fin.entry |
---|
875 | } |
---|
876 | |
---|
877 | FUNCTION {mastersthesis} |
---|
878 | { output.bibitem |
---|
879 | format.authors "author" output.check |
---|
880 | format.title "title" output.check |
---|
881 | blank.sep |
---|
882 | "Master's thesis" format.thesis.type output.nonnull |
---|
883 | new.block |
---|
884 | school "school" output.check |
---|
885 | address output |
---|
886 | format.date "year" output.check |
---|
887 | new.block |
---|
888 | note output |
---|
889 | fin.entry |
---|
890 | } |
---|
891 | |
---|
892 | FUNCTION {format.note} |
---|
893 | { note empty$ |
---|
894 | { "" } |
---|
895 | { note "; " *} |
---|
896 | if$ |
---|
897 | } |
---|
898 | |
---|
899 | FUNCTION {misc} |
---|
900 | { output.bibitem |
---|
901 | format.authors output |
---|
902 | title empty$ |
---|
903 | { howpublished new.sentence.checka } |
---|
904 | { howpublished empty$ not |
---|
905 | month empty$ year empty$ and |
---|
906 | or |
---|
907 | { format.title.p output.nonnull } |
---|
908 | { format.title emphasize output.nonnull } |
---|
909 | if$ |
---|
910 | blank.sep |
---|
911 | } |
---|
912 | if$ |
---|
913 | howpublished output |
---|
914 | new.block |
---|
915 | format.note output |
---|
916 | new.block |
---|
917 | format.date output |
---|
918 | fin.entry |
---|
919 | empty.misc.check |
---|
920 | } |
---|
921 | |
---|
922 | FUNCTION {phdthesis} |
---|
923 | { output.bibitem |
---|
924 | format.authors "author" output.check |
---|
925 | format.btitle "title" output.check |
---|
926 | new.block |
---|
927 | "PhD thesis" format.thesis.type output.nonnull |
---|
928 | school "school" output.check |
---|
929 | address output |
---|
930 | format.date "year" output.check |
---|
931 | new.block |
---|
932 | note output |
---|
933 | fin.entry |
---|
934 | } |
---|
935 | |
---|
936 | FUNCTION {proceedings} |
---|
937 | { output.bibitem |
---|
938 | editor empty$ |
---|
939 | { organization output } |
---|
940 | { format.editors output.nonnull } |
---|
941 | if$ |
---|
942 | format.btitle "title" output.check |
---|
943 | format.bvolume output |
---|
944 | format.number.series output |
---|
945 | format.paddress output |
---|
946 | editor empty$ |
---|
947 | 'skip$ |
---|
948 | { organization output } |
---|
949 | if$ |
---|
950 | publisher output |
---|
951 | format.date "year" output.check |
---|
952 | new.block |
---|
953 | note output |
---|
954 | fin.entry |
---|
955 | } |
---|
956 | |
---|
957 | FUNCTION {add.spperiod} |
---|
958 | { |
---|
959 | ". " * |
---|
960 | no.blank.or.punct |
---|
961 | } |
---|
962 | |
---|
963 | FUNCTION {techreport} |
---|
964 | { output.bibitem |
---|
965 | format.authors "author" output.check |
---|
966 | format.title emphasize "title" output.check |
---|
967 | blank.sep |
---|
968 | format.tr.number add.colon output.nonnull |
---|
969 | institution "institution" output.check |
---|
970 | address output |
---|
971 | add.semicolon add.space format.date "year" output.check |
---|
972 | new.block |
---|
973 | note output |
---|
974 | fin.entry |
---|
975 | } |
---|
976 | |
---|
977 | FUNCTION {unpublished} |
---|
978 | { output.bibitem |
---|
979 | format.authors "author" output.check |
---|
980 | format.title.p "title" output.check |
---|
981 | blank.sep |
---|
982 | note "note" output.check |
---|
983 | format.date output |
---|
984 | fin.entry |
---|
985 | } |
---|
986 | |
---|
987 | FUNCTION {default.type} { misc } |
---|
988 | |
---|
989 | MACRO {jan} {"Jan."} |
---|
990 | |
---|
991 | MACRO {feb} {"Feb."} |
---|
992 | |
---|
993 | MACRO {mar} {"Mar."} |
---|
994 | |
---|
995 | MACRO {apr} {"Apr."} |
---|
996 | |
---|
997 | MACRO {may} {"May"} |
---|
998 | |
---|
999 | MACRO {jun} {"June"} |
---|
1000 | |
---|
1001 | MACRO {jul} {"July"} |
---|
1002 | |
---|
1003 | MACRO {aug} {"Aug."} |
---|
1004 | |
---|
1005 | MACRO {sep} {"Sept."} |
---|
1006 | |
---|
1007 | MACRO {oct} {"Oct."} |
---|
1008 | |
---|
1009 | MACRO {nov} {"Nov."} |
---|
1010 | |
---|
1011 | MACRO {dec} {"Dec."} |
---|
1012 | |
---|
1013 | MACRO {acmcs} {"ACM Computing Surveys"} |
---|
1014 | |
---|
1015 | MACRO {acta} {"Acta Informatica"} |
---|
1016 | |
---|
1017 | MACRO {cacm} {"Communications ACM"} |
---|
1018 | |
---|
1019 | MACRO {ibmjrd} {"IBM J. Research and Development"} |
---|
1020 | |
---|
1021 | MACRO {ibmsj} {"IBM Systems~J."} |
---|
1022 | |
---|
1023 | MACRO {ieeese} {"IEEE Trans. Software Engineering"} |
---|
1024 | |
---|
1025 | MACRO {ieeetc} {"IEEE Trans. Computers"} |
---|
1026 | |
---|
1027 | MACRO {ieeetcad} |
---|
1028 | {"IEEE Trans. Computer-Aided Design"} |
---|
1029 | |
---|
1030 | MACRO {ipl} {"Information Processing Letters"} |
---|
1031 | |
---|
1032 | MACRO {jacm} {"J.~ACM"} |
---|
1033 | |
---|
1034 | MACRO {jcss} {"J.~Computer and System Sciences"} |
---|
1035 | |
---|
1036 | MACRO {scp} {"Science of Computer Programming"} |
---|
1037 | |
---|
1038 | MACRO {sicomp} {"SIAM J. Computing"} |
---|
1039 | |
---|
1040 | MACRO {tocs} {"ACM Trans. Computer Systems"} |
---|
1041 | |
---|
1042 | MACRO {tods} {"ACM Trans. Database Systems"} |
---|
1043 | |
---|
1044 | MACRO {tog} {"ACM Trans. Graphics"} |
---|
1045 | |
---|
1046 | MACRO {toms} {"ACM Trans. Mathematical Software"} |
---|
1047 | |
---|
1048 | MACRO {toois} {"ACM Trans. Office Information Systems"} |
---|
1049 | |
---|
1050 | MACRO {toplas} {"ACM Trans. Programming Languages and Systems"} |
---|
1051 | |
---|
1052 | MACRO {tcs} {"Theoretical Computer Science"} |
---|
1053 | |
---|
1054 | READ |
---|
1055 | |
---|
1056 | STRINGS { longest.label } |
---|
1057 | |
---|
1058 | INTEGERS { number.label longest.label.width } |
---|
1059 | |
---|
1060 | FUNCTION {initialize.longest.label} |
---|
1061 | { "" 'longest.label := |
---|
1062 | #1 'number.label := |
---|
1063 | #0 'longest.label.width := |
---|
1064 | } |
---|
1065 | |
---|
1066 | FUNCTION {longest.label.pass} |
---|
1067 | { number.label int.to.str$ 'label := |
---|
1068 | number.label #1 + 'number.label := |
---|
1069 | label width$ longest.label.width > |
---|
1070 | { label 'longest.label := |
---|
1071 | label width$ 'longest.label.width := |
---|
1072 | } |
---|
1073 | 'skip$ |
---|
1074 | if$ |
---|
1075 | } |
---|
1076 | |
---|
1077 | EXECUTE {initialize.longest.label} |
---|
1078 | |
---|
1079 | ITERATE {longest.label.pass} |
---|
1080 | |
---|
1081 | FUNCTION {begin.bib} |
---|
1082 | { preamble$ empty$ |
---|
1083 | 'skip$ |
---|
1084 | { preamble$ write$ newline$ } |
---|
1085 | if$ |
---|
1086 | "\begin{thebibliography}{" longest.label * "}" * write$ newline$ |
---|
1087 | } |
---|
1088 | |
---|
1089 | EXECUTE {begin.bib} |
---|
1090 | |
---|
1091 | EXECUTE {init.state.consts} |
---|
1092 | |
---|
1093 | ITERATE {call.type$} |
---|
1094 | |
---|
1095 | FUNCTION {end.bib} |
---|
1096 | { newline$ |
---|
1097 | "\end{thebibliography}" write$ newline$ |
---|
1098 | } |
---|
1099 | |
---|
1100 | EXECUTE {end.bib} |
---|