[Tex/LaTex] TeX Live 2010 and Thunderbird add-on LaTeXIt! don’t cooperate


I am using the Thunderbird email client on Windows and I have TeX Live 2010. I have tried the Thunderbird add-on LaTeXIt! (to insert equations as images in emails). (This is not the Mac tool LaTeXiT, just to avoid confusion.)

However, the developer seems only to support MiKTeX and not TeX Live. When trying to use it in Thunderbird, e.g. putting in a simple $a^2$, I get an error message. The message below is from the LaTeXIt! tool:

LatexIt! run report...

*** Found expression $a^2$

$PATH is My computer path (I have deleted the info here)

*** Generating LaTeX expression:
$a^2$ %this is where your LaTeX expression goes

I ran C:\texlive\2010\bin\win32\latex.exe -output-directory=C:\DOCUME~1\yogcal\LOCALS~1\Temp -interaction=batchmode C:\DOCUME~1\yogcal\LOCALS~1\Temp\tblatex-1.tex error code 1

LaTeX process returned 1
Proceeding anyway...
Severe error. Missing package?
We left the .tex file there: C:\DOCUME~1\yogcal\LOCALS~1\Temp\tblatex-1.tex, try to run latex on it by yourself...
--> Failed, not inserting

And here is the log file

This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010) (format=latex 2011.2.28)  18 JUL 2011 08:26
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
! Emergency stop.
*** (job aborted, file error in nonstop mode)

Here is how much of TeX's memory you used: (info deleted here)

Of course, I can compile the LaTeX file tblatex-1.tex generated in the temp folder very well with TeX Live 2010 without any problems but LaTeXIt! apparently cannot.

I am posting this question here as maybe someone can provide me with useful information on what is happening during the compilation process.

Any suggestions?


This is what I get when running the command as LaTeXIt! did:

 C:\texlive\2010\bin\win32>latex.exe -output-directory=C:\DOCUME~1\yogcal\LOCALS~1\Temp -interaction=batchmode C:\DOCUME~1\yogcal\LOCALS~1\Temp\tblatex-1.tex
 This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010)
 restricted \write18 enabled.
 entering extended mode

And there is no compilation.

If I move the file tblatex-1.tex to C:\, then compilation is fine. I believe that the error is due to the location where the file tblatex-1.tex is placed by LaTeXIt! i.e. in

C:\Documents and Settings\yogcal\Local Settings\Temp

Maybe the spacing in the folder names is creating this problem. And there is not way to change this in the option of LaTeXIt! to C:\

Best Answer

The problem line appears to be in content/main.js, line 144 (line number accurate as of 2011/07/22, may be different in the future). Try the following steps:

  1. Find the LaTeX-It xpi file. It's actually a renamed .zip file, so you'll need to uncompress it to edit its files. 7-Zip will extract the file without renaming, but worst case, you can rename the .xpi file to a .zip extension and then uncompress it into its own folder.

  2. In the file content/main.js, replace lines 144-147 with var temp_dir="c:\\temp"; temp_file = init_file(temp_dir); where the first statement refers to any writable temporary folder with a simple path. Make sure to double any backslashes in the path, since Javascript uses the backslash character to escape things like newlines, tabs, etc.

  3. Recompress the extracted folder into a .zip, then rename it to have a .xpi extension. Replace the old .xpi file with your updated one.

  4. At the author's GitHub site, post a bug report asking for better support of tildes in paths, or a feature request asking for the ability to override the default temporary folder with one of your choosing.