Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline math in Gmail is higher than the main text #247

Open
5nizza opened this issue Feb 10, 2015 · 4 comments
Open

Inline math in Gmail is higher than the main text #247

5nizza opened this issue Feb 10, 2015 · 4 comments

Comments

@5nizza
Copy link

5nizza commented Feb 10, 2015

Not a bug but rather "unprettiness".
The inline formulas are somewhat incontinently placed with the text:
firefox

chrome

In this sense, TeX for Gmail is an example how i would like it to be:
chrome-tex

And... thank you for the awesome extension!

@adam-p adam-p added this to the Next release milestone Mar 10, 2015
@adam-p
Copy link
Owner

adam-p commented Mar 10, 2015

I'm going to switch TeX renderers in the next release, and I'll make sure to fix this.

The workaround, which is going to be very similar to the fix, is to add this to your "Primary Styling CSS" in the MDH Options:

img {
  vertical-align: bottom;
}

You can play around with other styles, but note some styles will get stripped by Gmail (etc.). For example, I tried using a negative bottom margin, and it looks great when composing, but it gets stripped when sending.

Note to self: There might be a better way of doing this in the renderer rather than in CSS.

@adam-p
Copy link
Owner

adam-p commented Mar 21, 2015

Changing the TeX renderer from GCharts to CodeCogs is proving to be problematic (see #261 and the bottom of #144), so that's not going to happen in the next release.

I'm hesitant to release a default CSS change before then, though, since MDH is pretty crap at dealing with such changes (#48, #78). I don't want to make style changes now that may be problematic later on.

Also note that any style fix is going to be a double-edged sword. For example...

Here's with the default vertical-align (which is baseline):
image

X is good, j and your formula are too high.

Here's with vertical-align: bottom:
image

X is too low, j is good, your formula is too high.

Here is with vertical-align: middle:
image

I think I prefer that one, but it's really not great either: X is even lower, j is a bit low, your formula is sort of low as well.

Switching to CodeCogs might help because it provides pixel information about the image baseline. It's going to be complicated to utilize that info, though. (And we're having other issues with their image sizes being all over the place.)

I'll leave this issue open, as it's largely independent.

@adam-p adam-p removed this from the Next release milestone Mar 21, 2015
@andyspiros
Copy link

Hi. Any news on this?
The simple fix "vertical-align: middle" works beautifully for me, but I totally see your point of any simple change making some cases worse.

I will be willing to give a helping hand with this, since this plugin is really helping me a lot. I just wanted to ask beforehand whether there are any developments not listed in this two-years-old thread.

@Miguel-OYeah
Copy link

Same here

Hi. Any news on this?
The simple fix "vertical-align: middle" works beautifully for me, but I totally see your point of any simple change making some cases worse.

I will be willing to give a helping hand with this, since this plugin is really helping me a lot. I just wanted to ask beforehand whether there are any developments not listed in this two-years-old thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants