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 02-28-2011, 12:05 AM   #1
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Step-Step-Guide to ePub creation from InDesignCS3

Caveat: This is the way I do it, there are plenty of other and probably better methods, but I don't care, because it works for me

Prerequisites
A working knowledge of InDesign. I will not be describing how to make a style sheet
InDesign CS3
TextWranger (or another text editor which saves as UTF-8 and supports regular expressions)
Dreamweaver CS3
Photoshop (or another image editor)


InDesign:
Tip: Every style change must have a style sheet applied to it
  1. Create Character Styles for Italic, Bold, Bold Italic and so on for each element eg (Smallcaps, Dropcap), ID will strip out any nested styles you must apply the character style to compensate
  2. Search for any Dinkus's and apply Paragraph Style "Dinkus" to it
  3. Make sure all images which will float are made in-line and have a paragraph style "image" applied
  4. Make sure all Bullets, Lists Quotes etc have the following Style Sheet naming convention applied eg. QuoteFirst, QuoteMiddle, QuoteLast. With the appropriate spacing applied and also a QuoteSingleLine, with space applied to both top and bottom. This applies to bullet lists as well Tip: InDesign WILL strip out empty carriage returns.
  5. Delete all page numbers from Content page.
  6. Delete all running heads and Footers. including folios.
  7. Splits Document into separate Documents and create a book and insert files into it, ePub will apply a page break for each Document, so each time you want a new page then create a new document)

  8. Check file in the Book for stray elements like Blanks at the start of Files etc.
  9. Create a blank Cover file and name it "Front Cover" insert into the book at the start and place an image in if you don't already have the front cover pic any image will do, and resize to 600x860pixels and call it "Cover.jpg" (also do the Kindle version while you there resizing to 600x800pixels and label it "Cover_kindle.jpg") Tip: Double check the cover in Photoshop to make sure it's set to RGB
  10. Strip out any Index file and backmatter adds
  11. Export book to Digital Editions. (I like to use these setting below)



Unzip the sample.epub changing the name to sample.zip

The folder Structure will look something like this:



File clean up
I like to replace the "Cover-fmt.jpeg" in the Images folder with the "Cover.jpg" I made earlier, also adding in the "Cover_kindle.jpg" to the images folder.

TextWrangler
Open the Content.opf file.
This is what they will typically look like after the conversion.

