Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 07-29-2014, 07:20 PM   #16
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
Dr. Don Knuth wrote T[sub]E[/sub]X because printers mangled his Math books

I am not sure that T[sub]E[/sub]X is a good source option? I will let experts step up

I do remember reading that Calibre had some support for Math Jax https://www.mobileread.com/forums/sho...65&postcount=1
Comparison of TeX editors

I've used TeXstudio a little, from it I created PDF's. I haven't tried to convert the PDF's, there are too many tables, infographics etc.

I think member Tex2002ans also has some experience with LaTeX.

BR
BetterRed is offline   Reply With Quote
Old 07-29-2014, 11:09 PM   #17
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by BetterRed View Post
Comparison of TeX editors

I've used TeXstudio a little, from it I created PDF's. I haven't tried to convert the PDF's, there are too many tables, infographics etc.

I think member Tex2002ans also has some experience with LaTeX.

BR
The last time I used TeX it ran under TOPS20 on a DEC 2060. Needles to say a lot of years ago
theducks is offline   Reply With Quote
Advert
Old 07-30-2014, 07:59 AM   #18
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,234
Karma: 3350652
Join Date: Feb 2008
Device: Amazon Kindle Paperwhite (300ppi), Samsung Galaxy Book 12
Using Plain TeX is not really recommended for the typical user, esp. if one needs to interchange w/ others, or make use of pre-made code / formats.

LaTeX is the most prevalent TeX macro package, and well-suited for most users who need math. Read over _The not so Short Introduction to LaTeX_ to get a feel for using it directly: http://www.ctan.org/tex-archive/info/lshort/english/

Alternately, there's a very good graphical front-end, LyX: http://www.lyx.org/ which has had some work done recently on making it round-trip w/ Word --- might be you could import the files into it and then export them from that.

Last edited by WillAdams; 07-30-2014 at 10:09 AM.
WillAdams is offline   Reply With Quote
Old 07-30-2014, 12:25 PM   #19
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
@elearner --

On my Kindle's Font's menu, there is a [Publisher Font] option that is available IF there are embedded fonts in the document.

The Nook might be the same.
phossler is offline   Reply With Quote
Old 08-13-2014, 01:51 AM   #20
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by BetterRed View Post
I think member Tex2002ans also has some experience with LaTeX.
Heh, I just stumbled upon this topic while I was searching for some comparison images of me showing off LaTeX. Thanks for mentioning my name, I never venture into this section of MobileRead!

Side Note: This was the post I was looking for! https://www.mobileread.com/forums/sho...6&postcount=58

Front (LaTeX/Formula) Matter

I wouldn't say I am fantastic at LaTeX, but I have been dabbling enough to create some pretty dang good fiction PDFs + (decent) non-fiction. I still have a lot of tweaks to iron out though... so I wouldn't call any of the PDF stuff I work on production ready.

When I first started, I used LyX, which seems to be an ok introduction. I didn't find it any harder than fiddling around/learning with Sigil. I then read The Not so Short Introduction to LaTeX. (Now I just would type everything directly in LaTeX. The GUI stuff felt too limiting.).

Another fantastic resource is the TeX Stack Exchange: https://tex.stackexchange.com/

and the LaTeX Wiki: https://en.wikibooks.org/wiki/LaTeX/

And let me give credit where credit is due. It was user Jellby who got me interested in this LaTeX stuff, and pointed me to lots of resources.

Getting nice formulas into EPUBs is definitely the area where I am quite interested in. I mean, I wrote a Formula -> PNG tutorial: https://www.mobileread.com/forums/sho...d.php?t=223254

Plus I typed out a few tiny posts tomes discussing OCRing math books: https://www.mobileread.com/forums/sho...d.php?t=228413

I recently just digitized ~81 more equations using LaTeX using the CodeCogs site that Toxaris mentioned in my Tutorial. I was able to use CodeCogs to recreate the formula in LaTeX, and then export as a PDF. I was then able to feed it into a .bat file to process all of the formulas using Imagemagick. (See attached ZIP file for the images, and further down in the post for a few samples).

