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

texlivetools

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: \documentclass{article} \usepackage[latin1]{inputenx} \usepackage[T1]{fontenc} \begin{document}$a^2\$ %this is where your LaTeX expression goes
\end{document}

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.
**C:/DOCUME~1/yogcal/LOCALS~1/Temp/tblatex-1.tex
! Emergency stop.

\protect
C:/DOCUME~
1/yogcal/LOCALS~1/Temp/tblatex-1.tex
*** (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?

Update:

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
C:\texlive\2010\bin\win32>

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:\

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.