Skip to content
protz edited this page Oct 18, 2010 · 14 revisions

Welcome to the LatexIt wiki!

  • Are you running Mac OSX and getting “Convert failed with error code 1” errors? See LatexIt and MacOS!
  • Are you running Windows, and getting “Convert failed with error code 1” errors? If you forgot to install Ghostscript, get it here.
  • Are you running Windows with a 64-bit ImageMagick? Check out this thread.
  • Are you running Windows?. Make sure the convert that was found is not the one in c:\system32\ by checking the addon’s options dialog. The path to convert.exe should look like c:\program files\imagemagickQ4blahblahblah\bin\convert.exe

If you’re not in one of these situations, read on…

Quick troubleshooting

The first thing to try is launching Thunderbird from a Terminal. This will allow you to see the error messages from the various programs involved. On Linux and MacOS, just open a terminal and type the relevant path to Thunderbird. On Windows, to see the output, you will need to edit the Thunderbird shortcut that lies on your desktop (right-click > Properties > Shortcut), and add " -console" at the end of the target field (don’t forget the space before the hyphen).

If you can’t figure out the error from the terminal output, you can install the latest development version from here. Then, enable debug output through the options. LatexIt! will try to provide some hints about possible reasons for failure. If some step fails, the output will be “I ran [some command line”]. Then, copy/paste this command line in a terminal and run it for yourself. Because LatexIt! will not delete the temporary files in this case, you will be able to reproduce the error and see what went wrong.

Detailed troubleshooting

If you’re getting the “convert failed with error N” error message, please use the following procedure to determine what’s wrong.

First, create a file named test.tex and put the contents below in it

\documentclass{article}
\usepackage[utf8x]{inputenc}
\pagestyle{empty}
\begin{document}
Hello, world
\end{document}

We’re going to run the exact same procedure as LatexIt!. Assuming your file is named test.tex, please run

latex -output-directory /tmp -interaction=batchmode test.tex

This should create a test.dvi file in your /tmp directory. If you’re on Windows, replace /tmp with the appropriate location (usually TEMP, which means, for instance, c:\documents and settings\yourusername\local settings\temp).

Now we need to crop the dvi file and convert it to ps.

dvips -o /tmp/test.ps -E /tmp/test.dvi

Finally, and this is where it usually fails, you need to run convert.

convert -units PixelsPerInch -density 300 /tmp/test.ps -trim /tmp/test.png

Clone this wiki locally