I still have to iron out the workflow, and will probably tack all that info into my Tutorial. Perhaps as a more "Advanced" method.

Meat and Potatoes

Anyway, the way I see it, there are 2 different versions of formulas:
  • Simple
    • Can be reduced to basic math
    • Keep this in HTML (?)
    • 2 + 2 = 4
    • y = mx + b
    • dx/dy = 5^(2/3)z + (5x)/3
  • Complex
    • Can't be replicated easily using basic math symbols + parenthesis.
    • Integrals/Summations
    • Complex equations in large fractions
    • Large Square Roots
    • Fractions over fractions
    • Complex math symbols
      • x hat
      • x with arrow above
      • x with dot above
      • Symbols with a superscript + subscript at the same time
    • Large + Small Parenthesis/Brackets
    • ...

Simple

You should be able to keep those as normal HTML. This will allow it to scale up/follow with the user's settings. This also allows them to be easily searchable/copy/pastable.

I would just do something along these lines:

Code:
<div class="formula">
<p class="math"><span class="math">∂[U(φ).V(x)] → U(φ). ∂V(x),</span></p>
</div>
Embed a font, and in the CSS, just do something along these lines:

Code:
div.formula {
	margin-top: 1em;
	margin-bottom: 1em;
	page-break: avoid;
	text-indent: 0;
	text-align: center;
}

p.math {
	text-indent: 0;
	text-align: center;
}

span.math {
	font-family: 'CharisSIL', serif;
}
Many people here on MobileRead use a font called CharisSIL: http://scripts.sil.org/cms/scripts/p...=charissilfont

Then you can subset the font using Calibre, which will try to minimize the size it adds to the EPUB. And if you use <span class="math"> sparingly, it shouldn't effect the look of the rest of your document.

Side Note: You may also want to use <span class="math"> in any inline equations as well.

I also do something quite similar with a lot of the more obscure Greek accented words:

Quote:
<p><a href="#ft6" id="fn6">[6]</a> The English <i>money</i>, the Spanish <i>moneda</i>, the Portuguese <i>moeda</i>, the French <i>monnaie</i>, the Hebrew <i>maoth</i>, the Arabic <i>fulus</i>, the Greek <span class="greek" xml:lang="grc">νόμισμα</span>, &amp;c.</p>
Or there was one book where I had the author's names in their original Chinese. I had to embed a font including the Chinese characters so it would display on ereaders.

Complex

There is no other way to handle these that would work across all devices besides an image of the formula (PNG or GIF). In this case, I would go for consistency, and just convert ALL formulas to images. It looks a little odd if you would have Complex formulas as images, while the Simple ones were normal HTML. Although that is a decision left up to you.

Side Note: Ok I lied, maybe not ALL formulas. Those formulas that are in the normal flow of the text, I would try to keep/reduce those to their "Simple" equivalents. Inline PNGs/GIFs of formulas are HORRIBLE, and really mess with the flow of the document.

I attached a ZIP file of 81 formulas at 350dpi I just generated using LaTeX (using the CodeCogs GUI) + Imagemagick.

The same sort of thing can be accomplished using my Tutorial.... although I am now seeing the superiority of LaTeX in this case, because I can shove LaTeX right in the alt attribute.

This makes it super easy for me to plop it back into LaTeX, do any corrections, and generate a new formula if needed. Or in the future, quickly converting the image into a more PROPER formula (SVG, MathML, straight LaTeX), or being able to easily update math fonts/kerning/typography at the flip of a switch.

This is what I settled on, with the LaTeX used to get the formula in RED:

Quote:
<div class="formula">
<div class="image"><img alt="\frac{\displaystyle\frac{\text{widgets} / \text{elapsed-time}}{[\text{widgets} \times (\text{elapsed-time})^{(\alpha-1)}] \cdot [\text{labor-hours} / \text{elapsed-time}]^\phi}}{[\text{labor-hours}]^{\alpha\theta} \cdot [\text{labor-effort}]^{\alpha(1-\theta)}}" src="../Images/QJAE8.4.4-pg055-Formula3a.png" /></div>
</div>
Click image for larger version

Name:	QJAE8.4.4-pg055-Formula3a.png
Views:	288
Size:	11.6 KB
ID:	126771