You will notice that although there are only two images in the epub.
The Content.opf file duplicates these image for every xhtml file in the manifest section. You have to remove these except for one set. I like to keep the top set under the Cover.xhtml file
Tip: this problem is fixed in InDesign CS5
Once you've done that you need to:
  • start at the top you will need to add the following lines (because I don't like the way ID puts in certain things).
Firstly. In between the <metadata> tags
PHP Code:
    <dc:identifier id="isbn_9781234567890">978-1-2345-6789-0</dc:identifier>
    <
dc:title>Book Title</dc:title>
    <
dc:creator>Author Name</dc:creator>
    <
dc:publisher>Publisher</dc:publisher>
    <
dc:rights>Copyright © Author Name 2011</dc:rights>
    <
dc:format />
    <
dc:date>2011</dc:date>
    <
dc:description>Blurb for the Book</dc:description>
    <
dc:subject>Humanitiessciencessocial sciencesscientific rationalism</dc:subject>
    <
dc:language>en</dc:language>
    <
meta name="cover" content="my-cover-image"/> 
The date, language, and Cover entries MUST be there, the rest is optional
Next in the <manifest> section
PHP Code:
    <item id="my-cover-image" href="images/Cover_kindle.jpg" media-type="image/jpeg"/> 
This goes with the other images
Next in <spine> section
PHP Code:
    <itemref idref="cover" linear="no"/> 
This replaces the Cover line

Then at the bottom, between the </spine></package> insert
PHP Code:
<guide>
<
reference type="cover" title="my-cover-image" href="images/Cover_kindle.jpg"/>

<
reference type="toc" title="Table of Contents" href="Contents.xhtml"/>
</
guide
These two relate to the Kindle conversion.
Tip: If you don't have a content.xhtml file then remove the table of contents line

So you should end up with a file looking like this:


Save and close

The TOC.NCX file you can leave, unless you change order of the files, but if you had them set correctly to begin with then this will be ok.

Dreamweaver
  1. Open the Template.CSS file in Dreamweaver.
  2. Insert text below into bottom of the file
    PHP Code:
    samp {
        
    font-familysans-serif;
    }
    .
    centerImage1    {
        
    margin-top0%;
        
    text-indent0%;
        
    text-aligncenter;
        
    margin-bottom:0%;
            }
    .
    image {
         
    margin-top1em;
         
    margin-bottom1em;
         
    margin-left1.2em;
         
    text-aligncenter;
    }
    img {
        
    max-width100%
    }
    p.float {
        
    line-height1.20em;
        
    font-size1.00em;
        
    floatleft;
         
    clearleft;
        
    text-alignleft;
        
    font-weightnormal;
        
    font-stylenormal;
        
    margin0 0.5em 0.5em 0;
        
    colorrgb(0,0,0);

  3. In the code where it list the "p" styles (p.stylename). Add at the end of the font family line , serif; (or "sans-serif") depended on the paragraph style required, like this:

    PHP Code:
    p.x-body-no-indent {
        
    font-family"Minion Pro"serif;
        
    line-height1.30em;
        
    font-size0.96em;
        
    margin-bottom0.00em;
        
    margin-top0.00em;
        
    text-indent0.00em;
        
    margin-right0.00em;
        
    margin-left0.00em;
        
    text-alignjustify;
        
    font-weightnormal;
        
    font-stylenormal;
        
    colorrgb(0,0,0);

  4. At the bottom of the CSS file you you see:

    PHP Code:
    span.italic {
        
    font-weightnormal;
        
    font-styleitalic;
    }
    span.bold {
        
    font-weightnormal;
        
    font-stylebold

    Tip: the span.bold and span.italic entries could be blank, so you will need to add the required information above

    PHP Code:
    span.hyperlink {
        
    colorrgb(0,0,255);
        
    text-decorationunderline;
    }
    span.strong {
        
    font-weightbold;
        
    font-stylenormal;
    }

    span.dropcap {
        
    floatleft
        
    font-size2.6em
        
    line-height0.9em;


Now you are ready to start opening your xhtml files in Dreamweaver.
I open the Cover, Title page and any other file with a full page image.

I select the image and set the max height to 100%

I then move onto the Chapter files and go though each one, to make sure nothing strange has happened and everything is where it should be.

Next, I open the contents file, and set up my TOC linking (I didn't bother with it in InDesign because the process is a real hit and miss PITA. It's much easier and faster IMO to do it from here.)



All you do is select, say, Chapter One. In the "link" pallet at the bottom, click on the Folder icon and choose Chapter_01.xhtml.
And that's it...Rinse and repeat for the remaining chapter entries in your Contents file.
To link you chapters BACK to the Contents.xhtml file, then you need to open each chapter and select the text you want the hyperlink to be on, in this case it's Chapter One. Click on the folder icon next to the "link" window at the bottom. and select the content.xhtml.



Once you are happy with what you have, then you need to compress the epub folder back up.

I do this by dragging the folder onto an Applescript which you can find here:
http://www.mobileread.com/forums/sho...light=epub+zip

Once you have the filename.epub
I go to the three press website and run it through the validater
http://www.threepress.org/document/epub-validate/


Ok. I think that's it.
This is just a guide on how I make epub files from InDesign CS3.

It is NOT to start a debate on the the quality of the CSS code as it is what InDesign generates and for that reason I've left it as is...


I hope people will find this useful. If I have made some glaring mistakes, please feel free to let me know and I'll fix up my post.

Last edited by Adjust; 03-01-2011 at 05:26 PM.
Adjust is offline   Reply With Quote
Old 02-28-2011, 02:56 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 63,184
Karma: 41305389
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
That's a damned expensive way to create an ePub book! InDesign, Dreamweaver, Photoshop? How much is that little lot going to cost someone?
HarryT is online now   Reply With Quote
Old 02-28-2011, 03:06 AM   #3
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
If theys have InDesign CS3 there's a good chance they will have the CS3 package which include Photoshop and Dreamweaver, But as I mentioned this is how I do it.
Adjust is offline   Reply With Quote
Old 02-28-2011, 04:37 PM   #4
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 544
Karma: 64420
Join Date: Feb 2010
Device: none
And, if you're a publisher who is already using ID for the print version, it is desirable to be able to create the epub (and other formats) from the same ID master files that contain all revisions, etc.
st_albert is offline   Reply With Quote
Old 02-28-2011, 09:25 PM   #5
wannabee
Media Bloke
wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.
 
Posts: 2,377
Karma: 113956855
Join Date: Sep 2010
Location: NSW - Australia
Device: iOS
Entering Metadata from InDesign

Quote:
Originally Posted by st_albert View Post
And, if you're a publisher who is already using ID for the print version, it is desirable to be able to create the epub (and other formats) from the same ID master files that contain all revisions, etc.
Which is the case where I work st_albert. The books are already Quark and InDesign.
Nice work Marcus. This should help a few InDesign users.

A bit more about adding the metadata to the InDesign file for export to ePub. If anyone was wondering how it is entered - here's how. After creating the chapter files and adding them to a new book. Select the file you created all your paragraph and character styles from the book window.
With that file open select FILE INFO from the FILE menu and add the title, author, copyright data etc. It will export that data to the content.opf file in the ePub as metadata. As mentioned above you'll need to edit the <dc:date /> because CS3 & 4 don't have a field to enter it and the ePub wont validate without it.
Ensure your source file with the info and styles in it has been checked in the style source box in the book window before exporting.
Attached Thumbnails
Click image for larger version

Name:	metadata.jpg
Views:	289
Size:	132.1 KB
ID:	67536   Click image for larger version

Name:	book.jpg
Views:	135
Size:	82.9 KB
ID:	67537  
wannabee is offline   Reply With Quote
Old 02-28-2011, 09:45 PM   #6
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Quote:
Originally Posted by wannabee View Post
A bit more about adding the metadata to the InDesign file for export to ePub. If anyone was wondering how it is entered - here's how.
Nice one Wannabee...

I left that out on purpose because, as I have to edit the date field in anyway, I just have a dummy text file sitting on my desktop with all the generic copy and paste info ready to go...

Hopefully what I wrote is not too confusing?
Adjust is offline   Reply With Quote
Old 04-13-2011, 11:45 AM   #7
fiona86
Member
fiona86 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2011
Device: none
Picture sections?

Great post this was really helpful, thanks! Was wondering if you had any experience with exporting picture sections? I'm working on some books with picture sections now and after I export the book to digital editions the pictures get pushed to the front of the book and the some/all of the chapters are missing. If anyone has any advice about this I'd love to hear it!
fiona86 is offline   Reply With Quote
Old 04-14-2011, 12:19 AM   #8
wannabee
Media Bloke
wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.
 
Posts: 2,377
Karma: 113956855
Join Date: Sep 2010
Location: NSW - Australia
Device: iOS
Hi Fiona

I think this attachment can explain it better than I can.

Another tip. Existing books might have artwork created in the inDesign file with vector tools etc which will be discarded. Zoom in on the existing art with high quality display on and do a screen dump and work with that.

Oh! Welcome to the forum
Attached Files
File Type: pdf eBooks_optimizing_images.pdf (487.3 KB, 3098 views)
wannabee is offline   Reply With Quote
Old 04-14-2011, 02:41 AM   #9
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
I'll have more time tomorrow to explain how I do it...

I'm assuming your image section is in ID?
Adjust is offline   Reply With Quote
Old 04-14-2011, 04:10 AM   #10
fiona86
Member
fiona86 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2011
Device: none
Hi Mark, thanks for the attachment and for the welcome so glad I found this forum!

@Adjust, Yeah my image section is in ID CS3, if you have any tips that would be great!
fiona86 is offline   Reply With Quote
Old 04-14-2011, 08:51 PM   #11
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
So basically when I get an illo section to do, it's in a separate ID document.

InDesign CS3
And looks a little like this:


You then need to, if you haven't already, apply a caption Paragraph style the caption text...



Then. All I do is rearrange the caption boxes to be underneath the photos.

And then group Photo box with the Caption Box.



That's it.

Export to digital editions:


TextWrangler

Open the both the Contents.opf files of the newly created illo Section and the eBook .opf file the illo section is going into.

And just copy the Image information inside the manifest section, into the main OPF manifest



Dreamweaver
Open the illo section .CSS file, and insert the page break line to the caption style.

Then copy it into the "book" template.css


Then open the illo .xhtml file. and cop and paste all the stuff inside the <body></body> tags, and past it where you want it to go inside you book .xhtml files...



So after a bit of fine tuning the code you should end up with something looking like this:


And from the design view:




I hope this all makes sense.
Adjust
Adjust is offline   Reply With Quote
Old 04-14-2011, 09:15 PM   #12
wannabee
Media Bloke
wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.
 
Posts: 2,377
Karma: 113956855
Join Date: Sep 2010
Location: NSW - Australia
Device: iOS
@adjust - Excuse me if I've missed the bleedin' obvious but why wouldn't you just keep the illustration sections in the same document as the rest of the book so you don't have to cut and paste the manifest etc?
wannabee is offline   Reply With Quote
Old 04-14-2011, 09:35 PM   #13
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Quote:
Originally Posted by wannabee View Post
@adjust - Excuse me if I've missed the bleedin' obvious but why wouldn't you just keep the illustration sections in the same document as the rest of the book so you don't have to cut and paste the manifest etc?
Illustration sections are printing separately to the text. Usually on a 4-Colour press and on different paper stock. They are done in either 4, 8, 16, 32 page section. This means it can be bound up anywhere they want to put it in the book.

It also gets printed at different times, hence the need for a separate, ID Document.

Why I didn't include it into the ID "Book" as a separate file and call it Pic section?

It's because my clients want it to appear as close to where it falls in the printed edition as possible. This mean that it needs to go inside a chapter. As pic sections very very rarely fall in between chapters.
Adjust is offline   Reply With Quote
Old 04-14-2011, 10:13 PM   #14
wannabee
Media Bloke
wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.wannabee ought to be getting tired of karma fortunes by now.
 
Posts: 2,377
Karma: 113956855
Join Date: Sep 2010
Location: NSW - Australia
Device: iOS
OK, I get that. However, I would have opened the colour picture file, which you have shown us above, and copied it all and then opened the chapter you need to insert them into and paste them into the correct location of that chapter? The last page text box will overflow. You know how many pages you just pasted so add that many pages to the chapter and Bobs your uncle.

I'm not telling you how to suck eggs Marcus but wouldn't that be easier than your work-around mate?
wannabee is offline   Reply With Quote
Old 04-14-2011, 11:08 PM   #15
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
No you are correct. In my case I never get both text and illo files at the same time, so I have to do both separately.

You would still have to Group the images to the captions and then copy and paste them into the main text thread to ensure they are in the correct position after epub conversion.

I find it easier to manage to do it this way...

Last edited by Adjust; 04-14-2011 at 11:17 PM.
Adjust 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
creating epub: updating file marcostt ePub 7 12-13-2010 11:05 AM
Creating epub books by hand RobW ePub 9 12-12-2010 01:04 PM
Apple: Creating ePub files with Pages kjk Apple Devices 1 08-26-2010 05:46 PM
Creating ePub files crutledge Calibre 4 12-29-2009 08:48 AM
Tips on creating EPUB Student1 ePub 3 03-22-2009 12:41 AM


All times are GMT -4. The time now is 06:42 AM.


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