02-02-2012, 06:41 PM | #1 |
Member
Posts: 10
Karma: 43516
Join Date: Jan 2012
Device: none
|
Adding a scaleable inline image within a paragraph
I'm looking to create an epub of some science papers, and I'm finding problems creating one thing.. formulas within the text. On occasion, there are small formulas, usually fractions (in this case, ± σ/√n) that are located in a paragraph, and I'd like them to be sized to look appropriate with the font-size that is around it. In the above case, I probably just use text, but it gets more complicated when you have formulas divided by other formulas so I've gone with creating them as images.
I was hoping that I could size the images using 'ems' so that they scale as the user increases the font size. But this doesn't work (unless i'm not doing it right, in which case..help!) Is there a way to do this with SVG or is that only for fullscreen? I'm really at a loss. Thanks, |
02-03-2012, 01:59 AM | #2 |
Zealot
Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
|
Should work just fine without using an svg wrapper. Just add "width:#em;" the the image's css class (where "#" is the actual numerical width you want it, you'll probably have to fiddle with the exact width to get it to look right).
I've uploaded a sample ePUB showing how to do it. |
Advert | |
|
02-03-2012, 02:54 AM | #3 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Actually, I would use SVG for this. The main benefit in that would be the scaling. When you use images, the quality can really suffer from scaling. With SVG this will not happen. I use codecogs for this.
|
02-03-2012, 04:43 AM | #4 |
Evangelist
Posts: 450
Karma: 343115
Join Date: Nov 2009
Location: Romania
Device: PW2 2014
|
But the question is do all readers support SVG?
|
02-03-2012, 11:20 AM | #5 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
They should, it is in the specs. So far I haven't seen a reader than didn't support the formula's as I used them.
|
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HTML to EPUB Inline Text/Image Issue | HoushaSen | Conversion | 2 | 07-02-2011 08:03 PM |
Adding image from RSS | Hurda | Recipes | 3 | 03-23-2011 02:01 PM |
Adding cover image | miwie | Library Management | 9 | 03-04-2011 10:39 AM |
adding paragraph indentions | soondai | Sigil | 21 | 10-01-2010 12:39 AM |
Adding cover image to PDF? | silvijakk | Bookeen | 2 | 04-02-2009 03:33 PM |