Debian Codegraph @

texmf-dist/bibtex/bst/aomart/aomplain.bst

raw
1 %%%
2 %%% This is aomplain.bst file, based on amsplain.bst by AMS
3 %%% to support Annals of Mathematics specific fields.
4 %%%
5 % Copyright 2010-2017, The Annals of Mathematics.
6 % This work may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either
8 % version 1.3 of this license or (at your option) any
9 % later version.
10 % The latest version of the license is in
11 % http://www.latex-project.org/lppl.txt
12 % and version 1.3 or later is part of all distributions of
13 % LaTeX version 2005/12/01 or later.
14 %
15 % This work has the LPPL maintenance status `maintained'.
16 %
17 % The Current Maintainer of this work is Boris Veytsman,
18 % <[email protected]>
19 %
20 % This work consists of the file aomart.dtx, the
21 % derived file aomart.cls, and the files aomplain.bst and aomalpha.bst
22 %
23 %
24 %%%
25
26
27 % This defines the types of fields that can occur in a database entry
28 % for this particular bibliography style. Except for `language',
29 % this is the standard list from plain.bst.
30
31 %% Types of entries currently allowed in a BibTeX file:
32 %%
33 %% ARTICLE -- An article from a journal or magazine.
34 %%
35 %% BOOK -- A book with an explicit publisher.
36 %%
37 %% BOOKLET -- A work that is printed and bound,
38 %% but without a named publisher or sponsoring institution.
39 %%
40 %% CONFERENCE -- The same as INPROCEEDINGS,
41 %% included for Scribe compatibility.
42 %%
43 %% INBOOK -- A part of a book,
44 %% which may be a chapter (or section or whatever) and/or a range of pages.
45 %%
46 %% INCOLLECTION -- A part of a book having its own title.
47 %%
48 %% INPROCEEDINGS -- An article in a conference proceedings.
49 %%
50 %% MANUAL -- Technical documentation.
51 %%
52 %% MASTERSTHESIS -- A Master's thesis.
53 %%
54 %% MISC -- Use this type when nothing else fits.
55 %%
56 %% PHDTHESIS -- A PhD thesis.
57 %%
58 %% PROCEEDINGS -- The proceedings of a conference.
59 %%
60 %% TECHREPORT -- A report published by a school or other institution,
61 %% usually numbered within a series.
62 %%
63 %% UNPUBLISHED -- A document having an author and title, but not formally
64 %% published.
65
66 ENTRY
67 {
68 address
69 arxiv
70 author
71 booktitle
72 chapter
73 doi
74 edition
75 editor
76 howpublished
77 institution
78 issue
79 jfmnumber
80 journal
81 key
82 language
83 month
84 mrnumber
85 note
86 number
87 organization
88 pages
89 publisher
90 school
91 series
92 sortyear
93 title
94 type
95 url
96 venue
97 volume
98 year
99 zblnumber
100 titlenote
101 totalpages
102 pagetotal
103 }
104 {}
105 { label bysame }
106
107 % Removed after.sentence, after.block---not needed.
108
109 INTEGERS { output.state before.all mid.sentence }
110
111 FUNCTION {init.state.consts}
112 { #0 'before.all :=
113 #1 'mid.sentence :=
114 }
115
116 % Scratch variables:
117
118 STRINGS { s t }
119
120 % Utility functions
121
122 FUNCTION {shows}
123 { duplicate$ ":::: `" swap$ * "'" * top$
124 }
125
126 FUNCTION {showstack}
127 {"STACK====================================================================="
128 top$
129 stack$
130 "ENDSTACK=================================================================="
131 top$
132 }
133
134 FUNCTION {not}
135 { { #0 }
136 { #1 }
137 if$
138 }
139
140 FUNCTION {and}
141 { 'skip$
142 { pop$ #0 }
143 if$
144 }
145
146 FUNCTION {or}
147 { { pop$ #1 }
148 'skip$
149 if$
150 }
151
152 FUNCTION {field.or.null}
153 { duplicate$ empty$
154 { pop$ "" }
155 'skip$
156 if$
157 }
158
159 FUNCTION {emphasize}
160 { duplicate$ empty$
161 { pop$ "" }
162 { "\emph{" swap$ * "}" * }
163 if$
164 }
165
166 % n.dashify is used to make sure page ranges get the TeX code
167 % (two hyphens) for en-dashes.
168
169 FUNCTION {n.dashify}
170 { 't :=
171 ""
172 { t empty$ not }
173 { t #1 #1 substring$ "-" =
174 { t #1 #2 substring$ "--" = not
175 { "--" *
176 t #2 global.max$ substring$ 't :=
177 }
178 { { t #1 #1 substring$ "-" = }
179 { "-" *
180 t #2 global.max$ substring$ 't :=
181 }
182 while$
183 }
184 if$
185 }
186 { t #1 #1 substring$ *
187 t #2 global.max$ substring$ 't :=
188 }
189 if$
190 }
191 while$
192 }
193
194 % tie.or.space.connect connects two items with a ~ if the
195 % second item is less than 3 letters long, otherwise it just puts an
196 % ordinary space.
197
198 FUNCTION {tie.or.space.connect}
199 { duplicate$ text.length$ #3 <
200 { "~" }
201 { " " }
202 if$
203 swap$ * *
204 }
205
206 FUNCTION {add.space.if.necessary}
207 { duplicate$ "" =
208 'skip$
209 { " " * }
210 if$
211 }
212
213 % either.or.check gives a warning if two mutually exclusive fields
214 % were used in the database.
215
216 FUNCTION {either.or.check}
217 { empty$
218 'pop$
219 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
220 if$
221 }
222
223 % output.nonnull is called by output.
224
225 FUNCTION {output.nonnull}
226 % remove the top item from the stack because it's in the way.
227 { 's :=
228 output.state mid.sentence =
229 % If we're in mid-sentence, add a comma to the new top item and write it
230 { ", " * write$ }
231 % Otherwise, if we're at the beginning of a bibitem,
232 { output.state before.all =
233 % just write out the top item from the stack;
234 'write$
235 % and the last alternative is that we're at the end of the current
236 % bibitem, so we add a period to the top stack item and write it out.
237 { add.period$ " " * write$ }
238 if$
239 mid.sentence 'output.state :=
240 }
241 if$
242 % Put the top item back on the stack that we removed earlier.
243 s
244 }
245
246 % Output checks to see if the stack top is empty; if not, it
247 % calls output.nonnull to write it out.
248
249 FUNCTION {output}
250 { duplicate$ empty$
251 'pop$
252 'output.nonnull
253 if$
254 }
255
256 % Standard warning message for a missing or empty field. For the user
257 % we call any such field `missing' without respect to the distinction
258 % made by BibTeX between missing and empty.
259
260 FUNCTION {missing.warning}
261 { "missing " swap$ * " in " * cite$ * warning$ }
262
263 % Output.check is like output except that it gives a warning on-screen
264 % if the given field in the database entry is empty. t is the field
265 % name.
266
267 FUNCTION {output.check}
268 { 't :=
269 duplicate$ empty$
270 { pop$ t missing.warning }
271 'output.nonnull
272 if$
273 }
274
275 FUNCTION {output.bibitem}
276 { newline$
277 "\bibitem{" write$
278 cite$ write$
279 "}" write$
280 newline$
281 % This empty string is the first thing that will be written
282 % the next time write$ is called. Done this way because each
283 % item is saved on the stack until we find out what punctuation
284 % should be added after it. Therefore we need an empty first item.
285 ""
286 before.all 'output.state :=
287 }
288
289 FUNCTION {output.nonempty.mrnumber}
290 { duplicate$ missing$
291 { pop$ "" }
292 'skip$
293 if$
294 duplicate$ empty$
295 'pop$
296 { " \mr{" swap$ * "}. " * write$ }
297 if$
298 }
299
300
301 FUNCTION {output.nonempty.zblnumber}
302 { duplicate$ missing$
303 { pop$ "" }
304 'skip$
305 if$
306 duplicate$ empty$
307 'pop$
308 { " \zbl{" swap$ * "}. " * write$ }
309 if$
310 }
311
312 FUNCTION {output.nonempty.jfmnumber}
313 { duplicate$ missing$
314 { pop$ "" }
315 'skip$
316 if$
317 duplicate$ empty$
318 'pop$
319 { " \jfm{" swap$ * "}. " * write$ }
320 if$
321 }
322
323
324 FUNCTION {output.nonempty.arxiv}
325 { duplicate$ missing$
326 { pop$ "" }
327 'skip$
328 if$
329 duplicate$ empty$
330 'pop$
331 { " \arxiv{" swap$ * "}. " * write$ }
332 if$
333 }
334
335 FUNCTION {output.nonempty.doi}
336 { duplicate$ missing$
337 { pop$ "" }
338 'skip$
339 if$
340 duplicate$ empty$
341 'pop$
342 { " \doi{" swap$ * "}. " * write$ }
343 if$
344 }
345
346
347 FUNCTION {output.nonempty.url}
348 { duplicate$ missing$
349 { pop$ "" }
350 'skip$
351 if$
352 duplicate$ empty$
353 'pop$
354 { " Available at \url{" swap$ * "}. " * write$ }
355 if$
356 }
357
358
359 FUNCTION {fin.entry}
360 { add.period$
361 write$
362 mrnumber output.nonempty.mrnumber
363 zblnumber output.nonempty.zblnumber
364 jfmnumber output.nonempty.jfmnumber
365 arxiv output.nonempty.arxiv
366 doi output.nonempty.doi
367 doi empty$
368 { url output.nonempty.url }
369 { doi missing$
370 { url output.nonempty.url }
371 'skip$
372 if$}
373 if$
374 newline$
375 }
376
377
378 FUNCTION {fin.entry.misc}
379 { add.period$
380 write$
381 arxiv output.nonempty.arxiv
382 doi output.nonempty.doi
383 doi empty$
384 { url output.nonempty.url }
385 { doi missing$
386 { url output.nonempty.url }
387 'skip$
388 if$}
389 if$
390 newline$
391 }
392
393 % Removed new.block, new.block.checka, new.block.checkb, new.sentence,
394 % new.sentence.checka, and new.sentence.checkb functions here, since they
395 % don't seem to be needed in the AMS style. Also moved some real
396 % basic functions like `and' and 'or' earlier in the file.
397
398 INTEGERS { nameptr namesleft numnames }
399
400 % The extra section to write out a language field was added
401 % for AMSPLAIN.BST. Not present in plain.bst.
402
403 FUNCTION {format.language}
404 { language empty$
405 { "" }
406 { " (" language * ")" * }
407 if$
408 }
409
410 % This version of format.names puts names in the format
411 %
412 % F. von Last, Jr.
413 %
414 % (i.e., first name first, abbreviating initials).
415
416 FUNCTION {format.names}
417 { 's :=
418 #1 'nameptr :=
419 s num.names$ 'numnames :=
420 numnames 'namesleft :=
421 { namesleft #0 > }
422 { s nameptr "\bgroup\scshape{{}}{f.~}{vv~}{ll}{, jj}\egroup{{}}" format.name$ 't :=
423 nameptr #1 >
424 { namesleft #1 >
425 { ", " * t * }
426 { numnames #2 >
427 { "," * }
428 'skip$
429 if$
430 t "others" =
431 { " et~al." * }
432 { " and " * t * }
433 if$
434 }
435 if$
436 }
437 't
438 if$
439 nameptr #1 + 'nameptr :=
440 namesleft #1 - 'namesleft :=
441 }
442 while$
443 }
444
445 FUNCTION {format.authors}
446 { author empty$
447 { "" }
448 { bysame "\bysame" =
449 {"\bysame"}
450 { author format.names }
451 if$
452 }
453 if$
454 }
455
456 FUNCTION {format.editors}
457 { editor empty$
458 { "" }
459 { editor format.names
460 editor num.names$ #1 >
461 { " (eds.)" * }
462 { " (ed.)" * }
463 if$
464 }
465 if$
466 }
467
468 FUNCTION {format.nonauthor.editors}
469 { editor empty$
470 { "" }
471 { editor format.names
472 editor num.names$ #1 >
473 { ", eds." * }
474 { ", ed." * }
475 if$
476 }
477 if$
478 }
479
480 FUNCTION {format.title}
481 { title empty$
482 { "" }
483 { title "t" change.case$ }
484 if$
485 }
486
487 FUNCTION {format.booktitle}
488 { title empty$
489 { "" }
490 { title emphasize }
491 if$
492 }
493
494
495 FUNCTION {format.journal.vol.num.year}
496 { journal empty$
497 { "journal name" missing.warning ""}
498 { " \emph{" journal * "}" * }
499 if$
500 volume empty$
501 'skip$
502 { " \textbf{" * volume * "}" * }
503 if$
504 number empty$
505 { issue empty$
506 'skip$
507 { " no.~" * issue * }
508 if$
509 }
510 { issue empty$
511 'skip$
512 {"both number and issue are present in " cite$ * warning$}
513 if$
514 " no.~" * number *
515 }
516 if$
517 year empty$
518 { "year" missing.warning }
519 { " (" * year * ")" * }
520 if$
521 }
522
523 % For formatting the issue number for a journal article.
524
525 FUNCTION {format.number}
526 { number empty$
527 { "" }
528 { "no.~" number * }
529 if$
530 }
531
532 % For formatting miscellaneous dates
533
534 FUNCTION {format.date}
535 { year empty$
536 { month empty$
537 { "" }
538 { "there's a month but no year in " cite$ * warning$
539 month
540 }
541 if$
542 }
543 { month empty$
544 'year
545 { month " " * year * }
546 if$
547 }
548 if$
549 }
550
551 %% The volume, series and number information is sort of tricky.
552 %% This code handles it as follows:
553 %% If the series is present, and the volume, but not the number,
554 %% then we do "\emph{Book title}, \emph{Series Name} \bf{000}"
555 %% If the series is present, and the number, but not the volume,
556 %% then we do "\emph{Book title}, \emph{Series Name} no. 000"
557 %% If the series is present, and both number and volume,
558 %% then we do "\emph{Book title}, \bf{XX} \emph{Series Name} no. 000"
559 %% Finally, if the series is absent,
560 %% then we do "\emph{Book title}, \bf{XX}"
561 %% or "\emph{Book title}, no. 000"
562 %% and if both volume and number are present, give a warning message.
563
564 FUNCTION {format.bookvolume.series.number}
565 { volume empty$
566 { "" % Push the empty string as a placeholder in case everything else
567 % is empty too.
568 series empty$
569 'skip$
570 { pop$ "\emph{" series * "}" * } % if series is not empty put in stack
571 if$
572 number empty$
573 'skip$
574 { duplicate$ empty$ % if no preceding material,
575 'skip$ % do nothing, otherwise
576 { " " * } % add a space to separate.
577 if$
578 "no." number tie.or.space.connect * % add the number information
579 }
580 if$
581 }
582 %% If the volume is NOT EMPTY:
583 { "\textbf{" volume * "}" *
584 number empty$
585 { series empty$
586 'skip$
587 { "\emph{" series * "}" * " " * swap$ *} % Series Name, vol. XX
588 if$
589 }
590 { series empty$
591 { "can't use both volume and number if series info is missing"
592 warning$
593 "in BibTeX entry type `" type$ * "'" * top$
594 }
595 { " " * series * " no." * number tie.or.space.connect }
596 if$
597 }
598 if$
599 }
600 if$
601
602 } % end of format.bookvolume.series.number
603
604 %% format.inproc.title.where.editors is used by inproceedings entry types
605
606 %% No case changing or emphasizing for the title. We want initial
607 %% caps, roman.
608 %% We add parentheses around the venue (place where conference
609 %% was held).
610 %% Likewise we add parentheses around the editors' names.
611
612 FUNCTION {format.inproc.title.venue.editors}
613 { booktitle empty$
614 { "" }
615 { " in \emph{" booktitle * "}" *
616 venue empty$
617 'skip$
618 { add.space.if.necessary "(" * venue * ")" * }
619 if$
620 editor empty$
621 'skip$
622 { add.space.if.necessary "(" * format.nonauthor.editors * ")" * }
623 if$
624 }
625 if$
626 }
627
628
629 FUNCTION {format.edition}
630 { edition empty$
631 { "" }
632 { output.state mid.sentence =
633 { edition "l" change.case$ " ed." * }
634 { edition "t" change.case$ " ed." * }
635 if$
636 }
637 if$
638 }
639
640 INTEGERS { multiresult }
641
642 FUNCTION {multi.page.check}
643 { 't :=
644 #0 'multiresult :=
645 { multiresult not
646 t empty$ not
647 and
648 }
649 { t #1 #1 substring$
650 duplicate$ "-" =
651 swap$ duplicate$ "," =
652 swap$ "+" =
653 or or
654 { #1 'multiresult := }
655 { t #2 global.max$ substring$ 't := }
656 if$
657 }
658 while$
659 multiresult
660 }
661
662 % pagetotal is a synonym of totalpages: some styles use
663 % one, and some another
664
665 FUNCTION {format.pages}
666 { pages empty$
667 { totalpages empty$
668 { pagetotal empty$
669 { "" }
670 { pagetotal "~pp." *}
671 if$
672 }
673 { totalpages "~pp." *}
674 if$
675 }
676 { pages n.dashify }
677 if$
678 }
679
680 FUNCTION {format.book.pages}
681 { pages empty$
682 { "" }
683 { pages multi.page.check
684 { "pp.~" pages n.dashify * }
685 { "p.~" pages * }
686 if$
687 }
688 if$
689 }
690
691 FUNCTION {format.chapter.pages}
692 { chapter empty$
693 'format.book.pages
694 { type empty$
695 { "ch.~" }
696 { type "l" change.case$ " " * }
697 if$
698 chapter *
699 pages empty$
700 'skip$
701 { ", " * format.book.pages * }
702 if$
703 }
704 if$
705 }
706
707 FUNCTION {empty.misc.check}
708 { author empty$ title empty$ howpublished empty$
709 month empty$ year empty$ note empty$
710 and and and and and
711 key empty$ not and
712 { "all relevant fields are empty in " cite$ * warning$ }
713 'skip$
714 if$
715 }
716
717 FUNCTION {format.thesis.type}
718 { type empty$
719 'skip$
720 { pop$
721 type "t" change.case$
722 }
723 if$
724 }
725
726 FUNCTION {format.tr.number}
727 { type empty$
728 { "Tech. Report" }
729 'type
730 if$
731 number empty$
732 { "t" change.case$ }
733 { number tie.or.space.connect }
734 if$
735 }
736
737 % The format.crossref functions haven't been paid much attention
738 % at the present time (June 1990) and could probably use some
739 % work. MJD
740
741 FUNCTION {format.article.crossref}
742 { key empty$
743 { journal empty$
744 { "need key or journal for " cite$ * " to crossref " * crossref *
745 warning$
746 ""
747 }
748 { "in " journal * }
749 if$
750 }
751 { "in " key * }
752 if$
753 " \cite{" * crossref * "}" *
754 }
755
756 FUNCTION {format.crossref.editor}
757 { editor #1 "{vv~}{ll}" format.name$
758 editor num.names$ duplicate$
759 #2 >
760 { pop$ " et~al." * }
761 { #2 <
762 'skip$
763 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
764 { " et~al." * }
765 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
766 if$
767 }
768 if$
769 }
770 if$
771 }
772
773 FUNCTION {format.book.crossref}
774 { volume empty$
775 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
776 "in "
777 }
778 { "vol." volume tie.or.space.connect
779 " of " *
780 }
781 if$
782 editor empty$
783 editor field.or.null author field.or.null =
784 or
785 { key empty$
786 { series empty$
787 { "need editor, key, or series for " cite$ * " to crossref " *
788 crossref * warning$
789 "" *
790 }
791 { series * }
792 if$
793 }
794 { key * }
795 if$
796 }
797 { format.crossref.editor * }
798 if$
799 " \cite{" * crossref * "}" *
800 }
801
802 FUNCTION {format.incoll.inproc.crossref}
803 { editor empty$
804 editor field.or.null author field.or.null =
805 or
806 { key empty$
807 { booktitle empty$
808 { "need editor, key, or booktitle for " cite$ * " to crossref " *
809 crossref * warning$
810 ""
811 }
812 { "in \emph{" booktitle * "}" * }
813 if$
814 }
815 { "in " key * }
816 if$
817 }
818 { "in " format.crossref.editor * }
819 if$
820 " \cite{" * crossref * "}" *
821 }
822
823 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
824
825 % The main functions for each entry type.
826
827 % journal, vol and year are formatted together because they are
828 % not separated by commas.
829
830 FUNCTION {article}
831 { output.bibitem
832 format.authors "author" output.check
833 format.title "title" output.check
834 titlenote output
835 crossref missing$
836 { format.journal.vol.num.year output
837 format.pages "pages" output.check
838 }
839 { format.article.crossref output.nonnull
840 format.pages "pages" output.check
841 }
842 if$
843 format.language *
844 note output
845 fin.entry
846 }
847
848 FUNCTION {book}
849 { output.bibitem
850 author empty$
851 { format.editors "author and editor" output.check }
852 { format.authors output.nonnull
853 crossref missing$
854 { "author and editor" editor either.or.check }
855 'skip$
856 if$
857 }
858 if$
859 format.booktitle "title" output.check
860 titlenote output
861 format.edition output
862 crossref missing$
863 { format.bookvolume.series.number output
864 publisher "publisher" output.check
865 address output
866 }
867 { format.book.crossref output.nonnull
868 }
869 if$
870 format.date "year" output.check
871 format.pages output
872 format.language *
873 note output
874 fin.entry
875 }
876
877 FUNCTION {booklet}
878 { output.bibitem
879 format.authors output
880 format.title "title" output.check
881 titlenote output
882 howpublished output
883 address output
884 format.pages output
885 format.date output
886 note output
887 fin.entry
888 }
889
890 FUNCTION {inbook}
891 { output.bibitem
892 author empty$
893 { format.editors "author and editor" output.check }
894 { format.authors output.nonnull
895 crossref missing$
896 { "author and editor" editor either.or.check }
897 'skip$
898 if$
899 }
900 if$
901 format.booktitle "title" output.check
902 titlenote output
903 format.edition output
904 crossref missing$
905 { format.bookvolume.series.number output
906 format.chapter.pages "chapter and pages" output.check
907 publisher "publisher" output.check
908 address output
909 }
910 { format.chapter.pages "chapter and pages" output.check
911 format.book.crossref output.nonnull
912 }
913 if$
914 format.date "year" output.check
915 format.language *
916 note output
917 fin.entry
918 }
919
920 FUNCTION {incollection}
921 { output.bibitem
922 format.authors "author" output.check
923 format.title "title" output.check
924 titlenote output
925 crossref missing$
926 { format.inproc.title.venue.editors "booktitle" output.check
927 format.bookvolume.series.number output
928 publisher "publisher" output.check
929 address output
930 format.edition output
931 format.date "year" output.check
932 }
933 { format.incoll.inproc.crossref output.nonnull
934 }
935 if$
936 note output
937 format.book.pages output
938 format.language *
939 fin.entry
940 }
941
942 FUNCTION {inproceedings}
943 { output.bibitem
944 format.authors "author" output.check
945 format.title "title" output.check
946 titlenote output
947 crossref missing$
948 { format.inproc.title.venue.editors "booktitle" output.check
949 format.bookvolume.series.number output
950 organization output
951 publisher output
952 address output
953 format.date "year" output.check
954 }
955 { format.incoll.inproc.crossref output.nonnull
956 }
957 if$
958 note output
959 format.book.pages output
960 format.language *
961 fin.entry
962 }
963
964 FUNCTION {conference} { inproceedings }
965
966 FUNCTION {manual}
967 { output.bibitem
968 author empty$
969 { organization empty$
970 'skip$
971 { organization output.nonnull
972 address output
973 }
974 if$
975 }
976 { format.authors output.nonnull }
977 if$
978 format.booktitle "title" output.check
979 titlenote output
980 author empty$
981 { organization empty$
982 { address output }
983 'skip$
984 if$
985 }
986 { organization output
987 address output
988 }
989 if$
990 format.edition output
991 format.date output
992 format.pages output
993 note output
994 fin.entry
995 }
996
997 FUNCTION {mastersthesis}
998 { output.bibitem
999 format.authors "author" output.check
1000 format.booktitle "title" output.check
1001 titlenote output
1002 "Master's thesis" format.thesis.type output.nonnull
1003 school "school" output.check
1004 address output
1005 format.date "year" output.check
1006 note output
1007 format.pages output
1008 fin.entry
1009 }
1010
1011 FUNCTION {misc}
1012 { output.bibitem
1013 format.authors output
1014 format.title output
1015 titlenote output
1016 howpublished output
1017 format.date output
1018 note output
1019 format.book.pages output
1020 fin.entry.misc
1021 empty.misc.check
1022 }
1023
1024 FUNCTION {phdthesis}
1025 { output.bibitem
1026 format.authors "author" output.check
1027 format.booktitle "title" output.check
1028 titlenote output
1029 "Ph.D. thesis" format.thesis.type output.nonnull
1030 school "school" output.check
1031 address output
1032 format.date "year" output.check
1033 note output
1034 format.pages output
1035 fin.entry
1036 }
1037
1038 FUNCTION {proceedings}
1039 { output.bibitem
1040 editor empty$
1041 { organization output }
1042 { format.editors output.nonnull }
1043 if$
1044 format.booktitle "title" output.check
1045 titlenote output
1046 venue empty$
1047 'skip$
1048 { add.space.if.necessary "(" * venue * ")" * }
1049 if$
1050 format.bookvolume.series.number output
1051 address empty$
1052 { editor empty$
1053 'skip$
1054 { organization output }
1055 if$
1056 publisher output
1057 format.date "year" output.check
1058 }
1059 { address output.nonnull
1060 editor empty$
1061 'skip$
1062 { organization output }
1063 if$
1064 publisher output
1065 format.date "year" output.check
1066 }
1067 if$
1068 format.pages output
1069 note output
1070 fin.entry
1071 }
1072
1073 FUNCTION {techreport}
1074 { output.bibitem
1075 format.authors "author" output.check
1076 format.booktitle "title" output.check
1077 titlenote output
1078 format.tr.number output.nonnull
1079 institution "institution" output.check
1080 address output
1081 format.date "year" output.check
1082 format.pages output
1083 note output
1084 fin.entry
1085 }
1086
1087 FUNCTION {unpublished}
1088 { output.bibitem
1089 format.authors "author" output.check
1090 format.booktitle "title" output.check
1091 titlenote output
1092 note "note" output.check
1093 format.date output
1094 format.pages output
1095 fin.entry.misc
1096 }
1097
1098 FUNCTION {default.type} { misc }
1099
1100 MACRO {jan} {"January"}
1101
1102 MACRO {feb} {"February"}
1103
1104 MACRO {mar} {"March"}
1105
1106 MACRO {apr} {"April"}
1107
1108 MACRO {may} {"May"}
1109
1110 MACRO {jun} {"June"}
1111
1112 MACRO {jul} {"July"}
1113
1114 MACRO {aug} {"August"}
1115
1116 MACRO {sep} {"September"}
1117
1118 MACRO {oct} {"October"}
1119
1120 MACRO {nov} {"November"}
1121
1122 MACRO {dec} {"December"}
1123
1124 READ
1125
1126 FUNCTION {sortify}
1127 { purify$
1128 "l" change.case$
1129 }
1130
1131 INTEGERS { len }
1132
1133 FUNCTION {chop.word}
1134 { 's :=
1135 'len :=
1136 s #1 len substring$ =
1137 { s len #1 + global.max$ substring$ }
1138 's
1139 if$
1140 }
1141
1142 FUNCTION {sort.format.names}
1143 { 's :=
1144 #1 'nameptr :=
1145 ""
1146 s num.names$ 'numnames :=
1147 numnames 'namesleft :=
1148 { namesleft #0 > }
1149 { nameptr #1 >
1150 { " " * }
1151 'skip$
1152 if$
1153 s nameptr "{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
1154 nameptr numnames = t "others" = and
1155 { "et al" * }
1156 { t sortify * }
1157 if$
1158 nameptr #1 + 'nameptr :=
1159 namesleft #1 - 'namesleft :=
1160 }
1161 while$
1162 }
1163
1164 FUNCTION {sort.format.title}
1165 { 't :=
1166 "A " #2
1167 "An " #3
1168 "The " #4 t chop.word
1169 chop.word
1170 chop.word
1171 sortify
1172 #1 global.max$ substring$
1173 }
1174
1175 FUNCTION {author.sort}
1176 { author empty$
1177 { key empty$
1178 { "to sort, need author or key in " cite$ * warning$
1179 ""
1180 }
1181 { key sortify }
1182 if$
1183 }
1184 { author sort.format.names }
1185 if$
1186 }
1187
1188 FUNCTION {author.editor.sort}
1189 { author empty$
1190 { editor empty$
1191 { key empty$
1192 { "to sort, need author, editor, or key in " cite$ * warning$
1193 ""
1194 }
1195 { key sortify }
1196 if$
1197 }
1198 { editor sort.format.names }
1199 if$
1200 }
1201 { author sort.format.names }
1202 if$
1203 }
1204
1205 FUNCTION {author.organization.sort}
1206 { author empty$
1207 { organization empty$
1208 { key empty$
1209 { "to sort, need author, organization, or key in " cite$ * warning$
1210 ""
1211 }
1212 { key sortify }
1213 if$
1214 }
1215 { "The " #4 organization chop.word sortify }
1216 if$
1217 }
1218 { author sort.format.names }
1219 if$
1220 }
1221
1222 FUNCTION {editor.organization.sort}
1223 { editor empty$
1224 { organization empty$
1225 { key empty$
1226 { "to sort, need editor, organization, or key in " cite$ * warning$
1227 ""
1228 }
1229 { key sortify }
1230 if$
1231 }
1232 { "The " #4 organization chop.word sortify }
1233 if$
1234 }
1235 { editor sort.format.names }
1236 if$
1237 }
1238
1239 FUNCTION {presort}
1240 { type$ "book" =
1241 type$ "inbook" =
1242 or
1243 'author.editor.sort
1244 { type$ "proceedings" =
1245 'editor.organization.sort
1246 { type$ "manual" =
1247 'author.organization.sort
1248 'author.sort
1249 if$
1250 }
1251 if$
1252 }
1253 if$
1254 " "
1255 *
1256 sortyear field.or.null sortify
1257 *
1258 year field.or.null sortify
1259 *
1260 " "
1261 *
1262 title field.or.null
1263 sort.format.title
1264 *
1265 #1 entry.max$ substring$
1266 'sort.key$ :=
1267 }
1268
1269 ITERATE {presort}
1270
1271 SORT
1272
1273 STRINGS { longest.label prev.author this.author }
1274
1275 INTEGERS { number.label longest.label.width }
1276
1277 FUNCTION {initialize.longest.label}
1278 { "" 'longest.label :=
1279 #1 'number.label :=
1280 #0 'longest.label.width :=
1281 "abcxyz" 'prev.author :=
1282 "" 'this.author :=
1283 }
1284
1285 FUNCTION {longest.label.pass}
1286 { number.label int.to.str$ 'label :=
1287 number.label #1 + 'number.label :=
1288 label width$ longest.label.width >
1289 { label 'longest.label :=
1290 label width$ 'longest.label.width :=
1291 }
1292 'skip$
1293 if$
1294 author empty$
1295 { editor empty$
1296 { "" }
1297 'editor
1298 if$
1299 }
1300 'author
1301 if$
1302 'this.author :=
1303 }
1304
1305 EXECUTE {initialize.longest.label}
1306
1307 ITERATE {longest.label.pass}
1308
1309 FUNCTION {write.lines}
1310 { { duplicate$ "." = NOT }
1311 { write$ newline$ }
1312 while$
1313 pop$
1314 }
1315
1316 FUNCTION {begin.bib}
1317 { preamble$ empty$
1318 'skip$
1319 { preamble$ write$ newline$ }
1320 if$
1321 "\providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace}"
1322 write$ newline$
1323 "\providecommand{\noopsort}[1]{}"
1324 write$ newline$
1325 "\providecommand{\mr}[1]{\href{http://www.ams.org/mathscinet-getitem?mr=#1}{MR~#1}}"
1326 write$ newline$
1327 "\providecommand{\zbl}[1]{\href{http://www.zentralblatt-math.org/zmath/en/search/?q=an:#1}{Zbl~#1}}"
1328 write$ newline$
1329 "\providecommand{\jfm}[1]{\href{http://www.emis.de/cgi-bin/JFM-item?#1}{JFM~#1}}"
1330 write$ newline$
1331 "\providecommand{\arxiv}[1]{\href{http://www.arxiv.org/abs/#1}{arXiv~#1}}"
1332 write$ newline$
1333 "\providecommand{\doi}[1]{\url{https://doi.org/#1}}"
1334 write$ newline$
1335 "\providecommand{\MR}{\relax\ifhmode\unskip\space\fi MR }"
1336 write$ newline$
1337 "% \MRhref is called by the amsart/book/proc definition of \MR."
1338 write$ newline$
1339 "\providecommand{\MRhref}[2]{%"
1340 write$ newline$
1341 " \href{http://www.ams.org/mathscinet-getitem?mr=#1}{#2}"
1342 write$ newline$
1343 "}"
1344 write$ newline$
1345 "\providecommand{\href}[2]{#2}"
1346 write$ newline$
1347 "\begin{thebibliography}{" longest.label * "}" *
1348 write$ newline$
1349 }
1350
1351 EXECUTE {begin.bib}
1352
1353 EXECUTE {init.state.consts}
1354
1355 ITERATE {call.type$}
1356
1357 FUNCTION {end.bib}
1358 { newline$
1359 "\end{thebibliography}" write$ newline$
1360 }
1361
1362 EXECUTE {end.bib}
1363 %% \CharacterTable
1364 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
1365 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
1366 %% Digits \0\1\2\3\4\5\6\7\8\9
1367 %% Exclamation \! Double quote \" Hash (number) \#
1368 %% Dollar \$ Percent \% Ampersand \&
1369 %% Acute accent \' Left paren \( Right paren \)
1370 %% Asterisk \* Plus \+ Comma \,
1371 %% Minus \- Point \. Solidus \/
1372 %% Colon \: Semicolon \; Less than \<
1373 %% Equals \= Greater than \> Question mark \?
1374 %% Commercial at \@ Left bracket \[ Backslash \\
1375 %% Right bracket \] Circumflex \^ Underscore \_
1376 %% Grave accent \` Left brace \{ Vertical bar \|
1377 %% Right brace \} Tilde \~}