% March & April 1998 % James R. Larus % larus@cs.wisc.edu % Modified to produce better output for EndNote. % % 8/4/'90 %Ciaran McHale %Department of Computer Science, Trinity College, Dublin 2, Ireland. %Telephone: +353-1-772941 ext 1538 FAX: +353-1-772204 Telex: 93782 TCD EI %email: cjmchale@cs.tcd.ie or cjmchale%cs.tcd.ie@cunyvm.cuny.edu % Hacked together by Ciaran McHale (cjmchale@cs.tcd.ie) to translate % BibTeX bibliographies into refer format % Based on a bib style file by Kannan Varadhan % ENTRY { % entry fields abstract % non standard address annote % non standard author booktitle chapter edition editor howpublished institution journal key keywords % non standard month note number organization pages publisher school series title type volume year } {} % no integer entry variables { label extra.label sort.label } % label entry variables STRINGS { s t a.name } FUNCTION {not} { { #0 } { #1 } if$ } FUNCTION {and} { 'skip$ { pop$ #0 } if$ } FUNCTION {or} { { pop$ #1 } 'skip$ if$ } INTEGERS { nameptr namesleft numnames } FUNCTION {handle.names} { 't := % type e.g. "A" for authors, "E" for editors 's := % the string containing the names #1 'nameptr := s num.names$ 'numnames := numnames 'namesleft := { namesleft #0 > } { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 'a.name := a.name "others" = 'skip$ % don't print out "%A others" { "%" t * " " * a.name * write$ newline$ } if$ nameptr #1 + 'nameptr := namesleft #1 - 'namesleft := } while$ } FUNCTION {handle.maybe.empty} { 't := duplicate$ empty$ 'pop$ { "%" t * " " * swap$ * write$ newline$ } if$ } FUNCTION {translate} { newline$ % get a blank line between each entry "%0 " swap$ * write$ newline$ title "T" handle.maybe.empty booktitle "B" handle.maybe.empty % there may be multiple authors so handle it differently author empty$ { " empty author " cite$ * warning$ } { author "A" handle.names } if$ editor empty$ { } { editor "E" handle.names } if$ journal "B" handle.maybe.empty keywords "K" handle.maybe.empty cite$ "F" handle.maybe.empty key "F" handle.maybe.empty volume "V" handle.maybe.empty % The date, if present may be just the year or both the month and year % or might even be just the month month empty$ year empty$ and 'skip$ % no date of publication so nothing to do { month empty$ % I'm using the if statement because I'm not { "" } % sure that--- month " " year * --- would work. { month " " * } % (The manual doesn't mention anything about if$ % this so I'm playing safe) year empty$ { "" } { year } if$ * "8" handle.maybe.empty } if$ year "D" handle.maybe.empty pages "P" handle.maybe.empty number empty$ not { volume empty$ { number "@" handle.maybe.empty } { number "N" handle.maybe.empty } if$ } { } if$ series "S" handle.maybe.empty annote "Z" handle.maybe.empty address "C" handle.maybe.empty note "Z" handle.maybe.empty % edition "7" handle.maybe.empty howpublished "9" handle.maybe.empty publisher "I" handle.maybe.empty organization "I" handle.maybe.empty school "I" handle.maybe.empty institution "I" handle.maybe.empty abstract "X" handle.maybe.empty type "9" handle.maybe.empty % chapter ?? } FUNCTION {article} { "Journal Article" translate } FUNCTION {book} { "Book" translate } FUNCTION {booklet} { "Book" translate } FUNCTION {inbook} { "Book Section" translate } FUNCTION {incollection} { "Book Section" translate } %FUNCTION {inproceedings} { "Conference Proceedings" translate } FUNCTION {inproceedings} { "Book Section" translate } FUNCTION {manual} { "Report" translate } FUNCTION {mastersthesis} { "Thesis" translate } FUNCTION {misc} { "Generic" translate } FUNCTION {phdthesis} { "Thesis" translate } FUNCTION {proceedings} { "Conference Proceedings" translate } FUNCTION {techreport} { "Report" translate } FUNCTION {unpublished} { "Generic" translate } FUNCTION {default.type} { "Generic" translate } % Added by larus 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 ITERATE {call.type$}