Using Endnote with LATEX/BibTEX

Rob MacLeod (

EndNote is a nice program on PCs and Macs for managing a database of literature references. There are ways to move records in and out of EndNote so that we sane people who use LATEX and BibTEX can benefit from the user friendly entry of EndNote references. Here I describe what I have learned so far about this topic.

A good place to look for more information is the EndNote web cite at and for technical support and downloads at

1 EndNote to BibTEX

To extract EndNote references into a BibTEX format, you can simply create or use an existing output format from within EndNote and the result should be something BibTEX can handle. There is a section in the Support and Services section about downloading style files and here you can find a style file for BibTEX format called bibtex_export.ens. Insert this file into wherever you keep styles on your Mac/PC and then you can use this style to create an output file that BibTEX should read.

The instructions for exporting the references are as follows:

  1. Select the library containing the references to be exported.
  2. Select the references you want to export, then choose Show Selected References from the References menu (if you want to export the entire contents of the library, choose Show All References from the References menu).
  3. If you want to change the order of the references, choose Sort References from the References menu.
  4. Select the desired bibliographic style. Select a style from the list of favorites on the toolbar, or use the Output Styles submenu from the Edit menu. For more information about selecting styles, see About Bibliographic Styles.
  5. From the File menu, choose Export.
  6. Select the file type for the exported file, choose text only.
  7. Provide a name for the export file, and select the desired drive and folder.
  8. Choose Save.

1.1 Assigning BibTex keys

The above steps are not all ones needs to get a usable BibTEX file though. The resulting .bib file will not have any keys assigned and for this, I have written an ``awk'' script that cleans up the file to generate a fully legal .bib file. ``Awk'' is a programming language popular in Unix and available on all Unix/Linix and Mac OSX computers (see below for suggestions for Windoze users).

  1. Download the awk file by right mouse clicking (control-click) on this link and save the file to your local machine.
  2. Then run the awk script on the bibliography file as follows:

    awk -v prefix=ABC -v outfile=filename.bib -f endnotetobib.awk filename.txt > logfile.log

    where ``ABC'' is a prefix you select to create unique keys. Our internal format is to use the owners initials, i.e., RSM in my case. If there is no outfile specified, the output will appear in a file called, output.bib. Redirecting the output to the logfile.log is optional and if ommited, all output streams to the terminal window.

  3. The result will be a file (filename.bib) in proper BibTEX format. To be sure about its integrity, you can optionally pass the program bibclean over it and clean up any remnant problems.

Note for Windoze users! For those of you not using Unix or Mac OSX, the Windows operating system does not have ``awk'', which is a scripting language with powerful support for processing text files. So to run the script below, you will need to find a version of awk for Windows, for which there appear to be several options.

Note: I am not a Windoze user (in case you cannot tell) so your mileage will vary and I am not likely to be a lot of help with the details. My favorite solution is just to buy a Mac!

2 BibTEX to EndNote

We often want to share references with our unfortunate colleagues who have to use a Mac/PC based WYSIWYG text processing program (aka MS Word). To do this, there is a BibTEX style file that creates output that EndNote can import. The steps are as follows:

  1. Make sure you have a copy someplace where BibTEX can find it of the style file called refer.bst. You can download this from EndNote's ftp cite at
  2. Make up a LATEX file with citations for all the references you want to export. If you include the command nocite* in the document, it will actually extract every reference from your BibTEX file, an easy way to export an entire database.
  3. In the LATEX file, include the usual \bibliographystyle{} command, but as an argument, provide ``refer'', so the command looks like this
  4. Run LATEX on the file.
  5. Run BibTEX on the file.
  6. The result of these two steps will be a file with the extension .bbl that contains the desired bibliography records in a format that EndNote can import. It is the standard ASCII format for EndNote.
  7. Open EndNote and then select ``Import'' and the Import Option called ``Refer/BibIX'' and then EndNote should be able to import it into an existing or new endnote database file.

Now to actually replace \cite commands with the required tags in EndNote, you will have to do some manual work. It should be possible to write an awk/perl script that will make a good attempt at guessing at tags, but this will probably not work completely as the EndNote tags seem to include things that only EndNote can know, such as the reference # of the entry in the EndNote database. At present then, you will have to manually hunt for references and replace them with the ones from the EndNote database. If you have used a sensible naming scheme for the keys in your BibTEX database (e.g., the one I made up!), then this will not be so bad. EndNote uses the first author's last name and the publication year as parts of the key so if that matches in some way the naming scheme in BibTEX, then searching is at least facilitated. When in doubt about a match, note that there is a field called ``Label'' in the EndNote database that should contain the key field from the original BibTEX entry.

3 Using EndNote files directly with BibTEX

There are some programs out there that will allow you to read EndNote files directly and use them with BibTEX. I have not tested any of them and so cannot say anything useful about them other than supply the pointer to Google. Have fun and let me know what you learn.

About this document ...

Using Endnote with LATEX/BibTEX

This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.71)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 3 -no_white -link 3 -no_navigation -no_math -html_version 3.2,math -show_section_numbers -local_icons endnote

The translation was initiated by Rob Macleod on 2008-04-04

Rob Macleod 2008-04-04