Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-02-2009, 04:32 PM   #1
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 682
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
First time formatting an epub from scratch

I must be having a bad day as I can't find what I'm looking for and I'm sure it's all here.

I've in the process of formatting some books into decent looking epubs but my xhtml/css skills are a bit limited at present (I'm hoping that developing these books will fix that), and need a bit of help.

Well here are my questions.

1. I want to include cover art that scales with the screen size. I believe this is done using SVG, but I've no idea how.

2. One of my books in its pbook form uses a pair of parrallel horizontal lines to the right of every chapter heading. How do I put horizontal lines after the text? I assume I would be putting in image files for the horizontal line. Is it possible to fix their position to be just after the heading text. Would using SVG make it possible to stretch them to go to the far right of the screen regardless of the screen size?

3. How do I embed fonts?

I hope someone can point me in theright direction for these, any help would be great.
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free.
Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here
Currently working on updating some of my Lovecraft work after receiving some corrections
ghostyjack is offline   Reply With Quote
Old 11-02-2009, 06:02 PM   #2
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 24,910
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
A1. Download my ePub sample. That has a resizing cover using SVG. Just unzip it and take a look at the code.

A2. Hmm... I think this can be done using an image file and resizing it non-proportionally. I'll see if I can come up with something.

A3. See A1. If you want to embed commercial fonts you'll also want to encrypt them. I've made a Python script that will encrypt embedded fonts to the Adobe specification.

Quote:
Originally Posted by ghostyjack View Post
1. I want to include cover art that scales with the screen size. I believe this is done using SVG, but I've no idea how.

2. One of my books in its pbook form uses a pair of parrallel horizontal lines to the right of every chapter heading. How do I put horizontal lines after the text? I assume I would be putting in image files for the horizontal line. Is it possible to fix their position to be just after the heading text. Would using SVG make it possible to stretch them to go to the far right of the screen regardless of the screen size?

3. How do I embed fonts?
__________________

Kai Lung Raises His Voice
, now available at Amazon and BooksOnBoard
A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories.

Books I've read in 2013, 2012, 2011, 2010

Last edited by pdurrant; 11-03-2009 at 10:06 AM. Reason: added link for the python script
pdurrant is offline   Reply With Quote
 
Enthusiast
Old 11-03-2009, 09:39 AM   #3
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 7,746
Karma: 21843110
Join Date: Dec 2008
Location: Krewerd
Device: HTC Flyer; BBMini; Sony PRS650
Quote:
Originally Posted by pdurrant View Post
A1. Download my ePub sample. That has a resizing cover using SVG. Just unzip it and take a look at the code.
And where might I find that epub sample?
__________________
Quote:
"I followed you."
"Why?"
"Because you were moving. It's impossible to follow someone who is standing still. If I hadn't moved, I would have lost you. Thus, follow."
from: Edge of Destiny
Sweetpea is offline   Reply With Quote
Old 11-03-2009, 09:52 AM   #4
AnemicOak
Bookaholic
AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.
 
AnemicOak's Avatar
 
Posts: 7,491
Karma: 19230583
Join Date: Oct 2007
Location: Minnesota
Device: AuraHD, Nook HD+, Kindle 2,3,T , Opus, TF101, Nexus7, iPT, iPhone5
Quote:
Originally Posted by Sweetpea View Post
And where might I find that epub sample?
http://www.mobileread.com/forums/showthread.php?t=60935
__________________
~Brian

"The test of any good fiction is that you should care something for the characters; the good to succeed, the bad to fail. The trouble with most fiction is that you want them all to land in hell together, as quickly as possible." — Mark Twain

Get 15GB of cloud space free at Copy.com, plus an extra 5GB free by using this link (I get 5GB free too).
AnemicOak is offline   Reply With Quote
Old 11-04-2009, 03:57 AM   #5
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 682
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
Thanks pdurrant.

I'm not very familier with the SVG code, but a bit of experimentation should help me understand how to use it for my covers.

I'm not sure I understand the need to encrypt fonts. I take it this would be only neccessary if it is for a font that isn't free or comes supplied with the OS? Or is it neccessary for me to do this for all fonts I use?

I thought my second question may be difficult, any help on that one would be great.
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free.
Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here
Currently working on updating some of my Lovecraft work after receiving some corrections
ghostyjack is offline   Reply With Quote
Old 11-04-2009, 04:40 AM   #6
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 24,910
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
If you intend to distribute ePubs, for free or otherwise, you need to make sure you have permission from the font's copyright holder before embedding them.

