Converting an EndNote Database to BibTeX

During a recent LaTeX introductory workshop, many participants said that they’re very much looking forward to using LaTeX for their future writings, but mentioned that there didn’nt seem to be an obvious way of porting their existing EndNote bibliography libarary into BibTeX format.

EndNote does have an “Export BibTeX” filter, but it doesn’t seem to generate satisfactory BibTeX files. After some googling, I found Bevan Weir’s customised export filter, which does a much better job than EndNote’s default. I modified his filter file a little bit more, and was able to convert an EndNote bibliography library to BibTeX with the following steps.

I tested this with EndNote X5 on the Mac, with JabRef 2.7, but they should also work with Windows versions. %ENDNOTE% refers to the path where EndNote is installed on your system.

  1. Put BibTeX_Export_LLT.ens (download) in %ENDNOTE%/Styles/ .
  2. Start EndNotes, and load your library.
  3. Make sure the new style is listed:
    Edit > Output Styles > Open Style Manager
    Make sure BibTeX_Export_LLT is checked.
  4. File > Export
    Make sure Save File as Type is set to Text Only, and Output Style is set to BibTeX_Export_LLT.
  5. Save your file and check that it has a .bib extension.
  6. Open the exported .bib in JabRef. There will be a whole bunch of errors about corrupted or empty BibTeX keys; don’t worry. Just click OK.
  7. Ctrl+A to select all the BibTeX entreis, Tools > Autogenerate BibTeX keys.
  8. Check through the BibTeX entries, especially those highlighted red, to check and correct any crucial information loss.

And hopefully the converted bibliography file is now usable enough.

Migrating to LaTeX: Producing High-resolution Line Drawings

Recently I was asked this question by not 1, but 3 people, so I guess that makes for a valid blog post!

I’m now migrating my paper/presentation to LaTeX from Microsoft Word/Powerpoint. It feels great! But is there any way I can transfer my existing line drawings over as high-resolution PDF or EPS? The publisher is asking for 800-1200 dpi.

Of course you can. I’ll outline what has worked for me below.

As for the question

So how do I create high-resolution line drawings for use in LaTeX if not the drawing tools in Word?

See the posts on Diagramming Applications and Drawing diagram; the cryptic way instead.

Mac OS X 10.5 Preview

If you’re on a Mac, first print your drawing diagram as a PDF. Open the PDF in Preview. Click the Select button on the Toolbar, and draw a rectangle around your drawing diagram. Then go to Tools menu and select Crop, or just hit Command-K. Save your cropped drawing back as a PDF.

OpenOffice Draw

If you have OpenOffice, you can try copying-and-pasting your drawing objects over to OpenOffice Draw, change the page size (Format > Page…) to fit the drawing just right, then export the drawing to PDF. However, elements and formattings often get distorted when copied over to OODraw, so personally I’d go for the procedures described next.

PDF Freeware Tools

Disclaimer: The tools described in this section are mainly for use in Windows, and are free-of-charge, but not all are open source.
Big thanks to Kevin Klement for pointing me toward PDFCreator and BRISS, true FOSS solutions!

Convert Your Drawing to PDF
First get PDFCreator. Once installed, you will be able to produce PDF out of any documents that is printable.

In your Word or Powerpoint document, select/highlight your line drawing, and go to File > Print. Choose “PDFCreator” as your printer, and select “Selection” or (“Current Page”) as the page range. You should also open the Print Properties, click on the Advanced button, and make sure that Print Quality is set to a sufficiently high dpi (e.g. 1200).

Click OK to print, and you will be prompted to enter any metadata (author, title, etc) you would like about the PDF. Save the PDF. You now have a high-resolution line drawing PDF, but it needs to be cropped to remove the surrounding white space.

First, install PDF995. You’ll need the 2 files from Pdf995 2-Step Download, i.e. the “Printer Driver” and the “Free Converter”. (A warning though: PDF995 is adware.)

In your Word or Powerpoint document, select/highlight your line drawing, and go to File > Print. Choose “PDF995” as your printer, and select “Selection” as the page range.

When you click OK you will be asked to enter a file name to save your PDF to. Bear with the annoying advertisement that pops up for 10 seconds.

Cropping Your PDF
You have a few choices.

  • Photoshop. If you’re one of the lucky souls to have a copy of Photoshop, you can use it to do the job. Just remember to set the Resolution to 800 or 1200 when you open the PDF in Photoshop. Crop, and then save the file back as PDF.
  • GIMP. But chances are that you don’t have Photoshop. GIMP can also open PDF files, and you’ll also be able to specify a sufficiently high resolution when you open it and then crop it. However, while GIMP can save it as an EPS (fine if that’s what you need), it cannot save/export to PDF format. And GIMP rasterises the file before saving (as Kevin pointed out), which defeats the purpose, really. So the winner really goes to…
  • BRISS, which needs a JRE to run. Unzip the BRISS zip file, and double-click on briss-.jar to launch. Load your diagram drawing PDF file, and draw a rectangle around the drawing objects. Click Crop PDF, and you’re done after saving the file.
  • PDF-cropper. You will need .NET 3.5 and GhostScript, so download and install those first before installing PDF-cropper.

    (Theoretically, you can use the GhostScript on command line to crop your PDF, but that involves figuring out the crop box and margins yourself, which I suspect not many people enjoy. Hence PDF-copper.)

    In PDF-cropper, go to the Configure menu and set the path to GhostScript binaries (usually C:\Program Files\GS\GS8.6x\bin), as well as your fixed output folder. Now load all your PDF files containing your drawings (PDF-cropper processes them by batch.) You can choose to crop off all surrounding white space around your drawings, or leave 5mm or 10mm space around them. Click the Action button, and the automatically cropped PDFs will be saved in the fixed output folder you specified.

Congratulations, you should now have high-resolution line drawings in PDF (or EPS) format, that are suitable for journal publication. Now just to include them in your LaTeX file with \includegraphics[width=...]{filename}.