hekeus@51: %Filename: AAAI.bst hekeus@51: % BibTeX `aaai' style file for BibTeX version 0.99c, LaTeX version 2.09 hekeus@51: % Version of 22 February 2008 hekeus@51: % Place it in a file called aaai.bst in the BibTeX search path. (Placing it hekeus@51: % in the same directory as the LaTeX document should also work.) hekeus@51: % Support for named citations is provided by named.sty hekeus@51: % This version was made by modifying the master file made by hekeus@51: % Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU) hekeus@51: % Copyright (C) 1985, all rights reserved. hekeus@51: % Modifications Copyright (C) 1988, 1989, 1994, Peter F. Patel-Schneider hekeus@51: % Copying of this file is authorized only if either hekeus@51: % (1) you make absolutely no changes to your copy, including name, or hekeus@51: % (2) if you do make changes, you name it something other than hekeus@51: % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst. hekeus@51: % This restriction helps ensure that all standard styles are identical. hekeus@51: % This style is NOT guaranteed to work. It is provided in the hope hekeus@51: % that it will make the preparation of papers easier. hekeus@51: % hekeus@51: % There are undoubtably bugs in this style. If you make bug fixes, hekeus@51: % improvements, etc. please us know (www.aaai.org) hekeus@51: % The preparation of this modified file was supported by Schlumberger Palo hekeus@51: % Alto Research and AT\&T Bell Laboratories. hekeus@51: % Modifications Copyright (C) 1990. Sunil Issar si@cs.cmu.edu hekeus@51: % Modified the file so that the Bibliography style is closer to the hekeus@51: % one specified in the Instructions to Authors for AAAI papers. hekeus@51: % This style is NOT guaranteed to work. It is provided in the hope hekeus@51: % that it will make the preparation of papers easier. hekeus@51: % Standard disclaimers apply. Send comments etc., to si@cs.cmu.edu hekeus@51: % This file can be used in other conferences as long as credit to the hekeus@51: % authors and supporting agencies is retained, this notice is not changed, hekeus@51: % and further modification or reuse is not restricted. hekeus@51: % Name format in citations: hekeus@51: % single authorFirst hekeus@51: % two authorsFirst and Second hekeus@51: % three authorsFirst, Second, and Third hekeus@51: % more authorsFirst et al. hekeus@51: % hekeus@51: % Bibliography format hekeus@51: % author. date. other. hekeus@51: % Author format hekeus@51: % single authorFirst, Initials hekeus@51: % two authorsFirst, Initials, and Second, Initials hekeus@51: % more authorsFirst, Initials; ...; and Last, Initials hekeus@51: % hekeus@51: % Reference list ordering: alphabetical by author or whatever passes hekeus@51: % for author in the absence of one. hekeus@51: % hekeus@51: % This BibTeX style has support for short (year only) citations. This hekeus@51: % is done by having the citations actually look like hekeus@51: % \citeauthoryear{author-info}{year} hekeus@51: % The LaTeX style has to have support for this hekeus@51: ENTRY hekeus@51: { address hekeus@51: author hekeus@51: booktitle hekeus@51: chapter hekeus@51: edition hekeus@51: editor hekeus@51: howpublished hekeus@51: institution hekeus@51: journal hekeus@51: key hekeus@51: month hekeus@51: note hekeus@51: number hekeus@51: organization hekeus@51: pages hekeus@51: publisher hekeus@51: school hekeus@51: series hekeus@51: title hekeus@51: type hekeus@51: volume hekeus@51: year hekeus@51: } hekeus@51: {} hekeus@51: { label extra.label sort.label } hekeus@51: INTEGERS { output.state before.all mid.sentence after.sentence after.block } hekeus@51: FUNCTION {init.state.consts} hekeus@51: { #0 'before.all := hekeus@51: #1 'mid.sentence := hekeus@51: #2 'after.sentence := hekeus@51: #3 'after.block := hekeus@51: } hekeus@51: STRINGS { s t } hekeus@51: FUNCTION {output.nonnull} hekeus@51: { 's := hekeus@51: output.state mid.sentence = hekeus@51: { ", " * write$ } hekeus@51: { output.state after.block = hekeus@51: { add.period$ write$ hekeus@51: newline$ hekeus@51: "\newblock " write$ hekeus@51: } hekeus@51: { output.state before.all = hekeus@51: 'write$ hekeus@51: { add.period$ " " * write$ } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: mid.sentence 'output.state := hekeus@51: } hekeus@51: if$ hekeus@51: s hekeus@51: } hekeus@51: FUNCTION {sioutput.nonnull} hekeus@51: { 's := hekeus@51: output.state mid.sentence = hekeus@51: { " " * write$ } hekeus@51: { output.state after.block = hekeus@51: { add.period$ write$ hekeus@51: newline$ hekeus@51: "\newblock " write$ hekeus@51: } hekeus@51: { output.state before.all = hekeus@51: 'write$ hekeus@51: { add.period$ " " * write$ } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: mid.sentence 'output.state := hekeus@51: } hekeus@51: if$ hekeus@51: s hekeus@51: } hekeus@51: FUNCTION {output} hekeus@51: { duplicate$ empty$ hekeus@51: 'pop$ hekeus@51: 'output.nonnull hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {sioutput} hekeus@51: { duplicate$ empty$ hekeus@51: 'pop$ hekeus@51: 'sioutput.nonnull hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {output.check} hekeus@51: { 't := hekeus@51: duplicate$ empty$ hekeus@51: { pop$ "empty " t * " in " * cite$ * warning$ } hekeus@51: 'output.nonnull hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {output.bibitem} hekeus@51: { newline$ hekeus@51: "\bibitem[" write$ hekeus@51: label write$ hekeus@51: "]{" write$ hekeus@51: cite$ write$ hekeus@51: "}" write$ hekeus@51: newline$ hekeus@51: "" hekeus@51: before.all 'output.state := hekeus@51: } hekeus@51: FUNCTION {fin.entry} hekeus@51: { add.period$ hekeus@51: write$ hekeus@51: newline$ hekeus@51: } hekeus@51: FUNCTION {new.block} hekeus@51: { output.state before.all = hekeus@51: 'skip$ hekeus@51: { after.block 'output.state := } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {new.sentence} hekeus@51: { output.state after.block = hekeus@51: 'skip$ hekeus@51: { output.state before.all = hekeus@51: 'skip$ hekeus@51: { after.sentence 'output.state := } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {not} hekeus@51: { { #0 } hekeus@51: { #1 } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {and} hekeus@51: { 'skip$ hekeus@51: { pop$ #0 } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {or} hekeus@51: { { pop$ #1 } hekeus@51: 'skip$ hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {new.block.checka} hekeus@51: { empty$ hekeus@51: 'skip$ hekeus@51: 'new.block hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {new.block.checkb} hekeus@51: { empty$ hekeus@51: swap$ empty$ hekeus@51: and hekeus@51: 'skip$ hekeus@51: 'new.block hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {new.sentence.checka} hekeus@51: { empty$ hekeus@51: 'skip$ hekeus@51: 'new.sentence hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {new.sentence.checkb} hekeus@51: { empty$ hekeus@51: swap$ empty$ hekeus@51: and hekeus@51: 'skip$ hekeus@51: 'new.sentence hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {field.or.null} hekeus@51: { duplicate$ empty$ hekeus@51: { pop$ "" } hekeus@51: 'skip$ hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {emphasize} hekeus@51: { duplicate$ empty$ hekeus@51: { pop$ "" } hekeus@51: { "{\em " swap$ * "}" * } hekeus@51: if$ hekeus@51: } hekeus@51: INTEGERS { nameptr namesleft numnames } hekeus@51: FUNCTION {format.publisher} hekeus@51: { publisher empty$ hekeus@51: { "" } hekeus@51: { address empty$ hekeus@51: { publisher } hekeus@51: { address ": " * publisher * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.organization} hekeus@51: { organization empty$ hekeus@51: { "" } hekeus@51: { address empty$ hekeus@51: { organization } hekeus@51: { address ": " * organization * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.names} hekeus@51: { 's := hekeus@51: #1 'nameptr := hekeus@51: s num.names$ 'numnames := hekeus@51: numnames 'namesleft := hekeus@51: { namesleft #0 > } hekeus@51: { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := hekeus@51: nameptr #1 > hekeus@51: { namesleft #1 > hekeus@51: { "; " * t * } hekeus@51: { numnames #2 > hekeus@51: { ";" * } hekeus@51: { "," * } hekeus@51: if$ hekeus@51: t "others" = hekeus@51: { " et~al." * } hekeus@51: { " and " * t * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: 't hekeus@51: if$ hekeus@51: nameptr #1 + 'nameptr := hekeus@51: namesleft #1 - 'namesleft := hekeus@51: } hekeus@51: while$ hekeus@51: add.period$ hekeus@51: } hekeus@51: FUNCTION {format.authors} hekeus@51: { author empty$ hekeus@51: { "" } hekeus@51: { author format.names } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.editors} hekeus@51: { editor empty$ hekeus@51: { "" } hekeus@51: { editor format.names hekeus@51: editor num.names$ #1 > hekeus@51: { ", eds." * } hekeus@51: { ", ed." * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.title} hekeus@51: { title empty$ hekeus@51: { "" } hekeus@51: { title "t" change.case$ } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {n.dashify} hekeus@51: { 't := hekeus@51: "" hekeus@51: { t empty$ not } hekeus@51: { t #1 #1 substring$ "-" = hekeus@51: { t #1 #2 substring$ "--" = not hekeus@51: { "--" * hekeus@51: t #2 global.max$ substring$ 't := hekeus@51: } hekeus@51: { { t #1 #1 substring$ "-" = } hekeus@51: { "-" * hekeus@51: t #2 global.max$ substring$ 't := hekeus@51: } hekeus@51: while$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: { t #1 #1 substring$ * hekeus@51: t #2 global.max$ substring$ 't := hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: while$ hekeus@51: } hekeus@51: FUNCTION {format.year} hekeus@51: { year empty$ hekeus@51: { "" } hekeus@51: { year extra.label * } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.date} hekeus@51: { year empty$ hekeus@51: { month empty$ hekeus@51: { "" } hekeus@51: { "there's a month but no year in " cite$ * warning$ hekeus@51: month hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: { month empty$ hekeus@51: 'year hekeus@51: { month " " * year * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.btitle} hekeus@51: { title emphasize hekeus@51: } hekeus@51: FUNCTION {tie.or.space.connect} hekeus@51: { duplicate$ text.length$ #3 < hekeus@51: { "~" } hekeus@51: { " " } hekeus@51: if$ hekeus@51: swap$ * * hekeus@51: } hekeus@51: FUNCTION {either.or.check} hekeus@51: { empty$ hekeus@51: 'pop$ hekeus@51: { "can't use both " swap$ * " fields in " * cite$ * warning$ } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.bvolume} hekeus@51: { volume empty$ hekeus@51: { "" } hekeus@51: { "volume" volume tie.or.space.connect hekeus@51: series empty$ hekeus@51: 'skip$ hekeus@51: { " of " * series emphasize * } hekeus@51: if$ hekeus@51: "volume and number" number either.or.check hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.number.series} hekeus@51: { volume empty$ hekeus@51: { number empty$ hekeus@51: { series field.or.null } hekeus@51: { output.state mid.sentence = hekeus@51: { "number" } hekeus@51: { "Number" } hekeus@51: if$ hekeus@51: number tie.or.space.connect hekeus@51: series empty$ hekeus@51: { "there's a number but no series in " cite$ * warning$ } hekeus@51: { " in " * series * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: { "" } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.edition} hekeus@51: { edition empty$ hekeus@51: { "" } hekeus@51: { output.state mid.sentence = hekeus@51: { edition "l" change.case$ " edition" * } hekeus@51: { edition "t" change.case$ " edition" * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: INTEGERS { multiresult } hekeus@51: FUNCTION {multi.page.check} hekeus@51: { 't := hekeus@51: #0 'multiresult := hekeus@51: { multiresult not hekeus@51: t empty$ not hekeus@51: and hekeus@51: } hekeus@51: { t #1 #1 substring$ hekeus@51: duplicate$ "-" = hekeus@51: swap$ duplicate$ "," = hekeus@51: swap$ "+" = hekeus@51: or or hekeus@51: { #1 'multiresult := } hekeus@51: { t #2 global.max$ substring$ 't := } hekeus@51: if$ hekeus@51: } hekeus@51: while$ hekeus@51: multiresult hekeus@51: } hekeus@51: FUNCTION {format.pages} hekeus@51: { pages empty$ hekeus@51: { "" } hekeus@51: { pages multi.page.check hekeus@51: { "" pages n.dashify tie.or.space.connect } hekeus@51: { "" pages tie.or.space.connect } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.vol.num.pages} hekeus@51: { volume field.or.null hekeus@51: number empty$ hekeus@51: 'skip$ hekeus@51: { "(" number * ")" * * hekeus@51: volume empty$ hekeus@51: { "there's a number but no volume in " cite$ * warning$ } hekeus@51: 'skip$ hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: pages empty$ hekeus@51: 'skip$ hekeus@51: { duplicate$ empty$ hekeus@51: { pop$ format.pages } hekeus@51: { ":" * pages n.dashify * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.chapter.pages} hekeus@51: { chapter empty$ hekeus@51: 'format.pages hekeus@51: { type empty$ hekeus@51: { "chapter" } hekeus@51: { type "l" change.case$ } hekeus@51: if$ hekeus@51: chapter tie.or.space.connect hekeus@51: pages empty$ hekeus@51: 'skip$ hekeus@51: { ", " * format.pages * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.in.ed.booktitle} hekeus@51: { booktitle empty$ hekeus@51: { "" } hekeus@51: { editor empty$ hekeus@51: { "In " booktitle emphasize * } hekeus@51: { "In " format.editors * ", " * booktitle emphasize * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {empty.misc.check} hekeus@51: { author empty$ title empty$ howpublished empty$ hekeus@51: month empty$ year empty$ note empty$ hekeus@51: and and and and and hekeus@51: key empty$ not and hekeus@51: { "all relevant fields are empty in " cite$ * warning$ } hekeus@51: 'skip$ hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.thesis.type} hekeus@51: { type empty$ hekeus@51: 'skip$ hekeus@51: { pop$ hekeus@51: type "t" change.case$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.tr.number} hekeus@51: { type empty$ hekeus@51: { "Technical Report" } hekeus@51: 'type hekeus@51: if$ hekeus@51: number empty$ hekeus@51: { "t" change.case$ } hekeus@51: { number tie.or.space.connect } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.article.crossref} hekeus@51: { key empty$ hekeus@51: { journal empty$ hekeus@51: { "need key or journal for " cite$ * " to crossref " * crossref * hekeus@51: warning$ hekeus@51: "" hekeus@51: } hekeus@51: { "In {\em " journal * "\/}" * } hekeus@51: if$ hekeus@51: } hekeus@51: { "In " key * } hekeus@51: if$ hekeus@51: " \shortcite{" * crossref * "}" * hekeus@51: } hekeus@51: FUNCTION {format.crossref.editor} hekeus@51: { editor #1 "{vv~}{ll}" format.name$ hekeus@51: editor num.names$ duplicate$ hekeus@51: #2 > hekeus@51: { pop$ " et~al." * } hekeus@51: { #2 < hekeus@51: 'skip$ hekeus@51: { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = hekeus@51: { " et~al." * } hekeus@51: { " and " * editor #2 "{vv~}{ll}" format.name$ * } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.book.crossref} hekeus@51: { volume empty$ hekeus@51: { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ hekeus@51: "In " hekeus@51: } hekeus@51: { "Volume" volume tie.or.space.connect hekeus@51: " of " * hekeus@51: } hekeus@51: if$ hekeus@51: editor empty$ hekeus@51: editor field.or.null author field.or.null = hekeus@51: or hekeus@51: { key empty$ hekeus@51: { series empty$ hekeus@51: { "need editor, key, or series for " cite$ * " to crossref " * hekeus@51: crossref * warning$ hekeus@51: "" * hekeus@51: } hekeus@51: { "{\em " * series * "\/}" * } hekeus@51: if$ hekeus@51: } hekeus@51: { key * } hekeus@51: if$ hekeus@51: } hekeus@51: { format.crossref.editor * } hekeus@51: if$ hekeus@51: " \shortcite{" * crossref * "}" * hekeus@51: } hekeus@51: FUNCTION {format.incoll.inproc.crossref} hekeus@51: { editor empty$ hekeus@51: editor field.or.null author field.or.null = hekeus@51: or hekeus@51: { key empty$ hekeus@51: { booktitle empty$ hekeus@51: { "need editor, key, or booktitle for " cite$ * " to crossref " * hekeus@51: crossref * warning$ hekeus@51: "" hekeus@51: } hekeus@51: { "In {\em " booktitle * "\/}" * } hekeus@51: if$ hekeus@51: } hekeus@51: { "In " key * } hekeus@51: if$ hekeus@51: } hekeus@51: { "In " format.crossref.editor * } hekeus@51: if$ hekeus@51: " \shortcite{" * crossref * "}" * hekeus@51: } hekeus@51: FUNCTION {article} hekeus@51: { output.bibitem hekeus@51: format.authors "author" output.check hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.title "title" output.check hekeus@51: new.block hekeus@51: crossref missing$ hekeus@51: { journal emphasize "journal" output.check hekeus@51: format.vol.num.pages sioutput hekeus@51: } hekeus@51: { format.article.crossref output.nonnull hekeus@51: format.pages sioutput hekeus@51: } hekeus@51: if$ hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {book} hekeus@51: { output.bibitem hekeus@51: author empty$ hekeus@51: { format.editors "author and editor" output.check } hekeus@51: { format.authors output.nonnull hekeus@51: crossref missing$ hekeus@51: { "author and editor" editor either.or.check } hekeus@51: 'skip$ hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.btitle "title" output.check hekeus@51: crossref missing$ hekeus@51: { format.bvolume output hekeus@51: new.block hekeus@51: format.number.series output hekeus@51: new.sentence hekeus@51: format.publisher "publisher" output.check hekeus@51: } hekeus@51: { new.block hekeus@51: format.book.crossref output.nonnull hekeus@51: } hekeus@51: if$ hekeus@51: format.edition output hekeus@51: % format.date "year" output.check hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {booklet} hekeus@51: { output.bibitem hekeus@51: format.authors output hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.title "title" output.check hekeus@51: howpublished address new.block.checkb hekeus@51: howpublished output hekeus@51: address output hekeus@51: % format.date output hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {inbook} hekeus@51: { output.bibitem hekeus@51: author empty$ hekeus@51: { format.editors "author and editor" output.check } hekeus@51: { format.authors output.nonnull hekeus@51: crossref missing$ hekeus@51: { "author and editor" editor either.or.check } hekeus@51: 'skip$ hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.btitle "title" output.check hekeus@51: crossref missing$ hekeus@51: { format.bvolume output hekeus@51: new.block hekeus@51: format.number.series output hekeus@51: new.sentence hekeus@51: format.publisher "publisher" output.check hekeus@51: } hekeus@51: { format.book.crossref output.nonnull hekeus@51: } hekeus@51: if$ hekeus@51: format.edition output hekeus@51: % format.date "year" output.check hekeus@51: new.block hekeus@51: format.chapter.pages "chapter and pages" output.check hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {incollection} hekeus@51: { output.bibitem hekeus@51: format.authors "author" output.check hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.title "title" output.check hekeus@51: new.block hekeus@51: crossref missing$ hekeus@51: { format.in.ed.booktitle "booktitle" output.check hekeus@51: format.bvolume output hekeus@51: format.number.series output hekeus@51: new.sentence hekeus@51: format.publisher "publisher" output.check hekeus@51: format.edition output hekeus@51: % format.date "year" output.check hekeus@51: new.block hekeus@51: format.chapter.pages output hekeus@51: } hekeus@51: { format.incoll.inproc.crossref output.nonnull hekeus@51: new.block hekeus@51: format.chapter.pages output hekeus@51: } hekeus@51: if$ hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {inproceedings} hekeus@51: { output.bibitem hekeus@51: format.authors "author" output.check hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.title "title" output.check hekeus@51: new.block hekeus@51: crossref missing$ hekeus@51: { format.in.ed.booktitle "booktitle" output.check hekeus@51: format.bvolume output hekeus@51: format.number.series output hekeus@51: format.pages output hekeus@51: new.block hekeus@51: organization empty$ hekeus@51: { format.publisher output } hekeus@51: { format.organization output } hekeus@51: if$ hekeus@51: } hekeus@51: { format.incoll.inproc.crossref output.nonnull hekeus@51: format.pages output hekeus@51: } hekeus@51: if$ hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {conference} { inproceedings } hekeus@51: FUNCTION {manual} hekeus@51: { output.bibitem hekeus@51: author empty$ hekeus@51: { organization empty$ hekeus@51: 'skip$ hekeus@51: { organization output.nonnull hekeus@51: address output hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: { format.authors output.nonnull } hekeus@51: if$ hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.btitle "title" output.check hekeus@51: author empty$ hekeus@51: { organization empty$ hekeus@51: { address new.block.checka hekeus@51: address output hekeus@51: } hekeus@51: 'skip$ hekeus@51: if$ hekeus@51: } hekeus@51: { organization address new.block.checkb hekeus@51: organization output hekeus@51: address output hekeus@51: } hekeus@51: if$ hekeus@51: format.edition output hekeus@51: % format.date output hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {mastersthesis} hekeus@51: { output.bibitem hekeus@51: format.authors "author" output.check hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.title "title" output.check hekeus@51: new.block hekeus@51: "Master's thesis" format.thesis.type output.nonnull hekeus@51: school "school" output.check hekeus@51: address output hekeus@51: % format.date "year" output.check hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {misc} hekeus@51: { output.bibitem hekeus@51: format.authors output hekeus@51: new.block format.year "year" output.check hekeus@51: title howpublished new.block.checkb hekeus@51: format.title output hekeus@51: howpublished new.block.checka hekeus@51: howpublished output hekeus@51: % format.date output hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: empty.misc.check hekeus@51: } hekeus@51: FUNCTION {phdthesis} hekeus@51: { output.bibitem hekeus@51: format.authors "author" output.check hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.btitle "title" output.check hekeus@51: new.block hekeus@51: "Ph.D. Dissertation" format.thesis.type output.nonnull hekeus@51: school "school" output.check hekeus@51: address output hekeus@51: % format.date "year" output.check hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {proceedings} hekeus@51: { output.bibitem hekeus@51: editor empty$ hekeus@51: { organization output } hekeus@51: { format.editors output.nonnull } hekeus@51: if$ hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.btitle "title" output.check hekeus@51: format.bvolume output hekeus@51: format.number.series output hekeus@51: editor empty$ hekeus@51: { publisher empty$ hekeus@51: { address output } hekeus@51: { format.publisher output } hekeus@51: if$ hekeus@51: } hekeus@51: { organization empty$ hekeus@51: { publisher new.sentence.checka hekeus@51: format.publisher output hekeus@51: } hekeus@51: { organization new.sentence.checkb hekeus@51: format.organization output hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {techreport} hekeus@51: { output.bibitem hekeus@51: format.authors "author" output.check hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.title "title" output.check hekeus@51: new.block hekeus@51: format.tr.number output.nonnull hekeus@51: institution "institution" output.check hekeus@51: address output hekeus@51: % format.date "year" output.check hekeus@51: new.block hekeus@51: note output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {unpublished} hekeus@51: { output.bibitem hekeus@51: format.authors "author" output.check hekeus@51: new.block format.year "year" output.check hekeus@51: new.block hekeus@51: format.title "title" output.check hekeus@51: new.block hekeus@51: note "note" output.check hekeus@51: % format.date output hekeus@51: fin.entry hekeus@51: } hekeus@51: FUNCTION {default.type} { misc } hekeus@51: MACRO {jan} {"January"} hekeus@51: MACRO {feb} {"February"} hekeus@51: MACRO {mar} {"March"} hekeus@51: MACRO {apr} {"April"} hekeus@51: MACRO {may} {"May"} hekeus@51: MACRO {jun} {"June"} hekeus@51: MACRO {jul} {"July"} hekeus@51: MACRO {aug} {"August"} hekeus@51: MACRO {sep} {"September"} hekeus@51: MACRO {oct} {"October"} hekeus@51: MACRO {nov} {"November"} hekeus@51: MACRO {dec} {"December"} hekeus@51: MACRO {acmcs} {"ACM Computing Surveys"} hekeus@51: MACRO {acta} {"Acta Informatica"} hekeus@51: MACRO {cacm} {"Communications of the ACM"} hekeus@51: MACRO {ibmjrd} {"IBM Journal of Research and Development"} hekeus@51: MACRO {ibmsj} {"IBM Systems Journal"} hekeus@51: MACRO {ieeese} {"IEEE Transactions on Software Engineering"} hekeus@51: MACRO {ieeetc} {"IEEE Transactions on Computers"} hekeus@51: MACRO {ieeetcad} hekeus@51: {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} hekeus@51: MACRO {ipl} {"Information Processing Letters"} hekeus@51: MACRO {jacm} {"Journal of the ACM"} hekeus@51: MACRO {jcss} {"Journal of Computer and System Sciences"} hekeus@51: MACRO {scp} {"Science of Computer Programming"} hekeus@51: MACRO {sicomp} {"SIAM Journal on Computing"} hekeus@51: MACRO {tocs} {"ACM Transactions on Computer Systems"} hekeus@51: MACRO {tods} {"ACM Transactions on Database Systems"} hekeus@51: MACRO {tog} {"ACM Transactions on Graphics"} hekeus@51: MACRO {toms} {"ACM Transactions on Mathematical Software"} hekeus@51: MACRO {toois} {"ACM Transactions on Office Information Systems"} hekeus@51: MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} hekeus@51: MACRO {tcs} {"Theoretical Computer Science"} hekeus@51: READ hekeus@51: FUNCTION {sortify} hekeus@51: { purify$ hekeus@51: "l" change.case$ hekeus@51: } hekeus@51: INTEGERS { len } hekeus@51: FUNCTION {chop.word} hekeus@51: { 's := hekeus@51: 'len := hekeus@51: s #1 len substring$ = hekeus@51: { s len #1 + global.max$ substring$ } hekeus@51: 's hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {format.lab.names} hekeus@51: { 's := hekeus@51: s num.names$ 'numnames := hekeus@51: numnames #1 = hekeus@51: { s #1 "{vv }{ll}" format.name$ } hekeus@51: { numnames #2 = hekeus@51: { s #1 "{vv }{ll} and " format.name$ s #2 "{vv }{ll}" format.name$ * hekeus@51: } hekeus@51: { numnames #3 = hekeus@51: { s #1 "{vv }{ll}, " format.name$ hekeus@51: s #2 "{vv }{ll}, and " format.name$ * hekeus@51: s #3 "{vv }{ll}" format.name$ * hekeus@51: } hekeus@51: { s #1 "{vv }{ll }\bgroup et al\mbox{.}\egroup " format.name$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {author.key.label} hekeus@51: { author empty$ hekeus@51: { key empty$ hekeus@51: { cite$ #1 #3 substring$ } hekeus@51: { key } hekeus@51: if$ hekeus@51: } hekeus@51: { author format.lab.names } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {author.editor.key.label} hekeus@51: { author empty$ hekeus@51: { editor empty$ hekeus@51: { key empty$ hekeus@51: { cite$ #1 #3 substring$ } hekeus@51: { key } hekeus@51: if$ hekeus@51: } hekeus@51: { editor format.lab.names } hekeus@51: if$ hekeus@51: } hekeus@51: { author format.lab.names } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {author.key.organization.label} hekeus@51: { author empty$ hekeus@51: { key empty$ hekeus@51: { organization empty$ hekeus@51: { cite$ #1 #3 substring$ } hekeus@51: { "The " #4 organization chop.word #3 text.prefix$ } hekeus@51: if$ hekeus@51: } hekeus@51: { key } hekeus@51: if$ hekeus@51: } hekeus@51: { author format.lab.names } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {editor.key.organization.label} hekeus@51: { editor empty$ hekeus@51: { key empty$ hekeus@51: { organization empty$ hekeus@51: { cite$ #1 #3 substring$ } hekeus@51: { "The " #4 organization chop.word #3 text.prefix$ } hekeus@51: if$ hekeus@51: } hekeus@51: { key } hekeus@51: if$ hekeus@51: } hekeus@51: { editor format.lab.names } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {calc.label} hekeus@51: { type$ "book" = hekeus@51: type$ "inbook" = hekeus@51: or hekeus@51: 'author.editor.key.label hekeus@51: { type$ "proceedings" = hekeus@51: 'editor.key.organization.label hekeus@51: { type$ "manual" = hekeus@51: 'author.key.organization.label hekeus@51: 'author.key.label hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: duplicate$ hekeus@51: "\protect\citeauthoryear{" swap$ * "}{" * hekeus@51: year field.or.null purify$ * % CHANGED - pfps - 15 Feb 1989 hekeus@51: 'label := hekeus@51: year field.or.null purify$ * hekeus@51: sortify 'sort.label := hekeus@51: } hekeus@51: FUNCTION {sort.format.names} hekeus@51: { 's := hekeus@51: #1 'nameptr := hekeus@51: "" hekeus@51: s num.names$ 'numnames := hekeus@51: numnames 'namesleft := hekeus@51: { namesleft #0 > } hekeus@51: { nameptr #1 > hekeus@51: { " " * } hekeus@51: 'skip$ hekeus@51: if$ hekeus@51: s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := hekeus@51: nameptr numnames = t "others" = and hekeus@51: { "et al" * } hekeus@51: { t sortify * } hekeus@51: if$ hekeus@51: nameptr #1 + 'nameptr := hekeus@51: namesleft #1 - 'namesleft := hekeus@51: } hekeus@51: while$ hekeus@51: } hekeus@51: FUNCTION {sort.format.title} hekeus@51: { 't := hekeus@51: "A " #2 hekeus@51: "An " #3 hekeus@51: "The " #4 t chop.word hekeus@51: chop.word hekeus@51: chop.word hekeus@51: sortify hekeus@51: #1 global.max$ substring$ hekeus@51: } hekeus@51: FUNCTION {author.sort} hekeus@51: { author empty$ hekeus@51: { key empty$ hekeus@51: { "to sort, need author or key in " cite$ * warning$ hekeus@51: "" hekeus@51: } hekeus@51: { key sortify } hekeus@51: if$ hekeus@51: } hekeus@51: { author sort.format.names } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {author.editor.sort} hekeus@51: { author empty$ hekeus@51: { editor empty$ hekeus@51: { key empty$ hekeus@51: { "to sort, need author, editor, or key in " cite$ * warning$ hekeus@51: "" hekeus@51: } hekeus@51: { key sortify } hekeus@51: if$ hekeus@51: } hekeus@51: { editor sort.format.names } hekeus@51: if$ hekeus@51: } hekeus@51: { author sort.format.names } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {author.organization.sort} hekeus@51: { author empty$ hekeus@51: { organization empty$ hekeus@51: { key empty$ hekeus@51: { "to sort, need author, organization, or key in " cite$ * warning$ hekeus@51: "" hekeus@51: } hekeus@51: { key sortify } hekeus@51: if$ hekeus@51: } hekeus@51: { "The " #4 organization chop.word sortify } hekeus@51: if$ hekeus@51: } hekeus@51: { author sort.format.names } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {editor.organization.sort} hekeus@51: { editor empty$ hekeus@51: { organization empty$ hekeus@51: { key empty$ hekeus@51: { "to sort, need editor, organization, or key in " cite$ * warning$ hekeus@51: "" hekeus@51: } hekeus@51: { key sortify } hekeus@51: if$ hekeus@51: } hekeus@51: { "The " #4 organization chop.word sortify } hekeus@51: if$ hekeus@51: } hekeus@51: { editor sort.format.names } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {presort} hekeus@51: { calc.label hekeus@51: sort.label hekeus@51: " " hekeus@51: * hekeus@51: type$ "book" = hekeus@51: type$ "inbook" = hekeus@51: or hekeus@51: 'author.editor.sort hekeus@51: { type$ "proceedings" = hekeus@51: 'editor.organization.sort hekeus@51: { type$ "manual" = hekeus@51: 'author.organization.sort hekeus@51: 'author.sort hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: if$ hekeus@51: * hekeus@51: " " hekeus@51: * hekeus@51: year field.or.null sortify hekeus@51: * hekeus@51: " " hekeus@51: * hekeus@51: title field.or.null hekeus@51: sort.format.title hekeus@51: * hekeus@51: #1 entry.max$ substring$ hekeus@51: 'sort.key$ := hekeus@51: } hekeus@51: ITERATE {presort} hekeus@51: SORT hekeus@51: STRINGS { longest.label last.sort.label next.extra } hekeus@51: INTEGERS { longest.label.width last.extra.num } hekeus@51: FUNCTION {initialize.longest.label} hekeus@51: { "" 'longest.label := hekeus@51: #0 int.to.chr$ 'last.sort.label := hekeus@51: "" 'next.extra := hekeus@51: #0 'longest.label.width := hekeus@51: #0 'last.extra.num := hekeus@51: } hekeus@51: FUNCTION {forward.pass} hekeus@51: { last.sort.label sort.label = hekeus@51: { last.extra.num #1 + 'last.extra.num := hekeus@51: last.extra.num int.to.chr$ 'extra.label := hekeus@51: } hekeus@51: { "a" chr.to.int$ 'last.extra.num := hekeus@51: "" 'extra.label := hekeus@51: sort.label 'last.sort.label := hekeus@51: } hekeus@51: if$ hekeus@51: } hekeus@51: FUNCTION {reverse.pass} hekeus@51: { next.extra "b" = hekeus@51: { "a" 'extra.label := } hekeus@51: 'skip$ hekeus@51: if$ hekeus@51: label extra.label * "}" * 'label := % CHANGED - pfps 15 Feb 1989 hekeus@51: label width$ longest.label.width > hekeus@51: { label 'longest.label := hekeus@51: label width$ 'longest.label.width := hekeus@51: } hekeus@51: 'skip$ hekeus@51: if$ hekeus@51: extra.label 'next.extra := hekeus@51: } hekeus@51: EXECUTE {initialize.longest.label} hekeus@51: ITERATE {forward.pass} hekeus@51: REVERSE {reverse.pass} hekeus@51: FUNCTION {begin.bib} hekeus@51: { preamble$ empty$ hekeus@51: 'skip$ hekeus@51: { preamble$ write$ newline$ } hekeus@51: if$ hekeus@51: "\begin{thebibliography}{}" write$ newline$ hekeus@51: } hekeus@51: EXECUTE {begin.bib} hekeus@51: EXECUTE {init.state.consts} hekeus@51: ITERATE {call.type$} hekeus@51: FUNCTION {end.bib} hekeus@51: { newline$ hekeus@51: "\end{thebibliography}" write$ newline$ hekeus@51: } hekeus@51: EXECUTE {end.bib}