Debian Codegraph @

texmf-dist/bibtex/bst/amsrefs/amsrn.bst

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