Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-15-2010, 05:01 AM   #1
AprilHare
Wizard
AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.
 
AprilHare's Avatar
 
Posts: 2,981
Karma: 11862367
Join Date: Apr 2008
Device: Sony Reader PRS-T2
Mathematics/MathML in EPUB

Is anyone aware of a simple way to add mathematical formulae to EPUBs and expect them to be viewable on a liseuse, such as my firmware upgraded PRS-500?
I've been looking around at methods used in HTML:
1) MathML is popular in websites, but liseuses cannot handle it. And MathML is a pain to typeset by hand.
2) There are LaTeX to MathML CSS sheets available, which allows for easier-to-typeset LaTeX to be used however then you have the MathML display problem.
3) I know that Wikipedia supports mathematical script (looks very much like LaTeX) and the on-the-fly generated output is images/SVG. This would be better for EPUB. Something like that would be practical methinks.
4) You can use a dedicated program, make every single equation an image, then plug them manually into a EPUB. Very inconvenient.
Any ideas?
I was thinking along the lines of a 'MathML to image' processor which can take advantage of LaTeX to MathML somehow. Not sure if SVG is an option, anyone tested it?

Last edited by AprilHare; 02-15-2010 at 05:10 AM.
AprilHare is offline   Reply With Quote
Old 02-15-2010, 07:02 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
With the current state of affairs, I would go with the TeX -> image route, with a utility like tex2im. To make your life easier, you could include the TeX code in the HTML, either in an "alt" attribute or as a comment, and have a script automatically process all the needed formulas and generate the images. something like this:

HTML file:
Code:
<p>A nice identity:</p>
<img class="TeX" src="formula1.png" alt="e^{ix}=-1" />
and then have a script look for <img> elements with class="TeX", generate a temporary .tex file with the "alt" content, and run tex2im to create the file named in "src".

This script seems to use a similar idea.
Jellby is offline   Reply With Quote
Advert
Old 02-15-2010, 12:23 PM   #3
KNotTed
Member
KNotTed is on a distinguished road
 
Posts: 19
Karma: 62
Join Date: Feb 2010
Device: PRS-505, PRS-600
There's also some information at http://svgkit.sourceforge.net/SVGLaTeX.html on converting LaTeX to SVG.
KNotTed is offline   Reply With Quote
Old 02-15-2010, 06:59 PM   #4
pietvo
Reader
pietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notes
 
pietvo's Avatar
 
Posts: 520
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
You can also use pdflatex to convert the equations to PDF and then use pdf2svg to convert them to SVG. Or do it interactively with inkscape.

I am not sure, however, if all ereaders supporting ePub will do SVG properly.
pietvo is offline   Reply With Quote
Old 02-15-2010, 10:48 PM   #5
AprilHare
Wizard
AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.
 
AprilHare's Avatar
 
Posts: 2,981
Karma: 11862367
Join Date: Apr 2008
Device: Sony Reader PRS-T2
Quote:
Originally Posted by pietvo View Post
You can also use pdflatex to convert the equations to PDF and then use pdf2svg to convert them to SVG. Or do it interactively with inkscape.

I am not sure, however, if all ereaders supporting ePub will do SVG properly.
Since these documents are for me, I need it to work with Sony Reader ePub implementation - or bust.
AprilHare is offline   Reply With Quote
Advert
Old 02-15-2010, 11:28 PM   #6
Peter Sorotokin
speaking for myself
Peter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it is
 
Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
Quote:
Originally Posted by AprilHare View Post
Since these documents are for me, I need it to work with Sony Reader ePub implementation - or bust.
Sony Reader does SVG sufficiently well for math formulas.
Peter Sorotokin is offline   Reply With Quote
Old 02-16-2010, 03:54 AM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
You could also try a direct MathML to SVG converter, like this.
Jellby is offline   Reply With Quote
Old 02-16-2010, 01:57 PM   #8
bobcdy
Fanatic
bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.
 
bobcdy's Avatar
 
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
math equations

Click image for larger version

Name:	mathequation.png
Views:	778
Size:	4.0 KB
ID:	45713Another way is to use Word with Mathtype, create the equation, and then do a screen copy with Belltech CaptureXT Screen Capture. I've attached an image (I hope it works, this is the first such attachment I've tried)
bobcdy is offline   Reply With Quote
Old 02-17-2010, 01:30 AM   #9
rmm200
Groupie
rmm200 has a complete set of Star Wars action figures.rmm200 has a complete set of Star Wars action figures.rmm200 has a complete set of Star Wars action figures.rmm200 has a complete set of Star Wars action figures.rmm200 has a complete set of Star Wars action figures.
 
