protz / latexit Goto Github PK
View Code? Open in Web Editor NEWAn extension for Thunderbird that allows you to generate LaTeX in your emails and send it as inline images
Home Page: http://www.xulforum.org/go_code
An extension for Thunderbird that allows you to generate LaTeX in your emails and send it as inline images
Home Page: http://www.xulforum.org/go_code
The wiki says that to use LaTeX It! In MacOS we have to open Thunderbird from Terminal:
/Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin
Then we have to go to Tools, then to Add-ons, after that we go to Latex It! and finally to Preferences. My problem is that I can't find the Preferences of the Add-ons. Even when I go to "Add-on preferences" it just says: "No Add-on settings found." So I don't know what to do. :c
Should be much simpler & faster too
If you write some latex, click 'LatexIt!', then save the message before closing the run report, the report becomes part of the draft and is not recognised when you reopen the message.
Also, though the text in the report can then be removed, the pretty background image cannot seem to be removed with the standard Thunderbird message editor. I was also unable to find a HTML editor for the current version of Thunderbird in the Ubuntu repositories (such an editor could probably remove the offending image).
Hi,
I am running Windows 10 (1803), Miktex 20.6, Thunderbird 68.9.0 and LatexIt 0.6.8.
It doesn't matter which latex code I try to convert, it doesn't work. The error message I get is
LatexIt! run report...
*** Found expression $a^2$
LaTeX process returned 1
Proceeding anyway...
Severe error. Missing package?
We left the .tex file there: C:\Users\URIGRU~1\AppData\Local\Temp\tblatex-1.tex, try to run latex on it by yourself...
In the above code I don't use any package.
It happens to me on several computers with similar setup. I can run both latex and dvipng manually on the temporary file without a problem. The path for both is correct.
The add-on used to work for me with ImageMagick convert, but this option is not available anymore.
What should I do?
Thanks
LatexIt writes each equation as a sequentially numbered .png file, in the user\AppData\temp folder, which subsequently gets embedded into the body of the email.
Fine, except that once the email is sent (i.e., the compose window is closed), all those little .png files should be erased (and any other trace of LatexIt activity) should be expunged once the note is sent. I noticed I now have ~100 little 1k .png files. Yes, they're tiny, but thats not the point. Once the note is sent, they sholdn't be there at all. They should be like temporary cookies, that get wiped out once the 'session' is closed.
Hi, Thunderbird 60 does not support anymore the latest LaTeXit. I like this tool.
With TB 52.1.0 LaTeX It! creates images (I can see the log), but does not insert them into the text (blank spaces instead).
LatexIt! doesn't work on my Thunderbird, convert
appears to be crashing somewhere.
Here is a MWE :
$ cat tblatex-1.tex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[frenchb]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{mathptmx}
\pagestyle{empty}
\begin{document}
$x$ %this is where your LaTeX expression goes
\end{document}%
$ /usr/bin/latex -output-directory=/tmp -interaction=batchmode /tmp/tblatex-1.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
$ /usr/bin/dvips -o /tmp/tblatex-1.ps -E /tmp/tblatex-1.dvi
This is dvips(k) 5.998 Copyright 2018 Radical Eye Software (www.radicaleye.com)
' TeX output 2019.06.12:2312' -> /tmp/tblatex-1.ps
</usr/share/texlive/texmf-dist/dvips/base/tex.pro>
</usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc>
</usr/share/texlive/texmf-dist/dvips/base/texps.pro>.
</usr/share/texlive/texmf-dist/fonts/type1/urw/times/utmri8a.pfb>[1]
$ /usr/bin/convert -units PixelsPerInch -density 150 /tmp/tblatex-1.ps -trim /tmp/tblatex-1.png
convert: not authorized `/tmp/tblatex-1.ps' @ error/constitute.c/ReadImage/412.
convert: pas d'images définies `/tmp/tblatex-1.png' @ error/convert.c/ConvertImageCommand/3210.
I use:
Thunderbird version: 52.4.0 (64bit)
Operating system: Debian 9.2
Run report:
*** Found expression $E = mc^2$
$PATH is /home/mac/.cargo/bin:/home/mac/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
*** Generating LaTeX expression:
\documentclass[9pt]{article}
\usepackage[utf8x]{inputenc}
%\usepackage[adobe-utopia]{mathdesign}
\usepackage[erewhon,vvarbb,bigdelims]{newtxmath}
\usepackage{amsmath,amssymb}
\pagestyle{empty}
\everymath{\displaystyle}
\begin{document}
$E = mc^2$ %this is where your LaTeX expression goes
\end{document}
I ran /usr/bin/latex -output-directory=/tmp -interaction=batchmode /tmp/tblatex-1.tex error code 1
LaTeX process returned 1
Proceeding anyway...
Severe error. Missing package?
We left the .tex file there: /tmp/tblatex-1.tex, try to run latex on it by yourself...
--> Failed, not inserting
I followed the trouble shooting guide and didn't encounter any errors. I repeated the steps with tblatex-1.tex
generated by LaTexIt and again did not encounter any errors. In fact, running /usr/bin/latex -output-directory=/tmp -interaction=batchmode /tmp/tblatex-1.tex
manually gives an exit code of 0.
Here is the terminal output when running LaTexIt in an instance of Thunderbird started from the terminal:
[Exception... "Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsILocalFile.remove]" nsresult: "0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)" location: "JS frame :: chrome://tblatex/content/main.js :: run_latex/< :: line 191" data: no]
run_latex/<@chrome://tblatex/content/main.js:191:11
run_latex@chrome://tblatex/content/main.js:188:7
replace_latex_nodes/<@chrome://tblatex/content/main.js:330:28
replace_latex_nodes@chrome://tblatex/content/main.js:325:45
tblatex.on_latexit@chrome://tblatex/content/main.js:377:7
oncommand@chrome://messenger/content/messengercompose/messengercompose.xul:1:1
Thanks
Latex It!'s caching mechanism only looks for changes in the equation itself and the (font) size. This works well for "inline" equations, because this is the only part allowed. When inserting complex LaTeX, it is possible to include another package (e.g. to change the font). Without changing the mathematical expression, Latex It! currently does not detect the change and uses the cached picture.
Thunderbird 60.8.0
LaTeX It! 0.6.7
Log:
I ran /usr/local/texlive/2019/bin/x86_64-linux/latex -output-directory=/tmp -interaction=batchmode /tmp/tblatex-1.tex error code 127
LaTeX process returned 127
Proceeding anyway...
Severe error. Missing package?
We left the .tex file there: /tmp/tblatex-1.tex, try to run latex on it by yourself...
--> Failed, not inserting
There is no error when I run /usr/local/texlive/2019/bin/x86_64-linux/latex -output-directory=/tmp -interaction=batchmode /tmp/tblatex-1.tex
in the terminal.
When I try to install this add-on through the thunderbird's add-on page, I only get version 0.6.7.
When trying to install this add-on from https://jonathan.protzenko.fr/latex-it/latex-it-201909230754.xpi, I get the error message `LaTeX It! could not be installed because it is not compatible with Thunderbird 60.8.0."
Would it be possible to make the version 0.6.8 compatible with older version of Thunderbird? I am on the newest Linux Mint distribution and it might be some time that Thunderbird gets updated to version 68 ...
Hopefully this isn't something obvious that I'm overlooking, but I installed Latexit, Imagemagick, and Ghostscript as needed but there seems to be an error with convert.exe.
Also the autodetect option doesn't find convert.exe so I have to go in my directory and manually select it; this leads me to believe I might have the wrong version of imagemagick or something (I made sure to get the 32 bit version).
LatexIt! run report...
*** Found expression
$PATH is C:\Program Files (x86)\Mozilla Thunderbird;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Skype\Phone;C:\Program Files\MATLAB\R2015b\bin;C:\Users\Blake\AppData\Roaming\MiKTeX\2.9\miktex\bin\x64;C:\Users\Blake\AppData\Local\Microsoft\WindowsApps;
*** Generating LaTeX expression:
\documentclass{article}
\usepackage[utf8x]{inputenc}
\pagestyle{empty}
\begin{document}
\end{document}
I ran C:\Program Files\MiKTeX 2.9\miktex\bin\x64\latex.exe -output-directory=C:\Users\Blake\AppData\Local\Temp -interaction=batchmode C:\Users\Blake\AppData\Local\Temp\tblatex-1.tex error code 0
I ran C:\Program Files\MiKTeX 2.9\miktex\bin\x64\dvips.exe -o C:\Users\Blake\AppData\Local\Temp\tblatex-1.ps -E C:\Users\Blake\AppData\Local\Temp\tblatex-1.dvi
I ran C:\Program Files (x86)\ImageMagick-7.0.3-Q16\convert.exe -units PixelsPerInch -density 150 C:\Users\Blake\AppData\Local\Temp\tblatex-1.ps -trim C:\Users\Blake\AppData\Local\Temp\tblatex-1.png
convert failed with error code 1. Aborting.
Possible explanations include:
Please see http://github.com/protz/LatexIt/wiki
--> Failed, not inserting
I use Thunderbird portable to send emails from different computers (work, school, home...) and I would like to add LaTeX-It to this version. Since Windows is everywhere I use the Windows version of Thunderbird portable.
I have MiKTeX and ImageMagick portable on my USB key so there is no problem for the path to latex
, dvips
and convert
executable. The problem is GhostScript. I found a portable a version of it, distributed by PortableApps.
I don't really understand when the program needs GhostScript and I would like to understand in order to make this portable version work.
Thank you in advance for your help.
Hi,
I installed LaTeX It 0.6.2 on Thunderbird 38.1.0 on Windows XP SP 3 with TeX Live 2014.
LaTeX It output is:
LatexIt! run report...
*** Found expression $\LaTeX$
$PATH is C:\Program Files\Mozilla Thunderbird;C:\Python27\Lib\site-packages\PyQt4;C:\Python27\;C:\Python27\Scripts;C:\Program Files\Common Files\Intel\Shared Libraries\redist\ia32\compiler;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\WinMerge;C:\Program Files\Calibre2\;C:\Program Files\MATLAB\MATLAB Compiler Runtime\v713\runtime\win32;C:\Program Files\TortoiseHg\;C:\Program Files\Common Files\Sage SData\;C:\Program Files\Stanford ADL\SU2\bin;C;C:\Program Files\QuickTime\QTSystem\;C:\Python27\DLLs;C:\texlive\2014\bin\win32;C;
*** Generating LaTeX expression:
\documentclass{article}
\usepackage[utf8x]{inputenc}
\pagestyle{empty}
\begin{document}
$\LaTeX$ %this is where your LaTeX expression goes
\end{document}
I ran C:\texlive\2014\bin\win32\latex.exe -output-directory=C:\DOCUME~1\Stephan\LOCALS~1\Temp -interaction=batchmode C:\DOCUME~1\Stephan\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\Stephan\LOCALS~1\Temp\tblatex-1.tex, try to run latex on it by yourself...
--> Failed, not inserting
So I opened the command line and started the command:
> C:\texlive\2014\bin\win32\latex.exe C:\DOCUME~1\Stephan\LOCALS~1\Temp\tblatex-1.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/W32TeX) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
! I can't find file `C:/DOCUME'.
<to be read again>
\protect
<*> C:/DOCUME~
1/Stephan/LOCALS~1/Temp/tblatex-1.tex
(Press Enter to retry, or Control-Z to exit)
Please type another input file name:
Could you please update the paths for this type of installation. Thanks!
Cheers,
Stephan
Hello!
I tried the 'Latex It!' button with this message:
Hello
$\LaTeX$
And it fails with:
LatexIt! run report...
*** Found expression
$\LaTeX$
LaTeX process returned 1
Proceeding anyway...
Severe error. Missing package?
We left the .tex file there: /tmp/tblatex-1.tex, try to run latex on it by yourself...
But the file /tmp/tblatex-1.tex is empty.
It works fine when I use 'insert complex latex' from the menu so I also tried:
Hello
$
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\LaTeX
\end{document}
$
But the expression isn't detected.
Using T'Bird 68.4.1 (for better or worse). Have been using LatexIt for years, successfully, without issues, but for TBird versions pre-68.x.x.
The issue with 68.4.1 (and perhaps 68.x.x generally) is simple enough. If I type (say)
But, if I try to 'insert complex LaTeX', no so much. Nothing...happens. No log or debug file generated. Nothing. I've attached a screen capture of the TBLatex options popup window. Nothing looks awry, but I guarantee that clicking the 'OK' button does nothing. And, 'clicking 'OK', and then trying the 'LatexIt' button after the fact does nothing either.
Because SeaMonkey uses part of the Thunderbird codes in its email client, Thunderbird add-ons should work out-of-the-box in SeaMonkey. Is it possible to enable SeaMonkey support?
I have always used LaTeX-It under Windows with MiKTeX without any problem and today I can't get it to work under Ubuntu. I'm under Ubuntu 18.04.1 LTS and with Thunderbird 60.4.0 64 bits. I installed texlive-ful
l and checked that tex-live-extra
is installed. There is no problem in the autodetection window either.
But when I try to use it I have the classic error message :
Does anyone have an idea that can fix my problem?
This probably happens on other linux flavors too...
It would be good to check that texlive-latex-extra (or whichever part of that package that gives you utf8x) is installed along with the latex, convert, etc.. binaries
I installed &configured latexIt, miktex, gs & graphic magick correctly, but my LatexIt produces only the following:
LatexIt! run report:
*** Found expression
and thats all - no formular or nothing is inserted or replaced =(
I already tried out both possibilities of troubleshooting of the Wiki:
in the console there comes:
This is pdfTeX, Version 3.1415926-1.40.11 <MiKTeX 2.9>
entering extended mode
the routine of the detailed troubleshooting works. the creation of all files is correct and in the end there is the test.png
That would be a nice feature to have, very low cost.
Thunderbird phased out support of legacy XPI extensions in favor of WebExtensions. LaTeX It! is sadly affected too. Is there any chance to port this extension?
Whenever the formula has a descender (such as $g(x)$), the generated picture should be aligned at the baseline of the surrounding text (#47). This works, when the formula is processed for the first time. After an Undo
(or Undo All
) and a new run, the picture does not get aligned anymore, if the formula was not changed in the meantime.
Reason: Latex It!
finds a cached image in the temporary directory and using this instead of re-processing the formula. It does not find any information about the vertical alignment needed.
LaTeX It!
v0.7.2
I went through the Troubleshooting and everything works fine there. However, after running LatexIt in my test email message I got the following report:
LatexIt! run report...
*** Found expression
$PATH is C:\Program Files (x86)\Mozilla Thunderbird;C:\Program Files\ImageMagick-6.9.3-Q16;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files\Samsung\AllShare Framework DMS\1.3.06;C:\Program Files\Samsung\AllShare Framework DMS\1.3.06\64bit;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Program Files (x86)\gnuplot\bin;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files\OpenVPN\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Calibre2;C:\Program Files (x86)\Skype\Phone\
*** Generating LaTeX expression:
\documentclass{article}
\usepackage[utf8x]{inputenc}
\pagestyle{empty}
\begin{document}
\end{document}
I ran C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\latex.exe -output-directory=C:\Users\KRZYSZ1\AppData\Local\Temp -interaction=batchmode C:\Users\KRZYSZ1\AppData\Local\Temp\tblatex-1.tex error code 1
LaTeX process returned 1
Proceeding anyway...
Severe error. Missing package?
We left the .tex file there: C:\Users\KRZYSZ~1\AppData\Local\Temp\tblatex-1.tex, try to run latex on it by yourself...
Failed, not inserting
The path to my latex executable is: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\latex.exe. I am clueless as to why LatexIt seems to be using some random concatenation of different paths...
I tried adding quotation marks to the paths to my executable latex, dvips and convert, but it also gives errors:
This path is malformed: "C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\latex.exe".
Possible reasons include: you didn't setup the paths properly in the addon's options.
Wrong path for latex bin. Please set the right path in the options dialog first.
Failed, not inserting
Any hints?
I really like the idea of your add-on, however it doesn't work for me. I have the exact same issue as described in MrJonDoe's review on the Mozilla add-on page ( https://addons.mozilla.org/en-US/thunderbird/addon/48583/ )
This is the first time I am trying the add-on. All utilities were detected successfully, however the LatexIt button does not show up. I have only one other add-on installed, which is MinimizeToTray Plus, and disabling it does not help.
I ran Thunderbird from a terminal, but no errors showed up.
I am running Thunderbird 3.1.7 on Ubuntu 10.10
Under Ubuntu, dlatex -output-directory /tmp -interaction=batchmode test.tex
gives the error restricted \write18 enabled. entering extended mode
Without the batchmode part the command works fine.
EDIT: This helped:
https://tex.stackexchange.com/questions/471433/thunderbird-latexit-extension-convert-failed-with-error-code-1
With the change in Imagemagick I still get LaTeX process returned 1
but the e-mail looks fine.
The equations are not well aligned with the text vertically and the height varies a lot, more than needed, depending on the equation. This is because dvips create a small bounding box around equations like
pref("tblatex.template", "\\documentclass{article}\n\\usepackage[utf8x]{inputenc}\n\\pagestyle{empty}\n\\begin{document}\n__REPLACEME__ %this is where your LaTeX expression goes\n\\end{document}\n");
with the line
pref("tblatex.template", "\\documentclass{article}\n\\usepackage[utf8x]{inputenc}\n\\usepackage{xcolor}\\pagestyle{empty}\n\\begin{document}\n\\makebox[0pt][l]{\\color{white}$\\mid$}__REPLACEME__ %this is where your LaTeX expression goes\n\\end{document}\n");
and in main.js, I replaced the line
img.style = "vertical-align: middle";
in the function replace_latex_nodes()
with the line
img.style = "vertical-align: -26%; max-height: 1.2em";
It only works with a white background, because the only simple way I found to fix the bounding box is to use an invisible (because it is white) content:
I have a suggestion. This is an horrible hack, but it is only horrible if we consider to include it in the addon, it is not horrible as an optional configuration. It turns out that the line
pref("tblatex.template", "\\documentclass{article}\n\\usepackage[utf8x]{inputenc}\n\\pagestyle{empty}\n\\begin{document}\n__REPLACEME__ %this is where your LaTeX expression goes\n\\end{document}\n");
is actually an option. The part that is not an option is the line
img.style = "vertical-align: -26%; max-height: 1.2em";
but it would be very natural to make it configurable as well, in the same way as the latex template is configurable. Then, this (or something similar) could be offered as a possible configuration. Other configurations could be offered , for different platforms, etc. It seems to me that a good alignment of the equations is important. It will make this package way more useful.
When re-opening draft e-mail (or sent e-mail, then selecting "Edit as new"), old formulas will not be converted back to LaTeX source, instead they remain as images in the text. I am not sure whether it is a bug on my side or design decision/issue of LatexIt.
Thanks for your great contribution with LatexIt -- I use it frequently.
What's the expectation for Tbird 78.2.2 compatibility?
Thanks. -Mark
I have error 1 on mac and changing error as I change the convert path.
*** Generating LaTeX expression:
\documentclass{article}
\usepackage[utf8x]{inputenc}
\pagestyle{empty}
\begin{document}
\end{document}
I ran /Library/TeX/texbin/latex -output-directory=/var/folders/xt/201bpzbs6_x1dfpdpjzhjx1m0000gn/T -interaction=batchmode /var/folders/xt/201bpzbs6_x1dfpdpjzhjx1m0000gn/T/tblatex-1.tex error code 0
I ran /Library/TeX/texbin/dvips -o /var/folders/xt/201bpzbs6_x1dfpdpjzhjx1m0000gn/T/tblatex-1.ps -E /var/folders/xt/201bpzbs6_x1dfpdpjzhjx1m0000gn/T/tblatex-1.dvi
Severe error. Missing package?
We left the .tex file there: /var/folders/xt/201bpzbs6_x1dfpdpjzhjx1m0000gn/T/tblatex-1.tex, try to run latex on it by yourself...
--> Failed, not inserting
I'm running Mac OSX high seirra
When you call up the preference screen of LatexIt! from the add-ons page, a new tab opens and the size of the window is changed. Maybe LatexIt! should open a separate configuration window and my Thunderbird forces this to be a tab. In the first case (separate window) the size change makes sense, in the second case (new tab) it is simply annoying.
My Thunderbird is 60.7.0 (64-bit) on Linux Mint 19.1
Hi,
Combining Latex It! with Ubuntu 20.04 and Thunderbird 68.10.0 I get a weird vertical spacing. I'm attaching a screenshot of how the rendering goes (for an expression between dollar-signs). The vspace seems to be in the (html?) embedding, not in the png, which has the right dimensions. I can get around the issue by manually downgrading to version 0.6.8, and disabling updates. For this version I also have to change the ImageMagick policy lines.
Thanks in advance! And ofcourse thank you so much for a great addon.
Best,
Simon
I'm using Thunderbird 17.0.6 on Ubuntu 13.04 (64bit) and I installed LaTeXit with no issues, but I can't find the button (LaTeXit!) that does the job. I tried opening Thunderbird from terminal with the following error
(process:8574): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
but I believe this is not due to the add-on since it's already there when the add-on is disabled.
As @eudoxos mentioned in #4 (comment), it should be possible to align the equations correctly when using dvipng
(#35). The way to do it is as follows:
preview
available.\usepackage[active,textmath]{preview}
into the preamble of the LaTeX document.dvipng
with the option --depth
.depth
value (a typical output is
This is dvipng 1.15 Copyright 2002-2015 Jan-Ake Larsson
[1 depth=4]
4
) from main.js:run_latex()
in addition to the values already returned.content/main.js
replace all img.style = "vertical-align: middle"
with img.style = "vertical-align: -<depth>px"
(<depth>
is the value returned by dvipng
and needs a -
sign in front of it).That is pretty straightforward.
The problem is the step 4, because it looks like that the it is not possible to capture the output of an external command in Thunderbird (https://stackoverflow.com/questions/10215643/how-to-execute-a-windows-command-from-firefox-addon#answer-10216452). However it is possible to redirect the standard output into a temporary file and parse that file. But this opens another can of worms (and a bag of possible bug reports and bad comments): You need to call the command in an external shell (or LatexIt! must call a special script doing the redirection, which should also be avoided).
Does anybody know how to get hold of the output of an external command (in our case dvipng
) without using a shell?
But it used to work fine on Thunderbird 60.
As @Reylocnier found in #30, the default installation of ImageMagick has a tightened security which makes convert
to fail. Would it be possible to use an alternative dvi
to png
converter, eg. dvipng
(https://savannah.nongnu.org/projects/dvipng/). This would be a two-step conversion instead of the currently used three-steps.
According to feraudyh in https://sourceforge.net/projects/dvipng/#project-reviews, dvipng
is included in MikTeK for Windows, so for Windows users it's even easier (no need to install the ImageMagick package). Linux users have to install the dvipng
package.
What do you think @protz and @indigestion?
Hello there,
First of all thank you for the great addon.
I have a question regarding the color of the output formulas. I have noticed that they are always black, and my thunderbird is white text on a black background. In that case I dont see anything. I am also aware that if the color of the equation text would be white my recipients wont see anything. With text its esier as it has no color attached to it as its plain text.
Can you think of any workaround? I would appreciate all help.
I have texlive 2018 and its latex.exe fails because does not recognize DOS-style paths (e.g. C:\Users\LONGNA~1 instead of C:\Users\Longname )
Suggestion: make sure LatexIt expands file paths in long-name format
Also: allow command line parameters in Options executable file locations
I believe the title says it all ...
Inserted images don't survive copy/paste. Works on Linux.
Overall the addon works great. However, the Content-Type of the embedded PNG is set to text/xml
in the raw source of the generated email message, this should be image/png
. While the message displays fine in TB, this has the effect that the message does not render correctly in some other commonly used email clients. E.g. in Gmail just the "Alt" text is displayed and not the PNG with the equation, rendering the addon worthless. In Outlook Web App the image with the equation does display correctly, but the message contains another (inactive) link to the embedded file which looks like:
and is rather distracting.
At the moment the mime part headers look something like:
--------------E2593167560727C96D31FC01
Content-Type: text/xml; name="ljpgkndocjihjfbl."
Content-Transfer-Encoding: base64
Content-ID: <[email protected]>
Content-Disposition: inline; filename="ljpgkndocjihjfbl."
Changing to the following fixes it:
--------------E2593167560727C96D31FC01
Content-Type: image/png; name="ljpgkndocjihjfbl."
Content-Transfer-Encoding: base64
Content-ID: <[email protected]>
Content-Disposition: inline; filename="ljpgkndocjihjfbl."
I tried looking at the source but unfortunately do not know enough javascript to be able to provide a fix/pull request.
I'm using winXP SP3 and tb3.1.7 autodetect has worked fine. but I don't find the button to drag it into the toolbar. how can that happen?
If the LaTeXIt!
button is not added into the toolbar, LaTeXIt!
cannot be started.
I got the following error message. Using MacTex 2015 and TBird 38.3 with LatexIt 0.6.2 This is on MacOS 10.11 (OS X El Capitan)
*** Found expression
$E = mc^2$
LaTeX process returned 1
Proceeding anyway...
Severe error. Missing package?
We left the .tex file there: /Users/theo/Library/Caches/TemporaryItems/tblatex-1.tex, try to run latex on > it by yourself...
I tried cd'ing to the directory and ran the following command
n060h002:TemporaryItems theo$ /usr/local/texlive/2015/bin/x86_64-darwin/latex -output-directory=. -interaction=batchmode tblatex-1.tex
which worked and produced a new .dvi file just fine.
Hello,
I am having trouble using LatexIt on Fedora31. I followed the steps for solving the problem (Detailed troubleshooting) and googling I discovered that the error comes from the fact I should add the option -colorspace RGB in the Latex It! command ( https://superuser.com/questions/1291967/error-in-converting-a-pdf-to-a-png-in-imagemagick/1292291). So the command should be :
convert -units PixelsPerInch -density 300 /tmp/test.ps -trim -colorspace RGB /tmp/test.png (for the test for example).
However I do not know the structure of Thunderbird extensions and where is the command of Latex It in order to modify it. Can you help me please ?
Thank you in advance,
Steven
P-S : I already turn the rigths 'none' to 'read' in /etc/ImageMagick-6/policy.xml
I followed the instructions for a mac given on main page. When I latexit I get
*** Found expression
*** Generating LaTeX expression:
\documentclass{article}
\usepackage[utf8]{inputenc}
\pagestyle{empty}
\begin{document}
\end{document}
I ran /usr/local/bin/latex -output-directory=/Users/me/Library/Caches/TemporaryItems -interaction=batchmode /Users/me/Library/Caches/TemporaryItems/tblatex-1.tex error code 1
LaTeX process returned 1
Proceeding anyway...
Severe error. Missing package?
We left the .tex file there: /Users/me/Library/Caches/TemporaryItems/tblatex-1.tex, try to run latex on it by yourself...
--> Failed, not inserting
message, and in the terminal window I get:
/usr/local/bin/latex: unrecognized option -output-directory=/Users/me/Library/Caches/TemporaryItems' Try
/usr/local/bin/latex --help' for more information.
If I latex --help, there is no option named "-output-directory". Maybe this is the error?
Hey guys,
today i installed Latex It for Windows, but i still have s few problems.
As you can see in the attachments, the detection of the proper directories worked fine.
But when i try to create a formula, i get this error message:
LatexIt! run report...
*** Found expression
*** Generating LaTeX expression:
\documentclass{article}
\usepackage[utf8x]{inputenc}
\pagestyle{empty}
\begin{document}
\end{document}
I ran C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\latex.exe -output-directory=C:\Users\Dima\AppData\Local\Temp -interaction=batchmode C:\Users\Dima\AppData\Local\Temp\tblatex-1.tex error code 1
LaTeX process returned 1
Proceeding anyway...
Severe error. Missing package?
We left the .tex file there: C:\Users\Dima\AppData\Local\Temp\tblatex-1.tex, try to run latex on it by yourself...
--> Failed, not inserting
I tried to make a snapshot or the console, apparently there's a problem with an internbet connection, which sounds very strange to me.
Maybe you can help? Thanks a lot in advance!
DimDimTHX
Hi,
I just installed the extension (tried both with the one from this repository and the one from the Mozilla Site) but the extension's button in the Write Message window does not show up.
I have installed all of the required packages. I also ran tunderbird from the cli with the debug option enabled in this add-on's preference window, but there are no error messages. The paths to LaTeX, Convert & Co are correct.
Thunderbird --version: Thunderbird 52.5.0
tex --version: TeX 3.14159265 (TeX Live 2015/Debian)
Ubuntu 16.04.3 LTS
It's a really nice add-on, would love to have it working!
Best regards,
Kilian
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.