Category: latex


This post is just a fex explorations with latex. I had trouble with the images and PDFLatex.  One thing I noticed was the pdftex.def version:

  • installed: 0.04d
  • currently listed at project website: 0.04l

Updating the pdftex.def (assuming downloaded to the desktop):

cd /usr/share/texmf-texlive/tex/latex/pdftex-def
sudo mv pdftex.def pdftex.def.old
sudo cp /home/skp/Desktop/pdftex.def-0.04l/pdftex.def .

Now, this didn’t solve the problem.  I found that I had to convert the images to pdf. You need to install texlive-extra-utils: sudo apt-get install texlive-extra-utils
epstopdf imagename.eps

Here is a quick script that will convert all .eps images:

cd images
for f in *.eps
epstopdf $f


LaTeX to OpenOffice

I thought I read that converting Latex documents into Open Office documents was possible, but I had trouble figuring it out today.  The bottom line was that I was using the wrong program to do so, and I didn’t have dvipng installed.

Where is oolatex?

When I typed oolatex on the command-line, the system couldn’t find the program.  It turns out that oolatex just isn’t on the path.  It is installed with the tex4ht system.  When installed, it is located at:


You can install it with:

apt-get install tex4ht

To compile a document you could use:

/usr/share/tex4ht/oolatex MyDoc.tex

Using htlatex

The command-line for htlatex is a little more complex, but it works.  You can use htlatex to convert a document like this:

htlatex MyDoc.tex 'xhtml,ooffice' 'ooffice/! -cmozhtf' '-coo' '-cvalidate'

Using mk4ht

Mk4ht is  much simpler.  You can use mk4ht like this:

mk4ht oolatex MyDoc.tex


I noticed this in the output:

sh: dvipng: not found

To fix it, I installed dvipng with:

sudo apt-get install dvipng

Then, the images worked fine.