Debian Codegraph @

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