As I basically use Org to take note and export LaTeX files, I find displaying eps files as inline image to be important for me.I have my emacs compiled with ImageMagick support, and added the following codes in the .emacs file to enable inline preview support of .eps files link in Org-mode

(add-to-list 'image-type-file-name-regexps '("\\.eps\\'" . imagemagick)  )
(add-to-list 'image-file-name-extensions "eps")
(setq org-image-actual-width '(400))

I have tested an .eps file created by matplotlib using Agg backend, which the rendered inline image is blank. However when converting the eps file using Adobe Illustrator to Illustrator EPS (I have tried several versions from AI 3 to AI CC) and the converted eps file can be successfully shown as inline image.

enter image description here

Since the org-display-inline-images function only takes the image created by ImageMagick to make the overlay, this problem seems to be due to be caused by ImageMagick failing to render the matplotlib version eps file. However if using the ImageMagick from system command line like convert -density 300 test.eps test.png will correctly create the png file which can be opened by system preview.

The question is, what exactly is the difference between the eps created by matplotlib and AI?

The test is done in OS X El Capitan with emacs 25.1.1, org-mode 8.2.0, matplotlib 2.0.0b4 and Adobe Illustrator CC 2015. The sample files (.org + .eps files created by matplotlib and AI)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.