Debian Codegraph @

texmf-dist/bibtex/bst/upmethodology/upmplainnat.bst

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