### /u/sy/beebe/tex/bib/melvyl-to-bibtex.awk, Fri May 19 14:55:15 1995 ### Edit by Nelson H. F. Beebe ### ====================================================================== ### Convert a University of California Melvyl library catalog search result ### display from "SET DISPLAY LONG TAG" and "SET PAGING CONTINUOUS" to ### BibTeX format. ### ### Significant portions of this program have been extracted from ### comparch.awk (Computing Archives to BibTeX converter) and used with ### minor modifications. ### ### Usage: ### nawk -f melvyl-to-bibtex.awk BibTeX-file ### ### The companion script, melvyl-to-bibtex, incorporates other useful ### processing steps, and should be the normal way of running this ### program. ### ### It is desirable to filter the output with bibclean and then apply ### GNU Emacs M-x hyphenate-isbn. ### ### [29-Apr-2002] -- Enhance key_ED() and key_NT(), and convert comments ### to Lisp style. ### [29-Jul-1999] -- Remove unused set_in() function, and add missing ### fix_info() (from compendex-to-bibtex.awk) and ### set_volume_issue() (from comparch.awk) functions. ### [29-Sep-1997] -- Add extra newline after Emacs mode string. ### [05-Oct-1996] -- Original version. ### ====================================================================== BEGIN { initialize() } { gsub("[\b\f\r\033]"," ") } # strip BS, FF, CR, and ESCape ### /[0-9][0-9]*[.]/ { next } # discard entry numbers /^AN / { key_AN(); } /^AT / { key_AT(); next } /^AU / { key_AU(); next } /^BN / { key_BN(); next } /^CA / { key_CA(); next } /^CL / { key_CL(); next } /^CT / { key_CT(); next } /^DB / { key_DB(); next } /^DE / { key_DE(); next } /^DP / { key_DP(); next } /^DT / { key_DT(); next } /^ED / { key_ED(); next } /^GD / { key_GD(); next } /^GI / { key_GI(); next } /^IB / { key_IB(); next } /^JT / { key_JT(); next } /^LG / { key_LG(); next } /^LO / { key_LO(); next } /^MN / { key_MN(); next } ### I don't understand why this is sometimes lost!!! /^[M][T] / { # print "==========DEBUG: key_MT() <" $0 ">"; key_MT(); next } /^NT / { key_NT(); next } /^OA / { key_OA(); next } /^OE / { key_OE(); next } /^OT / { key_OT(); next } /^PA / { key_PA(); next } /^PB / { key_PB(); next } /^PG / { key_PG(); next } /^PH / { key_PH(); next } /^PL / { key_PL(); next } /^PT / { key_PT(); next } /^PU / { key_PU(); next } /^RN / { key_RN(); next } /^SE / { key_SE(); next } /^SN / { key_SN(); next } /^SO / { key_SO(); next } /^SR / { key_SR(); next } /^ST / { key_ST(); next } /^SU / { key_SU(); next } /^UT / { key_UC(); next } /^UT / { key_UT(); next } /^VN / { key_VN(); next } /^ZZ/ { key_ZZ(); next } # NB: dummy keyword: no trailing space { other() } END { print_entry() } function append_value( s,separator) { ## Append continuation line data to the entry text of the last_key, ## with special handling for different types of entries if (last_key) { s = trim($0) if (s) { if ( (last_key == "author") || (last_key == "editor") ) { separator = " and " s = fix_author_editor(s) } else if (last_key == "ISBN") separator = ", " else if (last_key == "keywords") separator = "; " else if ((last_key == "subject") && (s ~ /[A-Z][.]/)) separator = " \\\\ " # ACM Subject classification else separator = " " if ((length(entry[last_key]) + length(separator) + length(s)) \ <= STD_MAX_TOKEN) entry[last_key] = entry[last_key] separator s else { # warning("DEBUG: s = <" s ">") # warning("DEBUG: separator = <" separator ">") # warning("DEBUG: $0 = <" $0 ">") # warning("DEBUG: last_key = <" last_key ">") # warning("DEBUG: entry[last_key] = <" entry[last_key] ">") warning("Long value truncated, discarding: [" s "]") } } } } function author_editor() { if ("author" in entry) return (entry["author"]) else if ("editor" in entry) return (entry["editor"]) else return ("Anonymous") } function capitalize(s, k,n,parts) { if (s ~ /[A-Z][A-Z]/) # Reduce HEARN, A. C. to Hearn, A. C. { # but leave McMahon, L. E. unchanged n = split(s,parts," ") for (k = 1; k <= n; ++k) s = (k == 1) ? \ capitalize_word(parts[k]) : \ s " " capitalize_word(parts[k]) } return (s) } function capitalize_word(s, k) { for (k = 1; k <= length(s); ++k) { if (isupper(substr(s,k,1)) && (k > 1) && isletter(substr(s,k-1,1))) s = substr(s,1,k-1) tolower(substr(s,k,1)) substr(s,k+1) } return (s) } function citation_tag( abbrev,k,n,parts,t,tag) { t = capitalize(author_editor()) gsub(/ and /, ",", t) # for uniform field separators split(t,parts,",") # careful: "De La Beaujardiere, Jean-M" has spaces in name gsub(/[^A-Za-z\'\-]/,"",parts[1]) # strip non-(letters,apostrophe) tag = parts[1] ":" entry["year"] ":" n = split(entry["title"],parts," ") abbrev = "" for (k = 1; (k <= n) && (length(abbrev) < 3); ++k) { gsub(/[^A-Za-z0-9'\-]/,"",parts[k]) # strip non-(letters,digits,apostrophe) if (isletter(substr(parts[k],1,1))) { parts[k] = tolower(parts[k]) if (!(parts[k] in ignore)) abbrev = abbrev toupper(substr(parts[k],1,1)) } } return (tag abbrev) } function clean_ISBN( ISBN,parts) { ## Typical values # "0070240493 (H) : US\$29.95, 0070240507 (P) : US\$19.95" ## "0442019963 (Van Nostrand Reinhold), 1850321418 (ITP UK)" ## "0125184085 (acid-free paper)" ## "0125531303 (alk. paper), 0125531311 (CD-Rom : alk. paper)" ## "0127378405 (alk. paper), 0127378413 (CD-ROM)" ## "0201633957 (alk. paper)" ## "0262112078 (alk. paper), 026261118X (pbk. : alk. paper)" ## "0471038571 (alk. paper : pbk.) : US\$19.95" ## "0838976972 (alk. paper) : US\$18.00 (LITA mbr. US\$16.20)" ## "0887369332 (alk. paper : pbk.) : US\$30.00 (US\$37.50 Can. : L21.00 UK)" ## "0471130885 (cloth : alk. paper)" ## "0841232237 (clothbound), 0841232245 (pbk.)" ## "0078811821 (cover), 0078821821: US\$34.95" ## "0079121004 (p)" ## "0471113360 (paper : acid-free paper) : US\$16.95" ## "0471128430 (paper : alk. paper)" ## "0712332952 (pbk)" ## "0471126942 (pbk. : acid-free paper)" ## "047114178X (pbk. : alk. paper)" ## "007024054X (pbk.) : US\$19.95" ## "020140978X (pbk.) US\$26.95 (US\$34.95 Can.)" ## "2707125024 (pbk.) : 140FF" ## "0192627058 (pbk.)" ## "0131515659 (recycled paper)" ## "0387945547 (softcover : alk. paper)" ## "0446671797 (trade pbk.)" ## "088736943X (v. 1 : alk. paper) : US\$7.00, 0887369448 (v. 2 : alk. paper) : US\$7.00, 0887369456 (v. 3 : alk. paper) : US\$7.00, 0887369464 (v. 4 : alk. paper) : US\$7.00, 0887369472 (v. 5 : alk. paper) : US\$7.00, 0887369480 (v. 6 : alk. paper) : US\$7.00" ## "012553132X, 0125531338 (CD-ROM)" ## "1556158858, 1556158181" ## "0070240558 : US\$16.95" ## "0070670188 : US\$45.00, 0070670196 (pbk.) : US\$29.95" ## "0077079051 : L22.95" ## "013185612X : US\$29.95 (US\$39.95 Can.)" ## "0201410001 : US\$17.95 (Can. US\$22.95)" ## "0201627078 : US\$14.95 (US\$18.95 Can.)" ## "0672305305 : US\$25.00 (US\$34.95 CAN)" ## "1562054376 : US\$35.00 (US\$47.95 Can.) (L32.49 UK)" ## "156761521X : US\$12.99" ## "0201407663 US\$12.95 (US\$16.95 Can.)" ## "0789701375 US\$39.99 (US\$53.99 Can.)" ISBN = entry["ISBN"] gsub(/[$]/,"US\\$",ISBN) gsub(/ +,/,",",ISBN) gsub(/\(v[.] /,"(vol. ",ISBN) gsub(/acid-free paper/,"",ISBN) gsub(/alk[.] paper/,"",ISBN) gsub(/mbr[.]/,"members",ISBN) gsub(/pbk[.]/,"paperback",ISBN) gsub(/pbk/,"paperback",ISBN) gsub(/\( *\)/,"",ISBN) gsub(/\([pP]\)/,"(paperback)",ISBN) gsub(/\([hH]\)/,"(hardcover)",ISBN) gsub(/ *: *\)/,")",ISBN) gsub(/\( *: */,"(",ISBN) gsub(/CD-Rom/,"CD-ROM",ISBN) gsub(/C[Aa][Nn][.]? *US/,"CDN",ISBN) gsub(/[ :]+$/,"",ISBN) gsub(/[ ]+/," ",ISBN) while (match(ISBN,/US\\[$][0-9.]+ C[Aa][Nn][.]/)) { ISBN = substr(ISBN,1,RSTART-1) "CDN" substr(ISBN,RSTART+2,RLENGTH-7) \ substr(ISBN,RSTART+RLENGTH) } while (match(ISBN,/US\\[$][0-9.]+ C[Aa][Nn]/)) { ISBN = substr(ISBN,1,RSTART-1) "CDN" substr(ISBN,RSTART+2,RLENGTH-6) \ substr(ISBN,RSTART+RLENGTH) } while (match(ISBN,/L[0-9.]+/)) { ISBN = substr(ISBN,1,RSTART-1) "UK\\pounds" substr(ISBN,RSTART+1,RLENGTH-1) \ substr(ISBN,RSTART+RLENGTH) } while (match(ISBN,/[0-9] : UK/)) { ISBN = substr(ISBN,1,RSTART) "," substr(ISBN,RSTART+3) } while (match(ISBN,/\(CDN\\\$[0-9.]+\)/)) { ISBN = substr(ISBN,1,RSTART-1) ", " substr(ISBN,RSTART+1,RLENGTH-2) } while (match(ISBN,/\(UK\\pounds[0-9.]+\)/)) { ISBN = substr(ISBN,1,RSTART-1) ", " substr(ISBN,RSTART+1,RLENGTH-2) } gsub(/[ ]+,/,",",ISBN) gsub(/[ :]+$/,"",ISBN) gsub(/[ ]+/," ",ISBN) if ((index(ISBN,":") == 0) && \ match(ISBN,/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9xX],?( \([^)]*\))? *[A-Z]/)) ISBN = substr(ISBN,1,RSTART + RLENGTH - 2) ": " substr(ISBN,RSTART + RLENGTH - 1) if (split(ISBN,parts,":") == 2) { ISBN = parts[1] gsub(/^ +/,"",parts[2]) gsub(/[ ]+/," ",parts[2]) entry["price"] = entry["price"] ", " parts[2] sub(/^, */,"",entry["price"]) } gsub(/[ ,]+$/,"",ISBN) entry["ISBN"] = ISBN } function clear_array(array, key) { for (key in array) delete array[key] } function delete_match(s) { ## After a match() call on s, return s after deleting the match return (substr(s,1,RSTART-1) substr(s,RSTART+RLENGTH)) } function dot_initials(s, k,n,parts,t) { n = split(s,parts," ") for (k = 1; k <= n; ++k) # Expand Hearn, A C to Hearn, A. C. { t = (k == 1) ? parts[k] : t " " parts[k] if (length(parts[k]) == 1) t = t "." } n = split(t,parts,".") for (k = 1; k <= n; ++k) # expand Hearn, A.C. to Hearn, A. C. { parts[k] = trim(parts[k]) t = ((k == 1) ? parts[k] : t " " parts[k]) ((k < n) ? "." : "") } gsub(/[.] -/,".-",t) # reduce Chang, C. -C. to Chang, C.-C. return (t) } function enquote(value) { gsub(/"/,"{\"}",value) # brace quotes gsub(/&/," and ",value) # replace ampersands gsub(/[ \t][ \t]+/," ",value) # eliminate redundant spaces if (value ~ /[0-9][$][0-9]/) gsub(/[$]/,"--",value) # June 7$10 -> June 7--10 ### [18-Jun-1996] next substitution replaced by new code in clean_ISBN() ### else if (value ~ /[$][0-9]+/) ### gsub(/[$]/,"US\\$",value) # $27 -> US\$27 and $27.95 -> US\$27.95 return (value) } function entry_name() { return (entry["type"] in entry_name_map) ? entry_name_map[entry["type"]] : \ "????UNKNOWN-TYPE-[" entry["type"] "]????" } function fix_abbreviations() { if ("publisher" in entry) { gsub(/&/,"and",entry["publisher"]) # expand ampersands if (entry["publisher"] in pub_str) { entry["address"] = pub_str[entry["publisher"]] ":adr" entry["publisher"] = pub_str[entry["publisher"]] print_abbrev(entry["publisher"], pub_exp[entry["publisher"]]) print_abbrev(entry["address"], pub_adr[entry["publisher"]]) } # else # warning("No abbreviation for publisher [" entry["publisher"] "]") } if ("journal" in entry) { if (entry["journal"] in jrn_str) { entry["journal"] = jrn_str[entry["journal"]] print_abbrev(entry["journal"], jrn_exp[entry["journal"]]) } # else # warning("No abbreviation for journal [" entry["journal"] "]") } } function fix_author_editor(s) { return (capitalize(dot_initials(s))) } function fix_info(line) { if (line ~ /ISBN/) warning("ISBN in info field [" line "]") if (line ~ /[$][0-9]/) warning("Price in info field [" line "]") return (line) } function fix_ISBN(line) { gsub(/ISBN/,"",line) if (!("LCCN" in entry)) set("LCCN","LC ????") # create dummy Library of Congress Call Number return (line) } function fix_pages(line) { # change "23-35" to "23--35" sub(/ p[.] *: *ill[.] *; *[0-9]+ cm[.]?/, "", line) # delete "p. : ill. ; 24 cm." sub(/ p[.]$/,"",line) # delete trailing " p." sub(/ p$/,"",line) # delete trailing " p" sub(/^p[.] */,"",line) # delete leading "p. " gsub(/-+/,"-",line) gsub(/-/,"--",line) gsub(/ *, */," + ",line) # change "xiv, 514" to "xiv + 514" if (line ~ /^[0-9][0-9]* *v[.]?$/) line = "" # reduce "2 v" and "2 v." to "" return (line) } function fix_quotes(s, count,k) { count = 0 k = index(s, "\"") while (k > 0) { count++ if ((count % 2) == 1) # open quote s = substr(s,1,k-1) "``" substr(s,k+1) else # close quote s = substr(s,1,k-1) "''" substr(s,k+1) k = index(s, "\"") } if ((count % 2) == 1) warning("Unbalanced double quotes in [" sample(s) "]") return (s) } function fix_slashes(s) { if (index(s,"/") > 0) { gsub(/}\/{/,"/",s) # reduce "{abc}/{xyz}" to "{abc/xyz}" # Change most slashes to \slash. Note clever use of recursion to # avoid an infinite loop caused by matching the same string each # time. if (match(s,/[A-Za-z0-9][A-Za-z0-9]\/[A-Za-z0-9][A-Za-z0-9]/)) s = substr(s,1,RSTART+1) "\\slash " fix_slashes(substr(s,RSTART+3)) } return (s) } function fix_title( k,n,v,words) { sub(/[:.]$/,"",entry["title"]) # remove any trailing title periods and colons gsub(/ - /," --- ",entry["title"]) # change dash to em-dash gsub(/--+/," --- ",entry["title"]) # change multiple dashes to em-dash n = split(entry["title"],words," ") v = protect_mixed_case(words[1]) for (k = 2; k <= n; ++k) v = v " " protect_mixed_case(words[k]) gsub(/'s}/,"}'s",v) # move possessives and selected punctuation gsub(/:}/,"}:",v) # outside of braces gsub(/[?]}/,"}?",v) gsub(/!}/,"}!",v) gsub(/,}/,"},",v) gsub(/;}/,"};",v) gsub(/} {/," ",v) # merge adjacent braced words return (fix_slashes(v)) } function fix_value(key,line) { if (key == "ISBN") # "ISBN: ISBN 0-13-165382-2" -> ": 0-13-165382-2" line = fix_ISBN(line) else if ( (key == "author") || (key == "editor") ) line = fix_author_editor(line) else if ((key == "pages") || (key == "pages_whole")) line = fix_pages(line) else if (key == "info") line = fix_info(line) if ((key == "title") || (key == "booktitle")) { gsub(/[.]$/,"",line) # drop trailing title period gsub(/ *@l *[(] */," (in ",line) # "xx. @l (Italian)" -> "xx. (in Italian)" gsub(/ +:/,":",line) # drop spaces before colon } return (line) } function get_value(line) { # OLD: return (trim(substr(line,5))) sub("^[A-Z][A-Z] +", "", line) return (line) } function initialize() { initialize_entry_name_map() initialize_journal_abbreviations() initialize_publisher_abbreviations() make_ignore_list() make_month_abbreviations() "date" | getline current_date_and_time ## current_date_and_time = "11:30:39 MDT" current_date_and_time = "XX " current_date_and_time ## STD_MAX_TOKEN = 1000 # BibTeX limit on value string length STD_MAX_TOKEN = 4000 # 4 * BibTeX limit on value string length print "%% -*-BibTeX-*-" # for emacs mode identification print "" new_entry() } function initialize_entry_name_map() { entry_name_map["ANALYTIC"] = "Article" entry_name_map["BOOK"] = "Book" entry_name_map["DISSERTATION"] = "PhDThesis" entry_name_map["MANUSCRIPT, DISSERTATION"] = "PhDThesis" entry_name_map["GOVERNMENT DOCUMENT"] = "Manual" entry_name_map["COMPUTER FILE"] = "Book" entry_name_map["MUSIC SCORE"] = "Misc" entry_name_map["SOUND RECORDING"] = "Misc" entry_name_map["VIDEO RECORDING"] = "Misc" entry_name_map["VIDEORECORDING"] = "Misc" entry_name_map["MOTION PICTURE"] = "Misc" } function initialize_journal_abbreviations() { ## Define journal abbreviation strings (j-XYZ). Note that ## multiple variations on journal names may map into the same ## standard abbreviation. jrn_str["A+"] = "j-A-PLUS" jrn_str["Abacus"] = "j-ABACUS" jrn_str["Acta Inf"] = "j-ACTA-INFO" jrn_str["Acta Informatica"] = "j-ACTA-INFO" jrn_str["Acta Informatica"] = "j-ACTA-INFO" jrn_str["Ada Letters"] = "j-ADA-LETT" jrn_str["AEDS J"] = "j-AEDS" jrn_str["Algorithmica"] = "j-ALGORITHMICA" jrn_str["ALLC Bull"] = "j-ALLC-BULL" jrn_str["Angewandte Informatik"] = "j-ANG-INFO" jrn_str["APL in transition"] = "j-APL-TRANS" jrn_str["Applied Mathematics and Computation"] = "j-APP-MATH-COMP" jrn_str["Applied Mathematics Letters"] = "j-APP-MATH-LETT" jrn_str["Artif. Intell"] = "j-ART-INTELL" jrn_str["Artificial Intelligence"] = "j-ART-INTELL" jrn_str["Australian Computer Journal"] = "j-AUSTRALIAN-COMP-J" jrn_str["Aust. J. Phys"] = "j-AUSTRALIAN-J-PHYS" jrn_str["Behav. Inf. Technol"] = "j-BEHAV-INF-TECH" jrn_str["BIT (Nordisk tidskrift for informationsbehandling)"] = "j-BIT" jrn_str["BIT"] = "j-BIT" jrn_str["BYTE"] = "j-BYTE" jrn_str["Byte Magazine"] = "j-BYTE" jrn_str["Cahiers Centre d'Etudes Rech. Oper"] = "j-CAHIERS-CENTRE-ETUDES-RECH-OPER" jrn_str["Commun. ACM"] = "j-CACM" jrn_str["Communications of the ACM"] = "j-CACM" jrn_str["Communications of the Association for Computing Machinery"]= "j-CACM" jrn_str["Computer Graphics Forum"] = "j-CGF" jrn_str["Comput. Graph. Image Process"] = "j-CGIP" jrn_str["Comput. J"] = "j-CJ" jrn_str["Computer Journal"] = "j-CJ" jrn_str["The Computer Journal"] = "j-CJ" jrn_str["Collegiate Microcomputer"] = "j-COLL-MICRO" jrn_str["Combinatorica"] = "j-COMBINATORICA" jrn_str["Comput. Artif. Intell"] = "j-COMP-ART-INTELL" jrn_str["Computers and Automation"] = "j-COMP-AUTO" jrn_str["Comput. Bull"] = "j-COMP-BULL" jrn_str["The Computer Bulletin"] = "j-COMP-BULL" jrn_str["Computer Communications"] = "j-COMP-COMM" jrn_str["Computer Graphics"] = "j-COMP-GRAPHICS" jrn_str["Comput. Hum"] = "j-COMP-HUM" jrn_str["Computer Language"] = "j-COMP-LANG" jrn_str["Computer Languages"] = "j-COMP-LANG" jrn_str["Computers in Libraries"] = "j-COMP-LIB" jrn_str["Computers and Mathematics and Applications"] = "j-COMP-MATH-APPL" jrn_str["Computer Networks and ISDN Systems"] = "j-COMP-NET-ISDN" jrn_str["Computers and Security"] = "j-COMP-SECURITY" jrn_str["Computer speech processing"] = "j-COMP-SPEECH-PROC" jrn_str["Computer"] = "j-COMPUTER" jrn_str["ComputerWorld"] = "j-COMPUTERWORLD" jrn_str["Computing (New York)"] = "j-COMPUTING" jrn_str["Creative Comput"] = "j-CREATIVE-COMP" jrn_str["Cryptologia"] = "j-CRYPTOLOGIA" jrn_str["Journal of Cryptology"] = "j-CRYPTOLOGY" jrn_str["ACM Comput. Surv"] = "j-CS" jrn_str["ACM Computing Surveys"] = "j-CS" jrn_str["Comput. Vision Graph. Image Process"] = "j-CVGIP" jrn_str["Computer Vision, Graphics, and Image Processing"] = "j-CVGIP" jrn_str["Czech. Math. J"] = "j-CZECH-MATH-J" jrn_str["Datamation"] = "j-DATAMATION" jrn_str["Dr. Dobb's J"] = "j-DDJ" jrn_str["Dr. Dobb's Journal of Software Tools"] = "j-DDJ" jrn_str["Dr. Dobbs Journal"] = "j-DDJ" jrn_str["Decision Support Systems"] = "j-DEC-SUPP-SYS" jrn_str["Discrete Appl. Math"] = "j-DISC-APP-MATH" jrn_str["Discrete Applied Mathematics"] = "j-DISC-APP-MATH" jrn_str["Discrete Math"] = "j-DISC-MATH" jrn_str["Doklady Adak. Nauk SSSR"] = "j-DOKL-AKAD-NAUK" jrn_str["Rev. of the El. Commun. Lab."] = "j-EL-COMM-LAB" jrn_str["Electronic Publishing-Origination, Dissemination, and Design"] = "j-EPODD" jrn_str["European Journal of Combinatorics"] = "j-EURO-J-COMB" jrn_str["Foundations of Software Technology and Theoretical Computer Science"] = "j-FSTTCS" jrn_str["Fuzzy Sets Syst"] = "j-FUZZY-SETS-SYS" jrn_str["Hum. Factors"] = "j-HUMAN-FACT" jrn_str["IBM J. Res. Dev"] = "j-IBM-JRD" jrn_str["IBM Journal of Research and Development"] = "j-IBM-JRD" jrn_str["IBM Systems Journal"] = "j-IBM-SYS-J" jrn_str["IEEE Computer"] = "j-IEEE-COMP" jrn_str["IEEE Journal on Selected Areas in Communications"] = "j-IEEE-JSAC" jrn_str["IEEE Proceedings"] = "j-IEEE-PROC" jrn_str["IEEE Softw"] = "j-IEEE-SOFTWARE" jrn_str["IEEE Software"] = "j-IEEE-SOFTWARE" jrn_str["IEEE Spectrum"] = "j-IEEE-SPECTRUM" jrn_str["IEEE Trans. Comput"] = "j-IEEE-TC" jrn_str["IEEE Trans. Comput."] = "j-IEEE-TC" jrn_str["IEEE Transactions on Computers"] = "j-IEEE-TC" jrn_str["IEEE Trans. Inf. Theory"] = "j-IEEE-TIT" jrn_str["IEEE Transactions on Information Theory"] = "j-IEEE-TIT" jrn_str["IEEE Transactions on Knowledge and Data Engineering"] = "j-IEEE-TKDE" jrn_str["IEEE Transactions on Pattern Analysis and Machine Intelligence"] = "j-IEEE-TPAMR" jrn_str["IEEE Transactions on Parallel and Distributed Systems"] = "j-IEEE-TPDS" jrn_str["IEEE Trans. Softw. Eng"] = "j-IEEE-TSE" jrn_str["IEEE Trans. Softw. Eng."] = "j-IEEE-TSE" jrn_str["IEEE Transactions on Software Engineering"] = "j-IEEE-TSE" jrn_str["IEICE Transactions on Communications\\slash Electronics\\slash Information and Systems"] = "j-IEICE-TCEIS" jrn_str["IEICE Transactions on Communications/Electronics/Information and Systems"] = "j-IEICE-TCEIS" jrn_str["IEICE Transactions on Communications/ Electronics/ Information and Systems"] = "j-IEICE-TCEIS" jrn_str["Inf. Tech. Res. Dev. Appl."] = "j-INF-TECH-RES-DEV-APPL" jrn_str["Inf. Technol. Res. Dev. Appl"] = "j-INF-TECH-RES-DEV-APPL" jrn_str["Inf. Control"] = "j-INFO-CTL" jrn_str["Information and Control"] = "j-INFO-CTL" jrn_str["Information and Computation (formerly Information and Control)"] = "j-INFO-COMP" jrn_str["Inf. Process. Lett"] = "j-INFO-PROC-LETT" jrn_str["Information Processing Letters"] = "j-INFO-PROC-LETT" jrn_str["Inf. Process. Manage"] = "j-INFO-PROC-MAN" jrn_str["Information Processing and Management"] = "j-INFO-PROC-MAN" jrn_str["Inf. Sci"] = "j-INFO-SCI" jrn_str["Information Sciences"] = "j-INFO-SCI" jrn_str["Information sciences"] = "j-INFO-SCI" jrn_str["Inf. Syst"] = "j-INFO-SYS" jrn_str["Information Systems"] = "j-INFO-SYS" jrn_str["Information system"] = "j-INFO-SYS" jrn_str["Information technology in the humanities: tools, techniques and applications"] = "j-INFO-TECH-HUMAN" jrn_str["Information Technology and Libraries"] = "j-INFO-TECH-LIB" jrn_str["Int. J. Comput. Inf. Sci"] = "j-INT-J-COMP-INFO-SCI" jrn_str["International Journal of Foundations of Computer Science"] = "j-INT-J-FOUND-CS" jrn_str["Int. J. Man-Mach. Stud"] = "j-INT-J-MAN-MACH-STUD" jrn_str["Int. J. Man-Mach. Stud."] = "j-INT-J-MAN-MACH-STUD" jrn_str["International Journal of Robotics Research"] = "j-INT-J-ROBOTICS-RES" jrn_str["Information Storage and Retrieval"] = "j-ISR" jrn_str["J. ACM"] = "j-J-ACM" jrn_str["Journal of the ACM"] = "j-J-ACM" jrn_str["Journal of the Association for Computing Machinery"] = "j-J-ACM" jrn_str["J. Algorithms"] = "j-J-ALG" jrn_str["Journal of Algorithms"] = "j-J-ALG" jrn_str["J. Am. Soc. Inf. Sci"] = "j-J-AMER-SOC-INFO-SCI" jrn_str["J. Autom. Reas"] = "j-J-AUTO-REASON" jrn_str["Journal of Automated Reasoning"] = "j-J-AUTO-REASON" jrn_str["J. Chem. Inf. Comput. Sci"] = "j-J-CHEM-INFO-COMP-SCI" jrn_str["J. Chin. Inst. Eng"] = "j-J-CHIN-INST-ENG" jrn_str["Journal of Combinatorial Theory Series A"] = "j-J-COMB-THEORY-A" jrn_str["Journal of Computer-Based Instruction"] = "j-J-COMP-BASED-INST" jrn_str["J. Comput. Math"] = "j-J-COMP-MATH" jrn_str["J. Comput. Phys"] = "j-J-COMP-PHYS" jrn_str["J. Comput. Syst. Sci"] = "j-J-COMP-SYS-SCI" jrn_str["Journal of Computer and System Sciences"] = "j-J-COMP-SYS-SCI" jrn_str["J. Doc"] = "j-J-DOC" jrn_str["Journal of FORTH Application and Research"] = "j-J-FORTH-APP-RES" jrn_str["Journal of Information and Engineering"] = "j-J-INFO-ENG" jrn_str["J. Inf. Process"] = "j-J-INFO-PROC" jrn_str["Journal of the Information Processing Society of Japan"] = "j-J-INFO-PROC-SOC-JAPAN" jrn_str["J. Inst. Electron. Telecommun. Eng"] = "j-J-INST-ELEC-TELECOMM-ENG" jrn_str["Journal of Parallel and Distributed Computing"] = "j-J-PAR-DIST-COMP" jrn_str["Journal of Pascal, Ada & Modula-2"] = "j-J-PAS-ADA-MOD" jrn_str["Journal of Pascal, Ada and Modula-2"] = "j-J-PAS-ADA-MOD" jrn_str["Library Hi Tech"] = "j-LIB-HI-TECH" jrn_str["Lecture Notes in CS"] = "j-LNCS" jrn_str["Mathematics and Computers in Simulation"] = "j-MATH-COMP-SIM" jrn_str["Mathematics of Operations Research"] = "j-MATH-OPER-RES" jrn_str["Mathematical Recreations and Essays"] = "j-MATH-RECR-ESSAYS" jrn_str["Mathematical Systems Theory"] = "j-MATH-SYS-THEORY" jrn_str["Networks"] = "j-NETWORKS" jrn_str["Neural Networks"] = "j-NEURAL-NETWORKS" jrn_str["New Gener. Comput"] = "j-NEW-GEN-COMP" jrn_str["New Generation Computing"] = "j-NEW-GEN-COMP" jrn_str["Non-Linear Analysis"] = "j-NON-LIN-ANA" jrn_str["Online"] = "j-ONLINE" jrn_str["Oper. Res"] = "j-OPER-RES" jrn_str["Pattern Recogn."] = "j-PAT-REC" jrn_str["Pattern Recognition"] = "j-PAT-REC" jrn_str["Pattern Recogn. Lett"] = "j-PAT-REC-LETT" jrn_str["Pattern Recognition Letters"] = "j-PAT-REC-LETT" jrn_str["Pattern Recognition Letters"] = "j-PAT-REC-LETT" jrn_str["PC/Computing"] = "j-PC-COMP" jrn_str["Perform. Eval"] = "j-PERF-EVAL" jrn_str["Personal Comput"] = "j-PERS-COMP" jrn_str["Personal Computing"] = "j-PERS-COMP" jrn_str["Physica D"] = "j-PHYSICA-D" jrn_str["Pop. Comput"] = "j-POP-COMP" jrn_str["The PostScript Language Journal"] = "j-POSTSCRIPT-LANG-J" jrn_str["Programming and Computer Software; translation of Programmirovaniye, (Moscow, USSR) Plenum"] = "j-PROG-COMP-SOFT" jrn_str["Rapport de Recherche"] = "j-RAPP-RECH" jrn_str["Readings in database systems"] = "j-READ-DATABASE-SYS" jrn_str["Riv. Inf. (Milan)"] = "j-RIV-INFO-MILAN" jrn_str["Sci. Comput. Program"] = "j-SCI-COMP-PROG" jrn_str["SIAM J. Algebraic Discrete Methods"] = "j-SIAM-J-ALG-DISC-METH" jrn_str["SIAM Journal of Algebraic Discrete Methods"] = "j-SIAM-J-ALG-DISC-METH" jrn_str["SIAM Journal on Algebraic Discrete Methods"] = "j-SIAM-J-ALG-DISC-METH" jrn_str["SIAM J. Comput"] = "j-SIAM-J-COMP" jrn_str["SIAM Journal on Computing"] = "j-SIAM-J-COMP" jrn_str["SIAM J. Math. Anal"] = "j-SIAM-J-MATH-ANA" jrn_str["SIAM Theor. Probab. Appl"] = "j-SIAM-THEOR-PROB-APPL" jrn_str["ACM SIGACT News"] = "j-SIGACT" jrn_str["ACM SIGAPL APL Quote Quad"] = "j-SIGAPL" jrn_str["ACM SIGCHI Bulletin"] = "j-SIGCHI" jrn_str["SIGCSE Bulletin (ACM Special Interest Group on Computer Science Education)"] = "j-SIGCSE" jrn_str["ACM SIGDOC Asterisk*"] = "j-SIGDOC" jrn_str["SIGIR forum"] = "j-SIGIR" jrn_str["SIGIR Forum (ACM Special Interest Group on Information Retrieval)"] = "j-SIGIR" jrn_str["ACM SIGMETRICS Perform. Eval. Rev"] = "j-SIGMETRICS" jrn_str["ACM SIGMOD Record"] = "j-SIGMOD" jrn_str["ACM SIGNUM Newsletter"] = "j-SIGNUM" jrn_str["ACM SIGPLAN Not"] = "j-SIGPLAN" jrn_str["ACM SIGPLAN Notices"] = "j-SIGPLAN" jrn_str["SIGPLAN Notices"] = "j-SIGPLAN" jrn_str["ACM SIGSAM Bulletin"] = "j-SIGSAM" jrn_str["SIGSAM Bulletin (ACM Special Interest Group on Symbolic and Algebraic Manipulation)"] = "j-SIGSAM" jrn_str["Software Protection"] = "j-SOFT-PROT" jrn_str["Softw. Pract. Exper"] = "j-SPE" jrn_str["Software---Practice and Experience"] = "j-SPE" jrn_str["Software-Practice & Experience"] = "j-SPE" jrn_str["Software-Practice and Experience"] = "j-SPE" jrn_str["Speech Commun"] = "j-SPEECH-COMM" jrn_str["Syst. Control Lett"] = "j-SYS-CTL-LETT" jrn_str["Theor. Comput. Sci"] = "j-TCS" jrn_str["Theoretical Computer Science"] = "j-TCS" jrn_str["Theoretical Computer Science"] = "j-TCS" jrn_str["Technometrics"] = "j-TECHNOMETRICS" jrn_str["ACM Transactions on Information Systems"] = "j-TIS" jrn_str["ACM Trans. Comput. Syst"] = "j-TOCS" jrn_str["ACM Trans. Database Syst"] = "j-TODS" jrn_str["ACM Transactions on Database Systems"] = "j-TODS" jrn_str["ACM Transactions on Database Systems"] = "j-TODS" jrn_str["ACM Trans. Math. Softw"] = "j-TOMS" jrn_str["ACM Transactions on Office Information Systems"] = "j-TOOIS" jrn_str["ACM Trans. Off. Inf. Syst"] = "j-TOOIS" jrn_str["ACM Transactions on Office Information Systems"] = "j-TOOIS" jrn_str["ACM Transactions on Programming Languages and Systems"] = "j-TOPLAS" jrn_str["ACM Trans. Program. Lang. Syst"] = "j-TOPLAS" jrn_str["Univ. Comput"] = "j-UNIV-COMP" jrn_str["University Computing"] = "j-UNIV-COMP" jrn_str["Workstations and publication systems"] = "j-WORK-PUB-SYS" jrn_str["Z. Angew. Math. Phys"] = "j-Z-ANG-MATH-PHYS" jrn_exp["j-A-PLUS"] = "A+" jrn_exp["j-ABACUS"] = "Abacus" jrn_exp["j-ACTA-INFO"] = "Acta Informatica" jrn_exp["j-ADA-LETT"] = "Ada Letters" jrn_exp["j-AEDS"] = "AEDS J" jrn_exp["j-ALGORITHMICA"] = "Algorithmica" jrn_exp["j-ALLC-BULL"] = "ALLC Bull" jrn_exp["j-ANG-INFO"] = "Angewandte Informatik" jrn_exp["j-APL-TRANS"] = "APL in transition" jrn_exp["j-APP-MATH-COMP"] = "Applied Mathematics and Computation" jrn_exp["j-APP-MATH-LETT"] = "Applied Mathematics Letters" jrn_exp["j-ART-INTELL"] = "Artificial Intelligence" jrn_exp["j-AUSTRALIAN-COMP-J"] = "Australian Computer Journal" jrn_exp["j-AUSTRALIAN-J-PHYS"] = "Australian J. Phys" jrn_exp["j-BEHAV-INF-TECH"] = "Behav. Inf. Technol" jrn_exp["j-BIT"] = "BIT (Nordisk tidskrift for informationsbehandling)" jrn_exp["j-BYTE"] = "Byte Magazine" jrn_exp["j-CACM"] = "Communications of the ACM" jrn_str["j-CAHIERS-CENTRE-ETUDES-RECH-OPER"] = "Cahiers Centre d'Etudes Rech. Oper" jrn_exp["j-CGF"] = "Computer Graphics Forum" jrn_exp["j-CGIP"] = "Comput. Graph. Image Process" jrn_exp["j-CJ"] = "The Computer Journal" jrn_exp["j-COLL-MICRO"] = "Collegiate Microcomputer" jrn_exp["j-COMBINATORICA"] = "Combinatorica" jrn_exp["j-COMP-ART-INTELL"] = "Comput. Artif. Intell" jrn_exp["j-COMP-AUTO"] = "Computers and Automation" jrn_exp["j-COMP-BULL"] = "The Computer Bulletin" jrn_exp["j-COMP-COMM"] = "Computer Communications" jrn_exp["j-COMP-GRAPHICS"] = "Computer Graphics" jrn_exp["j-COMP-HUM"] = "Comput. Hum" jrn_exp["j-COMP-LANG"] = "Computer Language" jrn_exp["j-COMP-LIB"] = "Computers in Libraries" jrn_exp["j-COMP-MATH-APPL"] = "Computers and Mathematics and Applications" jrn_exp["j-COMP-NET-ISDN"] = "Computer Networks and ISDN Systems" jrn_exp["j-COMP-SECURITY"] = "Computers and Security" jrn_exp["j-COMP-SPEECH-PROC"] = "Computer speech processing" jrn_exp["j-COMPUTER"] = "Computer" jrn_exp["j-COMPUTERWORLD"] = "ComputerWorld" jrn_exp["j-COMPUTING"] = "Computing" jrn_exp["j-CREATIVE-COMP"] = "Creative Comput" jrn_exp["j-CRYPTOLOGIA"] = "Cryptologia" jrn_exp["j-CRYPTOLOGY"] = "Journal of Cryptology" jrn_exp["j-CS"] = "ACM Computing Surveys" jrn_exp["j-CVGIP"] = "Computer Vision, Graphics, and Image Processing" jrn_exp["j-CZECH-MATH-J"] = "Czech. Math. J" jrn_exp["j-DATAMATION"] = "Datamation" jrn_exp["j-DDJ"] = "Dr. Dobb's Journal of Software Tools" jrn_exp["j-DEC-SUPP-SYS"] = "Decision Support Systems" jrn_exp["j-DISC-APP-MATH"] = "Discrete Applied Mathematics" jrn_exp["j-DISC-MATH"] = "Discrete Math" jrn_exp["j-DOKL-AKAD-NAUK"] = "Doklady Adak. Nauk SSSR" jrn_exp["j-EL-COMM-LAB"] = "Rev. of the El. Commun. Lab." jrn_exp["j-EPODD"] = "Electronic Publishing---Origination, Dissemination, and Design" jrn_exp["j-EURO-J-COMB"] = "European Journal of Combinatorics" jrn_exp["j-FSTTCS"] = "Foundations of Software Technology and Theoretical Computer Science" jrn_exp["j-FUZZY-SETS-SYS"] = "Fuzzy Sets Syst" jrn_exp["j-HUMAN-FACT"] = "Hum. Factors" jrn_exp["j-IBM-JRD"] = "IBM Journal of Research and Development" jrn_exp["j-IBM-SYS-J"] = "IBM Systems Journal" jrn_exp["j-IEEE-COMP"] = "IEEE Computer" jrn_exp["j-IEEE-JSAC"] = "IEEE Journal on Selected Areas in Communications" jrn_exp["j-IEEE-PROC"] = "IEEE Proceedings" jrn_exp["j-IEEE-SOFTWARE"] = "IEEE Software" jrn_exp["j-IEEE-SPECTRUM"] = "IEEE Spectrum" jrn_exp["j-IEEE-TC"] = "IEEE Transactions on Computers" jrn_exp["j-IEEE-TIT"] = "IEEE Transactions on Information Theory" jrn_exp["j-IEEE-TKDE"] = "IEEE Transactions on Knowledge and Data Engineering" jrn_exp["j-IEEE-TPAMR"] = "IEEE Transactions on Pattern Analysis and Machine Intelligence" jrn_exp["j-IEEE-TPDS"] = "IEEE Transactions on Parallel and Distributed Systems" jrn_exp["j-IEEE-TSE"] = "IEEE Transactions on Software Engineering" jrn_exp["j-IEICE-TCEIS"] = "IEICE Transactions on Communications\\slash Electronics\\slash Information and Systems" jrn_exp["j-INF-TECH-RES-DEV-APPL"] = "Inf. Technol. Res. Dev. Appl" jrn_exp["j-INFO-COMP"] = "Information and Computation (formerly Information and Control)" jrn_exp["j-INFO-CTL"] = "Information and Control" jrn_exp["j-INFO-PROC-LETT"] = "Information Processing Letters" jrn_exp["j-INFO-PROC-MAN"] = "Information Processing and Management" jrn_exp["j-INFO-SCI"] = "Information Sciences" jrn_exp["j-INFO-SYS"] = "Information Systems" jrn_exp["j-INFO-TECH-HUMAN"] = "Information technology in the humanities: tools, techniques and applications" jrn_exp["j-INFO-TECH-LIB"] = "Information Technology and Libraries" jrn_exp["j-INT-J-COMP-INFO-SCI"] = "Int. J. Comput. Inf. Sci" jrn_exp["j-INT-J-FOUND-CS"] = "International Journal of Foundations of Computer Science" jrn_exp["j-INT-J-MAN-MACH-STUD"] = "Int. J. Man-Mach. Stud." jrn_exp["j-INT-J-ROBOTICS-RES"] = "International Journal of Robotics Research" jrn_exp["j-IPL"] = "Information Processing Letters" jrn_exp["j-ISR"] = "Information Storage and Retrieval" jrn_exp["j-J-ACM"] = "Journal of the Association for Computing Machinery" jrn_exp["j-J-ALG"] = "Journal of Algorithms" jrn_exp["j-J-AMER-SOC-INFO-SCI"] = "J. Am. Soc. Inf. Sci" jrn_exp["j-J-AUTO-REASON"] = "Journal of Automated Reasoning" jrn_exp["j-J-CHEM-INFO-COMP-SCI"] = "J. Chem. Inf. Comput. Sci" jrn_exp["j-J-CHIN-INST-ENG"] = "J. Chin. Inst. Eng" jrn_exp["j-J-COMB-THEORY-A"] = "Journal of Combinatorial Theory Series A" jrn_exp["j-J-COMP-BASED-INST"] = "Journal of Computer-Based Instruction" jrn_exp["j-J-COMP-MATH"] = "J. Comput. Math" jrn_exp["j-J-COMP-PHYS"] = "J. Comput. Phys" jrn_exp["j-J-COMP-SYS-SCI"] = "Journal of Computer and System Sciences" jrn_exp["j-J-DOC"] = "J. Doc" jrn_exp["j-J-FORTH-APP-RES"] = "Journal of FORTH Application and Research" jrn_exp["j-J-INFO-ENG"] = "Journal of Information and Engineering" jrn_exp["j-J-INFO-PROC"] = "J. Inf. Process" jrn_exp["j-J-INFO-PROC-SOC-JAPAN"] = "Journal of the Information Processing Society of Japan" jrn_exp["j-J-INST-ELEC-TELECOMM-ENG"]= "J. Inst. Electron. Telecommun. Eng" jrn_exp["j-J-PAR-DIST-COMP"] = "Journal of Parallel and Distributed Computing" jrn_exp["j-J-PAS-ADA-MOD"] = "Journal of Pascal, Ada and Modula-2" jrn_exp["j-LIB-HI-TECH"] = "Library Hi Tech" jrn_exp["j-LNCS"] = "Lecture Notes in CS" jrn_exp["j-MATH-COMP-SIM"] = "Mathematics and Computers in Simulation" jrn_exp["j-MATH-OPER-RES"] = "Mathematics of Operations Research" jrn_exp["j-MATH-RECR-ESSAYS"] = "Mathematical Recreations and Essays" jrn_exp["j-MATH-SYS-THEORY"] = "Mathematical Systems Theory" jrn_exp["j-NETWORKS"] = "Networks" jrn_exp["j-NEURAL-NETWORKS"] = "Neural Networks" jrn_exp["j-NEW-GEN-COMP"] = "New Generation Computing" jrn_exp["j-NON-LIN-ANA"] = "Non-Linear Analysis" jrn_exp["j-ONLINE"] = "Online" jrn_exp["j-OPER-RES"] = "Oper. Res" jrn_exp["j-PAT-REC"] = "Pattern Recognition" jrn_exp["j-PAT-REC-LETT"] = "Pattern Recognition Letters" jrn_exp["j-PC-COMP"] = "PC/Computing" jrn_exp["j-PERF-EVAL"] = "Perform. Eval" jrn_exp["j-PERS-COMP"] = "Personal Computing" jrn_exp["j-PHYSICA-D"] = "Physica D" jrn_exp["j-POP-COMP"] = "Pop. Comput" jrn_exp["j-POSTSCRIPT-LANG-J"] = "The PostScript Language Journal" jrn_exp["j-PROG-COMP-SOFT"] = "Programming and Computer Software; translation of Programmirovaniye, (Moscow, USSR) Plenum" jrn_exp["j-RAPP-RECH"] = "Rapport de Recherche" jrn_exp["j-READ-DATABASE-SYS"] = "Readings in database systems" jrn_exp["j-RIV-INFO-MILAN"] = "Riv. Inf. (Milan)" jrn_exp["j-SCI-COMP-PROG"] = "Sci. Comput. Program" jrn_exp["j-SIAM-J-ALG-DISC-METH"] = "SIAM Journal of Algebraic Discrete Methods" jrn_exp["j-SIAM-J-COMP"] = "SIAM Journal on Computing" jrn_exp["j-SIAM-J-MATH-ANA"] = "SIAM J. Math. Anal" jrn_exp["j-SIAM-THEOR-PROB-APPL"] = "SIAM Theor. Probab. Appl" jrn_exp["j-SIGACT"] = "ACM SIGACT News" jrn_exp["j-SIGAPL"] = "ACM SIGAPL APL Quote Quad" jrn_exp["j-SIGCHI"] = "ACM SIGCHI Bulletin" jrn_exp["j-SIGCSE"] = "SIGCSE Bulletin (ACM Special Interest Group on Computer Science Education)" jrn_exp["j-SIGDOC"] = "ACM SIGDOC Asterisk*" jrn_exp["j-SIGIR"] = "SIGIR Forum (ACM Special Interest Group on Information Retrieval)" jrn_exp["j-SIGMETRICS"] = "ACM SIGMETRICS Perform. Eval. Rev" jrn_exp["j-SIGMOD"] = "ACM SIGMOD Record" jrn_exp["j-SIGNUM"] = "ACM SIGNUM Newsletter" jrn_exp["j-SIGPLAN"] = "ACM SIGPLAN Notices" jrn_exp["j-SIGSAM"] = "SIGSAM Bulletin (ACM Special Interest Group on Symbolic and Algebraic Manipulation)" jrn_exp["j-SOFT-PROT"] = "Software Protection" jrn_exp["j-SPE"] = "Software---Practice and Experience" jrn_exp["j-SPEECH-COMM"] = "Speech Commun" jrn_exp["j-SYS-CTL-LETT"] = "Syst. Control Lett" jrn_exp["j-TCS"] = "Theoretical Computer Science" jrn_exp["j-TECHNOMETRICS"] = "Technometrics" jrn_exp["j-TIS"] = "ACM Transactions on Information Systems" jrn_exp["j-TOCS"] = "ACM Trans. Comput. Syst" jrn_exp["j-TODS"] = "ACM Transactions on Database Systems" jrn_exp["j-TOMS"] = "ACM Trans. Math. Softw" jrn_exp["j-TOOIS"] = "ACM Transactions on Office Information Systems" jrn_exp["j-TOPLAS"] = "ACM Transactions on Programming Languages and Systems" jrn_exp["j-UNIV-COMP"] = "University Computing" jrn_exp["j-WORK-PUB-SYS"] = "Workstations and publication systems" jrn_exp["j-Z-ANG-MATH-PHYS"] = "Z. Angew. Math. Phys" } function initialize_publisher_abbreviations() { ## Define publisher abbreviation strings (pub-XYZ). Note that ## multiple variations on publisher names may map into the same ## standard abbreviation. pub_str["ACM Press"] = "pub-ACM" pub_str["Association for Computing Machinery"] = "pub-ACM" pub_str["AFIPS Press"] = "pub-AFIPS" pub_str["Agence de l'Informatique"] = "pub-AGENCE-INFORMATIQUE" pub_str["Allyn and Bacon"] = "pub-ALLYN-BACON" pub_str["Allyn and Bacon, Inc."] = "pub-ALLYN-BACON" pub_str["AMACOM"] = "pub-AMACOM" pub_str["American Mathematical Society"] = "pub-AMS" pub_str["Academic Press Inc."] = "pub-AP" pub_str["Academic Press"] = "pub-AP" pub_str["Academic Press, Inc."] = "pub-AP" pub_str["Edward Arnold, Ltd."] = "pub-ARNOLD" pub_str["Addison-Wesley Publ. Co., Inc."] = "pub-AW" pub_str["Addison-Wesley"] = "pub-AW" pub_str["Benjamin/Cummings Publ. Co., Inc."] = "pub-BENCUM" pub_str["Birkhauser Boston Inc."] = "pub-BIRKHAUSER" pub_str["Brady Computer Books"] = "pub-BRADY" pub_str["Brooks/Cole Publishing Co."] = "pub-BROOKS-COLE" pub_str["Chapman and Hall, Ltd."] = "pub-CHAPMAN-HALL" pub_str["Clarendon"] = "pub-CLARENDON" pub_str["Clark University"] = "pub-CLARK-UNIVERSITY" pub_str["Computing Trends"] = "pub-COMPUTING-TRENDS" pub_str["Computer Science Press"] = "pub-CSP" pub_str["Computer Science Press, Inc."] = "pub-CSP" pub_str["Cambridge University Press"] = "pub-CUP" pub_str["Digital Press/Digital Equipment Corp."] = "pub-DIGITAL-PRESS" pub_str["Doubleday and Co., Inc."] = "pub-DOUBLEDAY" pub_str["Dunn Technology, Inc."] = "pub-DUNN-TECHNOLOGY" pub_str["Elsevier North-Holland Publ. Co., Inc."] = "pub-ENH" pub_str["Elsevier North-Holland, Inc."] = "pub-ENH" pub_str["Lawrence Erlbaum Associates, Inc."] = "pub-ERLBAUM" pub_str["Garland Publishing, Inc."] = "pub-GARLAND" pub_str["Halsted Press"] = "pub-HALSTED" pub_str["Harvard Univ. Of. for Info. and Tech."] = "pub-HARVARD-INFO-TECH" pub_str["Harcourt Brace Jovanovich"] = "pub-HBJ" pub_str["D. C. Heath and Company"] = "pub-HEATH" pub_str["Hemisphere Publishing Corp."] = "pub-HEMISPHERE" pub_str["Holt"] = "pub-HRW" pub_str["Hummingbird Publishing"] = "pub-HUMMINGBIRD" pub_str["Illinois Institute of Technology"] = "pub-IIT" pub_str["Intertext Pubs./McGraw-Hill Book Co."] = "pub-INTERTEXT" pub_str["Lexington Books"] = "pub-LEXINGTON" pub_str["Little, Brown and Co."] = "pub-LITTLE-BROWN" pub_str["Longwood Publishing Group"] = "pub-LONGWOOD" pub_str["Macmillan Press Ltd."] = "pub-MACMILLAN" pub_str["Macmillan Publishing Co., Inc."] = "pub-MACMILLAN" pub_str["Macmillan"] = "pub-MACMILLAN" pub_str["McGraw-Hill Inc."] = "pub-MCGRAW-HILL" pub_str["McGraw-Hill"] = "pub-MCGRAW-HILL" pub_str["McGraw-Hill, Inc."] = "pub-MCGRAW-HILL" pub_str["MIT Press"] = "pub-MIT" pub_str["Mitchell Publ., Inc."] = "pub-MITCHEL" pub_str["Morgan-Kaufmann"] = "pub-MK" pub_str["North-Holland Publishing Co."] = "pub-NH" pub_str["Northwestern University"] = "pub-NORTHWESTERN-UNIVERSITY" pub_str["Osborne/McGraw-Hill"] = "pub-OSBORNE" pub_str["Oxford University Press, Inc."] = "pub-OUP" pub_str["Prentice-Hall Inc."] = "pub-PH" pub_str["Prentice-Hall"] = "pub-PH" pub_str["Prentice-Hall, Inc."] = "pub-PH" pub_str["Prentice-Hall International"] = "pub-PHI" pub_str["Princeton Univ."] = "pub-PRINCETON" pub_str["Princeton University Press"] = "pub-PRINCETON" pub_str["Reston Publ. Co., Inc."] = "pub-RESTON" pub_str["Reston Publ."] = "pub-RESTON" pub_str["Reston Publishing Co."] = "pub-RESTON" pub_str["Reston Publishing Co., Inc."] = "pub-RESTON" pub_str["Howard W. Sams and Co., Inc."] = "pub-SAMS" pub_str["Scott, Foresman and Co."] = "pub-SF" pub_str["Silicon Press"] = "pub-SILICON" pub_str["Society for Scholarly Publishing"] = "pub-SOC-SCHOL-PUB" pub_str["Science Research Associates, Inc."] = "pub-SRA" pub_str["Springer Verlag New York, Inc."] = "pub-SV" pub_str["Springer-Verlag New York Inc."] = "pub-SV" pub_str["Springer-Verlag"] = "pub-SV" pub_str["Springer-Verlag New York"] = "pub-SV" pub_str["Springer-Verlag New York, Inc."] = "pub-SV" pub_str["Sybex, Inc."] = "pub-SYBEX" pub_str["UMI Research Press"] = "pub-UMI-RESEARCH" pub_str["University of Maryland"] = "pub-UNIVERSITY-MARYLAND" pub_str["University of Waterloo"] = "pub-UNIVERSITY-WATERLOO" pub_str["Van Nostrand Reinhold Co."] = "pub-VNR" pub_str["Wiley-Interscience"] = "pub-WI" pub_str["John Wiley and Sons"] = "pub-WILEY" pub_str["John Wiley and Sons, Inc."] = "pub-WILEY" pub_str["World Future Society"] = "pub-WORLD-FUTURE" pub_str["Published quarterly by North-Holland Publishing Netherlands"]= "pub-NH" pub_str["Almqvist and Wiksell"] = "pub-ALMQVIST-WIKSELL" pub_str["BMDP Statistical Software"] = "pub-BMDP" pub_str["Collins"] = "pub-COLLINS" pub_str["Gyldendal"] = "pub-GYLDENDAL" pub_str["McGraw-Hill Book Co."] = "pub-MH" pub_str["North-Holland"] = "pub-NH" pub_str["Random House"] = "pub-RANDOM" pub_str["SAS Institute GmbH"] = "pub-SAS" pub_str["SAS Institute Inc."] = "pub-SAS" pub_str["SAS Institute"] = "pub-SAS" pub_str["SAS Institute, Inc."] = "pub-SAS" pub_str["Van Nostrand Reinhold"] = "pub-VNR" pub_str["Wiley"] = "pub-WILEY" pub_str["Windcrest"] = "pub-WINDCREST" pub_str["Windcrest/McGraw-Hill"] = "pub-WINDCREST" ## Define the `official' expansions of publisher abbreviations and ## their corresponding addresses. These are paired to facilitate ## checking their correctness. pub_exp["pub-ACM"] = "ACM Press" pub_adr["pub-ACM"] = "New York, NY, USA" pub_exp["pub-AGENCE-INFORMATIQUE"] = "Agence de l'Informatique" pub_adr["pub-AGENCE-INFORMATIQUE"] = "Paris La Defense, France" pub_exp["pub-AFIPS"] = "AFIPS Press" pub_adr["pub-AFIPS"] = "Arlington, VA, USA" pub_exp["pub-ALLYN-BACON"] = "Allyn and Bacon, Inc." pub_adr["pub-ALLYN-BACON"] = "Needham Heights, MA, USA" pub_exp["pub-ALMQVIST-WIKSELL"] = "Almqvist and Wiksell" pub_adr["pub-ALMQVIST-WIKSELL"] = "Stockholm, Sweden" pub_exp["pub-AMACOM"] = "AMACOM" pub_adr["pub-AMACOM"] = "New York, NY, USA" pub_exp["pub-AMS"] = "American Mathematical Society" pub_adr["pub-AMS"] = "Providence, RI, USA" pub_exp["pub-AP"] = "Academic Press Inc." pub_adr["pub-AP"] = "New York, USA" pub_exp["pub-ARNOLD"] = "Edward Arnold, Ltd." pub_adr["pub-ARNOLD"] = "London, UK" pub_exp["pub-AW"] = "Addison-Wesley" pub_adr["pub-AW"] = "Reading, MA, USA" pub_exp["pub-BENCUM"] = "Benjamin/Cummings Publ. Co., Inc." pub_adr["pub-BENCUM"] = "Menlo Park, CA, USA" pub_exp["pub-BIRKHAUSER"] = "Birkhauser Boston Inc." pub_adr["pub-BIRKHAUSER"] = "Cambridge, MA, USA" pub_exp["pub-BMDP"] = "BMDP Statistical Software" pub_adr["pub-BMDP"] = "Department of Biomathematics, University of California, Los Angeles, CA, USA" pub_exp["pub-BRADY"] = "Brady Computer Books" pub_adr["pub-BRADY"] = "New York, NY, USA" pub_exp["pub-BROOKS-COLE"] = "Brooks/Cole Publishing Co." pub_adr["pub-BROOKS-COLE"] = "Monterey, CA, USA" pub_exp["pub-CHAPMAN-HALL"] = "Chapman and Hall, Ltd." pub_adr["pub-CHAPMAN-HALL"] = "London, UK" pub_exp["pub-CLARENDON"] = "Clarendon" pub_adr["pub-CLARENDON"] = "New York, NY, USA" pub_exp["pub-CLARK-UNIVERSITY"] = "Clark University" pub_adr["pub-CLARK-UNIVERSITY"] = "Worcester, MA, USA" pub_exp["pub-COLLINS"] = "Collins" pub_adr["pub-COLLINS"] = "London, UK" pub_exp["pub-COMPUTING-TRENDS"] = "Computing Trends" pub_adr["pub-COMPUTING-TRENDS"] = "Seattle, WA, USA" pub_exp["pub-CSP"] = "Computer Science Press, Inc." pub_adr["pub-CSP"] = "Rockville, MD, USA" pub_exp["pub-CAMBRIDGE"] = "Cambridge University Press" pub_adr["pub-CAMBRIDGE"] = "New York, NY, USA" pub_exp["pub-DIGITAL-PRESS"] = "Digital Press/Digital Equipment Corp." pub_adr["pub-DIGITAL-PRESS"] = "Bedford, MA, USA" pub_exp["pub-DOUBLEDAY"] = "Doubleday and Co., Inc." pub_adr["pub-DOUBLEDAY"] = "New York, NY, USA" pub_exp["pub-DUNN-TECHNOLOGY"] = "Dunn Technology, Inc." pub_adr["pub-DUNN-TECHNOLOGY"] = "Vista, CA, USA" pub_exp["pub-ENH"] = "Elsevier North-Holland Publ. Co., Inc." pub_adr["pub-ENH"] = "New York, NY, USA" pub_exp["pub-ENH"] = "Elsevier North-Holland, Inc." pub_adr["pub-ENH"] = "New York, NY, USA" pub_exp["pub-ERLBAUM"] = "Lawrence Erlbaum Associates, Inc." pub_adr["pub-ERLBAUM"] = "Hillsdale, NJ, USA" pub_exp["pub-GARLAND"] = "Garland Publishing, Inc." pub_adr["pub-GARLAND"] = "New York, NY, USA" pub_exp["pub-GYLDENDAL"] = "Gyldendal" pub_adr["pub-GYLDENDAL"] = "Oslo, Norway" pub_exp["pub-HALSTED"] = "Halsted Press" pub_adr["pub-HALSTED"] = "New York, USA" pub_exp["pub-HARVARD-INFO-TECH"] = "Harvard Univ. Of. for Info. and Tech." pub_adr["pub-HARVARD-INFO-TECH"] = "Cambridge, MA, USA" pub_exp["pub-HBJ"] = "Harcourt Brace Jovanovich" pub_adr["pub-HBJ"] = "San Diego, CA, USA" pub_exp["pub-HEATH"] = "D. C. Heath and Company" pub_adr["pub-HEATH"] = "Lexington, MA, USA" pub_exp["pub-HEMISPHERE"] = "Hemisphere Publishing Corp." pub_adr["pub-HEMISPHERE"] = "Washington, DC, USA" pub_exp["pub-HRW"] = "Holt, Rinehart and Winston" pub_adr["pub-HRW"] = "New York, NY, USA" pub_exp["pub-HUMMINGBIRD"] = "Hummingbird Publishing" pub_adr["pub-HUMMINGBIRD"] = "Edmond, OK, USA" pub_exp["pub-IIT"] = "Illinois Institute of Technology" pub_adr["pub-IIT"] = "Chicago, IL, USA" pub_exp["pub-INTERTEXT"] = "Intertext Pubs./McGraw-Hill Book Co." pub_adr["pub-INTERTEXT"] = "New York, NY, USA" pub_exp["pub-LEXINGTON"] = "Lexington Books" pub_adr["pub-LEXINGTON"] = "Lexington, MA, USA" pub_exp["pub-LITTLE-BROWN"] = "Little, Brown and Co." pub_adr["pub-LITTLE-BROWN"] = "Boston, MA, USA" pub_exp["pub-LONGWOOD"] = "Longwood Publishing Group" pub_adr["pub-LONGWOOD"] = "Wolfeboro, NH, USA" pub_exp["pub-MACMILLAN"] = "Macmillan Publishing Co., Inc." pub_adr["pub-MACMILLAN"] = "New York, NY, USA" pub_exp["pub-MH"] = "McGraw-Hill, Inc." pub_adr["pub-MH"] = "New York, NY, USA" pub_exp["pub-MIT"] = "MIT Press" pub_adr["pub-MIT"] = "Cambridge, MA, USA" pub_exp["pub-MITCHELL"] = "Mitchell Publ., Inc." pub_adr["pub-MITCHELL"] = "Santa Cruz, CA, USA" pub_exp["pub-MK"] = "Morgan-Kaufmann" pub_adr["pub-MK"] = "Palo Alto, CA, USA" pub_exp["pub-NH"] = "North-Holland Publishing Co." pub_adr["pub-NH"] = "Amsterdam, The Netherlands" pub_exp["pub-NORTHWESTERN-UNIVERSITY"]= "Northwestern University" pub_adr["pub-NORTHWESTERN-UNIVERSITY"]= "Evanston, IL, USA" pub_exp["pub-OSBORNE"] = "Osborne/McGraw-Hill" pub_adr["pub-OSBORNE"] = "Berkeley, CA, USA" pub_exp["pub-OUP"] = "Oxford University Press, Inc." pub_adr["pub-OUP"] = "New York, NY, USA" pub_exp["pub-PH"] = "Prentice-Hall, Inc." pub_adr["pub-PH"] = "Englewood Cliffs, NJ, USA" pub_exp["pub-PHI"] = "Prentice-Hall International" pub_adr["pub-PHI"] = "Englewood Cliffs, NJ, USA" pub_exp["pub-PRINCETON"] = "Princeton University Press" pub_adr["pub-PRINCETON"] = "Princeton, NJ, USA" pub_exp["pub-RANDOM"] = "Random House" pub_adr["pub-RANDOM"] = "New York, NY, USA" pub_exp["pub-RESTON"] = "Reston Publishing Co., Inc." pub_adr["pub-RESTON"] = "Reston, VA, USA" pub_exp["pub-SAMS"] = "Howard W. Sams and Co., Inc." pub_adr["pub-SAMS"] = "Indianapolis, IN, USA" pub_exp["pub-SAS"] = "SAS Institute" pub_adr["pub-SAS"] = "SAS Circle, Box 8000, Cary, NC 27512-8000, USA" pub_exp["pub-SF"] = "Scott, Foresman and Co." pub_adr["pub-SF"] = "Glenview, IL, USA" pub_exp["pub-SILICON"] = "Silicon Press" pub_adr["pub-SILICON"] = "Summit, NJ, USA" pub_exp["pub-SOC-SCHOL-PUB"] = "Society for Scholarly Publishing" pub_adr["pub-SOC-SCHOL-PUB"] = "Washington, DC, USA" pub_exp["pub-SRA"] = "Science Research Associates, Inc." pub_adr["pub-SRA"] = "Chicago, IL, USA" pub_exp["pub-SV"] = "Springer-Verlag Inc." pub_adr["pub-SV"] = "New York, NY, USA" pub_exp["pub-SYBEX"] = "Sybex, Inc." pub_adr["pub-SYBEX"] = "Alameda, CA, USA" pub_exp["pub-UMI-RESEARCH"] = "UMI Research Press" pub_adr["pub-UMI-RESEARCH"] = "Ann Arbor, Mich, USA" pub_exp["pub-UNIVERSITY-MARYLAND"] = "University of Maryland" pub_adr["pub-UNIVERSITY-MARYLAND"] = "Waterloo, Ontario, Canada" pub_exp["pub-UNIVERSITY-WATERLOO"] = "University of Waterloo" pub_adr["pub-UNIVERSITY-WATERLOO"] = "Waterloo, Ontario, Canada" pub_exp["pub-VNR"] = "Van Nostrand Reinhold Co." pub_adr["pub-VNR"] = "New York, NY, USA" pub_exp["pub-WILEY-INTERSCIENCE"] = "Wiley-Interscience" pub_adr["pub-WILEY-INTERSCIENCE"] = "New York, NY, USA" pub_exp["pub-WILEY"] = "John Wiley and Sons, Inc." pub_adr["pub-WILEY"] = "New York, NY, USA" pub_exp["pub-WINDCREST"] = "Windcrest/McGraw-Hill" pub_adr["pub-WINDCREST"] = "Blue Ridge Summit, PA, USA" pub_exp["pub-WORLD-FUTURE"] = "World Future Society" pub_adr["pub-WORLD-FUTURE"] = "Bethesda, MD, USA" } function isletter(c) { return (index("ABCDEFGHIJKLMNOPQRSTUVWXYZ",toupper(c)) > 0) } function isupper(c) { return (index("ABCDEFGHIJKLMNOPQRSTUVWXYZ",c) > 0) } function key_AN() # start of new entry { print_entry() set_unused() } function key_AT() # article title { set("title",$0) } function key_AU() # author { key_PA() } function key_BN() # book number { key_IB() } function key_CA() # corporate author { if (("author" in entry) || ("editor" in entry)) # already have value set_unused() else set("corporateauthor",$0) } function key_CL() # contents listing { gsub(" -- ", " \\\\\n\t\t ", $0) gsub("\"", "'", $0) set("tableofcontents", $0) } function key_CT( s) # book series { if (match($0, " ; *[0-9]+$")) { s = substr($0, RSTART + 2) delete_match($0) sub("^ *v[.] *", "", s) set("volume", s) } set("series", $0) } function key_DB() # Melvyl database { set_unused() } function key_DE() # description (page dimensions, illustrations, ...) { set_unused() } function key_DP() # date of publication { sub("^DP *c", "DP ", $0) # drop copyright year marker sub("[.] *$", "", $0) gsub("[\\[\\]]", "", $0) set("year",$0) } function key_DT() # document type { set("type",$0) } function key_ED( s) # edition { s = $0 sub("^ED +","",s) if (s ~ "1st ed") return sub("^2nd ed$","Second", s) sub("^3rd ed$","Third", s) sub("^4th ed$","Fourth", s) sub("^5th ed$","Fifth", s) sub("^6th ed$","Sixth", s) sub("^7th ed$","Seventh", s) sub("^8th ed$","Eighth", s) sub("^9th ed$","Nineth", s) sub("^10th ed$","Tenth", s) set("edition",("ED " s)) } function key_GD() # government document number { set_unused() } function key_GI() # government ??? { set_unused() } function key_IB() # ISBN { set("ISBN",$0) } function key_JT() # journal title { set("journal",$0) } function key_LG() # language { if ($0 !~ "English") set("language",$0) } function key_LO() # location "LO UCB Main DD801.R8 S74 1985" { # 123456789.123456789.123456789.... ## print "DEBUG: key_LO(): $0 = <" $0 ">" if (("LCCN" in entry) && (entry["LCCN"] == "????")) delete entry["LCCN"] if ((!("LCCN" in entry)) && ($0 !~ /No call number/)) { sub(/[*].*$/,"",$0) # reduce "QA76.8.M6895 W35 1989 *c2 copies" # to "QA76.8.M6895 W35 1989" set("LCCN","LO " substr($0,21)) } ## print "DEBUG: key_LO(): LCCN = <" \ # (("LCCN" in entry) ? entry["LCCN"] : "") ">" } function key_MN() # music number { set_unused() } function key_MT() # title { ## print "DEBUG: key_MT: $0 = <" $0 ">" sub("/ *$", "", $0) set("title",$0) } function key_NT( s) # note (this will often need editing) { s = $0 sub("Includes bibliographical references and index[.]?","",s) sub("Includes index[.]?","",s) if (s ~ "^NT +$") return set("note",s) } function key_OA() # other author { if ("author" in entry) entry["author"] = entry["author"] " and " fix_author_editor(substr($0,3)) else entry["author"] = fix_author_editor(substr($0,3)) } function key_OE() # ???? { set_unused() } function key_OT() # other title { set_unused() } function key_PA() # personal author { sub(/,$/,"") # trim possible trailing comma set("author",$0) } function key_PB() # publisher { key_PU() } function key_PG() # pages { set("pages",$0) } function key_PH() # pages { key_PG() } function key_PL() # publisher location { set("address", $0) } function key_PT() # publication type (and start of new entry) { ## print "%% DEBUG:", $0 print_entry() set("type", "DT BOOK") set("publicationtype", $0) } function key_PU() # publisher { set("publisher",$0) } function key_RN() # report number { set("number",$0) } function key_SE() # series { set("series",$0) } function key_SN( s) # ISSN { s = substr($0,4) gsub(" ", ";", s) set_date("ISSN",("SN " s)) } function key_SO() # volume, number (month year) { set_date("date",$0) } function key_SR() # ???? { set_unused() } function key_ST() # telephone, FAX, document number, ... { set_unused() } function key_SU() # subject { if ("keywords" in entry) set("keywords",entry["keywords"] "; " $0) else set("keywords",$0) } function key_UC() # catalog number in University of California system { key_LO() } function key_UT() # some sort of alternate title { set_unused() } function key_VN() # some sort of number { set_unused() } function key_ZZ() # dummy last entry { print_entry() } function make_ignore_list() { ## List of words to ignore in forming citation tags. The initial ## list was extracted from the bibindex badwords list, and covers ## a few European languages as well as English. ignore["a"] = 1 ignore["ab"] = 1 ignore["aber"] = 1 ignore["als"] = 1 ignore["an"] = 1 ignore["and"] = 1 ignore["are"] = 1 ignore["as"] = 1 ignore["auf"] = 1 ignore["aus"] = 1 ignore["az"] = 1 ignore["bei"] = 1 ignore["bir"] = 1 ignore["but"] = 1 ignore["da"] = 1 ignore["das"] = 1 ignore["dat"] = 1 ignore["de"] = 1 ignore["dei"] = 1 ignore["dem"] = 1 ignore["den"] = 1 ignore["der"] = 1 ignore["des"] = 1 ignore["det"] = 1 ignore["di"] = 1 ignore["die"] = 1 ignore["dos"] = 1 ignore["e"] = 1 ignore["een"] = 1 ignore["eene"] = 1 ignore["egy"] = 1 ignore["ei"] = 1 ignore["ein"] = 1 ignore["eine"] = 1 ignore["einen"] = 1 ignore["einer"] = 1 ignore["eines"] = 1 ignore["eit"] = 1 ignore["el"] = 1 ignore["en"] = 1 ignore["er"] = 1 ignore["es"] = 1 ignore["et"] = 1 ignore["ett"] = 1 ignore["eyn"] = 1 ignore["eyne"] = 1 ignore["for"] = 1 ignore["from"] = 1 ignore["fuer"] = 1 ignore["fur"] = 1 ignore["gl"] = 1 ignore["gli"] = 1 ignore["ha"] = 1 ignore["haben"] = 1 ignore["had"] = 1 ignore["hai"] = 1 ignore["has"] = 1 ignore["hat"] = 1 ignore["have"] = 1 ignore["he"] = 1 ignore["heis"] = 1 ignore["hen"] = 1 ignore["hena"] = 1 ignore["henas"] = 1 ignore["het"] = 1 ignore["hin"] = 1 ignore["hinar"] = 1 ignore["hinir"] = 1 ignore["hinn"] = 1 ignore["hith"] = 1 ignore["ho"] = 1 ignore["hoi"] = 1 ignore["i"] = 1 ignore["il"] = 1 ignore["in"] = 1 ignore["is"] = 1 ignore["ist"] = 1 ignore["ka"] = 1 ignore["ke"] = 1 ignore["l"] = 1 ignore["la"] = 1 ignore["las"] = 1 ignore["le"] = 1 ignore["les"] = 1 ignore["lo"] = 1 ignore["los"] = 1 ignore["mia"] = 1 ignore["mit"] = 1 ignore["n"] = 1 ignore["na"] = 1 ignore["nji"] = 1 ignore["not"] = 1 ignore["o"] = 1 ignore["oder"] = 1 ignore["of"] = 1 ignore["on"] = 1 ignore["or"] = 1 ignore["os"] = 1 ignore["others"] = 1 ignore["s"] = 1 ignore["sie"] = 1 ignore["sind"] = 1 ignore["so"] = 1 ignore["t"] = 1 ignore["ta"] = 1 ignore["the"] = 1 ignore["to"] = 1 ignore["um"] = 1 ignore["uma"] = 1 ignore["un"] = 1 ignore["una"] = 1 ignore["und"] = 1 ignore["une"] = 1 ignore["uno"] = 1 ignore["unter"] = 1 ignore["von"] = 1 ignore["with"] = 1 ignore["y"] = 1 ignore["yr"] = 1 ### Additional words added later ignore["also"] = 1 ignore["any"] = 1 ignore["away"] = 1 ignore["by"] = 1 ignore["cum"] = 1 ignore["dans"] = 1 ignore["down"] = 1 ignore["into"] = 1 ignore["its"] = 1 ignore["off"] = 1 ignore["onto"] = 1 ignore["out"] = 1 ignore["over"] = 1 ignore["sur"] = 1 ignore["that"] = 1 ignore["these"] = 1 ignore["this"] = 1 ignore["those"] = 1 ignore["unto"] = 1 ignore["up"] = 1 ignore["via"] = 1 ignore["without"] = 1 ignore["zu"] = 1 ignore["zum"] = 1 ignore["zur"] = 1 } function make_month_abbreviations() { month_abbrev["january"] = "jan" month_abbrev["february"] = "feb" month_abbrev["march"] = "mar" month_abbrev["april"] = "apr" month_abbrev["may"] = "may" month_abbrev["june"] = "jun" month_abbrev["july"] = "jul" month_abbrev["august"] = "aug" month_abbrev["september"] = "sep" month_abbrev["october"] = "oct" month_abbrev["november"] = "nov" month_abbrev["december"] = "dec" month_abbrev["jan"] = "jan" month_abbrev["feb"] = "feb" month_abbrev["mar"] = "mar" month_abbrev["apr"] = "apr" month_abbrev["may"] = "may" month_abbrev["jun"] = "jun" month_abbrev["jul"] = "jul" month_abbrev["aug"] = "aug" month_abbrev["sep"] = "sep" month_abbrev["oct"] = "oct" month_abbrev["nov"] = "nov" month_abbrev["dec"] = "dec" month_abbrev["sept"] = "sep" } function new_entry() { clear_array(entry) last_key = "" entry["bibsource"] = "melvyl.cdlib.org:210/CDL90" } function other() { ## print_line("DEBUG: other(): line = <" $0 ">") append_value() } function print_abbrev(key,value) { if (!(key in strings)) { print_line("@String{" key \ substr(" ", 1,23 - length(key)) \ "= \"" value "\"}\n") strings[key] = value # remember that we have output this one } } function print_entry( key, k) { if ("type" in entry) { if (!("author" in entry) && !("title" in entry)) return if ("publisher" in entry) set_publisher_and_address(entry["publisher"]) if ("corporateauthor" in entry) { if (("author" in entry) || ("editor" in entry)) ; else { entry["author"] = "{" entry["corporateauthor"] "}" delete entry["corporateauthor"] } } delete entry["UNUSED"] fix_abbreviations() if ("ISBN" in entry) clean_ISBN() if (!("year" in entry)) set("year","DP 20xx") if ("booktitle" in entry) entry["booktitle"] = fix_title(entry["booktitle"]) if ("title" in entry) entry["title"] = fix_title(entry["title"]) print_line("@" entry_name() "{" citation_tag() ",") set("acknowledgement","XX ack-nhfb") set("bibdate",current_date_and_time) for (key in entry) entry[key] = fix_quotes(entry[key]) # After trying strict alphabetic order for the keywords, I # decided that it is more useful to have most of them in a # specific order, that corresponding to the usual order in an # article citation. print_pair() will delete each entry that # it prints, and ignore any that don't exist, so that key/value # pairs are not duplicated in the subsequent output after # sort_keys(). The key order here is chosen to match biborder(1). print_pair("author") print_pair("editor") print_pair("key") print_pair("booktitle") print_pair("title") print_pair("crossref") print_pair("chapter") print_pair("journal") print_pair("volume") print_pair("type") print_pair("number") print_pair("howpublished") print_pair("institution") print_pair("organization") print_pair("publisher") print_pair("school") print_pair("address") print_pair("edition") print_pair("pages_whole") # NB: Must precede "pages" because it print_pair("pages") # checks for the existence of "pages" print_pair("month") print_pair("year") print_pair("ISBN") print_pair("ISSN") print_pair("LCCN") print_pair("note") print_pair("price") print_pair("series") sort_keys() for (k = 1; sorted_keys[k]; ++k) print_key_value(sorted_keys[k],entry[sorted_keys[k]]) print_line("}\n") } new_entry() } function print_key_abbrev(key,abbrev) { print_line(sprintf(" %s =%s %s,", key, \ substr(" ",1,12-length(key)), abbrev)) } function print_key_string(key,string) { print_line(sprintf(" %s = %s\"%s\",", \ key, \ substr(" ",1,12-length(key)), \ trim(enquote(string)))) } function print_key_value(key,value) { if (key == "type") # already output as @type{tag, # } return else if (key == "acknowledgement") print_key_abbrev(key,value) else if ((key == "address") || (key == "publisher")) { if (substr(value,1,4) == "pub-") print_key_abbrev(key,value) else print_key_string(key,value) } else if (key == "journal") { if (substr(value,1,2) == "j-") print_key_abbrev(key,value) else print_key_string(key,value) } else if (key == "keywords") print_key_string(key,tolower(value)) else if (key == "month") print_month(value) else if (key == "pages_whole") print_key_string(("pages" in entry) \ ? "pages_whole" : "pages", value) else if (key == "review") print_key_string(key,"ACM CR " value) else print_key_string(key,value) } function print_line(line) { ## print line | "bibsort -byyear" print line } function print_month(month, day,mon) { mon = tolower(month) gsub(/[^A-Za-z\-]/,"",mon) # strip punctuation day = entry["day"] delete entry["day"] # don't want this output separately if (mon in month_abbrev) print_key_abbrev("month", \ (day ? ("\"" day " \" # ") : "") month_abbrev[mon]) else print_key_string("month",month day) } function print_pair(key) { if (key in entry) { print_key_value(key,entry[key]) delete entry[key] } } function protect_mixed_case(word) { if (word ~ /[A-Za-z][A-Z0-9]/) # e.g. BibTeX, dBase, Windows95, x86 return ("{" word "}") else if (word ~ /[a-z0-9]-[A-Z]/) # e.g. 3-D, post-Elizabethan return ("{" word "}") else if (word ~ /[0-9.][A-Z]/) # e.g. 368SX, U.S.S.R. return ("{" word "}") else return (word) } function sample(s) { ## return up to 256 chars of s return ((length(s) > 256) ? (substr(s,1,256) "...") : s) } function set(key,line) { ## if (key == "type") # output any pending entry # print_entry() ## print_line("DEBUG: set(): key = <" key "> line = <" line ">") if (key == "volume_issue") # handle "volume, issue" specially set_volume_issue(key,line) else if (key == "date") set_date() else if (key == "author") set_or_append(key,line) else if (key == "editor") set_or_append(key,line) else if (key == "ISBN") set_or_append(key,line) else if (key == "keywords") set_or_append(key,line) else if (key == "note") set_or_append(key,line) else set_other(key,line) } function set_date( k,n,parts) { ## Typical input lines: ## SO Vol. 121, no. 6 (Aug.6, 1984) ## SO Vol. 21, no. 8 (Aug. 1984) ## SO Vol. 23, no. 11 (Nov. 1986) ## SO Vol. 23, no. 5 (May 1986) ## SO Vol. 42, no. 1 (1990) ## print "DEBUG: set_date(): $0 = <" $0 ">" k = 3 gsub(/[.,()]/," ") # delete punctuation n = split(substr($0,k+2),parts," ") for (k = 1; k <= n; ++k) { # print "DEBUG: set_date(): parts[" k "] = <" parts[k] ">" if (parts[k] ~ /[1-2][0-9][0-9][0-9]/) # match 1984, 1984/1985, 1984--1985 set("year"," " parts[k]) else if (parts[k] ~ /no/) { ++k set("number"," " parts[k]) } else if (parts[k] ~ /Vol/) { ++k set("volume"," " parts[k]) } else if (parts[k] ~ /[A-Z][a-z]+/) { set("month"," " parts[k]) if (parts[k+1] ~ /^[0-9]$/) set("day"," " parts[++k]) else if (parts[k+1] ~ /^[0-3][0-9]$/) set("day"," " parts[++k]) else if (parts[k+1] ~ /^[1-2][0-9][0-9][0-9]$/) set("year"," " parts[++k]) } } } function set_or_append(key,line) { last_key = key # remember key for use in append_value() if (key in entry) { $0 = get_value($0) append_value() } else set_other(key,line) } function set_other(key,line, k) { last_key = key # remember key for use in append_value() line = fix_value(key,get_value(line)) if ((key in entry) && (line != entry[key])) warning("Replacing old value [" entry[key] "] by new value [" line "]") ## print_line("DEBUG: set_other(): key = <" key "> line = <" line ">") entry[key] = line } function set_publisher_and_address(value, k,n,parts,s) { ## Input contains both publisher and address, and looks like ## Publisher: Allyn & Bacon, Inc., Needham Heights, MA ## Split the line at commas: the publisher is then the first field, ## or the first few, if the following ones are "Co.", "Inc.", etc. n = split(value,parts,", *") ## reconstruct publisher s = trim(parts[1]) for (k = 2; (k <= n); ++k) { if (parts[k] ~ /Co[.]$|Inc[.]$|Ltd[.]$/) s = s ", " trim(parts[k]) else break } entry["publisher"] = s ## reconstruct address for (s = ""; k <= n; ++k) s = s ", " trim(parts[k]) s = trim(substr(s,3)) if (length(s) > 0) entry["address"] = s } function set_unused() { delete entry["UNUSED"] set("UNUSED",$0) } function set_volume_issue(key,line, k,n,parts) { k = index(line,": ") n = split(substr(line,k+2),parts,", *") set("volume",": " parts[1]) # recursively set the volume if (n > 2) { warning("Unexpected text past volume,issue [" line "] attached to issue") for (k = 3; k <= n; ++k) parts[2] = parts[2] ", " parts[k] } if (n >= 2) set("number",": " parts[2]) # recursively set the issue number } function sort_keys( k,key,m,n) { clear_array(sorted_keys) n = 0 for (key in entry) { n++ sorted_keys[n] = key } for (k = 1; k < n; ++k) { for (m = k + 1; m <= n; ++m) { if (tolower(sorted_keys[k]) > tolower(sorted_keys[m])) { key = sorted_keys[m] sorted_keys[m] = sorted_keys[k] sorted_keys[k] = key } } } } function trim(s) { gsub(/^[ \t]+/,"",s) gsub(/[ \t]+$/,"",s) return (s) } function warning(message) { print FILENAME ":" FNR ":%%" message >"/dev/stderr" }