Perl programmer for hire: download my resume (PDF).
John Bokma MexIT
freelance Perl programmer

Making Emacs Org mode exporting to PDF work on Ubuntu

Wednesday, June 29, 2011 | 0 comments

A week ago I received "The Org Mode 7 Reference Manual", published by Network Theory Ltd as a reward for some Perl programming help I had given. I had already been reading parts of the book and so far Org mode for Emacs looks very, very useful to me, especially since I still keep todo lists on paper in a notebook. That works quite well until one wants to keep track of how much time was spent on a todo item.

Today I started with my first org file; documentation of how I am configuring a fresh Ubuntu 10.04 LTS installation on my development machine, a Dell Vostro 200 ST. And when I had some text entered in the Org file I wanted to check out how it would look as PDF. So I pressed C-c C-e d and nothing happened.

My first guess was that pdflatex was not installed since Org uses this program to convert the generated LaTeX to PDF. And indeed, when I exported the Org file as LaTeX only, using C-c C-e l, and tried to run pdflatex on the generated file I got a message that the program was not installed.

So I used

sudo apt-get install texlive-latex-base

to install the pdflatex program and tried again C-c C-e d in GNU Emacs. This time the Document Viewer did open a PDF file but I didn't see any text at all.

So I again ran pdflatex on the exported LaTeX file at the command line and got many lines of output, giving me the impression that a font file (or several) where missing. The output was followed by a prompt which I could exit by pressing Ctrl+D. I used Google to search for a solution using the following part of the output given:

grep: ecrm1095.log: No such file or directory

And the first result, Bug#421919: fiaif: FTBFS: I can't find file `ecrm1095'., had a solution by Dr. Frank Küster: adding tl-latex-recommended. I assumed that tl stood for texlive, and indeed after:

sudo apt-get install texlive-latex-recommended

I was able to generate a PDF file from the Org file I was working on from GNU Emacs and view the result in the automatically started Document Viewer using just C-c C-e d. Very impressive.

And when one leaves the Document Viewer open, modifies the Org file and uses C-c C-e d to export the PDF again Document Viewer updates the view automatically; this is great for keeping a preview around.

Also today

Please post a comment | read 0 comments | RSS feed