MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   ePub (https://www.mobileread.com/forums/forumdisplay.php?f=179)
-   -   Mathematical Equations in epubs (https://www.mobileread.com/forums/showthread.php?t=220696)

verydeepwater 08-22-2013 02:56 PM

Mathematical Equations in epubs
 
If you have a technical book with many mathematical equations in word, what is the best way to convert the file into an epub. Should you save the word file as an earlier version to convert all the equations into images, or is there a way to bring the equations into the epub file as text by embedding a font?

WillAdams 08-22-2013 03:19 PM

The easiest thing is to not do math in Word:

http://people.umass.edu/klement/russell-imp.html

RbnJrg 08-22-2013 07:47 PM

Quote:

Originally Posted by verydeepwater (Post 2600881)
If you have a technical book with many mathematical equations in word, what is the best way to convert the file into an epub. Should you save the word file as an earlier version to convert all the equations into images, or is there a way to bring the equations into the epub file as text by embedding a font?

Save the word file (a .doc or .docx file) as filtered web page (of that way, the equations will be saved as images). After that, load the .html document generated by Word in Sigil, clean it a bit, and finally save it as epub.

Toxaris 08-23-2013 03:21 AM

If I have equations, I always convert them into a SVG via codecogs. That has the advantage that it can scale with the textsize with no loss to quality.

HarryT 08-23-2013 05:19 AM

Yes, SVG is the best solution, so it scales with the font.

RbnJrg 08-23-2013 06:27 PM

Quote:

Originally Posted by Toxaris (Post 2601360)
If I have equations, I always convert them into a SVG via codecogs. That has the advantage that it can scale with the textsize with no loss to quality.

Of course, svg images are optimal but the problem with this method is that the OP should write again all the equations (and after that, to re-embed them in the html file). If he were to start from zero, your advice is probably the most wise, but with the .doc file with the equations already written, I don't know if using the codecogs services if the better choice.

verydeepwater 08-24-2013 09:47 AM

Automatic Equations for Whole Pages
 
Quote:

Originally Posted by RbnJrg (Post 2602255)
Of course, svg images are optimal but the problem with this method is that the OP should write again all the equations (and after that, to re-embed them in the html file). If he were to start from zero, your advice is probably the most wise, but with the .doc file with the equations already written, I don't know if using the codecogs services if the better choice.

After receiving these replies I found a page below:
http://www.codecogs.com/latex/htmlequations.php

It says that by adding a script to the header section of each page and tagging the equations with lang="latex" the equations are included as scalable graphic which can be formatted with css. I tried it out for a page and it seemed to work, even when off-line.

Toxaris 08-24-2013 10:09 AM

But it will probably not work on a reader.

Jellby 08-24-2013 10:29 AM

For a webpage, you can use MathJax, but not for an ePub (at least not if you want it to be compliant and to work in ePub readers).

SBT 08-30-2013 07:49 AM

I'm working on the same problem.
I've coded the equations as LaTeX formulae out of force of habit. I'll probably retain the Latex for the pure ASCII version, use itex2MML to convert to MathML to futureproof it, and use pmml2svg to convert the MathML to SVG for an epub2 version.
I might also use dvisvg to convert the LaTeX directly to SVG.


All times are GMT -4. The time now is 10:31 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.