Quote:
<div class="formula">
<div class="image"><img alt="I = \frac{C}{1+i}\frac{1}{\left(1-\frac{1-a}{1+i}\right)} = \frac{C}{i+a}" src="../Images/QJAE10.3.1-pg200-2.png" /></div>
</div>
Click image for larger version

Name:	QJAE10.3.1-pg200-2.png
Views:	293
Size:	2.4 KB
ID:	126772

Quote:
<div class="formula">
<div class="image"><img alt="\forall n \geq 2,i_n = \frac{I_{\text{KG}(n-1)}-I_n}{I_n} = \frac{(1-a)I_{n-1}}{I_n} = i" src="../Images/QJAE10.3.1-pg203-3.png" /></div>
</div>
Click image for larger version

Name:	QJAE10.3.1-pg203-3.png
Views:	287
Size:	3.9 KB
ID:	126773

Quote:
<div class="formula">
<div class="image"><img alt="\pi_t^a = \gamma\pi_{t-1} + (1-\gamma)\pi_{t-1}^{a}" src="../Images/QJAE11.2.2-pg102-Formula10.png" /></div>
</div>
Click image for larger version

Name:	QJAE11.2.2-pg102-Formula10.png
Views:	303
Size:	2.2 KB
ID:	126774

Quote:
Originally Posted by phossler View Post
On my Kindle's Font's menu, there is a [Publisher Font] option that is available IF there are embedded fonts in the document.

The Nook might be the same.
Kindles probably support more obscure/unicode characters than the Nook... in my testing, Nook typically sticks with ASCII + a very small subset of accented chars. WHY these devices don't have at least a few fonts which cover much more of the Unicode spectrum makes zero sense to me.

Probably memory restrictions.

So my recommendation would be:
  • Images (PNG or GIF)
    • Pro: Maximum Compatability
    • Pro: Will have fancy typography
    • Pro: Will display the formulas as you want them
    • Pro: Even works on the ancient Kindles
    • Con: Time Consuming to type in the equations
    • Con: Not Searchable/Scalable/Copy/Pastable
    • Con: Since the images are bitmap, they don't scale Up/Down well
    • Con: Doesn't follow user preferences
    • Con: Can bloat the filesize.
    • Con: In the future, the higher the DPI devices get, the smaller/worse these images will appear.
  • HTML + Embedded font
    • Pro: Should work pretty well across devices
      • Most of the books I work on have "Simple" equations, so I lean towards preferring HTML, even if it is not very typographically beautiful.
    • Pro: Smaller effect on filesize
    • Con: Depending on how complex, your equations might look hideous, or become quite hard to understand (because of mutli-layered parenthesis)
    • Con: Even if you DO embed a font, sometimes those devices default to Publisher Font OFF.
      • There is not much you can do about this besides hoping your readers are informed on how to use their device. (Maybe mentioning something about turning Publisher Fonts ON in the beginning of the book, and hope the reader listens).
  • Just keep it as HTML, no embedded font
    • Hope for the best, and people would be reading on a device with the characters in their font

In the future, MathML seems like it would be a decent choice, although it won't be a good choice until long into the future.... because barely any reading devices support it. (You have to know your customers, and who this book will be geared towards. If you knew everyone would read it in Calibre, AZARDI, iBooks (?) then MathML would probably be a great choice, although if everyone will be reading it on Kindles, Nooks, Kobos, etc. etc. MathML is a non-choice.).

SVG would also be able to generate crisper/cleaner formulas than PNG/GIF, and would DEFINITELY be superior to the HTML versions. Although SVG support on devices isn't the greatest either, and you STILL have to do all the work to generate a PNG/GIF fallback.

We hashed out a lot of SVG + inline SVG stuff in this topic: https://www.mobileread.com/forums/sho...d.php?t=222825

Quote:
Originally Posted by elearner View Post
Also, not sure what publisher font is. The Word document is an original document wrtten on Word.

