Debian Codegraph @

doc/is-plain.bst

raw
1 %% =====================================================================
2 %% WARNING: Do NOT edit this file. It was produced automatically by
3 %% Nelson H. F. Beebe <[email protected]>
4 %% from /a/sundown/export/home/0048/beebe/tex/bib/merge/xbtxbst.doc
5 %% on Mon Apr 1 19:38:43 MST 1996
6 %% =====================================================================
7 %%%=====================================================================
8 %%% @BibTeX-style-file{
9 %%% author = "Nelson H. F. Beebe",
10 %%% version = "2.02",
11 %%% date = "01 April 1996",
12 %%% time = "19:38:29 MST",
13 %%% filename = "is-plain.bst",
14 %%% address = "Center for Scientific Computing
15 %%% Department of Mathematics
16 %%% University of Utah
17 %%% Salt Lake City, UT 84112
18 %%% USA",
19 %%% telephone = "+1 801 581 5254",
20 %%% FAX = "+1 801 581 4148",
21 %%% checksum = "25283 1666 3984 31597",
22 %%% email = "[email protected] (Internet)",
23 %%% codetable = "ISO/ASCII",
24 %%% keywords = "BibTeX, style, bibliography",
25 %%% supported = "yes",
26 %%% docstring = "This file is a modification of the standard
27 %%% BibTeX btxbst.doc file, or is a .bst file
28 %%% derived from that modification. It contains
29 %%% added support for ISBN and ISSN fields, as
30 %%% well as for the PERIODICAL entry. The UNIX C
31 %%% preprocessor can be used to extract the
32 %%% extensions of the standard styles, as
33 %%% follows:
34 %%%
35 %%% cpp -P -DPLAIN xbtxbst.doc is-plain.txt
36 %%% cpp -P -DUNSRT xbtxbst.doc is-unsrt.txt
37 %%% cpp -P -DALPHA xbtxbst.doc is-alpha.txt
38 %%% cpp -P -DABBRV xbtxbst.doc is-abbrv.txt
39 %%%
40 %%% Add -D_ISBN for ISBN output, -D_ISSN for
41 %%% ISSN output, -D_LCCN for LCCN output,
42 %%% -D_PRICE for price output, and -D_BOOKPAGES
43 %%% for book, techreport, manual, and thesis
44 %%% pages output.
45 %%%
46 %%% Add -D_URL to get World-Wide Web Uniform
47 %%% Resource Locator (URL) output.
48 %%%
49 %%% Add -D_NUMERIC_SUFFIXES to get numeric
50 %%% label suffixes -1, -2, ..., -26, instead of
51 %%% letters a, b, ..., z, so as to correctly
52 %%% handle alpha-style bibliographies with more
53 %%% than 26 entries for a single author in one
54 %%% year. Change letter suffix code to switch
55 %%% to numeric suffixes if more than 26 letters
56 %%% are used, so that no matter which scheme is
57 %%% selected, correct output will always be
58 %%% obtained.
59 %%%
60 %%% If desired, a sed script can be used to
61 %%% eliminate non-essential comments (this
62 %%% reduces the file size by 2/3); a command
63 %%% filter step like
64 %%% sed -e '/^%$/d' -e '/^%[^%].*$/d'
65 %%% will accomplish that job.
66 %%%
67 %%% The checksum field above contains a CRC-16
68 %%% checksum as the first value, followed by the
69 %%% equivalent of the standard UNIX wc (word
70 %%% count) utility output of lines, words, and
71 %%% characters. This is produced by Robert
72 %%% Solovay's checksum utility."
73 %%% }
74 %%% ====================================================================
75 %%% Revision history (reverse time order):
76 %%%
77 %%% 2.02 [01-Apr-1996]
78 %%% Add day keyword support with new code in format.date function.
79 %%% Oren Patashnik will include this new keyword in standard styles
80 %%% in BibTeX 1.0.
81 %%%
82 %%% Add new function collapse.pagerange, and use it to collapse
83 %%% page ranges with identical initial and final numbers to a
84 %%% single number, so that bibliography files can distinguish
85 %%% between one-page documents, and documents missing final page
86 %%% numbers.
87 %%%
88 %%% 2.01 [25-Oct-1994]
89 %%% Add URL output support.
90 %%%
91 %%% 2.00 [12-Oct-1994]
92 %%% Add support for pages in theses and manuals, treating them
93 %%% like Book and InBook pages.
94 %%%
95 %%% Correct ISSN support: a typo caused output of ISBN instead of
96 %%% ISSN.
97 %%%
98 %%% Wherever ISBNs are output, also output an ISSN, if one
99 %%% exists, and vice versa. The reason is that some periodicals
100 %%% (e.g. The X Resource, published by O'Reilly and Associates)
101 %%% have both ISSN and ISBN numbers, and can be purchased either
102 %%% as journal subscriptions, or as single volumes.
103 %%%
104 %%% For InProceedings and Proceedings output, issue a warning for
105 %%% a missing publisher: even though that field is optional, a
106 %%% bibliographic reference without it is incomplete.
107 %%%
108 %%% Remove harmless, but unneeded, single horizontal space before
109 %%% price output added with version 1.03.
110 %%%
111 %%% Change Proceedings and InProceedings to treat address values
112 %%% as publisher addresses, as they are with every other document
113 %%% type, rather than as conference addresses, which belong in
114 %%% the title field (that is how major libraries, including OCLC
115 %%% and Library of Congress, with nearly 60M holdings, represent
116 %%% them). The need for this change has been discussed with
117 %%% BibTeX's author, Oren Patashnik, and there is a good
118 %%% possibility that BibTeX 1.0 will contain the change
119 %%% implemented here. This is an INCOMPATIBLE change that will
120 %%% produce different .bbl file formatting. However, the TUG and
121 %%% BibNet bibliography projects have consistently used address
122 %%% to me publisher/organization/institution address, and so
123 %%% already conform to the new practice.
124 %%%
125 %%% 1.05 [30-May-1994]
126 %%% Add NUMERIC_SUFFIXES support.
127 %%%
128 %%% Change all preprocessor statements to put else and endif
129 %%% labels inside C-style comments to conform to 1989 ISO/ANSI C
130 %%% Standard.
131 %%%
132 %%% 1.04 [11-Nov-1993]
133 %%% Add underscore prefix to new processor symbols to prevent
134 %%% substitution in comments
135 %%%
136 %%% 1.03 [11-Oct-1993]
137 %%% Add support for LCCN (Library of Congress Catalog Number)
138 %%% and price fields, and make ISBN, ISSN, LCCN, and price
139 %%% selectable by preprocessor conditionals.
140 %%%
141 %%% 1.02 [12-Sep-1991]
142 %%% Merge in Barbara N. Beeton's suggestion for hyphen-less
143 %%% line breaks around volume(number):page.
144 %%%
145 %%% 1.01 [10-Sep-1991]
146 %%% Update file comment header and use Solovay checksum program.
147 %%%
148 %%% 1.00 [17-Oct-1990]
149 %%% Original version merging hand-edits of is-xxx.bst files into
150 %%% this master file, xbtxbst.doc.
151 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
152
153 %% BibTeX `plain' family
154 %% version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
155 %% Copyright (C) 1985, all rights reserved.
156 %% Copying of this file is authorized only if either
157 %% (1) you make absolutely no changes to your copy, including name, or
158 %% (2) if you do make changes, you name it something other than
159 %% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
160 %% This restriction helps ensure that all standard styles are identical.
161 %% The file btxbst.doc has the documentation for this style.
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181 ENTRY
182 { address
183 author
184 booktitle
185 chapter
186 day
187 edition
188 editor
189 howpublished
190 institution
191
192 isbn
193
194
195 issn
196
197 journal
198 key
199
200 lccn
201
202 month
203 note
204 number
205 organization
206 pages
207
208 price
209
210 publisher
211 school
212 series
213 title
214 type
215
216 URL
217
218 volume
219 year
220 }
221 {}
222
223 { label }
224
225
226
227 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
228
229 FUNCTION {init.state.consts}
230 { #0 'before.all :=
231 #1 'mid.sentence :=
232 #2 'after.sentence :=
233 #3 'after.block :=
234 }
235
236
237 STRINGS { b e new.pages original.t s t }
238
239 FUNCTION {output.nonnull}
240 { 's :=
241 output.state mid.sentence =
242 { ", " * write$ }
243 { output.state after.block =
244 { add.period$ write$
245 newline$
246 "\newblock " write$
247 }
248 { output.state before.all =
249 'write$
250 { add.period$ " " * write$ }
251 if$
252 }
253 if$
254 mid.sentence 'output.state :=
255 }
256 if$
257 s
258 }
259
260 FUNCTION {output}
261 { duplicate$ empty$
262 'pop$
263 'output.nonnull
264 if$
265 }
266
267 FUNCTION {output.check}
268 { 't :=
269 duplicate$ empty$
270 { pop$ "empty " t * " in " * cite$ * warning$ }
271 'output.nonnull
272 if$
273 }
274
275 FUNCTION {output.bibitem}
276 { newline$
277
278 "\bibitem{" write$
279
280 cite$ write$
281 "}" write$
282 newline$
283 ""
284 before.all 'output.state :=
285 }
286
287
288 FUNCTION {fin.entry}
289 { add.period$
290 write$
291 newline$
292 }
293
294 FUNCTION {new.block}
295 { output.state before.all =
296 'skip$
297 { after.block 'output.state := }
298 if$
299 }
300
301 FUNCTION {new.sentence}
302 { output.state after.block =
303 'skip$
304 { output.state before.all =
305 'skip$
306 { after.sentence 'output.state := }
307 if$
308 }
309 if$
310 }
311
312
313 FUNCTION {not}
314 { { #0 }
315 { #1 }
316 if$
317 }
318
319 FUNCTION {and}
320 { 'skip$
321 { pop$ #0 }
322 if$
323 }
324
325 FUNCTION {or}
326 { { pop$ #1 }
327 'skip$
328 if$
329 }
330
331
332 FUNCTION {new.block.checka}
333 { empty$
334 'skip$
335 'new.block
336 if$
337 }
338
339 FUNCTION {new.block.checkb}
340 { empty$
341 swap$ empty$
342 and
343 'skip$
344 'new.block
345 if$
346 }
347
348
349 FUNCTION {new.sentence.checka}
350 { empty$
351 'skip$
352 'new.sentence
353 if$
354 }
355
356 FUNCTION {new.sentence.checkb}
357 { empty$
358 swap$ empty$
359 and
360 'skip$
361 'new.sentence
362 if$
363 }
364
365
366 FUNCTION {field.or.null}
367 { duplicate$ empty$
368 { pop$ "" }
369 'skip$
370 if$
371 }
372
373 FUNCTION {emphasize}
374 { duplicate$ empty$
375 { pop$ "" }
376 { "{\em " swap$ * "}" * }
377 if$
378 }
379
380 INTEGERS { nameptr namesleft numnames }
381
382 FUNCTION {format.names}
383 { 's :=
384 #1 'nameptr :=
385 s num.names$ 'numnames :=
386 numnames 'namesleft :=
387 { namesleft #0 > }
388
389 { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
390
391 nameptr #1 >
392 { namesleft #1 >
393 { ", " * t * }
394 { numnames #2 >
395 { "," * }
396 'skip$
397 if$
398 t "others" =
399 { " et~al." * }
400 { " and " * t * }
401 if$
402 }
403 if$
404 }
405 't
406 if$
407 nameptr #1 + 'nameptr :=
408 namesleft #1 - 'namesleft :=
409 }
410 while$
411 }
412
413 FUNCTION {format.authors}
414 { author empty$
415 { "" }
416 { author format.names }
417 if$
418 }
419
420 FUNCTION {format.editors}
421 { editor empty$
422 { "" }
423 { editor format.names
424 editor num.names$ #1 >
425 { ", editors" * }
426 { ", editor" * }
427 if$
428 }
429 if$
430 }
431
432
433 FUNCTION {format.isbn}
434 { isbn empty$
435 { "" }
436 { new.block "ISBN " isbn * }
437 if$
438 }
439
440
441
442 FUNCTION {format.issn}
443 { issn empty$
444 { "" }
445 { new.block "ISSN " issn * }
446 if$
447 }
448
449
450
451 FUNCTION {format.lccn}
452 { lccn empty$
453 { "" }
454 { new.block "LCCN " lccn * }
455 if$
456 }
457
458
459
460 FUNCTION {format.price}
461 { price empty$
462 { "" }
463 { new.block price }
464 if$
465 }
466
467
468
469 FUNCTION {format.url}
470 { url empty$
471 { "" }
472 { new.block "URL \path`" url * "`" *}
473 if$
474 }
475
476
477
478
479 FUNCTION {format.title}
480 { title empty$
481 { "" }
482
483 { title "t" change.case$ }
484
485 if$
486 }
487
488
489
490 FUNCTION {collapse.pagerange}
491 { 't := % save input page range string
492 t 'original.t := % save original page range
493 "" 'b := % beginning page number
494 "" 'e := % ending page number
495 { t empty$ not } % while-loop Boolean condition
496 { % while-loop body
497 t #1 #2 substring$ "--" = % have we found the en-dash?
498 {
499 t #3 global.max$ substring$ 'e := % yes, save ending page number
500 "" 't := % and set t to empty string to terminate loop
501 }
502 {
503 b t #1 #1 substring$ * 'b := % no, just accumulate this character
504 t #2 global.max$ substring$ 't := % and set t to the remaining string
505 }
506 if$
507 }
508 while$ % on exit, t has ending page number string
509 e b = % are beginning and ending numbers the same?
510 { b } % yes, return the beginning page number string
511 { original.t } % no, return the original page number string
512 if$
513 }
514
515
516 FUNCTION {n.dashify}
517 { 't :=
518 ""
519 { t empty$ not }
520 { t #1 #1 substring$ "-" =
521 { t #1 #2 substring$ "--" = not
522 { "--" *
523 t #2 global.max$ substring$ 't :=
524 }
525 { { t #1 #1 substring$ "-" = }
526 { "-" *
527 t #2 global.max$ substring$ 't :=
528 }
529 while$
530 }
531 if$
532 }
533 { t #1 #1 substring$ *
534 t #2 global.max$ substring$ 't :=
535 }
536 if$
537 }
538 while$
539 }
540
541
542 FUNCTION {format.date}
543 { year empty$
544 { month empty$
545 {
546 day empty$
547 { "" }
548 { "there's a day but no month or year in " cite$ * warning$ }
549 if$
550 }
551 { "there's a month but no year in " cite$ * warning$
552 month
553 day empty$
554 { }
555 { " " * day * }
556 if$
557 }
558 if$
559 }
560 { month empty$
561 {
562 day empty$
563 { year }
564 { "there's a day and year but no month in " cite$ * warning$ }
565 if$
566 }
567 {
568 month " " *
569 day empty$
570 { }
571 { day * ", " * }
572 if$
573 year *
574 }
575 if$
576 }
577 if$
578 }
579
580
581 FUNCTION {format.btitle}
582 { title emphasize
583 }
584
585
586 FUNCTION {tie.or.space.connect}
587 { duplicate$ text.length$ #3 <
588 { "~" }
589 { " " }
590 if$
591 swap$ * *
592 }
593
594
595 FUNCTION {either.or.check}
596 { empty$
597 'pop$
598 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
599 if$
600 }
601
602
603 FUNCTION {format.bvolume}
604 { volume empty$
605 { "" }
606 { "volume" volume tie.or.space.connect
607 series empty$
608 'skip$
609 { " of " * series emphasize * }
610 if$
611 "volume and number" number either.or.check
612 }
613 if$
614 }
615
616
617 FUNCTION {format.number.series}
618 { volume empty$
619 { number empty$
620 { series field.or.null }
621 { output.state mid.sentence =
622 { "number" }
623 { "Number" }
624 if$
625 number tie.or.space.connect
626 series empty$
627 { "there's a number but no series in " cite$ * warning$ }
628 { " in " * series * }
629 if$
630 }
631 if$
632 }
633 { "" }
634 if$
635 }
636
637
638 FUNCTION {format.edition}
639 { edition empty$
640 { "" }
641 { output.state mid.sentence =
642 { edition "l" change.case$ " edition" * }
643 { edition "t" change.case$ " edition" * }
644 if$
645 }
646 if$
647 }
648
649
650 INTEGERS { multiresult }
651
652 FUNCTION {multi.page.check}
653 { 't :=
654 #0 'multiresult :=
655 { multiresult not
656 t empty$ not
657 and
658 }
659 { t #1 #1 substring$
660 duplicate$ "-" =
661 swap$ duplicate$ "," =
662 swap$ "+" =
663 or or
664 { #1 'multiresult := }
665 { t #2 global.max$ substring$ 't := }
666 if$
667 }
668 while$
669 multiresult
670 }
671
672
673 FUNCTION {format.book.pages}
674 { pages empty$
675 { "" }
676 { new.block pages " pp." * }
677 if$
678 }
679
680
681
682 FUNCTION {format.pages}
683 { pages empty$
684 { "" }
685 {
686 pages multi.page.check
687 { pages collapse.pagerange 'new.pages := }
688 { pages 'new.pages := }
689 if$
690 new.pages multi.page.check
691 { "pages" new.pages n.dashify tie.or.space.connect }
692 { "page" new.pages tie.or.space.connect }
693 if$
694 }
695 if$
696 }
697
698
699 FUNCTION {format.vol.num.pages}
700 { volume field.or.null
701 number empty$
702 'skip$
703 { "\penalty0 (" number * ")" * *
704 volume empty$
705 { "there's a number but no volume in " cite$ * warning$ }
706 'skip$
707 if$
708 }
709 if$
710 pages empty$
711 'skip$
712 { duplicate$ empty$
713 { pop$ format.pages }
714 { ":\penalty0 " * pages collapse.pagerange n.dashify * }
715 if$
716 }
717 if$
718 }
719
720
721
722 FUNCTION {format.chapter.pages}
723 { chapter empty$
724 'format.pages
725 { type empty$
726 { "chapter" }
727 { type "l" change.case$ }
728 if$
729 chapter tie.or.space.connect
730 pages empty$
731 'skip$
732 { ", " * format.pages * }
733 if$
734 }
735 if$
736 }
737
738
739 FUNCTION {format.in.ed.booktitle}
740 { booktitle empty$
741 { "" }
742 { editor empty$
743 { "In " booktitle emphasize * }
744 { "In " format.editors * ", " * booktitle emphasize * }
745 if$
746 }
747 if$
748 }
749
750
751 FUNCTION {empty.misc.check}
752 { author empty$ title empty$ howpublished empty$
753 month empty$ year empty$ note empty$
754 and and and and and
755
756 key empty$ not and
757
758 { "all relevant fields are empty in " cite$ * warning$ }
759 'skip$
760 if$
761 }
762
763
764 FUNCTION {format.thesis.type}
765 { type empty$
766 'skip$
767 { pop$
768 type "t" change.case$
769 }
770 if$
771 }
772
773
774 FUNCTION {format.tr.number}
775 { type empty$
776 { "Technical Report" }
777 'type
778 if$
779 number empty$
780 { "t" change.case$ }
781 { number tie.or.space.connect }
782 if$
783 }
784
785
786 FUNCTION {format.article.crossref}
787 { key empty$
788 { journal empty$
789 { "need key or journal for " cite$ * " to crossref " * crossref *
790 warning$
791 ""
792 }
793 { "In {\em " journal * "\/}" * }
794 if$
795 }
796 { "In " key * }
797 if$
798 " \cite{" * crossref * "}" *
799 }
800
801
802 FUNCTION {format.crossref.editor}
803 { editor #1 "{vv~}{ll}" format.name$
804 editor num.names$ duplicate$
805 #2 >
806 { pop$ " et~al." * }
807 { #2 <
808 'skip$
809 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
810 { " et~al." * }
811 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
812 if$
813 }
814 if$
815 }
816 if$
817 }
818
819
820 FUNCTION {format.book.crossref}
821 { volume empty$
822 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
823 "In "
824 }
825 { "Volume" volume tie.or.space.connect
826 " of " *
827 }
828 if$
829 editor empty$
830 editor field.or.null author field.or.null =
831 or
832 { key empty$
833 { series empty$
834 { "need editor, key, or series for " cite$ * " to crossref " *
835 crossref * warning$
836 "" *
837 }
838 { "{\em " * series * "\/}" * }
839 if$
840 }
841 { key * }
842 if$
843 }
844 { format.crossref.editor * }
845 if$
846 " \cite{" * crossref * "}" *
847 }
848
849
850 FUNCTION {format.incoll.inproc.crossref}
851 { editor empty$
852 editor field.or.null author field.or.null =
853 or
854 { key empty$
855 { booktitle empty$
856 { "need editor, key, or booktitle for " cite$ * " to crossref " *
857 crossref * warning$
858 ""
859 }
860 { "In {\em " booktitle * "\/}" * }
861 if$
862 }
863 { "In " key * }
864 if$
865 }
866 { "In " format.crossref.editor * }
867 if$
868 " \cite{" * crossref * "}" *
869 }
870
871
872 FUNCTION {article}
873 { output.bibitem
874 format.authors "author" output.check
875 new.block
876 format.title "title" output.check
877 new.block
878 crossref missing$
879 { journal emphasize "journal" output.check
880 format.vol.num.pages output
881 format.date "year" output.check
882 }
883 { format.article.crossref output.nonnull
884 format.pages output
885 }
886 if$
887
888 format.url output
889
890 new.block
891 note output
892 fin.entry
893 }
894
895 FUNCTION {book}
896 { output.bibitem
897 author empty$
898 { format.editors "author and editor" output.check }
899 { format.authors output.nonnull
900 crossref missing$
901 { "author and editor" editor either.or.check }
902 'skip$
903 if$
904 }
905 if$
906 new.block
907 format.btitle "title" output.check
908 crossref missing$
909 { format.bvolume output
910 new.block
911 format.number.series output
912 new.sentence
913 publisher "publisher" output.check
914 address output
915 }
916 { new.block
917 format.book.crossref output.nonnull
918 }
919 if$
920 format.edition output
921 format.date "year" output.check
922
923 format.isbn output
924
925
926 format.issn output
927
928
929 format.book.pages output
930
931
932 format.lccn output
933
934
935 format.price output
936
937
938 format.url output
939
940 new.block
941 note output
942 fin.entry
943 }
944
945
946 FUNCTION {booklet}
947 { output.bibitem
948 format.authors output
949 new.block
950 format.title "title" output.check
951 howpublished address new.block.checkb
952 howpublished output
953 address output
954 format.date output
955
956 format.isbn output
957
958
959 format.issn output
960
961
962 format.book.pages output
963
964
965 format.lccn output
966
967
968 format.price output
969
970
971 format.url output
972
973 new.block
974 note output
975 fin.entry
976 }
977
978
979
980 FUNCTION {inbook}
981 { output.bibitem
982 author empty$
983 { format.editors "author and editor" output.check }
984 { format.authors output.nonnull
985 crossref missing$
986 { "author and editor" editor either.or.check }
987 'skip$
988 if$
989 }
990 if$
991 new.block
992 format.btitle "title" output.check
993 crossref missing$
994 { format.bvolume output
995 format.chapter.pages "chapter and pages" output.check
996 new.block
997 format.number.series output
998 new.sentence
999 publisher "publisher" output.check
1000 address output
1001 }
1002 { format.chapter.pages "chapter and pages" output.check
1003 new.block
1004 format.book.crossref output.nonnull
1005 }
1006 if$
1007 format.edition output
1008 format.date "year" output.check
1009
1010 format.isbn output
1011
1012
1013 format.issn output
1014
1015
1016 format.lccn output
1017
1018
1019 format.price output
1020
1021
1022 format.url output
1023
1024 new.block
1025 note output
1026 fin.entry
1027 }
1028
1029
1030 FUNCTION {incollection}
1031 { output.bibitem
1032 format.authors "author" output.check
1033 new.block
1034 format.title "title" output.check
1035 new.block
1036 crossref missing$
1037 { format.in.ed.booktitle "booktitle" output.check
1038 format.bvolume output
1039 format.number.series output
1040 format.chapter.pages output
1041 new.sentence
1042 publisher "publisher" output.check
1043 address output
1044 format.edition output
1045 format.date "year" output.check
1046 }
1047 { format.incoll.inproc.crossref output.nonnull
1048 format.chapter.pages output
1049 }
1050 if$
1051
1052 format.isbn output
1053
1054
1055 format.issn output
1056
1057
1058 format.lccn output
1059
1060
1061 format.price output
1062
1063
1064 format.url output
1065
1066 new.block
1067 note output
1068 fin.entry
1069 }
1070
1071
1072 FUNCTION {inproceedings}
1073 { output.bibitem
1074 format.authors "author" output.check
1075 new.block
1076 format.title "title" output.check
1077 new.block
1078 crossref missing$
1079 { format.in.ed.booktitle "booktitle" output.check
1080 format.bvolume output
1081 format.number.series output
1082 format.pages output
1083 address empty$
1084 { organization publisher new.sentence.checkb
1085 organization output
1086 publisher "publisher" output.check
1087 format.date "year" output.check
1088 }
1089 { new.sentence
1090 organization output
1091 publisher "publisher" output.check
1092 address output.nonnull
1093 format.date "year" output.check
1094 }
1095 if$
1096 }
1097 { format.incoll.inproc.crossref output.nonnull
1098 format.pages output
1099 }
1100 if$
1101
1102 format.isbn output
1103
1104
1105 format.issn output
1106
1107
1108 format.lccn output
1109
1110
1111 format.price output
1112
1113
1114 format.url output
1115
1116 new.block
1117 note output
1118 fin.entry
1119 }
1120
1121
1122 FUNCTION {conference} { inproceedings }
1123
1124
1125 FUNCTION {manual}
1126 { output.bibitem
1127 author empty$
1128 { organization empty$
1129 'skip$
1130 { organization output.nonnull
1131 address output
1132 }
1133 if$
1134 }
1135 { format.authors output.nonnull }
1136 if$
1137 new.block
1138 format.btitle "title" output.check
1139 author empty$
1140 { organization empty$
1141 { address new.block.checka
1142 address output
1143 }
1144 'skip$
1145 if$
1146 }
1147 { organization address new.block.checkb
1148 organization output
1149 address output
1150 }
1151 if$
1152 format.edition output
1153 format.date output
1154
1155 format.book.pages output
1156
1157
1158 format.price output
1159
1160
1161 format.url output
1162
1163 new.block
1164 note output
1165 fin.entry
1166 }
1167
1168
1169 FUNCTION {mastersthesis}
1170 { output.bibitem
1171 format.authors "author" output.check
1172 new.block
1173 format.title "title" output.check
1174 new.block
1175 "Master's thesis" format.thesis.type output.nonnull
1176 school "school" output.check
1177 address output
1178 format.date "year" output.check
1179
1180 format.book.pages output
1181
1182
1183 format.url output
1184
1185 new.block
1186 note output
1187 fin.entry
1188 }
1189
1190
1191 FUNCTION {misc}
1192 { output.bibitem
1193 format.authors output
1194 title howpublished new.block.checkb
1195 format.title output
1196 howpublished new.block.checka
1197 howpublished output
1198 format.date output
1199
1200 format.isbn output
1201
1202
1203 format.issn output
1204
1205
1206 format.price output
1207
1208
1209 format.url output
1210
1211 new.block
1212 note output
1213 fin.entry
1214 empty.misc.check
1215 }
1216
1217
1218 FUNCTION {phdthesis}
1219 { output.bibitem
1220 format.authors "author" output.check
1221 new.block
1222 format.btitle "title" output.check
1223 new.block
1224 "PhD thesis" format.thesis.type output.nonnull
1225 school "school" output.check
1226 address output
1227 format.date "year" output.check
1228
1229 format.book.pages output
1230
1231
1232 format.url output
1233
1234 new.block
1235 note output
1236 fin.entry
1237 }
1238
1239
1240 FUNCTION {periodical}
1241 { output.bibitem
1242 editor empty$
1243 { organization output }
1244 { format.editors output.nonnull }
1245 if$
1246 new.block
1247 title emphasize "title" output.check
1248 format.vol.num.pages output
1249 format.date output
1250
1251 format.isbn output
1252
1253
1254 format.issn output
1255
1256
1257 format.price output
1258
1259
1260 format.url output
1261
1262 new.sentence
1263 publisher output
1264 address output
1265 howpublished new.block.checka
1266 howpublished output
1267 new.block
1268 note output
1269 fin.entry
1270 }
1271
1272
1273 FUNCTION {proceedings}
1274 { output.bibitem
1275 editor empty$
1276 { organization output }
1277 { format.editors output.nonnull }
1278 if$
1279 new.block
1280 format.btitle "title" output.check
1281 format.bvolume output
1282 format.number.series output
1283 address empty$
1284 { editor empty$
1285 { publisher new.sentence.checka }
1286 { organization publisher new.sentence.checkb
1287 organization output
1288 }
1289 if$
1290 publisher "publisher" output.check %%% <- new check for missing
1291 format.date "year" output.check
1292 }
1293 { new.sentence
1294 editor empty$
1295 'skip$
1296 { organization output }
1297 if$
1298 publisher "publisher" output.check
1299 address output.nonnull
1300 format.date "year" output.check
1301 }
1302 if$
1303
1304 format.isbn output
1305
1306
1307 format.issn output
1308
1309
1310 format.lccn output
1311
1312
1313 format.price output
1314
1315
1316 format.url output
1317
1318 new.block
1319 note output
1320 fin.entry
1321 }
1322
1323
1324 FUNCTION {techreport}
1325 { output.bibitem
1326 format.authors "author" output.check
1327 new.block
1328 format.title "title" output.check
1329 new.block
1330 format.tr.number output.nonnull
1331 institution "institution" output.check
1332 address output
1333 format.date "year" output.check
1334
1335 format.book.pages output
1336
1337
1338 format.price output
1339
1340
1341 format.url output
1342
1343 new.block
1344 note output
1345 fin.entry
1346 }
1347
1348
1349 FUNCTION {unpublished}
1350 { output.bibitem
1351 format.authors "author" output.check
1352 new.block
1353 format.title "title" output.check
1354 new.block
1355 note "note" output.check
1356 format.date output
1357
1358 format.url output
1359
1360 fin.entry
1361 }
1362
1363
1364 FUNCTION {default.type} { misc }
1365
1366
1367
1368
1369 MACRO {jan} {"January"}
1370
1371 MACRO {feb} {"February"}
1372
1373 MACRO {mar} {"March"}
1374
1375 MACRO {apr} {"April"}
1376
1377 MACRO {may} {"May"}
1378
1379 MACRO {jun} {"June"}
1380
1381 MACRO {jul} {"July"}
1382
1383 MACRO {aug} {"August"}
1384
1385 MACRO {sep} {"September"}
1386
1387 MACRO {oct} {"October"}
1388
1389 MACRO {nov} {"November"}
1390
1391 MACRO {dec} {"December"}
1392
1393
1394
1395
1396
1397
1398 MACRO {acmcs} {"ACM Computing Surveys"}
1399
1400 MACRO {acta} {"Acta Informatica"}
1401
1402 MACRO {cacm} {"Communications of the ACM"}
1403
1404 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
1405
1406 MACRO {ibmsj} {"IBM Systems Journal"}
1407
1408 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
1409
1410 MACRO {ieeetc} {"IEEE Transactions on Computers"}
1411
1412 MACRO {ieeetcad}
1413 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
1414
1415 MACRO {ipl} {"Information Processing Letters"}
1416
1417 MACRO {jacm} {"Journal of the ACM"}
1418
1419 MACRO {jcss} {"Journal of Computer and System Sciences"}
1420
1421 MACRO {scp} {"Science of Computer Programming"}
1422
1423 MACRO {sicomp} {"SIAM Journal on Computing"}
1424
1425 MACRO {tocs} {"ACM Transactions on Computer Systems"}
1426
1427 MACRO {tods} {"ACM Transactions on Database Systems"}
1428
1429 MACRO {tog} {"ACM Transactions on Graphics"}
1430
1431 MACRO {toms} {"ACM Transactions on Mathematical Software"}
1432
1433 MACRO {toois} {"ACM Transactions on Office Information Systems"}
1434
1435 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
1436
1437 MACRO {tcs} {"Theoretical Computer Science"}
1438
1439
1440
1441
1442 READ
1443
1444
1445
1446
1447 FUNCTION {sortify}
1448 { purify$
1449 "l" change.case$
1450 }
1451
1452 INTEGERS { len }
1453
1454 FUNCTION {chop.word}
1455 { 's :=
1456 'len :=
1457 s #1 len substring$ =
1458 { s len #1 + global.max$ substring$ }
1459 's
1460 if$
1461 }
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471 FUNCTION {sort.format.names}
1472 { 's :=
1473 #1 'nameptr :=
1474 ""
1475 s num.names$ 'numnames :=
1476 numnames 'namesleft :=
1477 { namesleft #0 > }
1478 { nameptr #1 >
1479 { " " * }
1480 'skip$
1481 if$
1482
1483 s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
1484
1485 nameptr numnames = t "others" = and
1486 { "et al" * }
1487 { t sortify * }
1488 if$
1489 nameptr #1 + 'nameptr :=
1490 namesleft #1 - 'namesleft :=
1491 }
1492 while$
1493 }
1494
1495
1496 FUNCTION {sort.format.title}
1497 { 't :=
1498 "A " #2
1499 "An " #3
1500 "The " #4 t chop.word
1501 chop.word
1502 chop.word
1503 sortify
1504 #1 global.max$ substring$
1505 }
1506
1507
1508 FUNCTION {author.sort}
1509 { author empty$
1510 { key empty$
1511 { "to sort, need author or key in " cite$ * warning$
1512 ""
1513 }
1514 { key sortify }
1515 if$
1516 }
1517 { author sort.format.names }
1518 if$
1519 }
1520
1521 FUNCTION {author.editor.sort}
1522 { author empty$
1523 { editor empty$
1524 { key empty$
1525 { "to sort, need author, editor, or key in " cite$ * warning$
1526 ""
1527 }
1528 { key sortify }
1529 if$
1530 }
1531 { editor sort.format.names }
1532 if$
1533 }
1534 { author sort.format.names }
1535 if$
1536 }
1537
1538 FUNCTION {author.organization.sort}
1539 { author empty$
1540 { organization empty$
1541 { key empty$
1542 { "to sort, need author, organization, or key in " cite$ * warning$
1543 ""
1544 }
1545 { key sortify }
1546 if$
1547 }
1548 { "The " #4 organization chop.word sortify }
1549 if$
1550 }
1551 { author sort.format.names }
1552 if$
1553 }
1554
1555 FUNCTION {editor.organization.sort}
1556 { editor empty$
1557 { organization empty$
1558 { key empty$
1559 { "to sort, need editor, organization, or key in " cite$ * warning$
1560 ""
1561 }
1562 { key sortify }
1563 if$
1564 }
1565 { "The " #4 organization chop.word sortify }
1566 if$
1567 }
1568 { editor sort.format.names }
1569 if$
1570 }
1571
1572
1573 FUNCTION {presort}
1574
1575 { type$ "book" =
1576
1577 type$ "inbook" =
1578 or
1579 'author.editor.sort
1580 { type$ "proceedings" =
1581 'editor.organization.sort
1582 { type$ "manual" =
1583 'author.organization.sort
1584 'author.sort
1585 if$
1586 }
1587 if$
1588 }
1589 if$
1590
1591 " "
1592 *
1593 year field.or.null sortify
1594 *
1595 " "
1596 *
1597 title field.or.null
1598 sort.format.title
1599 *
1600 #1 entry.max$ substring$
1601 'sort.key$ :=
1602 }
1603
1604 ITERATE {presort}
1605
1606
1607 SORT
1608
1609
1610
1611
1612
1613
1614
1615 STRINGS { longest.label }
1616
1617 INTEGERS { number.label longest.label.width }
1618
1619 FUNCTION {initialize.longest.label}
1620 { "" 'longest.label :=
1621 #1 'number.label :=
1622 #0 'longest.label.width :=
1623 }
1624
1625 FUNCTION {longest.label.pass}
1626 { number.label int.to.str$ 'label :=
1627 number.label #1 + 'number.label :=
1628 label width$ longest.label.width >
1629 { label 'longest.label :=
1630 label width$ 'longest.label.width :=
1631 }
1632 'skip$
1633 if$
1634 }
1635
1636 EXECUTE {initialize.longest.label}
1637
1638 ITERATE {longest.label.pass}
1639
1640
1641
1642
1643 FUNCTION {begin.bib}
1644
1645 { preamble$ empty$
1646
1647 'skip$
1648 { preamble$ write$ newline$ }
1649 if$
1650 "\begin{thebibliography}{" longest.label * "}" * write$ newline$
1651 }
1652
1653 EXECUTE {begin.bib}
1654
1655 EXECUTE {init.state.consts}
1656
1657
1658 ITERATE {call.type$}
1659
1660
1661 FUNCTION {end.bib}
1662 { newline$
1663 "\end{thebibliography}" write$ newline$
1664 }
1665
1666 EXECUTE {end.bib}