diff options
Diffstat (limited to 'obsolete/biblio/bibtex/contrib/misc')
-rw-r--r-- | obsolete/biblio/bibtex/contrib/misc/cell.bst | 1442 | ||||
-rw-r--r-- | obsolete/biblio/bibtex/contrib/misc/jas99.bst | 1336 | ||||
-rw-r--r-- | obsolete/biblio/bibtex/contrib/misc/jas99_m.bst | 1365 | ||||
-rw-r--r-- | obsolete/biblio/bibtex/contrib/misc/numalg.bst | 1370 |
4 files changed, 5513 insertions, 0 deletions
diff --git a/obsolete/biblio/bibtex/contrib/misc/cell.bst b/obsolete/biblio/bibtex/contrib/misc/cell.bst new file mode 100644 index 0000000000..4d831b7a61 --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/misc/cell.bst @@ -0,0 +1,1442 @@ +% BibTex `cell' bibliography style +% version = 1.25 of cell.bst 1994 October 15 +% from version = 1.27 of jmb.bst 1992 October 22 + +% conversion from JMB to Cell by: +% changing emphasis to roman (\em to \rm) +% bold face to roman (\bf to \rm) (on volume) +% making the volume be italics +% removing the comma after the journal name +% +% Thomas Schneider +% National Cancer Institute +% Laboratory of Mathematical Biology +% Frederick, Maryland 21702-1013 +% toms@ncifcrf.gov +% +% This file is available by anonymous ftp from ncifcrf.gov in pub/delila. +% +% TITLES can be turned on and off! +% Just nocite the reference TitlesOn in the paper (i.e. \nocite{TitlesOn}) +% and have a bibliography article in your database with that cite key! +% +% WARNING: Since I use mostly article, book and inproceedings, these +% are formatted pretty closely to the Journal of Theoretical Biology style +% while other things are neglected. Also, I can't guarantee that the style +% is exactly right. +% +% The following documentation is identical from the source of jmb.bst, +% which was the apalike.bst taken from the Clarkson archive on 1989 June 19. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% BibTeX `apalike' bibliography style (24-Jan-88 version) +% Adapted from the `alpha' style, version 0.99a; for BibTeX version 0.99a. +% Copyright (C) 1988, all rights reserved. +% Copying of this file is allowed, provided that if you make any changes at all +% you name it something other than `apalike.bst'. +% This restriction helps ensure that all copies are identical. +% Differences between this style and `alpha' are generally heralded by a `%'. +% The file btxbst.doc has the documentation for alpha.bst. +% +% This style should be used with the `apalike' LaTeX style (apalike.sty). +% \cite's come out like "(Jones, 1986)" in the text but there are no labels +% in the bibliography, and something like "(1986)" comes out immediately +% after the author. Author (and editor) names appear as last name, comma, +% initials. A `year' field is required for every entry, and so is either +% an author (or in some cases, an editor) field or a key field. +% +% Editorial note: +% Many journals require a style like `apalike', but I strongly, strongly, +% strongly recommend that you not use it if you have a choice---use something +% like `plain' instead. Mary-Claire van Leunen (A Handbook for Scholars, +% Knopf, 1979) argues convincingly that a style like `plain' encourages better +% writing than one like `apalike'. Furthermore the strongest arguments for +% using an author-date style like `apalike'---that it's "the most practical" +% (The Chicago Manual of Style, University of Chicago Press, thirteenth +% edition, 1982, pages 400--401)---fall flat on their face with the new +% computer-typesetting technology. For instance page 401 anachronistically +% states "The chief disadvantage of [a style like `plain'] is that additions +% or deletions cannot be made after the manuscript is typed without changing +% numbers in both text references and list." LaTeX sidesteps the disadvantage. +% +% History: +% 15-sep-86 (SK,OP) Original version, by Susan King and Oren Patashnik. +% 10-nov-86 (OP) Truncated the sort.key$ string to the correct length +% in bib.sort.order to eliminate error message. +% 24-jan-88 (OP) Updated for BibTeX version 0.99a, from alpha.bst 0.99a; +% apalike now sorts by author, then year, then title; +% THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% The program was further modified by Tom Schneider: +% +% 1989 June 19 (TDS) Renamed jmb.bst. Items that do not have years were +% listed in the bibliography without identifiers. However, they +% have identifiers in the text. The identifier was added. +% Titles were removed :-(. +% +% 1989 October 2 (TDS) Made labels in the paper use the & symbol rather +% than `and', as required by JMB. +% 1989 October 3 (TDS) Made et~al. be in italics. +% Removed comma after journal name. (actually, all +% mid sentence commas go!) +% Made volume number be bold faced. +% Converted colon (:) after volume number to a comma (,). +% If a journal name does NOT end in a period, add +% a comma after the name. +% 1989 October 14 (TDS) Without a year the program used to sort on the +% title. I made it sort on the cite$ if there is no year. +% 1989 October 18 (TDS) If there is one reference without a year, put +% an "a" at the end of its label, so that it comes out +% as (Smith, a) in the text. in FUNCTION {forward.pass} +% 1989 November 2 (TDS) Unpublished papers now give the title. +% 1989 November 18 (TDS) TITLES can be turned on and off! +% Just nocite the reference TitlesOn in the paper +% and have a bibliography article in your database +% with that cite key! +% 1989 December 5 (TDS) I can't stand sorting to fall back on the +% titles of the article - no control! So in function +% bib.sort.order the default is now cite$. +% 1990 November 14 (TDS) Changes to match JTB better: +% Names in the bibliography are now connected +% with "\&" instead of "and", since this fits JTB better. +% "In" is now "In:". +% "editors" and "editor" are now "eds" and "ed". +% booktitle follows editors. editors in parenthesis. +% pp. and p. instead of pages and page. +% location followed by colon (:) and then publisher. +% 1992 October 22 (TDS) Publisher address is at the end of books. +% with no colon after address. +% no comma before & in name list in bibliography. +% The extra.label (as the a of 1991a) is emphasized. +% "In:" goes back to "In"! +% publisher address is at the end of inproceedings. +% volume is "vol.", with comma after number. +% ed.", and comma after ) closing editors. +% as a colon (:), JMB does NOT want the next +% ed, but the format.title function uses +% which leaves it capitalized. To fix this, a +% place change.case$ must be written. +% +% When a title has a colon (:), JMB does NOT want the next +% word capitalized, but the format.title function uses +% change.case$, which leaves it capitalized. To fix this, a +% function to replace change.case$ was written: +% special.change.case +% +% edition should follow TITLE for books! + +% possible bug: sorting order probably should be first author followed +% by year; but this is not absolutely clear. Sorting here is (I think) +% by all authors (or perhaps the key) then year. + + +ENTRY % declare variables that have a value for each entry on the list + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key +% month not used in apalike + note + number + organization + pages + publisher + school + series + title + type + volume + year + } + {} + { label extra.label sort.label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block + docomma givetitles } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + + #0 'docomma := % if it is 0 then don't do commas, otherwise do them. +} + +FUNCTION {init.toggle.switches} +{% set switches for controlling the output! + #0 'givetitles := % if it is 0 then don't give titles, otherwise do them. +} + +STRINGS { s t } + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = +% "in of output.nonnull" warning$ + +% % { ", " * write$ } % the comma here is responsible for every comma! +% % % But JMB doesn't want commas, so away it goes! +% { " " * write$ } % That does it! + + { % doing a comma is controlled specifically in JMB using docomma + docomma #0 = + { " " * write$ } + { ", " * write$ } + if$ + } + { 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 +% "out of output.nonnull" warning$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := +% "in output.check" warning$ + duplicate$ empty$ + { t "title" = + { pop$ } % jmb ignores titles and does not object if missing + { pop$ "empty " t * " in " * cite$ * warning$ } + if$ + } + 'output.nonnull % block periods + % { pop$ } % don't do anything + if$ +% "ouT of output.check" warning$ +} + +% t "title" = +% { "zowie" warning$ } +% { duplicate$ empty$ +% { pop$ "EmPtY " t * " in " * cite$ * warning$ } +% 'output.nonnull +% } +% if$ +% if$ +%} + +% apalike needs this function because +% the year has special punctuation; +% apalike ignores the month +FUNCTION {output.year.check} +{ year empty$ + { + "empty year in " cite$ ", using label: " extra.label * * * warning$ + write$ +% " (" extra.label * ")" * % TDS UNemphasized label + +% zzz here is the problem: +% extra.label "BLURB" * warning$ + " ({\rm{" extra.label * "}})" * % TDS emphasized label +% "BLORB" warning$ + + { label "{\rm{" extra.label "}}" * * * 'label :=} +% "BLUBEL" warning$ + + mid.sentence 'output.state := +% "BLIP" warning$ + } + { write$ + +% " (" year * extra.label * ")" * % TDS UNemphasized label + " (" year * "{\rm{" extra.label "}}" * * * ")" * % TDS emphasized label + + mid.sentence 'output.state := + } + if$ +% "POW" warning$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[" write$ + label write$ + "]{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\rm " swap$ * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % last name first + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { numnames #2 > +% { "," * } % remove this comma TDS + { " " * } + 'skip$ + if$ + t "others" = + { " {\rm et~al.}" * } + { " \& " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names } + if$ +} + +FUNCTION {format.key} % this function is just for apalike +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names + editor num.names$ #1 > + { ", eds" * } % TDS + { ", ed." * } % TDS + if$ + } + if$ +} + +FUNCTION {special.change.case} +% change the entire string to lower case except +% for the first letter and things inside {} +% That is, force the first letter after a colon (:) to be lower case +% but otherwise use the change.case$ rules. +{ +% title "t" change.case$ % TDS this line was the original method + +% start with the first letter of the title, hang on stack +title #1 #1 substring$ + +% unearth this to see the breakpoint +%"|---|" * + +% take the title, change to entire lower case. +title "l" change.case$ + +% take from second position of lowered title to end of title +#2 +global.max$ +substring$ + +% concatenate first letter to rest of title +* +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { % decide whether to give the title or not + givetitles #1 = +% { title "t" change.case$ } % produce the title % TDS original function + { special.change.case } % produce the title + { title pop$ "" } % don't produce the title + if$ + } + 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$ + { "" } +% { "volume" volume tie.or.space.connect % TDS + { "vol." volume "," * tie.or.space.connect % made vol. + series empty$ + 'skip$ + { " of " * series emphasize * } + if$ +% "volume and number" number either.or.check % TDS + "vol. and num." number either.or.check % made vol. + } + 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 * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " edition" * } + { edition "t" change.case$ " edition" * } + 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 tie.or.space.connect } % TDS + { "p." pages tie.or.space.connect } % TDS + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +{ "{\rm " volume "}" * * field.or.null % make volume bold face + +% cell does not take numbers +% number empty$ +% 'skip$ +%% { " (" number * ")" * * +% { " ({\em " number "\/}" * * ")" * * % CELL IS ITALICS +%% zzz +% 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 * } % no more colons after the volume + { ", " * pages n.dashify * } % comma's instead + 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$ + { "In " booktitle emphasize * } % TDS + { "In " booktitle emphasize * ", " * % That's the comma after the title + "(" format.editors ")," * * * } % TDS + if$ + } + 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} +{ "In" % this is for apalike % TDS + " \cite{" * crossref * "}" * +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "In " % TDS + } + { "Volume" volume tie.or.space.connect + " of " * + } + if$ + "\cite{" * crossref * "}" * % this is for apalike +} + +FUNCTION {format.incoll.inproc.crossref} +{ "In" % this is for apalike % TDS + " \cite{" * crossref * "}" * +} + +FUNCTION {article} +{ + cite$ "TitlesOn" = + 'skip$ % Don't write out an article of this kind, it's a toggle switch! + { + output.bibitem + format.authors "author" output.check + author format.key output % special for +% "===> about to" warning$ + output.year.check % apalike +% "===> after it" warning$ + new.block + format.title "title" output.check + new.block + crossref missing$ + { % figure out the last character of the journal name. + % "<<" journal #-1 #1 substring$ ">>" * * % for testing + % "<" journal ">" * * % this works ok % for testing + + journal #-1 #1 substring$ "." = + { journal } % journal ended in period so don't do anything +% { journal ", " *} % journal ended without period, so add comma + { journal " " *} % journal ended without period, so add comma NONE FOR CELL + if$ + emphasize "journal" output.check + +% journal * emphasize "journal" output.check % the original method + + format.vol.num.pages output + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry + } + if$ +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + editor format.key output + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + output.year.check % special for apalike + new.block + format.btitle "title" output.check + #1 'docomma := % TURN COMMAS ON FOR JMB + crossref missing$ + { + format.bvolume output + new.block + format.number.series output + format.edition output % TDS JMB position for edition +% new.sentence +% #0 'docomma := % no comma after address +% address ":" * output % TDS + publisher "publisher" output.check % TDS +% #1 'docomma := % comma back on +% publisher "publisher" output.check +% address output + address output % TDS - no colon! + } + { new.block + format.book.crossref output.nonnull + } + if$ +% format.edition output % TDS original position of edition + new.block + note output + fin.entry + #0 'docomma := % TURN COMMAS OFF +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + author format.key output % special for + output.year.check % apalike + new.block + format.title "title" output.check + new.block + howpublished output + address output + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + editor format.key output + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + output.year.check % special for apalike + new.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + format.chapter.pages "chapter and pages" output.check + new.block + format.number.series output + new.sentence + #0 'docomma := % no comma after address + address ":" * output % TDS + publisher "publisher" output.check % TDS + #1 'docomma := % comma back on +% publisher "publisher" output.check +% address output + } + { format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + author format.key output % special for + output.year.check % apalike + new.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.chapter.pages output + new.sentence + publisher "publisher" output.check + address output + format.edition output + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + author format.key output % special for + output.year.check % apalike + new.block + format.title "title" output.check + new.block + crossref missing$ + { +% #1 'docomma := % TURN COMMAS ON FOR JMB, BUT NOT FOR JTB: inconsistent. TDS NOW + format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.pages + pages empty$ + { output } + { "," * output } % TDS toss in comma instead of period + if$ + +% address output % TDS address is below for JTB +% new.sentence % TDS remove period + organization output + #0 'docomma := % NO COMMA AFTER ADDRESS + publisher "publisher" output.check % TDS + #1 'docomma := % comma back on + +% publisher output % are simpler + address output % TDS + #0 'docomma := % TURN COMMAS OFF + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + format.authors output + author format.key output % special for + output.year.check % apalike + new.block + format.btitle "title" output.check + organization address new.block.checkb + organization output + address output + format.edition output + new.block + note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output % special for + output.year.check % apalike + new.block + format.title "title" output.check + new.block + "Master's thesis" format.thesis.type output.nonnull + school "school" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + author format.key output % special for + output.year.check % apalike + new.block + format.title output + new.block + howpublished output + new.block + note output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output % special for + output.year.check % apalike + new.block + format.btitle "title" output.check + new.block + "PhD thesis," format.thesis.type output.nonnull + school "school" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + format.editors output + editor format.key output % special for + output.year.check % apalike + new.block + format.btitle "title" output.check + format.bvolume output + format.number.series output + address output % for apalike + new.sentence % we always output + organization output % a nonempty organization + publisher output % here + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + author format.key output % special for + output.year.check % apalike + new.block + format.title "title" output.check + new.block + format.tr.number output.nonnull + institution "institution" output.check + address output + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + author format.key output % special for +% "===> about to unpuBLISH" warning$ + output.year.check % apalike +% "===> out of to unpuBLISH" warning$ + new.block +% "===> PLEASE PLEASE BE HERE" warning$ + +% Since format.title is out of commission, the original method won't work: +% format.title "title" output.check +% so do the equivalent of the format.title procedure: (TDS) + title empty$ + { "" } + { title "t" change.case$ } % produce the title + if$ +% "===> perfidity 1" warning$ + "title" output.check +% "===> perfidity" warning$ + + new.block + note "note" output.check + fin.entry + +% "===> GOlly done" warning$ +} + +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 + +% *********************************************************** + +FUNCTION {check.for.titlecommand} +% go through each entry and see if one of them has the key +% 'TitlesOn'. If this is found, then do titles! +% 1989 November 18 TDS +{ +% "|" label "|" * * write$ newline$ % |Arrhenius {\rm et~al.}, 1986| +% "|" cite$ "|" * * write$ newline$ % |Arrhenius1986| +% so cite$ is the thing I want to detect... + + cite$ "TitlesOn" = + { % got it! +% "FOUND TitlesOn" write$ newline$ + "Titles Will Be Printed" warning$ + #1 'givetitles := % give titles! + } + 'skip$ + if$ +} +EXECUTE {init.toggle.switches} +ITERATE {check.for.titlecommand} +% *********************************************************** + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +% There are three apalike cases: one person (Jones), +% two (Jones and de~Bruijn), and more (Jones et~al.). +% This function is much like format.crossref.editors. +% +FUNCTION {format.lab.names} +{ 's := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ " {\rm et~al.}" * } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { " {\rm et~al.}" * } + { " \& " * s #2 "{vv~}{ll}" format.name$ * } + % note new use of & rather than `and'. TDS + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key % apalike uses the whole key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key % apalike uses the whole key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key % apalike uses the whole key, no organization + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.label} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label % apalike ignores organization + 'author.key.label % for labeling and sorting + if$ + } + if$ + ", " % these three lines are + * % for apalike, which + year field.or.null purify$ #-1 #4 substring$ % uses all four digits + * + 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ % apalike uses initials + s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := % <= here + nameptr numnames = t "others" = and + { "{\rm et al}" * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} + +% apalike uses two sorting passes; the first one sets the +% labels so that the `a's, `b's, etc. can be computed; +% the second pass puts the references in "correct" order. +% The presort function is for the first pass. It computes +% label, sort.label, and title, and then concatenates. +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.sort + 'author.sort + if$ + } + if$ + #1 entry.max$ substring$ % for + 'sort.label := % apalike + sort.label % style + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} + +SORT % by label, sort.label, title---for final label calculation + +STRINGS { last.label next.extra } % apalike labels are only for the text; + +INTEGERS { last.extra.num } % there are none in the bibliography + +FUNCTION {initialize.extra.label.stuff} % and hence there is no `longest.label' +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := +} + +FUNCTION {forward.pass} +% pass through the references forward +{ +%"\\ label=" label "//" * * write$ newline$ % display the label +%"\\last.label=" last.label "//" * * write$ newline$ % display the label + + last.label label = % if the label repeats the previous label... + { % then increment the extra number + last.extra.num #1 + 'last.extra.num := + % and convert it to a label + last.extra.num int.to.chr$ 'extra.label := + } + { % else set things up for the next entry + "a" chr.to.int$ 'last.extra.num := + + % However, if the year was missing, tack on an extra "a". TDS + year empty$ + {"a" 'extra.label :=} + {"" 'extra.label :=} + if$ + +% "" 'extra.label := % the original method was not to do anything TDS + + label 'last.label := % capture this label for next time + } + if$ +%"\\extra.label = " extra.label "//" * * write$ newline$ % display the label +} + +FUNCTION {reverse.pass} +% pass through the references backwards +% add extra characters to the end of the label string +{ +%"{{" label "}}" * * write$ newline$ % display the label + next.extra "b" = +% original logic: + { "a" 'extra.label := } + 'skip$ + if$ + +% next.extra "b" = { "next.extra was = b" write$ newline$} 'skip$ if$ + +% new as of 1989 Oct 18 +% { "a" 'extra.label := } +% { % Put on an "a" at the end of the label if the year is missing. TDS +% year empty$ +% { "a" 'extra.label := } +% %{ label "a" * 'label := } +% 'skip$ % otherwise leave it alone (orignial method) +% if$ } +% if$ + +% label extra.label * 'label := % TDS ORIGINAL LABEL METHOD + +% stick {\rm } around extra.label if it's not empty TDS + extra.label "" = + 'skip$ + { label "{\rm{" extra.label "}}" * * * 'label :=} + if$ + + extra.label 'next.extra := +%"{{" label "}}" * * write$ newline$ % display the label +} + +FUNCTION {bib.sort.order} +% Generate the sort.key$ variables for sorting. +% The sorting is first on the sort.label (ie, author's name), followed +% by the year then the title. If there is no year, the cite$ is used. +{ + sort.label % this is based on the author name + " " * % tack on some space +% original apa command was to use the year or an empty string: +% year field.or.null sortify +% +% Replace that with the use of the cite$, when there is no year: + year duplicate$ empty$ + {pop$ cite$} + 'skip$ + if$ + + * " " * % tack on some space + +% I CAN'T STAND SORTING ON TITLE!!! TDS 1989 Dec 5 +% title field.or.null +% sort.format.title +% * % attach them together + cite$ + * % use cite$ instead!! + + % note: if there is no year, then the cite$ will override the sorting + % on the title. Oh well. Title sorting is sorta (ha ha) awful. + + #1 entry.max$ substring$ + 'sort.key$ := + + % The following line helps debug the program. It shows what the sort.key$ is. + % "%" sort.key$ * write$ newline$ +} + +% Here is the place that the actual executions of the labeling and sorting +% functions are done. + + +EXECUTE {initialize.extra.label.stuff} % initialize variables +ITERATE {bib.sort.order} % set up the sorting keys +SORT % by sort.label, year, title---giving final bibliography order +% Having sorted NOW we apply the extra letters at the end! +ITERATE {forward.pass} +REVERSE {reverse.pass} + +FUNCTION {begin.bib} +{ preamble$ empty$ % no \etalchar in apalike + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{}" write$ newline$ % no labels in apalike +} + +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/misc/jas99.bst b/obsolete/biblio/bibtex/contrib/misc/jas99.bst new file mode 100644 index 0000000000..ca4a4dc129 --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/misc/jas99.bst @@ -0,0 +1,1336 @@ +% Attempted hack to create BibTeX `jas' style for BibTeX version 0.99c +% Journal of Atmospheric Science, Journal of Applied Meteorology +% Monthly Weather Review +% by Mike Moran, Dept. of Atmospheric Science, Colorado State University +% based on `newapa' style file. Changes are documented. March 9, 1990 +% Submitted 20-JUL-1993 by Piotr J. Flatau <pflatau@macao.ucsd.edu> +% e-mail for Mike Moran: <mmoran@cid.aes.doe.ca> +% ======================================================================== +% +% BibTeX `newapa' style file for BibTeX version 0.99c, LaTeX version 2.09 +% Place it in a file called newapa.bst in the BibTeX search path. +%(Placing it in the same directory as the LaTeX document should also work.) +% Support for named citations is provided by named.sty + +% This version was made by modifying the master file made by +% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX +% style of Peter F. Patel-Schneider. + +% Copyright (C) 1985, all rights reserved. +% Modifications Copyright 1989, 1990, Stephen N. Spencer +% 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, and abbrv.bst. +% This restriction helps ensure that all standard styles are identical. + +% There are undoubtably bugs in this style. If you make bug fixes, +% improvements, etc. please let me know. My e-mail address is: +% spencer@heinlein.cgrg.ohio.state.edu +% +% Citation format: (author-last-name, year) +% (author-last-name and author-last-name, year) +% (author-last-name {\em et al.}, year) +% (author-last-name) +% (author-last-name and author-last-name) +% (author-last-name {\em et al.}) +% (year) +% +% Reference list ordering: alphabetical by author or whatever passes +% for author in the absence of one. +% +% This BibTeX style has support for abbreviated author lists and for +% year-only citations. This is done by having the citations +% actually look like +% +% \citeauthoryear{full-author-info}{abbrev-author-info}{year} +% +% The LaTeX style has to have the following (or similar) +% +% \let\@internalcite\cite +% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite} +% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite} +% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite} +% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite} +% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite} +% + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key +% month + note + number + organization + pages + publisher + school + series + title + type + volume + year + } + {} + { label extra.label sort.label } + +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 u } + +%% Added this function March 9, 1990. Used in FUNCTION format.vol.num.pages +FUNCTION {boldcize} +{ 's := + s "" = + { "" } + { "{\bf " s * "}" * } + if$ +} + +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 +} + +%% Added this entire function based on JAS98.BST (March 10, 1990) +FUNCTION {output.nonnull1} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { write$ %% This is only difference + 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$ +} + +%% Added this function based on JAS98.BST (March 10, 1990) +FUNCTION {output.check1} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull1 %% Only difference + if$ +} + +FUNCTION {output.year.check} +{ year empty$ + { "empty year in " cite$ * warning$ } + { write$ +%% " (" year * extra.label * ") " * + ", " year * extra.label * ": " * +%% March 9, 1990 + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + + "\bibitem[" write$ + label write$ + "]{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + #1 'nameptr := % nameptr = 1; + s num.names$ 'numnames := % numnames = num.name$(s); + numnames 'namesleft := + { namesleft #0 > } + + { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := + + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := % nameptr += 1; + namesleft #1 - 'namesleft := % namesleft =- 1; + } + while$ +} + +%% Added this entire function based on JAS98.BST (March 10, 1990) +FUNCTION {format.names.reverse1} +{ 's := + #1 'nameptr := % nameptr = 1 (name pointer variable); + s num.names$ 'numnames := % numnames = num.name$(s); + numnames 'namesleft := % namesleft = numnames (names left variable); + { namesleft #0 > } + +%% So long as "namesleft" is positive, execute following function + { +%% s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % Set name format + + nameptr #1 > +%% ** Co-authors section + { + s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := % Set name format + namesleft #1 > +%% ** Not last author + { ", " * t * } +%% ** Last author + { numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } +%% ** First author section + { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % Set name format + t + } + if$ + nameptr #1 + 'nameptr := % nameptr += 1; + namesleft #1 - 'namesleft := % namesleft =- 1; + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } +%% { author format.names } + { author format.names.reverse1 } +%% March 10, 1990 + if$ +} + +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names + editor num.names$ #1 > + { ", editors" * } + { ", editor" * } + 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$ + { "" } + { "volume" 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 * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " edition" * } + { edition "t" change.case$ " edition" * } + 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 +%% { "pages" pages n.dashify tie.or.space.connect } +%% { "page" pages tie.or.space.connect } + { pages n.dashify tie.or.space.connect } + { pages tie.or.space.connect } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +%%{ volume field.or.null +{volume field.or.null boldcize %% March 9, 1990 + 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 * } + { ", " * pages n.dashify * } %% March 9, 1990 + 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$ + { "In " booktitle emphasize * } +%% { "In " format.editors * ", " * booktitle emphasize * } + { "In " booktitle emphasize * ", " * format.editors * } +%% March 11, 1990 + if$ + } + 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} +{ "In" + "\cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ editor #1 "{vv~}{ll}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { " et~al." * } + { " and " * editor #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "In " + } + { "Volume" 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 * "\/}" * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ "In" + " \cite{" * crossref * "}" * +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 10, 1990 + new.block + crossref missing$ + { journal emphasize "journal" output.check + format.vol.num.pages output + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + output.year.check % added + new.block +%% format.btitle "title" output.check + format.btitle "title" output.check1 %% March 11, 1990 + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output + pages output %% March 11, 1990 + } + { new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + new.block + note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + howpublished output + address output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + output.year.check % added + new.block +%% format.btitle "title" output.check + format.btitle "title" output.check1 %% March 11, 1990 + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output +%% format.chapter.pages "chapter and pages" output.check + pages output %% March 20, 1990 + } + { format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output +%% format.chapter.pages output %% March 20, 1990 + new.sentence + publisher "publisher" output.check + address output + format.edition output + pages output %% March 20, 1990 + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output +%% new.sentence %% March 17, 1990 + organization output + publisher output + address output + pages output + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + format.authors output + author format.key output % added + output.year.check % added + new.block +%% format.btitle "title" output.check + format.btitle "title" output.check1 %% March 11, 1990 + organization address new.block.checkb + organization output + address output + format.edition output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + "Master's thesis" format.thesis.type output.nonnull + school "school" output.check + address output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + author format.key output % added + output.year.check % added + title howpublished new.block.checkb +%% format.title output + format.title "title" output.check1 %% March 11, 1990 + new.block + howpublished output + pages output %% March 11, 1990 +%% new.block %% March 17, 1990 + note output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.btitle "title" output.check + format.btitle "title" output.check1 %% March 11, 1990 + new.block + "PhD thesis" format.thesis.type output.nonnull + school "school" output.check + address output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + editor empty$ + { organization output } + { format.editors output.nonnull } + if$ + author format.key output % added + output.year.check % added + new.block +%% format.btitle "title" output.check + format.btitle "title" output.check1 %% March 11, 1990 + format.bvolume output + format.number.series output + address output + new.sentence + organization output + publisher output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + format.tr.number output.nonnull + institution "institution" output.check + address output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + 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 + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +INTEGERS { fullptr numfull fullsleft } + +STRINGS { u1 u2 } + +%FUNCTION {my.full.label} +%{ +% "foo" 'u := +% u +%} + +FUNCTION {my.full.label} +{ +% Initialize 'u1','u2','s'. + "" 'u1 := + "" 'u2 := + 's := + +% Initialize 'fullptr','numfull','fullsleft'. + #1 'fullptr := + s num.names$ 'numfull := + numfull 'fullsleft := + +% enter the while loop which generates the first-citation information. +% while we have names left, +% format the next name +% if this is the next-to-last name, tack the ampersand on the end +% else if this isn't the last name, tack the comma on the end. +% concatenate the next name onto the first-citation string. +% update the counters. + + { fullsleft #0 > } + { s fullptr "{vv~}{ll}" format.name$ 'u1 := + fullsleft #2 = + { u1 " \& " * 'u1 := } + { fullsleft #2 > + { u1 ", " * 'u1 := } + 'skip$ + if$ + } + if$ + u2 u1 * 'u2 := + fullptr #1 + 'fullptr := + fullsleft #1 - 'fullsleft := + } + while$ + +% push 'u2' onto the stack -- our first-citation information. + u2 +} + +FUNCTION {format.lab.names} +{ 's := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { "et~al. " * } + { " and " * s #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {calc.label} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + duplicate$ + + author my.full.label % generate the first-citation information. + + "\protect\citeauthoryear{" swap$ * "}{" * swap$ * "}{" * + year field.or.null purify$ #-1 #4 substring$ * + 'label := + year field.or.null purify$ #-1 #4 substring$ * + sortify 'sort.label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.sort + 'author.sort + if$ + } + if$ + #1 entry.max$ substring$ % added for newapa + 'sort.label := % added for newapa + sort.label % added for newapa + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} + +SORT % sort by label, sort.label, title --- for final label calculation + +STRINGS { last.label next.extra } + +INTEGERS { last.extra.num } + +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := +} + +FUNCTION {forward.pass} +{ last.label 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 := + label 'last.label := + } + if$ +} + +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + label extra.label * "}" * 'label := + extra.label 'next.extra := +} + +EXECUTE {initialize.extra.label.stuff} + +ITERATE {forward.pass} + +REVERSE {reverse.pass} + +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {bib.sort.order} + +SORT % by sort.label, year, title --- giving final bib. order. + +FUNCTION {begin.bib} + +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{}" 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/misc/jas99_m.bst b/obsolete/biblio/bibtex/contrib/misc/jas99_m.bst new file mode 100644 index 0000000000..6b462051f2 --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/misc/jas99_m.bst @@ -0,0 +1,1365 @@ +% jas99_m.bst: +% BibTeX style based on jas99.bst (Mike Moran, 1990, see below), +% modified for better conformity to the American Meteorological +% Society (AMS) style. +% +% Before distributing this file, I sent email to the original +% author (Mike Moran) and the maintainer (Piotr J. Flatau) for +% permission, but apparantly both email addresses listed below +% were disabled and email messages I sent were bounced back. +% +% So, I make this modified file public without their permission, +% since I guess they would grant it, as is usually the case for +% this kind of files. If it's not OK to make this public, please +% contact me. +% +% Undoubtedly there are remaining inconformities to the AMS +% style, because I corrected only the features that I used. +% If you find bugs, please let me know, although I cannot +% promise that I would find time to fix it. +% +% Ryo Furue, Center for Climate System Research, U of Tokyo, +% <furufuru@ccsr.u-tokyo.ac.jp>, 23 June 2000. +% +% ======================================================================= +% Attempted hack to create BibTeX `jas' style for BibTeX version 0.99c +% Journal of Atmospheric Science, Journal of Applied Meteorology +% Monthly Weather Review +% by Mike Moran, Dept. of Atmospheric Science, Colorado State University +% based on `newapa' style file. Changes are documented. March 9, 1990 +% Submitted 20-JUL-1993 by Piotr J. Flatau <pflatau@macao.ucsd.edu> +% e-mail for Mike Moran: <mmoran@cid.aes.doe.ca> +% ======================================================================== +% +% BibTeX `newapa' style file for BibTeX version 0.99c, LaTeX version 2.09 +% Place it in a file called newapa.bst in the BibTeX search path. +%(Placing it in the same directory as the LaTeX document should also work.) +% Support for named citations is provided by named.sty + +% This version was made by modifying the master file made by +% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX +% style of Peter F. Patel-Schneider. + +% Copyright (C) 1985, all rights reserved. +% Modifications Copyright 1989, 1990, Stephen N. Spencer +% 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, and abbrv.bst. +% This restriction helps ensure that all standard styles are identical. + +% There are undoubtably bugs in this style. If you make bug fixes, +% improvements, etc. please let me know. My e-mail address is: +% spencer@heinlein.cgrg.ohio.state.edu +% +% Citation format: (author-last-name, year) +% (author-last-name and author-last-name, year) +% (author-last-name {\em et al.}, year) +% (author-last-name) +% (author-last-name and author-last-name) +% (author-last-name {\em et al.}) +% (year) +% +% Reference list ordering: alphabetical by author or whatever passes +% for author in the absence of one. +% +% This BibTeX style has support for abbreviated author lists and for +% year-only citations. This is done by having the citations +% actually look like +% +% \citeauthoryear{full-author-info}{abbrev-author-info}{year} +% +% The LaTeX style has to have the following (or similar) +% +% \let\@internalcite\cite +% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite} +% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite} +% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite} +% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite} +% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite} +% + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key +% month + note + number + organization + pages + publisher + school + series + title + type + volume + year + } + {} + { label extra.label sort.label } + +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 u } + +%% Added this function March 9, 1990. Used in FUNCTION format.vol.num.pages +FUNCTION {boldcize} +{ 's := + s "" = + { "" } + { "{\bf " s * "}" * } + if$ +} + +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 +} + +%% Added this entire function based on JAS98.BST (March 10, 1990) +FUNCTION {output.nonnull1} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { write$ %% This is only difference + 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$ +} + +%% Added this function based on JAS98.BST (March 10, 1990) +FUNCTION {output.check1} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull1 %% Only difference + if$ +} + +FUNCTION {output.year.check} +{ year empty$ + { "empty year in " cite$ * warning$ } + { write$ +%% " (" year * extra.label * ") " * + ", " year * extra.label * ": " * +%% March 9, 1990 + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + + "\bibitem[" write$ + label write$ + "]{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +%% name format for names within an entry +%% (for names *within* an entry, not for authors). %%Ryo%% +FUNCTION {format.names} +{ 's := + #1 'nameptr := % nameptr = 1; + s num.names$ 'numnames := % numnames = num.name$(s); + numnames 'namesleft := + { namesleft #0 > } + +%%Ryo { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := + { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't := + + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := % nameptr += 1; + namesleft #1 - 'namesleft := % namesleft =- 1; + } + while$ +} + +%% Added this entire function based on JAS98.BST (March 10, 1990) +FUNCTION {format.names.reverse1} +{ 's := + #1 'nameptr := % nameptr = 1 (name pointer variable); + s num.names$ 'numnames := % numnames = num.name$(s); + numnames 'namesleft := % namesleft = numnames (names left variable); + { namesleft #0 > } + +%% So long as "namesleft" is positive, execute following function + { +%% s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % Set name format + + nameptr #1 > +%% ** Co-authors section + { + s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := % Set name format + namesleft #1 > +%% ** Not last author + { ", " * t * } +%% ** Last author + { %% numnames #2 > %%Ryo + %% { "," * } + %% 'skip$ + %%if$ + "," * + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } +%% ** First author section + { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := % Set name format + t + } + if$ + nameptr #1 + 'nameptr := % nameptr += 1; + namesleft #1 - 'namesleft := % namesleft =- 1; + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } +%% { author format.names } + { author format.names.reverse1 } +%% March 10, 1990 + if$ +} + +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names + editor num.names$ #1 > + { ", Eds." * } %%Ryo%% + { ", Ed." * } %%Ryo%% + 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$ + { "" } + { "volume" 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 * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " edition" * } + { edition "t" change.case$ " edition" * } + 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 +%% { "pages" pages n.dashify tie.or.space.connect } +%% { "page" pages tie.or.space.connect } + { pages n.dashify tie.or.space.connect } + { pages tie.or.space.connect } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +%%{ volume field.or.null +{volume field.or.null boldcize %% March 9, 1990 + 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 * } + { ", " * pages n.dashify * } %% March 9, 1990 + 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 * } %%Ryo%% +%% { "In " format.editors * ", " * booktitle emphasize * } + { "" booktitle emphasize * ", " * format.editors * } %%Ryo%% +%% March 11, 1990 + if$ + } + 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} +{ "In" + "\cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ editor #1 "{vv~}{ll}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { " et~al." * } + { " and " * editor #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "In " + } + { "Volume" 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 * "\/}" * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ "In" + " \cite{" * crossref * "}" * +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 10, 1990 + new.block + crossref missing$ + { journal emphasize "journal" output.check + format.vol.num.pages output + } + { format.article.crossref output.nonnull + format.pages output + } + if$ +%%Ryo%% new.block + note output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + output.year.check % added + new.block +%% format.btitle "title" output.check + format.btitle "title" output.check1 %% March 11, 1990 + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output +%%Ryo pages output %% March 11, 1990 + pages " pp" * output + } + { new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + new.block + note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + howpublished output + address output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + output.year.check % added + new.block +%% format.btitle "title" output.check + format.btitle "title" output.check1 %% March 11, 1990 + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output +%% format.chapter.pages "chapter and pages" output.check + pages output %% March 20, 1990 + } + { format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output +%% format.chapter.pages output %% March 20, 1990 + new.sentence + publisher "publisher" output.check + address output + format.edition output + pages output %% March 20, 1990 + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output +%% new.sentence %% March 17, 1990 + organization output + publisher output + address output + pages output + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + format.authors output + author format.key output % added + output.year.check % added + new.block +%% format.btitle "title" output.check + format.btitle "title" output.check1 %% March 11, 1990 + organization address new.block.checkb + organization output + address output + format.edition output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + "Master's thesis" format.thesis.type output.nonnull + school "school" output.check + address output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + author format.key output % added + output.year.check % added + title howpublished new.block.checkb +%% format.title output + format.title "title" output.check1 %% March 11, 1990 + new.block + howpublished output + pages output %% March 11, 1990 +%% new.block %% March 17, 1990 + note output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.btitle "title" output.check + format.btitle "title" output.check1 %% March 11, 1990 + new.block + "PhD thesis" format.thesis.type output.nonnull + school "school" output.check + address output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + editor empty$ + { organization output } + { format.editors output.nonnull } + if$ + author format.key output % added + output.year.check % added + new.block +%% format.btitle "title" output.check + format.btitle "title" output.check1 %% March 11, 1990 + format.bvolume output + format.number.series output + address output + new.sentence + organization output + publisher output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + format.tr.number output.nonnull + institution "institution" output.check + address output + pages output %% March 11, 1990 + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + author format.key output % added + output.year.check % added + new.block +%% format.title "title" output.check + format.title "title" output.check1 %% March 11, 1990 + new.block + 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 + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +INTEGERS { fullptr numfull fullsleft } + +STRINGS { u1 u2 } + +%FUNCTION {my.full.label} +%{ +% "foo" 'u := +% u +%} + +FUNCTION {my.full.label} +{ +% Initialize 'u1','u2','s'. + "" 'u1 := + "" 'u2 := + 's := + +% Initialize 'fullptr','numfull','fullsleft'. + #1 'fullptr := + s num.names$ 'numfull := + numfull 'fullsleft := + +% enter the while loop which generates the first-citation information. +% while we have names left, +% format the next name +% if this is the next-to-last name, tack the ampersand on the end +% else if this isn't the last name, tack the comma on the end. +% concatenate the next name onto the first-citation string. +% update the counters. + + { fullsleft #0 > } + { s fullptr "{vv~}{ll}" format.name$ 'u1 := + fullsleft #2 = + { u1 " \& " * 'u1 := } + { fullsleft #2 > + { u1 ", " * 'u1 := } + 'skip$ + if$ + } + if$ + u2 u1 * 'u2 := + fullptr #1 + 'fullptr := + fullsleft #1 - 'fullsleft := + } + while$ + +% push 'u2' onto the stack -- our first-citation information. + u2 +} + +FUNCTION {format.lab.names} +{ 's := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { "et~al. " * } + { " and " * s #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {calc.label} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + duplicate$ + + author my.full.label % generate the first-citation information. + + "\protect\citeauthoryear{" swap$ * "}{" * swap$ * "}{" * + year field.or.null purify$ #-1 #4 substring$ * + 'label := + year field.or.null purify$ #-1 #4 substring$ * + sortify 'sort.label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.sort + 'author.sort + if$ + } + if$ + #1 entry.max$ substring$ % added for newapa + 'sort.label := % added for newapa + sort.label % added for newapa + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} + +SORT % sort by label, sort.label, title --- for final label calculation + +STRINGS { last.label next.extra } + +INTEGERS { last.extra.num } + +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := +} + +FUNCTION {forward.pass} +{ last.label 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 := + label 'last.label := + } + if$ +} + +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + label extra.label * "}" * 'label := + extra.label 'next.extra := +} + +EXECUTE {initialize.extra.label.stuff} + +ITERATE {forward.pass} + +REVERSE {reverse.pass} + +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {bib.sort.order} + +SORT % by sort.label, year, title --- giving final bib. order. + +FUNCTION {begin.bib} + +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{}" 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/misc/numalg.bst b/obsolete/biblio/bibtex/contrib/misc/numalg.bst new file mode 100644 index 0000000000..697cd41974 --- /dev/null +++ b/obsolete/biblio/bibtex/contrib/misc/numalg.bst @@ -0,0 +1,1370 @@ +%%% ==================================================================== +%%% @BibTeX-style-file{ +%%% filename = "numalg.bst", +%%% version = "1.0", +%%% date = "2003/06/30", +%%% time = "00:00:00 CET", +%%% author = "Richard J Mathar", +%%% address = "Max Planck Institute of Astronomy, +%%% Konigstuhl 17, +%%% 69117 Heidelberg +%%% Germany", +%%% telephone = "(+49)6221-528-302", +%%% FAX = "(+49)6221-528-246", +%%% email = "mathar@mpia.de", +%%% copyright = " This generated file can be redistributed and/or +%%% modified under the terms of the LaTeX Project Public +%%% License Distributed from CTAN archives in directory +%%% macros/latex/base/lppl.txt; either version 1 of the +%%% License, or any later version.", +%%% codetable = "ISO/ASCII", +%%% keywords = "bibtex, bibliography, Kluwer, Numerical Algorithms", +%%% abstract = "BibTeX bibliography style `numalg' for BibTeX +%%% versions 0.99a or later and LaTeX version 2e. +%%% Produces items in a form close to the style +%%% of Kluwer's Numerical Algorithms. For the generic +%%% Kluwer styles see http://www.wkap.nl/authors/jrnlstylefiles/.", +%%% docstring = "Produced by latex makebst.tex. +%%% To be replaced by any official Kluwer file once +%%% available." +%%% } +%%% ==================================================================== + +%% +%% This is file `numalg.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% merlin.mbs (with options: `,nm-init,ed-au,yr-par,xmth,jttl-rm,vnum-x,volp-blk,jdt-vs,pgsep-s,pp-last,jnm-x,pub-date,pre-pub,url,url-blk,edby,edbyx,blk-com,in-col,pp,ed,abr,xedn,jabr,and-xcom,nfss') +%% ---------------------------------------- +%% *** Kluwer Numerical Algorithms *** +%% +%% Copyright 1994-1999 Patrick W Daly + % =============================================================== + % IMPORTANT NOTICE: + % This bibliographic style (bst) file has been generated from one or + % more master bibliographic style (mbs) files, listed above. + % + % This generated file can be redistributed and/or modified under the terms + % of the LaTeX Project Public License Distributed from CTAN + % archives in directory macros/latex/base/lppl.txt; either + % version 1 of the License, or any later version. + % =============================================================== + % Name and version information of the main mbs file: + % \ProvidesFile{merlin.mbs}[1999/05/28 3.89 (PWD)] + % For use with BibTeX version 0.99a or later + %------------------------------------------------------------------- + % This bibliography style file is intended for texts in ENGLISH + % This is a numerical citation style, and as such is standard LaTeX. + % It requires no extra package to interface to the main text. + % The form of the \bibitem entries is + % \bibitem{key}... + % Usage of \cite is as follows: + % \cite{key} ==>> [#] + % \cite[chap. 2]{key} ==>> [#, chap. 2] + % where # is a number determined by the ordering in the reference list. + % The order in the reference list is alphabetical by authors. + %--------------------------------------------------------------------- + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + url + volume + year + } + {} + { label } + +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 } + +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 {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {date.block} +{ + skip$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\emph{" swap$ * "}" * } + if$ +} + + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "eds." } + +FUNCTION {bbl.editor} +{ "ed." } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "edn." } + +FUNCTION {bbl.volume} +{ "vol." } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "no." } + +FUNCTION {bbl.nr} +{ "no." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "pp." } + +FUNCTION {bbl.page} +{ "p." } + +FUNCTION {bbl.chapter} +{ "chap." } + +FUNCTION {bbl.techrep} +{ "Tech. Rep." } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +MACRO {jan} {"Jan."} + +MACRO {feb} {"Feb."} + +MACRO {mar} {"Mar."} + +MACRO {apr} {"Apr."} + +MACRO {may} {"May"} + +MACRO {jun} {"Jun."} + +MACRO {jul} {"Jul."} + +MACRO {aug} {"Aug."} + +MACRO {sep} {"Sep."} + +MACRO {oct} {"Oct."} + +MACRO {nov} {"Nov."} + +MACRO {dec} {"Dec."} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Softw. Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput.-Aided Design Integrated Circuits"} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Programming"} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Gr."} + +MACRO {toms} {"ACM Trans. Math. Softw."} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."} + +MACRO {tcs} {"Theoretical Comput. Sci."} + + +FUNCTION {format.url} +{ url empty$ + { "" } + { "\urlprefix\url{" url * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{f.~}{vv~}{ll}{, jj}" format.name$ + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.names.ed} +{ format.names } + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names + ", " * + editor num.names$ #1 > + 'bbl.editors + 'bbl.editor + if$ + * + } + if$ +} + +FUNCTION {format.in.editors} +{ editor empty$ + { "" } + { editor format.names.ed + } + if$ +} + +FUNCTION {format.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title "t" change.case$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {if.digit} +{ duplicate$ "0" = + swap$ duplicate$ "1" = + swap$ duplicate$ "2" = + swap$ duplicate$ "3" = + swap$ duplicate$ "4" = + swap$ duplicate$ "5" = + swap$ duplicate$ "6" = + swap$ duplicate$ "7" = + swap$ duplicate$ "8" = + swap$ "9" = or or or or or or or or or +} +FUNCTION {n.separate} +{ 't := + "" + #0 'numnames := + { t empty$ not } + { t #-1 #1 substring$ if.digit + { numnames #1 + 'numnames := } + { #0 'numnames := } + if$ + t #-1 #1 substring$ swap$ * + t #-2 global.max$ substring$ 't := + numnames #5 = + { duplicate$ #1 #2 substring$ swap$ + #3 global.max$ substring$ + "\," swap$ * * + } + 'skip$ + if$ + } + while$ +} +FUNCTION {n.dashify} +{ + n.separate + '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 {word.in} +{ bbl.in + ":" * + " " * } + +FUNCTION {format.date} +{ year empty$ + { "" } + 'year + if$ + duplicate$ empty$ + 'skip$ + { + before.all 'output.state := + " (" swap$ * ")" * + } + if$ +} + +FUNCTION{format.year} +{ year duplicate$ empty$ + { "empty year in " cite$ * warning$ pop$ "" } + { " (" swap$ * ")" * } + if$ +} + +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$ + { "" } + { bbl.volume volume tie.or.space.connect + series empty$ + 'skip$ + { bbl.of space.word * 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 = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { bbl.in space.word * series * } + if$ + } + if$ + } + { "" } + if$ +} + + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " " * bbl.edition * } + { edition "t" change.case$ " " * bbl.edition * } + 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 + { bbl.pages pages n.dashify tie.or.space.connect } + { bbl.page pages tie.or.space.connect } + if$ + } + if$ +} + +FUNCTION {format.journal.pages} +{ pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { + " " * + pages n.dashify * + } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + format.year * +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + { "" } + { type empty$ + { bbl.chapter } + { type "l" change.case$ } + if$ + chapter tie.or.space.connect + } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ booktitle empty$ + { "" } + { editor empty$ + { word.in booktitle emphasize * } + { word.in booktitle emphasize * + ", " * + editor num.names$ #1 > + { bbl.editors } + { bbl.editor } + if$ + * " " * + format.in.editors * + } + 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$ + { bbl.techrep } + '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$ + "" + } + { word.in journal emphasize * } + if$ + } + { word.in key * " " *} + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ editor #1 "{vv~}{ll}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * editor #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + word.in + } + { bbl.volume volume tie.or.space.connect + bbl.of space.word * + } + 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$ + "" * + } + { series emphasize * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +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$ + "" + } + { word.in booktitle emphasize * } + if$ + } + { word.in key * " " *} + if$ + } + { word.in format.crossref.editor * " " *} + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.org.or.pub} +{ 't := + "" + year empty$ + { "empty year in " cite$ * warning$ } + 'skip$ + if$ + address empty$ t empty$ and + year empty$ and + 'skip$ + { + add.blank "(" * + t empty$ + { address empty$ + 'skip$ + { address * } + if$ + } + { t * + address empty$ + 'skip$ + { ", " * address * } + if$ + } + if$ + year empty$ + 'skip$ + { t empty$ address empty$ and + 'skip$ + { ", " * } + if$ + year * + } + if$ + ")" * + } + if$ +} + +FUNCTION {format.publisher.address} +{ publisher empty$ + { "empty publisher in " cite$ * warning$ + "" + } + { publisher } + if$ + format.org.or.pub +} + +FUNCTION {format.organization.address} +{ organization empty$ + { "" } + { organization } + if$ + format.org.or.pub +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + format.title "title" output.check + crossref missing$ + { journal + "journal" output.check + add.blank + format.vol.num.pages output + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + format.journal.pages + format.url output + format.note output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + format.number.series output + format.publisher.address output + } + { + format.book.crossref output.nonnull + format.date "year" output.check + } + if$ + format.edition output + format.url output + format.note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + format.title "title" output.check + howpublished output + address output + format.date output + format.url output + format.note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + format.btitle "title" output.check + crossref missing$ + { + format.publisher.address output + format.bvolume output + format.chapter.pages "chapter and pages" output.check + format.number.series output + } + { + format.chapter.pages "chapter and pages" output.check + format.book.crossref output.nonnull + format.date "year" output.check + } + if$ + format.edition output + format.pages "pages" output.check + format.url output + format.note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + format.title "title" output.check + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.publisher.address output + format.bvolume output + format.number.series output + format.chapter.pages output + format.edition output + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + format.pages "pages" output.check + format.url output + format.note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + format.title "title" output.check + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + publisher empty$ + { format.organization.address output } + { organization output + format.publisher.address output + } + if$ + format.bvolume output + format.number.series output + format.pages output + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + format.url output + format.note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + format.btitle "title" output.check + author empty$ + { organization empty$ + { + address output + } + 'skip$ + if$ + } + { + organization output + address output + } + if$ + format.edition output + format.date output + format.url output + format.note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + format.btitle "title" output.check + bbl.mthesis format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + format.url output + format.note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + format.title output + howpublished output + format.date output + format.url output + format.note output + fin.entry + empty.misc.check +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + format.btitle "title" output.check + bbl.phdthesis format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + format.url output + format.note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + editor empty$ + { organization output } + { format.editors output.nonnull } + if$ + format.btitle "title" output.check + format.bvolume output + format.number.series output + editor empty$ + { publisher empty$ + 'skip$ + { + format.publisher.address output + } + if$ + } + { publisher empty$ + { + format.organization.address output } + { + organization output + format.publisher.address output + } + if$ + } + if$ + format.url output + format.note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + format.title "title" output.check + format.tr.number output.nonnull + institution "institution" output.check + address output + format.date "year" output.check + format.url output + format.note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + format.title "title" output.check + format.date output + format.url output + format.note "note" output.check + fin.entry +} + +FUNCTION {default.type} { misc } + +READ + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { t sortify * } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.organization.sort} +{ author empty$ + { organization empty$ + { key empty$ + { "to sort, need author, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.organization.sort} +{ editor empty$ + { organization empty$ + { key empty$ + { "to sort, need editor, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { editor sort.format.names } + if$ +} + +FUNCTION {presort} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.organization.sort + { type$ "manual" = + 'author.organization.sort + 'author.sort + if$ + } + if$ + } + if$ + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} + +SORT + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +EXECUTE {initialize.longest.label} + +ITERATE {longest.label.pass} + +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" longest.label * "}" * + write$ newline$ + "\expandafter\ifx\csname url\endcsname\relax" + write$ newline$ + " \def\url#1{\texttt{#1}}\fi" + write$ newline$ + "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi" + write$ newline$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} +%% End of customized bst file +%% +%% End of file `numalg.bst'. |