But I guess what you are saying it that you wouldn't start from here! However, this is a 120 page document (written by my partner) which we would like to turn into an e-book. There are a large number of cross-references, it would be very difficult to start all over again.
My advice if you are going to be writing scientific literature? Abandon Word ASAP. The sooner you get out of it and into LaTeX, the better. You will save yourself MANY headaches.

"So many cross-references [...] difficult to start all over again"? Sounds to me like you are causing your own Word headaches already!



Can you do this in Word? (See topic, your head will EXPLODE): https://tex.stackexchange.com/questi...tures-show-off

Edit: Also, I had trouble Copying/Pasting equations out of your Word DOC. The symbols were completely mangled. I saved your DOC file in Word, and exported to HTML, and saw this HORROR as the first equation (the rest are equally as abysmal):

Spoiler:
Quote:
<p class=MsoNormal style='margin-left:1.5in;text-indent:.5in'><span lang=EN-GB
style='font-family:Symbol;mso-ascii-font-family:"Times New Roman";mso-fareast-font-family:
"Arial Unicode MS";mso-hansi-font-family:"Times New Roman";color:black;
mso-ansi-language:EN-GB;mso-char-type:symbol;mso-symbol-font-family:Symbol'><span
style='mso-char-type:symbol;mso-symbol-font-family:Symbol'>¶</span>
</span><span
lang=EN-GB style='mso-fareast-font-family:"Arial Unicode MS";color:black;
mso-ansi-language:EN-GB'>[<span class=GramE>U(</span></span><span lang=EN-GB
style='font-family:Symbol;mso-ascii-font-family:"Times New Roman";mso-fareast-font-family:
"Arial Unicode MS";mso-hansi-font-family:"Times New Roman";color:black;
mso-ansi-language:EN-GB;mso-char-type:symbol;mso-symbol-font-family:Symbol'><span
style='mso-char-type:symbol;mso-symbol-font-family:Symbol'>j</span></span><span
lang=EN-GB style='mso-fareast-font-family:"Arial Unicode MS";color:black;
mso-ansi-language:EN-GB'>).V(x)] </span><span lang=EN-GB style='font-family:
Symbol;mso-ascii-font-family:"Times New Roman";mso-fareast-font-family:"Arial Unicode MS";
mso-hansi-font-family:"Times New Roman";color:black;mso-ansi-language:EN-GB;
mso-char-type:symbol;mso-symbol-font-family:Symbol'><span style='mso-char-type:
symbol;mso-symbol-font-family:Symbol'>®</span></span><span lang=EN-GB
style='mso-fareast-font-family:"Arial Unicode MS";color:black;mso-ansi-language:
EN-GB'> <span class=GramE>U(</span></span><span lang=EN-GB style='font-family:
Symbol;mso-ascii-font-family:"Times New Roman";mso-fareast-font-family:"Arial Unicode MS";
mso-hansi-font-family:"Times New Roman";color:black;mso-ansi-language:EN-GB;
mso-char-type:symbol;mso-symbol-font-family:Symbol'><span style='mso-char-type:
symbol;mso-symbol-font-family:Symbol'>j</span></span><span lang=EN-GB
style='mso-fareast-font-family:"Arial Unicode MS";color:black;mso-ansi-language:
EN-GB'>). </span><span lang=EN-GB style='font-family:Symbol;mso-ascii-font-family:
"Times New Roman";mso-fareast-font-family:"Arial Unicode MS";mso-hansi-font-family:
"Times New Roman";color:black;mso-ansi-language:EN-GB;mso-char-type:symbol;
mso-symbol-font-family:Symbol'><span style='mso-char-type:symbol;mso-symbol-font-family:
Symbol'>¶</span>
</span><span lang=EN-GB style='mso-fareast-font-family:"Arial Unicode MS";
color:black;mso-ansi-language:EN-GB'>V(x),<o></o></span></p>


You can see in RED that the pilcrow '¶' was overwritten to display as a partial derivative '∂'. (The rest of the symbols were just as bad).

This horror should be a much closer to what I posted above (I manually recreated this):

Quote:
<p class="math"><span class="math">∂[U(φ).V(x)] → U(φ). ∂V(x),</span></p>
If you are still going to be using Word, I would recommend learning how to use Styles to create cleaner documents.