Just having bought a user licence isn't enough, nor are fonts that come with your operating system necessarily free for distribution in ePubs.

So - you need to make sure you have permission to distribute the fonts.

If you have blanket permission to distribute, you don't need to encrypt them. But for most fonts, you're more likely to get permission to embed the fonts in distributable documents, but not to redistribute the fonts themselves. Since ePubs are essentially zip files, embedding fonts is ePubs without encryption is probably considered redistribution, not embedding, since they can be extracted so easily.

So. You'll need to encrypt the fonts you embed in ePubs. Unfortunately, there are two methods of doing that. The Adobe method, which is supported by ADE and all ebook readers that include ADE, and the standard IDPF method, that no reader currently supports. So at the moment, my script uses the Adobe encryption method.

ePub is a remarkably new format, and being standards based, change is slow, as there's no one person that can dictate changes. Also, the readers and tools are slow to appear, which si why I needed to roll my own font encryption script.

Quote:
Originally Posted by ghostyjack View Post
Thanks pdurrant.

I'm not very familier with the SVG code, but a bit of experimentation should help me understand how to use it for my covers.

I'm not sure I understand the need to encrypt fonts. I take it this would be only neccessary if it is for a font that isn't free or comes supplied with the OS? Or is it neccessary for me to do this for all fonts I use?

I thought my second question may be difficult, any help on that one would be great.
__________________

Kai Lung Raises His Voice
, now available at Amazon and BooksOnBoard
A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories.

Books I've read in 2013, 2012, 2011, 2010
pdurrant is offline   Reply With Quote
Old 11-04-2009, 06:53 AM   #7
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 682
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
Ah, that makes sense.

Well I've got your scripts and will have a crack at it and see if I can't encrypt the fonts. That'll be the next thing I tackle after I've fully understood SVG for book covers (so tommorow then).

Any joy on the getting the image files to stretch across the page after the title (my question 2)?
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free.
Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here
Currently working on updating some of my Lovecraft work after receiving some corrections
ghostyjack is offline   Reply With Quote
Old 11-04-2009, 07:27 AM   #8
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 24,910
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
I'm not very happy with it, but here's something that seems to work in ADE.

It uses tables (ugh), and the behaviour isn't consistent across renderers. Or even terribly logical. But it's the best I can come up with, since ePub CSS doesn't support the position: attribute. The easiest way to adjust the positioning of the lines is to tweak the graphic. No doubt there's other ways too, to do with vertical alignment in table cells.

It might be possible to do something better with an SVG graphic for the entire heading - I haven't looked.



Quote:
Originally Posted by ghostyjack View Post
Any joy on the getting the image files to stretch across the page after the title (my question 2)?
Attached Files
File Type: epub HeadingLines.epub (2.5 KB, 83 views)
__________________

Kai Lung Raises His Voice
, now available at Amazon and BooksOnBoard
A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories.

Books I've read in 2013, 2012, 2011, 2010

Last edited by pdurrant; 11-04-2009 at 08:22 AM. Reason: typos
pdurrant is offline   Reply With Quote
Old 11-04-2009, 08:16 AM   #9
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 682
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
Well thanks for trying anyway.

I'll see how it works in the file and if it's as bad as you say, I might have to try something different or just drop the idea altogether.

If it can't be made to match the pbook then it can't be made to match. No use crying over spilt milk (as the saying goes), I'll just have to try something a bit different then.

I had a go with trying to position it using CSS and although it partly worked in a HTML file (managed to moved them around and sort of put them in the correct place) but I could never get them to stretch to the far end of the screen on my PC in IE or FF.
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free.
Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here
Currently working on updating some of my Lovecraft work after receiving some corrections
ghostyjack is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-650 epub formatting question scribblenauts Sony Reader 11 11-01-2010 01:47 PM
ePub. Several formatting problems tibiafry ePub 14 06-18-2010 11:07 AM
Epub formatting kurt_da_nerd ePub 8 05-11-2010 02:04 PM
ePub to ePub? (preserve formatting) DrMoze Calibre 5 03-21-2010 11:25 PM
Long 'Formatting...' time Magnum Sony Reader 12 07-19-2009 12:15 PM


All times are GMT -4. The time now is 11:26 PM.


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