Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-01-2022, 09:49 AM   #46
salamanderjuice
Guru
salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.
 
Posts: 727
Karma: 10216666
Join Date: Jul 2017
Device: Boox Nova 2
Quote:
Originally Posted by Turtle91 View Post
I’ve only played with MathML a little bit…

How does it compare to the equivalent svg- as in file size???
Considerably smaller. Let's use the Taylor series expansion as an example.

In LaTeX this can be written as:
Code:
f(x)=\sum_{k=0}^\infty f^{(k)}(a)\frac{(x-a)^k}{k!}
This is 51 characters total. The MathML version is a little more verbose at 867 characters:
Code:
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mrow><mo stretchy="true" form="prefix">(</mo><mi>x</mi><mo stretchy="true" form="postfix">)</mo></mrow><mo>=</mo><munderover><mo>∑</mo><mrow><mi>k</mi><mo>=</mo><mn>0</mn></mrow><mo accent="false">∞</mo></munderover><msup><mi>f</mi><mrow><mo stretchy="true" form="prefix">(</mo><mi>k</mi><mo stretchy="true" form="postfix">)</mo></mrow></msup><mrow><mo stretchy="true" form="prefix">(</mo><mi>a</mi><mo stretchy="true" form="postfix">)</mo></mrow><mfrac><msup><mrow><mo stretchy="true" form="prefix">(</mo><mi>x</mi><mo>−</mo><mi>a</mi><mo stretchy="true" form="postfix">)</mo></mrow><mi>k</mi></msup><mrow><mi>k</mi><mi>!</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">f(x)=\sum_{k=0}^\infty f^{(k)}(a)\frac{(x-a)^k}{k!}</annotation></semantics></math><
But it's trying to be unambiguous. The SVG version is 28621 characters which I'm not going to put here.

Assuming 1 character is 1 byte which isn't quite accurate the LaTeX version 0.05KB, the MathML version is 0.85KB and the SVG version is 27.95KB. And the PNG version I made that's tolerable is 1.3KB.
salamanderjuice is offline   Reply With Quote
Old 03-01-2022, 10:19 AM   #47
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,131
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by salamanderjuice View Post
Considerably smaller. Let's use the Taylor series expansion as an example.

In LaTeX this can be written as:
Code:
f(x)=\sum_{k=0}^\infty f^{(k)}(a)\frac{(x-a)^k}{k!}
This is 51 characters total. The MathML version is a little more verbose at 867 characters:
Code:
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mrow><mo stretchy="true" form="prefix">(</mo><mi>x</mi><mo stretchy="true" form="postfix">)</mo></mrow><mo>=</mo><munderover><mo>∑</mo><mrow><mi>k</mi><mo>=</mo><mn>0</mn></mrow><mo accent="false">∞</mo></munderover><msup><mi>f</mi><mrow><mo stretchy="true" form="prefix">(</mo><mi>k</mi><mo stretchy="true" form="postfix">)</mo></mrow></msup><mrow><mo stretchy="true" form="prefix">(</mo><mi>a</mi><mo stretchy="true" form="postfix">)</mo></mrow><mfrac><msup><mrow><mo stretchy="true" form="prefix">(</mo><mi>x</mi><mo>−</mo><mi>a</mi><mo stretchy="true" form="postfix">)</mo></mrow><mi>k</mi></msup><mrow><mi>k</mi><mi>!</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">f(x)=\sum_{k=0}^\infty f^{(k)}(a)\frac{(x-a)^k}{k!}</annotation></semantics></math><
But it's trying to be unambiguous. The SVG version is 28621 characters which I'm not going to put here.

Assuming 1 character is 1 byte which isn't quite accurate the LaTeX version 0.05KB, the MathML version is 0.85KB and the SVG version is 27.95KB. And the PNG version I made that's tolerable is 1.3KB.
That is quite a bit of difference!!

Thanks for the info!
Turtle91 is offline   Reply With Quote
Advert
Old 03-04-2022, 11:26 AM   #48
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,114
Karma: 131686272
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The problem being that MathML is not as supported as SVG. So if you are unsure if you can get away with MathML, you'd have a better chance with SVG.
JSWolf is offline   Reply With Quote
Old 03-04-2022, 01:59 PM   #49
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,878
Karma: 5449552
Join Date: Nov 2009
Device: many
To be fair, the version of mathml you used includes a full copy of the latex equation in the annotations, and lots of attributes settings that are in fact default and not needed.

You can write that equation in mathml with 485 characters.
The nice thing is that with MathJax, you can automatically create the svg (or css and html) from the mathml on the fly so that only one form is needed (mathml) in the epub saving space.

Of course Mathjax will work with Latex input as well and happily convert that on the fly to svg or css and html too.

Unfortunately, the epub3 spec went with html5/mathml not the latex format, and of course only Firefox and Safari even include some native mathml support.

Chrome's Blink and therefore QtWebEngine decided to toss all of mathml instead relying on MathJax for support.

Because of Chrome's decision, mathml has faced huge adoption issues.

It has all become quite the mess.

Last edited by KevinH; 03-05-2022 at 01:02 PM.
KevinH is offline   Reply With Quote
Old 03-04-2022, 02:54 PM   #50
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by KevinH View Post
To be fair, the version of mathml you used includes a full copy of the latext equation in the annotations, and lots of attributes settings that are in fact default and not needed.

You can write that equation in mathml with 485 characters.
The nice thing is that with MathJax, you can automatically create the svg (or css and html) from the mathml on the fly so that only one form is needed (mathml) in the epub saving space.

Of course Mathjax will work with Latext input as well and happily convert that on the fly to svg or css and html too.

Unfortunately, the epub3 spec went with html5/mathml not the latex format, and of course only Firefox and Safari even include some native mathml support.

