4 ms·
I believe MathML is still the only way to get proper math typesetting in epub, and I doubt katex is an option.
by simplotek 3y ago
I believe MathML is still the only way to get proper math typesetting in epub, and I doubt katex is an option.
- auggierose 3y agoUnfortunately MathML doesn't get you proper typesetting in epubs, so it has that in common with katex.
- Georgelemental 3y agoIt does if your EPUB reader supports it—which most don't, but a few do! I am partial to http://koreader.rocks/ http://koreader.rocks/
- auggierose 3y agoI have tried out a few readers, none I tried so far support it in satisfying quality comparable to what katex would deliver. Maybe koreader is an exception, but I doubt it. Will give it a try at some point.
- simplotek 3y ago> (...) comparable to what katex would deliver. You're comparing real world working implementations based on mathml with your hopeful expectations of how you wish katex could work in an epub implementation. It's good to have hopes and dreams and a positive outlook, but your perceived solution does not exist. It's hardly relevant to present it as a better alternative.
- auggierose 3y agoI have no need for real-world implementations that do not work as well as I need them to work. KaTeX is proof that math can be displayed properly in a browser-like environment. Anything less will not do it, at least for me. That's why I have exclusively PDFs in my digital library, except for books that are just text, like fiction. No hopes and dreams needed, just use PDF. But making epub work properly for math is not a problem in principle, just make katex work in an epub reader, problem solved. And people who are satisfied with substandard solutions are actually part of the problem, not the solution.
- Georgelemental 3y ago> just make katex work in an epub reader "Just write a full JavaScript and DOM implementation for your resource-constrained e-ink device"
- auggierose 3y agoI think you need that already if you want a compliant epub reader. Javascript is part of the epub standard.
- Georgelemental 3y agoAccording to the standard, it seems that basic MathML support is required for all conformant implementations (https://www.w3.org/publishing/epub32/epub-contentdocs.html#sec-xhtml-mathml-rs-conf https://www.w3.org/publishing/epub32/epub-contentdocs.html#s...), but scripting support is optional (https://www.w3.org/publishing/epub32/epub-contentdocs.html#sec-scripted-content-rs-reqs https://www.w3.org/publishing/epub32/epub-contentdocs.html#s...). Not that anyone actually follows the standard…
- iudqnolq 3y agoAnd that's one reason why the majority of ebooks purchased by consumers aren't in epub format.[1] For the vast majority of fiction a format constrained to bold, italicize, paragraph break, chapter heading, and chapter break allows a far superior user experience. [1] https://magnoliamedianetwork.com/ebook-publishing-platforms/ https://magnoliamedianetwork.com/ebook-publishing-platforms/
- goosedragons 3y agoJavaScript isn't a necessary component of ePub readers. Besides a handful of apps like Adobe Digital Editions and Apple iBooks, most don't. Kobo doesn't in their eReaders. JavaScript is only used in ePubs for multimedia crap. Fiction ePubs don't bother either. Kindle books generally start their life as ePubs that Amazon then converts to their formats before they list them. They don't even let you publish in mobi anymore. Kindle's lack of MathML support actually makes the user experience worse for everyone. Publishers often make 1 ePub they submit to multiple stores so rather than make a MathML version and a shitty image version for Kindle they just make a shitty image version and now you have a math textbook that's larger than the PDF would have been AND the equation text isn't resizable defeating the whole point of a reflowable ebook.
- Georgelemental 3y agoIf you need it to be pixel-perfect it will probably disappoint, yes. It's good enough for the few times I have made use of it. (It's also open-source, so you can always contribute improvements)
- auggierose 3y agoNever understood that need to contribute to open-source. Why would I try to meddle with somebody else's messed up implementation? I have enough messes of my own to clean up!
- hgsgm 3y agoTeam work makes the dream work.
- auggierose 3y agoMust be why Avenger movies are so popular.
- simplotek 3y ago> Team work makes the dream work. Except there is no team, and people dream differently. More often than not, open source creates problems for developers. See Rust's Actix framework.
- simplotek 3y ago> Unfortunately MathML doesn't get you proper typesetting in epubs (...) Wrong. MathML is a part of the Epub3 specification. All e-reader implementations that comply with the epub3 specs get you proper typesetting in books published in epub3 format.
- auggierose 3y agoI guess it is you that is living in a dream world. There are no epub3 compliant implementations then, because none of them display math properly. If they were compliant, they would also run KaTeX just fine, because Javascript and HTML are part of the standard, too.
- simplotek 3y ago> I guess it is you that is living in a dream world. There are no epub3 compliant implementations then, because none of them display math properly. To start off, you already have posts in this very discussion rejecting your misconception. Secondly, mathml works fine when we have an epub3 reader opening a epub3 doc created by epub3 generators from epub3+mathml input. If any of those requirements aren't met, you get issues. This happens with each and every single typesetting feature, not just mathml. Would you claim that epub fails to support tables if you open an epub doc with broken tables? Thirdly, a typical implementation shortcut taken by epub readers is to reuse whatever WebView they pick. If your epub reader uses an outdated or shitty WebView implementation, you get shitty epub docs. https://caniuse.com/?search=mathml https://caniuse.com/?search=mathml Why are you commenting on subjects you are clearly clueless about?
- deleted 3y ago[deleted]
- auggierose 3y agoI think I will indeed refrain from commenting in the future, as conversing with people as knowledgeable as you are is becoming a chore.
- mkl 3y agoKatex supports ahead-of-time server-side rendering which just generates HTML, so it may indeed be an option.