ALSO, I would avoid using whatever you used to insert Symbols. As you can see above, it seems as if Microsoft Word inserted them as a dreaded "Symbols" font (seems to only work in Microsoft Word and IE?). It looks to me like it is overriding the letters "a-z" + "A-Z" with the lower/uppercase Greek symbols. Instead, you would want the PROPER unicode character.

This is also just going to cause tons of headaches for you when trying to move this document ANYWHERE besides Word. (Like me trying to copy/paste info into the forums, or convert to EPUB).
Attached Files
File Type: zip Tex QJAE Formulas[08.13.2014].zip (337.9 KB, 215 views)

Last edited by Tex2002ans; 08-13-2014 at 06:46 AM.
Tex2002ans is offline   Reply With Quote
Advert
Old 08-13-2014, 02:07 PM   #21
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
What you can also do, is wait for the next version of my Word add-in (about two weeks). It will convert formula's like you used. I will convert the characters used from the symbol font to their unicode equivalents.
Toxaris is offline   Reply With Quote
Old 08-13-2014, 03:07 PM   #22
SBT
Fanatic
SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.
 
SBT's Avatar
 
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
I've managed to create most of the complex equation types mentioned by Tex2002ans. I have to use a custom font so I can be reasonably certain that font metrics are consistent, but then I've created reasonably decent fractions, integrals, combined sub/superscripts etc.
SBT is offline   Reply With Quote
Old 08-13-2014, 03:53 PM   #23
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Toxaris View Post
What you can also do, is wait for the next version of my Word add-in (about two weeks). It will convert formula's like you used. I will convert the characters used from the symbol font to their unicode equivalents.


Quote:
Originally Posted by SBT View Post
I've managed to create most of the complex equation types mentioned by Tex2002ans. I have to use a custom font so I can be reasonably certain that font metrics are consistent, but then I've created reasonably decent fractions, integrals, combined sub/superscripts etc.
Have examples? I would love to see! Always interested in how to make equations look better in EPUB.
Tex2002ans is offline   Reply With Quote
Old 08-14-2014, 10:25 AM   #24
SBT
Fanatic
SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.
 
SBT's Avatar
 
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
Quote:
Originally Posted by Tex2002ans View Post
Have examples? I would love to see! Always interested in how to make equations look better in EPUB.


