New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
ametsoc.bst in NEMO/trunk/doc/tex_sub – NEMO

source: NEMO/trunk/doc/tex_sub/ametsoc.bst @ 10075

Last change on this file since 10075 was 9388, checked in by nicolasmartin, 6 years ago

Global reorganisation of DOC directory: implementation and configuration of syntax highlighting with 'minted' LaTeX package
New macros have been created to insert different source codes (fortran, xml, c and shell-session) in the document.
Pygments Python package is now required to compile the documentation.

File size: 32.2 KB
Line 
1%%
2%% This is file `ametsoc7.bst',
3%% generated with the docstrip utility.
4%%
5%% The original source files were:
6%%
7%% merlin.mbs  (with options: `ay,nat,nm-rev1,ed-rev,jnrlst,nmdash,nmd-3,dt-beg,yr-com,yrp-col,thtit-a,vol-2bf,vnum-sp,volp-com,pgsep-s,num-xser,numser,ser-vol,bkpg-x,pg-bk,pre-edn,agu-doi,doi,edparc,bkedcap,edby,edbyy,blk-tit,in-x,pp,ed,abr,ednx,ord,jabr,eprint,url,url-nt,em-it,nfss,')
8%% ----------------------------------------
9%% *** Bibliography style file for ALL AMS Journals...version 1.0  ***
10%% *** Brian Papa - American Meteorological Society ***
11%%
12%% Copyright 1994-2004 Patrick W Daly
13 % ===============================================================
14 % IMPORTANT NOTICE:
15 % This bibliographic style (bst) file has been generated from one or
16 % more master bibliographic style (mbs) files, listed above.
17 %
18 % This generated file can be redistributed and/or modified under the terms
19 % of the LaTeX Project Public License Distributed from CTAN
20 % archives in directory macros/latex/base/lppl.txt; either
21 % version 1 of the License, or any later version.
22 % ===============================================================
23 % Name and version information of the main mbs file:
24 % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
25 %   For use with BibTeX version 0.99a or later
26 %-------------------------------------------------------------------
27 % This bibliography style file is intended for texts in ENGLISH
28 % This is an author-year citation style bibliography. As such, it is
29 % non-standard LaTeX, and requires a special package file to function properly.
30 % Such a package is    natbib.sty   by Patrick W. Daly
31 % The form of the \bibitem entries is
32 %   \bibitem[Jones et al.(1990)]{key}...
33 %   \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
34 % The essential feature is that the label (the part in brackets) consists
35 % of the author names, as they should appear in the citation, with the year
36 % in parentheses following. There must be no space before the opening
37 % parenthesis!
38 % With natbib v5.3, a full list of authors may also follow the year.
39 % In natbib.sty, it is possible to define the type of enclosures that is
40 % really wanted (brackets or parentheses), but in either case, there must
41 % be parentheses in the label.
42 % The \cite command functions as follows:
43 %   \citet{key} ==>>                Jones et al. (1990)
44 %   \citet*{key} ==>>               Jones, Baker, and Smith (1990)
45 %   \citep{key} ==>>                (Jones et al., 1990)
46 %   \citep*{key} ==>>               (Jones, Baker, and Smith, 1990)
47 %   \citep[chap. 2]{key} ==>>       (Jones et al., 1990, chap. 2)
48 %   \citep[e.g.][]{key} ==>>        (e.g. Jones et al., 1990)
49 %   \citep[e.g.][p. 32]{key} ==>>   (e.g. Jones et al., p. 32)
50 %   \citeauthor{key} ==>>           Jones et al.
51 %   \citeauthor*{key} ==>>          Jones, Baker, and Smith
52 %   \citeyear{key} ==>>             1990
53 %---------------------------------------------------------------------
54
55ENTRY
56  { address
57    archive
58    author
59    booktitle
60    chapter
61    doi
62    edition
63    editor
64    eid
65    eprint
66    howpublished
67    department
68    institution
69    journal
70    key
71    month
72    note
73    number
74    organization
75    pages
76    publisher
77    school
78    series
79    title
80    type
81    url
82    volume
83    year
84  }
85  {}
86  { label extra.label sort.label short.list }
87INTEGERS { output.state before.all mid.sentence after.sentence after.block }
88FUNCTION {init.state.consts}
89{ #0 'before.all :=
90  #1 'mid.sentence :=
91  #2 'after.sentence :=
92  #3 'after.block :=
93}
94STRINGS { s t}
95FUNCTION {output.nonnull}
96{ 's :=
97  output.state mid.sentence =
98    { ", " * write$ }
99    { output.state after.block =
100        { add.period$ write$
101          newline$
102          "\newblock " write$
103        }
104        { output.state before.all =
105            'write$
106            { add.period$ " " * write$ }
107          if$
108        }
109      if$
110      mid.sentence 'output.state :=
111    }
112  if$
113  s
114}
115FUNCTION {output}
116{ duplicate$ empty$
117    'pop$
118    'output.nonnull
119  if$
120}
121FUNCTION {output.check}
122{ 't :=
123  duplicate$ empty$
124    { pop$ "empty " t * " in " * cite$ * warning$ }
125    'output.nonnull
126  if$
127}
128FUNCTION {fin.entry}
129{ add.period$
130  write$
131  newline$
132}
133
134FUNCTION {new.block}
135{ output.state before.all =
136    'skip$
137    { after.block 'output.state := }
138  if$
139}
140FUNCTION {new.sentence}
141{ output.state after.block =
142    'skip$
143    { output.state before.all =
144        'skip$
145        { after.sentence 'output.state := }
146      if$
147    }
148  if$
149}
150FUNCTION {add.blank}
151{  " " * before.all 'output.state :=
152}
153
154FUNCTION {date.block}
155{
156  ":" *
157  add.blank
158}
159
160FUNCTION {not}
161{   { #0 }
162    { #1 }
163  if$
164}
165FUNCTION {and}
166{   'skip$
167    { pop$ #0 }
168  if$
169}
170FUNCTION {or}
171{   { pop$ #1 }
172    'skip$
173  if$
174}
175FUNCTION {new.block.checkb}
176{ empty$
177  swap$ empty$
178  and
179    'skip$
180    'new.block
181  if$
182}
183FUNCTION {field.or.null}
184{ duplicate$ empty$
185    { pop$ "" }
186    'skip$
187  if$
188}
189FUNCTION {emphasize}
190{ duplicate$ empty$
191    { pop$ "" }
192    { "\textit{" swap$ * "}" * }
193  if$
194}
195FUNCTION {bolden}
196{ duplicate$ empty$
197    { pop$ "" }
198    { "\textbf{" swap$ * "}" * }
199  if$
200}
201FUNCTION {tie.or.space.prefix}
202{ duplicate$ text.length$ #3 <
203    { "~" }
204    { " " }
205  if$
206  swap$
207}
208
209FUNCTION {capitalize}
210{ "u" change.case$ "t" change.case$ }
211
212FUNCTION {space.word}
213{ " " swap$ * " " * }
214 % Here are the language-specific definitions for explicit words.
215 % Each function has a name bbl.xxx where xxx is the English word.
216 % The language selected here is ENGLISH
217FUNCTION {bbl.and}
218{ "and"}
219
220FUNCTION {bbl.etal}
221{ "et~al." }
222
223FUNCTION {bbl.editors}
224{ "Eds." }
225
226FUNCTION {bbl.editor}
227{ "Ed." }
228
229FUNCTION {bbl.edby}
230{ "edited by" }
231
232FUNCTION {bbl.edition}
233{ "ed." }
234
235FUNCTION {bbl.volume}
236{ "Vol." }
237
238FUNCTION {bbl.of}
239{ "of" }
240
241FUNCTION {bbl.number}
242{ "No." }
243
244FUNCTION {bbl.nr}
245{ "No." }
246
247FUNCTION {bbl.in}
248{ "in" }
249
250FUNCTION {bbl.pages}
251{ "pp." }
252
253FUNCTION {bbl.page}
254{ "p." }
255
256FUNCTION {bbl.chapter}
257{ "chap." }
258
259FUNCTION {bbl.techrep}
260{ "Tech. Rep." }
261
262FUNCTION {bbl.mthesis}
263{ "Master's thesis" }
264
265FUNCTION {bbl.phdthesis}
266{ "Ph.D. thesis" }
267
268FUNCTION {bbl.first}
269{ "1st" }
270
271FUNCTION {bbl.second}
272{ "2d" }
273
274FUNCTION {bbl.third}
275{ "3d" }
276
277FUNCTION {bbl.fourth}
278{ "4th" }
279
280FUNCTION {bbl.fifth}
281{ "5th" }
282
283FUNCTION {bbl.st}
284{ "st" }
285
286FUNCTION {bbl.nd}
287{ "d" }
288
289FUNCTION {bbl.rd}
290{ "d" }
291
292FUNCTION {bbl.th}
293{ "th" }
294
295MACRO {jan} {"Jan."}
296
297MACRO {feb} {"Feb."}
298
299MACRO {mar} {"Mar."}
300
301MACRO {apr} {"Apr."}
302
303MACRO {may} {"May"}
304
305MACRO {jun} {"Jun."}
306
307MACRO {jul} {"Jul."}
308
309MACRO {aug} {"Aug."}
310
311MACRO {sep} {"Sep."}
312
313MACRO {oct} {"Oct."}
314
315MACRO {nov} {"Nov."}
316
317MACRO {dec} {"Dec."}
318
319FUNCTION {eng.ord}
320{ duplicate$ "1" swap$ *
321  #-2 #1 substring$ "1" =
322     { bbl.th * }
323     { duplicate$ #-1 #1 substring$
324       duplicate$ "1" =
325         { pop$ bbl.st * }
326         { duplicate$ "2" =
327             { pop$ bbl.nd * }
328             { "3" =
329                 { bbl.rd * }
330                 { bbl.th * }
331               if$
332             }
333           if$
334          }
335       if$
336     }
337   if$
338}
339
340MACRO {acmcs} {"ACM Comput. Surv."}
341
342MACRO {acta} {"Acta Inf."}
343
344MACRO {cacm} {"Commun. ACM"}
345
346MACRO {ibmjrd} {"IBM J. Res. Dev."}
347
348MACRO {ibmsj} {"IBM Syst.~J."}
349
350MACRO {ieeese} {"IEEE Trans. Software Eng."}
351
352MACRO {ieeetc} {"IEEE Trans. Comput."}
353
354MACRO {ieeetcad}
355 {"IEEE Trans. Comput. Aid. Des."}
356
357MACRO {ipl} {"Inf. Process. Lett."}
358
359MACRO {jacm} {"J.~ACM"}
360
361MACRO {jcss} {"J.~Comput. Syst. Sci."}
362
363MACRO {scp} {"Sci. Comput. Program."}
364
365MACRO {sicomp} {"SIAM J. Comput."}
366
367MACRO {tocs} {"ACM Trans. Comput. Syst."}
368
369MACRO {tods} {"ACM Trans. Database Syst."}
370
371MACRO {tog} {"ACM Trans. Graphic."}
372
373MACRO {toms} {"ACM Trans. Math. Software"}
374
375MACRO {toois} {"ACM Trans. Office Inf. Syst."}
376
377MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
378
379MACRO {tcs} {"Theor. Comput. Sci."}
380
381FUNCTION {bibinfo.check}
382{ swap$
383  duplicate$ missing$
384    {
385      pop$ pop$
386      ""
387    }
388    { duplicate$ empty$
389        {
390          swap$ pop$
391        }
392        { swap$
393          pop$
394        }
395      if$
396    }
397  if$
398}
399FUNCTION {bibinfo.warn}
400{ swap$
401  duplicate$ missing$
402    {
403      swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
404      ""
405    }
406    { duplicate$ empty$
407        {
408          swap$ "empty " swap$ * " in " * cite$ * warning$
409        }
410        { swap$
411          pop$
412        }
413      if$
414    }
415  if$
416}
417FUNCTION {format.eprint}
418{ eprint duplicate$ empty$
419    'skip$
420    { "\eprint"
421      archive empty$
422        'skip$
423        { "[" * archive * "]" * }
424      if$
425      "{" * swap$ * "}" *
426    }
427  if$
428}
429STRINGS  { bibinfo}
430INTEGERS { nameptr namesleft numnames }
431
432FUNCTION {format.names}
433{ 'bibinfo :=
434  duplicate$ empty$ 'skip$ {
435  's :=
436  "" 't :=
437  #1 'nameptr :=
438  s num.names$ 'numnames :=
439  numnames 'namesleft :=
440    { namesleft #0 > }
441    { s nameptr
442      duplicate$ #1 >
443        { "{f.~}{vv~}{ll}{, jj}" }
444        { "{vv~}{ll}{, f.}{, jj}" }
445      if$
446      format.name$
447      bibinfo bibinfo.check
448      't :=
449      nameptr #1 >
450        {
451          namesleft #1 >
452            { ", " * t * }
453            {
454              numnames #2 >
455                { "," * }
456                'skip$
457              if$
458              s nameptr "{ll}" format.name$ duplicate$ "others" =
459                { 't := }
460                { pop$ }
461              if$
462              t "others" =
463                {
464                  " " * bbl.etal *
465                }
466                {
467                  bbl.and
468                  space.word * t *
469                }
470              if$
471            }
472          if$
473        }
474        't
475      if$
476      nameptr #1 + 'nameptr :=
477      namesleft #1 - 'namesleft :=
478    }
479  while$
480  } if$
481}
482FUNCTION {format.names.ed}
483{
484  format.names
485}
486FUNCTION {format.key}
487{ empty$
488    { key field.or.null }
489    { "" }
490  if$
491}
492
493FUNCTION {format.authors}
494{ author "author" format.names
495}
496FUNCTION {get.bbl.editor}
497{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
498
499FUNCTION {format.editors}
500{ editor "editor" format.names duplicate$ empty$ 'skip$
501    {
502      "," *
503      " " *
504      get.bbl.editor
505      capitalize
506   "(" swap$ * ")" *
507      *
508    }
509  if$
510}
511FUNCTION {format.book.pages}
512{ pages "pages" bibinfo.check
513  duplicate$ empty$ 'skip$
514    { " " * bbl.pages * }
515  if$
516}
517FUNCTION {format.doi}
518{ doi "doi" bibinfo.check
519  duplicate$ empty$ 'skip$
520    {
521      "\doi{" swap$ * "}" *
522    }
523  if$
524}
525FUNCTION {format.note}
526{
527  url empty$
528    'skip$
529    { "\urlprefix\url{" url * "}" * output }
530  if$
531 note empty$
532    { "" }
533    { note #1 #1 substring$
534      duplicate$ "{" =
535        'skip$
536        { output.state mid.sentence =
537          { "l" }
538          { "u" }
539        if$
540        change.case$
541        }
542      if$
543      note #2 global.max$ substring$ * "note" bibinfo.check
544    }
545  if$
546}
547
548FUNCTION {format.title}
549{ title
550  duplicate$ empty$ 'skip$
551    { "t" change.case$ }
552  if$
553  "title" bibinfo.check
554}
555FUNCTION {format.full.names}
556{'s :=
557 "" 't :=
558  #1 'nameptr :=
559  s num.names$ 'numnames :=
560  numnames 'namesleft :=
561    { namesleft #0 > }
562    { s nameptr
563      "{vv~}{ll}" format.name$
564      't :=
565      nameptr #1 >
566        {
567          namesleft #1 >
568            { ", " * t * }
569            {
570              s nameptr "{ll}" format.name$ duplicate$ "others" =
571                { 't := }
572                { pop$ }
573              if$
574              t "others" =
575                {
576                  " " * bbl.etal *
577                }
578                {
579                  numnames #2 >
580                    { "," * }
581                    'skip$
582                  if$
583                  bbl.and
584                  space.word * t *
585                }
586              if$
587            }
588          if$
589        }
590        't
591      if$
592      nameptr #1 + 'nameptr :=
593      namesleft #1 - 'namesleft :=
594    }
595  while$
596}
597
598FUNCTION {author.editor.key.full}
599{ author empty$
600    { editor empty$
601        { key empty$
602            { cite$ #1 #3 substring$ }
603            'key
604          if$
605        }
606        { editor format.full.names }
607      if$
608    }
609    { author format.full.names }
610  if$
611}
612
613FUNCTION {author.key.full}
614{ author empty$
615    { key empty$
616         { cite$ #1 #3 substring$ }
617          'key
618      if$
619    }
620    { author format.full.names }
621  if$
622}
623
624FUNCTION {editor.key.full}
625{ editor empty$
626    { key empty$
627         { cite$ #1 #3 substring$ }
628          'key
629      if$
630    }
631    { editor format.full.names }
632  if$
633}
634
635FUNCTION {make.full.names}
636{ type$ "book" =
637  type$ "inbook" =
638  or
639    'author.editor.key.full
640    { type$ "proceedings" =
641        'editor.key.full
642        'author.key.full
643      if$
644    }
645  if$
646}
647
648FUNCTION {output.bibitem}
649{ newline$
650  "\bibitem[{" write$
651  label write$
652  ")" make.full.names duplicate$ short.list =
653     { pop$ }
654     { * }
655   if$
656  "}]{" * write$
657  cite$ write$
658  "}" write$
659  newline$
660  ""
661  before.all 'output.state :=
662}
663
664FUNCTION {if.digit}
665{ duplicate$ "0" =
666  swap$ duplicate$ "1" =
667  swap$ duplicate$ "2" =
668  swap$ duplicate$ "3" =
669  swap$ duplicate$ "4" =
670  swap$ duplicate$ "5" =
671  swap$ duplicate$ "6" =
672  swap$ duplicate$ "7" =
673  swap$ duplicate$ "8" =
674  swap$ "9" = or or or or or or or or or
675}
676FUNCTION {n.separate}
677{ 't :=
678  ""
679  #0 'numnames :=
680  { t empty$ not }
681  { t #-1 #1 substring$ if.digit
682      { numnames #1 + 'numnames := }
683      { #0 'numnames := }
684    if$
685    t #-1 #1 substring$ swap$ *
686    t #-2 global.max$ substring$ 't :=
687    numnames #5 =
688      { duplicate$ #1 #2 substring$ swap$
689        #3 global.max$ substring$
690        "\," swap$ * *
691      }
692      'skip$
693    if$
694  }
695  while$
696}
697FUNCTION {n.dashify}
698{
699  n.separate
700  't :=
701  ""
702    { t empty$ not }
703    { t #1 #1 substring$ "-" =
704        { t #1 #2 substring$ "--" = not
705            { "--" *
706              t #2 global.max$ substring$ 't :=
707            }
708            {   { t #1 #1 substring$ "-" = }
709                { "-" *
710                  t #2 global.max$ substring$ 't :=
711                }
712              while$
713            }
714          if$
715        }
716        { t #1 #1 substring$ *
717          t #2 global.max$ substring$ 't :=
718        }
719      if$
720    }
721  while$
722}
723
724FUNCTION {word.in}
725{ "" }
726
727FUNCTION {format.date}
728{ year "year" bibinfo.check duplicate$ empty$
729    {
730      "empty year in " cite$ * "; set to ????" * warning$
731       pop$ "????"
732    }
733    'skip$
734  if$
735  extra.label *
736  before.all 'output.state :=
737  ", " swap$ *
738}
739FUNCTION {format.btitle}
740{ title "title" bibinfo.check
741  duplicate$ empty$ 'skip$
742    {
743      emphasize
744    }
745  if$
746}
747FUNCTION {either.or.check}
748{ empty$
749    'pop$
750    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
751  if$
752}
753FUNCTION {format.bvolume}
754{ volume empty$
755    { "" }
756    { bbl.volume volume tie.or.space.prefix
757      "volume" bibinfo.check * *
758      series "series" bibinfo.check
759      duplicate$ empty$ 'pop$
760%%% NO ITALIC SERIES        { emphasize ", " * swap$ * }
761      {", " * swap$ * }
762      if$
763      "volume and number" number either.or.check
764    }
765  if$
766}
767FUNCTION {format.number.series}
768{ volume empty$
769    { number empty$
770        { series field.or.null }
771        { series empty$
772            { number "number" bibinfo.check }
773            { output.state mid.sentence =
774                { bbl.number }
775                { bbl.number capitalize }
776              if$
777              number tie.or.space.prefix "number" bibinfo.check * *
778              bbl.in space.word *
779              series "series" bibinfo.check *
780            }
781          if$
782        }
783      if$
784    }
785    { "" }
786  if$
787}
788FUNCTION {is.num}
789{ chr.to.int$
790  duplicate$ "0" chr.to.int$ < not
791  swap$ "9" chr.to.int$ > not and
792}
793
794FUNCTION {extract.num}
795{ duplicate$ 't :=
796  "" 's :=
797  { t empty$ not }
798  { t #1 #1 substring$
799    t #2 global.max$ substring$ 't :=
800    duplicate$ is.num
801      { s swap$ * 's := }
802      { pop$ "" 't := }
803    if$
804  }
805  while$
806  s empty$
807    'skip$
808    { pop$ s }
809  if$
810}
811
812FUNCTION {convert.edition}
813{ extract.num "l" change.case$ 's :=
814  s "first" = s "1" = or
815    { bbl.first 't := }
816    { s "second" = s "2" = or
817        { bbl.second 't := }
818        { s "third" = s "3" = or
819            { bbl.third 't := }
820            { s "fourth" = s "4" = or
821                { bbl.fourth 't := }
822                { s "fifth" = s "5" = or
823                    { bbl.fifth 't := }
824                    { s #1 #1 substring$ is.num
825                        { s eng.ord 't := }
826                        { edition 't := }
827                      if$
828                    }
829                  if$
830                }
831              if$
832            }
833          if$
834        }
835      if$
836    }
837  if$
838  t
839}
840
841FUNCTION {format.edition}
842{ edition duplicate$ empty$ 'skip$
843    {
844      convert.edition
845      output.state mid.sentence =
846        { "l" }
847        { "t" }
848      if$ change.case$
849      "edition" bibinfo.check
850      " " * bbl.edition *
851    }
852  if$
853}
854INTEGERS { multiresult }
855FUNCTION {multi.page.check}
856{ 't :=
857  #0 'multiresult :=
858    { multiresult not
859      t empty$ not
860      and
861    }
862    { t #1 #1 substring$
863      duplicate$ "-" =
864      swap$ duplicate$ "," =
865      swap$ "+" =
866      or or
867        { #1 'multiresult := }
868        { t #2 global.max$ substring$ 't := }
869      if$
870    }
871  while$
872  multiresult
873}
874FUNCTION {format.pages}
875{ pages duplicate$ empty$ 'skip$
876    { duplicate$ multi.page.check
877        {
878          n.dashify
879        }
880        {
881        }
882      if$
883      "pages" bibinfo.check
884    }
885  if$
886}
887FUNCTION {format.journal.pages}
888{ pages duplicate$ empty$ 'pop$
889    { swap$ duplicate$ empty$
890        { pop$ pop$ format.pages }
891        {
892          ", " *
893          swap$
894          n.dashify
895          "pages" bibinfo.check
896          *
897        }
898      if$
899    }
900  if$
901}
902FUNCTION {format.journal.eid}
903{ eid "eid" bibinfo.check
904  duplicate$ empty$ 'pop$
905    { swap$ duplicate$ empty$ 'skip$
906      {
907          ", " *
908      }
909      if$
910      swap$ *
911    }
912  if$
913}
914FUNCTION {format.vol.num.pages}
915{ volume field.or.null
916  duplicate$ empty$ 'skip$
917    {
918      "volume" bibinfo.check
919    }
920  if$
921  number "number" bibinfo.check duplicate$ empty$ 'skip$
922    {
923      swap$ duplicate$ empty$
924        { "there's a number but no volume in " cite$ * warning$ }
925        'skip$
926      if$
927      swap$
928      "~(" swap$ * ")" *
929    }
930  if$ *
931  bolden
932  eid empty$
933    { format.journal.pages }
934    { format.journal.eid }
935  if$
936}
937
938FUNCTION {format.chapter.pages}
939{ chapter empty$
940    'format.pages
941    { type empty$
942        { bbl.chapter }
943        { type "l" change.case$
944          "type" bibinfo.check
945        }
946      if$
947      chapter tie.or.space.prefix
948      "chapter" bibinfo.check
949      * *
950      pages empty$
951        'skip$
952        { ", " * format.pages * }
953      if$
954    }
955  if$
956}
957
958FUNCTION {format.booktitle}
959{
960  booktitle "booktitle" bibinfo.check
961  emphasize
962}
963FUNCTION {format.in.ed.booktitle}
964{ format.booktitle duplicate$ empty$ 'skip$
965    {
966      editor "editor" format.names.ed duplicate$ empty$ 'pop$
967        {
968          get.bbl.editor
969          swap$ "," *
970          " " * swap$ *
971          swap$
972          "," *
973          " " * swap$
974          * }
975      if$
976      word.in swap$ *
977    }
978  if$
979}
980FUNCTION {format.thesis.type}
981{ type duplicate$ empty$
982    'pop$
983    { swap$ pop$
984      "t" change.case$ "type" bibinfo.check
985    }
986  if$
987}
988FUNCTION {format.tr.number}
989{ number "number" bibinfo.check
990  type duplicate$ empty$
991    { pop$ bbl.techrep }
992    'skip$
993  if$
994  "type" bibinfo.check
995  swap$ duplicate$ empty$
996    { pop$ "t" change.case$ }
997    { tie.or.space.prefix * * }
998  if$
999}
1000FUNCTION {format.article.crossref}
1001{
1002  word.in
1003  " \cite{" * crossref * "}" *
1004}
1005FUNCTION {format.book.crossref}
1006{ volume duplicate$ empty$
1007    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
1008      pop$ word.in
1009    }
1010    { bbl.volume
1011      capitalize
1012      swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
1013    }
1014  if$
1015  " \cite{" * crossref * "}" *
1016}
1017FUNCTION {format.incoll.inproc.crossref}
1018{
1019  word.in
1020  " \cite{" * crossref * "}" *
1021}
1022FUNCTION {format.org.or.pub}
1023{ 't :=
1024  ""
1025  address empty$ t empty$ and
1026    'skip$
1027    {
1028      t empty$
1029        { address "address" bibinfo.check *
1030        }
1031        { t *
1032          address empty$
1033            'skip$
1034            { ", " * address "address" bibinfo.check * }
1035          if$
1036        }
1037      if$
1038    }
1039  if$
1040}
1041FUNCTION {format.publisher.address}
1042{ publisher "publisher" bibinfo.warn format.org.or.pub
1043}
1044
1045FUNCTION {format.organization.address}
1046{ organization "organization" bibinfo.check format.org.or.pub
1047}
1048
1049STRINGS {oldname}
1050
1051FUNCTION {name.or.dash}
1052{ 's :=
1053   oldname empty$
1054     { s 'oldname := s }
1055     { s oldname =
1056         { "---{}---{}---" }
1057         { s 'oldname := s }
1058       if$
1059     }
1060   if$
1061}
1062
1063FUNCTION {article}
1064{ output.bibitem
1065  format.authors "author" output.check
1066  author format.key output
1067  name.or.dash
1068  format.date "year" output.check
1069  date.block
1070  format.title "title" output.check
1071  new.sentence
1072  crossref missing$
1073    {
1074      journal
1075      "journal" bibinfo.check
1076      emphasize
1077      "journal" output.check
1078      format.vol.num.pages output
1079  format.doi output
1080    }
1081    { format.article.crossref output.nonnull
1082      format.pages output
1083    }
1084  if$
1085  format.note output
1086  format.eprint output
1087  fin.entry
1088}
1089FUNCTION {book}
1090{ output.bibitem
1091  author empty$
1092    { format.editors "author and editor" output.check
1093      editor format.key output
1094      add.blank
1095      name.or.dash
1096    }
1097    { format.authors output.nonnull
1098      name.or.dash
1099      crossref missing$
1100        { "author and editor" editor either.or.check }
1101        'skip$
1102      if$
1103    }
1104  if$
1105  format.date "year" output.check
1106  date.block
1107  format.btitle "title" output.check
1108  crossref missing$
1109    { format.bvolume output
1110  new.sentence
1111      format.edition output
1112      format.number.series output
1113      format.publisher.address output
1114    }
1115    {
1116  new.sentence
1117      format.book.crossref output.nonnull
1118    }
1119  if$
1120  format.book.pages output
1121  format.doi output
1122  format.note output
1123  format.eprint output
1124  fin.entry
1125}
1126FUNCTION {booklet}
1127{ output.bibitem
1128  format.authors output
1129  author format.key output
1130  name.or.dash
1131  format.date "year" output.check
1132  date.block
1133  format.title "title" output.check
1134  new.sentence
1135  howpublished "howpublished" bibinfo.check output
1136  address "address" bibinfo.check output
1137  format.book.pages output
1138  format.doi output
1139  format.note output
1140  format.eprint output
1141  fin.entry
1142}
1143
1144FUNCTION {inbook}
1145{ output.bibitem
1146  author empty$
1147    { format.editors "author and editor" output.check
1148      editor format.key output
1149      name.or.dash
1150    }
1151    { format.authors output.nonnull
1152      name.or.dash
1153      crossref missing$
1154        { "author and editor" editor either.or.check }
1155        'skip$
1156      if$
1157    }
1158  if$
1159  format.date "year" output.check
1160  date.block
1161  format.btitle "title" output.check
1162  crossref missing$
1163    {
1164      format.bvolume output
1165      format.chapter.pages "chapter and pages" output.check
1166  new.sentence
1167      format.edition output
1168      format.number.series output
1169      format.publisher.address output
1170    }
1171    {
1172      format.chapter.pages "chapter and pages" output.check
1173  new.sentence
1174      format.book.crossref output.nonnull
1175    }
1176  if$
1177  format.doi output
1178  format.note output
1179  format.eprint output
1180  fin.entry
1181}
1182
1183FUNCTION {incollection}
1184{ output.bibitem
1185  format.authors "author" output.check
1186  author format.key output
1187  name.or.dash
1188  format.date "year" output.check
1189  date.block
1190  format.title "title" output.check
1191  new.sentence
1192  crossref missing$
1193    { format.in.ed.booktitle "booktitle" output.check
1194      format.publisher.address output     
1195      format.bvolume output
1196      format.number.series output
1197      format.edition output
1198      format.chapter.pages output
1199    }
1200    { format.incoll.inproc.crossref output.nonnull
1201      format.chapter.pages output
1202    }
1203  if$
1204  format.doi output
1205  format.note output
1206  format.eprint output
1207  fin.entry
1208}
1209FUNCTION {inproceedings}
1210{ output.bibitem
1211  format.authors "author" output.check
1212  author format.key output
1213  name.or.dash
1214  format.date "year" output.check
1215  date.block
1216  format.title "title" output.check
1217  new.sentence
1218  crossref missing$
1219    { format.in.ed.booktitle "booktitle" output.check
1220      publisher empty$
1221        { format.organization.address output }
1222        { organization "organization" bibinfo.check output
1223          format.publisher.address output
1224        }
1225      if$
1226      format.bvolume output
1227      format.pages output
1228      format.number.series output
1229      howpublished "howpublished" bibinfo.check output
1230    }
1231    { format.incoll.inproc.crossref output.nonnull
1232      format.pages output
1233    }
1234  if$
1235  format.doi output
1236  format.note output
1237  format.eprint output
1238  fin.entry
1239}
1240FUNCTION {conference} { inproceedings }
1241FUNCTION {manual}
1242{ output.bibitem
1243  format.authors output
1244  author format.key output
1245  name.or.dash
1246  format.date "year" output.check
1247  date.block
1248  format.btitle "title" output.check
1249  new.sentence
1250  organization "organization" bibinfo.check output
1251  address "address" bibinfo.check output
1252  format.edition output
1253  format.doi output
1254  format.note output
1255  format.eprint output
1256  fin.entry
1257}
1258
1259FUNCTION {mastersthesis}
1260{ output.bibitem
1261  format.authors "author" output.check
1262  author format.key output
1263  name.or.dash
1264  format.date "year" output.check
1265  date.block
1266  format.title
1267  "title" output.check
1268  new.sentence
1269  bbl.mthesis format.thesis.type output.nonnull
1270  department "department" bibinfo.warn output
1271  school "school" bibinfo.warn output
1272  address "address" bibinfo.check output
1273  format.doi output
1274  format.note output
1275  format.eprint output
1276  fin.entry
1277}
1278
1279FUNCTION {misc}
1280{ output.bibitem
1281  format.authors output
1282  author format.key output
1283  name.or.dash
1284  format.date "year" output.check
1285  date.block
1286  format.title output
1287  new.sentence
1288  howpublished "howpublished" bibinfo.check output
1289  format.doi output
1290  format.note output
1291  format.eprint output
1292  fin.entry
1293}
1294FUNCTION {phdthesis}
1295{ output.bibitem
1296  format.authors "author" output.check
1297  author format.key output
1298  name.or.dash
1299  format.date "year" output.check
1300  date.block
1301  format.title
1302  "title" output.check
1303  new.sentence
1304  bbl.phdthesis format.thesis.type output.nonnull
1305  school "school" bibinfo.warn output
1306  address "address" bibinfo.check output
1307  format.doi output
1308  format.note output
1309  format.eprint output
1310  fin.entry
1311}
1312
1313FUNCTION {proceedings}
1314{ output.bibitem
1315  format.editors output
1316  editor format.key output
1317  name.or.dash
1318  format.date "year" output.check
1319  date.block
1320  format.btitle "title" output.check
1321  format.bvolume output
1322  format.number.series output
1323  publisher empty$
1324    { format.organization.address output }
1325    { organization "organization" bibinfo.check output
1326      format.publisher.address output
1327    }
1328  if$
1329  format.doi output
1330  format.note output
1331  format.eprint output
1332  fin.entry
1333}
1334
1335FUNCTION {techreport}
1336{ output.bibitem
1337  format.authors "author" output.check
1338  author format.key output
1339  name.or.dash
1340  format.date "year" output.check
1341  date.block
1342  format.title
1343  "title" output.check
1344  new.sentence
1345  format.tr.number output.nonnull
1346  institution "institution" bibinfo.warn output
1347  address "address" bibinfo.check output
1348  format.doi output
1349  format.note output
1350  format.eprint output
1351  fin.entry
1352}
1353
1354FUNCTION {unpublished}
1355{ output.bibitem
1356  format.authors "author" output.check
1357  author format.key output
1358  name.or.dash
1359  format.date "year" output.check
1360  date.block
1361  format.title "title" output.check
1362  format.doi output
1363  format.note "note" output.check
1364  format.eprint output
1365  fin.entry
1366}
1367
1368FUNCTION {default.type} { misc }
1369READ
1370FUNCTION {sortify}
1371{ purify$
1372  "l" change.case$
1373}
1374INTEGERS { len }
1375FUNCTION {chop.word}
1376{ 's :=
1377  'len :=
1378  s #1 len substring$ =
1379    { s len #1 + global.max$ substring$ }
1380    's
1381  if$
1382}
1383FUNCTION {format.lab.names}
1384{ 's :=
1385  "" 't :=
1386  s #1 "{vv~}{ll}" format.name$
1387  s num.names$ duplicate$
1388  #2 >
1389    { pop$
1390      " " * bbl.etal *
1391    }
1392    { #2 <
1393        'skip$
1394        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1395            {
1396              " " * bbl.etal *
1397            }
1398            { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
1399              * }
1400          if$
1401        }
1402      if$
1403    }
1404  if$
1405}
1406
1407FUNCTION {author.key.label}
1408{ author empty$
1409    { key empty$
1410        { cite$ #1 #3 substring$ }
1411        'key
1412      if$
1413    }
1414    { author format.lab.names }
1415  if$
1416}
1417
1418FUNCTION {author.editor.key.label}
1419{ author empty$
1420    { editor empty$
1421        { key empty$
1422            { cite$ #1 #3 substring$ }
1423            'key
1424          if$
1425        }
1426        { editor format.lab.names }
1427      if$
1428    }
1429    { author format.lab.names }
1430  if$
1431}
1432
1433FUNCTION {editor.key.label}
1434{ editor empty$
1435    { key empty$
1436        { cite$ #1 #3 substring$ }
1437        'key
1438      if$
1439    }
1440    { editor format.lab.names }
1441  if$
1442}
1443
1444FUNCTION {calc.short.authors}
1445{ type$ "book" =
1446  type$ "inbook" =
1447  or
1448    'author.editor.key.label
1449    { type$ "proceedings" =
1450        'editor.key.label
1451        'author.key.label
1452      if$
1453    }
1454  if$
1455  'short.list :=
1456}
1457
1458FUNCTION {calc.label}
1459{ calc.short.authors
1460  short.list
1461  "("
1462  *
1463  year duplicate$ empty$
1464     { pop$ "????" }
1465     { purify$ #-1 #4 substring$ }
1466  if$
1467  *
1468  'label :=
1469}
1470
1471FUNCTION {sort.format.names}
1472{ 's :=
1473  #1 'nameptr :=
1474  ""
1475  s num.names$ 'numnames :=
1476  numnames 'namesleft :=
1477    { namesleft #0 > }
1478    { s nameptr
1479      "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}"
1480      format.name$ 't :=
1481      nameptr #1 >
1482        {
1483          "   "  *
1484          namesleft #1 = t "others" = and
1485            { "zzzzz" * }
1486            { t sortify * }
1487          if$
1488        }
1489        { t sortify * }
1490      if$
1491      nameptr #1 + 'nameptr :=
1492      namesleft #1 - 'namesleft :=
1493    }
1494  while$
1495}
1496
1497FUNCTION {sort.format.title}
1498{ 't :=
1499  "A " #2
1500    "An " #3
1501      "The " #4 t chop.word
1502    chop.word
1503  chop.word
1504  sortify
1505  #1 global.max$ substring$
1506}
1507FUNCTION {author.sort}
1508{ author empty$
1509    { key empty$
1510        { "to sort, need author or key in " cite$ * warning$
1511          ""
1512        }
1513        { key sortify }
1514      if$
1515    }
1516    { author sort.format.names }
1517  if$
1518}
1519FUNCTION {author.editor.sort}
1520{ author empty$
1521    { editor empty$
1522        { key empty$
1523            { "to sort, need author, editor, or key in " cite$ * warning$
1524              ""
1525            }
1526            { key sortify }
1527          if$
1528        }
1529        { editor sort.format.names }
1530      if$
1531    }
1532    { author sort.format.names }
1533  if$
1534}
1535FUNCTION {editor.sort}
1536{ editor empty$
1537    { key empty$
1538        { "to sort, need editor or key in " cite$ * warning$
1539          ""
1540        }
1541        { key sortify }
1542      if$
1543    }
1544    { editor sort.format.names }
1545  if$
1546}
1547FUNCTION {presort}
1548{ calc.label
1549  label sortify
1550  "    "
1551  *
1552  type$ "book" =
1553  type$ "inbook" =
1554  or
1555    'author.editor.sort
1556    { type$ "proceedings" =
1557        'editor.sort
1558        'author.sort
1559      if$
1560    }
1561  if$
1562  #1 entry.max$ substring$
1563  'sort.label :=
1564  sort.label
1565  *
1566  "    "
1567  *
1568  title field.or.null
1569  sort.format.title
1570  *
1571  #1 entry.max$ substring$
1572  'sort.key$ :=
1573}
1574
1575ITERATE {presort}
1576SORT
1577STRINGS { last.label next.extra }
1578INTEGERS { last.extra.num number.label }
1579FUNCTION {initialize.extra.label.stuff}
1580{ #0 int.to.chr$ 'last.label :=
1581  "" 'next.extra :=
1582  #0 'last.extra.num :=
1583  #0 'number.label :=
1584}
1585FUNCTION {forward.pass}
1586{ last.label label =
1587    { last.extra.num #1 + 'last.extra.num :=
1588      last.extra.num int.to.chr$ 'extra.label :=
1589    }
1590    { "a" chr.to.int$ 'last.extra.num :=
1591      "" 'extra.label :=
1592      label 'last.label :=
1593    }
1594  if$
1595  number.label #1 + 'number.label :=
1596}
1597FUNCTION {reverse.pass}
1598{ next.extra "b" =
1599    { "a" 'extra.label := }
1600    'skip$
1601  if$
1602  extra.label 'next.extra :=
1603  extra.label
1604  duplicate$ empty$
1605    'skip$
1606    { "{\natexlab{" swap$ * "}}" * }
1607  if$
1608  'extra.label :=
1609  label extra.label * 'label :=
1610}
1611EXECUTE {initialize.extra.label.stuff}
1612ITERATE {forward.pass}
1613REVERSE {reverse.pass}
1614FUNCTION {bib.sort.order}
1615{ sort.label
1616  "    "
1617  *
1618  year field.or.null sortify
1619  *
1620  "    "
1621  *
1622  title field.or.null
1623  sort.format.title
1624  *
1625  #1 entry.max$ substring$
1626  'sort.key$ :=
1627}
1628ITERATE {bib.sort.order}
1629SORT
1630FUNCTION {begin.bib}
1631{ preamble$ empty$
1632    'skip$
1633    { preamble$ write$ newline$ }
1634  if$
1635  "\begin{thebibliography}{" number.label int.to.str$ * "}" *
1636  write$ newline$
1637  "\providecommand{\natexlab}[1]{#1}"
1638  write$ newline$
1639  "\providecommand{\url}[1]{\texttt{#1}}"
1640  write$ newline$
1641  "\providecommand{\urlprefix}{URL }"
1642  write$ newline$
1643  "\expandafter\ifx\csname urlstyle\endcsname\relax"
1644  write$ newline$
1645  "  \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
1646  write$ newline$
1647  "  \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
1648  write$ newline$
1649  "\providecommand{\eprint}[2][]{\url{#2}}"
1650  write$ newline$
1651}
1652EXECUTE {begin.bib}
1653EXECUTE {init.state.consts}
1654ITERATE {call.type$}
1655FUNCTION {end.bib}
1656{ newline$
1657  "\end{thebibliography}" write$ newline$
1658}
1659EXECUTE {end.bib}
1660%% End of customized bst file
1661%%
1662%% End of file `ametsoc7.bst'.
Note: See TracBrowser for help on using the repository browser.