-
Notifications
You must be signed in to change notification settings - Fork 16
Home
Welcome to the LatexIt wiki!
This is the website of the LatexIt! Thunderbird extension for Thunderbird 2.0+. If you’re looking for the stable version, please head to Mozilla’s addons website. If you have issues or you’re looking for a development version, you’re in the right place.
- 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 -
Are you running Linux?. On Debian and Ubuntu, you need to make sure you have the
texlive-latex-extra
package installed. - Are you running Windows and TexLive 2014? Switch to TexLive 2015 (issue with dos-style paths).
If you’re not in one of these situations, read on…
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.
From some users, it appears that:
One must change in `/etc/ImageMagick/policy.xml` the lines
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
to
<policy domain="coder" rights="read" pattern="PS" />
<policy domain="coder" rights="read" pattern="EPS" />
<policy domain="coder" rights="read" pattern="PDF" />
<policy domain="coder" rights="read" pattern="XPS" />
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