CSS written with little premeditation, but I believe it displays OK in ADE despite not being strictly EPUB2 conformant, I think (inline-block isn't in the spec, is it?)

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<style>
div {
display:inline;
border-width:1px;
}
div.index,div.frac {
display:inline-block;
}
div.index {
vertical-align:-10%;
margin-left:-0.2em;
}
div.sup, div.sub, div.denominator, div.numerator {
display:block;
}
div.denominator, div.numerator {
text-align:center;
}
div.sup, div.sub {
text-align:left;
font-size:0.5em;
}
div.numerator {
border-bottom-style:solid;
}
div.surd {
margin-right:-0.2em;
vertical-align:10%
}
div.bigsurd {
margin-right:-0.15em;
font-size:2.3em;
vertical-align:-20%;
}
div.surdkernel {
padding:0 0.2em;
margin-top:0.3em;
display:inline-block;
border-top-style:solid;
}
div.bigsurd+div.surdkernel {
vertical-align:-49%;
}
</style>
</head>
<body>
<div class="math">
x =
<div class="bigsurd">√</div>
<div class="surdkernel">
	<div class="frac">
		<div class="numerator">π </div>
		<div class="denominator">x
			<div class="index">
				<div class="sup">n</div>
				<div class="sub">i+1</div>
			</div>
		</div>
	</div>
</div>
</div>
</body>
</html>
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2014-08-14 16:15:49.png
Views:	653
Size:	6.6 KB
ID:	126826  
SBT is offline   Reply With Quote
Old 08-15-2014, 04:02 AM   #25
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Quote:
Originally Posted by elearner View Post
But they don't appear on Digital Editions even though that is on my PC?
I take that, because of a maybe missing information.

ADE behavior is different to programs like Word or calibre. These programs will use (if needed) all installed fonts they can find in your OS. ADE displays only a fonts-/character set what is compatible to Adobe RMSDK.

This is why a lot people use ADE for a final EPUB-test. An EPUB what will render correctly in ADE will work for most of e-book reader hardware.

If you want to find out what fonts and character set ADE use, this is maybe a good point to look at:
c:\Program Files (x86)\Adobe\Adobe Digital Editions 2.0\resources\fonts\
c:\Program Files (x86)\Adobe\Adobe Digital Editions 3.0\resources\fonts\
Divingduck is offline   Reply With Quote
Old 08-15-2014, 04:50 PM   #26
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by Tex2002ans View Post
Edit: Also, I had trouble Copying/Pasting equations out of your Word DOC. The symbols were completely mangled. I saved your DOC file in Word, and exported to HTML, and saw this HORROR as the first equation (the rest are equally as abysmal):



You can see in RED that the pilcrow '¶' was overwritten to display as a partial derivative '∂'. (The rest of the symbols were just as bad).

This horror should be a much closer to what I posted above (I manually recreated this):



If you are still going to be using Word, I would recommend learning how to use Styles to create cleaner documents.

ALSO, I would avoid using whatever you used to insert Symbols. As you can see above, it seems as if Microsoft Word inserted them as a dreaded "Symbols" font (seems to only work in Microsoft Word and IE?). It looks to me like it is overriding the letters "a-z" + "A-Z" with the lower/uppercase Greek symbols. Instead, you would want the PROPER unicode character.

This is also just going to cause tons of headaches for you when trying to move this document ANYWHERE besides Word. (Like me trying to copy/paste info into the forums, or convert to EPUB).
Although Word has some quirks, in this case it is not that bad. If you use insert symbol, it actually does not insert the symbol in the 'Symbol' font, but the unicode value. You can check that by searching for anything in that font. You will not find it.
However, upon export to HTML, it is converted to the Symbol font. That is because Word only supports an old version of HTML and CSS. Back then Unicode was not that well supported yet and using the Symbol font was a much used fallback (although not recommended by W3C). So, only during the export it is actually changed to the Symbol font.
Still, that does not solve the problem though. That is why I made an improvement to my ePUB export in the tools to ensure that the entered symbols remain their Unicode equivalent.
Toxaris is offline   Reply With Quote
Old 08-15-2014, 06:18 PM   #27
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Thanks for the information on Word and the Symbols font! I didn't know that.

And thank you for the example SBT.

Last edited by Tex2002ans; 08-15-2014 at 06:25 PM.
Tex2002ans is offline   Reply With Quote
Old 05-13-2017, 03:08 AM   #28
Karthiksugumar
Member
Karthiksugumar began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Nov 2015
Location: INDIA
Device: none
MathML coding are supported in Ipad, Kindle devices. But it will not work the Nook, Kobo and sony reader
Karthiksugumar is offline   Reply With Quote
Old 06-20-2017, 08:13 AM   #29
espenmn
Junior Member
espenmn began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2017
Device: samsung
Basically, 'math' is quite complicated in ebooks (and a bit in html, too).

Depending on 'your math', you might have to include mathjax.
The problem is that many ebook readers do not support mathjax, and you might need to include (a downsized) javascript in you book since the original is too big.

After a lot of fuss, I managed to get this working (in a few readers):
https://github.com/espenmn/medialog....bok/MathJax.js

Another option would be to convert all the math to images.

-----------

To covert word math to 'something you can use on the web', I use Mathtype
espenmn is offline   Reply With Quote
Old 06-20-2017, 01:29 PM   #30
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
The 'best' method besides MathML (only ePUB3 and not supported that well) is still using SVG images because they can scale with the text without pixelating.
Toxaris is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Word-> HTML -> Epub arturox Conversion 37 07-18-2012 10:29 AM
Fun converting Word to epub DebbyS Conversion 2 10-09-2011 03:27 AM
Converting Word Doc with Tables to Epub? dhume01 ePub 8 12-28-2010 08:02 PM
Converting from Word Perfect to epub PhishStyx Sigil 10 05-17-2010 04:49 PM


All times are GMT -4. The time now is 03:30 AM.


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