1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
|
%%
%% This is file `amsry.bst',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% amsxport.dtx (with options: `bst,sort,alpha,y2k')
%%
%%% ====================================================================
%%% @BibTeX-source-file{
%%% filename = "amsxport.dtx",
%%% version = "2.01",
%%% date = "2007/10/01",
%%% time = "16:20:24 EDT",
%%% author = "Michael J Downes",
%%% address = "American Mathematical Society,
%%% Publications Technical Group,
%%% PO Box 6248,
%%% Providence, RI 02940,
%%% USA",
%%% email = "tech-support at ams.org",
%%% URL = "http://www.ams.org/",
%%% abstract = "The BibTeX style file amsxport.bst produces .bbl
%%% entries where most of the database structure is
%%% retained. This is intended for processing by a smart
%%% bibliography package such as the amsrefs package.",
%%% copyright = "Copyright 2001, 2004 American Mathematical Society.",
%%% license = "Unlimited copying and redistribution of this file
%%% are permitted as long as this file is not
%%% modified. Modifications, and distribution of
%%% modified versions, are permitted, but only if
%%% the resulting file is renamed.",
%%% checksum = "09610 1810 6390 51580",
%%% docstring = "The checksum field, produced by Robert Solovay's
%%% checksum utility, gives CRC-16 checksum, lines,
%%% words, and characters.",
%%% }
%%% ====================================================================
ENTRY
{
address institution number status
archive isbn organization subtitle
author issn pages title
booktitle journal part translator
chapter key pii type
date language preprint url
edition meeting publisher volume
editor month review xid
eprint mrnumber school year
howpublished note series
}
{ }
{ label }
MACRO {jan} {"-01"}
MACRO {feb} {"-02"}
MACRO {mar} {"-03"}
MACRO {apr} {"-04"}
MACRO {may} {"-05"}
MACRO {jun} {"-06"}
MACRO {jul} {"-07"}
MACRO {aug} {"-08"}
MACRO {sep} {"-09"}
MACRO {oct} {"-10"}
MACRO {nov} {"-11"}
MACRO {dec} {"-12"}
STRINGS { p s t l }
INTEGERS { len ptr }
FUNCTION {NOT} { { #0 } { #1 } if$ }
FUNCTION {AND} { 'skip$ { pop$ #0 } if$ }
FUNCTION {OR} { { pop$ #1 } 'skip$ if$ }
FUNCTION {TRUE} { #1 }
FUNCTION {FALSE} { #0 }
FUNCTION {incr.ptr} { ptr #1 + 'ptr := }
FUNCTION {current.char} { ptr #1 substring$ }
FUNCTION {copy.two.chars} { t * incr.ptr s current.char * incr.ptr }
FUNCTION {is.digit} {
chr.to.int$
duplicate$
"0" chr.to.int$ #1 - >
swap$
"9" chr.to.int$ #1 + <
AND
}
FUNCTION {is.lowercase.letter} {
chr.to.int$ duplicate$
"a" chr.to.int$ #1 - >
swap$
"z" chr.to.int$ #1 + <
AND
}
FUNCTION {is.uppercase.letter} {
chr.to.int$ duplicate$
"A" chr.to.int$ #1 - >
swap$
"Z" chr.to.int$ #1 + <
AND
}
FUNCTION {is.letter} {
duplicate$
is.lowercase.letter
{ pop$ TRUE }
{ is.uppercase.letter }
if$
}
FUNCTION {skip.accent} { pop$ incr.ptr }
FUNCTION {strip.label} {
's :=
#1 'ptr :=
""
{ s ptr #1 substring$ duplicate$ empty$ NOT }
{ duplicate$ is.letter
{ * }
{ duplicate$ "\" =
{ skip.accent }
'pop$
if$
}
if$
incr.ptr
}
while$
pop$
}
FUNCTION {sortify} {
purify$
"l" change.case$
}
FUNCTION {lpad} {
swap$
'l :=
l text.length$ - 'len :=
{ len #0 > }
{
" " l * 'l :=
len #1 - 'len :=
}
while$
l
}
FUNCTION {field.or.null} {
duplicate$ empty$
{ pop$ "" }
'skip$
if$
}
FUNCTION {missing.or.empty} { duplicate$ missing$ swap$ empty$ OR }
FUNCTION {append.ndash.and.skip.hyphens} {
"\ndash " *
incr.ptr
{ s current.char "-" = }
{ incr.ptr }
while$
}
FUNCTION {n.dashify} {
's :=
#1 'ptr :=
""
{ s current.char 't := t "" = NOT }
{ t "\" =
{ copy.two.chars }
{ t "-" =
{ append.ndash.and.skip.hyphens }
{ t * incr.ptr }
if$
}
if$
}
while$
}
FUNCTION {missing.warning} {
"missing " swap$ * " in " * cite$ * warning$
}
INTEGERS { string.ptr }
FUNCTION {string.length} {
#1 'string.ptr :=
{ duplicate$ string.ptr #1 substring$ "" = 'FALSE 'TRUE if$ }
{ string.ptr #1 + 'string.ptr := }
while$
pop$
string.ptr #1 -
}
FUNCTION {format.title}{
duplicate$
missing.or.empty
{ pop$ "" }
{ "t" change.case$ }
if$
}
FUNCTION {start.field} {
#12 lpad "={" * write$
}
FUNCTION {fin.field} { "}," write$ newline$ }
FUNCTION {write.field} {
duplicate$
missing$
{ pop$ missing.warning }
{ duplicate$ empty$
{ pop$ missing.warning }
{ swap$ start.field write$ fin.field }
if$
}
if$
}
FUNCTION {optional.field} {
duplicate$
missing.or.empty
{ pop$ pop$ }
{ swap$ start.field write$ fin.field }
if$
}
FUNCTION {optional.title.field} {
duplicate$
missing.or.empty
{ pop$ pop$ }
{ format.title swap$ start.field write$ fin.field }
if$
}
FUNCTION {optional.pages.field} {
duplicate$
missing.or.empty
{ pop$ pop$ }
{ swap$ start.field
n.dashify
write$ fin.field
}
if$
}
FUNCTION {optional.mr.field} {
duplicate$
missing.or.empty
{ pop$ pop$ }
{
swap$ start.field
"\MR{" swap$ * "}" * write$ fin.field
}
if$
}
FUNCTION {remove.ordinal.suffix} {
's :=
s string.length 'len :=
#1 'ptr :=
{ ptr len < s ptr #1 substring$ is.digit AND }
'incr.ptr
while$
s ptr global.max$ substring$ 'p :=
p "st" =
{ TRUE }
{ p "nd" =
{ TRUE }
{ p "rd" =
{ TRUE }
{ p "th" =
{ TRUE }
{ FALSE }
if$
}
if$
}
if$
}
if$
{ s #1 ptr #1 - substring$ }
{ s }
if$
}
FUNCTION {optional.edition.field} {
duplicate$ missing.or.empty
{ pop$ pop$ }
{ swap$ start.field
remove.ordinal.suffix
write$ fin.field
}
if$
}
INTEGERS { nameptr numnames namesleft }
STRINGS { namelist fieldname }
FUNCTION {format.name} { "{vv~}{ll}{, ff}{, jj}" format.name$ }
FUNCTION {optional.name.field}{
duplicate$ missing.or.empty
{ pop$ pop$ }
{ swap$ 'fieldname :=
duplicate$ num.names$
'namesleft :=
#1 'ptr :=
{ namesleft #0 > }
{ fieldname start.field
duplicate$ ptr format.name write$
fin.field
ptr #1 + 'ptr :=
namesleft #1 - 'namesleft :=
}
while$
pop$
}
if$
}
FUNCTION {assemble.date.field}
{ date missing$
{ year missing.or.empty
{ status missing.or.empty
{ "No year or other date information for "
cite$ * warning$ }
'skip$
if$
"status"
}
{ year month missing$ { "" } { month } if$ * }
if$
}
{ date }
if$
duplicate$ "status" =
{ pop$ pop$ }
{ swap$ start.field write$ fin.field }
if$
}
FUNCTION {optional.journal.field} {
duplicate$ missing.or.empty
{ pop$ pop$ }
{
's :=
start.field
#1 'ptr :=
s current.char is.lowercase.letter
{
s "/" * 's :=
{ s ptr #1 substring$ "/" = NOT }
{ incr.ptr }
while$
s ptr #1 + #1 substring$ empty$
{ s #1 ptr #1 - substring$ }
{
s #1 ptr #1 - substring$
write$
fin.field
"ISSN" start.field
s ptr #1 + #9 substring$
}
if$
}
{ s }
if$
write$
fin.field
}
if$
}
FUNCTION {optional.type.field}
{ duplicate$ missing.or.empty
{ type$ "mastersthesis" = { "Master's Thesis" }
{ type$ "phdthesis" = { "Ph.D. Thesis" }
{ "" } if$ } if$
swap$ pop$
}
'skip$
if$
duplicate$ empty$
{ pop$ pop$ }
{ swap$ start.field write$ fin.field }
if$
}
FUNCTION {url.note.status.review} {
"url" url optional.field
"note" note optional.field
"status" status optional.field
"review" review optional.field
"review" mrnumber optional.mr.field
}
FUNCTION {start.entry} {
newline$
"\bib{" cite$ * "}{" *
type$ "mastersthesis" = type$ "phdthesis" = OR
{ "thesis" }
{ type$ }
if$
* "}{" * write$
newline$
}
FUNCTION {fin.entry} {
"}" write$
newline$
}
FUNCTION {article} {
start.entry
"author" author optional.name.field
"translator" translator optional.name.field
"title" title format.title write.field
"subtitle" subtitle optional.title.field
"language" language optional.field
"organization" organization optional.field
"how" howpublished optional.field
"date" assemble.date.field
"ISSN" issn optional.field
"journal" journal optional.journal.field
"volume" volume optional.field
"number" number optional.field
"pages" pages optional.pages.field
"PII" pii optional.field
"archive" archive optional.field
"eprint" eprint optional.field
"preprint" preprint optional.field
url.note.status.review
fin.entry
}
FUNCTION {inproceedings} {
start.entry
"author" author optional.name.field
"translator" translator optional.name.field
"title" title format.title write.field
"subtitle" subtitle optional.title.field
"language" language optional.field
"organization" organization optional.field
"how" howpublished optional.field
"date" assemble.date.field
"xid" xid optional.field
"conference" meeting optional.field
"booktitle" booktitle optional.title.field
"edition" edition optional.edition.field
"editor" editor optional.name.field
"series" series optional.field
"volume" volume optional.field
"publisher" publisher optional.field
"address" address optional.field
"pages" pages optional.pages.field
url.note.status.review
fin.entry
}
FUNCTION {inbook} { inproceedings }
FUNCTION {incollection} { inproceedings }
FUNCTION {conference} { inproceedings }
FUNCTION {book} {
start.entry
"author" author optional.name.field
"editor" editor optional.name.field
"translator" translator optional.name.field
"title" title missing$ { booktitle } { title } if$
format.title write.field
"subtitle" subtitle optional.title.field
"type" type optional.type.field
"language" language optional.field
"conference" meeting optional.field
"edition" edition optional.edition.field
"series" series optional.field
"publisher" publisher optional.field
organization missing.or.empty
{ "institution" institution optional.field }
{ "organization" organization optional.field }
if$
"address" address optional.field
"how" howpublished optional.field
"date" year write.field
"volume" volume optional.field
"number" number optional.field
"ISBN" isbn optional.field
url.note.status.review
fin.entry
}
FUNCTION {booklet} { book }
FUNCTION {manual} { book }
FUNCTION {mastersthesis} { book }
FUNCTION {phdthesis} { book }
FUNCTION {proceedings} { book }
FUNCTION {collection} { book }
FUNCTION {techreport} { book }
FUNCTION {unpublished} { book }
FUNCTION {misc} { book }
FUNCTION {default.type} { misc }
READ
FUNCTION {chop.word} {
's :=
'len :=
s #1 len substring$ =
{ s len #1 + global.max$ substring$ }
's
if$
}
FUNCTION {sort.format.title} {
't :=
"A " #2
"An " #3
"The " #4 t chop.word
chop.word
chop.word
sortify
#1 global.max$ substring$
}
FUNCTION {format.lab.names} {
's :=
s num.names$ 'numnames :=
numnames #1 >
{ numnames #4 >
{ #3 'namesleft := }
{ numnames 'namesleft := }
if$
#1 'nameptr :=
""
{ namesleft #0 > }
{ nameptr numnames =
{ s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
{ "{\etalchar{+}}" * }
{ s nameptr "{v{}}{l{}}" format.name$ * }
if$
}
{ s nameptr "{v{}}{l{}}" format.name$ * }
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
numnames #4 >
{ "{\etalchar{+}}" * }
'skip$
if$
}
{ s #1 "{v{}}{l{}}" format.name$
duplicate$ text.length$ #2 <
{ pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
'skip$
if$
}
if$
}
FUNCTION {author.key.label}
{ author empty$
{ key empty$
{ cite$ #1 #3 substring$ }
{ key #3 text.prefix$ }
if$
}
{ author format.lab.names }
if$
}
FUNCTION {author.editor.key.label}
{ author empty$
{ editor empty$
{ key empty$
{ cite$ #1 #3 substring$ }
{ key #3 text.prefix$ }
if$
}
{ editor format.lab.names }
if$
}
{ author format.lab.names }
if$
}
FUNCTION {author.key.organization.label}
{ author empty$
{ key empty$
{ organization empty$
{ cite$ #1 #3 substring$ }
{ "The " #4 organization chop.word #3 text.prefix$ }
if$
}
{ key #3 text.prefix$ }
if$
}
{ author format.lab.names }
if$
}
FUNCTION {editor.key.organization.label}
{ editor empty$
{ key empty$
{ organization empty$
{ cite$ #1 #3 substring$ }
{ "The " #4 organization chop.word #3 text.prefix$ }
if$
}
{ key #3 text.prefix$ }
if$
}
{ editor format.lab.names }
if$
}
FUNCTION {calc.label}{
type$ "book" = type$ "inbook" = OR
'author.editor.key.label
{ type$ "proceedings" =
'editor.key.organization.label
{ type$ "manual" =
'author.key.organization.label
'author.key.label
if$
}
if$
}
if$
strip.label
sortify
year field.or.null
purify$ *
'label :=
}
FUNCTION {sort.format.names} {
's :=
#1 'ptr :=
""
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ ptr #1 >
{ " " * }
'skip$
if$
s ptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
ptr numnames = t "others" = AND
{ "et al" }
{ t sortify }
if$
*
ptr #1 + 'ptr :=
namesleft #1 - 'namesleft :=
}
while$
}
FUNCTION {sort.warning} {
"to sort, need " swap$ * " or key in " * cite$ * warning$
}
FUNCTION {author.sort}
{ author empty$
{ key empty$
{ "author" sort.warning
""
}
{ key sortify }
if$
}
{ author sort.format.names }
if$
}
FUNCTION {author.editor.sort}
{ author empty$
{ editor empty$
{ key empty$
{ "author, editor," sort.warning
""
}
{ key sortify }
if$
}
{ editor sort.format.names }
if$
}
{ author sort.format.names }
if$
}
FUNCTION {author.organization.sort}
{ author empty$
{ organization empty$
{ key empty$
{ "author, organization," sort.warning
""
}
{ key sortify }
if$
}
{ "The " #4 organization chop.word sortify }
if$
}
{ author sort.format.names }
if$
}
FUNCTION {editor.organization.sort}
{ editor empty$
{ organization empty$
{ key empty$
{ "editor, organization," sort.warning
""
}
{ key sortify }
if$
}
{ "The " #4 organization chop.word sortify }
if$
}
{ editor sort.format.names }
if$
}
FUNCTION {presort} {
calc.label
label
type$ "book" = type$ "inbook" = OR type$ "collection" = OR
'author.editor.sort
{ type$ "proceedings" =
'editor.organization.sort
{ type$ "manual" =
'author.organization.sort
'author.sort
if$
}
if$
}
if$
*
" " *
title field.or.null sort.format.title *
#1 entry.max$ substring$
'sort.key$ :=
}
ITERATE {presort}
SORT
FUNCTION {write.with.newlines}
{ 's := #1 'ptr :=
{ s ptr #2 + #1 substring$ "" = NOT }
{ s ptr #3 substring$ "^^M" =
{ s #1 ptr #1 - substring$ write$ newline$
ptr #3 + 'ptr :=
s ptr global.max$ substring$ 's :=
#1 'ptr :=
}
{ incr.ptr }
if$
}
while$
s write$ newline$
}
FUNCTION {begin.bib} {
preamble$ empty$
'skip$
{ preamble$ write.with.newlines }
if$
"% \bib, bibdiv, biblist are defined by the amsrefs package."
write$ newline$
"\begin{bibdiv}" write$ newline$
"\begin{biblist}" write$ newline$
}
FUNCTION {end.bib} {
newline$
"\end{biblist}" write$ newline$
"\end{bibdiv}" write$ newline$
}
EXECUTE {begin.bib}
ITERATE {call.type$}
EXECUTE {end.bib}
|