alexadam / save-as-ebook

Save a web page/selection as an eBook (.epub format) - a Chrome/Firefox/Opera Web Extension
MIT License
1.1k stars 70 forks source link

Latex formulas are huge #26

Closed user135711 closed 4 years ago

user135711 commented 6 years ago

Latex formulas result in giant height and width images in the output epub. (For instance try to convert this equation). When I convert with dotepub they are slightly large but better.

alexadam commented 6 years ago

I just did a release with a fix for this. Can you, please, give it a try an let me know if it works? Thanks

user135711 commented 6 years ago

Certainly!

On Thu, Jul 19, 2018, 8:33 AM Alex Adam notifications@github.com wrote:

I just did a release with a fix for this. Can you, please, give it a try an let me know if it works? Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alexadam/save-as-ebook/issues/26#issuecomment-406319159, or mute the thread https://github.com/notifications/unsubscribe-auth/Aedf5jlBJ-t4tJ_kq6MMjMV3u1rcVmsSks5uIKbRgaJpZM4VGY0A .

user135711 commented 6 years ago

It's better, if the comparison file that i have from last week is from your extension and not one of the others I tried. image

It still looks big in Calibre. I have tried several epub readers to determine whether the problem is with save as ebook or the reader and I have found that only calibre actually displays the latex equations. After trying 5 or 6 windows epub readers, they display ascii versions or a blank space. Calibre on the other hand seems to convert epub format to a website so that the original mathjax appears to be rendering and then output as an image like on wikipedia. I estimate if you scale it down to 75% it will be right, but I don't know if that will adjust the line wraps so the equation fills the line before being rendered into and svg.

Here's the relative size when the font is decreased in calibre (just tweak the eqations maybe a bit smaller) Personally I like the effect of bigger equations in the epubs as it's easier to read: image

bunglegrind commented 6 years ago

I will give a try today or tomorrow, on my kobo aura one with koreader.

bunglegrind commented 6 years ago

Let's begin. Latex sample page:

https://www.tuhh.de/MathJax/test/sample-tex.html

Both in calibre and koreader all formulas are converted to null.

user135711 commented 6 years ago

FYI, all the epub plugins I tested(dotEpub, EpubPress) seem to have the same bug(rendered null or ascii) on that example.

bunglegrind commented 4 years ago

Let's begin. Latex sample page:

https://www.tuhh.de/MathJax/test/sample-tex.html

Both in calibre and koreader all formulas are converted to null.

Yep, now it's working (at least in the sample page). I'll try in a more challenging page. Thanks!