[comp.sys.mac.apps] BibTeX -> Refer translation

arie@eecs.umich.edu (Arie Covrigaru) (03/10/91)

A while ago I posted a request in search for a translator of bibliography
files from the BibTeX format to the Refer format.  This so I can read
the bibliography file into EndNote/EndNote Plus which can parse Refer
but cannot parse BibTeX (why not?).  I received a response from Avi
Rapoport from Niles Associates offering me a Lisp program to do it,
but in the meanwhile Seth Goldman also responded and emailed me what
turned out to be the same lisp code with some modifications.

I tried the program and found out that it doesn't cover all the cases
I had in my bibliography file, so I completed the program to cover
all (as far as I know) possibilities.  I am posting all this because
I think the program would be of use not only to people who use EndNote
but to others that use Refer on UNIX machines.  The following is the
header of the source code.  The program is too large to post here but
if people are interested I'll be happy to email it by request.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
;; File            : bibtex-refer.lisp
;; Version         : 3.0
;; Author          : Curt Stevens, University of Colorado at Boulder.
;; Created On      : 1989
;; Last Modified By: Arie Covrigaru, University of Michigan at Ann Arbor.
;; Last Modified On: Sat Mar 2, 1991 at 3:32AM EDT
;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Contents:
;; ========
;; 
;; This program translates text files that contain references in the BibTeX
;; format into files in the Refer format.  Those can be read by EndNote and
;; thus made into an EndNote bibliography.  This is version 3.0 as I perceive
;; it because the original author wrote the program to translate Scribe to
;; Refer and the person I received the program from made modifications for
;; translating BibTeX to Refer.
;; 
;; I am the third person to modify this program in the following:
;;
;; 1. Cleaned the code, removing the last remains of references to scribe.
;; 2. Added the option of reading non quoted (as opposed to "quoted") field
values.
;; 3. Added the option I found in Refer of defining @string abbreviations.
;;
;; There is one caveat left in the translator.  Expressions of the form
{$5^{th}$}
;; that BibTeX allows inside strings are not parsed by this program.  I didn't
;; think the effort worthwhile.
;;
;; The main function in this program is bib-to-ref.  It takes two optional
;; arguments, the name of a source (BibTeX) file and the name of Refer file.
;; If any of the two arguments is missing the function prompts the user with
;; the standard Mac file-save dialogs for choosing/saving files.
;;
;; Notes:
;;
;;  i. This program was written in Macintosh Common Lisp 2.0 but it is
;;     fully compatible with MACL 1.3.2 and with no modifications it
;;     can be used in any standard Common Lisp.
;;
;; ii. The translator's parsing scheme is based on the names of reference
;;     types and fields that I found in EndNote.  If you changed those
;;     names, added fields or used another computer (the defintions of
references
;;     are kept in the EndNote Prefs file) the translator might not work
;;     as advertised.
;;
;; Arie Covrigaru, AI Lab, University of Michigan, Ann Arbor MI.
;; arie@eecs.umich.edu
;; 
;; This is the note from the original author:
;; =========================================
;;
;; Copyright 1989 Curt Stevens, University of Colorado at Boulder.
;; Permission to distribute this file is granted so long as this copyright
notice
;; is included and and the file is distributed in original form along with any
;; modified versions.
;;
;; This is the note from the person I received the program from:
;; ============================================================
;;
;; Here you go.  It is based on a scribe->refer conversion program so that's
;; why there are all the scribe references in the code.  I just did a quick
;; and dirty job of patching it up for bibtex.  I've also got a semi-finished
;; bibtex export style so you can keep your stuff in EndNote and just generate
;; bibtex files when you need them.  The code actually was written for
;; Mac Allegro CL so you should be able to run it without any mods.
;; 
;; Seth Goldman
;; seth@aic.hrl.hac.com
;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


--
=============================================================================
Arie Covrigaru                     |    University of Michigan AI Lab  
Phone: (313)763-1255               |    Room 149, Advanced Technology Bldg.
Internet: arie@eecs.umich.edu      |    1101 Beal Ave., Ann Arbor, MI 48109
=============================================================================