protz/LatexIt

Faulty vertical spacing

Closed this issue · 9 comments

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

Screenshot from 2020-10-01 09-29-51

sphh commented

Thanks for filing this issue.

A little background: The new version 0.7.x aligns the generated picture with the surrounding text (see #36) and I guess that's where it goes wrong. It uses the --depth option of dvipng (https://tug.org/texinfohtml/dvipng.html#index-depth-reporting).

To help tracking down the problem, it would be helpful to see the debug output of LatexIt. You can enable it in the add-ons settings page (☰ > Add-ons > Latex It!). Please tock both Generate a log report and Generate debug info and rerun LatexIt. This should show some info directly in the mail message you are editing. (Get rid of it by clicking on the x in the top right corner of the box containing the log.)

Maybe you can show a screenshot of the settings dialog as well?

Thanks for the quick reply! Directly in the mail message there wasn't much extra info (note that the second time I compile $x^2$ I don't get the bug):
Screenshot from 2020-10-01 10-35-08
The debugger window does show some errors:
Screenshot from 2020-10-01 10-35-36
Finally, here are the settings (I commented out the additional packages that I use):
Screenshot from 2020-10-01 10-35-59

For your information, here's what the terminal says after using Latex It:
Screenshot from 2020-10-01 10-41-11

sphh commented

Indeed, that run report does not report much at all …

In your Template can you please replace the line

\usepackage[utf8x]{inputenc}

with the two following lines:

\usepackage[utf8]{inputenc}
\usepackage[active,displaymath,textmath]{preview}

and try to re-run it.

I cannot spot any message related to LatexIt in Thunderbird's debugger window.

Amazing, that seems to solve it!

sphh commented

Well, it's not that amazing, since dvipng --depth requires the preview package. BTW you should now see your formulae nicely aligned with the surrounding text.

The template is automatically updated, if the user has not changed it (#58 (comment)).

Changing utf8x to utf8 is just reducing some dependencies on the Debian system (see #8), so had not a direct impact on your problem.

@protz: I guess, we might get more of this. Is it possible to issue a warning when updating the add-on?

sphh commented

The reason, why the second run in #63 (comment) "worked" is a result of bug #64.

sphh commented

Solved in PR #67.

sphh commented

The version 0.7.3 hit the Thunderbird add-on repository, so this can be closed.