EndNote and Latex

Using a reference management software is a must for any PhD student. At the start of my PhD I choose EndNote because it was free for my institution and because I had used it before. There are many others out there like Mendeley or Citavi, all with their pros and cons.
While using Microsoft Word for smaller reports and things during my first years of PhD I really liked the Cite as You Go feature of EndNote which made it very easy to add references into a Word document. However, I recently started writing in Latex and getting your references from EndNote into a good BibTex format isn’t as straight forward as I thought it would be. So here is a little tutorial on how I did it using Endnote X4 and TexStudio (MiKTex 2.9.4487):

Before we actually export the library from EndNote we have to do some changes in the way it gets exported. The standard BibTex Export output style is not very useful as it makes the EndNote field “Label” the cite-key that we are going to use in Latex to call the reference. If you have added a label to all your references you don’t have to do the first steps and can use that to call your reference later on.

To edit the BibTex Output style go to Edit -> Output Styles -> Edit “BibTex Export”. Make sure you have selected BibTex Export as your current style or you will not be able to select it.

Edit FileUnder Bibliography -> Templates you can now see how each of the different reference types will be exported from EndNote. E.g. for a book:

@book{|Label,|
|   `author = `{Author},
|   `title = `{Title},
|   `publisher = `{Publisher},
|   `address = `{City},
|   `volume = `{Volume},
|   `edition = `{Edition},
|   `series = `{Series Title},
|   `note = `{Notes},
|   `abstract = `{Abstract},
|   `keywords = `{Keywords},
|   `pages = `{Number of Pages},
|   `year = `{Year}

The first line is important as it will be used in Latex to assign the right reference. Instead of Label we are going to use the Record Number. This is a unique number for each reference within EndNote (basically numbered accordingly to when you added the reference). All we have to do it to change the first line in each reference type. E.g. for the Book reference type:

@book{|NoRecord Number,|
|   `author = `{Author},
|   `title = `{Title},
|   `publisher = `{Publisher},
|   `address = `{City},
|   `volume = `{Volume},
|   `edition = `{Edition},
|   `series = `{Series Title},
|   `note = `{Notes},
|   `abstract = `{Abstract},
|   `keywords = `{Keywords},
|   `pages = `{Number of Pages},
|   `year = `{Year}

As you see I have added the prefix “No” just because I find it easer to read No123 instead of 123. Now save your edited BibTeX Export file e.g. as BibTex Export Copy. Now the hard bit is done! Next steps are to select the references you want to export, go to File ->Export and select your new BibTeX Export as output style.

OutputStyleNow you have a .txt file that looks something like this:

LibrarytxtTo get a BibTex file simply save the .txt file as a .bib file. In Latex I use the fancyref package as it allows some useful cross-referencing. To create a library use the following command: \bibliography{…/Library}:

bib

Now to cite the references that are in your .bib file you just need to know the Record Number and you are good to go:

bibThis is what you get from above line:

result

At the end of your document (or wherever you put your bibliography) you will now have an entry of your cited work. Hope that was somehow helpful 🙂

Advertisements

2 thoughts on “EndNote and Latex

  1. Really pleased I went for a article database / reference manager. I personally picked jabref, although @volcan01010 gets on really well ETH zotero. Really helpful being able to click on the PDF links and opening the paper.

    • Yeah I guess it all comes down on how well informed your decision is as to which reference manager to use at the start of you PhD. Because changing later can be quite a pain in the *** as well :-/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s