Debian Codegraph @

texmf-dist/bibtex/bst/pnas2009/pnas2009.bst

raw
1 %%% ====================================================================
2 %%% @BibTeX-style-file{
3 %%% author = "Russell Standish"
4 %%% }
5 %%% ====================================================================
6 % This is "pnas2009.bst", adapted from "pnas.bst", modified from "unsrt.bst"
7 % BibTeX standard bibliography style `unsrt'
8 % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
9 % Copyright (C) 1985, all rights reserved.
10 % Copying of this file is authorized only if either
11 % (1) you make absolutely no changes to your copy, including name, or
12 % (2) if you do make changes, you name it something other than
13 % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
14 % This restriction helps ensure that all standard styles are identical.
15 % The file btxbst.doc has the documentation for this style.
16
17 ENTRY
18 { address
19 author
20 booktitle
21 chapter
22 edition
23 editor
24 howpublished
25 institution
26 journal
27 key
28 month
29 note
30 number
31 organization
32 pages
33 publisher
34 school
35 series
36 title
37 type
38 volume
39 year
40 }
41 {}
42 { label }
43
44 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
45
46 FUNCTION {init.state.consts}
47 { #0 'before.all :=
48 #1 'mid.sentence :=
49 #2 'after.sentence :=
50 #3 'after.block :=
51 }
52
53 STRINGS { s t }
54
55 FUNCTION {output.nonnull}
56 { 's :=
57 output.state mid.sentence =
58 % { ", " * write$ }
59 { " " * write$ }
60 { output.state after.block =
61 { add.period$ write$
62 newline$
63 "\newblock " write$
64 }
65 { output.state before.all =
66 'write$
67 % { add.period$ " " * write$ }
68 { ", " * write$ }
69 if$
70 }
71 if$
72 mid.sentence 'output.state :=
73 }
74 if$
75 s
76 }
77
78 FUNCTION {output}
79 { duplicate$ empty$
80 'pop$
81 'output.nonnull
82 if$
83 }
84
85 FUNCTION {output.check}
86 { 't :=
87 duplicate$ empty$
88 { pop$ "empty " t * " in " * cite$ * warning$ }
89 'output.nonnull
90 if$
91 }
92
93 FUNCTION {output.bibitem}
94 { newline$
95 "\bibitem{" write$
96 cite$ write$
97 "}" write$
98 newline$
99 ""
100 before.all 'output.state :=
101 }
102
103 FUNCTION {fin.entry}
104 { add.period$
105 write$
106 newline$
107 }
108
109 FUNCTION {new.block}
110 { output.state before.all =
111 'skip$
112 { after.block 'output.state := }
113 if$
114 }
115
116 FUNCTION {new.sentence}
117 { output.state after.block =
118 'skip$
119 { output.state before.all =
120 'skip$
121 { after.sentence 'output.state := }
122 if$
123 }
124 if$
125 }
126
127 FUNCTION {not}
128 { { #0 }
129 { #1 }
130 if$
131 }
132
133 FUNCTION {and}
134 { 'skip$
135 { pop$ #0 }
136 if$
137 }
138
139 FUNCTION {or}
140 { { pop$ #1 }
141 'skip$
142 if$
143 }
144
145 FUNCTION {new.block.checka}
146 { empty$
147 'skip$
148 'new.block
149 if$
150 }
151
152 FUNCTION {new.block.checkb}
153 { empty$
154 swap$ empty$
155 and
156 'skip$
157 'new.block
158 if$
159 }
160
161 FUNCTION {new.sentence.checka}
162 { empty$
163 'skip$
164 'new.sentence
165 if$
166 }
167
168 FUNCTION {new.sentence.checkb}
169 { empty$
170 swap$ empty$
171 and
172 'skip$
173 'new.sentence
174 if$
175 }
176
177 FUNCTION {field.or.null}
178 { duplicate$ empty$
179 { pop$ "" }
180 'skip$
181 if$
182 }
183
184 FUNCTION {emphasize}
185 { duplicate$ empty$
186 { pop$ "" }
187 { "{\em " swap$ * "}" * }
188 if$
189 }
190
191 FUNCTION {parenthesize}
192 { duplicate$ empty$
193 { pop$ "" }
194 { "(" swap$ * ")" * }
195 if$
196 }
197
198 FUNCTION {boldface}
199 { duplicate$ empty$
200 { pop$ "" }
201 { "{\bf " swap$ * "}" * }
202 if$
203 }
204
205 INTEGERS { nameptr namesleft numnames }
206
207 FUNCTION {format.names}
208 { 's :=
209 #1 'nameptr :=
210 s num.names$ 'numnames :=
211 numnames 'namesleft :=
212 { namesleft #0 > }
213 { s nameptr "{vv~}{ll}{, jj}{, f}" format.name$ 't :=
214 nameptr #1 >
215 { namesleft #1 >
216 { ", " * t * }
217 { numnames #2 >
218 { ", " * }
219 'skip$
220 if$
221 t "others" =
222 { " et~al." * }
223 { " \& " * t * }
224 if$
225 }
226 if$
227 }
228 't
229 if$
230 nameptr #1 + 'nameptr :=
231 namesleft #1 - 'namesleft :=
232 }
233 while$
234 }
235
236 FUNCTION {format.publisher}
237 { publisher empty$
238 { address empty$
239 { "" }
240 { address }
241 if$
242 }
243 { address empty$
244 { publisher}
245 { publisher ", " * address * }
246 if$
247 }
248 if$
249 }
250
251 FUNCTION {format.editors.as.authors}
252 { editor empty$
253 { organization }
254 { editor format.names
255 editor num.names$ #1 >
256 { ", eds." * }
257 { ", ed." * }
258 if$
259 }
260 if$
261 }
262
263 FUNCTION {format.authors}
264 { author empty$
265 { editor empty$
266 { "" }
267 { editor format.names
268 editor num.names$ #1 >
269 { ", eds." * }
270 { ", ed." * }
271 if$
272 }
273 if$
274 }
275 { author format.names }
276 if$
277 }
278
279 FUNCTION {format.editors}
280 { editor empty$
281 { "" }
282 { author empty$ %in this case, see format.authors
283 { "" }
284 { editor num.names$ #1 >
285 { "eds.{} " }
286 { "ed.{} " }
287 if$
288 editor format.names *
289 }
290 if$
291 }
292 if$
293 }
294
295 FUNCTION {format.title}
296 { title "t" change.case$
297 }
298
299 FUNCTION {n.dashify}
300 { 't :=
301 ""
302 { t empty$ not }
303 { t #1 #1 substring$ "-" =
304 { t #1 #2 substring$ "--" = not
305 { "--" *
306 t #2 global.max$ substring$ 't :=
307 }
308 { { t #1 #1 substring$ "-" = }
309 { "-" *
310 t #2 global.max$ substring$ 't :=
311 }
312 while$
313 }
314 if$
315 }
316 { t #1 #1 substring$ *
317 t #2 global.max$ substring$ 't :=
318 }
319 if$
320 }
321 while$
322 }
323
324 FUNCTION {format.date}
325 { year empty$
326 { "year?" parenthesize }
327 { year parenthesize }
328 if$
329 }
330
331 FUNCTION {format.btitle.series}
332 { title empty$
333 { "" }
334 { title emphasize }
335 if$
336 series empty$
337 { "" * }
338 { ", " * series * }
339 if$
340 }
341
342 FUNCTION {tie.or.space.connect}
343 { duplicate$ text.length$ #3 <
344 { "~" }
345 { " " }
346 if$
347 swap$ * *
348 }
349
350 FUNCTION {comma.connect}
351 { duplicate$ empty$
352 { pop$ }
353 { swap$
354 duplicate$ empty$
355 { pop$ }
356 { swap$ ", " swap$ * * }
357 if$
358 }
359 if$
360 }
361
362 FUNCTION {either.or.check}
363 { empty$
364 'pop$
365 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
366 if$
367 }
368
369 FUNCTION {format.bvolume.number}
370 { volume empty$
371 { number empty$
372 { "" }
373 { "No.{}" number tie.or.space.connect }
374 if$
375 }
376 { "Vol.{}" volume tie.or.space.connect
377 "volume and number" number either.or.check
378 }
379 if$
380 }
381
382 FUNCTION {format.number}
383 { volume empty$
384 { number empty$
385 { "" }
386 { "No.{}" number tie.or.space.connect }
387 if$
388 }
389 { "" }
390 if$
391 }
392
393 FUNCTION {format.edition}
394 { edition empty$
395 { "" }
396 { output.state mid.sentence =
397 { edition "l" change.case$ " edition" * }
398 { edition "t" change.case$ " edition" * }
399 if$
400 }
401 if$
402 }
403
404 INTEGERS { multiresult }
405
406 FUNCTION {multi.page.check}
407 { 't :=
408 #0 'multiresult :=
409 { multiresult not
410 t empty$ not
411 and
412 }
413 { t #1 #1 substring$
414 duplicate$ "-" =
415 swap$ duplicate$ "," =
416 swap$ "+" =
417 or or
418 { #1 'multiresult := }
419 { t #2 global.max$ substring$ 't := }
420 if$
421 }
422 while$
423 multiresult
424 }
425
426 FUNCTION {format.pages}
427 { pages empty$
428 { "" }
429 { pages multi.page.check
430 { "pp." pages n.dashify tie.or.space.connect }
431 { "p." pages tie.or.space.connect }
432 if$
433 }
434 if$
435 }
436
437 FUNCTION {format.vol.num.pages}
438 { volume boldface
439 pages empty$
440 'skip$
441 { duplicate$ empty$
442 { pop$ format.pages }
443 { ", " * pages n.dashify * }
444 if$
445 }
446 if$
447 }
448
449 FUNCTION {format.chapter.pages}
450 { chapter empty$
451 'format.pages
452 { type empty$
453 { "chapter" }
454 { type "l" change.case$ }
455 if$
456 chapter tie.or.space.connect
457 pages empty$
458 'skip$
459 { ", " * format.pages * }
460 if$
461 }
462 if$
463 }
464
465 FUNCTION {format.in.ed.booktitle}
466 { booktitle empty$
467 { "" }
468 { "in " booktitle emphasize * }
469 if$
470 series empty$
471 { "" * }
472 { booktitle empty$
473 { "XXmissing booktitle \& seriesXX" * }
474 { ", " * }
475 if$
476 series *
477 }
478 if$
479 }
480
481 FUNCTION {empty.misc.check}
482 { author empty$ title empty$ howpublished empty$
483 month empty$ year empty$ note empty$
484 and and and and and
485 { "all relevant fields are empty in " cite$ * warning$ }
486 'skip$
487 if$
488 }
489
490 FUNCTION {format.thesis.type}
491 { type empty$
492 'skip$
493 { pop$
494 type "t" change.case$
495 }
496 if$
497 }
498
499 FUNCTION {format.tr.number}
500 { type empty$
501 { "Technical Report" }
502 'type
503 if$
504 number empty$
505 { "t" change.case$ }
506 { number tie.or.space.connect }
507 if$
508 }
509
510 FUNCTION {format.article.crossref}
511 { key empty$
512 { journal empty$
513 { "need key or journal for " cite$ * " to crossref " * crossref *
514 warning$
515 ""
516 }
517 { "In {\em " journal * "\/}" * }
518 if$
519 }
520 { "In " key * }
521 if$
522 " \cite{" * crossref * "}" *
523 }
524
525 FUNCTION {format.crossref.editor}
526 { editor #1 "{vv~}{ll}" format.name$
527 editor num.names$ duplicate$
528 #2 >
529 { pop$ " et~al." * }
530 { #2 <
531 'skip$
532 { editor #2 "{vv }{ll}{ jj}{, f}" format.name$ "others" =
533 { " et~al." * }
534 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
535 if$
536 }
537 if$
538 }
539 if$
540 }
541
542 FUNCTION {format.book.crossref}
543 { volume empty$
544 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
545 "In "
546 }
547 { "Vol.{}" volume tie.or.space.connect
548 " of " *
549 }
550 if$
551 editor empty$
552 editor field.or.null author field.or.null =
553 or
554 { key empty$
555 { series empty$
556 { "need editor, key, or series for " cite$ * " to crossref " *
557 crossref * warning$
558 "" *
559 }
560 { "{\em " * series * "\/}" * }
561 if$
562 }
563 { key * }
564 if$
565 }
566 { format.crossref.editor * }
567 if$
568 " \cite{" * crossref * "}" *
569 }
570
571 FUNCTION {format.incoll.inproc.crossref}
572 { editor empty$
573 editor field.or.null author field.or.null =
574 or
575 { key empty$
576 { booktitle empty$
577 { "need editor, key, or booktitle for " cite$ * " to crossref " *
578 crossref * warning$
579 ""
580 }
581 { "in {\em " booktitle * "\/}" * }
582 if$
583 }
584 { "in " key * }
585 if$
586 }
587 { "in " format.crossref.editor * }
588 if$
589 " \cite{" * crossref * "}" *
590 }
591
592 FUNCTION {article}
593 { output.bibitem
594 format.authors "author" output.check
595 new.block
596 format.date "year" output.check
597 format.title "title" output.check
598 new.block
599 crossref missing$
600 { journal emphasize "journal" output.check
601 format.vol.num.pages output
602 }
603 { format.article.crossref output.nonnull
604 format.pages output
605 }
606 if$
607 new.block
608 note output
609 fin.entry
610 }
611
612 FUNCTION {book}
613 { output.bibitem
614 format.authors output.nonnull
615 crossref missing$
616 { "author and editor" editor either.or.check }
617 'skip$
618 if$
619 new.block
620 format.date "year" output.check
621 format.btitle.series "title" output.check
622 crossref missing$
623 { format.editors output
624 new.block
625 format.publisher parenthesize output
626 format.bvolume.number output
627 new.sentence
628 }
629 { new.block
630 format.book.crossref output.nonnull
631 }
632 if$
633 format.edition output
634 new.sentence
635 format.pages output
636 new.block
637 note output
638 fin.entry
639 }
640
641 FUNCTION {booklet}
642 { output.bibitem
643 format.authors output
644 new.block
645 format.date output
646 format.title "title" output.check
647 howpublished address comma.connect parenthesize output
648 new.block
649 note output
650 fin.entry
651 }
652
653 FUNCTION {inbook}
654 { output.bibitem
655 format.authors output.nonnull
656 new.block
657 format.date "year" output.check
658 format.btitle.series "title" output.check
659 new.sentence
660 crossref missing$
661 { format.editors output
662 new.block
663 format.publisher parenthesize output
664 format.bvolume.number output
665 new.sentence
666 }
667 { format.chapter.pages "chapter and pages" output.check
668 new.block
669 format.book.crossref output.nonnull
670 }
671 if$
672 format.edition output
673 new.sentence
674 format.pages output
675 new.block
676 note output
677 fin.entry
678 }
679
680 FUNCTION {incollection}
681 { output.bibitem
682 format.authors "author" output.check
683 new.block
684 format.date "year" output.check
685 format.in.ed.booktitle "title" output.check
686 new.sentence
687 crossref missing$
688 { format.editors output
689 new.block
690 format.publisher parenthesize output
691 format.bvolume.number output
692 new.sentence
693 }
694 { format.incoll.inproc.crossref output.nonnull
695 format.chapter.pages output
696 }
697 if$
698 format.edition output
699 new.sentence
700 format.pages output
701 new.block
702 note output
703 fin.entry
704 }
705
706 FUNCTION {inproceedings}
707 { output.bibitem
708 format.authors "author" output.check
709 new.block
710 format.date "year" output.check
711 crossref missing$
712 { format.btitle.series "title" output.check
713 format.editors output
714 new.block
715 organization publisher comma.connect
716 address comma.connect
717 parenthesize output
718 new.sentence
719 format.bvolume.number output
720 new.sentence
721 }
722 { format.incoll.inproc.crossref output.nonnull
723 }
724 if$
725 format.pages output
726 new.block
727 note output
728 fin.entry
729 }
730
731 FUNCTION {conference} { inproceedings }
732
733 FUNCTION {manual}
734 { output.bibitem
735 author empty$
736 { organization empty$
737 'skip$
738 { organization output.nonnull }
739 if$
740 }
741 { format.authors output.nonnull }
742 if$
743 new.block
744 format.date "year" output.check
745 format.btitle.series "title" output.check
746 author empty$
747 { "" }
748 { organization }
749 if$
750 publisher comma.connect address comma.connect parenthesize output
751 new.sentence
752 format.edition output
753 new.block
754 note output
755 fin.entry
756 }
757
758 FUNCTION {mastersthesis}
759 { output.bibitem
760 format.authors "author" output.check
761 new.block
762 format.date "year" output.check
763 "Master's thesis" format.thesis.type output.nonnull
764 school address comma.connect parenthesize output
765 new.block
766 note output
767 fin.entry
768 }
769
770 FUNCTION {misc}
771 { output.bibitem
772 format.authors output
773 new.block
774 format.date output
775 format.title output
776 howpublished parenthesize output
777 new.block
778 note output
779 fin.entry
780 empty.misc.check
781 }
782
783 FUNCTION {phdthesis}
784 { output.bibitem
785 format.authors "author" output.check
786 new.block
787 format.date "year" output.check
788 "Ph.D. thesis" format.thesis.type output.nonnull
789 school address comma.connect parenthesize output
790 new.block
791 note output
792 fin.entry
793 }
794
795 FUNCTION {proceedings}
796 { output.bibitem
797 format.editors.as.authors output
798 new.block
799 format.date output
800 format.btitle.series "title" output.check
801 organization publisher comma.connect
802 address comma.connect parenthesize output
803 format.bvolume.number output
804 new.sentence
805 format.pages output
806 new.block
807 note output
808 fin.entry
809 }
810
811 FUNCTION {techreport}
812 { output.bibitem
813 format.authors "author" output.check
814 new.block
815 format.date output
816 format.title "title" output.check
817 new.sentence
818 institution address comma.connect parenthesize output
819 new.sentence
820 format.tr.number output.nonnull
821 new.block
822 note output
823 fin.entry
824 }
825
826 FUNCTION {unpublished}
827 { output.bibitem
828 format.authors "author" output.check
829 new.block
830 format.date output
831 format.title "title" output.check
832 new.block
833 note "note" output.check
834 fin.entry
835 }
836
837 FUNCTION {default.type} { misc }
838
839 MACRO {jan} {"January"}
840
841 MACRO {feb} {"February"}
842
843 MACRO {mar} {"March"}
844
845 MACRO {apr} {"April"}
846
847 MACRO {may} {"May"}
848
849 MACRO {jun} {"June"}
850
851 MACRO {jul} {"July"}
852
853 MACRO {aug} {"August"}
854
855 MACRO {sep} {"September"}
856
857 MACRO {oct} {"October"}
858
859 MACRO {nov} {"November"}
860
861 MACRO {dec} {"December"}
862
863 MACRO {acmcs} {"ACM Computing Surveys"}
864
865 MACRO {acta} {"Acta Informatica"}
866
867 MACRO {cacm} {"Communications of the ACM"}
868
869 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
870
871 MACRO {ibmsj} {"IBM Systems Journal"}
872
873 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
874
875 MACRO {ieeetc} {"IEEE Transactions on Computers"}
876
877 MACRO {ieeetcad}
878 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
879
880 MACRO {ipl} {"Information Processing Letters"}
881
882 MACRO {jacm} {"Journal of the ACM"}
883
884 MACRO {jcss} {"Journal of Computer and System Sciences"}
885
886 MACRO {scp} {"Science of Computer Programming"}
887
888 MACRO {sicomp} {"SIAM Journal on Computing"}
889
890 MACRO {tocs} {"ACM Transactions on Computer Systems"}
891
892 MACRO {tods} {"ACM Transactions on Database Systems"}
893
894 MACRO {tog} {"ACM Transactions on Graphics"}
895
896 MACRO {toms} {"ACM Transactions on Mathematical Software"}
897
898 MACRO {toois} {"ACM Transactions on Office Information Systems"}
899
900 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
901
902 MACRO {tcs} {"Theoretical Computer Science"}
903
904 READ
905
906 STRINGS { longest.label }
907
908 INTEGERS { number.label longest.label.width }
909
910 FUNCTION {initialize.longest.label}
911 { "" 'longest.label :=
912 #1 'number.label :=
913 #0 'longest.label.width :=
914 }
915
916 FUNCTION {longest.label.pass}
917 { number.label int.to.str$ 'label :=
918 number.label #1 + 'number.label :=
919 label width$ longest.label.width >
920 { label 'longest.label :=
921 label width$ 'longest.label.width :=
922 }
923 'skip$
924 if$
925 }
926
927 EXECUTE {initialize.longest.label}
928
929 ITERATE {longest.label.pass}
930
931 FUNCTION {begin.bib}
932 { preamble$ empty$
933 'skip$
934 { preamble$ write$ newline$ }
935 if$
936 "\begin{thebibliography}{" longest.label * "}" * write$ newline$
937 }
938
939 EXECUTE {begin.bib}
940
941 EXECUTE {init.state.consts}
942
943 ITERATE {call.type$}
944
945 FUNCTION {end.bib}
946 { newline$
947 "\end{thebibliography}" write$ newline$
948 }
949
950 EXECUTE {end.bib}