View Single Post
Old 06-15-2013, 11:12 AM   #1
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
Display simple math expressions with CSS

Doing a little thing for my brother and it has some fairly simple math expressions in it (sub/super scripts. fractions, etc.) that I can handle (or at least I think I can) just be changing in CV.

There's a few that are right now seem to require a screen shot to capture an image from the .docx, save as image file and then add it to the epub.

So when he changes, I have to go through the screen capture process again (and again)

Question1: is there any CSS (or other) alternatives beside the 'Add Image' approach? The one structure that seems to be used the most is the square root (radical) sign.

Question2: I found some CSS for super/subscripts that looks good in Sigil, but seems to be ignored (except for the 70%) by ADE. I like the class approach since it seems to not increase line spacing to accomodate the sub or superscript. However, using ADE the small numbers seems to rest on the baseline. Is that an ADE limitation or incompatibility? I use ADE to preview before converting to Kindle

Code:
.sup {
	vertical-align: baseline;
  	position: relative;
  	top: -0.4em;
	font-size: 70%;
}
.sub {
	vertical-align: baseline;
	position: relative;
	top: 0.4em;
	font-size: 70%;
}

Thanks for any suggestions, comments, or critiques

Paul
Attached Thumbnails
Click image for larger version

Name:	ADE Screen Shot.jpg
Views:	231
Size:	148.6 KB
ID:	107006  
Attached Files
File Type: epub epub_math.epub (6.2 KB, 128 views)

Last edited by phossler; 06-15-2013 at 04:52 PM.
phossler is offline   Reply With Quote