Posts: 195
Karma: 414
Join Date: Jan 2010
Location: Bend, OR
Device: Sony PRS-600
Never is a long time - but I would say we will never get fonts that support math operations like this. Latex does a great job at it - and the people that need to create formulas probably already know it. Maybe what we need is a good Latex to HTML converter, which plugs the formulas in as SVG.

Robert
rmm200 is offline   Reply With Quote
Old 02-17-2010, 08:03 AM   #10
WillAdams
Wizard
WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.
 
WillAdams's Avatar
 
Posts: 1,258
Karma: 3439432
Join Date: Feb 2008
Device: Amazon Kindle Paperwhite (300ppi), Samsung Galaxy Book 12
The fonts are coming:

http://www.stixfonts.com/

William
WillAdams is offline   Reply With Quote
Old 02-17-2010, 12:54 PM   #11
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Quote:
Originally Posted by WillAdams View Post
The fonts are coming:

http://www.stixfonts.com/

William
At first, looking at this made me rather excited, until I saw that the glyphs are based on Times. I am so monumentally disappointed now that I want to cry. I am so sick of Times, and this thing has the danger of spreading over the sciences and other technical disciplines like the plague. Wouldn't it have been better to pick something that does better on low resolution screens anyway? Has anyone seen what Times looks like at low resolution recently?

But here's another question: do those ePub renderers that don't support SVG images do OK with a .PNG fallback? And if so, can anyone point me to the proper HTML snippet to use?
frabjous is offline   Reply With Quote
Old 02-17-2010, 01:18 PM   #12
WillAdams
Wizard
WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.WillAdams ought to be getting tired of karma fortunes by now.
 
WillAdams's Avatar
 
Posts: 1,258
Karma: 3439432
Join Date: Feb 2008
Device: Amazon Kindle Paperwhite (300ppi), Samsung Galaxy Book 12
Well then you can use Calibria, Cambria, Candara, Constantia, &c.

Resolution shouldn't be an issue much longer as display density gets higher and operating systems finally become resolution independent.

William
WillAdams is offline   Reply With Quote
Old 02-17-2010, 01:50 PM   #13
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Quote:
Originally Posted by WillAdams View Post
Well then you can use Calibria, Cambria, Candara, Constantia, &c.
Ugh. No. (1) those are owned by the despised Microsoft, if I'm not mistaken, and (2) they are not available for LaTeX.

Asana Math is promising. In the meantime, I'll probably just stick with my old standbys like the mathdesign fonts (URW Garamond, Bitstream Charter, Adobe Utopia), kp-fonts, and URW Palladio.
frabjous is offline   Reply With Quote
Old 02-19-2010, 06:29 PM   #14
PaulTopping
Junior Member
PaulTopping began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2010
Device: none
You guys may be interested in the Ebooks for Math and Science group on LinkedIn: http://www.linkedin.com/groups?gid=1945452 (I am the group owner). Also, MathJax (http://www.mathjax.org) may also be of interest. If an ebook reader can do JavaScript, it can be used to render both TeX and MathML.
PaulTopping is offline   Reply With Quote
Old 02-20-2010, 05:14 AM   #15
AprilHare
Wizard
AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.
 
AprilHare's Avatar
 
Posts: 2,981
Karma: 11862367
Join Date: Apr 2008
Device: Sony Reader PRS-T2
The beta STIX fonts seem good but unsure if licence would prevent redistribution.
I'd be interested in a howto for producing a working epub for Sony Reader with maths.

Last edited by AprilHare; 02-20-2010 at 05:16 AM. Reason: less than unique thought :)
AprilHare is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mathematics e-Book links TadW Deals and Resources (No Self-Promotion or Affiliate Links) 4 09-08-2010 05:05 PM
EPUB Math: Best Practices for Mathematics in Ebooks Adjust News 0 08-23-2010 10:17 PM
Epub Revision - mathematics support Nate the great ePub 23 04-14-2010 01:16 PM
Other Non-Fiction Hampson, P.: The Romance of Mathematics , v1 30 Aug 2008 Madam Broshkina BBeB/LRF Books 1 08-30-2008 01:58 PM
Other Non-Fiction Dudeney, Henry Ernest: Amusements in Mathematics (Illustrated). v1. 26 June 2008 nrapallo Kindle Books 0 06-26-2008 10:47 AM


All times are GMT -4. The time now is 06:58 PM.


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