diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /obsolete/biblio/bibtex/contrib/harvard |
Initial commit
Diffstat (limited to 'obsolete/biblio/bibtex/contrib/harvard')
-rw-r--r-- | obsolete/biblio/bibtex/contrib/harvard/agsm.bst | 1226 | ||||
-rw-r--r-- | obsolete/biblio/bibtex/contrib/harvard/dcu.bst | 1240 | ||||
-rw-r--r-- | obsolete/biblio/bibtex/contrib/harvard/harvard.bib | 21 | ||||
-rw-r--r-- | obsolete/biblio/bibtex/contrib/harvard/harvard.description | 44 | ||||
-rw-r--r-- | obsolete/biblio/bibtex/contrib/harvard/harvard.sty | 79 | ||||
-rw-r--r-- | obsolete/biblio/bibtex/contrib/harvard/harvard.tex | 136 | ||||
-rw-r--r-- | obsolete/biblio/bibtex/contrib/harvard/kluwer.bst | 1227 |
7 files changed, 3973 insertions, 0 deletions
diff --git a/obsolete/biblio/bibtex/contrib/harvard/agsm.bst b/obsolete/biblio/bibtex/contrib/harvard/agsm.bst new file mode 100644 index 0000000000..8ec0494c7c --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/harvard/agsm.bst @@ -0,0 +1,1226 @@ +% BibTeX standard bibliography style `agsm' (one of the harvard family) + % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09. + % Copyright (C) 1991, all rights reserved. + % Copying of this file is authorized only if either + % (1) you make absolutely no changes to your copy, including name, or + % (2) if you do make changes, you name it something other than + % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, abbrv.bst, agsm.bst, + % dcu.bst or kluwer.bst. + % This restriction helps ensure that all standard styles are identical. + % The file harvard.tex has the documentation for this style. + +% ACKNOWLEDGEMENT: +% This document is a modified version of alpha.bst to which it owes much of +% its functionality. + +% AUTHOR +% Peter Williams, Key Centre for Design Quality, Sydney University +% e-mail: peterw@archsci.arch.su.oz.au + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + volume + year + } + { field.used } + { extra.label sort.label list.year } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +STRINGS { s t f } + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {item.check} +{ 't := + empty$ + { "empty " t * " in " * cite$ * warning$ } + { skip$ } + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +FUNCTION {embolden} +{ duplicate$ empty$ + { pop$ "" } + { "{\bf " swap$ * "}" * } + if$ +} + +FUNCTION {quote} +{ duplicate$ empty$ + { pop$ "" } + { "`" swap$ * "'" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + 'f := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr f format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { t "others" = + { " et~al." * } + { " \& " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { "{vv~}{ll}{, jj}{, f.}" author format.names } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { "{vv~}{ll}{, jj}{, f.}" editor format.names + editor num.names$ #1 > + { ", eds" * } + { ", ed." * } + if$ + } + if$ +} + +FUNCTION {format.editors.reverse} +{ editor empty$ + { "" } + { "{f.~}{vv~}{ll}{, jj}" editor format.names + editor num.names$ #1 > + { ", eds" * } + { ", ed." * } + if$ + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title "t" change.case$ } + if$ +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {format.btitle} +{ title emphasize +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { "Vol." volume tie.or.space.connect + series empty$ + 'skip$ + { " of " * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { "number" } + { "Number" } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { " {\em in} " * series quote * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " edn" * } + { edition "t" change.case$ " edn" * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { "pp.~" pages n.dashify * } + { "p.~" pages * } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume embolden field.or.null + number empty$ + 'skip$ + { "(" number * ")" * * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ",~" * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + 'format.pages + { type empty$ + { "chapter" } + { type "l" change.case$ } + if$ + chapter tie.or.space.connect + pages empty$ + 'skip$ + { ", " * format.pages * } + if$ + } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ booktitle empty$ + { "" } + { editor empty$ + { "{\em in} " booktitle quote * } + { "{\em in} " format.editors.reverse * ", " * booktitle quote * } + if$ + } + if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { "Technical Report" } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "in {\em " journal * "\/} \cite{" * crossref * "}" *} + if$ + } + { "{\em in} \citeasnoun{" crossref * "}" * } + if$ + +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "in " + } + { "Vol." volume tie.or.space.connect + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "{\em " * series * "\/} \cite{" * crossref * "}" *} + if$ + } + { " \citeasnoun{" * crossref * "}" * } + if$ + } + { " \citeasnoun{" * crossref * "}" * } + if$ +} + +FUNCTION {format.incoll.inproc.crossref} +{ editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "in {\em " booktitle * "\/}" * " \cite{" * crossref * "}" *} + if$ + } + { "{\em in} \citeasnoun{" crossref * "}" * } + if$ + } + { "{\em in} \citeasnoun{" crossref * "}" * } + if$ + +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {format.lab.names.abbr} +{ 's := + s num.names$ 'numnames := + numnames #1 > + { numnames #2 > + { s #1 "{vv~}{ll}" format.name$ " et al." * } + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { s #1 "{vv~}{ll}" format.name$ " et al." * } + { s #1 "{vv~}{ll}" format.name$ " \& " * + s #2 "{vv~}{ll}" format.name$ * + } + if$ + } + if$ + } + { s #1 "{vv~}{ll}" format.name$ } + if$ +} + +FUNCTION {format.lab.names.full} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr "{vv~}{ll}" format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { t "others" = + { " et~al." * } + { " \& " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +INTEGERS { author.field editor.field organization.field title.field key.field } + +FUNCTION {init.field.constants} +{ #0 'author.field := + #1 'editor.field := + #2 'organization.field := + #3 'title.field := + #4 'key.field := +} + +FUNCTION {make.list.label} +{ author.field field.used = + { format.authors } + { editor.field field.used = + { format.editors } + { organization.field field.used = + { "The " #4 organization chop.word #3 text.prefix$ } + { title.field field.used = + { format.btitle } + { key.field field.used = + { key #3 text.prefix$ } + { "Internal error :001 on " cite$ * " label" * warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {make.full.label} +{ author.field field.used = + { author format.lab.names.full } + { editor.field field.used = + { editor format.lab.names.full } + { organization.field field.used = + { "The " #4 organization chop.word #3 text.prefix$ } + { title.field field.used = + { format.btitle } + { key.field field.used = + { key #3 text.prefix$ } + { "Internal error :001 on " cite$ * " label" * warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {make.abbr.label} +{ author.field field.used = + { author format.lab.names.abbr } + { editor.field field.used = + { editor format.lab.names.abbr } + { organization.field field.used = + { "The " #4 organization chop.word #3 text.prefix$ } + { title.field field.used = + { format.btitle } + { key.field field.used = + { key #3 text.prefix$ } + { "Internal error :001 on " cite$ * " label" * warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\harvarditem[" write$ + make.abbr.label write$ + "]{" write$ + make.full.label write$ + "}{" write$ + list.year write$ + "}{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {list.label.output} +{ make.list.label " " * write$ +} + +FUNCTION {article} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + author "author" item.check + title.field field.used = + { skip$ } + { format.title quote "title" output.check } + if$ + crossref missing$ + { journal emphasize "journal" duplicate$ item.check + pages empty$ + { + output + } + { + " " * + format.vol.num.pages * output + } + if$ + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + author empty$ + { editor "author and editor" item.check } + { crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + crossref missing$ + { format.bvolume output + format.number.series output + format.edition output + publisher "publisher" output.check + address output + } + { format.book.crossref output.nonnull + format.edition output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + title.field field.used = + { skip$ } + { format.title quote "title" output.check } + if$ + howpublished output + address output + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + author empty$ + { editor "author and editor" item.check } + { crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + crossref missing$ + { format.bvolume output + format.number.series output + format.edition output + publisher "publisher" output.check + address output + } + { format.book.crossref output.nonnull + format.edition output + } + if$ + format.chapter.pages "chapter and pages" output.check + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + author "author" item.check + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.edition output + format.bvolume output + format.number.series output + publisher "publisher" output.check + address output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.chapter.pages output + new.block + note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + author "author" item.check + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + address empty$ + { organization output + publisher output + } + { organization output + publisher output + address output.nonnull + } + if$ + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.pages output + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + format.edition output + author empty$ + { organization empty$ + { address output } + 'skip$ + if$ + } + { organization output + address output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + author "author" item.check + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + "Master's thesis" format.thesis.type output.nonnull + school "school" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + title.field field.used = + { skip$ } + { format.title quote output } + if$ + howpublished output + new.block + note output + fin.entry + empty.misc.check +} + +FUNCTION {phdthesis} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + author "author" item.check + title.field field.used = + { skip$ } + { title "title" output.check } + if$ + "PhD thesis" format.thesis.type output.nonnull + school "school" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + format.bvolume output + format.number.series output + address empty$ + { editor empty$ + { skip$ } + { organization output + } + if$ + publisher output + } + { editor empty$ + 'skip$ + { organization output } + if$ + publisher output + address output.nonnull + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + author "author" item.check + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + format.tr.number output.nonnull + institution "institution" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + author "author" item.check + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + note "note" output.check + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} + +READ + +EXECUTE {init.field.constants} + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { title.field 'field.used := } + { key.field 'field.used := } + if$ + } + { author.field 'field.used := } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { title.field 'field.used := } + { key.field 'field.used := } + if$ + } + { editor.field 'field.used := } + if$ + } + { author.field 'field.used := } + if$ +} + +FUNCTION {author.key.organization.label} +{ author empty$ + { key empty$ + { organization empty$ + { title.field 'field.used := } + { organization.field 'field.used := } + if$ + } + { key.field 'field.used := } + if$ + } + { author.field 'field.used := } + if$ +} + +FUNCTION {editor.key.organization.label} +{ editor empty$ + { key empty$ + { organization empty$ + { title.field 'field.used := } + { organization.field 'field.used := } + if$ + } + { key.field 'field.used := } + if$ + } + { editor.field 'field.used := } + 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 {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$ + make.abbr.label + title.field field.used = + { sort.format.title } + { sortify } + if$ + year field.or.null purify$ #-1 #4 substring$ sortify + * + 'sort.label := +} + +FUNCTION {first.presort} +{ calc.label + sort.label + title.field field.used = + { skip$ } + { " " + * + make.list.label sortify + * + " " + * + title field.or.null + sort.format.title + * + } + if$ + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {first.presort} + +SORT + +STRINGS { last.sort.label next.extra } + +INTEGERS { last.extra.num } + +FUNCTION {initialize.last.extra.num} +{ #0 int.to.chr$ 'last.sort.label := + "" 'next.extra := + #0 'last.extra.num := +} + +FUNCTION {forward.pass} +{ last.sort.label sort.label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + sort.label 'last.sort.label := + } + if$ +} + +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + year empty$ + { "n.d." extra.label emphasize * 'list.year := } + { year extra.label emphasize * 'list.year := } + if$ + extra.label 'next.extra := +} + +EXECUTE {initialize.last.extra.num} + +ITERATE {forward.pass} + +REVERSE {reverse.pass} + +FUNCTION {second.presort} +{ make.list.label + title.field field.used = + { sort.format.title } + { sortify } + if$ + " " + * + list.year field.or.null sortify + * + " " + * + title.field field.used = + { skip$ } + { title field.or.null + sort.format.title + * + } + if$ + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {second.presort} + +SORT + +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{xx}" write$ newline$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} diff --git a/obsolete/biblio/bibtex/contrib/harvard/dcu.bst b/obsolete/biblio/bibtex/contrib/harvard/dcu.bst new file mode 100644 index 0000000000..10f3ced486 --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/harvard/dcu.bst @@ -0,0 +1,1240 @@ +% BibTeX standard bibliography style `dcu' (one of the harvard family) + % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09. + % Copyright (C) 1991, all rights reserved. + % Copying of this file is authorized only if either + % (1) you make absolutely no changes to your copy, including name, or + % (2) if you do make changes, you name it something other than + % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, abbrv.bst, agsm.bst, + % dcu.bst or kluwer.bst. + % This restriction helps ensure that all standard styles are identical. + % The file harvard.tex has the documentation for this style. + +% ACKNOWLEDGEMENT: +% This document is a modified version of alpha.bst to which it owes much of +% its functionality. + +% AUTHOR +% Peter Williams, Key Centre for Design Quality, Sydney University +% e-mail: peterw@archsci.arch.su.oz.au + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + volume + year + } + { field.used } + { extra.label sort.label list.year } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +STRINGS { s t f } + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {item.check} +{ 't := + empty$ + { "empty " t * " in " * cite$ * warning$ } + { skip$ } + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +FUNCTION {embolden} +{ duplicate$ empty$ + { pop$ "" } + { "{\bf " swap$ * "}" * } + if$ +} + +FUNCTION {quote} +{ duplicate$ empty$ + { pop$ "" } + { "`" swap$ * "'" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + 'f := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr f format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { "{vv~}{ll}{, jj}{, f.}" author format.names } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { "{vv~}{ll}{, jj}{, f.}" editor format.names + editor num.names$ #1 > + { " (eds)" * } + { " (ed.)" * } + if$ + } + if$ +} + +FUNCTION {format.editors.reverse} +{ editor empty$ + { "" } + { "{f.~}{vv~}{ll}{, jj}" editor format.names + editor num.names$ #1 > + { " (eds)" * } + { " (ed.)" * } + if$ + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title "t" change.case$ } + if$ +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {format.btitle} +{ title emphasize +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { "Vol." volume tie.or.space.connect + series empty$ + 'skip$ + { " of " * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { "number" } + { "Number" } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { " in " * series emphasize * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " edn" * } + { edition "t" change.case$ " edn" * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { "pp.~" pages n.dashify * } + { "p.~" pages * } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume embolden field.or.null + number empty$ + 'skip$ + { "(" number * ")" * * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ":~" * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + 'format.pages + { type empty$ + { "chapter" } + { type "l" change.case$ } + if$ + chapter tie.or.space.connect + pages empty$ + 'skip$ + { ", " * format.pages * } + if$ + } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ booktitle empty$ + { "" } + { editor empty$ + { booktitle emphasize } + { "{\em in} " format.editors.reverse * ", " * booktitle emphasize * } + if$ + } + if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { "Technical Report" } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "in {\em " journal * "\/}" * " \cite{" * crossref * "}" * + } + if$ + } + { " {\em in} \citeasnoun{" crossref * "}" * } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "in " + } + { "Vol." volume tie.or.space.connect + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "{\em " * series * "\/}" * " \cite{" * crossref * "}" *} + if$ + } + { " \citeasnoun{" * crossref * "}" * } + if$ + } + { " \citeasnoun{" * crossref * "}" * } + if$ +} + +FUNCTION {format.incoll.inproc.crossref} +{ editor empty$ + editor field.or.null author field.or.null = + or + { + key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "in {\em " booktitle * "\/}" * " \cite{" * crossref * "}" *} + if$ + } + { " {\em in} \citeasnoun{" crossref * "}" * } + if$ + } + { " {\em in} \citeasnoun{" crossref * "}" * } + if$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {format.lab.names.abbr} +{ 's := + s num.names$ 'numnames := + numnames #1 > + { numnames #2 > + { s #1 "{vv~}{ll}" format.name$ " et al." * } + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { s #1 "{vv~}{ll}" format.name$ " et al." * } + { s #1 "{vv~}{ll}" format.name$ " and " * + s #2 "{vv~}{ll}" format.name$ * + } + if$ + } + if$ + } + { s #1 "{vv~}{ll}" format.name$ } + if$ +} + +FUNCTION {format.lab.names.full} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr "{vv~}{ll}" format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +INTEGERS { author.field editor.field organization.field title.field key.field } + +FUNCTION {init.field.constants} +{ #0 'author.field := + #1 'editor.field := + #2 'organization.field := + #3 'title.field := + #4 'key.field := +} + +FUNCTION {make.list.label} +{ author.field field.used = + { format.authors } + { editor.field field.used = + { format.editors } + { organization.field field.used = + { "The " #4 organization chop.word #3 text.prefix$ } + { title.field field.used = + { format.btitle } + { key.field field.used = + { key #3 text.prefix$ } + { "Internal error :001 on " cite$ * " label" * warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {make.full.label} +{ author.field field.used = + { author format.lab.names.full } + { editor.field field.used = + { editor format.lab.names.full } + { organization.field field.used = + { "The " #4 organization chop.word #3 text.prefix$ } + { title.field field.used = + { format.btitle } + { key.field field.used = + { key #3 text.prefix$ } + { "Internal error :001 on " cite$ * " label" * warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {make.abbr.label} +{ author.field field.used = + { author format.lab.names.abbr } + { editor.field field.used = + { editor format.lab.names.abbr } + { organization.field field.used = + { "The " #4 organization chop.word #3 text.prefix$ } + { title.field field.used = + { format.btitle } + { key.field field.used = + { key #3 text.prefix$ } + { "Internal error :001 on " cite$ * " label" * warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\harvarditem[" write$ + make.abbr.label write$ + "]{" write$ + make.full.label write$ + "}{" write$ + list.year write$ + "}{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {list.label.output} +{ make.list.label " " * write$ +} + +FUNCTION {article} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + author "author" item.check + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + crossref missing$ + { journal emphasize "journal" duplicate$ item.check + pages empty$ + { + output + } + { + " " * + format.vol.num.pages * output + } + if$ + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + author empty$ + { editor "author and editor" item.check } + { crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + crossref missing$ + { format.bvolume output + format.number.series output + format.edition output + publisher "publisher" output.check + address output + } + { format.book.crossref output.nonnull + format.edition output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + howpublished output + address output + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + author empty$ + { editor "author and editor" item.check } + { crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + crossref missing$ + { format.bvolume output + format.number.series output + format.edition output + publisher "publisher" output.check + address output + } + { format.book.crossref output.nonnull + format.edition output + } + if$ + format.chapter.pages "chapter and pages" output.check + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + author "author" item.check + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.edition output + format.bvolume output + format.number.series output + publisher "publisher" output.check + address output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.chapter.pages output + new.block + note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + author "author" item.check + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + address empty$ + { organization output + publisher output + } + { organization output + publisher output + address output.nonnull + } + if$ + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.pages output + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + format.edition output + author empty$ + { organization empty$ + { address output + } + 'skip$ + if$ + } + { organization output + address output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + author "author" item.check + title.field field.used = + { skip$ } + { format.title emphasize "title" output.check } + if$ + "Master's thesis" format.thesis.type output.nonnull + school "school" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + title.field field.used = + { skip$ } + { format.title output } + if$ + howpublished output + new.block + note output + fin.entry + empty.misc.check +} + +FUNCTION {phdthesis} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + author "author" item.check + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + "PhD thesis" format.thesis.type output.nonnull + school "school" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + format.bvolume output + format.number.series output + address empty$ + { editor empty$ + { skip$ } + { organization output + } + if$ + publisher output + } + { editor empty$ + 'skip$ + { organization output } + if$ + publisher output + address output.nonnull + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + author "author" item.check + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + format.tr.number emphasize output.nonnull + institution "institution" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + list.label.output + " (" list.year * ")" * output.nonnull + new.block + author "author" item.check + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + note "note" output.check + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} + +READ + +EXECUTE {init.field.constants} + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { title.field 'field.used := } + { key.field 'field.used := } + if$ + } + { author.field 'field.used := } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { title.field 'field.used := } + { key.field 'field.used := } + if$ + } + { editor.field 'field.used := } + if$ + } + { author.field 'field.used := } + if$ +} + +FUNCTION {author.key.organization.label} +{ author empty$ + { key empty$ + { organization empty$ + { title.field 'field.used := } + { organization.field 'field.used := } + if$ + } + { key.field 'field.used := } + if$ + } + { author.field 'field.used := } + if$ +} + +FUNCTION {editor.key.organization.label} +{ editor empty$ + { key empty$ + { organization empty$ + { title.field 'field.used := } + { organization.field 'field.used := } + if$ + } + { key.field 'field.used := } + if$ + } + { editor.field 'field.used := } + 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 {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$ + make.abbr.label + title.field field.used = + { sort.format.title } + { sortify } + if$ + year field.or.null purify$ #-1 #4 substring$ sortify + * + 'sort.label := +} + +FUNCTION {first.presort} +{ calc.label + sort.label + title.field field.used = + { skip$ } + { " " + * + make.list.label sortify + * + " " + * + title field.or.null + sort.format.title + * + } + if$ + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {first.presort} + +SORT + +STRINGS { last.sort.label next.extra } + +INTEGERS { last.extra.num } + +FUNCTION {initialize.last.extra.num} +{ #0 int.to.chr$ 'last.sort.label := + "" 'next.extra := + #0 'last.extra.num := +} + +FUNCTION {forward.pass} +{ last.sort.label sort.label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + sort.label 'last.sort.label := + } + if$ +} + +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + year empty$ + { "n.d." extra.label * 'list.year := } + { year extra.label * 'list.year := } + if$ + extra.label 'next.extra := +} + +EXECUTE {initialize.last.extra.num} + +ITERATE {forward.pass} + +REVERSE {reverse.pass} + +FUNCTION {second.presort} +{ make.list.label + title.field field.used = + { sort.format.title } + { sortify } + if$ + " " + * + list.year field.or.null sortify + * + " " + * + title.field field.used = + { skip$ } + { title field.or.null + sort.format.title + * + } + if$ + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {second.presort} + +SORT + +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{xx}" write$ newline$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} diff --git a/obsolete/biblio/bibtex/contrib/harvard/harvard.bib b/obsolete/biblio/bibtex/contrib/harvard/harvard.bib new file mode 100644 index 0000000000..ea4d27e3e0 --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/harvard/harvard.bib @@ -0,0 +1,21 @@ +@BOOK{latex, + author = "Leslie Lamport", + title = "{\LaTeX \rm:} {A} Document Preparation System", + publisher = "Addison-Wesley", + year = 1986 } + +@UNPUBLISHED{btxdoc, + author = "Oren Patashnik", + title = "{{\BibTeX ing}}", + note = "Documentation for general {\BibTeX} users", + month = jan, + year = 1988 } + +@BOOK{agsm, + title = "Style Manual for authors editors and printers of {A}ustralian +government publications", + author = "John Pitson", + publisher = "Australian Government Publishing Service", + address = "Canberra", + edition = "3rd", + year = 1978 } diff --git a/obsolete/biblio/bibtex/contrib/harvard/harvard.description b/obsolete/biblio/bibtex/contrib/harvard/harvard.description new file mode 100644 index 0000000000..66c6569b4a --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/harvard/harvard.description @@ -0,0 +1,44 @@ + HARVARD + ------- +The HARVARD package includes the 6 files of Peter Williams' +<peterw@archsci.arch.su.OZ.AU> Harvard family of bibliographic styles. +There are two primary forms of citation in the Harvard style, dependent +upon whether the reference is used as a noun or parenthetically. To +facilitate using a citation as a noun a new command \citeasnoun has been +created which has the same syntax as the \cite command except that multiple +citations are not permitted. Additionally, where there are more than two +authors, all authors are listed in the first citation and in subsequent +citations just the first author's name followed by `et al.' is used. Where +appropriate, citations are abbreviated automatically after the first +reference when bibliographies are produced by BibTeX. Provision is also +made for this feature to be accessed during manual coding. + +There are three bibliography styles currently available within the Harvard +family, AGSM (which is based on "Style Manual for authors editors and +printers of Australian government publications"), DCU (which is based upon +the conventions in use in the Design Computing Unit, Department of +Architectural and Design Science, University of Sydney), and KLUWER (which +aspires to conform to the requirements of Kluwer Academic Publishers). +They are invoked by the \bibliographystyle within LaTeX and effect the +layout of the entries in the bibliography. + +You may retrive the entire package of six files by including the command: + SENDME HARVARD +in the body of a mail message to FILESERV@SHSU.BITNET (FILESERV@SHSU.edu). +If, for some reason, you should only need one file, say, HARVARD.DCU_STY, +include the command: + SENDME HARVARD.DCU_STY +in your request to FILESERV. These files are available for anonymous ftp +retrieval from Niord.SHSU.edu (192.92.115.8) in the directory [.HARVARD]. + +Files in this package: (1 Block = 512 bytes) +File Blocks Save file as: +------------------------------------------------------------------------------- +HARVARD.AGSM_BST 46 AGSM.BST +HARVARD.DCU_BST 46 DCU.BST +HARVARD.HARVARD_BIB 2 HARVARD.BIB +HARVARD.HARVARD_STY 6 HARVARD.STY +HARVARD.HARVARD_TEX 13 HARVARD.TEX +HARVARD.KLUWER_BST 46 KLUWER.BST + +Approximate total blocks in full HARVARD package = 159 diff --git a/obsolete/biblio/bibtex/contrib/harvard/harvard.sty b/obsolete/biblio/bibtex/contrib/harvard/harvard.sty new file mode 100644 index 0000000000..3fa08b3710 --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/harvard/harvard.sty @@ -0,0 +1,79 @@ +%% This is a file from Peter Williams' <peterw@archsci.arch.su.OZ.AU> +%% Harvard family of bibliographic styles +\message{harvard bibliography,} + +\def\@hiteml[#1]#2#3#4{\item[]\if@filesw% + { \def\protect##1{\string ##1\space}\immediate% +\write\@auxout{\string\harvardcite{#4}{#2}{#1}{#3}}}\fi% +\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces} + +\def\@hitem#1#2#3{\item[]\if@filesw% + { \def\protect##1{\string ##1\space}\immediate% +\write\@auxout{\string\harvardcite{#3}{#1}{#1}{#2}}}\fi% +\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces} + +\def\harvarditem{\@ifnextchar [{\@hiteml}{\@hitem}} + +\def\harvardcite#1#2#3#4{ + \global\@namedef{bhf@#1}{#2} + \global\@namedef{bha@#1}{#3} + \global\@namedef{bhy@#1}{#4}\global\@namedef{b@#1}{\csname bhf@#1\endcsname} +} + +\def\cite{\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} +\def\citeasnoun{\@ifnextchar [{\@tempswatrue\@citexasnoun} + {\@tempswafalse\@citexasnoun[]} +} + +\def\@enamedef#1{\expandafter\edef\csname #1\endcsname} + +\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi + \def\@citea{}\@cite{\@for\@citeb:=#2\do + {\@citea\def\@citea{\@hisep\penalty\@m\ }\@ifundefined + {b@\@citeb}{{\bf ?}\@warning + {Citation `\@citeb' on page \thepage \space undefined}}% +{{\csname b@\@citeb\endcsname\@hysep\csname bhy@\@citeb\endcsname}% +\global\@enamedef{b@\@citeb}{\csname bha@\@citeb\endcsname}}% +}}{#1}} + +\def\@citexasnoun[#1]#2{% +\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi% +\@citeasnoun{{\@ifundefined% +{b@#2}% +{{\bf ?}\@warning{Citation `#2' on page \thepage \space undefined}}% +{{\csname b@#2\endcsname\ (\csname bhy@#2\endcsname}% +\global\@namedef{b@#2}{\csname bha@#2\endcsname}}% +}}{#1}} + +\gdef\hysep@agsm{\ }\gdef\hisep@agsm{,}% +\gdef\hysep@dcu{, }\gdef\hisep@dcu{;}% +\let\@hysep\hysep@agsm \let\@hisep\hisep@agsm +\def\citationstyle#1{% +\global\@namedef{@hysep}{\csname hysep@#1\endcsname}% +\global\@namedef{@hisep}{\csname hisep@#1\endcsname}} + +%DEFAULT DEFINITIONS +\def\@cite#1#2{({#1\if@tempswa , #2\fi})} +\def\@citeasnoun#1#2{{#1\if@tempswa , #2\fi)}} + +% CHANGE \end{document} - to handle double definitions +\def\enddocument{\@checkend{document}\clearpage\begingroup +\if@filesw \immediate\closeout\@mainaux +\def\global\@namedef##1##2{}\def\newlabel{\@testdef r}% +\def\bibcite{\@testdef b}% +\def\harvardcite{\@testbibh}\@tempswafalse \makeatletter\input \jobname.aux +\if@tempswa \@warning{Label(s) may have changed. Rerun to get +cross-references right}\fi\fi\endgroup\deadcycles\z@\@@end} + +\def\@testbibh #1#2#3{ + \def\@tempa{#2}\expandafter + \ifx \csname bhf@#1\endcsname \@tempa + \def\@tempa{#3}\expandafter + \ifx \csname bha@#1\endcsname \@tempa + \else \@tempswatrue + \fi + \else + \@tempswatrue + \fi +} + diff --git a/obsolete/biblio/bibtex/contrib/harvard/harvard.tex b/obsolete/biblio/bibtex/contrib/harvard/harvard.tex new file mode 100644 index 0000000000..d7303a3393 --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/harvard/harvard.tex @@ -0,0 +1,136 @@ +%% This is a file from Peter Williams' <peterw@archsci.arch.su.OZ.AU> +%% Harvard family of bibliographic styles +\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em + T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} + +\documentstyle[A4,harvard]{article} +\title{The {\em Harvard} Family of Bibliography Styles} +\author{Peter Williams} +\begin{document} +\bibliographystyle{agsm} +%\citationstyle{agsm} +\maketitle +\section{Introduction} +This document describes the {\em harvard} family of bibliographic styles +which are provided in addition to those described in \citeasnoun{latex} and +\citeasnoun{btxdoc}. This style is primarily intended for use with the +\BibTeX\ bibliographic database management system. However, provision is +also made for hand coding of bibliographies. +\section{Citations} +There are two primary forms of citation in the {\em harvard} style +dependent upon whether the reference is used as a noun or parenthetically. +Additionally, where there are more than two authors, all authors are listed +in the first citation and in subsequent citations just the first author's +name followed by `et al.' is used. The following example from +\citeasnoun{agsm}\ illustrates these points. +\begin{quote} +The major improvement concerns the structure of the interview +(Ulrich~\& Trumbo~1965, p.~112) \ldots . +Later reports (Carlson, Thayer, Mayfield~\& Peterson 1971) record greatly +increased interviewer reliability for structured interviews. Wright (1969, +p.~408) comments that `undoubtedly interviewer skill is directly related to +the validity, quantity and quality of the interview output', and this would +suggest some sort of interviewer training is called for. Rowe (1960), for +example, found that trained interviewers are better able to evaluate +applicants with some measure of reliability. In addition Wexley, Sanders~\& +Yukl (1973) showed that by extensive interviewer training all significant +contrast effects could be eliminated. The results of the 1971 study +(Carlson et al. 1971) are still relevant, but efforts to~\ldots. +\end{quote} + +To facilitate using a citation as a noun a new command {\bf +$\backslash$citeasnoun} has been created which has the same syntax as the +{\bf $\backslash$cite} command except that multiple citations are {\em not} +permitted. The effect of this command is that +\begin{verbatim} +As \citeasnoun{btxdoc} and \citeasnoun[Annex~B]{latex} describe \ldots +\end{verbatim} +produces +\begin{quote} +As \citeasnoun{btxdoc} and \citeasnoun[Annex~B]{latex} describe \ldots +\end{quote} +whereas +\begin{verbatim} +The \BibTeX\ \cite{btxdoc} and \LaTeX\ \cite[Annex~B]{latex} manuals \ldots +\end{verbatim} +produces +\begin{quote} +The \BibTeX\ \cite{btxdoc} and \LaTeX\ \cite[Annex~B]{latex} manuals \ldots +\end{quote} + +Where appropriate, citations are abbreviated automatically after the first +reference when bibliographies are produced by \BibTeX. Provision is also +made for this feature to be accessed during manual coding. + +\section{Styles} +\subsection{Bibliography Styles} +There are three bibliography styles currently available within the {\em +harvard} family, {\bf agsm} (used in this document) which is based on +\citeasnoun[pp.~95--98]{agsm}, {\bf dcu} which is based upon the +conventions in use in the Design Computing Unit, Department of +Architectural and Design Science, University of Sydney and {\bf kluwer} +which aspires to conform to the requirements of Kluwer Academic Publishers. +They are invoked by the {\bf $\backslash$bibliographystyle} as described in +\citeasnoun[p.~74]{latex} and effect the layout of the entries in the +bibliography. + +\subsection{Citation Styles} +There are two citation styles currently available within the {\em harvard} +family, {\bf agsm} (used in this document) and {\bf dcu} which for the +previous example would produce: +\begin{quote}\citationstyle{dcu} +The \BibTeX\ \cite{btxdoc} and \LaTeX\ \cite[Annex~B]{latex} manuals \ldots +\end{quote} +and for multiple citations such as +\begin{verbatim} + The original documentation \cite{btxdoc,latex} say \ldots +\end{verbatim} +the {\bf agsm} citation style produces +\begin{quote}\citationstyle{agsm} +The original documentation \cite{btxdoc,latex} say \ldots +\end{quote} +and the {\bf dcu} citation style produces +\begin{quote}\citationstyle{dcu} +The original documentation \cite{btxdoc,latex} say \ldots +\end{quote} +The default citation style is {\bf agsm} and both styles have no effect on +the appearance of the {\bf $\backslash$citeasnoun} citation format. + +These styles are invoked by the {\bf $\backslash$citationstyle} command, +for example: +\begin{verbatim} + \citationstyle{agsm}. +\end{verbatim} +Because these styles affect the format of parenthetical citations, this +command should appear before any {\bf $\backslash$cite} commands. + +\section{Doing It By Hand} +Hand coding is accomplished much the same as described in +\citeasnoun[p.~73]{latex} except that the new command {\bf +$\backslash$harvarditem} is used in place of {\bf $\backslash$bibitem}. +The syntax of this command is +\begin{quote} +{\bf $\backslash$harvarditem} [{\em abbr-citation}]\{{\em +full-citation}\}\{{\em citation-year}\}\{{\em cite-key}\} +\end{quote} +where +\begin{description} +\item[{\em abbr-citation}] is the (optional) abbreviated citation +(minus the year) to be used in the text +subsequent to the first mention of a particular reference, +\item[{\em full-citation}] is the full citation (minus the year) +to be used in the text +on the first mention of a particular reference, +\item[{\em citation-year}] the year portion of the citation including any +suffices required to disambiguate citations, and +\item[{\em cite-key}] is the key used in the {\bf $\backslash$cite} and +{\bf $\backslash$citeasnoun} commands. +\end{description} + +\section{Acknowledgement} +The motivation for this style came from Fay Sudweeks of the Design Computing +Unit who also originated the formats for the {\bf dcu} style and proofread +their implementation. + +\bibliography{harvard} +\end{document} diff --git a/obsolete/biblio/bibtex/contrib/harvard/kluwer.bst b/obsolete/biblio/bibtex/contrib/harvard/kluwer.bst new file mode 100644 index 0000000000..bdb303082d --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/harvard/kluwer.bst @@ -0,0 +1,1227 @@ +% BibTeX standard bibliography style `kluwer' (one of the harvard family) + % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09. + % Copyright (C) 1991, all rights reserved. + % Copying of this file is authorized only if either + % (1) you make absolutely no changes to your copy, including name, or + % (2) if you do make changes, you name it something other than + % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, abbrv.bst, agsm.bst, + % dcu.bst or kluwer.bst. + % This restriction helps ensure that all standard styles are identical. + % The file harvard.tex has the documentation for this style. + +% ACKNOWLEDGEMENT: +% This document is a modified version of alpha.bst to which it owes much of +% its functionality. + +% AUTHOR +% Peter Williams, Key Centre for Design Quality, Sydney University +% e-mail: peterw@archsci.arch.su.oz.au + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + volume + year + } + { field.used } + { extra.label sort.label list.year } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +STRINGS { s t f } + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {item.check} +{ 't := + empty$ + { "empty " t * " in " * cite$ * warning$ } + { skip$ } + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +FUNCTION {embolden} +{ duplicate$ empty$ + { pop$ "" } + { "{\bf " swap$ * "}" * } + if$ +} + +FUNCTION {quote} +{ duplicate$ empty$ + { pop$ "" } + { "`" swap$ * "'" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + 'f := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr f format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { "{vv~}{ll}{, jj}{, f.}" author format.names } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { "{vv~}{ll}{, jj}{, f.}" editor format.names + editor num.names$ #1 > + { " (eds)" * } + { " (ed.)" * } + if$ + } + if$ +} + +FUNCTION {format.editors.reverse} +{ editor empty$ + { "" } + { "{f.~}{vv~}{ll}{, jj}" editor format.names + editor num.names$ #1 > + { " (eds)" * } + { " (ed.)" * } + if$ + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title "t" change.case$ } + if$ +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {format.btitle} +{ title emphasize +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { "Vol." volume tie.or.space.connect + series empty$ + 'skip$ + { " of " * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { "number" } + { "Number" } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { " in " * series emphasize * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " edn" * } + { edition "t" change.case$ " edn" * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { "pp.~" pages n.dashify * } + { "p.~" pages * } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume embolden field.or.null + number empty$ + 'skip$ + { "(" number * ")" * * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ",~" * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + 'format.pages + { type empty$ + { "chapter" } + { type "l" change.case$ } + if$ + chapter tie.or.space.connect + pages empty$ + 'skip$ + { ", " * format.pages * } + if$ + } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ booktitle empty$ + { "" } + { editor empty$ + { booktitle emphasize } + { "{\em in} " format.editors.reverse * ", " * booktitle emphasize * } + if$ + } + if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { "Technical Report" } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "in {\em " journal * "\/}" * " \cite{" * crossref * "}" * + } + if$ + } + { " {\em in} \citeasnoun{" crossref * "}" * } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "in " + } + { "Vol." volume tie.or.space.connect + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "{\em " * series * "\/}" * " \cite{" * crossref * "}" *} + if$ + } + { " \citeasnoun{" * crossref * "}" * } + if$ + } + { " \citeasnoun{" * crossref * "}" * } + if$ +} + +FUNCTION {format.incoll.inproc.crossref} +{ editor empty$ + editor field.or.null author field.or.null = + or + { + key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "in {\em " booktitle * "\/}" * " \cite{" * crossref * "}" *} + if$ + } + { " {\em in} \citeasnoun{" crossref * "}" * } + if$ + } + { " {\em in} \citeasnoun{" crossref * "}" * } + if$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {format.lab.names.abbr} +{ 's := + s num.names$ 'numnames := + numnames #1 > + { numnames #2 > + { s #1 "{vv~}{ll}" format.name$ " et al." * } + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { s #1 "{vv~}{ll}" format.name$ " et al." * } + { s #1 "{vv~}{ll}" format.name$ " and " * + s #2 "{vv~}{ll}" format.name$ * + } + if$ + } + if$ + } + { s #1 "{vv~}{ll}" format.name$ } + if$ +} + +FUNCTION {format.lab.names.full} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr "{vv~}{ll}" format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +INTEGERS { author.field editor.field organization.field title.field key.field } + +FUNCTION {init.field.constants} +{ #0 'author.field := + #1 'editor.field := + #2 'organization.field := + #3 'title.field := + #4 'key.field := +} + +FUNCTION {make.list.label} +{ author.field field.used = + { format.authors } + { editor.field field.used = + { format.editors } + { organization.field field.used = + { "The " #4 organization chop.word #3 text.prefix$ } + { title.field field.used = + { format.btitle } + { key.field field.used = + { key #3 text.prefix$ } + { "Internal error :001 on " cite$ * " label" * warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {make.full.label} +{ author.field field.used = + { author format.lab.names.full } + { editor.field field.used = + { editor format.lab.names.full } + { organization.field field.used = + { "The " #4 organization chop.word #3 text.prefix$ } + { title.field field.used = + { format.btitle } + { key.field field.used = + { key #3 text.prefix$ } + { "Internal error :001 on " cite$ * " label" * warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {make.abbr.label} +{ author.field field.used = + { author format.lab.names.abbr } + { editor.field field.used = + { editor format.lab.names.abbr } + { organization.field field.used = + { "The " #4 organization chop.word #3 text.prefix$ } + { title.field field.used = + { format.btitle } + { key.field field.used = + { key #3 text.prefix$ } + { "Internal error :001 on " cite$ * " label" * warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\harvarditem[" write$ + make.abbr.label write$ + "]{" write$ + make.full.label write$ + "}{" write$ + list.year write$ + "}{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {list.label.output} +{ make.list.label write$ +} + +FUNCTION {article} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + author "author" item.check + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + crossref missing$ + { journal emphasize "journal" duplicate$ item.check + pages empty$ + { + output + } + { + " " * + format.vol.num.pages * output + } + if$ + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + author empty$ + { editor "author and editor" item.check } + { crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + crossref missing$ + { format.bvolume output + format.number.series output + format.edition output + publisher "publisher" output.check + address output + } + { format.book.crossref output.nonnull + format.edition output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + howpublished output + address output + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + author empty$ + { editor "author and editor" item.check } + { crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + crossref missing$ + { format.bvolume output + format.number.series output + format.edition output + publisher "publisher" output.check + address output + } + { format.book.crossref output.nonnull + format.edition output + } + if$ + format.chapter.pages "chapter and pages" output.check + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + author "author" item.check + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.edition output + format.bvolume output + format.number.series output + publisher "publisher" output.check + address output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.chapter.pages output + new.block + note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + author "author" item.check + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + address empty$ + { organization output + publisher output + } + { organization output + publisher output + address output.nonnull + } + if$ + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.pages output + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + format.edition output + author empty$ + { organization empty$ + { address output + } + 'skip$ + if$ + } + { organization output + address output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + author "author" item.check + title.field field.used = + { skip$ } + { format.title emphasize "title" output.check } + if$ + "Master's thesis" format.thesis.type output.nonnull + school "school" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + title.field field.used = + { skip$ } + { format.title output } + if$ + howpublished output + new.block + note output + fin.entry + empty.misc.check +} + +FUNCTION {phdthesis} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + author "author" item.check + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + "PhD thesis" format.thesis.type output.nonnull + school "school" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + title.field field.used = + { skip$ } + { format.btitle "title" output.check } + if$ + format.bvolume output + format.number.series output + address empty$ + { editor empty$ + { skip$ } + { organization output + } + if$ + publisher output + } + { editor empty$ + 'skip$ + { organization output } + if$ + publisher output + address output.nonnull + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + author "author" item.check + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + format.tr.number emphasize output.nonnull + institution "institution" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + list.label.output + ": " list.year * output.nonnull + author "author" item.check + title.field field.used = + { skip$ } + { format.title "title" output.check } + if$ + note "note" output.check + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} + +READ + +EXECUTE {init.field.constants} + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { title.field 'field.used := } + { key.field 'field.used := } + if$ + } + { author.field 'field.used := } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { title.field 'field.used := } + { key.field 'field.used := } + if$ + } + { editor.field 'field.used := } + if$ + } + { author.field 'field.used := } + if$ +} + +FUNCTION {author.key.organization.label} +{ author empty$ + { key empty$ + { organization empty$ + { title.field 'field.used := } + { organization.field 'field.used := } + if$ + } + { key.field 'field.used := } + if$ + } + { author.field 'field.used := } + if$ +} + +FUNCTION {editor.key.organization.label} +{ editor empty$ + { key empty$ + { organization empty$ + { title.field 'field.used := } + { organization.field 'field.used := } + if$ + } + { key.field 'field.used := } + if$ + } + { editor.field 'field.used := } + 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 {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$ + make.abbr.label + title.field field.used = + { sort.format.title } + { sortify } + if$ + year field.or.null purify$ #-1 #4 substring$ sortify + * + 'sort.label := +} + +FUNCTION {first.presort} +{ calc.label + sort.label + title.field field.used = + { skip$ } + { " " + * + make.list.label sortify + * + " " + * + title field.or.null + sort.format.title + * + } + if$ + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {first.presort} + +SORT + +STRINGS { last.sort.label next.extra } + +INTEGERS { last.extra.num } + +FUNCTION {initialize.last.extra.num} +{ #0 int.to.chr$ 'last.sort.label := + "" 'next.extra := + #0 'last.extra.num := +} + +FUNCTION {forward.pass} +{ last.sort.label sort.label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + sort.label 'last.sort.label := + } + if$ +} + +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + year empty$ + { "n.d." extra.label * 'list.year := } + { year extra.label * 'list.year := } + if$ + extra.label 'next.extra := +} + +EXECUTE {initialize.last.extra.num} + +ITERATE {forward.pass} + +REVERSE {reverse.pass} + +FUNCTION {second.presort} +{ make.list.label + title.field field.used = + { sort.format.title } + { sortify } + if$ + " " + * + list.year field.or.null sortify + * + " " + * + title.field field.used = + { skip$ } + { title field.or.null + sort.format.title + * + } + if$ + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {second.presort} + +SORT + +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{xx}" write$ newline$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} |