Chrome's Blink and therefore QtWebEngine decided to toss all of mathml instead relying on MathJax for support.

Because of Chrome's decision, mathml has faced huge adoption issues.

It has all become quite the mess.


Amen, brother. Nobody here has said it better.

Hitch
Hitch is offline   Reply With Quote
Advert
Old 03-05-2022, 05:51 AM   #51
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,114
Karma: 131686272
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Forgetting the larger size of SVG, would it be better for better comparability to use SVG instead of MathML?
JSWolf is offline   Reply With Quote
Old 03-05-2022, 07:38 AM   #52
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by JSWolf View Post
Forgetting the larger size of SVG, would it be better for better comparability to use SVG instead of MathML?
For pure ePUB, probably not.

If someone is going to KDP, though...neither is bueno.

Hitch
Hitch is offline   Reply With Quote
Old 03-05-2022, 03:10 PM   #53
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,114
Karma: 131686272
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Hitch View Post
For pure ePUB, probably not.

If someone is going to KDP, though...neither is bueno.

Hitch
I know the eBook would be a nightmare to have all the SVG and then all the fallback JPG for Mobi. IF only Amazon could allow you not to have Mobi if the eBook would not work well with Mobi.
JSWolf is offline   Reply With Quote
Old 03-05-2022, 04:08 PM   #54
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by JSWolf View Post
I know the eBook would be a nightmare to have all the SVG and then all the fallback JPG for Mobi. IF only Amazon could allow you not to have Mobi if the eBook would not work well with Mobi.
It is what it is. I don't love it, but honestly, Jon, to this day, just as myself, a consumer of books, devices, etc., I would still rather suffer with making an additional "book" for every job we do, than have the earlier Kindles, K2's K3s, KKeyboards, DXes, and all that, be abandoned as Apple does to its customers. Yes, I wish that Amazon had found a way to nuke old-MOBI. yes, I wish I didn't have to make that stuff. But dammit...

Yup, it's been nearly 11 years and I'm still livid over them screwing me over on my damned brand-new first-gen iPad, turning it into a $1600 brick pretty quickly. I'm not going to forget that, ever. I'm fortunate--I could afford it, and all that but I cannot imagine what someone would do who couldn't have afforded to address it some other way. (To this day, if I need any Apple product for testing, of any kind, I buy used directly from people who aren't paying Apple for anything. No refurbs, reconditioned, none of that. No ducats to Apple from me in any way I can manage. )

Hitch
Hitch is offline   Reply With Quote
Old 03-06-2022, 11:03 AM   #55
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,114
Karma: 131686272
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Hitch View Post
It is what it is. I don't love it, but honestly, Jon, to this day, just as myself, a consumer of books, devices, etc., I would still rather suffer with making an additional "book" for every job we do, than have the earlier Kindles, K2's K3s, KKeyboards, DXes, and all that, be abandoned as Apple does to its customers. Yes, I wish that Amazon had found a way to nuke old-MOBI. yes, I wish I didn't have to make that stuff. But dammit...
Thing is, I do think it's possible to fit KF8 into most of those old Readers and have a lot less people bothered by the demise of new Mobi eBooks. Sony was able to fit a version of RMSDK into the old PRS-500 and that was released before the Kindle.

Quote:
Yup, it's been nearly 11 years and I'm still livid over them screwing me over on my damned brand-new first-gen iPad, turning it into a $1600 brick pretty quickly. I'm not going to forget that, ever. I'm fortunate--I could afford it, and all that but I cannot imagine what someone would do who couldn't have afforded to address it some other way. (To this day, if I need any Apple product for testing, of any kind, I buy used directly from people who aren't paying Apple for anything. No refurbs, reconditioned, none of that. No ducats to Apple from me in any way I can manage. )

Hitch
It turns out that the original iPad was not fit for purpose. Not enough RAM for it to do much of anything. It was a total waste of money. Apple should have given all buyers a free upgrade to an iPad 2. These days, they are keeping some of the older hardware alive and not killing it off like they used to. The iPhone 6s is able to runt he current version of iOS and if Apple was killing off older hardware, the 6s would be dead now.
JSWolf is offline   Reply With Quote
Old 03-06-2022, 11:47 AM   #56
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by JSWolf View Post
Thing is, I do think it's possible to fit KF8 into most of those old Readers and have a lot less people bothered by the demise of new Mobi eBooks. Sony was able to fit a version of RMSDK into the old PRS-500 and that was released before the Kindle.



It turns out that the original iPad was not fit for purpose. Not enough RAM for it to do much of anything. It was a total waste of money. Apple should have given all buyers a free upgrade to an iPad 2. These days, they are keeping some of the older hardware alive and not killing it off like they used to. The iPhone 6s is able to runt he current version of iOS and if Apple was killing off older hardware, the 6s would be dead now.
I didn't expect them to offer me a free anything. What I did want was for them to continue to support the older OS so that apps could run for more than 5 minutes. THAT pissed me off.

Hitch
Hitch is offline   Reply With Quote
Old 03-06-2022, 12:00 PM   #57
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,114
Karma: 131686272
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Hitch View Post
I didn't expect them to offer me a free anything. What I did want was for them to continue to support the older OS so that apps could run for more than 5 minutes. THAT pissed me off.

Hitch
The original iPad was so bad that a lot of apps that were said to un on a version of iOS that it ran did not run properly.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does this happen to anyone else? Sydney's Mom Calibre 2 01-05-2014 05:03 AM
How often does this happen to you? kazbates Lounge 29 02-22-2010 11:51 AM
hello from happen Happen Introduce Yourself 15 08-28-2009 02:29 AM


All times are GMT -4. The time now is 08:13 AM.


MobileRead.com is a privately owned, operated and funded community.