navigate site menu

Start learning with our library of video tutorials taught by experts. Get started

InDesign CS5 to EPUB, Kindle, and iPad

InDesign CS5 to EPUB, Kindle, and iPad

with Anne-Marie Concepción

 


In InDesign CS5 to EPUB, Kindle, and iPad, author Anne-Marie Concepción shows publishers and designers how to use the software they already use to create print books and apply it to the emerging ebook market. The course shows how to prepare existing InDesign files for optimal EPUB and Kindle conversion, as well as how to design new projects for a dual print/ebook output, and apply professional text formatting, add links, and include search engine-friendly metadata. Instructions are also included for validating EPUB and Kindle files and setting up accounts at the major ebook distribution channels, including the Apple iBookstore, as well as selling ebooks directly to readers. Exercise files accompany the course.
Topics include:
  • Understanding ebooks and ebook publishing
  • Examining the EPUB format
  • Creating linked navigational TOCs
  • Formatting with paragraph, character, and object styles
  • Optimizing graphics for the EPUB and Kindle formats
  • Streamlining production with free InDesign scripts and plug-ins
  • Creating drop caps, pull quotes, and text wraps in the EPUB
  • Reviewing best practices for book cover images
  • Using cross-platform EPUB editors and utilities
  • Validating EPUBs
  • Proofing ebooks in iBooks, the Kindle, and the B&N Nook
  • Acquiring an ISBN for ebooks
  • Distributing ebooks with resellers and aggregators

show more

author
Anne-Marie Concepción
subject
Design, Digital Publishing, Ebooks
software
InDesign CS5, EPUB
level
Intermediate
duration
5h 31m
released
Mar 09, 2011

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:04Hi! I'm Anne-Marie Concepcion and this is InDesign CS5 to EPUB, Kindle, and the iPad.
00:11This course covers the complete ebook workflow for getting your InDesign
00:14contents into a number of devices and EPUB reading software.
00:19From determining which format you're planning on using then setting up the
00:23original InDesign file to make it EPUB friendly, to tinkering with the final
00:27EPUB in a variety of utilities like Sigil and oXygen Author, to putting the
00:33final file out there for publication through Amazon's Kindle, Apple's iBookstore,
00:39and plenty of third-party sites and options.
00:42I'll show you some specifics like setting up the images and other graphics for
00:46best presentation in an EPUB, adding and editing metadata to your files, and
00:52even building custom TOCs and covers for your final presentation.
00:55ebook publishing is a great way to get your work to your waiting audience.
01:00So let's get started with InDesign CS5 to EPUB, Kindle and iPad.
Collapse this transcript
Using the exercise files
00:00If you are a premium member of the lynda.com Online Training Library or if
00:05you're watching this tutorial on a DVD ROM, then you have access to the Exercise
00:09Files used throughout this title.
00:11So sometimes the exercise files are just an InDesign file.
00:15Just open that up in InDesign.
00:16A lot of times the files that we are using are EPUB files and they are opening
00:21up in my default EPUB Reader, which is Adobe Digital Editions, probably the
00:25same thing for you.
00:26During the title I'll be letting you know where to download all these different
00:29utilities that we will be using.
00:30And when we actually get into editing the contents of EPUB files, then you'll
00:36see that we're dealing with a lot of text files like XHTML files and XML files.
00:42And you can use any kind text editor that you'd like and I bounce around between
00:47a few of my favorite ones.
00:48If you don't have access to the Exercise Files, you can follow along from
00:52scratch or with your own assets.
00:54Let's get started.
Collapse this transcript
1. Overview of ebooks
What is an ebook?
00:00What is an ebook exactly and is an ebook the same thing as an EPUB?
00:06I want to actually talk about the different formats or meanings of the word
00:10"ebook," so that we can narrow it down a little bit, because I think a lot of
00:14people are kind of unclear on the concept.
00:16And in this video title it's not about ebooks in general.
00:20It's specifically about certain kinds of ebooks.
00:24To me an ebook is the same thing as, say, a digital book.
00:27It is a book that is an electronic file that can be attached to an email, for
00:32example, and sent to somebody or that can exist on a website.
00:37A book can even be a website.
00:38That would be an ebook as well.
00:40But I think when people think about ebooks, they are thinking of certain
00:43formats and the three main formats I have up here on the screen.
00:48It's the same book, Alice's Adventures in Wonderland, which is in the public
00:52domain now, and it's actually existing here on screen in three different ebook types:
00:58as an EPUB, as a PDF and as a MOBI file.
01:03And MOBI file might be more familiar to you as a Kindle file.
01:08This is the Kindle format.
01:09PDF I am sure is very familiar to you what a PDF is, and an EPUB might be
01:14unfamiliar but it's actually the main thrust of this video title.
01:17An EPUB is an open source ebook format.
01:21We are going to talk about all three right now first, just so you can see the difference.
01:25If I open up this PDF, it opens up in a Reader on this computer, and the PDF is
01:31a digital version of this book.
01:34With a PDF if you resize the screen, the type doesn't rewrap or anything like that.
01:40You can get the type to be smaller.
01:42If we come up here and press the big old minus sign, the type can get smaller
01:46and it can get larger, but basically what's happening is the whole page is
01:50getting small and getting large.
01:52So it's kind of like the layout is frozen into position.
01:56The layout looks beautiful.
01:57It's got great looking titles and great looking images and wraps some things
02:01like that, but essentially, a PDF is like a frozen page.
02:04Now, let's come back here and talk about an EPUB.
02:08An EPUB I happen to have open in Barnes & Noble ereader.
02:14So if you have like say a Nook, this might be how Alice in Wonderland would look.
02:19Now an EPUB is a re-flowable format.
02:22If I make the screen smaller or larger, look at the line endings. They are changing.
02:28The type isn't changing.
02:29The size of the type isn't changing, but the line endings are changing.
02:33What that means is that an EPUB is a format that can be reflowed depending on
02:39the size of the screen of the device in which it's being read and it's
02:42critically important.
02:43If you try to read that big old PDF on a little iPhone, it might be
02:48impossible, because the type to be too small to read, or you would constantly
02:51be scrolling from line to line.
02:54I can have this ebook open on an iPhone.
02:56We are going to have it open on a Kindle previewer.
02:59This is a Kindle for iPhone Previewer, so this happens to be the MOBI file,
03:03because it's the Kindle format, and if I go from page to page, you can see that this
03:08is what the ebook would look like on an iPhone.
03:12So, it has reflowed. Tthe line endings are much shorter but you can read it.
03:15You can read it very easily.
03:17You can still change the size of the type if you want.
03:20You can make it larger or smaller, but the fact it is a MOBI format, which is
03:26very similar to the EPUB format, means that it's re-flowable.
03:29Those are the kind of ebooks we're going to be talking about in this title.
03:33Is how to make this re-flowable format.
03:35It is the wave of the future.
03:37Now, don't get me wrong.
03:38I love PDFs and I would love for a way for us to be able to get this kind of
03:43reflowable text out of a PDF and still look good.
03:47Unfortunately, we're not there yet.
03:49So it seems at this point PDFs will be for one type of digital ebook but the
03:53vast majority of actual books that are being sold like on the Apple iBookstore
03:58and on the Kindle are going to be this re-flowable format.
04:02Here I have Kindle reader for the Macintosh, and here I can make it as large or
04:09small as I want and you can see how it reflows.
04:11So I don't know how often people will be reading an EPUB on their computer,
04:16but you can. Which brings me to something else that people ask me about all the time.
04:21All right so that's what a digital book is and that's what an EPUB or Kindle is,
04:25that it's reflowable book, but where do you read them?
04:28You can read EPUBs and Kindle books in lots of different places.
04:32You can read them and dedicated devices, like a Kindle or like a Nook or a Sony
04:36Reader or an Apple iPad. You can read them on the computer as well and you can mix and match.
04:42If you're on the computer especially, if you have the Creative Suite installed,
04:46you're probably going to be looking at EPUBs in Adobe Digital Editions.
04:50This is the free utility, kind of like Adobe Reader is for PDFs, Adobe Digital
04:56Editions, or ADE, is for EPUB files, and we will be using Adobe Digital
05:01Editions a lot during this title as a quick proofer for the EPUBs that we are
05:05exporting out of InDesign.
05:08Digital Editions can open EPUB files and it can open PDF files.
05:12We will mainly be working with EPUB files.
05:15Now, if you want to read EPUBs on some sort of external device, you could
05:20download some software. Like for example, Stanza is a very well-known EPUB
05:24reader for lots of different devices that you can download and install.
05:27It doesn't run on the desktop. Or if you have an Android phone, you could
05:32download this ereader, which is very popular. So you just install this software
05:36and then you can open up any kind of EPUB.
05:38You can even read an EPUB in your browser.
05:41So anywhere that you have a browser on your computer or on an iPad or an
05:45Android, you can go to ibisreader.com and you can actually open an EPUB directly in here.
05:50You can even organize your library of EPUBs this way.
05:54If you go to Amazon.com, now Amazon.com uses a different format for re-flowable
06:00ebooks called the MOBI format.
06:02So we are going to be talking about the EPUB format and the MOBI format in this title.
06:07If you want to purchase an ebook from the Amazon Kindle store, it's going to be
06:11downloaded in MOBI format.
06:12So how do you read that?
06:13Well, Adobe Digital Editions can't open that, neither can Stanza, but luckily Amazon
06:19has created all sorts of free Kindle reading apps.
06:22So if you go to Amazon.com and in the Kindle file menu, you choose Free Kindle
06:26Reading Apps, you'll see that you don't even need a Kindle to read the digital
06:30books that you purchase on Amazon.com.
06:32You can install the Kindle Reader app on your iPhone, on your PC, your Mac,
06:37Blackberry and so on.
06:38Another easy way to access EPUBs are directly in your browser.
06:43Firefox has a plug-in that lets you open up the EPUBs directly in the browser.
06:47And so you can see it's still reflowable, I can resize the window and the text
06:51reflows, but I can still access the chapters and so on, just as though I were
06:57reading it on an external device.
06:59So hope you have a better idea of what an EPUB is.
07:01We are not going to be talking about PDFs, so you go away.
07:05We are going to be mainly talking about EPUBs, which is the default almost I
07:10guess you could say generic open source format for re-flowable ebooks, and the
07:17MOBI format is very closely related to that.
07:20We are going to be talking about the MOBI or the Kindle format in its own
07:23chapter later on, but as you learn, once you create a really good EPUB, then it's
07:27not that difficult to convert it to the Kindle or the MOBI format.
07:31So we are going to be really concentrating on working with EPUBs out of InDesign.
Collapse this transcript
Where do I find and sell ebooks?
00:00The entire ebook marketplaces like a bizarre from the olden days.
00:04There are all sorts of places.
00:06There are huge established entities where you can peruse and download and
00:10purchase ebooks, and then there are young upstarts and everything in between.
00:15So let's talk about where you find ebooks and how you can sell your ebooks. Just an overview.
00:21Of course, we're going to be devoting a lot more time later on this video to
00:24exactly how do you get your ebooks up here for sale.
00:27First of all, if you just want to start downloading some EPUBs, here is a really
00:31good place to try is epubbooks.com.
00:34You can see, they have a tone of free books that you can download and there
00:37is also places where you, as an author, can search for ebooks and you can buy ebooks as well.
00:42Another big one is feedbooks.
00:44A lot of EPUB readers that you can download like Stanza, they have a
00:49links directly to feedbooks, so that you can go ahead and search for
00:53EPUBs and download them.
00:55A lot of free ones and a lot of ones for sale.
00:58And Project Gutenberg is probably the most famous source for locating free books
01:03that are in the public domain, and most of the books on Project Gutenberg are
01:07being converted to the EPUB format.
01:09A lot of them already available as HTML, but slowly but surely they're becoming
01:13EPUBs, so you can download them to Adobe Digital Editions or Stanza or any of
01:18the other ereaders that can read an EPUB.
01:20Of course, one of the big kahunas in the marketplace is Amazon.com and this
01:25where people download a ton of ebooks.
01:28But anything you download from Amazon.com, remember, cannot be opened in any
01:33device that doesn't read MOBI files or in any software that doesn't read MOBI files.
01:38So you can't get any book from the Kindle store and open it up say in Adobe
01:42Digital Editions or Stanza. You'd have to use one of Amazon's own Kindle
01:47ereaders, but it's not that difficult to get your book into the Kindle store at all,
01:51as you'll find out later on in this title.
01:55Here is another place the people are getting EPUBs from. This is the Sony Reader Store.
01:59So a lot of device manufacturers, like Sony, which has a line of really nice
02:03ebook readers, have their own bookstore that people can purchase books from and
02:07that you, as an author or publisher, can get your books listed here.
02:10Such as Barnes & Noble.
02:11They are called NOOKbooks for the Nook ereader an ereader device that they sell.
02:18And how about Google ebooks?
02:20They just started up a couple months ago. Google books has been around for a
02:24while where you know you could see scans of books, but they are starting
02:27their own ebook store.
02:29So if you go to books.google.com/ebooks, you can see all these ebooks. A lot of
02:34them are for sale and then there's a lot of free ones and they are all in there
02:37re-flowable EPUB format.
02:39You don't have to be a big store or a big organization.
02:43You could just have your own little publishing company.
02:45Like my friend Adam Engst and his wife Tony run "Take Control Ebooks," which is a
02:50series of really great books that are not too large, not too small.
02:54And they help you out a lot if you're working on anything on the Macintosh
02:57or with publishing.
02:59They started out as PDFs, but they're also converting all their ebooks to EPUB as well,
03:04so you could download them to like a small device and Android or iPhone
03:08and read them on that little screen as well.
03:10So when you think she work on and find an EPUB, there is a huge number of places
03:15where you can find EPUBs.
03:16That means that there is a huge opportunity for authors and publishers to get
03:20your digital ebooks in front of readers' faces.
Collapse this transcript
2. EPUB Production Basics
Understanding the EPUB file format
00:00Now that you've finished your whirlwind tour of the ebook and EPUB
00:04ecosystem, how you find them, how you read them, I think it's time that we
00:08take a look under the hood.
00:10It's important especially since you are going to be a person converting your
00:14InDesign documents to EPUB, to understand really what is an EPUB, what's inside an EPUB.
00:20I think I mentioned an EPUB is essentially like a little website, then ereader
00:25read that little website, but what do I mean exactly? And that's what I want to
00:28show you in this video.
00:30I'm just going to go over it briefly.
00:32Definitely later on in the title we're going to take a very close look at the
00:36contents of an EPUB file.
00:38But I think it's good to know this up front, so we know, "know thy enemy."
00:41Know what we're dealing with.
00:42So here we have a couple of EPUBs in this exercise folder and I have one running here.
00:47This is the Alice's Adventures in Wonderland that we looked at in the last chapter.
00:51So there is image and there's text and so on, right. Not that big a deal.
00:57But actually this EPUB here-- EPUB is a compressed collection of files kind
01:03of like a zip file.
01:05In fact, you can change the extension from EPUB to ZIP and then decompress the
01:11ZIP into its component files.
01:13I've done that here in this folder called z-opened.
01:16So I actually renamed EPUB to ZIP and then I decompressed it.
01:21Now if you're on a Mac it's a crapshoot whether or not it's going to work if you
01:25just double-click it.
01:26I've noticed that in later versions of the OS, it doesn't work and you need
01:30to use like StuffIt Expander to do that, to actually unzip it, but on a PC, it's a no-brainer.
01:36This is actually how you get into the EPUBs.
01:38So anyway, you don't have to worry about that because I already expanded it for you.
01:43So inside the folder, this is the contents of that EPUB file.
01:47We have this strange little XML file and we have a folder with another XML file
01:53and then we have this strangely named folder OEBPS, which actually stand
01:58for something significant that you don't need to worry about, along with a
02:01couple other strange little files and then a folder called content with a
02:06series of XML files.
02:08Now, each one of these XML files is actually a chapter in the EPUB book and
02:15then inside data, we have a series of JPEGs and PNG files.
02:19So if you select one of these, you can see that these are the images inside the EPUB file.
02:26So, when you ask an EPUB reader, like Adobe Digital Editions or Barnes & Noble
02:31NOOK reader or Apple iBooks, to open up an EPUB, what it's doing is it's
02:36loading these XML files with the contents of the book and then it's showing it to you as text.
02:44And when the book calls for an image, it's showing you an image.
02:48Just as how a web site is a text file, the HTML file is a text file that links to
02:53images, and that's how images appear within the web page browser.
02:56I did the same thing to this other EPUB that I have in this folder called
03:02SFHistory, and you can see it right here.
03:05So this is San Francisco History.
03:07It's just an EPUB that we will be working with quite a bit in this title, a very simple one.
03:12When I expand it, you can see that it has a same sort of structure as
03:18Alice's. It looks slightly different inside the OEBPS folder, and because this is
03:25how InDesign exports EPUB files.
03:28It creates XHTML files for every chapter and then it puts the images into a
03:33separate images folder and exports them as JPEGs or as GIFs.
03:38And this is what we're going to be spending a lot of time on in this title is
03:40exactly how it does this and how to optimize what it exports.
03:44But this is essentially what an EPUB is, is that each one of these files is like a web page.
03:49Let's go ahead and take a quick look at this in Safari.
03:52So this is the Contents page with links.
03:54Let's take another look.
03:55Let's just grab this guy.
04:00Okay, so this is like a chapter inside the EPUB and it's actually just a
04:04standalone XHTML file.
04:07So I'd hope that you can see that EPUB readers are kind of like little web
04:11browsers and then what it is that you're creating out of InDesign is like a
04:14little miniature web site.
04:16So, if you're starting with an InDesign document that's been designed for print
04:20and you're trying to create a little web site out of it,
04:23that is a challenge in creating a good-looking EPUB out of InDesign.
Collapse this transcript
How does an INDD file become an EPUB file?
00:00So the InDesign to EPUB workflow is a series of iterative steps
00:05and there are some edits you do in InDesign, some edits you do in an EPUB editor, and you're
00:10always checking to make sure that it's working along the way.
00:12So let me give you an overview of how this works and rest assured that we're
00:16going to be examining each of these steps in detail throughout this title.
00:20So first of all we're starting with an InDesign file.
00:23By the way, EPUBs can be created from Microsoft Word files, from HTML files, but
00:27of course we're starting with the pinnacle InDesign.
00:31I'm going to talk about some things in the InDesign file that translate already
00:35EPUB and some things that don't and the best ways to prepare your InDesign file for
00:39an optimum EPUB export.
00:41So there is some tweaking that you're going to need to do to that InDesign file
00:45In fact you probably find yourself if you've designed it for print doing a Save As,
00:49and then really tweaking it heavily for your EPUB export.
00:53Then inside InDesign there is a command to Export to EPUB format, depending on
00:58the version that you have, it might be called Export for Digital Editions, which
01:02is the name of the default utility that Adobe ships with for viewing EPUBs and
01:07I showed that in the previous video. Or might be called Export for EPUB, but
01:10even then the dialog box still says Digital Editions Export Options, so
01:15they're synonymous.
01:16You end up with an EPUB file that opens up in your default EPUB Previewer, which
01:20as I said is probably Adobe Digital Editions, and you use that as a rough proof.
01:25Because ADE, Adobe Digital Editions, really isn't a 100% accurate previewer of
01:30what it's going to look like say on iBooks or on a Nook.
01:34The situation is similar to web browsers and web sites.
01:37You create a web site and it looks one way in Firefox and quite different in
01:41Internet Explorer for example.
01:43That's what happens with ereaders when they open up these files.
01:47So we use ADE as a rough proof to make sure that all your images came in and all
01:51your text came in and that they are in the right order as a rough proof.
01:55At this point you probably want to validate it and validating is an important step.
02:00It's a free service that I'll be talking about in a video, that checks your EPUB
02:04file to make sure that it adheres to the standards set forth for all EPUB files,
02:09that the links are working like, that the required files are there, and so on.
02:13It's important because when you are ready to sale this, when you are ready to
02:17distribute it to the Barnes & Noble store, the Sony Reader Store, the Apple
02:20iBookstore, they will not accept your EPUB unless it validates.
02:23So it's a good idea to start now to make sure that what got exported from
02:27InDesign will validate and then when we go on to the next step, which is
02:30editing the innards of the EPUB file, you'll know that if it doesn't validate
02:34in the future it wasn't something from InDesign. Yu know, you probably forgot to
02:37close a tag or something.
02:39So that's the next step, is that we are going to open up the EPUB file and edit it.
02:42And I showed what an EPUB file looks like inside in the previous video.
02:46So we're going to do some simple or maybe complex editing of the XHTML files and
02:51the CSS files. I'll be talking about different ways to do that and some common
02:55fixes that you might want to do. You add metadata to the files and so on.
02:58It's actually kind of interesting.
03:00And then of course you want to prove and validate again.
03:04So it's like I said.
03:05It's a series of iterative steps, but at this point when you're proofing,
03:08you probably want to go beyond Adobe Digital Editions and actually get it say onto
03:12your iPad and proof it in iBooks or put it on a Nook.
03:16In other words you want to preview it in something closer to what your customers
03:19are going to be looking at to make sure it works there as well.
03:22Finally when you're happy with how it looks, you do a final validation, which
03:26again is important, because it's just going to be kicked back to you if it
03:29doesn't validate, and then you upload it.
03:31You upload it to your web site if you're going to sell it by yourself on your own web site.
03:35You upload it to the Apple iBookstore or to a third-party aggregator who is
03:39helping you distribute this EPUB in the different venues that we will be talking
03:43about later on in this title.
03:44And if you're going to be selling it on the Amazon Kindle Store, you can upload
03:49that EPUB directly to the Kindle Store and they'll convert it to the Kindle
03:52format for you, because Amazon uses a slightly different format. They don't use
03:56EPUB; they use something called MOBI.
03:58Now I have a chapter in this title all about converting to MOBI files, because I
04:02really think it's better if you convert it yourself on your Desktop and then
04:05preview it in the Kindle Previewer, and even put it on a Kindle and see what it
04:09looks like before you upload it.
04:10But we'll get to that.
04:11The main thing is that we start with a valid EPUB, and then at the very end we
04:16upload it to the reseller, and that in a nutshell is the basic InDesign to ebook workflow.
Collapse this transcript
What can and can't be converted from INDD to EPUB
00:00I think it's always interesting to take an existing InDesign document, one that
00:05you're perhaps thinking of converting to EPUB,
00:07and if you've never done this before so just go ahead and export it to EPUB.
00:11Because it's very instructive what gets included and what doesn't.
00:15And knowing what will work and what won't work will help you in the future as
00:18you work with other InDesign documents.
00:21So I have here a beautifully designed file created by Nigel French, another
00:26lynda.com author on InDesign topics and other topics.
00:30And as you can see it contains one long threaded story with a number of
00:34sidebars, pictures, picture credits, a table.
00:38So it's beautifully designed.
00:39It's not anything spectacularly complex or anything.
00:42But let's just go ahead and export it to EPUB and see what happens.
00:46So I'll just go to the File menu, go down to Export for, and choose EPUB.
00:52Now I've gone ahead and assigned a keyboard shortcut Command+E or that would be Ctrl+E on a PC.
00:58Because I do this constantly throughout this title I went ahead and assigned a
01:02special keyboard shortcut to it.
01:03And go ahead and decide on a location where you want to save it.
01:06Click Save and then just go ahead click Export.
01:09Don't worry about any of these options in here, all right.
01:11I've already done that and I've opened it up in Adobe Digital Editions, which is
01:17the default EPUB viewer that you should already have installed.
01:20And if you don't, you can go ahead and download it from the URL shown here.
01:24It's available for Macintosh and Windows.
01:27And as you can see, it doesn't look very much like what we were looking at in InDesign.
01:32As I you know flip through it it's kind of, what the heck?
01:35So there I see text.
01:38I see some formatting.
01:40I am not seeing the images.
01:43Where the images? Oh! Here's... wll.
01:45I guess that was the table.
01:47There is a bit of work to do in your InDesign documents and then in
01:53the resulting EPUB.
01:54And that's what future chapters are about.
01:56But just as an overview I want to talk about in your InDesign documents
02:01what does get transferred, what doesn't get transferred, and what gets
02:05partially transferred.
02:06And this is not going to be on the test or anything.
02:08So just sit back and relax.
02:09First of all, you know in general all the text that's on your page gets
02:13exported in the EPUB export.
02:15You can't say you now only export this one story.
02:19I wish you could, but you can't.
02:21All the text, all the captions, all the sidebars, and so on gets exported, except
02:27for any text that is from the master page, like down here.
02:33Anything that's on a master page that has not been overridden on the document
02:37page does not get included in the EPUB export.
02:40Which is a good thing, because normally you don't want running footers, running
02:43headers, page numbers, because they don't make any sense in an EPUB reader.
02:47All these devices like the Nook and iPad and so on, they put their own
02:51little running header and running footer, and page numbers, you know it makes
02:55no sense in an EPUB because you're constantly reflowing it.
02:59So if you did put page numbers individually on every page, you'd probably want to
03:04get rid of them, or you know, send them to the master page or something like that.
03:08The same is true by the way for images.
03:11Any images that are on your pages get included in the EPUB export.
03:15And you can't say just include this one and that one, or you can't very easily.
03:20Now optionally it will also bring along the formatting of your images.
03:24So in other words, it will maintain the same crop, the same scaling, and any
03:29kind of edge effects to the image frame.
03:32So if you apply a stroke, or if it has a drop shadow, those get included.
03:36And that's quite different than the text frames because what doesn't come across
03:40is anything special that you have done to the text frames.
03:43In fact the text frames themselves don't get exported.
03:46The text just flows and you can think of like the ebook reader as one big text frame.
03:50So only the contents get exported.
03:53If you've multiple columns, if you've a stroke on a column, if you've a drop
03:56shadow on a text frame, text insets, all that is ignored.
03:59Only the content and the formatting is exported.
04:03Not all formatting either.
04:05As long as you're reusing styles, paragraph styles and character styles, all
04:09those styles will be part of the EPUB.
04:11But sometimes they cannot be replicated in CSS.
04:15Your styles are converted to a cascading style sheet, which is how we
04:19format stuff on the web.
04:21And there are some things that you can do in InDesign, many things you can do
04:24that you cannot do in CSS.
04:26But the style names will appear and your text will still be tagged with those styles.
04:31And we'll be talking a lot more about that in the future chapter.
04:34Interestingly, if you have overset text, like let's say in this that frame looks
04:38like this, all the text gets exported.
04:41And if you have auto bullets, let's go down here, like here.
04:49If you have a created text that has the Auto Bulleting or the Auto Numbering
04:53feature in InDesign, then that'll get converted to auto bullets and auto numbers
04:58on the web which is kind of interesting.
05:01If you have images or text that is partially overlapping into the Pasteboard,
05:06like say this or that, as long as any part of it is inside the page the entire
05:13block of text, the entire image, will get exported.
05:16If you've anything sitting completely on the Pasteboard, that gets ignored.
05:20So it's a convenient way to, you know, shove things aside that you don't want
05:24included in the EPUB but you want saved with the file.
05:27So in general that's how it works.
05:28All text and all images that are part of the live document pages, not part of
05:33the master pages, get exported and included in the EPUB.
05:37What order they appear in, what the formatting looks like, that's something
05:41we'll be covering in future chapters.
05:43Now what does not get included in the EPUB is everything else.
05:46For example, not just stuff on the Pasteboard but also the whole concept of the page size.
05:52I've heard people say, "Oh,
05:53should I reformat my documents so that it matches the size of the iPad?"
05:57Well no, unless you sort of want to get a rough preview of what the text might
06:00look like on that size but there's better ways to do that.
06:03But the entire concept the page size or even facing pages, that's completely ignored.
06:08All text just gets exported into one long text frame.
06:13Other things that might surprise you are, for example, do remember that we have
06:17a little text frame here of automatically generated text from the Table of Contents feature.
06:24This is completely ignored.
06:26If it was generated from creating a table of contents using this feature, it's ignored.
06:31If you actually, you know, create this yourself or you go into Story Editor and
06:36get rid of some of the telltale links that identified as being part of the table
06:40of contents, then it will get included.
06:42But automatically to generate a table of contents and automatically generated
06:46indices are also ignored.
06:48Your links are not ignored. Links go through.
06:50If you make a hyperlink, that works.
06:52If you make a cross- reference link, that sort of works.
06:55We'll talk about that later on, but links get included.
06:58No other kind of interactivity gets included though.
07:00You don't get animations.
07:02You don't get rollovers. Movies and sound,
07:05we're not really going to be covering that in this video but it's usually
07:09something that you add later on into the EPUB itself.
07:12And not all the ereaders will support embedded rich media.
07:15Artwork that you have in your document that you've created with InDesign tools
07:20and that have no content otherwise, such as this lovely curvy arrow that I
07:25created with the Pen tool, get completely ignored.
07:28So if you've created any diagrams with callouts and arrows and cartoon
07:33bubbles and things like that, all that will be gone.
07:35Only the text that's inside there, the live text, will be included in any images.
07:40And I have a video where I talk about how you can convert InDesign art into
07:44something that will be included in the EPUB.
07:47If you have arranged various text frames in the same page, your text and image
07:51frames in the same page, the spacing between them is ignored.
07:56So it's not going to add 5 inches of space in between these two elements.
07:59It's going to put them right up against each other.
08:01By the way these soft returns are for the most part honored when you export to EPUB.
08:07And in fact it's probably something that you might want to do a Search and
08:10Replace for because sometimes it can mess things up if you're trying to force a
08:14line break for a particular column width.
08:17It's going to force a line break in the resulting EPUB text, which might look kind of dumb.
08:21Again, we'll talk about that later.
08:24If you have used multiple returns to add space, that's all ignored and it gets
08:31collapsed into nothing. Just one return.
08:35Same thing with space runs.
08:37It gets collapsed into one space, so that into nothing, but just one space.
08:41Same thing with tabs.
08:43A tab gets converted to a single space.
08:4530 tabs in a row get converted to a single space.
08:49Your tables do make, you remember that horrible table that we saw.
08:54The tables do get exported.
08:57But none of the formatting from the tables gets exported.
09:00So you have to actually edit the CSS code to make it look somewhat like what you want it to look.
09:06If you use table dtyles it makes it a lot easier and again we'll be talking
09:09about that as well later on.
09:11Any kind of text effects get ignored, like even something as simple as rotating
09:15a text frame 90 degrees. that's ignored.
09:18It's just this will still be exported because it's live text and it's on the page.
09:21But it will appear left or right, and it'll appear in the order of when it was
09:26exported, which we'll be getting in to in lot more detail later on.
09:29Once you've done a few of these you become very familiar with what will be
09:33included and what won't be included in the final EPUB.
09:37And you'll be able to take a look at any InDesign document and already give an
09:41estimate of what this is going to look like and what kind of work you need to
09:44do to it in order to replicate its look a re-flowable EPUB document.
09:49And that's what the rest of this video title is all about.
Collapse this transcript
3. Preparing an InDesign CS5 Publication for EPUB Export
Creating chapter/page breaks via an InDesign book
00:00One of the first things you'll want to do with your InDesign file is to set it
00:04up in such a way that when you export to EPUB it automatically splits the
00:08InDesign document into separate chapters that make links.
00:12Because all ereaders like Adobe Digital Editions, the one that we're looking at
00:16right now, have a feature called a navigational table of contents, where they
00:21will pick up automatically these different chapter names and they'll be linked
00:25over here on the left.
00:26So I can click Early History and it jumps terms to Early history, Arrival of
00:31Europeans, and so on.
00:32It's something that you can show and hide, the navigation pane in this case, from here.
00:37But it's something that the software does automatically so you don't actually
00:40have to create a table of contents yourself within the EPUB.
00:44But it doesn't happen so easily.
00:46For example, let's take a look at a couple typical InDesign documents.
00:51Here we have a document that has the contents of the same book in one long
00:56story, and the story is separated by frame breaks or page breaks.
01:01So you can see here in San Francisco Peninsula, if I zoom in in really close
01:05with Command or Ctrl+ Plus there is a little mark down here that indicates
01:09that somebody pressed the Enter key to make the rest of the story continue on the next frame.
01:15This is a very typical way of setting up a long document.
01:19Now because I've selected it with the Selection tool and I have already turned
01:23down under Extras > Show Text Threads...
01:25Now it says Hide Text Threads, because it's on.
01:28You can see how they're all linked together.
01:30SO let's export this document to EPUB.
01:33I use the keyboard shortcut that I set up earlier for Export to EPUB.
01:36We'll just save it right on the Desktop.
01:40And under Settings, just leave it at the default.
01:43It should be based on page layout here.
01:45Turn on View eBook after Exporting.
01:48Then down in Contents make sure that under Table of Contents that this is turned off.
01:53The settings you make in the Export to EPUB dialog box will be remembered for
01:58next time you use it for this document, so they're sticky settings.
02:01Just click Export, and it should automatically open in our default EPUB reader.
02:07So it looks like the content made it through fine.
02:09Here it starts out with Early History and so on.
02:13But they're not separated into individual chapters.
02:16So exporting to EPUB you know know what happens is that it ignores frame
02:19breaks or page breaks.
02:21Everything just gets exported into one long chapter and you don't even see a chapter nam.
02:26It's just the name of the InDesign document.
02:28So when you export to EPUB, frame breaks or page breaks are ignored and instead
02:33it just exports as one long story.
02:36And you don't even see the name of the chapters appear here.
02:40You just see the name of the InDesign document.
02:43So we've lost the feature of being able to use the ereader's navigational table of contents.
02:49OK, so you might be thinking "Fine, I'll go ahead, and I will split this up."
02:53So here we have the same document, only each story is separate stand-alone on each page.
02:58They are not threaded together, Let's go ahead and export this to EPUB.
03:02I'm just going to export it back out to the desktop and I'm checking to make
03:08sure that my settings are still the same as before. Click Export.
03:12Same problem.
03:13So even if your text isn't completely separate stand-alone text frames in
03:18your document, they are all merged together into one long chapter when you're exporting to EPUB.
03:24So what's the way out of this?
03:26One way is to set up your InDesign document as an InDesign book.
03:31You may have noticed back here in InDesign that under the File menu, under New,
03:36you can create a new document, but you can also create a new book.
03:39So you would create a new book and call it perhaps History of San Francisco and
03:47save it out here on the Desktop and click Save.
03:49That opens up a Book panel that has a whole lot of commands in its panel menu
03:54including Export Book to EPUB.
03:56We're not going to be able to tallk in detail about all the cool features that
04:01are involved in a book.
04:02For that I suggest you take a look at some of the other InDesign titles at
04:05lynda.com, especially David Blatner's CS5 Essential Training, where he covers
04:10working with books in detail.
04:12So I'll get you started.
04:13What you do with the Book panel is you have to get a collection of InDesign
04:17documents in here and the idea is you would take your long InDesign documents,
04:21and you would split it up into multiple stand-alone documents, each one
04:26containing the text from a complete chapter.
04:29So for example we would come over here and we would take the first page worth of
04:34content and copy it and create new document.
04:39Accept the defaults and paste it in here.
04:43I'll save this on the desktop.
04:44In fact I'll create a new folder in here called SF History book files and we
04:51will call this the 01_Early History.
04:55So you've created a standalone document that just has one chapter and then the
05:00final step is to add that document to your Book panel, is click the plus symbol
05:04down here, locate that document you want to add, and open it.
05:09And then you would do this successively for each one of the other chapters.
05:13Now, I'm not going to go through that right now.
05:14I've already set this up for you.
05:16I'll close all this, and not saving any changes.
05:20We don't need anything saved here.
05:22Just to keep things straight.
05:23And I'll go back to my exercise files.
05:29In this folder I have a couple different history books.
05:32One of them we're just going to use is just called history book and inside here
05:36you can see I've already split this up into five chapters and then this IMDB
05:40file is the file that opens up the actual Book panel.
05:43So you double click this and you will see that all the chapters are listed in here.
05:48Now I'll just go to the history text Book panel menu and choose Export Book to EPUB.
05:53And we'll export it right to the desktop.
05:57Again, I'm checking to make sure that my settings are what I want them to be.
06:01And then it's going to view the e- book after exporting. Click Export.
06:05There we have it.
06:06So each one of those documents created a separate chapter in my EPUB.
06:11And clicking on them brings me to the top of that chapter.
06:14So that's pretty good.
06:16One problem you might see is that maybe you don't want the chapter's name this.
06:20See how they pick up the actual name of the document itself?
06:24You might actually want this to say, you know, Early History or San
06:27Francisco Peninsula.
06:29Again, this is something you can edit yourself in the EPUB and we will be
06:33talking about that in another video, But it's always nice to be able to set this
06:36up from the beginning in InDesign.
06:38So let's see how to do that.
06:40We will go back to InDesign.
06:42We don't need to save changes.
06:44I'll switch over to the Finder to show you that in this history book- filenames,
06:50what I've done is I've actually renamed some of the InDesign files, and that's
06:55really what you need to do is to rename the files.
06:58Now I didn't rename them all.
06:59Four and five are still there.
07:00I'm going to open up the IMDB file.
07:03So there's Early History, San Francisco Peninsula.
07:06So let's say that this is your situation.
07:08Maybe you have some documents in your book file that aren't named correctly.
07:12So how do you rename them?
07:14Unfortunately you can't just click here and rename them.
07:16That would be sweet.
07:17You need to actually rename them in the Finder or in Windows Explorer.
07:22So to locate this file the easiest way to go to the Book panel menu and choose
07:26Reveal in Finder or it will say Reveal in Explorer. There it is.
07:31And I want to rename this to, we'll just call it Climate. Do that.
07:36Now when I come back here to InDesign, it says that book is missing.
07:41Right, because it just goes by the filename.
07:43This is kind of pain and it's always better to do this before you create the
07:46book actually, is to just go ahead and rename all your documents.
07:50But if you need to do it midstream it's still doable.
07:52I'm just going to remove that document from the book and then add the renamed file.
07:57Climate, and so one.
08:01Now, they might not appear in the correct order but you can easily drag and drop
08:04them in the order that you want them to be in.
08:07So I'll leave that 05_gold as before.
08:09I'm going to click in the blank area down here to make sure that nothing
08:12selected, so that all the chapters get exported, and choose Export Book to EPUB.
08:18And save it on the desktop and replace the existing one.
08:21Check our settings, everything looks great, and export.
08:25So now the chapters have recognizable names, just like any book chapter,
08:30and Adobe Digital Editions automatically picked them up and linked them to
08:34the actual documents.
08:35It's working great.
08:37Oops, we forget the 05_gold won.
08:39So it's still linking to the correct file, but we don't like that name.
08:43But I think now after watching this video, you know how to correct that, right?
08:47Just go back to InDesign, select this, choose Reveal in Finder or
08:52Explorer, rename it, come back here, replace it with the correctly named
08:56one and then re-export to EPUB.
08:58So that's how you can use the InDesign book feature to help you create a very
09:02nice looking and workable navigational table of contents.
Collapse this transcript
Creating chapter breaks via a custom TOC style
00:00So the issue is how do we set up our InDesign document so that when we export
00:04it to the EPUB format, it opens up in the ereader with the navigational table of
00:09contents here on the left that all ereaders will automatically look for.
00:14You can click on any one of these headings on the left and it jumps to that
00:18section of the ebook or to that chapter.
00:20It's not how you InDesign automatically exports EPUBs.
00:23I showed one way in a different video of how you can do this by creating a
00:27series of separate InDesign files and compiling them together in the Book panel.
00:32But there's an easier way to do this, especially if you're starting with a
00:35single document, that's only available in InDesign CS5. Let's take a look.
00:41I am in InDesign CS5 and I have a very simple document open with the
00:45content of this book.
00:46And as you can see that it's one long threaded story. I am going to select
00:50one of these frames.
00:52Kind of hard to see, but there's little triangles here, or if I turn on the View
00:55menu, go to Show Text Threads, you can see that this is just one long story and
01:01you can see the connectors.
01:03Now if I export this to EPUB as is, we're not going to get that
01:07navigational table of contents.
01:09And let's see that for ourselves.
01:10So I'll just press the keyboard shortcut that I previously assigned to Export to EPUB format.
01:16Let's save this out on the Desktop. Click Save.
01:19And then in our Digital Editions Export Options, I want to make sure and turn
01:23on View eBook after Exporting so it'll automatically open in Adobe Digital Editions.
01:29And under Contents, I want to make sure that table of contents is not selected.
01:33I click Export and so there is the problem, that we're not seeing these
01:37chapters, and it's one long document.
01:39OK, so let's go back.
01:41Instead of splitting this up into separate documents, what we can do is use the
01:44power of InDesign's built- in Table of Contents feature.
01:48If you've never built a table of contents before, don't worry about it. It's very simple.
01:52In fact, we're not going to go all the way through it.
01:54You don't even need to include the actual table of contents in this document.
01:58You actually just need to set up a table of contents style.
02:00Kind of like setting up a paragraph style, but not really applying it to a
02:04paragraph, because there is a place in that Export to EPUB dialog box that lets
02:10you choose the table of contents style that it should use to split this document
02:15up into separate chapters.
02:16So the first thing to do is to decide where you want the chapters to start.
02:20In this document we want them to start with each of these yellow subheads.
02:24The second thing is to look to see to make sure that each one of these chapter
02:28starts is distinguished by a specific paragraph style.
02:32And it's called Subhead.
02:33So this is the same thing that you would do if you're creating a table of contents.
02:37If you want all these to appear in the table of contents, you have to make sure
02:39that they're all styled with the same style name.
02:42So if they're not styled, then you need to apply the style.
02:45Then we go to the Layout menu and we want to create a table of contents style.
02:49Now you can do so directly by going to Table of Contents, where there is a Save Style button.
02:54I am going click Cancel. Or you can just go to Table of Contents Styles and
02:59create it from scratch here.
03:01Let's just do it this way.
03:02Table of Contents Styles and click New and we have the same dialog box, except
03:07that it knows already that we want to create a style.
03:09We'll call this epub.
03:10You don't need to worry about anything except for which style should be
03:15the chapter breaks.
03:16We select the style here under Other Styles, and we're going to click Add, and
03:20move it into Include Paragraph Styles.
03:22So we're looking for Subhead, select it, click Add, and that's it. Click OK.
03:28And you see that it is saved in our list of table of contents styles. Click OK.
03:33And now we'll Export to EPUB again.
03:34I'll use my keyboard shortcuts, we'll click Save, we're going to replace
03:38the existing document.
03:40And then the critical thing to do here after you've created your table of
03:43contents style is to tell InDesign to use it.
03:47Go to the Contents panel, turn on Include InDesign TOC Entries, and you have to
03:52remember to choose the correct TOC Style.
03:55Turn on the other two options as well and then click Export.
04:00And now you can see that each one of these subheads is a chapter start and
04:04we've link to them. Pretty cool, huh?
04:07So let's take a look at a document that's slightly more complicated to see some
04:12other things we can do these TOC styles.
04:14It's the same document, except that we also have this section at the end.
04:19It's another page with a Colophon and it's just a standalone frame.
04:23Now if we export this to EPUB using the same TOC style, let's see what happens.
04:29First, because this is a new document we have to create a new TOC style.
04:33So I'll click New, I'll call this again pub, and we want to include the Subhead.
04:39Okay, and then we'll Export to EPUB, to the Desktop, and make sure that under
04:47Contents that we have chosen epub, and click Export.
04:52And what happens is that in the last chapter, these all worked fine,
04:57but as you scroll down there is the Colophon.
04:59It just ran right into that last chapter, because remember, separate text frames
05:03and frame breaks, all that stuff is ignored when you export to EPUB.
05:06You have to tell InDesign that you want this to start in its own chapter.
05:11You want this to be a link here.
05:13And in order to do that you need to get this style into your TOC Style.
05:18So go back to InDesign.
05:19It can't be in a TOC style unless it's already a paragraph style.
05:23So of course, we want to check to see the name of the paragraph style.
05:25So I'll click inside the word, look inside the Paragraph Styles panel, and oh!
05:30It doesn't really have the style.
05:31it's locally formatted.
05:33You definitely want to make it its own style.
05:35So I'll go to the Paragraph Styles panel menu and choose New Paragraph Style.
05:39We'll just call this colophon and Apply Style to Selection. So there it is.
05:45And you would do this then for every other kind of section in your document,
05:49whether it's on its own page or existing in the middle of the text, that you want
05:53InDesign to automatically start a new chapter from.
05:56Let's go to Table of Contents Styles and we'll edit our style to include the new style.
06:04So I select it and click Add.
06:06Now notice that InDesign automatically indented this and that's the default behavior,
06:12is that as you add multiple paragraph styles to your TOC, InDesign assumes that
06:16they should be sort of like subheadings.
06:18And you can see that down here under the Style details that it's set to be at Level 2.
06:24If you're not seeing in the section by the way, you might be looking at it like
06:27this, with More Options as a button.
06:30So click More Options so that you see this expanded down here.
06:34For now what we want to do is we want to make colophon the same level as Subhead.
06:38We don't want it indented.
06:40So with that entry selected, I choose Level 1 and that skooches it over. Perfect!
06:46Click OK. Okay, and now let's try exporting this once again to EPUB.
06:52I'll replace the existing EPUB and then in Contents make sure this is
06:56selected. Click Export.
06:58There we go. Now at the bottom of The gold rush we don't see it, until we
07:02actually click on Colophon, then we see it, all right?
07:05Which is exactly what want to happen.
07:07One last thing that I want to talk about is that sometimes you do want to have
07:11multiple levels in your navigational TOC.
07:14For example, up here on page 1, we have some sub-subheads,
07:19for lack of a better term, that we would like these to also be links in the
07:23navigational table of contents.
07:25But we like them to appear underneath this subhead.
07:28So these sub-subheadings are all styled with the same style, which is, remember,
07:32one of the requirements it's Subhead2.
07:35And there's nothing else in this document, other than these guys that are
07:38styled with Subhead2.
07:39So we don't have to worry about creating a whole bunch of chapters that we don't want.
07:41Let's edit our table of contents style to include this.
07:45Or we could always create a new table of contents so we have two different
07:48one to choose from.
07:49But for now I am just going to choose that one and edit it.
07:53So I want Subhead2 to be underneath the Subhead.
07:56So I select Subhead, go down to Subhead2.
07:59Choose Add, and it paid no attention to what I had selected.
08:03So instead I am just going to drag it up, there we go.
08:04And I am going to leave it at level 2.
08:09So that's still epub, TOC style.
08:11Let's export this to EPUB, replacing our existing one, everything else is still the same.
08:19And there we go.
08:20So we still have the subheads are still the main chapter breaks.
08:24There's our Colophon, but notice there's a little plus symbol here indicating
08:27that if you click it it's going to expand into the sub-subheads.
08:31And if you click these, it doesn't start them at the very top.
08:34It just gets to that section of the page which is exactly what we want in this case.
08:39If you wanted them to start at the very top, then you would need to turn them in
08:43to level 1 subheads.
08:45So I think you can see that by using,
08:48creatively using, InDesign's TOC styles you can easily take a single InDesign
08:54document and split it up into multiple chapters in your EPUBs.
Collapse this transcript
Combining both strategies to create chapter breaks
00:00With InDesign CS5, the two methods that we have to automatically create chapter
00:05breaks when exporting EPUB, the InDesign book method with the collection of
00:10standalone documents, and the table of contents style method with a single doc
00:14whose TOC style defined where the chapter breaks are, these two methods can be
00:19combined quite easily, making this part of your job a little bit more flexible.
00:24For example, let's take a look at this History text book.
00:28You may remember this from a previous video.
00:30I am going to open up the INDB file from the History Book folder, from
00:34the Exercise Files.
00:35This is the collection of individual documents that when you export them to an
00:40EPUB create a navigational table of contents using the book method.
00:44So we will go ahead and do that by choosing Export Book.
00:47We will export this to the Desktop and under Contents, make sure that table of
00:53contents is not checked and we will click Export and it should open
00:57automatically in your default EPUB reader, usually Adobe Digital Editions, and
01:01you can see that yes indeed it made a navigational linked table of contents
01:05that I can click on but the chapter names are dumb.
01:08They are the exact same chapter names as the InDesign documents themselves in the book file.
01:13So I showed it in a different video how you can tediously rename these files if
01:18you want, but why not just use the TOC styles with the book?
01:23All you need to do is open up the master documents, and again watch the "Working
01:27with InDesign books" videos from one of the other titles here on lynda.com, if you
01:31are not quite sure what the master document is and what its significance is, but
01:35basically you know it's the little icon here.
01:38Double-click it to open it and you want to add the TOC style to this master document.
01:43Now the TOC style is going to call on the same style that we've been using in
01:48our TOC styles videos of, if we click right here and open up the Paragraph
01:52Styles panel, its Subhead.
01:54So as long as all the documents in your book begin with a paragraph that is
01:59styled same with the same paragraph style, this will work like a treat.
02:02So again use the master documents, have that open, and to that master document go
02:07to Layout, choose Table of Content Styles, and we are going to create TOC style.
02:12New, we will call this epub, and we want to use subhead.
02:17So I went over this in detail in a previous video about using styles.
02:21It should be Review, click OK and OK, and now when we go to export the book to
02:30EPUB, click Save and replace the one on the desktop, and in Contents we want to turn
02:36on the Include InDesign TOC entries.
02:40Let's turn on these two checkboxes as well and choose Export and here they are.
02:45It's the same book but now it's using the actual TOC entries, that paragraph
02:50text, that's been styled the subhead and we didn't need to rename or re-link
02:54anything in our book.
02:56That's pretty cool, isn't it?
02:57So say that you are working with this document and you are using the TOC style
03:02of creating chapter breaks, and then somebody says "You know what, we need this
03:06other document to be part of the book as well."
03:10So I will go ahead and open that up from the same Exercise Folder, combo book
03:16files, the colophon page, and I say, "Hey this needs to be part of it too."
03:20Now maybe for whatever reason you don't want to add this page to the existing document.
03:26Well you can easily combine these two files into the same book by going to File
03:32> New Book, naming it, and then adding the files, which I have already done for you.
03:36We don't have to go through that.
03:38Here in the Exercise Files, I have Combo book.indb. Double-click that and you can
03:42see I have already added them.
03:44So here's History Texts, which is done with breaks, and here's the colophon page.
03:49Now again if we export this to EPUB, because it's a book we have use the Book
03:55panel command here. We can't use the normal File > Export to EPUB command.
03:59However the TOC is not going to include the style from colophon because in this
04:06document, History text breaks, we'll don't use that style anymore.
04:10In other words, if you want to add more documents that you want to include in
04:13TOC styles, you have to make sure that they are used in the master document.
04:18Now if you have already been using a document with the TOC styles method of
04:24creating chapter breaks and then you include it in a book, you can't assume
04:29that TOC style is going to include the paragraph styles for the other documents as well.
04:34Even though you are working with a book, you are going to be using the TOC
04:38styles method to create your chapter breaks.
04:41So you want to make sure that all the right styles are there.
04:42So let's go ahead and open up the original history text breaks document from our
04:48book file and then go to a Layout > Table of Content Styles. We are going to
04:54create a new style, I will call it epub again, and we want to include subhead.
05:01Now the style used in the other document here, which is open, you can't really it,
05:05the colophon page, is called colophon.
05:09We happen to be able to see colophon here only because we have this item
05:12selected down here, Include Book Documents, which is turned on by default when
05:17you open up TOC styles from the Book panel.
05:20If for some reason it's turned off and you are like where is that colophon
05:25style, it's not going to be there.
05:26So if you want to make sure to be able to choose from all of the paragraph
05:29styles in all the documents in your book, you have to remember under Options to
05:34turn on Include Book Documents.
05:36Oh yeah, there is colophon. So we will add that. Once again we need to change
05:41this to level 1, save this, epub, then say OK and OK right and then we go to the
05:47Combo Book panel menu > Export Book to EPUB.
05:51We will export this to the Desktop and under Contents we want to make sure that
05:57the TOC style is chosen, pub, and click Export, there you go.
06:02So here are the normal chapter starts from our single long documents and then
06:07here's the additional document they were able to include in this EPUB simply by
06:11adding it to the Book panel.
06:13So by combining the TOC style method and the Book panel method, you can get a
06:18lot of flexibility in creating automatic chapter breaks when you export to
06:21EPUB from InDesign.
Collapse this transcript
Using the layout to manage content flow
00:00So up until now in this chapter about preparing your InDesign publication for
00:05EPUB export, we have been working with fairly simple files;
00:08just plain text, one story that is threaded among multiple frames or that is
00:14split into multiple chapters in a book.
00:17You can also export basically anything that you create in InDesign;
00:20you can export to EPUB and let's look at something that has a little bit more
00:23complicated layout and see what happens.
00:27Because what I want to talk about here is how InDesign decides the order of the
00:32content when you export to EPUB.
00:34We only have one text frame that's a no-brainer, the text; it's exported.
00:38Let's take a look at this weird little document that I created.
00:42It has a number of elements in separate frames.
00:46There is the title and the byline, and I will for some reason rotate it little callout.
00:51Here's the main text of the story.
00:54The picture of the dog and the caption are grouped.
00:57There is a little continued box here and this story indeed continues on to Page 2.
01:03There is the end of the story and there is some overset text and there's another image.
01:08Let's export this to EPUB and see what happens.
01:11I am going to use my keyboard shortcut to you choose file export to ePub format
01:17and will export this document directly on the desktop, click Save.
01:21Make sure that under Ordering we are choosing Base on Page Layout, this is the
01:25focus of this video, the Page Layout Order.
01:28And then under Contents you don't want to include InDesign TOC entries,
01:31it's just one document so we are not worried about chapter breaks and then click Export.
01:38Look at that;
01:39doesn't look anything like the InDesign document, does it?
01:41Well it should be no surprise that those big green background squares didn't
01:46get exported because as I mentioned earlier empty content frames are ignored
01:51when you export to ePub.
01:52So, just image frames and text frames that don't belong to the master page are exported.
01:58But how did you decide that my favorite dog should be the very first thing and
02:03then the byline and then the headline?
02:06Because InDesign goes from left to right and top to bottom border page by page
02:12when it exports to EPUB.
02:14Even if you have a two page spread, it is going to do an individual page and
02:17then go on to the next page.
02:19So in this document, what is the leftmost object?
02:22It is this rotated frame that says my favorite dog.
02:25So that is the first line.
02:28Now, it does not pay any attention to text effects in InDesign.
02:32So it just brought it in, but it did adhere to its paragraph style which made it centered.
02:37Then the next thing was byline because if you move from left to right on this
02:41page to the next object is the byline.
02:45Then as you move from left to right again you might think well the body copy
02:48that starts at Carol and handsome is the next leftmost object.
02:52But look, there is something above it.
02:53Alright, so it doesn't go all the way through marching left to right and then go top to bottom.
02:57It does a combination;
02:58starts from the left and then it looks at the top to bottom as it moves to the right.
03:02So My Dog, Carol was the next one and then the story.
03:06Notice the story continues all the way until the words but not at all in the,
03:12and then we have the jump line and then we have the picture of the dog and then
03:16we have the dogs caption and at the very end we have the picture.
03:21So let's take a look at that.
03:23When it exports a text frame, it doesn't just export this text frame and then
03:28later this text frame;
03:30this as one continuous story.
03:32If I turn View>Extras>Show Text Threads, you can see that it is one continuous story.
03:36So as soon as it exported, this exported the entire story including the overset text.
03:42So if we open this up in the story editor you could see at the very bottom that
03:46included the overset text.
03:48Then after it exported that story, it is still working on page 1, still
03:52crunching through here;
03:53the next thing that came to in the left or right, top to bottom order was
03:58continued on page 2.
04:00Alright, so top to bottom and then the picture and then the caption.
04:06So even though the picture and the caption are group together, you would think
04:09that InDesign will say, oh!
04:11We definitely want the caption to be above the picture;
04:14it pays no attention to that.
04:16It pays no attention to groups really when you export.
04:19The only thing it pays attention to is where is the upper left-hand corner of
04:24the bounding box of the group.
04:26So in this case it's right here and so as it was deciding what to export left
04:31or right, top to bottom I can hit this item, and then when I hit this item and showed, oh!
04:36The image is further most to left than the caption.
04:39Now if I came in here and I double- click to be able to edit this object and I
04:45dragged this guy to the left so that it's to the left of the picture, but
04:49still in a group, alright, but it's to the left of the picture, let's export
04:52this to EPUB again.
04:53In fact even before we do this, let's move some other things around.
04:56Let's move this over here to the right and let's move the headline to the left.
05:02So what we are trying to do is to force the order that we want and this is the
05:06essential task, nightmare choose whatever you want to choose in exporting based
05:12on layout order to EPUB.
05:15In that if you have a complicated layout you have to pay close attention to how
05:19things are ordered and how things appear in left to right, top to bottom.
05:22We don't want that jump line in here at all.
05:24It makes no sense to have anything that refers to a page number in an EPUB
05:28because it doesn't use page numbers.
05:30So what we can do is we can drag this off to the pasteboard because it ignores
05:34the pasteboard items;
05:35the Export process. Let's try again.
05:37We will export to EPUB again and we will replace our existing EPUB.
05:41Use the same setup as before, click Export and there we go.
05:45So now the headline appears first, then the byline, then the body copy, then the
05:51caption and then the image.
05:52Now the caption is still right aligned because that is the paragraph style for the caption.
05:57It is right aligned in the text frame, but because we move the text frame itself
06:01to the left of the picture, it appears before the picture.
06:04And then finally my favorite dog, which was the item on the right well not
06:08finally because we still have that big fat picture at the bottom.
06:10Now let's look at a book that has images and talk a little bit more about
06:14getting pictures to appear in the right location.
06:17I have a document here from the exercise files called a california-normal only
06:23because it's just like a normal InDesign document.
06:25It's a section from a book called Stories of California.
06:29Let me take a quick look at this, we have a text frame.
06:33That's not threaded to anything and that's the title page and we have a little
06:36flourish that's just an image that has been placed here.
06:39We have some folios from the master page which if you recall are not exported to EPUB.
06:44Master page items that are not overridden are ignored.
06:48There is the forward and then we have the main content of the story.
06:52Let's zoom out so you can see that the story is threaded just like in a
06:55regular trade book.
06:57Now the image and the caption our grouped like the picture of the dog and the
07:00caption in the end of document, but they are floating above the text.
07:05They have a text wrap on it which is typical for how you lay out a
07:09normal InDesign document that you are going to export to PDF to get
07:12commercially printed.
07:13Let's export this document to EPUB, click Save.
07:17Based on page layout order we don't need any TOC entries so I am turning that
07:21off if it is turned on; click Export.
07:24So we are not paying any attention now to chapter breaks so don't worry about
07:27what's happening over here, but take a look at what's happening.
07:30Let's make this larger and we will make into two pages by making the type size
07:34smaller in Adobe Digital Editions.
07:37So here is that first chapter and the caption appears near the end.
07:41In fact all the pictures and captions appear near the end.
07:44And also this flourish is kind of like moved over;
07:47it is not really in the correct place.
07:49So we'll go back to InDesign and again we are using layout order and we want
07:54to make sure that each page has the correct order that we want the objects to be exported in.
07:58Let's look at the problem first with the main text.
08:01We want this picture and image to appear after the first paragraph.
08:04But it wasn't in the ePub, it was appearing at the end of the story and that's
08:08because it hit this item on this page;
08:10the main story and remember it always exports the entire text, the contents of
08:15the entire thread first.
08:17So after it exported this, then it got to the picture, that's why it ended up at the end.
08:22If you have images that you want to appear within the text flow, you need to
08:26anchor them within the text flow and that's very simple to do.
08:28We are just going to move this image out, you want to put them in their own
08:32paragraph and if you want to be able to actually make sense of this document
08:35while it is InDesign, if we just pasted this image in now as an in-line object,
08:40it would overlap the text.
08:41So you want to make a custom paragraph style that includes not only the
08:46alignment of the image while it's anchored but also you want to have it set to
08:51be Auto Leading so that the text will automatically move out of the way for the image.
08:56I have already created that style in the paragraph styles document called an
09:00inline_image_centered-cap.
09:01As you can see it is using auto leading.
09:05So we will take this image that happens to be group with the caption, we will
09:08cut it to the clipboard with Command+X or Ctrl+X, we will double-click inside
09:13the text frame to switch to the Type tool, click right next to that paragraph
09:17that we just inserted and paste with Command+V or Ctrl+V.
09:20You would do this for all the other images in your document.
09:23You would embed them in the text flow.
09:25And now let's do that also settle for the little flourish up here.
09:28We will take the flourish which is right now just a normal image.
09:32I have already inserted the paragraph there.
09:34So we will cut this to the clipboard, switch to the Type tool and paste and now
09:39let's export to EPUB.
09:42Use my keyboard shortcut and we will overwrite the existing one, Export and
09:48reduce the type size.
09:49So now I know that is not final, alright but take a look, we have the flourish
09:53appearing on the right location because we embedded it in the text flow and we
09:58also have the image in the caption in the right location;
10:01right after that paragraph.
10:02We would still need to do some work with paragraph styles or CSS styles to get
10:06the alignments right, but now you have the basic concept.
10:09When you are exporting an existing InDesign document to EPUB that is more
10:14complicated than a single story you need to spend some time and
10:18consideration into arranging the objects in the layout so they appear in
10:22EPUB in the right order.
Collapse this transcript
Using XML tags to manage content
00:00Normally when you export an InDesign document to EPUB the layout order of the
00:05individual content items the text and the images are based on their position on
00:10the page, left to right or top to bottom as I showed in previous video and in
00:14order to force the correct order you need to move things around on the page or
00:18thread things together or embed images in the text flow.
00:22Now in CS5 there is a way that you can manage their reading order, that's what
00:28it's called of the resulting EPUB without having to mess around with items in
00:33the layout and that is by using XML.
00:36Now don't be scared alright, we are not talking about an XML workflow with
00:39importing and all that kind of stuff, we are actually just talking about
00:43using the built-in XML tagging feature and the structure panel to create the
00:49order that we want, sort of how we used the InDesign ability to create table
00:53of contents style to make chapter breaks even though we weren't really using
00:57a table of contents in the document, that's basically what they've added in CS5 with XML.
01:02Let's take a look, so here we have the same document that I used in the previous
01:05video about using layout order just a two-page document with various objects,
01:10text frames and image frames and if we exported this to EPUB right now the very
01:16first item on the EPUB document would be the text from this little pull quote
01:21here that says My Favorite Dog because it's leftmost on the page.
01:24But we would actually want the headline to be first.
01:26So how can we do that with XML?
01:29Well the first thing you do is you create XML tags, you do that by opening up
01:33the XML Tags panel, go to the Window menu, go down to Utilities and choose Tags,
01:40there is a default route tag sort of like a default layer 1 or default basic
01:45paragraph style you don't need to worry about it, just leave it alone, but you
01:48want to create a tag for the different elements that you want to export. For example;
01:52just use our friend a new tag button down here we want to export the headline,
01:58so I am just going to type headline.
02:00We want to export a byline, new tag, byline, another one, one we want to
02:06export the body copy.
02:07Now if by the way you start typing in body copy and you hit Return you are going
02:11to get an alert because XML has very specific rules about tag name.
02:17So they can't contain spaces or tab as you see here, so I would say an image the
02:21image of the dog and we want her caption, real simple, right.
02:26So now how do you apply the tag to the elements, we can just do it really simply
02:31by selecting a frame and then clicking the name of the tag.
02:34Now it's turning pink because I've turned on a special view option, if you go to
02:38the View menu and go down to structure I've turned on Show Tagged Frames right
02:44now it says Hide Tagged frames because it's turned on.
02:46If it's by default you can't really tell if you've tagged it or not.
02:50I think if you're going to try this make sure and to down to Structure and
02:53choose Show Tagged Frames.
02:55Let's do the same thing for byline and body copy and the image and the caption.
03:05So notice that we do not have to change any kind of layout and this is a
03:09nonprinting frame color okay so we could actually export to PDF without a problem.
03:13Now to see the order that it is going to be exported and we need to open up
03:17the Structure panel.
03:18Go back to View, go down the Structure and choose Show Structure.
03:22This shows all of the XML elements in your documents and there's a little
03:27disclosure triangle next to route and you can see what we have exported.
03:31I'm seeing little snippets of these elements because from the Structure panel
03:36menu I've turned on Show Text Snippets which now says Hide Text Snippets.
03:41It's a good idea to do that to help you orient yourself as to what exactly these
03:45items are referring to.
03:47But also notice that if you select an item on the layout that item becomes
03:51underlined here or if you double- click something in the Structure panel, it
03:55becomes selected in the layout.
03:56So you can tell what these elements are all about.
03:59Let's go ahead and export this to EPUB, I will use my keyboard shortcut to
04:04export it to the EPUB formats right on to the desktop.
04:08Now it's critical here that under Ordering you want to choose the Same as XML
04:12Structure, alright that's the whole point of this exercise, Contents;
04:15we are not worried about making chapter breaks so we can just leave it off for
04:18now and click Export and there we go.
04:21The headline appeared first and then the byline and then the Text and then the
04:25Picture and the Caption, just like how we wanted.
04:27Let's look at another example that same California document that we are working
04:31with before, this was a document that's like part of the book, instead of it
04:36creating your tags by hand and then manually applying every single tagged to
04:41every single element, you can have InDesign help you by automatically applying
04:46tags based on style names, in fact you could really automate this if you made
04:50your names match your text.
04:52You can learn a lot more about that in the Lynda.com title by Jim Maivald on
04:57XML for InDesign users.
04:59But we will just do a little bit of automation here.
05:02First of all I've already exported a list of tags to a text file and we
05:07can import them here.
05:08So if you have done this once you can export your tags by going to the Tag
05:12panel menu and choosing Safe Tags, then you put them on the server or give them
05:16to your freelancers or whatever and have them low tags, that's here in the Exercise File.
05:21So everybody is using the same tags to make life easier.
05:23And what we want to do is we want to map styles to tag, so everything has been
05:28styled with a paragraph style, body first and chapter title, there's lots of
05:34styles here but were not going to do all of them for now.
05:37Go to the Tags panel menu and choose the Map Styles to Tags and we want to
05:44map for example the Body style to the body XML tag and the Caption style to
05:52the caption XML tag.
05:54We will just keep that with body and chapter title will map that to headline.
06:01Now if you have actually named your styles according to the XML tags you could
06:05have just chosen map by name and it would do this for you automatically.
06:09Also know that you can map more than one style in your document to the same tag,
06:14as I mapped both body first and body to the single tag here.
06:18Go ahead and say OK and it goes ahead and it maps everything that's been styled
06:23to a tag, except for images, images you need to actually select with the
06:28Selection Tool as I have done here and then you need to click on Image itself.
06:33But the caption has already been tagged.
06:35Now notice it did a little more than what we did in the previous document and
06:39that it didn't just tagged frames but it tagged the text inside the frames and
06:44if you open this up in the Story Editor like I have a caption selected here and
06:48I go to the Edit menu and choose Edit in Story Editor.
06:51You can actually see the tag names captioned surrounding the text.
06:56So when you are editing text in an InDesign document that you have already
06:59tagged, you need to be careful not to accidentally delete these.
07:03They are kind of hard to see in Layout view they are very faint, but they are
07:07easy to see in Story Editor view, so you might want to tell people if they need
07:11to do any editing to use Story Editor view.
07:14Now I am going to ahead and open up the Structure panel again and remember to
07:18turn on Show Text Snippets if you are not seeing this little bit.
07:22Now the point about doing Map Styles to tags is that now we can see every
07:25individual paragraph rather than just one big thing called body and that means
07:30that we can now select at this image here that we've tagged and we want this
07:35image to appear right above the paragraph that starts among those who believed.
07:39So you can see a paragraph right up here right among those who believed and here
07:44is the image that's underlined.
07:45So you can just drag and drop this guy into position, it doesn't change anything
07:51in the layout, but it does change the order of where it's going to appear when
07:55we export to EPUB which is the coolest thing ever.
07:58Alright now we need to move the caption Natural Bridge up with that as well.
08:05Now let's go ahead and export this to EPUB with our usual keyboard shortcut,
08:09right on to the desktop, make sure that you choose Same as XML Structure, we
08:13are not worried about creating chapter breaks, but you could include that as
08:17well if you wanted to.
08:18Click Export, let's make the text smaller so we can see couple pages side by
08:23side and there is the image along with a caption in the correct location in the
08:28document rather than at the end and we did not have to change the layout at all.
08:33So this is another option that you have in CS5 to manage the reading order of
08:37the resulting EPUB files when you export your InDesign documents to EPUB without
08:43having to change anything in the layout.
Collapse this transcript
Naming styles and linked assets
00:00Remember an EPUB document is essentially a collection of XHTML files.
00:06An EPUBReader's like Adobe Digital Editions or the iBooks and the iPad are able
00:12to open up those XHTML files and show them to you like a book sort of how
00:17browsers are able to open up HTML or XHTML files and show you web pages.
00:22And you've ever worked on a website then you know that file naming is crucial,
00:27because if you add the wrong case to a letter or you add a space where there
00:31shouldn't be a space then links can get broken images can get missing and things
00:35will just be screwed up.
00:37So the same thing applies to your InDesign to EPUB workflow.
00:41There are some rules about file naming that will help save you.
00:45Alright, so first of all let's take a look at one of the documents we've been
00:49working with the History book.
00:51I have here in the exercise files a collection of these documents along with the book file.
00:57Notice that these InDesign files are named according to be chapter name;
01:02which is one strategy of creating sensical navigation tables of contents.
01:08If I open up the book file and then I export the book to EPUB which I've already
01:13done earlier you can see that when it's opened up in your eReader that the
01:17navigational table of contents are the same as the InDesign file names.
01:22Now that is usually not a problem, but I definitely know of at least a few
01:27e-readers and a few distributors that caution against using spaces in filenames,
01:33because internally often these files are referred to and they all referred to in
01:38XML or XHTML format where you're really not supposed to use spaces in filenames.
01:44For example, if we look at the San Francisco Climate page you can see that
01:49InDesign user added a cross-reference here and the cross-reference links to this
01:55chapter which is actually a separate document.
01:58If we look at it in InDesign and we open up San Francisco Climate there is
02:03a line of text here that is actually a cross- reference that opens up the other document.
02:08If we open this up in the edit and story editor view you can see the actual
02:12cross-reference here.
02:13Now that's what it looks like an InDesign, but what does it look like in those
02:17XHTML files and the EPUB?
02:19I mean what's the big deal that appears to be working perfectly fine in the EPUBReader?
02:23We're going to look at that EPUB file in one of my favorite EPUB editors called
02:28Sigil that I'll be talking about in more detail in other videos.
02:31I've started it up and I want to go to the File menu and choose Open and locate
02:37that EPUB file that I have on my desktop.
02:40Sigil by the way runs on both Macintosh and Windows and Open it up.
02:45So this is what the actual chapter is look like they've been split apart into
02:50individual XHTML files.
02:52And if we look at the Climate file there is our link and if we look at this in
02:56Code View the cross- reference link is right down here.
03:00Notice that the spaces has have been replaced with %20 and that is unique
03:06these for whitespace.
03:08You may have seen that already in URLs while you're web browsing and the problem
03:12is that some systems that distribute EPUBs or that check for validity of EPUBs
03:18they don't like to see the %20 in links.
03:21So it's just something to keep in mind you maybe thinking well heck!
03:25How are we going to get a navigational table of contents that looks good if we
03:30can't use spaces in the filenames?
03:32Well welcome to the wonderful wild early days of EPUB creation.
03:37What you might end up doing is actually getting into the guts of the EPUB file
03:41and naming these yourself which is something that a program like Sigil or
03:45another program can do for you.
03:46And or you could wait awhile and hope that everybody understands that spaces and
03:52links will be escaped to %20 and that they'll understand then will be able to
03:57live with it, but that's something to keep in mind is that if possible you
04:01should not include spaces in your InDesign document filenames.
04:07Also and this is probably even more important please keep your filenames
04:11suggested alphanumerics, just A through Z and 0 through 9.
04:15Don't use accent marks, don't use slashes, don't use exclamation points I've
04:19seen all sorts of crazy things in filenames.
04:21If you're exporting to EPUB this is surely a road to disaster so just use
04:26alphanumerics in these filenames.
04:28What about linked images you also need to rename the images I have not found
04:32anybody that insist that you should.
04:34I have found some documentation from various publishers that says that the image
04:39that you use for the book cover should adhere to those same rules.
04:43So the image for the cover shouldn't be called mydogfill, it should be
04:47my-dog-fill.jpg or whatever it is.
04:51And in fact you want to go even further than that and use XHTML filenaming
04:56guidelines for all your images and even your styles.
05:00If you have the opportunity to start creating InDesign file from scratch
05:04you might as well use on filenames that though you're creating website use all lowercase.
05:09They never have to worry is this uppercase or lowercase and always use
05:13alphanumerics and always use underscores or hyphens, never use actual spaces for
05:18images that you place and for the style names that you create.
05:21That brings me to one other thing I need to mention out styles not really a file
05:26naming thing, but maybe if that positioning thing.
05:30It's a little known bug that has to do with style groups in InDesign.
05:35I'm going to Open up a document here in our Exercise Files called history texts
05:443 we don't need the book anymore and this is just a regular document that even
05:48working with before just one long story.
05:50We'll open up the Paragraph Styles panel what I want to call your attention to
05:54is the use of the style group here.
05:56We have a style group of folder in other words called headings where the user
05:59has placed these two headings Subhead and Subhead2.
06:03The issue with style groups has to do with if you're ever using a trick of using
06:07a table of contents to force chapter breaks.
06:10If the styles in your TOC style are in a style group it's not going to work
06:16they're going to be ignored when you try to export to EPUB it's not going to break there.
06:20So for example if we come up over here and look at Table of Contents Styles
06:24there is the epub one and it knows that these are all in the headings folder so that's cool.
06:30If we export to EPUB we'll put this right on the desktop and we'll make sure
06:36to turn on Table of Contents epub and Export when it opens up in Adobe Digital
06:42Editions that there is no table of contents we didn't find that at all and
06:46it's just one long file.
06:48So what you want to do is in your Paragraph Styles panel you can just drag them
06:51right out of there, they're inside of style group.
06:54You can keep other styles in the style group just don't put the table of
06:57contents ones in there and what is nice is that your Table of Contents Styles
07:01will automatically know that you've moved them, but if you want to check
07:05yourself anyway you can just see that it doesn't have the parenthesis with the
07:08name of the group after it anymore.
07:10Now let's go ahead and export this one to EPUB, replacing the other one and make
07:15sure that we're using the epub TOC Style and they're back.
07:20Okay so you want to be careful about using style groups.
07:25So it's a quickly changing world as far as EPUB is concerned and maybe five
07:30months from now we're not going to have to worry about spaces in filenames or
07:33style groups and TOCs, but at this point this is the information that I know and
07:38it's better to be safe than sorry.
07:40So at least make sure that your InDesign documents adhere to the rules and that
07:44the style names you're using in your TOC styles are not in the style group,
07:49you'll avoid a lot of problems.
Collapse this transcript
4. Modifying Text and Images for EPUB Export
Cleaning up the text flow
00:00You know what I like?
00:01I like to save time.
00:03I don't like to work hard and that's one of the reasons why I think it's
00:06important that we all learn how to clean up our InDesign files before we export
00:11them to EPUB, because it will save us a lot of time in having to fiddle around
00:17and clean up the actual XHTML files that are inside the EPUB file.
00:20So do it right from the start.
00:22Now there are a few different issues that you might not even consider that can
00:26take you by surprise and that's what I want to show you in this video, as well as
00:29some fast ways to clean up your InDesign files.
00:32So what we're looking at here is a simple two-page spread from the beginning of
00:35a book, the title page spread, and if we switch to Preview Mode, you can see that
00:40this is the kind of spacing that I would like to achieve.
00:43I have achieved this spacing by putting every block of text in a text frame
00:48and then I just move the text frame around to make them look good.
00:51Fine, this is a very typical way to lay out a book for print or for PDF.
00:56Let's see what happens when we export this to EPUB.
00:58I am going to use my keyboard shortcut to get the Export to EPUB dialog box up.
01:04I'll export it right to the Desktop, and in my Digital Editions Export Options
01:09dialog box I want to make sure that View eBook after Exporting is turned on, and
01:14under Contents, it makes no difference if we're using table of contents or not
01:18because we only have one document.
01:19But we do want to make sure that Generate CSS and Include Style Definitions is turned on,
01:24because we want to bring over the formatting.
01:26So I'll click Export and that's not quite what I wanted.
01:31Everything is jammed up together. So why is that?
01:34It's because when you export to EPUB, all of your text frames get
01:41conglomerated into one story.
01:43It pays no attention to the positions of the text frame other than to figure
01:47out which order these blocks of text should appear, which I covered in a previous video.
01:52All right! So you might think okay, fine, I'll put this all in one text frame and I'll
01:56space it out, all right?
01:57So here's a fast way by the way to thread multiple frames together.
02:01First, make sure that every frame ends with a paragraph return.
02:05This will help you. And then I'm going to click the little outport of the first one.
02:11Hold down the Option or the Alt key on a PC, and keeping it held down, just
02:16click, click, and click, and now all these frames are threaded together.
02:20I'll select the Selection tool again to get rid of that extra text.
02:23Now because this is one story, I can go ahead and delete these three frames and
02:28just drag this one frame.
02:29Here is a nice little tip you just learned, all right?
02:31So this is actually what the EPUB saw when we exported.
02:35So you might say okay, I will just do this and then I want to add a few returns
02:40there, like that, how about that?
02:43Okay, let's try this one.
02:44We'll export this to EPUB again, replacing the old one.
02:48It's remembering our last setting, so we don't need to worry about that. Huh, what happened?
02:53Well, when you export to EPUB, all of your multiple space runs or multiple
02:59returns get ignored.
03:02So multiple carriage returns are replaced basically with one carriage return.
03:06Multiple spaces are replaced with one space, and if you've ever done any web
03:10design, you know this is the rules for creating HTML files as well.
03:14You can hit Return as much as you would like, but it's going to just ignore
03:18those carriage returns and just put one carriage return.
03:21So I have a document here called calif-titlepg-after that shows the fix.
03:28Now it isn't a requirement that all the text be in one text frame but it helps
03:33us to visualize what's going to happen when we export to EPUB if we do that.
03:38Because what I've done is I've modified the styles to have space above and space below.
03:43If we click here on the Author and look at Paragraph Styles,
03:47in Author Name I am going to edit author name so we can see what the settings
03:50are for indents and spacing.
03:52There are two picas and eight picas below.
03:55Now, when you export to EPUB, as long as you have Retain Style Definitions
03:59checked on in that CSS section, then the EPUB will convert your paragraph and
04:06character styles to cascading style sheet definitions, CSS definitions, and if
04:11you didn't understand a word I said in that last sentence, don't worry about it
04:15because we have a whole chapter coming up talking about what is CSS and how to
04:18work with the CSS in your EPUBs.
04:20The main rule is that you want to use styles for everything, and if you want
04:25to force spacing in between paragraphs, you need to use space above and space below.
04:31Now I didn't do this on a paragraph by paragraph basis. I actually edited the style,
04:35because it's usually better not to do this as a local override, which
04:39I'll talk about in another video in this chapter when I talk about using styles.
04:44But take it from me that I've done this for all the paragraphs in question.
04:47Let's go ahead and export this out to EPUB again. There we go.
04:53That's a little better.
04:54All right, let's make this a smaller type size so we can see it better on screen.
04:59That's a closer match.
05:00It actually converted that space above and space below to CSS rules for all of
05:05these paragraph styles, and that's how you are able to maintain formatting.
05:10Now like I said, you didn't really have to put it into one frame. You could have
05:13edited each one of these. Let me revert this to show you.
05:16You could have just added space above and below here with it here but you
05:19can't really see if it's going to work or not unless it's in one long text frame like this one.
05:25Let's take a look at a few pages from this book and you can sort of see what a
05:28problem might be now taking a look at this page, is that the designer set off the
05:34chapter heads from the first body copy by using a run of paragraphs.
05:39So if you want to do this correctly you're going to have to select the name
05:42of the chapter title and then edit the paragraph style for chapter title to have space below.
05:48So I am going to go to Indents and Spacing, Space After, Space Below, same thing.
05:53Let's try eight picas.
05:56Well that pushed it way down.
05:57So now in order to give a good preview of what this is going to look like,
06:01you're going to want to delete all these carriage returns, and that can get
06:04tedious if you have multiple chapters in this document, which you probably do.
06:08Now, the same thing is true by the way for space runs.
06:11Take a look on this page on the left.
06:13I'm sure that nobody watching this video would do this, but maybe you have a
06:16freelancer or an intern who did this, who decided to use spaces instead of an
06:22indent measure in the paragraph style to create a first-line indent, or maybe
06:25they decided to use tabs.
06:27Tabs by the way are ignored in EPUB. Tabs get converted to a single space.
06:32So in other words if you want first line indents, then you need to specify that
06:37in the paragraph styles.
06:39I select this paragraph or put my cursor in the paragraph, which is the
06:43Body paragraph style.
06:44I will edit the Body paragraph style. Under Indents and Spacing, I want a First
06:48Line Indent of 1 pica.
06:51Now they're way far apart.
06:53Now, that's too big and I want again the good idea of what this is going to
06:55look like, and I need to get rid of the space runs.
06:58Here we have some other multiple paragraph returns and then we also have
07:02this bad boy up here.
07:04Can you see what that is, that little angled line to the right?
07:08If I open it up in Story Editor under the Edit menu, you can see it a little better.
07:13That is a soft return.
07:15And soft returns aren't ignored. They're actually honored by the EPUB file
07:19but soft return really doesn't make much sense when you have no control over
07:24the width of the page.
07:25Somebody might be reading this book on an iPhone.
07:28So you normally want to get rid of soft returns too.
07:31So you can see that in order to really clean up an InDesign file, you're going
07:35to have to do some Find/Changes.
07:36Let me go over what it is that you need to Find/Change and then I'll tell you
07:41about a couple of ways to make this go very quickly for you. All right!
07:44So Find/Change for EPUB.
07:46in order to preview what the EPUB is going to look like better in InDesign,
07:52you need to get rid of multiple space runs and change to one space, multiple
07:57returns, change to one return, and remember it doesn't support tabs. The EPUB file
08:02format doesn't support tabs.
08:03So even if you have a tab stop in your paragraph style, the actual tab character
08:08gets changed to a space.
08:10So you have to find one or more tabs and change them to a single space.
08:14Now, this is not going to hurt the EPUB if you don't do any of these.
08:17It's just that you won't get an accurate preview in InDesign of what the EPUB is
08:20going to look like unless you do this.
08:22And then to prevent problems in the EPUB file by things that actually aren't
08:26ignored, you probably want to search for any soft returns, also known as line
08:30breaks, and change them just to nothing so that the space in between the two
08:35halves of the word or the line is brought together.
08:38And then if you've inserted any non- breaking spaces, you probably want to change
08:43that to a single space, because non breaking spaces are brought over and
08:47converted to XHTML entity, it's called. We will talk about them more later.
08:52So how can you do all these Find/Changes quickly?
08:55Well, I would recommend that if you're not familiar with Find/Change, then you
08:58go to lynda.com and just search for InDesign Find/Change and you'll find a lot
09:02of videos that talk about how to use Find/Change in detail.
09:06If I go to Edit, go down to Find/Change, you can search for all these things.
09:11You can search for Forced Line Break, which is a soft return, you can change it
09:15to None, you can go down to White Space, and say find a non-breaking space,
09:19change it to a single space just by clicking here and pressing the Spacebar.
09:23Now, you can save these Find/Changes.
09:26You can use GREP Find/Change as well to find multiple returns and replace them
09:32with a single return and so on.
09:34But I have an even better way.
09:36Let's close this out.
09:38There is such a thing called a script.
09:40A free script that comes with InDesign called FindChangeByList.
09:44If you go to the Window menu, down to Utilities, go to Scripts, and inside your
09:52Application folder and Samples-- JavaScript is bi-platform, so you'll find this
09:58whether you're on a Mac or PC. Scroll down and you'll see an entry called
10:02FindChangeByList along with a folder below it called FindChangeSupport.
10:06Now, this is beyond the scope of this video of how to use this, but essentially
10:13let's take a quick look here at what this file is all about.
10:18If you run this script, what happens is that InDesign does a whole bunch of
10:21Find/Changes in a row and the ones that it comes with are a bunch of GREP and
10:26regular text Find/Changes.
10:28So it does things like finds all double returns and replaces with a
10:31single return, see that.
10:33So this is all explained here and as I said, if you look up FindChangeByList,
10:39one word, or even just FindChangeList one word in lynda.com Search Field, I just did this.
10:45There are about eight different videos that talk about how to use the script.
10:48So in InDesign, when you double-click on this script, it says do you want to
10:53run all the Find/Changes that are listed out here on the document or the
10:57selected story, and you can do that however you like. So I will just say go
11:01ahead and do them to the document. Boom!
11:04Look at how fast it cleaned that up.
11:05Now, it didn't get rid of the soft returns and there are a couple of other
11:09things it didn't get rid of.
11:10So I made you a present.
11:12Let me revert this.
11:16In the Exercise Files I made a version of the Find/Change list script
11:21that's just for EPUBs.
11:22So I've already installed it by, I have a folder called epub, I just dropped it
11:26into my Scripts panel folder in my Application folder and there's lots of videos
11:30that talk about how to install scripts.
11:32It's just really no-brainer.
11:33You don't even need to quit out of InDesign to do this.
11:36All I did was I added a few more entries in the Find/Change list that also gets
11:41rid of non-breaking spaces and soft returns.
11:45So if we run FindChangeByList-epub on the document, it's everything that the
11:52original script does, plus a few more things.
11:55You might also have some weird or unusual characters in your publications that
12:00you always need to do a Find/ Change before you export to EPUB.
12:03It's very easy to edit this text file and then point the script to that text file.
12:09As long as you don't change the name, you don't need to change the script at all.
12:13Well, phew!
12:14That was a lot to go over in one video I know.
12:16Now that you know how to do a Find/ Change on an InDesign document to make a
12:20cleaner EPUB, I think you'll find your work a lot easier.
Collapse this transcript
Applying paragraph and character styles
00:00When you export your InDesign document to EPUB, the formatting that you have
00:04applied to your text will more or less also appear in the final EPUB and
00:11mastering that issue of which formatting makes it through to the EPUB and which
00:16doesn't is key to becoming an expert with this process.
00:21Especially when it comes to styles, because the styles that you have defined in
00:26your InDesign document, the paragraph and character styles, will get converted to
00:31web sort of styles, known as a CSS or cascading style sheet file.
00:36Let's take a look at a typical InDesign document, when we export it to EPUB what
00:40happens to the text formatting, and I'll show you some fixes and workarounds
00:44and some best practices for this.
00:45What we are looking at right now is a very simple three-page document with
00:50some text that has been styled. We've some paragraph styles. They've been
00:54applied to the text.
00:56so we have subhead and body texts, and so on.
00:58We also have some bolds and italics here.
01:03Now this is just been applied manually to the body, just like if you want here
01:08and press Command+Shift+B or Ctrl+ Shift+B to make something bold, something
01:11people do all the time. This is small caps, done the same way. So it's typical.
01:16Let's go ahead and export this to EPUB.
01:18I will use my keyboard shortcut to export and we will save it right out to the Desktop.
01:23When you get to this dialog box, I want you to check two things. First of all in
01:27General, make sure that View e-book after exporting is turned on, so it will
01:31open up automatically after we clicked export.
01:34In the Content section, I want you to make sure under CSS options that Preserve
01:39Local Overrides is disabled. Generate CSS should be on.
01:43We're going to export this without local overrides, just using the style
01:47definitions. And surprise, surprise our local formatting didn't come through.
01:54All right so, it was all ignored.
01:58We have lost our bolds and italics.
02:00We've lost the small caps and there's also some surprises like check out this text.
02:06Let me make all the overall text smaller, so it's easier to see.
02:10This text should be fine.
02:12I mean if we look at the paragraph that starts "European visitors to the San
02:16Francisco Bay Area" here, it looks exactly like the rest of the paragraphs but as
02:22you can see in my Paragraph Styles panel, this is actually an override.
02:26Somehow somebody did not apply the Body style to this paragraph; instead it's
02:32basic paragraph that looks like the rest of the text.
02:35"No matter," you think, "that's why CS5 has that option to Preserve Local Overrides."
02:40Let's try that. I will go ahead and export it again to EPUB,
02:43overriding the other one.
02:46This time in Contents, I am going to turn on Preserve Local Overrides.
02:52There, that's better.
02:53So the Local Overrides came through. We have our bolds and italics.
02:57The small caps didn't come through, but that's an issue having to do with CSS
03:01that we will deal with later.
03:02So you might be thing, "Okay well then I will just do that, let's move on."
03:05But actually it's really not a good idea to maintain local overrides in the
03:10resulting EPUB file.
03:12It's nice for just a one-off quickie job, but seriously if you are going to be
03:16selling this EPUB, you want to do it right. Let me show you why. Because you are
03:19definitely going to have to edit the actually resulting EPUB file to some extent
03:24and having it maintain local overrides makes your job much more difficult.
03:29I am switching to Sigil, one of my favorite EPUB editing programs because it
03:33will let us look at the actual code of the EPUB file without having to unzip it.
03:37So I am just going to open that EPUB file and this is the actual history text XHTML file.
03:45Let me switch to Code View and make it a little larger, let me zoom in, let me
03:51zoom in a few times, here we go, easier to see.
03:56This is just like a web page. If you are familiar with that at all, you will be right at home.
04:01But basically, take a look at this.
04:03Take a look at where it says major port.
04:05it is surrounded by a span tag, a span class called no-style-override, and then
04:13it closes after major port.
04:15So this class is actually a CSS style, called no-style-override-2.
04:20So you see, what happens is that see, if you have applied an override,
04:25InDesign will make up a fake character style and include that in the
04:29resulting EPUB and the fake character style is going to be called no-style-
04:33override-2. There are a ton of them here.
04:36You can see in the next paragraph, there's a couple of them, actually there is 3,
04:41and if we look at the actual CSS file, which we can do in Sigil, the stuff at
04:47the top looks kind of familiar, and actually it should be accessible to most users.
04:51Let me zoom in again, there we go.
04:54So there is subhead and body first. These are the actual paragraph styles that
04:58we created in InDesign and if you wanted to edit what this EPUB look like,
05:02you could actually do so here. You could change color, font size and so on, but as
05:07we scroll down, oh my goodness, look at this.
05:11so we have multiple styles that have been applied to the local overrides and if
05:17we try to do a search and replace for example on these, it would be very
05:20difficult to do because each one has a unique name. {lus this is very long name
05:25for a character style. We are just dealing with a three page document.
05:29If you had a 400 page book, this would really add to the weight or the file size
05:33of the EPUB, having to repeat these characters style names through out.
05:37The better thing to do would be to go back to InDesign and convert all your
05:40local overrides to actual character styles.
05:43You can do it manually or you can it with a script.
05:46To do it manually, you simply would go to the Find/Change from the Edit menu
05:53and you would search for anything that has been styled italic.
05:57So I am going to Basic Character Formats. We will say italic.
06:01For example, we're going to create a character style for italic text and then
06:06we want to replace that, so change format with a character style called italic.
06:12I haven't created one yet, but I could.
06:14I could just come up here and created an italic character style that
06:18automatically makes something italic.
06:19Now I am going to go ahead and do this, because I think it's way too much work.
06:24Instead I am going to use this fantastic script and there is a few out there.
06:28This is a really good one that works great in CS5, called and PrepText.
06:34If we go under Window > Utilities > Scripts, I have already installed it on
06:39this copy of InDesign, preptext.jsx, and we will put a link where you can
06:44download it and learn more about prep text.
06:47It's written by a friend of mine called Jong Ware, and what it does is it goes
06:51through the document and converts all local formatting to character styles,
06:55creating the character styles along the way.
06:57So I am going to go ahead and open up the Character Styles panel, so you can see
07:01there is nothing on my sleeve.
07:02It's empty. And I will double-click PrepText. The end.
07:07It created character styles. Let's zoom in here.
07:11So this word right now has the character style Bold, and if I open up the
07:17paragraph style there is no plus symbol, which tells me that there is no local overriding.
07:22Everything has been done with actual characters styles.
07:26So this one is major port, and look we don't need to open up character style,
07:30here we go. This is small caps, and this is bold, italic, and so on.
07:36Now when we export this to EPUB, I am going to go ahead and override the old one,
07:42and we go to Contents, do not preserve local overrides,
07:50we still get our actual bold and italics and bold italics.
07:54The only thing that it missed was this entire paragraph, so we would have had
07:58to find it ourselves.
07:59This is not really a case of a character style; this is an actual
08:02incorrect paragraph style.
08:04The other problem that you may have noticed is that the small cap is not here,
08:07and that's actually an issue having to do with the CSS that we will be talking
08:10about in a later video.
08:12So what about those paragraph styles. How =can you find those paragraph styles quickly?
08:16I do have one tip that I learned from my friend Rufus. If we come back over
08:20here and we open up the Story Editor of this story, so my cursor is blinking
08:25inside this frame and I go to Edit > Edit in Story Editor.
08:29The Story Editor on the left lists all of the paragraph styles
08:34that have been applied to every single paragraph in the story, and all you need
08:38to do is scroll through here and look for anything that doesn't say the name
08:43of an actual style, like this one, basic paragraph.
08:46So you shouldn't have any of that say basic paragraph in your document, unless
08:50you actually do wanted to format it with basic paragraph.
08:53The story editor unfortunately doesn't show plus symbol here, but you can assume
08:56that if it says basic paragraph, there is something wonky.
08:59So you can select this and then close the Story Editor and then find that
09:04text here and fix it.
09:07So you need to go through your documents and apply paragraph styles, and character
09:10styles before you export to EPUB.
09:13So the whole InDesign to EPUB export process depends a lot on how well you have
09:18applied your paragraph and character styles. So that's it.
09:22The best practice then is to make sure that all your text is formatted with
09:26paragraph styles and character styles.
09:28The resulting EPUB will be a lot easier to work with.
Collapse this transcript
Modifying nested, GREP, and line styles
00:00When I'm laying out a publication and formatting the text, I look for every
00:04opportunity I can to save time.
00:08For example, I'm always looking for ways to take advantage of InDesign's ability
00:12to automatically apply character styles to text based on some kind of parameter.
00:17What we're looking at is kind of like an ugly document right here that has
00:22the three different kinds of automatic character style applications that InDesign can do.
00:27We have nested styles, GREP styles and a line style.
00:31The problem is that when you export to EPUB, EPUB doesn't know anything
00:35about nested styles and it completely ignores these character styles that have been applied.
00:40So I'm going to show you that and then I'm going to show you how to fix that in
00:43a manual way and a fast automated way.
00:46So let's review this document.
00:48I'm going to zoom in a little bit and open up Paragraph Styles.
00:52Now this first paragraph, body no indent, has this green line at the top and
00:58that's because it has an actual line style that makes the first line green.
01:05So that means that as I edit this, arriving on or about, you see that as it
01:12wraps then it automatically just keeps, the green on the first line. That's a line style.
01:17And then what we have here, I'll talk about the red San Francisco in a second.
01:21This bold leading into this text here, this is the facts paragraph style and
01:27if we look there, we have a bold nested style occurring that takes place
01:32through the first colon.
01:35So that's why that is bold.
01:37If I keep writing 1846 to 1847 and so on, it stays bold.
01:43And then this red San Francisco is a very simple GREP style.
01:47A GREP style that's been added to the body style and what I told it to do
01:52was every time it came to the text that said San Francisco to apply the
01:56character style Red bold.
01:57All right, before I even export this to EPUB, I want to show you one little thing
02:02about character styles.
02:04If we open up the Character Styles panel and you click in any of this style text,
02:08you'll see that it says None at the top and None is selected here and that is normal.
02:15If you take a close look, you'll see the actual name of the character style
02:19down here preceded by the paragraph symbol, aka the pilcrow, and it tells you
02:25that this character style called Red bold right now is being applied via a paragraph style.
02:30So it's a little clue.
02:31So if you're wondering gee, how did this occur here, is it manual formatting or is
02:36it a character style or is it an automatic nested style, this little area down
02:40here will inform you.
02:41Now let's export this to EPUB.
02:43I'll use my keyboard shortcut to get it right on the Desktop.
02:48In this dialog box, I want to make sure that you turn on View eBook after
02:52Exporting so we can see it right away, and in Contents make sure the Generate
02:57CSS is turned on, turn off Include Embeddable Font, and turn off Preserve Local Overrides.
03:04Now the Preserve Local Overrides makes no difference whether it's turned on or off.
03:07You're going to get the same results, but I've noticed that if you turn on
03:11Include Embeddable fonts, I don't know if it's just because of these nested
03:14styles, but that really confuses Adobe Digital Editions.
03:17So just leave that off.
03:20So we exported it and you can see that we lost all of our character formatting.
03:24Well, all of the automatically applied character formatting.
03:27So let's go back here.
03:29What you need to do then is you need to what's called flatten nested styles or
03:33I've heard people call it expand nested styles.
03:36If you've ever done the kind of expanding of effects, for example, in
03:39Illustrator, it means make it not automatic.
03:42Make it as though you had done it manually.
03:44So you would select the word, San Francisco, here and actually click on Red Bold.
03:50And you have to do that for every application of every character style.
03:53Then when you export it, the EPUB will recognize that this is supposed to be Red Bold
03:58and it'll be coded as such in the internal XHTML file.
04:01Well, that is very tedious.
04:03You could speed it up a bit though if you use Find/Change.
04:06You got to Edit, go down to Find/Change. Just ignore the Find what and Change to
04:13fields. Leave them empty.
04:15In the Find Format field, click on the little magnifying glass, you want to
04:20search for the character style.
04:22Let's try Red Bold first.
04:24Actually, let's just try Bold. And then you want to replace with that
04:31same character style.
04:32So then you click Find and it finds the first instance of character style
04:41bold being applied.
04:42So you see, InDesign knows that it has been applied, even though it's been
04:46applied by a nested style.
04:47But when you click Change, it's actually going to apply the character style
04:51bold on top of that.
04:55So if I click Change, you see how it actually applied it.
04:59So you could do this a few times and just click Change All and do this for
05:02every single one of your character styles and that'll work.
05:06But that's still a little too tedious for me.
05:08You know me, I am a big script person.
05:10So I actually found a script that will do this for you automatically.
05:16We'll put up the URL to the path to download the script.
05:19It's written by a friend of mine named Herbs who is a wonderful plug-in
05:23developer for InDesign and he wrote this free script, because we were
05:27complaining about it on InDesign Secrets, how difficult it was to do this.
05:30If we go down to Utilities > Scripts, I've already installed it.
05:35It's called Apply Nested Styles.
05:38In the tool tip, you can see that he's put a little warning, because it's just a
05:42freebie scripts, not one for sale.
05:43So he didn't make it completely bulletproof. And the warning is that if you
05:48had applied another character style on top of this text like you can always
05:51select San Francisco and then make it Italic or something like that, you can
05:57apply multiple character styles to the same bit of text if you're using a nested style,
06:02it's going to clear out that additional bit of character style.
06:05That's what the warning is about, but I didn't do that in this document.
06:09So I'm not worried about it.
06:10All you do is double click it. You get no feedback.
06:14Again, it's a freebie script, but if you click inside the text, look in
06:19the Character Styles panel to confirm that the actual character style has been applied.
06:25So what you want to see is you want to see the name of the style here and then
06:28also at the top and then you can see down here that running the script did not
06:33change the paragraph style at all.
06:35So it's still a nested style, but now let's go ahead and export it to EPUB
06:39again, using the same exact settings. There you go.
06:48So now it has reasserted the character styles, just because they have one cool script.
06:55Thank you, Herbs.
06:57So if you are one of the smart and advanced users who are using nested styles,
07:01line styles, or GREP styles in your InDesign documents, that's very cool but
07:06make sure that you expand them or flatten them, whatever you want to call it,
07:10before you export to EPUB.
Collapse this transcript
Modifying tables
00:00If your document contained a table that you created in InDesign, like this
00:04one that you see here, the good news is that it will be included in the export to EPUB.
00:10Now most tables are actually part of the text flow already, so you don't have to
00:14worry about them being in the right order or not.
00:15Of course, if they're in their own text frame, then you need to cut the table out
00:21and place it into the text flow like I showed in the layout order video earlier.
00:25But the text itself in the table and the table construction will be included in
00:31the export. Let's see what that looks like.
00:33I am going to use my keyboard shortcut to export the EPUB and we will just go
00:37right onto the desktop, turn on View eBook after Exporting and in Contents, turn
00:43off Include Embeddable Fonts. You do want to generate the CSS.
00:49And I must make this larger. There is the table. Am I being mean?
00:55Did I not mentioned that the table formatting wouldn't come across? Sorry.
00:58The actual paragraph and character styles that you apply to the table do come across.
01:04I mean that first column is blue and the text is blue here, all right, but the
01:10formatting going to come across and that is just, you know, themes the breaks.
01:14Tables are problematic. If you have a whole lot of tables in your InDesign
01:18document, then this might not be the way for you to go. There is another way
01:22that I will show you in a bit.
01:23But the good news is that if you just have a few tables, what's interesting is
01:27that the code does come across for the table code.
01:31Let's take a look at this in Sigil, one of my favorite EPUB Editors. We will
01:36open up that EPUB file and here is that file that we were just looking at in
01:42Adobe Digital Editions.
01:44Let's look at it in Code view, and take a look down here. See those TDs?
01:52That means start table cell, end table cell, table data is what it stands for.
01:57TR means started new row, so there is a guy's name, Marcel, and then his middle
02:03initial is R I guess, and so on.
02:05The problem though is that if you look in the CSS file that is governing the
02:11formatting here, we have all of the CSS definitions for the styles, for the
02:20paragraph and character styles, but none for the table styles, and yes I did use
02:26a table style to format this.
02:29In fact, I believe it's only if you use a table style will you get the TD and
02:36TR sort of code here.
02:38So the answer is that what you could do is you could edit the CSS file and add
02:45some CSS rules for how you want the TDs and the TRs in the table cell to look.
02:51So for a TD for a table cell, you can specify background color and inset and all
02:56kinds of stuff and that will be a topic that we might touch on later but
03:00definitely it's a little bit more advanced CSS formatting is table formatting.
03:04But it is possible to do because you do have the bones there available.
03:08Now if that's not really your cup of tea, you just want to get the data in there
03:11and you want it to basically look kind of nice, there is another way to skin
03:15this cat and that is to change the table into an image.
03:20Now you have to be a little bit careful because if the table is too large,
03:24the readers will automatically scale the image that you are going to convert this
03:29to small enough to fit inside the screen and the table data might be
03:34completely unreadable.
03:35So you might actually prefer to keep it looking like this, so that as the
03:40screen becomes smaller the table data still stays together and is accessible
03:46and also of course it's searchable. If the ereader has a search feature, they
03:51can find this text inside the table, but if you convert it to an image, they
03:55wont be able to find it.
03:57So just some precautions to keep in mind and I'll tell you a tables are
04:00problem with EPUBS.
04:02But let's see how we would turn this into an image.
04:05I am going to turn on hidden characters so we can see all our little paragraph
04:09markers and stuff. You can see that this table is sitting inside of a paragraph
04:13and by the way even that paragraph of the table is sitting inside is called
04:17table and has a setting of it being centered the space above and below, which is
04:22why that was maintained when we moved into the EPUB.
04:26What I am going to do is I am going to cut off this table. I am just going to
04:28select this whole thing and press Command+X or Ctrl+X, and then out here on
04:33the pasteboard, I'm going to just drag out of text frame, all tables have to
04:37go inside of a text frame, and then with this table selected I'm going to export it as a JPEG.
04:45Now you might think "Well, I can just take a screen shot," but most screenshot
04:48programs will only take the screenshot at the resolution of your screen.
04:53What's cool about being able to export the JPEG is that you can set
04:56the resolution of JPEG.
04:58So I will go down to the File menu and I will choose Export. Now there are many
05:03other formats we could choose to export it. An EPS might be possible to use.
05:07I just kind of like JPEG because that is a format that is part of the EPUB spec.
05:12It would have to convert the EPS to a JPEG when you exported it and it might
05:16downsample it. In fact it probably would.
05:19You might want to say oh!
05:19What about a PDF or something like that?
05:21The problem is that we're looking for an Export mode that will let us export
05:25just the selection. We don't want to export the whole thing and really the only
05:29thing here that will let us do that is EPS and JPEG.
05:32So I am going to go ahead and export it right to the same folder and so we want
05:39to sure that Selection is chosen at the top.
05:41We want Maximum image quality, and Resolution usually defaults to 72. Make sure
05:47that it's set at a high-resolution.
05:49You don't want to go too high because then that might make the image too large
05:53or when InDesign needs to downsample it, if it doesn't downsampling when it
05:57exports then it might have even worse results.
06:00So just leave it at a decent resolution.
06:02We will leave it at color space RGB and keep these two options turned on and
06:07export it, and that's done. That was quick. Let's go and bring it back in, File
06:13> Place, and it's inside Tables. We don't want to replace anything that's selected.
06:26There it is. Now it doesn't look really good, but if you increase the display
06:30resolution, it might get a little bit better, a little bit better.
06:35It will look good in an EPUB, take my word for it.
06:38But now what we have to do, remember, is we need to anchor it inside the text flow.
06:41So I'm going to cut or copy it. I will just copy it. I will click right inside
06:46that same paragraph style and then I will just click Paste or I will press
06:51Command+V or Ctrl+V. If when you do this the image obscures the text above or
06:56below, it's probably because the empty paragraph that you've pasted it into is
07:01set for an absolute amount of leading. Make sure that it is set to Auto Leading
07:05so that the text will expand to hold it.
07:08Now let's go ahead and export this to EPUB again, out to the desktop and replace
07:13our old one, and make sure that it's all set, and there it is.
07:23Let's get our text smaller, so we can see it.
07:26So the table came through intact.
07:28It's quite easy to read I think, but it is an image. So again you can't search
07:32for any text in here and on some devices it may need to be scaled so small that you
07:37couldn't really read the text.
07:39However, there it is and it's got the same beautiful formatting that you worked so
07:42hard to achieve in InDesign.
07:44If you use this method, one idea that I should tell you about is to make sure to
07:48keep the editable table in the pasteboard.
07:50This guy over here, like this one that we brought in we can delete because we don't have it.
07:55But later on if you need to update this file, you don't want to have to
07:58re-create this table from scratch. So keep this guy handy. You might even want to
08:02put a little note here for the next person who takes over this file. Update this
08:06table, export to JPEG, and replace this image, before you export it to EPUB.
Collapse this transcript
Converting InDesign graphics
00:00As you've learned by now, when you export from InDesign to EPUB, the text that is
00:05on the pages comes across and the images that is on the pages, they come across too,
00:10but what doesn't come across is InDesign artwork.
00:15You can create lots of interesting things with InDesign's frames and lines and
00:19arrow styles and all of that stuff is ignored.
00:22You might think, oh, I never use that anyway, but what about something like
00:26callouts like in this file that we have open right here.
00:29We have this picture of my dog, Zoey, with a couple graphics pointing out her
00:34ears and her tail, and of course this is facetious, but I created these
00:39graphics with the Frame tool over here. In fact, we even have an objects style
00:43to add the red color and make them 2 pixels thick. Same thing for these strokes.
00:48All right, now I just grouped them altogether and this should be perfectly fine
00:51for PDF for print, but let's export this to EPUB and see what happens.
00:55Let me zoom out and then we'll use my keyboard shortcut for File> Export to EPUB.
01:01Let's put this on the desktop and under Contents, we want to make sure that
01:07Generate CSS is turned on, turn off Embeddable Fonts like export.
01:13Okay, the title came across fine and the byline and the text, but those two bits
01:19of captions, they're sort of on top and below the picture, which is on the
01:23left, and our callout graphics are completely gone.
01:26They're nowhere here.
01:27So how can you get it back?
01:29Well, you know, I'm sorry, but InDesign is just too dumb to do the conversion itself.
01:33I think it's a huge flaw in the program and hopefully, in an upcoming version,
01:37they will add it in or decide oh yeah, that would make life easier for all of
01:43our users who are using this EPUB export.
01:44In the meantime, grouping doesn't help, as you can see that's what I tried first.
01:48What you need to do is basically export this conglomeration to some other file
01:54format and then place it in here as a linked graphic, similar to what we had
01:59to do with the table in a previous video, if you want to get that table formatting in.
02:04So you can use the same method that we used for the table, which is to make this selection.
02:08It doesn't have to be group to select it.
02:10Just select everything that you want and then you can export it to JPEG.
02:13So you just go to File > Export and choose the JPEG format and then place that.
02:19But I want to show you a couple different ways that you can do this and one of
02:22them involves a script that might make your life a heck of lot easier.
02:26First, let's place this into a new blank InDesign document and then we'll
02:31place the InDesign file, because of course you can do that for the past
02:33couple of versions.
02:34So I'm going to take this. I'll move it over to this side for now.
02:39I'm a going to copy it and then create a new InDesign document by pressing
02:43Command+N or Ctrl+N and I don't need Facing Pages.
02:46I'll just leave that all set up and then I'll paste.
02:50So there is my little artwork and then I'll save this document.
02:54I'll save it on the desktop as zoey graphic pasted.
03:01Then back in my original file, I'll go to File > Place and find that InDesign
03:07file and then just click to place it.
03:10Now see the problem here is that it places it with the bounding box of the
03:14entire page and so you need to crop it by dragging these things in, just like
03:21you would with an image.
03:22Unfortunately, when you place it, you can't say just bring in the artwork like
03:26you can if you place a PDF and you're looking options, you don't want to do
03:28that, not with an InDesign file.
03:31But anyway, now we can just move this InDesign file over here and this is
03:35actually a linked graphic.
03:36If you look in the Links panel, you'll see the InDesign file is there and it
03:40knows that it has zoey.jpg there.
03:41Of course, it's not going to export this out on the pasteboard because exporting
03:45to EPUB ignores stuff on the pasteboard.
03:48I'm using the same keyboard shortcut.
03:49We'll export and replace this, same settings. View eBook.
03:54Same settings for CSS.
03:56So that's a little better, but let me show you an automated way to do that.
04:00I'm going to get rid of this and we'll go back to how we were, this guy right here.
04:05This time, I've installed before I even started recording this video, a free
04:10script that I love called Layout Zone and it's available cross-platform for CS3 through CS5.
04:17It's a little more complicated than a normal script.
04:19You can't just drop it into your Scripts folder.
04:21You actually have to drop a bunch of folders into your Application folder and
04:25then restart the program.
04:26That's only because Layout Zone adds an actual menu item here that you can even
04:31assign a keyboard shortcut to if you want to.
04:33What I'm going to do is I've selected this graphic with zoey in the callouts and again,
04:39it doesn't have to be group.
04:40You can just make a multiple selection and then with it selected, you come to
04:43Edit > Layout Zone and choose Assign Zone.
04:47What it's going to do is create a separate InDesign document, just like we just
04:50did manually, except it's much faster.
04:53So it's asking where do you want that InDesign file to be saved and what do
04:56you want to name it.
04:57So I call it zoey layout zone, save it on the desktop, and then you get this
05:03wonderful dialog box that says what do you want to save.
05:06The Selection or the Page that you were on, and should it replace the
05:11objects with the document?
05:12Yes, that saves a ton of time.
05:14There are some other settings here that you can just leave as is.
05:17Click OK and there it is.
05:18So it is already placed it as an InDesign document.
05:23There it is again, up here.
05:25Now actually even before I export to EPUB, I'll just do one more thing.
05:28Let's actually bring it inside the text.
05:30I'm going to anchor this to the text flow, if you remember from my previous
05:35video about how to get the images in the middle of the text flow.
05:39I have a style here called Image Centered, there we go, and then I'm just going
05:44to take this graphic.
05:45Notice this actually has nothing to do with the script.
05:47I'm cutting it to the clipboard and then pasting it in as an anchored graphic.
05:50I just want to you know show best practices, that normally you don't want to have
05:54graphics just sort of floating around.
05:55If you want the graphic to appear in the body of the text, you need to anchor it in the text.
06:00There we go.
06:00Now let's go ahead and export this to EPUB replacing the existing file. Export.
06:07So it's still an image. Again, like what happened when we place the table
06:12that we converted to JPEG, this is artwork and you cannot search for things in the artwork.
06:18But the beauty of it is that it maintains the exact same formatting that you had
06:23done so carefully in InDesign.
06:25It brings along all the things that InDesign is too dumb to bring along, all the
06:28InDesign artwork, and what's even better is that other people can work on the
06:33external InDesign file, that zone, and they can edit it and then it would show up
06:38as being out of date, or if you've used the Layout Zone to do this, as I have,
06:44now Layout Zone though has a problem with anchor graphics.
06:47So if you need to do something related to that script, you have to un-anchor it.
06:50So I'm selecting it, cutting into the clipboard, and then pasting it so it's
06:54just a floating image.
06:55I can go back up to the Edit menu to Layout Zone and say Convert Zone and what
07:01it will do will be to create the objects just as they were originally there. There we go.
07:07There is our original InDesign file.
07:08So we didn't even have to recreate it or export it or whatever you want to do.
07:12It's just another feature that's part of Layout Zone, a free script
07:14from Automatication.
07:16So when you're trying to include your beautiful InDesign artwork in your EPUB,
07:21there's no way around it for now, I'm sorry to say.
07:23You need to turn it into a graphic and then place that graphic.
Collapse this transcript
Manually optimizing images
00:00All the artwork that you place or import into your InDesign document, whether
00:04it's an image or a PDF page or even another InDesign file, as long as it is
00:10within the page boundaries of your InDesign document, it's going to be
00:13included in the EPUB Export.
00:16And regardless of what resolution it's at or how you sized it, what you see is
00:21really what you get, except at a lower res.
00:23All right, so the size that you have in InDesign, the dimensions are
00:28matched when you export to EPUB; however, InDesign will automatically down
00:33sample the image to 72 ppi.
00:37I've placed here a medium res image, it's a 180 pip, and if we look at the Links
00:43panel down here in Link Info, you can see that I have scaled it smaller so that
00:49the effective PPI is 517.
00:52Now the image width and height I have measured up here in pixels and you can see
00:56that I have changed my ruler to pixels as well.
01:00So if you just right-click, you might change it to pixels on both the horizontal
01:04and vertical. That way you get an idea of what this is going to look like in the final EPUB.
01:09Notice that this document I have set to be 600 pixels wide, which is the width of
01:14a lot of ereaders, and if you are creating a document from scratch in InDesign
01:19you might as well set up the dimensions to match the live page size or the live
01:25image size of the ereader that you're targeting or that you think that most of
01:28your users will be using.
01:30Dimension of 600 wide by 800 pixels tall is usually a good compromise.
01:35So as you can see, this image should take up about half of the screen width.
01:41So, let's go ahead and export this to EPUB.
01:43I use my keyboard shortcut to export to EPUB and we will export it right on the desktop.
01:49We want to turn on View eBook after Exporting.
01:53And under Images now I am going to cover this in a lot more detail in another
01:57video later on, but for now just know that whether or not you have Formatted
02:03turned on, InDesign is automatically going to down-sample this image to 72 ppi.
02:09Now if you want InDesign to match the scaling and the cropping when it exports to
02:13EPUB, which you probably do, then make sure that Formatted it turned on.
02:17So we will go ahead and export this and there is the image in EPUB document.
02:25Now if we switch back to InDesign and we change the View scale to 100%, the size
02:32of the image that you see here is the size of the image here in EPUB.
02:37If we go back to InDesign and we do something like say rotate the image and
02:42then export that to EPUB, replacing the existing one, and as long as Formatted
02:48is turned on, Export, then it's also automatically exported with that
02:53formatting in the EPUB.
02:55Now a couple things about optimizing your images in InDesign. I know a lot of
02:59people wonder well, if it's going to down-sample everything to 72ppi and I
03:04really have no control over that, then shouldn't I downsample my own images to
03:0872ppi so I can apply my own sharpening in Photoshop first?
03:12Well, actually you might want to consider doing that if the images are critical,
03:16so understanding what's happening in your EPUB. You know if the images are just
03:20sort of illustrative then it's a lot of work and InDesign does a pretty good job
03:25of the downsampling.
03:26But I did a test here. What I've done is I've created a two page document and on
03:31each page there is a different kind of image. There is a GIF and there is a JPEG
03:35and on each one I have a high res version of it that I created in Photoshop.
03:40All right, so this is just a square that is a Photoshop file and its 300 PPI.
03:45This is the same square that I've down- sampled to 72 and I have saved it out as
03:50a GIF and then on this page, it is a high- res picture that I took and that is 300,
03:58called window-hires and below that I change the resolution in Photoshop to 72
04:02and saved it out as a JPEG.
04:05What I want to show you here is two things.
04:07First of all, we're going to be able to compare how InDesign does when it
04:12compresses or re-samples each one of these images to 72, and it does touch even
04:18the ones that are already at 72.
04:20Second, we are going to see that when InDesign does its automatic conversion to
04:24either GIF or JPEG, it will almost always choose JPEG.
04:29In fact in my experience the only images that it exports to GIF are the ones
04:33that are GIF to begin with.
04:34Let's export this to EPUB, image tests, and make sure that View eBook after
04:41Exporting is turned on. Under Images it is going to say formatted and we are
04:46going to leave it at Automatic.
04:48You would think that this means that InDesign is going to look at the
04:50composition of the image and if it's a solid color it'll keep it at GIF,
04:54otherwise it will convert it to JPEG, and actually it doesn't.
04:58It convert everything to JPEG.
05:00Let's move the JPEG options image quality to high and then let's export this and
05:05let me expand so we can see it better.
05:09So this was a high-res PSD file and here's the low-res GIF.
05:13Now actually it looks exactly the same as how it does in InDesign and you can
05:18see there's a little bit color difference between the PSD and the GIF file.
05:21So that one didn't make that much difference, so if you have images that are just
05:24flat color even if they are at a high -res from Photoshop, it really makes no
05:28difference if you downsampled them.
05:31But take a look at the difference between these two photographs. This was the
05:35300 ppi image that InDesign down sampled to 72 on its own and this was the 72
05:42ppi image and it did a much better job with 72.
05:45All right, so if your images are high-res, you might want to consider
05:50downsampling them yourself and replacing them in your InDesign file before
05:54you export to EPUB.
05:56Just FYI in your exercise folder, I created a folder where I took that EPUB from
06:02image test and I expanded it so you can see its contents.
06:05We will be talking a lot more about this in future videos.
06:09But in the folder where it contains the images that it downsampled, notice that
06:13it made a JPEG, even of that flat color.
06:17So everything came out as JPEG except for the one that was a GIF to begin with.
06:22One last tip I want to tell you about especially people who are creating ebooks
06:25specifically for the iBook store on the Apple iPad and that is people have
06:31discovered that you can create an image that is the exact height and width of
06:37the entire iBook page if you resize it to exactly these measures.
06:42860 pixels high by 600 pixels wide, I've heard it called the magic dimensions
06:50because it effectively acts like a chapter break or page break. This will always
06:55appear completely on its own page. The iPad will never break it up into two pages
07:00like it sometimes does with larger images or images of a different resolution.
07:04And so, an image that's exactly half of this, like 600 pixels wide by 430 pixels
07:11tall, like this image, will take up exactly half a page.
07:15Now if you want to do this to your images in InDesign what you do is make this
07:20back to zero, is that you come over here to the width and the height and you
07:26enter exactly 600 wide by 860 tall. Of course in pixels all right or points.
07:35So all we have done is resize the frame and then you go to the Object menu >
07:39Fitting and choose Fill Frame Proportionally.
07:43So now this image is exactly 600 x 860 and of course you can move the image
07:48around within these dimensions to get it to you know fit better or to do a better crop.
07:53I went ahead and exported this document, starting from up here, to EPUB and then
07:59I put it on my iPad and took screenshots you can see what it looks like.
08:03So looking at it in normal portrait orientation, this is page 1 and then when
08:08you flip the page this is page 2.
08:10So that image, that large image, took up the entire page and there is page 3.
08:14So if you want to have an image separate chapters for example you could do this way
08:18by inserting that large image in between sections of type.
08:22Here is the half page image.
08:24That looks pretty good and even if you rotate the iPad so that the orientation
08:29is landscape, here is page 1, here is page 2, it looks pretty cool, huh, and there is
08:36the half page image.
08:37So those are some tips for optimizing your images in your InDesign document
08:41before you export to EPUB.
Collapse this transcript
Creating a cover image
00:00When you're looking in the iBookstore or you're on Amazon, looking in the Kindle
00:04bookstore or you're in B&N Nook bookstore, when you're looking for ebooks,
00:10you're looking at covers.
00:11So it's not all about the content when it comes to digital publishing.
00:15A lot of people are still making choices based on the book's cover.
00:19So the cover image is very important when you're creating an ebook and
00:24unfortunately, it's a moving target as far as exact technical specifications.
00:30A lot of the specifications are moving target.
00:31There are a few things that we know for sure and that's what I'll tell you now.
00:36I'll also give you some pointers in this video and in my final video about how
00:40to keep up with the field and learn about where the target is now.
00:44I guess the question is first of all, what do we know for sure.
00:47Well, we know for sure that the cover has to be an image.
00:50So let's say that you're laying out a book, like take a look at this book that
00:54we have on screen right now.
00:55I'm going to zoom in a bit and we have a page that's made up to be the book's cover.
01:01Now you might have an InDesign file that stands on its own that's for the cover.
01:05It's not merged with the content of the document.
01:07That's perfectly normal.
01:09But I would imagine that you've created the books cover in InDesign, even if the
01:15background art is safe from Photoshop, you've added titles and the author's name
01:20and other information to the cover this way.
01:23Now, if you export this document to EPUB, I think by now you know what's going
01:27to happen, but let's check it out.
01:29If we use my keyboard shortcut for export to EPUB format and we want to make
01:34sure to View eBook after Exporting and in under Contents, Generate CSS, Include
01:39Style Definitions. Let's export this guy.
01:42What happened is that it took the text from that text frame on the cover, here
01:46and here and then it took the image and then that's just part of the EPUB.
01:50Let's come back here.
01:52When you export to EPUB, you don't get the cool drop shadows or anything like
01:56that either so that was deleted.
01:58What you need to do is you need to convert this into an image and make that the cover.
02:03You'd do it the same way that we converted artwork to images in the video about
02:09working with InDesign art and the video with working with tables is that you
02:13need to export this part of your InDesign file to some other format so that you
02:17can place it in here.
02:19So for example, you might even cut and paste it into Illustrator of it's a
02:22simple cover, or you could make a selection here and export your selection to
02:28JPEG and place the JPEG.
02:30It's a perfectly legitimate way to do this. I would just select it, choose
02:34Export, choose the JPEG format, and then on the desktop, I'll call it
02:38calif-stories-cover.
02:42And what's cool about export for JPEG in CS5 is that you can export just the
02:45selection rather than the entire page, for example.
02:49Choose a nice high-resolution and click Export and then we'll move this guy out
02:54to the pasteboard so that if we ever need to edit it we can, and then we'll
02:59replace it by placing. I just press Command+D or Ctrl+D to place.
03:03We'll place the JPEG right there. So let's try that.
03:08So we've placed the JPEG and now let's export this to EPUB.
03:12It's going to ignore this because EPUB ignores stuff that's completely on the
03:16pasteboard, and we'll just check our settings that everything is same as before.
03:20Yup and there we go. There's the cover.
03:23So the cover came through as an image.
03:25Now I would not worry about, I know that you're looking over here, maybe the
03:28thumbnails, saying "The thumbnail is cutoff!!"
03:30This is an issue with Adobe Digital Editions and I really don't know of a
03:35way to get around it.
03:36But I can tell you that if you're looking at on a Nook or on a Kindle or
03:39on the iPad, that the thumbnail image is perfectly fine.
03:43But you know, while I'm talking about those different readers, one issue that
03:46a lot of people ask me is "Well, I want the cover image, when they open up the
03:51EPUB, I want the cover image to take up the entire imageable area of the device.
03:56So how do I do that?"
03:58They don't want any white space surrounding the cover.
04:00Well, I think that there're better things that you can spend your time on, but
04:04what you would need to do would be to go to one of these pages.
04:07These are all from a Wiki that's been put together by the good people who
04:11populate mobileread.com, one of my favorite resources, the free online forum for
04:17people who are working with mobile ereaders.
04:21What they've done is they've come up with product matrices for every single
04:25ereader known to man along with all the details.
04:28Like this is the one all about web tablets.
04:30So you can see here are the actual dimensions of an iPad and its
04:34display resolution.
04:36So according to this, you would have to make your image 1024x768 to completely
04:41fill the iPad screen.
04:42Now actually, it's not that simple and it's not that bad, because first of all,
04:47as long as you match basically the ratio of height to width then you can use CSS
04:52to automatically scale the image to fit the device's screen and we'll be
04:58talking about that in the later chapter, but if you want, this is actually
05:00very good information and all these pages with information about all of the
05:04different kinds of ebook readers.
05:06So here we're looking at the ones that use e-ink devices.
05:09So there's the Sony ereader, and it goes on and on forever, six-inch devices and so on.
05:14By the way, you know, right now as I am recording this, Kindles are
05:18black-and-white, but who knows one day they are going to come up with a
05:21colo, Kindle, right?
05:22And the Kindle ereader software that you can install on a PC and on Mac and on
05:28iPhone shows color images.
05:30So if you are worried,oh, I need to make a black-and-white version of my cover
05:34for the Kindle, don't.
05:35Create a color image and then when we talk about converting to a Kindle, we'll
05:39talk a little bit more about the conversion that they do to grayscale.
05:43But don't worry about creating two different covers for the
05:46black-and-white versus color.
05:47I'd say in general this is a Sisyphean task trying to make an image fit each
05:53one of these devices perfectly.
05:56What I would recommend instead is that you shoot for 600x800 or a similar kind of
06:02ratio, and even that's not necessary on the iPad.
06:05If you make a square book cover, it'll show up as a square book cover miniature
06:11on the iBookstore shelves. It looks pretty cool.
06:14And once a person clicks it and they start reading, they don't really care about
06:17what the cover looks like.
06:18They just care about the interior of it.
06:21Something else that you should know about covers is that if you're going to be
06:26distributing them through a reseller like the iBookstore or Kindle, they often
06:31have their own requirements about what can go on the cover, and when we get to
06:34that chapter about working with the resellers, we'll talk about some of that.
06:38But I can tell you for sure what they don't want to see is information about the
06:42other editions that this ebook is available at.
06:45So you don't want to have any content on your cover that says also available as paperback.
06:51You don't have anything like that and you don't want any pricing information on the cover.
06:55So just have a title, an author, and that kind of generic text along with any
07:00kind of graphics that you might want.
07:02But basically what you need to do is create an image of the cover in any of the
07:05ways that we've talked about so far.
Collapse this transcript
Adding a custom TOC as the first page of an EPUB file
00:00When I'm reading an EPUB one of the things I really appreciate is if the
00:04producer has taken the time and trouble to create an internal linked table of contents.
00:10I mean whenever you're using an ereader like we are using right now, Adobe
00:14Digital Editions, they usually have a special section that is an automatic table
00:19of contents and we've talked about that in a number of videos, of how to populate
00:23this section over here in the left with those links.
00:26It is something that can be hidden or shown from somewhere within the ereader.
00:30Like in ADE I can just choose Hide navigational pane.
00:34So you see that this is how I prefer to read this EPUB.
00:37If I want to quickly jump from section to section, it would be nice if there is
00:41a way to do that and actually in this EPUB there is, because the person who
00:46created it made a linked table of contents within here.
00:49So I can just click on the Foreword section to jump to Foreword for example or
00:55let me move back up California's Name and Early History to go there and it is
01:00also good because a lot of ereaders, I don't know how many you've tried, like
01:03the Nook and all those other ones, sometimes they have little tiny icons in the
01:07corner and you can never remember which one is the table of contents.
01:11The navigational table of contents, the navigation pane.
01:14But it is usually pretty easy to get to the beginning of the book and if at the
01:18beginning of the book you have a linked table of contents, that makes it a lot
01:21easier on your readers.
01:22plus of course, the other advantage is that if you are actually adding this to
01:26the content of the InDesign file, this page with its links, then you have
01:30complete freedom about what you want to put in here.
01:33It could be a list of illustrations.
01:35It could be a list of recipes.
01:37It could be links to pictures.
01:39It doesn't have to just be the same thing as the chapters over here on the left.
01:42So how do we create this?
01:44Well, let me show you.
01:45We will go back to InDesign where I have a version of the book that we've been
01:50working with, Stories of California, that has a number of chapters.
01:54California's Name And Early History and so on, and there already is a spread
01:58with the contents page here.
02:00Now this is actually not quite usable.
02:04What I did was I placed an actual table of contents.
02:08Let me show you what I mean.
02:09If I delete this frame and I go to the Layout menu and I choose Table of
02:14Contents, then I can just click OK and then it will load a table of contents for
02:20me using these settings.
02:22Now I have already created the table of contents style and I know what I want to
02:26include there, because I have been using this to chunk up my long InDesign file
02:31into multiple chapters so that that automatic navigation panel appears
02:35correctly, and you might be tempted to say, "Hey!
02:38I already did this work.
02:39why not use this as my internal table of contents?"
02:42So I am going to click OK and place it.
02:45There it is and let's see happens when I export this EPUB to the Desktop.
02:50Let me call it something else.
02:52I'll call it cali-1 and you want to, based on page layout, View eBook after Exporting.
02:59Under Contents we are going to go ahead and chunk it up into the Basic TOC and
03:04then generate the CSS.
03:05That's all good. Click Export.
03:08So that all came out, but where is the thing that says Content?
03:11Well maybe I didn't-- I forgot to include that header. Let's just scroll.
03:16Well, where is the foreword? It is not there and we are on page 3 already.
03:19You know, what happens and it is so evil I think is that when you place an
03:23automatic table of contents, the Export to EPUB command ignores it and if you're
03:29wondering, you know there is no dingleberry or anything hanging off the frame
03:32edge as to say this is an automatically generated TOC.
03:34What you need to do is select the frame and go to the Edit menu, go to Edit in
03:39Story Editor, and if you see these little icon surrounding everything, then you
03:43know this was an automatically generated table of contents.
03:47So the first order of business is getting these contents in here a normal text
03:51frame and that's something that was automatically generated, so that it will be
03:54retained in the Export to EPUB process.
03:57What you could do would be to actually manually delete each of these from this
04:01text frame or you could just copy and paste these words on to a new text frame.
04:06Or another way is to take this existing TOC and export it to a Rich Text Format
04:13and when you do that, that retains the styling information, but loses the "TOC-ness"
04:18of it and then you can replace that.
04:20An in fact that's what I did in this little frame to the right edge here.
04:23So let's replace this. I am just going to delete this.
04:26This is a normal text frame using the same content.
04:30So that's the first order of business is getting content ready for you to
04:32start linking and I am just going to double-check, by pressing Command+Y or
04:36Ctrl+Y, that there's no little links around here.
04:39So it is a normal text frame, right?
04:41And in fact I can just quickly export it just to make sure that it is going to be included.
04:47Contents. There it, all right, but nothing is linked.
04:50All right, so let's get started linking.
04:52There is two ways to make links in InDesign CS5.
04:56One is by making a hyperlink.
04:57The other one is by making a cross reference.
04:59It is really up to you which one you want to do.
05:02The first order of business though is opening up the panel, so that's under
05:05Interactive and you can choose Hyperlinks and Cross-References is at the bottom here.
05:10If you want to learn more about Hyperlinks and Cross-References, definitely
05:14watch videos on those in any of the other InDesign titles at lynda.com. We are
05:18not going to be able to talk about this in detail.
05:21But first let's talk about creating an internal hyperlink.
05:24Say that we want Foreword to link to the Foreword section.
05:27You can't really create an internal hyperlink without first creating the destination.
05:32So what you will do is you go to where it says Foreword, select it, and then in
05:37the Hyperlinks panel menu choose New Hyperlink Destination.
05:41It's going to be a text anchor and it automatically selects what you had
05:45highlighted gives it that name, which is nice.
05:48All right so now you have that anchor.
05:49Now we can select the word Foreword and in the Hyperlinks panel click New Hyperlink.
05:55You don't want to link to an external URL, you want to link to a text anchor, and
05:58the anchors that you have created so far in this document appear in a list.
06:02All right, that's pretty straightforward.
06:04Now if you are working in a book, in a collection of multiple InDesign files,
06:08then you would need to still make the anchor in those other files.
06:12If you are doing hyperlinks across documents you'd still need to do that.
06:15Then you just need to remember to open up the correct document file here.
06:19Otherwise it is not going to show you the text anchor there.
06:21Anyway, we will just go ahead and do that as one example. And we didn't apply any formatting.
06:25We could have if we wanted to, but we are just going to leave it alone for now,
06:27and most ereaders will apply their own default formatting by the way.
06:32Now, let's do a Cross-Reference.
06:32So I am going to select this and instead of making a hyperlink-- what's nice
06:36about Cross-References is that you do not need to create a text anchor first and
06:41also the Cross-Reference is made up of the text of the destination paragraph, so
06:45if later you edit this chapter name, this will automatically update to match.
06:49So the Cross-Reference is this little cross-arrow here.
06:52We want to create a Cross-Reference to that chapter called California's Name and
06:57so we need to know the paragraph style.
06:59I know it is chapter title and there is California's Name.
07:03We want the full paragraph.
07:04We don't need the page number.
07:05So we are using the Cross- Reference format full paragraph.
07:08We don't want to apply any kind of special linking formatting to this, so
07:13we will just say OK.
07:13Now it automatically used quote marks around here, which is part of that default
07:18format, but you can always create your own custom formats.
07:21All right, so let's export this to EPUB and see how it works.
07:25Just use the same settings as before. Use Contents.
07:29There is the links and click and it doesn't work. Click.
07:34It doesn't work!
07:35This is a known bug in InDesign CS5.
07:39Maybe by the time you are watching this
07:41they would come up with an update that fixes this bug.
07:45There is a script and here is the URL.
07:48If you go to this person's site, he has got a script called "Corrections of links
07:53in epubs made with InDesign CS5."
07:56It's a free script, like all the scripts that I have shown you so far.
07:59It will request a donation if you really like it.
08:01It has got information here about what the script does, but I've already
08:05installed it in InDesign.
08:06I want to show you how it works.
08:08Like a couple of the others scripts I have talked about, it adds a menu command.
08:13Under the File menu > Export for,
08:16look at this, EPUB with corrected links.
08:19All right, so choose that instead of the EPUB and it is almost exactly the
08:26same as exporting to EPUB.
08:27We get the same dialog box.
08:29I will replace that. All this is the same.
08:32Click Export. You get one more alert that asked you to enter the publication
08:38year and this is just an extra thing that Taos added because you are supposed to
08:43be able to include a publication year as metadata inside of an EPUB file and
08:48InDesign doesn't let you do that.
08:50So he just threw this in to make a little easier down the road. So go ahead
08:54and enter something.
08:55All right, so here we are.
08:57Let's go to Contents, there are the links. Ah@
09:02Now they work, right?
09:05If you go to Taos's website and read those instructions, they will tell you when
09:09it works and when it doesn't. It's not perfect, but at least in this example it
09:13makes your links work correctly.
09:15Now if you are not able to use the script or you run into one of the issues
09:20with links that Taos talks about that his script doesn't fix, you can always fix it
09:25later in the EPUB file.
09:26You can always fix it in post as they say.
09:28And we are going to have a whole video about working with links and fixing them
09:33in the EPUB files themselves later on.
Collapse this transcript
Adding metadata to an InDesign file or book
00:00When you open up an EPUB one of the things that shows you other than the content
00:04is some information about the book itself.
00:07Like even as simple as the name of the book and the author appears here in Adobe
00:11Digital Editions in the navigation\ panel.
00:14The title is A Brief History of San Francisco and the author is Anonymous.
00:18This is metadata and it's just two different kinds of metadata that an EPUB can
00:23have, and an EPUB can have dozens of different entries, publication dates, author
00:28name, copyright information, description, subject headings, all sorts of things.
00:33Now there is a limited amount of information related to metadata that you
00:39can add to the InDesign file itself; otherwise to add additional metadata to
00:44the file you'll need to edit the EPUB file and we'll be talking about that
00:48in the later video.
00:49But first let's talk about how do you add this kind of information in InDesign.
00:53We switch back to InDesign where we have a document opened, that's just
00:57simple three pages worth of text with some headings. Let's just go ahead and
01:01export this document to EPUB without doing anything special.
01:05So I'm going to go to the Desktop, export history text.epub, with my keyboard
01:11shortcut, and we want to view the ebook after exporting. Include Document
01:16Metadata, you might have noticed there is something that you can include here
01:19but we're just going to bypass this for now. Just leave it alone.
01:22In Contents I want to include the InDesign TOC entries with these checked, so
01:28chunks of the document and Generate CSS, not the fonts. Export.
01:34So look at over here. Instead of the title of the document it's a title of the
01:38InDesign file or the title of the EPUB actually because it ends with .epub and
01:43the author is unknown. Everything else seem to work fine.
01:46So where do you add the title of the book and the author name, at least here?
01:52You do it in a very lonely dialog box called File Info.
01:57It's something that not a lot of the InDesigners are accustomed to.
01:59If you are photographer you're very accustomed to adding metadata to your photographs.
02:04But over here in the File menu, if you go down to File Info toward the bottom,
02:09you'll open up this big dialog box.
02:12It's pretty empty as you can see, and this is where you'd enter the name of
02:16the book. So we would call this A Brief History of San Francisco. You see I've
02:20done this a few times.
02:21So it's remembering the recent titles that I did, and the author instead of
02:26Anonymous I'm going to say my name, just for fun, right. You can give yourself
02:30a title if you'd like. I'll say Grand Poobah, and then a description of the book.
02:36Enter whatever you'd like, and something else you might want to enter are keywords.
02:40Now the thing is that you'd like why am I even bothering with this information
02:43if you can't see keywords in the EPUB Reader.
02:46It's because with tens of thousands of EPUBs out there, when you go to a
02:52bookstore like the Kindle store or the Nook store or the iBookstore and you
02:57search for a book, you are often entering keywords in the Search field.
03:01Maybe you don't know the exact title but you know you're looking for something having
03:04to do with California.
03:06Now this title does not have the word California in it, so one of the keywords
03:11should be California.
03:12So you'll go ahead and enter multiple keywords here. This is something that you
03:16can also do in the EPUB file itself after you start editing it. A little more
03:21difficult there let me tell you, and also I've noticed that a lot of ebook store
03:25retailers when you upload your EPUB they'll often have a form for you to fill-out
03:29with additional metadata as well.
03:31But my feeling is if InDesign is offering the feature right here, why not
03:35take advantage of it?
03:36I mean, you paid for it, right. So California History San Francisco, go ahead
03:42and enter all of these as well, and just separate these keywords as this says
03:46with semicolons or commas.
03:48You can choose the Copyright Status, so if it's in public domain, if it's
03:51something that they got from Gutenberg like we did with this book you can choose that,
03:56 or if it's actual copy written then you can go ahead and enter in your
03:59copyright information along with the URL. And we'll just say OK.
04:04And now let's go ahead and export it to EPUB again, replacing our old one using
04:10the same exact settings, and there we go.
04:13I wrote this wonderful book called A Brief History of San Francisco.
04:16So the File Info panel is where you want to go in InDesign to add your metadata.
04:23And by the way if you are using the book approach to creating an EPUB, you know
04:27with the book panel and a collection of InDesign documents, you want the master
04:31document in that Book panel to be the one that you add the File Info to.
04:36That way it'll be included with the entire EPUB when it's exported.
Collapse this transcript
5. Exporting to EPUB
Choosing general EPUB export options
00:00When you choose Export for EPUB and you get the Digital Editions Export Options
00:06dialog box, there are three panels that you need to make decisions in.
00:11So let's talk about the decisions in the General panel and this is easy as pie.
00:16First of all under eBook itself, do you want to include document metadata and you
00:21normally always want to.
00:22You can add a publisher entry for yourself so if you happened to know that
00:26you're Acme Publishing go ahead and do that.
00:29This is not something that's going to make or break your EPUB file. If you forget
00:33to enter the correct information or you entered it wrong, you can always edit
00:37the actual component files of the EPUB later. But why not add it now?
00:41Now under Unique Identifier, this is kind of funny. InDesign will automatically
00:45enter this weird combination of numbers for you if you don't enter anything here
00:49yourself and you have turned on Include Document Metadata, because every EPUB
00:53has to have a unique identifier. That's actually one of the requirements to pass
00:58validation for an EPUB file.
01:00Normally what you're entering here is your ISBN number. So if you know your ISBN
01:05number then you should go ahead and enter it. So I'll just say 123-456-123456, there we go. [00:01:014.00] We can just leave it at that.
01:15It can be any number that you want, but this is normally where the ISBN number should go.
01:20Then how should InDesign export the content of the EPUB, should it be based on
01:25page layout or based on the XML structure that you have created in set up?
01:30And I covered each of these in detail in a previous video.
01:34The default is to base it on the page layout.
01:36Then under Bulletin and Numbers if you're using automatic bulleted lists or
01:41automatic numbered lists from InDesign, the kind that are part of a paragraph
01:45style or from the paragraph formatting menu, then InDesign can automatically
01:51convert those to the closest equivalent in a web design land, called an Unordered
01:59List and an Ordered List.
02:01So an Unordered List is a bulleted list in the web code, and a numbered list is
02:07called an Ordered List.
02:08Now it's not 100% successful in that if you had special formatting for your
02:13bulleted and numbered lists, that doesn't go through as well.
02:17It just sort of creates generic ordered and unordered list and then you have to
02:22fiddle with it in the CSS.
02:24But it's usually something that you want to keep turned on.
02:27You don't want to have to re-create these on your own.
02:29You have the option of having InDesign automatically convert them to text before
02:34it exports it to EPUB, and this is exactly equivalent if you had chosen Convert to
02:40Text within InDesign by selecting some automatically bulleted text, for example,
02:44right-clicking and choosing Convert to Text.
02:47So it's an actual hard-coded bullet, an actual left indent, and hanging indent
02:52set up for this thing.
02:53And that will also be supported in the final EPUB file.
02:57So it will still look like a bulleted list, except it'll be coded as a regular paragraph.
03:02It makes it a little difficult to deal with.
03:04So normally you want to keep these set to at the defaults to map to their equivalent.
03:09And finally do you want to view the ebook after exporting? Well of course you do.
03:13I don't even know why there is a checkbox.
03:15I have a special affection for this panel because it's one of the easiest ones
03:19to deal with in the entire InDesign to EPUB workflow.
Collapse this transcript
Choosing EPUB export options for images
00:00When you export an InDesign file to EPUB and you arrive at the Digital
00:04Editions Export Options dialog box, you need to make some decisions about the
00:08images in your file.
00:10Now if you have no images in your file, you can go ahead and skip this whole panel.
00:14But you know there are a lot of things that you might have in your file that
00:17you forget our images like graphics that you've pasted into the text flow and things like that.
00:22So it's asking, first of all, should it maintain the formatting of your
00:27images or should it not.
00:29If you say maintain formatting, which is the default, it's checked on,
00:33that means that it will maintain the same crops, for example, of the images you
00:37brought in and it will maintain the same scaling.
00:40It will also maintain any kind of effects that you have applied to the image
00:45frame, which is very unusual,
00:46something that you cannot do with the text-frame.
00:48So for example, if you apply a stroke or a color to the stroke of an image
00:52frame, that will come through in the EPUB.
00:55If you apply a drop shadow, that will also come through.
00:58So normally, you do want to turn on formatting.
01:01You know I've seen people who forget to turn this on and then they end up with
01:04an image that's huge.
01:06That's because it's not maintaining their scaling when they export to EPUB.
01:09So you normally want to keep that turned on.
01:12InDesign will automatically convert your images into a format suitable for an EPUB.
01:18In other words, it's going to convert it to an RGB file.
01:21So it's okay if you have CMYK images.
01:23You don't need to convert them to RGB first and it's going to go ahead and
01:26downsample them to a reasonable size when it converts them to RGB, and it will
01:32automatically convert them whether they are native PSD files or they're InDesign
01:37files that you've placed or PDF files that you've placed.
01:40It's going to convert them to one of these two formats.
01:42Now unfortunately, PNG is not one of the formats and I hope that they add that
01:47in a future version because that's one of the ones that can be supported
01:50inside of an EPUB file.
01:53It's just going to convert them to either a GIF or a JPEG file, the simple
01:57image formats that you see all the time on the web.
01:59Automatically, it's just going to look at the content of the image and choose
02:02which of these to convert them to.
02:04I would recommend that you just leave it at Automatic and let InDesign go ahead
02:08and decide which format to export it to.
02:11Now if it's going to export a GIF then you have your choice of what kind of
02:15color palette it should use, because GIF images have a limited number of colors.
02:20I believe it's 256 colors in a GIF.
02:23Normally, you just want to keep it at Adaptive (no dither) and Interlace means
02:27it will show up slowly in an ereader that doesn't have a whole lot of processing power.
02:32I've never actually seen a GIF appear, interlace slowly when it appears in an ereader.
02:38So I wouldn't even worry about that.
02:40What is of more concern is down here under JPEG Options, because in my
02:44experience very seldom will InDesign convert an image to a GIF image.
02:49About 99% of the time it will be a JPEG, even if it's a solid square color
02:54that should be a GIF.
02:55It's going to convert it to a JPEG.
02:57I would always recommend that you choose Image Quality: Maximum, because you
03:02want your images to look as good as possible and these days most EPUB readers
03:06are getting more and more powerful. They can take that.
03:09If you were, for some reason, creating an EPUB for people with some of the
03:12first generation of ereaders, then I might say well, you know what, don't make it Maximum.
03:16Make it Medium quality, but normally, I'll just say leave it at Maximum.
03:20And under Format Method, Progressive means that people get a low-res version of
03:25a maximum quality JPEG as it draws into the screen. Otherwise it's just going to
03:30appear line-by-line and I've never actually seen either one of these at work.
03:35Normally what happens is that the JPEG just appears instantly.
03:38So again, I think this is kind of leftover from old-school web stuff and you can
03:42just leave it at the default of Baseline.
03:44And that's it. Just a few choices to make in the Images section.
03:48The main thing that you want to do is make sure that Formatted is checked on.
Collapse this transcript
Choosing EPUB export options for content
00:00The third panel of the Digital Editions Export Options dialog box has a bunch of
00:05important choices that you should be making.
00:07A couple of them you can just leave as is for the vast majority of your work.
00:13For example, up here under Format for EPUB Content, it wants to know which
00:17formats the exported EPUB contents should be in: XHTML files or DTBook.
00:24Now XHTML files are the ones that 99% of the time you're going to be dealing
00:28within EPUB, and you can just leave this turned on.
00:31DTBook is a special kind of format for people with visual impairment and it's
00:35a way for a special kind of talk- allowed readers will be able to access the
00:39content of an EPUB.
00:41Normally you want to just leave it at XHTML, unless somebody tells you differently.
00:45A table of contents is an interesting section.
00:48Now table of contents refers to the navigational table of contents, that part
00:52that opens up automatically in any ereader.
00:55So in Adobe Digital Editions, it's the part that open up on the left-hand side
00:59of the page that was like a linked table of contents that we've seen, and you
01:03can also get that automatic table of contents from Kindle or from the iPad and
01:08the iBookstore or the NOOK. They all have a place where you can see this
01:11navigational table of contents.
01:13Now InDesign will always create the navigational table of contents, even if you
01:17have this turned off. It's going to create something.
01:20What's it's going to create though, will be the name of the InDesign document.
01:23That will be the name of the link, and if you are exporting a book made up of
01:28multiple InDesign files to EPUB, you'll see a list of each individual InDesign
01:34file's name will appear as a link in the navigational table of contents.
01:38What this allows you to do is to override that default behavior and use actual
01:42text from your document as the table of contents, so like chapter names makes a lot of sense.
01:48I've talked about how to use this feature in a couple of videos, but just to
01:52quickly review is that you want to create a specific table of contents style
01:56that includes which paragraph styles should be included in the table of contents,
02:01which I've already done for this one that says EPUB.
02:04And then if you don't want InDesign to include the actual names of the documents
02:08in the navigational table of contents which assumably you don't, then you would
02:12turn this on, Suppress Automatic Entries for Documents.
02:16Finally, Used First Level Entries as Chapter Breaks is a new feature in CS5
02:21and it allows people to export one long document and have InDesign
02:26automatically split it up or chunk it up into individual XHTML files. Each one
02:32is separated by a paragraph style.
02:34Starts out with a new paragraph style that's according to whatever TOC style you
02:38included. So that's a great new feature.
02:40But when you export to EPUB, because all of your XHTML files are governed by a
02:46cascading style sheet that decides what kind of formatting they have,
02:50InDesign will always export a CSS file, no matter what you choose here.
02:54Now, how robust that CSS file depends on what you choose.
02:58Typically you wanted to generate the CSS file and include the style definition,
03:02so that if, for example, you're heading style has two picas of space below it,
03:07the CSS document will also include that specification. And if you don't want to
03:12include all the specifications of your paragraph styles, we do want to just have
03:17the name there, so you can add them yourself. Maybe you're really good with CSS
03:20then you might want to choose Style Names Only.
03:23That way you'll still get a CSS file and it will have the name of all your
03:26paragraph and character styles, but the definitions, the settings, the
03:30attributes, for each one of these will be left empty, and then you can just
03:33add them on your own.
03:34Sometimes that's a lot faster than having to clean out every single
03:37attribute that InDesign adds.
03:39if you have an existing CSS file, perhaps you're doing a series of books that
03:44are all using the same paragraph and character styles, you exported one, you
03:47tweaked the CSS file until it's perfect, well, you can do a Save As to that CSS
03:51file and save it elsewhere and then link to it for all your success of EPUBs,
03:55which saves a ton of work.
03:56Now if you're going to have InDesign generate the CSS, then you have a couple
04:01other choices here. Do you want it to Preserve Local Overrides? And say
04:06then if you made some kind of manual formatting like say made the word bold by
04:10selecting it and choosing the Bold style, rather than actually creating
04:14character style for bold and applying that, InDesign is going to create separate
04:18class styles for every single instance that you do that and it's not normally
04:22something you want to do, because it just makes a lot more difficult to edit
04:26the document and to clean up the CSS.
04:28But if necessary, if somebody was really bad with applying character styles,
04:32then you might want to keep that turned on. And then this last one is Include Embeddable Fonts.
04:37InDesign can include the font that you used in this document. They can obscure
04:42them or encrypt them actually, so that they're difficult to remove, but
04:46however that encrypted font information will make it very difficult for this
04:52EPUB to be validated.
04:53We're going to be talking about validating an EPUB file later.
04:57I think that in the coming months we're going to see a lot more flexibility as
05:00far as embeddable fonts are concerned, but for now we're going to keep this
05:03turned off or I would recommend you keep it turned off,
05:06unless you know for sure that your workflow will support it in the end.
05:09So the Contents panel of the Digital Editions Export Options had a lot of
05:13critical decisions you need to make that govern what's going to happen with your
05:16final EPUB. So make sure and take a second to review all the settings before you
05:20click the magic Export button.
Collapse this transcript
6. Previewing and Validating EPUB Files
Previewing EPUBs on your computer and devices
00:00So far we've only been using Adobe Digital Editions to preview our EPUBs, but
00:05that's not the only EPUB reader out there.
00:08In fact I would venture to guess that there are people that hardly ever use
00:12ADE to look in EPUBs.
00:13What I want to show you in this video are the different choices that you might have.
00:17Now this field is exploding, all right. So there are always new ereaders
00:21coming out on deck.
00:22But in preparation for the title I asked a lot of people who are in the
00:26business what they prefer to use to preview the EPUBs that they're working on
00:31for distribution.
00:32So let me go through a few.
00:33Now Adobe Digital Editions is great for quick checks, but also a lot of people
00:38like to use this program call Calibre.
00:40And Calibre is an open source program also available for Macintosh, Windows,
00:46and Linux computers.
00:47And when you install Calibre you can have it set to automatically be your
00:52library, your organizer of all of your EPUBs.
00:56Not just on your computer but also on a lot of connected devices like iPads
01:00or Android phones.
01:01Now Calibre is also used for converting EPUBs, and PDFs, and MOBI files from
01:08one format to another.
01:10And in the videos where we talk about converting, especially like converting to
01:13Kindle, we'll be talking about using Calibre and seeing how that works in
01:17converting an EPUB to Kindle format.
01:19But Calibre is also just a wonderful EPUB reader.
01:22I've already added by clicking Add books the Brief History of San Francisco,
01:27book that we've been working with before.
01:29And if you double-click it, it opens up into Calibre's E-book Viewer.
01:34And you can hide this other view behind it if you would like.
01:36But here you can just click the Right Arrow and Left Arrow to move
01:40from page-to-page.
01:41There are also keyboard shortcuts for all these, and here are the contents and
01:46the pages just appear.
01:47So this is a really good way to check to see what your EPUB looks like outside
01:51of Adobe Digital Editions.
01:52And there are a couple that I'd like to use that are available online.
01:56For example, Ibis Reader is developed by a Threepress Consulting,
02:00the same company who worked on creating the EPUB Validation Checker, and
02:06they're very well-known in the field as EPUB gurus.
02:09They have their own online EPUB library where you can keep your books all in one
02:14place and they're stored in a cloud.
02:16But you can also download the books to your computer.
02:19So it's not a completely online way to manage your e-books.
02:24Now here I've added A Brief History of San Francisco, and if you click it, it
02:27opens up in the Ibis Reader.
02:29And here is our navigational table of contents on the left.
02:33You can click No distractions and it hides a lot of the chrome from around the
02:38browser for you, and click the NEXT and PREVIOUS to go from page-to-page.
02:41I'll go back to the site.
02:44And then also Firefox itself has a plug-in that came out in late 2010
02:50called EPUB Reader.
02:51And I've installed it in Firefox and what happens is that if you click on a
02:55link to an EPUB in Firefox, it automatically opens in Firefox.
02:59Or if you want to preview what an EPUB looks like that's on your computer in
03:03Firefox, you just go to File and then choose Open File.
03:07And then navigate to where your EPUB is.
03:10Select it and choose Open and it opens directly within Firefox.
03:13So anywhere that Firefox runs, including Firefox Mobile, you can install this plug-in.
03:19I don't know if there's any uber- geeks out there but it also runs in the
03:22SeaMonkey suite, which is a new open source Internet suite developed by the same
03:27people who worked on Firefox.
03:29So it's called EPUB Reader.
03:30It's a free extension.
03:32And again here's the navigational table of contents, and you can save books to
03:36your desktop and move from page-to-page.
03:37It's got little tips that pop up when you want it to.
03:41It's pretty cool.
03:42And then on a mobile device, other than like using the Nook Reader, or the Kindle
03:47Reader, or something like that, or even the iBooks Reader, the generic EPUB
03:50Reader that most people that I know use on any kind of iPad or iPhone or
03:54Android device is called Stanza.
03:57You may have heard of it.
03:58They've been around for long time.
04:00And it's an EPUB reader and also an EPUB library organizer along the lines of
04:05Ibis Reader and Calibre.
04:07Unfortunately Stanza Desktop has been discontinued.
04:10So you can only really use Stanza on an iPad or iPhone or other mobile device.
04:15And after you've downloaded it, you download it and install it through iTunes,
04:19here's how you can get your EPUBs on there.
04:20Now you can always through Stanza app,
04:23it has access to the Feedbooks library and some other library so you can
04:27actually download a lot of free EPUBs directly into Stanza, or if you have EPUBs
04:32on your computer like in this video what we're talking about developing your own
04:35EPUBs, you want to see what it's going to look like in Stanza, then you would
04:38add it to Stanza by hooking up your device.
04:41right now I have my iPad hooked up.
04:43And then you select the name of your device, click Apps at the top, and when you
04:47scroll down you'll have a list of apps that let you share files.
04:52So I've selected Stanza at the bottom, and then you click Add, and then it just adds
04:56your EPUB, which I've already done.
04:59So once this has been added, when you click Sync then the EPUB is added to
05:03your device.
05:04Now let's take a look at this EPUB as seen on Stanza on my iPad.
05:09After I double-click it, here is one of the pages and it's kind of interesting
05:12to note the differences.
05:13You see how the paragraphs have lost their first line indent.
05:17So these are the kind of things that you would check when you create the same
05:20EPUB that's seen in different ereaders, so you have an idea of what your
05:24readers are going to see.
05:25It's kind of like testing a website on different browsers.
05:29And it's nice that the table of contents still appears and the links still work.
05:33Then I click one of the links and jump to Early History.
05:36And Stanza, just like other ereaders, has its own navigational table of contents.
05:41So if I just tap on this button down here, the table of contents appears.
05:45So don't think when you are working with EPUBs that you are limited to working
05:49with the Adobe Digital Editions. There are a lot of choices out there and you
05:53should be running your EPUBs through a few of them at least.
Collapse this transcript
Previewing for the iBooks app
00:00So it's all well and good that there are a number of the ereaders available that
00:03can open up an EPUB like Adobe Digital Editions that we're looking at right now,
00:07or Stanza, or Ibis Reader.
00:10But if you're creating EPUBs for the Apple iBookstore, which has its own
00:15ereader app called iBooks, it is crazy that Apple has not yet come out with a
00:20desktop version of that.
00:22There is a desktop version of the Nook Reader, there is a desktop version of the
00:25Kindle Reader, but there's none for iBooks.
00:28So if you really want to see what your EPUB will look like in iBooks before
00:32you upload it to the store the only way to do that is to actually open it up in iBooks.
00:36You need to transfer it to an iPad or an iPhone. Well an iPad preferably
00:40because it's larger.
00:42So how do you get your EPUB on to an iPad so you can look at it in iBooks? Let me show you.
00:49You need to first hook up your iPad to the computer, and of course it has to
00:52have iBooks installed.
00:54I am going to quit out of Digital Editions. And then you start up iTunes.
00:59And it has to be iTunes version 9.1 or later.
01:02That's the one that comes with iBooks.
01:03Now you have up here your Library and we also have the iPad down here.
01:08Now let me go back up to my Library and go to Books.
01:12On my computer, in my Library I have two books.
01:15I want to add the EPUB that I just created and we'll use that good old Brief
01:20History of San Francisco EPUB.
01:21So how do you add the EPUB to iTunes?
01:25If you can see where it is on your desktop, you can just drag-and-drop it
01:28actually right here onto the Library.
01:29And it'll automatically go into Books.
01:32Or you can just go to File and choose Add to Library and navigate to
01:38where that file is.
01:39There it is, SFHistory.epub, and it'll go ahead and add it.
01:43So there is A Brief History of San Francisco.
01:44Now I didn't actually create a separate cover. We'll be talking about this more
01:48when I talk about creating your books specifically for the iPad, but otherwise
01:52we would see it's a little bit of graphic here.
01:54Okay, so now you have your iPad hooked up and you select the iPad and go over
01:59to Books, and what you want to do is you want to sync the Books.
02:03So this is showing you the books that are in your iTunes Library.
02:07And you want to sync the selected books.
02:09They're all selected.
02:10So I'll click Sync.
02:12And it is copying. I don't know if you saw that.
02:14It appeared they are very briefly at the top.
02:16It copied the ebook to your iBooks Library on your iPad.
02:20While the iPad is still hooked up to your computer, now you can start up the
02:23iBooks application, you'll find it in your Library shelves there, and you can
02:27tap it and open it and see what it looks like.
02:29So you just tap on the Brief History of San Francisco and it opens up to the cover.
02:35And you can just page through it a couple times, to the right and to the left, and
02:39check out to see if, you know, the contents is working and did the subheads come
02:43out the right color.
02:44Now likely you're going to find some issues, like I can see for example, there's
02:48not enough white space between the subheads and the text below it.
02:53So how do you then edit this to fix it?
02:57You know well technically what you're supposed to do is go back to your Library,
03:02to the Books section of your Library, right-click and choose Delete.
03:07Delete that book, and then sync that to your iPad again so that it deletes it off the iPad.
03:13You can't simply delete it off the iPad by itself.
03:15You'd always have to sync with your computer.
03:17And then you would create a new version of the EPUB, and then repeat what I just did.
03:23Add it to your library and sync it back.
03:25Or, you could create a second version of this book and add that to the Library
03:31as well, and you might end up with 50 different versions.
03:34A little shortcut that might make it easier while you are fiddling along with
03:37all of the CSS and the XHTML files, trying to get it look exactly right on your
03:41iPad, is to bypass all that rigamarole.
03:44First get it onto your iPad just like I showed you with adding it to your
03:48iTunes Library and syncing, and then get this really neat little application called Phone Disk.
03:55It's available for both Mac and Windows.
03:56It's not too expensive, and what it does is it adds this little icon up here in
04:00your title bar or on the PC down here in the bottom, and when you connect an
04:05iPad or an iPhone, or an iPod touch, it mounts it like a hard drive.
04:09Now there are other ereader and tablet devices that do this automatically, but
04:13none of Apple stuff does.
04:15This gives you access to the innards of these devices directly from the Finder
04:19or Windows Explorer.
04:20Now what's interesting here is take a look.
04:23Here is Books, and there are the EPUBs that this iPad currently has.
04:27They are a little obscured, because apparently they automatically become
04:32decompressed once they are synced to the iPad.
04:34So you can select each of these folders and also the names get a little bit obscured.
04:39So here's the one that we just added and I know because I recognize the OEBPS folder.
04:45The other EPUBs are using some other kind of strangely named file.
04:49But if you're wondering which of these weirdly named folders was the EPUB that I
04:53just added, you can right- click on the Books.plist.
04:57And just open that up in anything that'll let you take a peek at it, and you
05:00can see that the title appears at the top and at the bottom is what it appears
05:05inside your Finder or Explorer window.
05:08So if I am looking for Brief History of San Francisco, here it is at the bottom. It's the IBFY one.
05:13So close that. Don't save any changes.
05:15So what you can do now is select this and then go ahead and open up the CSS file.
05:20Edit it, save your changes.
05:23It's going to save it directly onto the iPad.
05:25And then on your iPad you would just close the book and then open it up again
05:29and you'll see the updated changes.
05:31So it's a little faster if you want to make a series of successive small changes.
05:35Now you're probably wondering, okay, well then how do I get that back on to my
05:38computer so I can upload it to the iBookstore?
05:40Well then what you do is you sync the book back to your iTunes Library on
05:44your computer, and then you can right- click on your computer and copy it to
05:48the Finder or Explorer and then you have an intact EPUB you can do something else with.
05:53So you do have to jump through some hoops in order to see what your EPUB is
05:56going to look like on the iPad.
05:58But I am really hoping that one day soon Apple is going to come out with an
06:02iBooks ereader that we can just install on our computer and proof our EPUBs that way.
Collapse this transcript
Validating EPUB
00:00EPUB resellers like the Apple iBookstore, the Barnes & Noble Nook store or
00:07aggregators like Google.com, you know, even Kindle's own servers that will take
00:11an EPUB and convert it to Kindle format for you,
00:13they all require that the EPUB that you submit be validated.
00:18Now this may seem like jumping the gun, because we still have a lot to cover as
00:22far as editing EPUB is concerned.
00:24But I think it's a good idea to validate your EPUBs as soon as it basically
00:28looks okay, right after you export it out of InDesign. Because that way after
00:32you go in and you start messing around with the EPUB code, as we'll be covering
00:37in upcoming videos,
00:38if the EPUB does not validate then you know it's not something InDesign did,
00:42it's something you did, and it will help you narrow-down the problem.
00:45But before we actually get into how to validate an EPUB, let's talk about
00:49what validation is.
00:50Validation checks that your EPUB conforms to the standards defined by this
00:56organization that you see on screen, the International Digital Publishing Forum.
01:01This is a group of people, sort of like the World Wide Web Consortium, who
01:05decide on how EPUB should be constructed.
01:08And what is acceptable and what's not acceptable.
01:11That makes it much easier for people who develop EPUB readers or EPUB devices
01:17to know what to expect, to know what their machinery or their code should be
01:21able to handle when it comes to opening up your EPUB book.
01:24So if you go to IDPF.org and you click on Specifications, you can see the actual
01:30specifications for all the parts of an EPUB. Like if I just happen to click on
01:34this link, this talks about what should be in the OPF package and we're
01:39actually going to know what this is talking about in a few videos, but this
01:43right here it has to do with the metadata.
01:44So like for example, it's saying that the metadata that you add inside of an EPUB
01:49in the subject line, you can have multiple instances of the subject elements are supported.
01:53So you can put in multiple subjects for your document's metadata.
01:57When you validate an EPUB then, there is an engine that checks to make sure that
02:02everything inside the EPUB conforms to the IDPF standards for EPUB 2.0.
02:08That's where we are at right now.
02:09EPUB 2.0, they are working on the next spec, EPUB 3.0, but that shouldn't be
02:13out for a few months.
02:14And who actually came up with that engine to check your EPUBs?
02:17It's actually an open source code that's hosted at the Google.
02:22It's on of the Google checks.
02:23It's something you could download to your computer and run in your command line.
02:26On a PC that would be running in the Eun service or on a Macintosh,
02:30that would be running in Terminal, but you don't really need to do that.
02:34Instead, there's a couple of easier ways to access the Google code for the EPUB check.
02:40One of them is by our friends at Threepress Consulting.
02:43I mentioned Threepress before when I talked about the online EPUB reader
02:47called the Ibis Reader.
02:49Threepress Consulting is one of the luminaries in the field of EPUBs and they
02:53have developed a front-end to that Google EPUB check code that's hosted at their website.
02:59So what you can do is after EPUB is done, go to this website, threepress.org,
03:04click Tools, and then on the left there is the EPUB validator. So you click the
03:09Browse button and look for your EPUB.
03:10As I click Browse and I'm going to go to my desktop to the exercise files, where
03:16I have created two EPUBs.
03:19One then I know for sure is not going to validate, called History sample-no
03:23date.EPUB, and we'll click Open.
03:26And then you click Validate. Just click the button and it's checking it against
03:30the code and then if there are errors, you get this very sad looking red X.
03:34That is something you don't want to see normally.
03:37And then it will give you a list of the problems, the reason that it did
03:40not pass validation.
03:42The very first one what we're looking at is saying that in the file called
03:46content .OPF, the date value " is not valid.
03:51The date must be in the form Year, Year-Month or Year-Month-Date, and then it
03:57has a URL for more information.
03:59So what's that about?
04:01This is the one bit of metadata that InDesign CS5 and CS4 do not insert into
04:07the EPUB, and it will always make it fail validation.
04:10Now there is a script that you can install in InDesign that will prompt you for
04:14the publication year.
04:16That's what it is asking here for is the metadata, asking for publication year,
04:20and we'll be talking about that in the video where I talk about metadata.
04:23But let's go ahead and fix this EPUB right now.
04:26It's actually a very easy fix and I'm going to do it here in Sigil.
04:30I'll be talking about Sigil in another video when I talk about EPUB editing tools.
04:35But what I like about Sigil is that you can open up an EPUB without having to
04:38expand it first, and we're going to go right here, and it's also very easy with
04:43Sigil to access an EPUB's metadata.
04:46So we're going to Tools > Meta Editor. We're going to click More, Add Basic.
04:55We want Date of publication, and then I just added that date of publication.
04:59You know, while we're here we'll go ahead and enter a title and an author too,
05:03because that's two other pieces of metadata.
05:05Not required by EPUB check.
05:06But I'll just say San Francisco History by Anonymous, all right, and then we'll
05:14close that document and save our changes.
05:17And now we'll go ahead and upload the corrected EPUB.
05:22So I go back to Tools, Browse, and we actually saved changes to that very first
05:28one without the date, right, so let's see if it worked.
05:30Click Open and Validate.
05:33It passed. I had that other one there just in case something went wrong.
05:36But that is a very simple explanation of how you validate in EPUB and then how
05:40you correct it and re-validate it.
05:42Now there is one other way.
05:44You don't have to go to Threepress Consulting.
05:45There is an application called EPUB Checker.
05:48You can download EPUB Checker.
05:50It's a free app that runs on Mac, PCs, and Linux computers, or you can also
05:55just quickly grab any EPUB that you've created and have it check the EPUB for any problems.
06:03It checks it against the same Google code as the Threepress web site.
06:07So there you have it. Two easy ways to validate your EPUBs and to find out what
06:11the problem is if they are invalid.
Collapse this transcript
7. Editing EPUB Files for Functionality
Getting inside an EPUB file
00:01Successfully exporting an EPUB out of InDesign and then having it validate is
00:06I'm very sorry to tell you only the very beginning of the process, because
00:11essentially an EPUB is like a miniature website.
00:14It's a series of XHTML files and the formatting is from a CSS file.
00:20If you have ever tried to create a website out of InDesign you know how great it
00:24does at that. In other words it's not very good.
00:26So after you export to EPUB you are very likely going to want to get into those
00:31files inside the EPUB and edit those in XHTML and CSS files, add some links,
00:36just things like that.
00:37Now, how can you get at the innards of an EPUB file?
00:41That's what I'm going to talk about in this video. But first even before we talk
00:44about how to get at the innards, what are the innards?
00:46Take a look at your Exercise Files.
00:48I have them here opened on the screen.
00:50Here is the SFHistory EPUB file that we've been working with often on
00:54throughout this video.
00:55It should look very familiar to you, and then above that is a folder called SFHistory.
01:01If we twirl that open, you can see that SFHistory,
01:05this is the contents of the EPUB file.
01:07It has a couple of folders.
01:08It has some weirdo files and then inside this folder, OEBPS, it has the guts,
01:14really the entire book.
01:15The XHTML files, it's got the CSS file, and so on.
01:19So how did I get this folder out of this?
01:22Well, actually it's kind of neat. An EPUB file is like a lot of modern
01:26files actually a package.
01:28It's like a ZIP file that contains everything that you saw there in that folder,
01:32except that it's been compressed and has the extension .EPUB.
01:36Now if I were on a PC to get at the contents of this EPUB file would be as simple as this.
01:42Watch!
01:43I'm going to first of all duplicate this file, so I don't mess it up.
01:46We'll call this SFHistoryTest.
01:50I'm going to select this test and change the extension from EPUB to ZIP. Are you sure?
01:58Yes, use .ZIP, and now it's like a zipped folder.
02:01So on a PC all I would need to do would be to right-click and choose Extract
02:05All, and it would extract everything to a folder called SFHistory.
02:10I could get in here, I could edit these files with whatever tools I want, and
02:13then when I'm done, I could right-click on here, compress it, save it as a ZIP,
02:18and then again go the other way and change the ZIP extension to EPUB and it
02:22would be perfectly valid.
02:23I could upload it and validate it, no problem.
02:25Unfortunately, it's not so easy on a Macintosh.
02:28In fact, it's impossible.
02:30You can change the extension to ZIP and you can decompress the ZIP folder on your Macintosh.
02:37When you recompress it and change it back to EPUB, it won't validate.
02:40The reason is because for some reason the IDPF consortium, the people who
02:46govern the EPUB file format, say that when you zip up or compress folder into an
02:52EPUB file, this folder and its contents can be compressed, this folder and its
02:57contents can be compressed, but not the mimetype file.
03:00Apparently, the PC is smart enough to not compress this file, but on a Macintosh
03:05it adds all sorts of Macintosh something like ds_store files or resource forks,
03:10whatever the heck those things are.
03:12And what happens is that even though you can end up with an SFHistory.epub,
03:16it won't validate and the error that's reported to you will be that this file is
03:20compressed and it shouldn't be.
03:21By the way if you want to try to unzip this, if you don't see like an Extract or
03:25Unarchive, in the very latest versions of OS X that Archive Utility won't work,
03:30but you could use something like say StuffIt Expander and then that will go
03:34ahead and expand it.
03:36So here is that folder and then you can get inside it.
03:39We are not even going to use it, because as I said if we recompress it and then
03:43change the extension back to EPUB, it won't validate.
03:45Now if you've read any other kind of EPUB documentation or seen any other
03:49EPUB videos, you may have heard on a Macintosh that what you're supposed to do with an EPUB--
03:54Actually let me get rid of this before I go on, because I'm going to get confused.
03:57What you're supposed to do is take this EPUB file and you're supposed to
04:00decompress it through Terminal, which is the OS X program that is also the
04:06command line interface. It lets you type- in UNIX commands and it definitely can be
04:10done that way and I have nothing against Terminal.
04:12However, I discovered that there are a couple of scripts around, free
04:15AppleScripts that will do the same.
04:18So I have a couple here in your exercise file for you.
04:21I should move these other ones out of there.
04:23Let's just do this.
04:24I'll rename this to old. Here we go.
04:26All you do is you take your EPUB and you drag-and-drop it on top of the one
04:31that says EPUB Unzip.
04:33So it unzipped it, and then we can come in here and we can edit this file.
04:38And then when we're done, let's actually rename this guy too.
04:43We're going to run into the same problem.
04:44We're going to take this guy and then drag it back onto EPUB Zip, and there is our EPUB Zip.
04:53So it is an essential skill to be able to completely extract the contents of an
04:57EPUB file, so you can get at it with various text editing programs and then be
05:01able to zip it back up.
05:03But there are many times when you just need to tweak one file or just a letter
05:06in another one, or fix a little link, and in that case what you also might want
05:10to check out, especially on the Mac side, is any number of free or low-cost
05:15utilities that will let you edit the contents of a compressed archive without
05:19having to decompress it first.
05:21For example, one that I like to use is called Springy. I have it running.
05:25It's here in my dock. It looks like a little a spring.
05:28If I drag an EPUB on top of it, it opens up as though I had decompressed it,
05:33but it really hasn't.
05:34So I can actually come in here and get at any one of these files, and then if I
05:39right-click, I can choose to extract it or I can just choose to edit it with
05:43some kind of program.
05:45Then when I'm done editing, I save it back in here and then when I close it,
05:49it's still an EPUB.
05:50So you can't really do any kind of multiple Find/Changes because it needs to
05:54extract these one at a time.
05:56Another caution is that you need to go to Preferences, because there's likely to
06:01be an option here having to do with Macintosh information.
06:05I know that some people have got problems with these kinds of programs.
06:08Springy, another one is called Better Zip, because when it re-archives, there is
06:13an option that might be turned on by default to preserve Macintosh information,
06:17like those invisible DS store files, if you've ever seen them on a PC.
06:22Here in Springy in the third panel under Archiving, a check box way down here
06:26at the bottom, Preserve Macintosh contents, you want to turn that off and
06:30then close it before you start working with this program or before you
06:34archive your first archive.
06:35So I'm going to go ahead and close this, and then we are left back with our EPUB.
06:42So that's how you get at the innards of an EPUB and now we need to look at what
06:46exactly are those files inside an EPUB.
Collapse this transcript
Identifying parts of an EPUB
00:01Inside an EPUB file, when expanded you'll find a whole bunch of little separate files.
00:07These separate files comprise to tell the ereader about all of the
00:11contents, all of the images, all of the links, all of the metadata contained in this ebook.
00:17Now some of these files you'll never need to touch, but other ones you will
00:21really need to get in there and start doing some major editing too, depending on
00:26the state of your EPUB.
00:27And it's a good idea to get to know the names of these different files and what
00:31they refer to, like this mysterious toc.ncx.
00:35First of all, whenever you validate an EPUB, if there's a problem it's going to
00:39tell you the name of the file that is having the problem. Or like there might be
00:44a bad link inside toc.ncx, or content.opf, or something like that.
00:49And so you'll know all those little files that are sitting sort of inside the OEBPS folder.
00:55And number two is that if you go to any support forum for EPUB stuff where there
00:58are other people working with this kind of things, people will be tossing around
01:02these names with abandon.
01:03They'll assume that everyone knows what they're talking about and so you might
01:06as well get to know what they mean.
01:08All right so let's go through actually each one of these files and talk about
01:11what its significance is and if you would ever need to edit it.
01:14For a text editing program I am going to be using TextWrangler, which is a free
01:19text editing program from Bare Bones Software.
01:22They also make a commercial one called BBEdit, but TextWrangler is good enough.
01:26If you're on a PC, the program that I recommend is called Notepad++.
01:30We'll now be talking more about these in another video.
01:33But I just want to let you know that if you want to follow along you should
01:36use a text editor that colorcodes some of the tags that are used inside these files.
01:40Okay, so first let's look at the major divisions.
01:42We have expanded SFHistory here in this folder.
01:46We have two folders and we have this one weird file without an extension called a mimetype.
01:51These three things are all required in every EPUB and InDesign will
01:54automatically create them for you.
01:56The mimetype is a very simple file.
01:59Let me open this up in TextWrangler.
02:01All it contains is this one line of code and it tells the ereader this is
02:06an EPUB, all right.
02:07That's all, just leave it alone, and this is the file by the way that cannot be
02:10compressed when you re-zip this folder.
02:13Inside the META-INF folder you're going to find at least one file called
02:18container.xml, which is believe it or not an XML file and it's also quite short.
02:25It gives some information to the ereader confirming that this is an XML file and
02:29then it tells it the path to this very important file that I'll get to in a
02:33minute called content.opf.
02:35Now InDesign will automatically create that file for you and put it inside the
02:40folder called OEBPS.
02:43I am just saying this in case for some reason you go inside that OEBPS
02:47folder and you rename content or you move it inside another folder for some
02:51bizarre reason, you are going to have to remember to come to container.xml
02:55and change the path as well.
02:57So normally you never want to mess around with the name or the location of
03:01content.opf, and that's all.
03:03That's container.xml.
03:05By the way if you have any kind of digital rights management or you've encrypted
03:09any kind of fonts in your EPUB file, you'll probably also find a couple other
03:12folders or files inside META-INF that has information about those things.
03:17But it is this folder called OEBPS where really the meat of the entire EPUB is.
03:23I often call this the book folder.
03:25All of your content, your CSS, all of your images is going to be inside this folder.
03:30In case you're wondering what that stands for, it's Open eBook
03:34Publication Structure.
03:35It's going to be on the test at the end of the video, so make note of that.
03:38And inside the OEBPS folder you might find subfolders. Other programs will just
03:43put everything flat.
03:44But you're going to find all of the XHTML files.
03:48This is the content for every chapter or section of your EPUB.
03:52You're going to find the CSS file, at least one.
03:55You can have multiple ones that contain the coding for all of your XHTML files.
04:01Let's actually take a look at each one of these really quick.
04:03We're just going to open up one randomly.
04:06Here is an XHTML file.
04:07And I am going to turn on Soft Wrap Text so we can see it better.
04:11So you can see here's the actual content.
04:13So if you wanted to come in here and change something without actually having to
04:16change the InDesign file, you could change it here and then save your changes.
04:20And the style, CSS file, which we will be talking about in great detail in
04:26another chapter is the CSS file that governs the formatting for all of your
04:30paragraph and character styles that have been applied inside the XHTML files.
04:36If you have any images in your EPUB they are segregated into their own Images
04:40subfolder, these are all JPEGs, and then you have two critical files. One is
04:45called content.opf and toc.ncx.
04:48Let's look at this one first.
04:50TOC is the table of contents.
04:52This is the navigational table of contents,
04:55the automatic one that gets generated from InDesign that appears inside like
04:59Adobe Digital Editions on the left-hand side.
05:01So I am dragging that over to TextWrangler and inside the toc.ncx file we have
05:09a whole bunch of weird codes.
05:11The main point of this file starts with navMap. Do you see this here?
05:15We're going to actually be talking bout editing this file in a different video.
05:18But these are the links in that navigational table of contents on the left.
05:23So A Brief History of San Francisco points to where that XHTML file is.
05:28The one called Contents points to that XHTML file, and so on. That's that file.
05:34And then the content.opf file.
05:37Let's take a look at that one inside TextWrangler and switch to Soft Wrap Text.
05:42This stands for Open Packaging Format, and it's the second of two files.
05:48The first one being the toc.ncx file that describes to the ereader the
05:52content of this EPUB.
05:54Okay, so the content.opf file is an XML file.
05:58It contains three quite important and required sections, required by the EPUB
06:03standard, and one optional one.
06:06So the first section is the metadata section.
06:09So there is the title, the publisher, the date that it was published.
06:13We have a video talking about editing this metadata section.
06:16The second required section is the manifest.
06:19The manifest is a place that lists every single item in this EPUB folder.
06:24All right, so all the XHTML files, all the JPEGs, the CSS file, and I've seen
06:30when people validate EPUBs, that a frequent cause for the EPUB to fail
06:34validation is that there are files inside the EPUB folder that aren't listed in the manifest.
06:40So just like a manifest in the real world is supposed to list all the contents
06:43of a shipment, that's what the manifest is for.
06:45The manifest is automatically generated by InDesign.
06:48Normally it's not something that you need to worry about.
06:51The third required section is called the spine, which refers to the order of
06:56the files that appear when the ereader starts going through them.
06:58So when somebody has done reading this XHTML file and they click the icon for
07:03next page, then this XHTML file is supposed to open up, and again this is
07:07something that InDesign will create automatically.
07:10And then the last, this is an optional section and this is not something that
07:14InDesign creates on its own.
07:16I actually created this for you so you can see what it looks like.
07:19It's called the guide section, and this is something that Apple would like your
07:24EPUBs to have for the iBookstore.
07:26It basically identifies if something is copyright page, a title page, an
07:31acknowledgments page, and then the text pages are the actual content of the EPUB.
07:34We'll be talking about that too in another video.
07:37So now we've gone through every single one of these files and you know the
07:41contents of an EPUB file, and I believe your brain is probably about 50% larger
07:45than when we first started talking about this.
Collapse this transcript
Choosing an EPUB editor
00:01When you're working with the files in your EPUB there are really so many choices
00:04for which software program you want to use, that I want to go over a few of the
00:09I think more useful ones that I know a lot of professionals are using.
00:13And in general you want this program to be a text editor that will let you edit
00:19stuff and save changes, but also one that is accustomed to working with, say
00:24web pages, or some kind of code so that it will color the tags differently than
00:29the actual text, which makes life a lot easier when you're editing these files.
00:33You also want to make sure that it lets you do multiple Find/Changes because
00:36often you're going to want to deal with every XHTML file. You might want to change a tag.
00:41So instead of having to go one-by-one you want to be able to select all these
00:45files and do the same Find/ Change across all of them.
00:48And finally you want to make sure that this program will not
00:51introduce additional code.
00:52Internally that will cause an EPUB to be invalid when you try to validate it.
00:57So you want to do something that's very clean and simple but powerful.
01:01So with those requirements in mind, let me tell you about the kind that I like to
01:04use on the Mac side.
01:06Now by the way some of these programs are by platform but a really good text
01:10editing program on the PC that's not available on the Mac is called Notepad++,
01:16and it's similar I believe to TextWrangler on the Macintosh that I am going to
01:20show you in a second.
01:21It's a text editing program that does color coding of tags and that lets you do
01:24a lot of these kinds of Find/ Changes that I was talking about.
01:27Now let's talk about TextWrangler.
01:29This is a free program from the people who make BBEdit.
01:33In TextWrangler I can choose to open a file, let's just open one of these XHTML
01:39files, and you can see that it does the color coding and you can Soft Wrap Text
01:44so you can see it easier. You can open up multiple files and if you go to
01:48Find/Change which has its own Search menu.
01:50It's very powerful.
01:51You can see that you can do multiple file search.
01:54Well you know one other feature that I forgot to mention is that you want to
01:57find a text editing program that can do Grep.
02:00So like her it says here find with a Grep checkmark.
02:03That stands for General Regular Expression Parsing or it's often called Regex or
02:08Regular Expressions in a program.
02:10What that lets you do is pattern-based searching.
02:13Because there are a number of instances where you want to search for every
02:16instance of say a tag called h1 regardless of what it's followed by, and
02:21replace it with something else, and then with a little bit more information
02:24at the very end of it.
02:25So you want to keep some stuff intact and change other stuff.
02:28Those are kind of complicated Find/ Changes and that's usually done quite easily
02:32with something called Grep or Regular Expression.
02:34Not every program can do that, so TextWrangler and BBEdit, its big brother can. So can Notepad++.
02:40I was talking with somebody just last week who told me he likes to use
02:44Dreamweaver, which makes a lot of sense when you're editing contents of EPUB
02:48files because they're basically miniature web sites.
02:50Let me hide others. So with Dreamweaver if you already have it and you're
02:55familiar with it, why not?
02:56You can easily open up an XHTML file and not only can you edit the code and do
03:03searches, you know I mean Dreamweaver is meant for this stuff.
03:05But you can also easily see what it looks like in the Design View.
03:09I mean with a program like TextWrangler or Notepad++, you keep having to preview
03:14that in another program to see what it's going to look like as in the results.
03:18But Dreamweaver gives you a design view.
03:20And of course if you're editing CSS files, so Dreamweaver is really powerful with
03:24CSS files and you can see the immediate result of your changes to your cascading
03:29style sheets directly in your XHTML files.
03:31Now another one is, especially if you're very familiar with XML that you might
03:35want to use is any of the products from oXygen, and this is <oXygen/> XML Author
03:42is what I have open now.
03:43They also have <oXygen/> XML Editor.
03:46Now these products range in cost from about $200-$700.
03:51This is not as powerful as XML Editor.
03:54What's great about XML Author is that it's got a lot of the big brother features about it.
03:59But it also let's you easily work with EPUBs without having to expand or unzip them first.
04:06What I've done here in Author is I've turned off a lot of the sidebars and
04:09panels that I don't need.
04:11But I have opened one called the Archive Browser. And you get to the Archive
04:18Browser by going to the Window menu, choosing Show View, and choosing Archive Browser.
04:22As with InDesign, you can save the layouts. You can save this as your layout
04:27for working with EPUBs.
04:28What Archive Browser lets you do is you click the very first icon and it lets
04:32you open the actual EPUB and it expands it inside here.
04:35Well it actually shows you the content it hasn't quite expanded it yet, but if I
04:39twirl this open and I say let me take a look at this toc.ncx,
04:44it expands it right here.
04:45And I can go ahead and edit this as I want.
04:48And now when I am done I just save it.
04:50If you open up more than one file like this, it opens them up as tabs like in a browser. I like that.
04:56And it's very simple to work on this and it shows you every single item
05:00inside that EPUB file.
05:02Unfortunately you can't do multiple file Find/Changes in this way. You'd have to
05:06expand it first, but it would be cool if they added that feature.
05:10When you're done working on an EPUB archive then you click the second icon,
05:13which is Close archive.
05:15So they're kind of expensive.
05:17A program that I like is a free program called Sigil, not quite as powerful by
05:21any means as Author, but its claim to fame like Author is that it can open up
05:27the EPUB file without having to expand it first.
05:31So I can go to File > Open, select the EPUB file that we've been working with,
05:37and as with XML Author, I can see the files on the left.
05:41However, Sigil is a little different in that we're not seeing every single one
05:45of the files. Like notice you don't see the toc.ncx file here in the left.
05:49So you can't rely on this as showing you the entire thing expanded.
05:53The way that Sigil works is that it's trying to hide the really geeky stuff from
05:57you and give you a different way to work with it.
05:59So for example when you want to work on the navigational table of contents you
06:02don't have to edit the code of toc.ncx.
06:05You come up here to the Tools menu and you go to the TOC Editor.
06:08And here you can choose whether or not to include these chapter headings in
06:12the navigational TOC and you can even select some of this text and change the contents of it.
06:18And Sigil will in the background update the toc.ncx file for you.
06:23It's got a lot of other features.
06:24This isn't how to use Sigil program, but I wanted to point out to you that it's a
06:28very interesting and useful program that I'll be using quite a bit during the
06:31course of this video.
06:33It's available for Mac, Windows, and Linux computers.
06:35And the author does really great technical support on a forum called
06:39mobileread.com that I'll be talking about in the last video about resources
06:44you should know about.
06:45So my suggestion is to gather a few of these tools together, because sometimes
06:50one tool is better than the other depending on the particular kind of job.
06:53And having any of these tools available to you will make it much easier to work
06:56with EPUB files than just a plain old text editor.
Collapse this transcript
Modifying the navigational TOC
00:00The navigational TOC or table of contents is the automatic table of
00:05contents that ereaders pick up based on the contents of the toc.ncx file in your EPUB file.
00:12So here we are looking at the EPUB file called CAHistory-frombook, meaning I
00:16created this from an InDesign book, a compilation of five different InDesign
00:21documents, and because I didn't use the feature in CS5 that lets me use a TOC style,
00:27InDesign went ahead and created the nav TOC but it used the names of the
00:30documents as the TOC entries.
00:33Now here is an example of where you might want to actually edit the EPUB file
00:37instead of going back and re-exporting from InDesign doing all the TOC style stuff.
00:42So you want to be able to edit these labels here.
00:45Because you've watched the previous videos, you know that all this is governed
00:49by the file called toc.ncx, which is inside the expanded EPUB folder, which I
00:55have already done for you in the Exercise Files.
00:57If you look inside the OEBPS folder or the book folder, you'll see the toc.ncx.
01:03Now what I'd like to do though is if I just need to edit this one little file,
01:06I would like to try and edit it without having to expand the EPUB and then
01:09have to rezip it again.
01:11So I would turn to a program that would open up the Archive and let me edit the
01:15innards of the archive, and to me that would be either Sigil or oXygen Author.
01:20So if we go to Sigil and we choose open this one from the book,
01:27CAHistory-frombook-- and remember Sigil doesn't show you the actual toc.ncx file.
01:32It lets you edit the TOC from the Tools panel, TOC Editor.
01:36But this is an instance where Sigil is not going to help you, because Sigil only
01:40counts as a table of contents when the table of contents has been marked off with
01:44an h1 tag, which InDesign will automatically do if you use the TOC style.
01:50But because in these files, if you look at early_history here, at the code,
01:54these are styled with the class subhead, not h1.
01:57It's thinking that there are no TOC entries.
02:00Which is kind of weird. I think it is a failing of Sigil, but it's free
02:03program and you have to donate money to this guy to help develop it until what
02:07we need done with it, and maybe there's a way to do what I want it to do but I
02:10just don't know how.
02:11Anyway, what I am going to do is I am going to close this document in Sigil and
02:14we will jump over to Author and we will open it there.
02:18So I'm opening up the archive.
02:20It's the same EPUB file and here we do have access to the toc.ncx file and
02:26here's all of our text.
02:27So when I went over the contents, what's inside this toc.ncx file, in a different
02:32video. I mentioned that all of your Navigation links appear between these two
02:36tags called navMap.
02:38Here is the opening navMap and then the closing navMap tag is at the bottom.
02:43Every instance of a link inside the navigational table of contents is called a navPoint.
02:49So here is the opening of the navPoint. Each one has its own unique ID and
02:53playOrder and then each navPoint has two things. It has a label.
02:59This is the actual text that appears and then it has a content source,
03:03meaning where it links to.
03:05By default the label is the same as the content source except for the extension.
03:10So all we need to do is change the label.
03:12Let's go ahead and start up here with the first one.
03:14So we don't want the text label to be 01_early_history.
03:18We would like it to say just Early History.
03:20So we are just going to change it right here, Early History and then we will
03:24save the changes that we've made, Command+S or Ctrl+S. And now I will
03:29double-click on that file again to open it up and you can see that we have
03:33made the change, Early History, and we would go through and make the other
03:36changes as necessary.
03:38So that's how you can edit the navTOC in Author.
03:41There is a time though that Sigil will help you with navTOCs and that's if you
03:46have created one from the TOC Style feature.
03:50If we go to File > Open in Sigil and choose CAHistory-fromTOCstyle.epub and
03:56choose Open and then we go up to the Tools panel, you can see the TOC Editor.
04:01And here we see the actual Table Of Contents Editor and you can choose whether
04:05or not to include any of these, and then you can also edit the text.
04:09But a caution is that editing this text here, you just double-click it to edit it,
04:13will actually edit the text inside the file.
04:16Unlike editing the TOC directly,
04:19the actual XML file like we just did in Author, but if I said Early History Of
04:23the People and said OK and saved our change, and then we come back to it,
04:30you can see that it actually change that.
04:32Now according to the Sigil instructions, if you don't want to change the content
04:35of the XHTML file but you just want to change the header, what you would need to
04:39do would be to-- let's try another one. Go to Code View.
04:43I am going to actually go to Split View, so we can see both the Source and the Code,
04:48and inside, you see how it's marked out with an h1 that's what InDesign did.
04:52You would have to add a title tag and call it title=" and then what it is
04:58that you want to say.
04:58So I'll say SFO like the airport, and then save those changes by pressing
05:05Command+S and then when we look at the TOC Editor it says SFO.
05:11And then if you want to see the actual EPUB, then we will come over here and
05:16double-click this and there you see it says SFO.
05:19So depending on what it is that you need to do with the TOC, you can use either Sigil's
05:23= pretty friendly user interface or you might need to actually get your hands
05:26dirty editing the code in a program like oXygen or TextWrangler.
Collapse this transcript
Adding and editing metadata
00:00What are we looking at here?
00:02The Dublin Core Metadata Initiative.
00:05What we are looking at are the types of metadata that can be included in EPUB.
00:11Subject, Description, Publisher.
00:13This is the actual source for what this metadata is suppose to represent.
00:17Now do you remember back in InDesign when we exported to EPUB there is a
00:21checkbox in the first panel called General that said Include Metadata and then
00:27there was a field for Publisher.
00:29This is where you would enter that information and that is what's going to
00:33happen in the resulting EPUB files that there's going to be an entry called
00:37Publisher with what you entered there.
00:39But notice that there are many more fields available here that you can enter in
00:44an EPUB Metadata section then were available in InDesign, even if you went to be
00:50File Info panel which I showed in another video and added information there
00:54unlike keyword and copyright information.
00:57So where is this metadata listed?
01:00Let's open up Author program and we will go ahead and open up an archive.
01:05We have history text with metadata information and we'll open it up and it's
01:10inside the OEBPS folder.
01:12It's one of the important sections of the content.opf file, so double-click that.
01:17Now sometimes when you open up an XML file in Author or even TextEdit it'll open
01:23up in one long scrolling list because apparently there is only two lines in this
01:27file and one of them is very-very long.
01:30So depending on the kind of program that you have, you should try a software app
01:33or something like that, but what I love about the oXygen programs is that it's
01:37got this wonderful little icon here called Format and Indent if you click it
01:42just breaks it out and makes it much easier to work with and it doesn't add any
01:45extraneous comments or code to the files, so it's great.
01:49Here is the metadata section.
01:50It starts with metadata right at the top and ends with the closing metadata at
01:54the bottom and here are all the entries starting with DC.
01:58It means Dublin Core.
01:59The once we entered in InDesign came through just fine.
02:02When we set the title of the work in InDesign's File Info dialog box, History of
02:07San Francisco : Excerpt, I entered the author, that was Joe Schmoe, and then
02:11here are my keywords according to the Dublin Core.
02:13And according to IDPF specifications you can enter in multiple subjects,
02:17multiple keywords for this, but I can tell you though that in most cases when
02:22you are uploading EPUB to say the Apple iBookstore or Kobo or Sony bookstore,
02:27they have a form there that they want you to fill out with metadata and they
02:31want you to choose from a standardized list of subjects.
02:34So that it's easier for people who are organizing say like on the iBookstore
02:39where it says here is all of our history books, here is all of our
02:41science-fiction books, that everybody has used the same term.
02:44So you can go ahead and enter as many subjects as you like, but you're probably
02:48going to have to redo some of this down the road.
02:52Now one thing that InDesign does not let you enter unless you Tales Dejong's
02:56script that I mentioned earlier called Fixed Links and add that publication year
03:01is the publication year of the EPUB.
03:03That's this right here which is Date.
03:05Notice that it's empty.
03:06And if I submitted this for validation, it would kick it back and say that
03:10you are missing a date.
03:11So you can go ahead and add it yourself by editing the content.opf file.
03:16What I like about using a program like oXygen Author for this rather than say a
03:20free TextWrangler is that oXygen Author does automatic code completion, so like
03:25if I get rid of this closing tag and then just start typing you see how it
03:29automatically created an opening and a closing tag and I can just type in 2011.
03:34You also have the option of doing something like February 15, can do something.
03:38That's all optional but at least a four digit date is what they want.
03:42And now just that one little change will make it go ahead and validate.
03:45So I am going to close this and save changes at the prompt and then close the archive.
03:51Now if you don't have oXygen Author, which I know is kind of expensive, Sigil
03:56also lets you easily create and edit metadata.
03:59So I am moving over to Sigil and I will just go ahead and choose Open and
04:06select the same file.
04:07You're not able to access the content.opf file over here on the left.
04:12Remember Sigil tries to hide the uber geeky stuff from you.
04:15Instead you use something from the Tools panel called the Meta Editor.
04:20Any kind of metadata that you've already entered appears here and sometimes it
04:24will appear like this.
04:25Like oh, what happened to it?
04:26I'll just click More and then you can see everything that's in here.
04:30And if you want to add or remove stuff you just click here, add some more
04:35basic metadata properties, like an ISBN number, the source, type, the rights, and so on.
04:42Or you can also remove entries as well.
04:44So you can edit the metadata either in Sigil's Meta Editor or you can just go
04:49ahead and enter the content.opf file yourself.
04:52Just be carrel that you are opening and closing the tags correctly and that you
04:56only use the metadata tags that are allowed in the specification, that are
05:02allowed by the Dublin Core.
Collapse this transcript
Creating guide sections for iBooks
00:01Has this ever happened to you?
00:02You are reading an EPUB and here we are at the front of it.
00:06It says A Brief History of San Francisco in the NAVTOC here.
00:09It's says we are on page 1 of 14.
00:11Okay let's see what's in here. Click on Contents.
00:13But well wait a minute.
00:13It says Page 3 of 14.
00:16Sometimes I've opened up and EPUB and it says that I'm on chapter 1 and I look
00:20at it and says I am on page 8 and it automatically skipped the first beginning
00:24pages, so I am always obsessive about that.
00:26I am like what did I miss?
00:27So I am going to click back here and I missed the title page. Ohhh.
00:29Well this is actually an optional part of the content.opf document in you EPUB
00:36called the guide section and Apple recommends that you include a guide section
00:42for books that will be listed in the iBookstore and I'm pretty sure that
00:46Kindle does as well.
00:47Because I'm pretty sure that this has happened to me on a Kindle.
00:50And as you can see if it has a guide section then a lot of other ereaders like
00:55Adobe Digital Editions will also honor it.
00:57So what is the guide section exactly?
01:00Let me close this and show it to you.
01:03Here I already have this open in Author.
01:05We are looking at the content.opf file and at the very bottom after the spine
01:11we have this section called Guide, if you remember from the beginning of this
01:15chapter when I was going through identifying the parts of an EPUB file, I said
01:19that this file has a fourth optional section and that's this optional section down here.
01:23If you don't have the guide, this EPUB will still validate, assuming everything
01:27else is still right.
01:28But the guide tells the EPUB reader the semantic meanings of the different files.
01:33For example, text. See the type Text?
01:36This is the actual chapters inside the EPUB file.
01:40But then we also have other semantic meanings like cover, and title-page,
01:44and table of contents.
01:47So the guide tells the ereader what are the meanings for the different kinds of pages.
01:52You could have acknowledgements, you could have a type that says index,
01:55glossary, copyright page, dedication, and so on.
01:59And depending on the ereader's specifications, it will automatically make
02:03one page appear first.
02:04And then the user will actually have to scroll backwards to see other pages.
02:08So if you want to create or add a guide to your document, InDesign will not
02:12create this for you unfortunately.
02:14You actually have to open up the content.opf file and add this code yourself.
02:18This might be one instance where I would use Sigil instead of a text editor
02:22because Sigil does this very nicely. Let me show you.
02:26I'm going to close out of this document.
02:27We have SFHistory before.
02:29This is after I added a guide. This is before.
02:32And in this one, I'm going to open up this file in Sigil.
02:35So I'm just going to right- click it and choose Sigil.
02:40Remember Sigil is a free, cross-platform EPUB editor.
02:43It's kind of interesting how it works in Sigil is that you locate the page that
02:49you want to designate as being a particular kind of page.
02:53And then you right-click and choose Add Semantics.
02:57All right, and this will build the guide for you.
03:01So you say, this is the table of contents page and this is the cover page and
03:08then these, you have to do them one by one as far as I know.
03:11I haven't been able to do this automatically to all of them.
03:14But remember what's cool about Sigil is we don't have to expand that EPUB file.
03:18And you just here and say all these are Text.
03:20So your actual chapters should be text.
03:23And I probably don't even have to go right to the page but I'm just going to do it anyway.
03:27And now I'm obsessively finishing this since we only have a few chapters to do.
03:32And then this will add the guide section for you.
03:35And then we're going to close this entire document and save all of our changes.
03:41So I've moved over to XML Author and we'll go ahead and open up that file.
03:46That was the before one that I just edited.
03:49And we'll go to OEBPS, to the content file, and at the bottom, there we go.
03:56There's our guide that we just created with Sigil.
03:59So this is just another little bit of editing that in most cases you're going to
04:03have to do by hand in whichever program that you have and if you have Sigil, it
04:07makes it a lot easier.
Collapse this transcript
8. Editing EPUB Files for Formatting
Cleaning up the XHTML files
00:00The XHTML files that InDesign creates inside the EPUB often have superfluous
00:06code and tags and things like that, that it would be a good idea to clean up if
00:10you need to do any kind of editing of the internal files of the EPUB itself.
00:15So I'm going to show you what these XHTML files look like and a simple
00:18cleanup that you might want to do right from the get go.
00:21I've already expanded to CAHistory. epub into its own folder here and inside
00:28the OEBPS folder, you should remember, are where all of the XHTML content files are located.
00:34And I've already selected each of these and opened them up inside TextWrangler.
00:40TextWrangler is one of the text editing programs that I'd like to use to edit
00:43XHTML files. You can use any editing program that you'd like, though what I'm
00:48going to show you here is a multiple file find change using GREP, a very simple
00:53Grep. Remember that is sort of like a pattern-based searching.
00:56So your program should be able to do this.
00:58We're looking at early_history.xhtml. This is the first chapter of this EPUB
01:04and you can see that it starts out with some gobbledygook at the top that XTML
01:09files always start out with, declaring what kind of doc type it is, that it's
01:12HTML version 1.0, the title of this document, and which stylesheet controls its formatting.
01:19That we'll be talking about later.
01:20But I want you to take a look further down. The body of the XHTML starts and
01:26notice that InDesign will always create a div, standing for division or
01:31section of this web page, that is named for the actual InDesign file and that we can ignore.
01:37After that first div, then you will always see another div that is actually the
01:42text frame containing the text of the story, and InDesign assigns it a class
01:47called generated-style. That again is ignored by the EPUB Reader and that you
01:50don't have to worry about.
01:52But what does take up a lot of room is this little bit that CS5 adds to every
01:56single paragraph tag.
01:59It says that the XML language is, and in this case it's saying English US.
02:03Now yours might say something different if you're from a different country, like
02:07if you're from the UK it will say GB, I guess for Great Britain, and sometimes
02:11it just says en-US.
02:12It knows both ways.
02:14If this just takes up room and if you have like say 30 chapters in a book
02:18and this is happening for every single paragraph, it does take-up a fair
02:21amount of space.
02:23So I'm going to show you how you can use multiple find/change to clear this out.
02:27It's not needed at all for this EPUB file to validate or for EPUB readers to be
02:31able to understand what its for.
02:33Not quite sure why InDesign adds it. Nobody really knows.
02:37So in TextWrangler, if you want to do a regular find/change, you choose
02:41Command+F here, but if you want to insert through multiple files, you choose
02:45this command, Multiple File Search, and then under Search In you're able to
02:51choose which files you want to search in.
02:52Since I've already opened up these files, I can just say oh, I want it to
02:57search through all these open text documents, or if you just wanted to do the
03:01find/change like a couple of these, not all of them, you can check the ones that you want.
03:06So I think it's pretty cool for a free text-editing program.
03:09Now what we want to find is we want to find this bit here, including the space
03:15preceding XML, and what we want to change it to is nothing. We want the end
03:20result to look like that, all right.
03:22So let me Undo and with this selected, I'm just going to copy it to the
03:27clipboard and then find/change, I'll paste it right inside here.
03:31So notice that the space came along as well.
03:35Right now I still have GREP selected from the last time I did a find/change, but
03:39typically GREP or regular expression will not be selected. You are just going to
03:43do a regular find/change on this string of text that you've entered up here.
03:47What I could do is say find this and replace with nothing, and then I
03:51could come back and say and then find this bit with just en and replace with nothing.
03:57And one of the most powerful things about GREP is that you could combine both
04:01searches into one with a very simple method called an OR search.
04:06So what you do is you surround the first thing you want to find in parentheses,
04:11don't forget to include that space, and then you put a little bar, which is
04:16Shift+Backslash. That will make a little vertical bar also known as a pipe. And then
04:22you put in the other thing that you wanted to find, so the other thing is this.
04:26Right here, I'll copy that and over here I'll put another open parens, paste,
04:34close parens, and then remember to turn on GREP, because if I don't, it's going to
04:38search for this exact thing.
04:39It's not going to find it anywhere.
04:41But separating searches with parentheses and the pipe, you could do like 5 or 6
04:46in a row, if you want them all replaced with the same thing, which is nothing.
04:49It's a fast way to do a search and replace, and it's a nice easy way to get used
04:54to do a little bit of GREP.
04:55And now I'll just click Replace All and I'll get a little dialog box that says,
05:00do I want to confirm before I save these changes to the files, do you want to
05:03see the results, should I leave these files open or should I save them?
05:07So I'm going to say save the changes. I don't care by confirming. I've done this
05:10before, so I know this will work.
05:12But I do want to see the results.
05:13I want to see how many hits it found.
05:15So I'll say Proceed and this is the Search Results dialog box the TextWranger
05:20puts up. Your text editor might put up something different.
05:23You can see how much time it saved me. I've only had a few very short chapters
05:27in this, but it found all these changes, and now it's nice and clean.
05:31So you might find other instances where you need to clean out some stuff in
05:35XHTML and learning the ins and outs to the XHTML is a little bit beyond the scope
05:39of this particular title, but there are plenty of other titles on lynda.com
05:43where you can learn about editing HTML files. But simply being able to do a
05:47quick find and replace to give you some of the superfluous code that InDesign
05:50adds will make your job a lot easier.
Collapse this transcript
Cleaning up the CSS file
00:00Just as we did some basic cleanup to the XHTML files that InDesign included in
00:05its EPUB export, we are also going to do some basic cleanup of the CSS file.
00:10Now you may recall from previous videos that all the styling in an EPUB comes from
00:16the cascading style sheet, the CSS file, and the styles in the CSS file come from
00:22the paragraph and character styles that you created in InDesign and applied to
00:27the texts. And all that we covered in previous videos.
00:30Inside the expanded EPUB file, we already extracted all the files from inside our
00:34EPUB, you'll recall that inside the OEPBS folder, also known as the Book folder,
00:41we have the XHTML file and this is the CSS file.
00:45I have open both of these up inside Text Wrangler.
00:49There's the history sample of XHTML and template.css and with the CXHTML file showing,
00:55I just want you to notice that toward the top in the head section it reminds you
01:01that the CSS formatting is coming from this file called template.css.
01:06So any changes that we make to this CSS file you will be able to preview in this XHTML file.
01:15So let's take a look at the CSS file and I've got some typical changes that
01:19you might want to make.
01:20Let me drag this over to the center, here we go.
01:24First at the top you'll usually find some of these generated styles next to
01:29divs and these are the ones that InDesign automatically spits out for the name
01:33of the InDesign document.
01:35and for the text frame containing the text. I briefly mentioned those in the
01:39previous videos. These you can get rid of.
01:41You really don't need them.
01:42They are not going to apply anywhere.
01:43It's okay to leave those tags in the XHTML file. They are just going to be ignored.
01:50Now notice that for every paragraph style and character style in your InDesign
01:55document we have a matching CSS style.
01:59The subhead for h1.subhead has been styled with all these settings and then we
02:04have a p.headline, p.body-first and you can see where these are applied in your
02:10XHTML file in the opening class.
02:14So here's p class=body-first, here's class=headline, h1 class=subhead Early History.
02:23All right keep scrolling. We have a class called image-w-caption.
02:29This was the actual paragraph style assigned to the paragraph containing our anchored graphic.
02:36Underneath the anchor graphic we have a caption with the paragraph style caption.
02:41So again let's come back to the CSS file and hopefully this is all making sense to you.
02:45Now I am not going to teach you how to write CSS. There are many titles here at
02:50lynda.com that will do much better job of that and you really don't need to be
02:54CSS experts in order to do some basic editing of these files.
02:59And actually because you are already familiar with paragraph and character
03:03styles in InDesign, you have a leg up on a lot of other people in understanding
03:07what cascading style sheets are all about.
03:09Because one of the first problems that you're going to see or that actually
03:13you'll realize with the cascading style sheets is that they have settings for
03:18things that you really don't care about and that could make it more difficult
03:22for you to change the styles later on.
03:25It's kind of like you know how character styles work in InDesign where you can
03:28just make a character style called Bold and no matter what size type you apply
03:32it to it will become bold?
03:34Well what about if somebody who wasn't that familiar with InDesign created a
03:37character style but they also included specifications for the type size and type
03:42weight and all the other settings for character style. That just makes it much
03:46more inflexible right. You would have to create multiple character styles every
03:50time you wanted to apply the character style bold to a different typeface
03:53without changing the typeface.
03:55Well this is for some reason what InDesign does in CSS is that it automatically
04:00assigns attributes to 11 different settings for every style. Even though they
04:05don't have to be set. Even though it would be easier if you would just leave
04:09them alone and keep them at the default of not even declaring a special setting.
04:13For example here under body-first we have font family Chaparral Pro. Now we're
04:19not even talking about assigning fonts because you don't have that much
04:22control at all over the typeface used. All of the devices, or at least 90% of them,
04:28they have their own typeface is built-in and many of them are not shared
04:31from device to device. So you can't just say for example Arial like you could
04:35with a web site and know that most browsers will be able to open up a document
04:39and show you that font.
04:40I mean Apple's iPad has 30 fonts and the Nook has 5 fonts and I don't think any
04:45of them are the same.
04:47You can just delete the entire setting for body-first.
04:50You don't need to know what the face is.
04:53You know font-weight, that's something like a Normal or Bold and that is
04:57something that you don't want it be Bold.
04:58You want it to be Normal.
04:59You can leave it as is. Same thing with font-style.
05:02Font-size and line-height are fine and notice that it uses the em measurement
05:07system and em is an interesting measurement system that's only used with web
05:12design and em is a good thing.
05:14And em, when you define a font size in an em, it means that it is this amount of
05:20the default font size for the ereader.
05:24So in 1 em is the size of the default font of the ereader and most ereaders are 16 points.
05:30So .7 9 of an em means a little less than 16 points.
05:35If you want to get exactly 1em out of InDesign you have to set your type size to 12 points.
05:41It'll come out as 1 em. I know it's weird. Not 16.
05:44So in other words the default type size in InDesign of 12 on auto leading will
05:48give you the default font size for ereader.
05:51And then for every other measure that says em, it is actually a percentage of
05:56the current font size.
05:57So 1.42 em line height, which is leading, means its 1.42 times the size of this font.
06:06It's good to know that you can keep it and you don't have these pixels or inches
06:09or anything like that.
06:11Text-decoration are things like dotted underlines or backgrounds. Again this is
06:16an example of an attribute that InDesign set that you don't need, so you can
06:19just completely deleted it.
06:22When the attribute has not been set then the ereader or the web browser will
06:27assume it suppose to be the default of none.
06:29Same thing for font-variant. That would be like case. Leave that alone.
06:35A text-indent, a first line indent, of 0. Sometimes you might want to keep it at zero or
06:41sometimes you might want just delete it or leave it alone.
06:44Text alignment, justifying. Actually people have very little control over if text
06:49is justified or left aligned or right aligned, so I normally just get rid of that.
06:54And a color of all zeros means black. That is the default assumed in color.
06:59so we will get rid of that and so on.
07:02So you can go through all of your styles and get rid of the settings that don't
07:06need to be set, and this will make it a lot easier for you, especially as
07:09you get into more advanced CSS, of being able to do like child and parent
07:15settings. Because CSS remember stands for cascading style sheets and in that
07:21sense it's kind like based on styles in InDesign.
07:25So that if you have a parent style that says text decoration is dotted and then
07:30you make a child based on that one, then its text decoration will also be dotted
07:35unless you say something else.
07:37That's why it's best to leave the attribute set to none to have them completely
07:42not even defined. So that they can be most flexible and they can take on the
07:46attributes of their parent, should you decide to set up your CSS this way.
07:50So you need to go through the CSS and get rid of all of the specifications
07:55that really aren't required and then you can come back and you can fiddle around
07:58with changing the ones that you do and I am going to show you a few common
08:02things that you might want to change in this chapter, things like Spacing,
08:06Drop Caps, stuff like that.
08:08But I also want to encourage you to explore more with CSS.
08:12It's extremely powerful.
08:13I've called a couple web sites in Firefox that you should know about.
08:18First of all right now we are using EPUB specification I think its EPUB Version 2.
08:22And EPUB version2 allows tags from CSS2, that's the version of CSS standard, and
08:31this is the website for CSS2 with a ton of information about what kind of tags
08:37are allowed with CSS2.
08:38There might the more information that you want but I know that there are some
08:41gearheads out there wondering which version of CSS does EPUB support and this is the version.
08:47And then I also want to show you this really cool site called EPUB Zen Garden.
08:52It's from ThreePress consulting, the same people who do Ibis Reader and the EPUB
08:57check online, and it's along the same veins as another very well-known website
09:02called CSS Zen Garden. And basically the producers create a set of content and
09:09they invite people to take that same set of content and change how it looks
09:13purely based on CSS.
09:16And people can come to the website and choose among this different CSS files
09:20that have been associated with the same content to see how it looks, kind of
09:24like skinning a website or skinning a game, to see what the same content looks
09:28like with the different cascading style sheets.
09:30So here at EPUB Zen Garden, they only allow CSS that is supported by the EPUB
09:37specification and you can change the style from his drop-down menu.
09:41So like here is what this style looks like, the same content. So it's a book so
09:46there's a chapter open or a quote, a drop cap. You can look at all the chapters
09:52because a lot of them have different content and section openers with all these
10:00and what's even more cool is that when you find one that you like, like I like
10:06this Gibson one, isn't that elegant, you can actually grab the CSS and use the CSS as
10:12long as you attribute to them.
10:14You can find out more about that underneath the About section, but they're all
10:18released under a Creative Comments guidelines. And to get to the CSS you go to
10:23View > Page Source and then click on the CSS link.
10:28So I've been playing around with this. I notice some of the CSS is very well
10:31commented and it has instructions about like who wrote this. The comments are
10:37all written out with the slash and the asterisk next to it. You can see like here
10:41h1 he is saying is used for the book title and the font size is 3.5 em and in
10:48parentheses, he's reminding you that 16 points, which is the default type size,
10:53times 3.5 equal 56 points.
10:56So the font size for the title will be 56 points. Very well commented.
11:00So you can just select all this copy and paste it to a text file and try this
11:04out with your EPUBs.
11:06Design is design and the CSS file in an EPUB is what drives the design.
11:13So I recommend that any time that you can spend learning more about CSS will
11:16improve the quality of your EPUBs.
Collapse this transcript
Setting spacing in the file
00:00One of the things that designers will find themselves fiddling around with in
00:04the CSS file of an EPUB is the spacing, the spacing between paragraphs, between
00:09heading and subheading, between image and caption and caption in the next
00:14paragraph following that, because sometimes even though you might be diligently
00:18adding space above and space after, in InDesign it doesn't really translate
00:24correctly to the EPUB.
00:26So all that is controlled in the cascading style sheet file and let's take a
00:30look that right now.
00:31I have expanded SFHistory.epub to a folder and inside the OEBPS folder we
00:38have the CSS file and in this example, we just have one story found, just the XHTML file.
00:44So I am going to select them both and open them up with TextWrangler.
00:51So here's the CSS file and you can see that I've already gone through and
00:54gotten rid of a whole lot of extraneous CSS code. This is something I talked
00:59about in a previous video.
01:00What controls the spacing in between paragraphs is called the Margin setting.
01:06Now let's take a look at what this XHTML file looks like, as it would be viewed in EPUB.
01:11Now here's a little tip that I would like to use, especially for this
01:15intermediate proofing.
01:17We could go back to the Finder or Windows Explorer and actually select this
01:23folder and then recompress it and change the extension to EPUB or use one of
01:28those cool scripts that I showed you for Mac OS X.
01:32But instead what I found is that if you preview the XHTML file in a browser then
01:40you can get a close approximation of what it's going to look like in an ereader.
01:44Now a program like Dreamweaver, for example, would be ideal for this in that you
01:49can edit the code and then always look at Design view to see what the XHTML file
01:53looks like, so that would be great if you use Dreamweaver.
01:56Also if you use Sigil, that utility that I showed earlier, you can edit the CSS
02:02file without even unzipping the EPUB file and then look at the built-in
02:06EPUBReader to see the effects of your changes.
02:09But right now, I am in the groove of using TextWrangler.
02:12So instead what I'm going to do is I am going to take this XHTML file right here
02:16in the Finder and I am going to preview it in Safari.
02:20Now why Safari and why not Firefox, which I usually prefer?
02:24Because both Safari and iBooks, the Apple ereader, use the same rendering engine.
02:31So the closest you can get to previewing how an EPUB will look like on an iPad
02:36without actually having to put it on the iPad, is to preview the individual
02:40XHTML files in Safari.
02:42I am just going to drag this over to Safari and it might open up like this.
02:49There are very few ereaders that look like this, so you might want to resize it
02:53to be roughly what it might look like at 600 pixels wide.
02:57And now actually let's take a look at this.
02:59I am going to hide the other applications so we can focus on this.
03:03So there's our title in blue and our subheads in orange, which is how I designed it.
03:08We have an image with a black stroke on it and a small caption below it, which
03:13is centered. That's working great.
03:14I have some words in bold.
03:17My drop cap isn't quite working.
03:19We will be talking about that in another video and we have some indents.
03:22But you know the first thing that strikes me is what the heck happened
03:26between these paragraphs?
03:27What's all this white space doing?
03:30I don't really want that white space.
03:31I have first line indents.
03:33We'll see what happened was that I became a little too vigilant in getting rid
03:38of what I thought was superfluous code and at the end of every body declaration
03:43here I forgot I got rid of the margin setting.
03:46So in CSS if you don't set a margin, like down here or say underneath the
03:51headline, then it's assumed that you want extra space in between the paragraphs.
03:56If you want no bottom margin, you have to set a margin of zero for the bottom.
04:01So let's go ahead and fix that right now.
04:04The margins are set in four measures and they start from the top, so if you
04:08think of like the hands of the clock, 12 o'clock, 3 o'clock, 6 o'clock,
04:129 o'clock, top, right, bottom, left, and they're all in em measurements which I
04:18talked about in previous video. This is a percentage of the current font size.
04:23So zero em means zero.
04:25Let's just actually copy this entire line to the clipboard and I'm going to
04:30paste it after body-first and we don't want that indent there.
04:35I don't want any margin top, bottom, I will leave everything at zero actually,
04:40just like that. We want no margin anywhere.
04:44And I'll select this whole thing again, and I'll put it after body, here we go.
04:49So then you save your CSS file and then jump back to Safari for using my method
04:56and refresh the view. Just click the Refresh button up here. Here you go.
05:01So it fetched the latest version of that XHTML file, which in turn fetched the
05:07latest version of the CSS file that hooks into it, and that's how you change
05:11spacing in between paragraphs.
05:13Now the spacing that is the first line indent is actually called text-indent and
05:18you can see it right over here in p.body.
05:21So any paragraph that has been tagged with the class of body has an indent of one em.
05:27If you want to increase that, you can just do this. Let's say 3ems, save it,
05:33I'm pressing Command+S or Ctrl+S here, jump to Safari, refresh, and you see the
05:39first line indents go in.
05:41So there's lots of places where you might want to play around with indents and
05:45spacing between captions and subheads and titles and it's very simple to do.
05:50Just use the margin setting and the text indent setting.
Collapse this transcript
Creating drop caps
00:00Now, even though you may have been very careful in your InDesign file to apply
00:05the drop cap character style to any drop caps you may have in there, because you
00:09watched my video about nested styles and you know that just because it was
00:13included in a paragraph style doesn't mean it's going to survive in the EPUB.
00:17You actually have to apply the character style called Drop Cap to that
00:20character. Even if you are that careful, I am sorry, but I can guarantee you
00:25that it's not going to look like a drop cap when you export it to EPUB.
00:28At some sort of internal bug in this version of InDesign. The Drop Cap style
00:33does get applied, but the styling itself you have to do over again by hand.
00:38Let me show you what I mean.
00:39I have already expanded an EPUB story called SFHistory-sample.
00:43It's a very short story here and inside the OEBPS folder, we have two files that
00:51we want to work on: the XHTML file and the CSS file.
00:54So I've selected them both.
00:56I'm going to right-click, choose Open With > TextWrangler.
00:59Now you can open up this with any text editor that you want.
01:04In fact, you don't even have to expand in EPUB. You could open it up in Sigil or
01:08XML Author and there you can also access the CSS file without having to expand it
01:14and then as you save your CSS changes, you can see what the EPUB is going to
01:17look like, but I happen to be into TextWrangler this morning.
01:20So I'm going to use that one.
01:22Let me move this over to the center.
01:24So let's see what's happening in the XHTML file and let me soft wrap the text.
01:30And you see up here in body-first, because I did actually apply the character
01:37style to the first character L, it's surrounded by a class style called
01:43drop-cap, which was what I created in InDesign.
01:46Now if we preview this in a browser-- the Safari browser is the closest one to
01:53The iPad so I like to always preview in Safari.
01:57We can see that the color is there, but the droppedness of that cap is not there.
02:03So let's see what's happening in the CSS file.
02:06I am going to switch to CSS.
02:08All of the character styles will be at the bottom of the list.
02:11Paragraph styles come first and all the character styles start with span.
02:14So you can see that for Drop Cap, all that maintained was the color and I've
02:19done a bunch of these and sometimes it doesn't even maintain that.
02:22Sometimes it's just an empty style.
02:24So you actually have to add this yourself. Like if it's a drop cap that's
02:28black sometimes it won't include that.
02:30So the first thing that we want to do is we want to increase the size of this drop cap.
02:37There is no setting called Drop Cap in CSS.
02:39You have to actually add three or four different attributes.
02:42So I am going to hit Return and type font-size:, space, and we'll make it 3em.
02:53And then we end with always a semicolon. And you might be wondering what is 3em.
02:58No, it's not a company.
03:003em, e-m, is an em space and actually an em is a unit of measurement for websites for HTML.
03:07That is the size of the default font and in a web browser or a EPUB Reader
03:13usually the default font size is 16 pixels, equivalent to 16 points.
03:183em is three times that size.
03:21So if we want a drop cap that's like three lines big, you know that's going to
03:24get us close enough.
03:25We're probably going to have to fiddle around with this, but that's a good place to start.
03:28Now you won't see the effect on your XHTML file until you first save changes in your CSS file.
03:35So I'll choose Save and then if you are using my method of proofing in the
03:42browser, you're going to have to click the Refresh button in your browser. So there it is.
03:47That's larger.
03:48That's a good sign. And now we actually need to move it down and get the text to
03:53wrap around the right edge of it.
03:54So we are going to go back to the CSS file.
03:57Now to get text to wrap around, you use the Float command.
04:03I know it's strange, but it's the closest thing to text wrap.
04:05We are going to say float.
04:08Now we want the drop cap to float and we want it to float on the left, all right.
04:14So I have float: left. Semicolon. Save the file.
04:18I'm just using the keyboard shortcut to save, switch to Safari, refresh, there you go.
04:23It's getting closer.
04:25Now we need to move the L down and we can do that with a margin-top measure to
04:31add some margin above it, so we come back here.
04:34You've seen a bunch of different ways described for creating a drop cap with
04:37CSS. This is just one of them.
04:39So we'll add a margin-top measure of 0.25em, quarter of an em.
04:48Let's save our change.
04:49I'll just press Command+S or Ctrl+S, jump to Safari, refresh, here we go.
04:55Move down a bit and it's kind of touching the text over here on the right, so we'll
04:59add a little margin on the right edge as well.
05:02So I come back over here, hit Return, margin-right, let's try 0.05em.
05:13Save. Safari. Refresh.
05:17We see how it nudged over a little bit.
05:20It's pretty cool, huh!
05:20You can keep going.
05:22You can change the color, you can make this bold, you can make it italic, you
05:26can increase the size and then you have to fiddle around a little bit more
05:29again with the margin-top to move it down, so if you wanted to drop down three lines for example.
05:35But that's how you create a drop cap and I really don't know why InDesign can't
05:39figure this out when it exports, but maybe in a future version it will.
05:44In the meantime, just remember that it's pretty easy to create your own drop cap
05:48and it's actually kind of fun.
Collapse this transcript
Creating sidebars and pull quotes
00:00You see this blue box right here in the middle of the text?
00:04For lack of a better term or as a generic term, I am going to call this a
00:07pull quote and it is actually quite simple to create these kind of pull
00:11quotes in your EPUBs.
00:12I am previewing an XHTML file from an EPUB in Safari because both Safari and
00:19iBook use the same rendering engine called WebKit and as I have mentioned before
00:24in other videos in this chapter, it is a good way to preview what's happening in
00:27your XHTML and CSS code.
00:29I am going to show you how to create this in CSS, but before we jump over to
00:33the CSS and XHTML files, let me tell you that this is not how it came out of InDesign.
00:39When it came out of InDesign, it looked like this.
00:42So it was using a header and it did have a paragraph, but we didn't see any
00:48colored background or a box or anything like that.
00:51And even though I created this in InDesign by putting this text into a text frame
00:58and then I anchored the text frame in the text flow just like how you can
01:04anchor a graphic or an image in a paragraph, so that it flows with the text so
01:09that when you export according to layout order, remember we talked about that
01:13earlier, that it'll appear in the correct position in the story.
01:17So it might have even looked exactly like this in InDesign, but that's not how it comes out.
01:22And again, this is sort of like how InDesign strips out drop-cap formatting.
01:26It strips out object styles because I actually did create an object style for
01:31this frame called pull quote.
01:33Now one thing it did do though is that it brought along the actual tags.
01:38So all we need to do is fill it in.
01:39So let's see how to do that.
01:41I am going to close both of these for now and I have opened up both files in
01:47TextWrangler, our text editing program, both the XHTML file and the
01:52template.css file that governs its formatting, from the expanded EPUB folder in the exercise file.
02:00Take a look about fifth of the way down the screen now.
02:03This is where the image was of the San Francisco Harbor in 1851 and then below
02:08that paragraph we have this thing called div class="quote-box" and quote-box
02:14was actually the name of my object style that I had applied to that blue text frame
02:20that I then anchored in the text flow.
02:23When you apply an object style to a text frame in InDesign, even though the
02:28formatting doesn't come across, the name of that object style does come across
02:32and your text is enclosed in this div class of the same object style name.
02:38So it says div class and then we have the actual paragraphs of text with their
02:43own paragraph styles.
02:44So I call this quote-head, that was the name of my paragraph style, and this was a
02:49quote-body and then at the end of that, the div is closed off.
02:52So this is one div.
02:54Now if we look at the template.css, here is what InDesign does is that remember
03:00how it adds all your divs at the top of the CSS file and this is one that I've
03:03already cleaned up somewhat.
03:05It adds the div for your object styles that you've included, but it doesn't
03:10include any kind of formatting and you have to enter it on your own.
03:13That's actually kind of fun, if you want to play around with CSS, and I do have
03:17in the exercise files a finished version, so you don't have to madly scramble
03:22down what I am going to type right now.
03:25But let's go ahead and enter in some formatting.
03:28First of all, we are going to create a box or border around those two paragraphs
03:33that are in the pull quote and so to do that you need to give it a style.
03:36So I am going to call it border-style: solid,
03:41and it can be dotted and all sorts of fancy styles that you can do.
03:46Then I also want to give it a color. So border-color: grade.
03:52Now if you are using a program that's meant for CSS like Dreamweaver or Coda
03:56or something like that, then you will get a big list of choices as you enter in your CSS codes.
04:01But right now, I am just doing it because I have already tested these and now
04:05you want a width for that border.
04:07Pretty thick, the default width, unless you specify something.
04:09So I am going to say 1 pixel.
04:12Then we will save these changes and check out what it looks like so far.
04:17So as I have done before, I am going to preview this XHTML file in Safari.
04:23I am going to reveal this in the Finder, right-click, Open With > Safari, and
04:31then refresh because I guess I had it open before, and now we have our box.
04:37We need to add some space around here and then maybe a background color.
04:41So to add some space around it, let's go ahead and add some margins.
04:45So I am going to go back to the CSS file and we will add margin and we are going
04:55to go, remember, starting from the clock at 12, then 3, then 6, then 9, so top,
04:59right, bottom, left.
05:01So you want 1em and then on the right 3em worth the space, underneath 1em and on
05:08the left 3em, and save this.
05:13Go back to Safari. Refresh.
05:15We have added some margin room there.
05:18It is kind of neat how it always keeps it at 3em, left and right, as you can see.
05:22But the text is touching here and so we need to do a text inset.
05:27You would think that they had text inset in CSS because that's what InDesign is,
05:30but no, it's actually called padding.
05:32So we are going to add a padding amount.
05:35Padding, let's try 0.5em.
05:40Remember an em is size of the type in this element here.
05:44So this is going to be half of the size of whatever the type size is, and
05:48save that, refresh.
05:51Now that looks better and then we want to add a background color.
05:55So come back here and we will say background color:, space.
06:02There are some default colors like you can say blue or red or gray and
06:06those will work fine.
06:08But they're solid colors and if you want to get a really cool looking color,
06:11you need to enter one of these interesting little hex codes down here.
06:15A fast way to find out a hex code, well there is probably at least 5000 websites
06:19that will give you hex codes for various colors, but I would like to use
06:22Photoshop because I usually always have it open anyway.
06:24What you do is you click the bottom- left down here for the Photoshop Color
06:28Picker and then you can use the Color Picker. Notice it has a hex field right here.
06:33So if I am looking for a light blue color, I would come here to the blues and
06:38then come over here and I am watching this square where it says new color to see
06:43the background color that I want to use.
06:46Then as I click, notice that the hex code is updating, so that looks good.
06:50I think that's kind of cool.
06:52I am going to select that and copy it and then go to TextWrangler and we are
06:57going to paste it in.
06:58Now the hex code needs to be preceded with a number symbol.
07:02If you just type in red or gray or black, you don't need to put the hex symbol.
07:06Let's go ahead and save this and try again in Safari. Refresh.
07:12So that's how you can do a pull quote.
07:13Now you don't have to think ahead like how I did make an object style and embed
07:17it and things like that.
07:18I mean like if you want you can just edit the XHTML directly.
07:22You just have to add div class before the paragraph that you want to be part
07:27of your pull quote.
07:28So like I can select this part here. Copy it.
07:32Let's try this one right here.
07:33So I am going to paste.
07:37Then when you are done at the end of it then you close it with the close div tag.
07:43So at the end of this paragraph, I am going to write </div> and then
07:49we will save this file and go back to Safari and refresh and there is another pull quote.
07:57So whether you thought ahead and created object styles and embedded them in
08:02text flow or you decide, hey you know what, this would look better as a pull quote,
08:06you can do it very easily with some simple edits to the XHTML and the
08:10CSS files in your EPUBs.
Collapse this transcript
Setting text wrap rules
00:00Another way to create interest in your EPUBs and to call attention to special
00:04chunks of text or images is to set them off with this kind of text wrap effect
00:09that we are looking at.
00:10Notice that as I resize this that the text wrap maintains.
00:15How do you make that kind of text wrap?
00:17Well it's not something that you can do in InDesign and expect to be supported
00:22in the resulting EPUB without any kind of intervention.
00:25Unfortunately, we always hope that the next version of InDesign will actually
00:29convert these correctly.
00:31When I actually created this in InDesign and exported to EPUB, this is after I
00:37fiddled around with the CSS.
00:38Before I fiddled around with CSS, it looked like this, all right?
00:42So it wasn't too exciting.
00:43In fact you don't need to do anything really in InDesign. If while you're looking
00:48at it, you are like you know what this would look better in a little sidebar box
00:52that the text wraps around.
00:54You can do it yourself very easily in XHTML.
00:57And it doesn't just have to be a text frame that other text runs around.
01:01It could be an image that other text runs around.
01:04So let's take a look at the starting files here.
01:09In the Finder, I have in the Exercise Files we were just looking at the final one.
01:14This is an EPUB file that's been expanded to its component parts and in the
01:19beginning we are going to look at the before version and then I will show you
01:23how you can make that interesting runaround box.
01:26Inside the OEBPS folder you need to open up the XHTML file that you want to
01:31include that runaround in and the CSS file. That remember the CSS file has all
01:37the formatting instructions.
01:39So I am Shift+clicking both of these and I am going to open them in TextWrangler
01:43and you can actually edit these in any one of your favorite editing programs.
01:48I just happen to have TextWrangler open.
01:50So first actually let's look at the XHTML file and let me turn on Wrap Text and
01:57we will find this guy. It's down here.
02:01It's simply a side-box div and if you are not into CSS I just said
02:06gobbledygook, but this is basically you surround the text that you want to have
02:11in a floating sidebar with a tag called a div and it has to have a class and then
02:18you give the class a name.
02:20Now if you had actually embedded a text frame with an object style in here, as
02:24I mentioned in the previous video when we were talking about pull quotes, then
02:29InDesign will automatically add these tags for you with the same name as the object style.
02:34But you don't have to think that much ahead. You can actually do it right here.
02:37You could type in div class= and then type in anything that you like.
02:42And then you close it with a slash mark and a div at the end of where you
02:47want that box to end.
02:48There is two parts.
02:49You have to have the tags in the XHTML file and then you have to have the
02:54tags in the CSS file and in the CSS file is where you actually give it some attributes.
03:00So that's why it looks so plain right now, what we were just looking at in
03:03Safari, because it has no attributes.
03:05So we are going to go ahead and add them.
03:08I do have, as you saw, I have the final version of this in the Exercise Files.
03:12So you could always go inside there and grab that template.css, which has
03:16everything I am about to type out here.
03:17So you don't have to go crazy, madly scribbling down everything you are
03:20watching on the video as I enter it.
03:23But the main thing is that we don't want the box to take up the entire width of the window.
03:28We want it to take up a percentage of the window and because we don't know where
03:33this EPUB is going to be read, on an iPhone, on a Galaxy, on an iPad, whatever,
03:39we can't really specify it in number of pixels or even ems.
03:42We are going to give it a percentage.
03:44So we want the width of this box, width, to be 50%, 30%, whatever you'd like and
03:54then here's the magic part that makes it actually text wrap.
03:58It's the float command and if you watch the video on drop caps that's how we got
04:02the text to run around that letter, by assigning a float to it.
04:06So we are going to float this box on the left. We will do left, but you could do
04:11right if you want to.
04:13And then we are going to go ahead and add the same kind of things that we
04:15added to our pull quotes.
04:18So I am going to say we want a little line around it because I am a big fan of
04:21borders and we'll just say gray border.
04:24You could put in any normal color or you could put in a hex code here.
04:27Don't forget your semicolons at the end and border-style: solid
04:33and the width of that border, because if you forget this they come out
04:38really thick and clunky looking. border-width:
04:401px and now you need to add some air around this thing.
04:49margin, starting from the top of this box and then at 12 o'clock and then I'm moving
04:55to 3 o'clock, 6 o'clock and 9 o'clock, so top, right, bottom, left.
04:59We are going to put that we don't need space above it, so we will just put zero
05:02and if it's zero, you don't even have to write em.
05:06Just type a space and we will put on the right-hand side, remember because it's
05:10floating on the left, so on the right- hand side we want some space and let's try
05:15.75em and then we don't need any other space. That looks good.
05:22We want to add some padding.
05:24That's like the text-inset if you remember from the pull quote video. padding,
05:28I'll just do 0.5em and let's save our changes.
05:37And then we are going to preview this in the browser.
05:39So I am going to select this and right-click and say Open With > Safari and there it is.
05:48I am going to make sure we have the latest version by clicking Refresh.
05:51There is our little floating box nickel.
05:54And do you remember how to make a background color?
05:56We want to add a background color. So if I come over here back to TextWrangler
06:01and we want to add one ore attribute here. Call it background-color.
06:09Let's choose an interesting background color.
06:11My favorite way of choosing a hex color is just to jump into Photoshop,
06:16assuming it's running.
06:18And click on the Photoshop Color Picker and then from this wonderful Color
06:22Picker dialog box, let's try one of these guys down here like this and then
06:31maybe out here a bit and then here is the little hex code that we need to copy.
06:33So you select it, copy it, we can cancel out of there, jump back to
06:38TextWrangler, paste and if you are using a hex code, you have to put a little
06:42number sign or hash symbol in front.
06:44Don't forget the semicolon. I can't tell you how many times I have forgotten to
06:47do that. And then choose Save.
06:50If you forget the semicolon, it just ignores what you just typed. And come back
06:53to Safari and refresh.
06:56So that's how you can make like a little floating box with text inside it or of
07:01course if you are just floating an image, you don't need to put in any of this
07:03border kind of stuff.
07:04You just need a width and you need a float: left and some sort of margin.
07:09And it's as simple as that.
Collapse this transcript
Creating links
00:00Normally if you want somebody who's reading your EPUB on a ereader device or
00:05software to be able to use hyperlinks inside that story, to be able to tap or
00:11click or do whatever to get from on your linked text to jump to another part of
00:16the document or to another website even,
00:19that's stuff that you do in InDesign because InDesign has pretty robust
00:22hyperlinks and cross-references features.
00:25There are some cautions with that though, and I talked about them in detail in an
00:29earlier video, so make sure and watch that.
00:31In fact, as I mentioned in that video there are some instances especially with
00:36cross-references into different documents of an EPUB, like in this EPUB that I've
00:42already expanded inside the OEBPS folder.
00:46You can see it has multiple files.
00:48Sometimes InDesign doesn't do the job that it should do when it's blinking from
00:53one document to the other and you actually have to go in there and fix them.
00:57Or sometimes you just, you realize, oh I should've made this into a link. You can
01:00do it directly in this file.
01:02Now this has nothing to do with the template.css file, so we are just going to
01:06be working directly in the XHTML files.
01:08I am going to open all these up in TextWrangler. Though you know, I think
01:13probably the best place to work on linking in between documents would be a
01:18program like Dreamweaver, because this is just like a website where you are
01:22trying to link in between different web pages.
01:24But I happened to have TextWrangler open so I'll just do it right here.
01:28So let's say that when somebody is reading this EPUB that when they get to the
01:31phrase Native Americans, that we want Native Americans to be a link and we
01:37wanted to bring them to say the section on Native Americans which is covered in
01:41the arrival chapter.
01:44So what you need to do is in front of the phrase that you want to be a link,
01:48you type in this code. You type <a. That means an anchor link, and a space, then href.
01:57That means hyperlink reference. Equals, no spaces, quotes, and then the URL of
02:03where they should go.
02:04Now I happened to know that this file, 01-early-history, is at the same level in
02:09the same folder as this one.
02:10So all I need to do is enter the other file's name, 03_arrival.xhtml, and if you
02:19are using a program like Dreamweaver you often can just drag-and-drop and point
02:23to the destination document.
02:25So that's the first part of the link and notice how our friend TextWrangler is
02:30letting us know "Uh, you're not done yet because you have to close off the link."
02:33So it wants to know where does the link end and so after Native Americans we
02:37want to close the link.
02:39Why is it still brown?
02:41Oh I know why. Because I forgot to put my closing quote mark.
02:45So this is actually going to turn it into a link and we can see it for
02:48ourselves if we save this and then preview this document in a web browser.
02:57So I'll open this up in Safari and there is Native Americans.
03:04Now you can in your CSS apply a different kind of formatting to your links by
03:09making a CSS entry for the a and the a visited and so on.
03:14But most ereaders will go ahead and give it the default blue color with the
03:18underscore, though an iPad I think doesn't put any kind of text decoration, is
03:22what the underscore is, and it colors it a tasteful of violet or something like that.
03:27So it's up to you.
03:28But now when somebody clicks this then it'll automatically open the file
03:32that you told it to.
03:33So it opens up at the top.
03:35Okay, now let's say that we want to link to a specific paragraph or image in
03:42another document or maybe further down in this document.
03:45That requires a two-step process.
03:47In addition to creating the link like we just did here for Native Americans,
03:51we actually have to go to the destination document and at the point where we want
03:56this link to end up at, we have to add something called an anchor tag.
04:01Let's say for example, I'm going to scroll down here a bit, that where Yerba
04:05Buena is mentioned, that we want somebody to be able to jump to where Yerba
04:10Buena is discussed in detail in another document.
04:14So I believe that we have that in the arrival document.
04:18So I am actually all queued up there.
04:20So kind of far down here we have it right here, Yerba Buena.
04:24So we want somebody to end up at this location on this document, not just at the
04:28top of the document like the link we just made.
04:31So first go to destination and then you want to enter an anchor ID.
04:35So you go in front of the word or paragraph or even an image that you want
04:40somebody to end up at and you enter a id=" and then give it some kind of code
04:48word like an anchor word. We'll just call this yerba and then close that and
04:52then at the end where you want them to go,
04:56it could even just be a single space if you want,
04:57you have to remember to close that.
05:00So we've made our anchor id, remember it's Yerba, and I am saving changes.
05:05Now we are going to go back to early_ history and down here right by Yerba Buena
05:10we are going to link to that anchor ID.
05:12So you start out by creating a regular link to the XHTML file, <a href=" and
05:21then the XHTML file is 03_arrival. xhtml and then you add the anchor tag, that
05:31word that you just made up, after a hash symbol.
05:34So no spaces, just append it to the end of the URL. yerba, close the quote,
05:40close the tag and then close the actual link like that.
05:45Save it and let's preview our work.
05:48I am going to preview this in Safari.
05:51I'll open with Safari. Let's close or hide the other applications.
05:58I made the window really small.
06:01We are going to pretend we are actually looking at it like on a Nook or
06:03something or an ereader.
06:05So there is our Native Americans links and then if we go down here, there is the
06:08Yerba Buena and when you click it, boom!
06:11You arrive at the new chapter right with Yerba Buena, right at the top.
06:16So that's how anchor links work.
06:18Finally, if you just want to make a link to a website, that's really simple to do.
06:22So if you said, "The Spanish found that Lynda.com is fantastico!" Fantastico!
06:34We want somebody when they see lynda. com to be able to tap it or click on it
06:38and it will bring them to the actual web site, assuming their ereader will let
06:41them go to a web site.
06:43So we surround lynda.com with the URL. <a href=" and now we don't need to
06:51actually enter this document. We just want the entire website address.
06:55So lynda.com, close quotes, close that tag, and then close the anchor itself.
07:03We'll save it and preview this in Safari again, there you go.
07:11There is lynda.com and you click it and it starts searching for lynda.com on the web.
07:18That's how you create links and how you fix them.
07:22Now the problem with the cross- reference is that InDesign doesn't do is that
07:27often it will just have the ending part, this little id tag, and it will drop the
07:32actual URL for the cross-references.
07:35So that's typically the problems that I've seen, that you actually have to go
07:38through here one by one and add them yourself. What a pain.
07:41So, hopefully if you use that Teus de Jong's script that I mentioned in that
07:45chapter about making cross-reference links InDesign files, then that will
07:49save you a ton of time.
07:50But otherwise it's very simple to create any kind of links in the XHTML files.
Collapse this transcript
9. Converting EPUB Files to Other ebook Formats
Preparing your EPUB file for Kindle conversion
00:00Now that you have a validating perfectly formatted EPUB, guess what?
00:06The great news is that you are 95% of the way done in converting this to a Kindle.
00:12Now it's kind of strange that Amazon's Kindle does still does not take the EPUB format.
00:16It doesn't show it.
00:17It's got their own proprietary format known as the MOBI format which I have up
00:22here in the example files and the MOBI format is exactly equivalent to the AZW
00:28format in case you've seen that as well. They are all the same thing.
00:30It's kind of funny because actually inside each one of these files they look very similar.
00:36Let's open up our EPUB in Springy, which is our cool little utility that lets you
00:43look at the insides of files without having to actually extract them so all this
00:47looks very familiar to you: the OEBPS folder, the META-INF folder with the
00:52container.xml, and so on.
00:55Here is the same exact ebook only for the kindle and I am going to open up that in Springy.
01:03It looks just about the same.
01:04There's some different organization inside here, but that's only because I added
01:08these folders myself or I think SQL added those.
01:11But for example if we look inside the MOBI format at the content.opf file.
01:16I am going to edit that with TextWrangler and we'll turn on Soft Wrap.
01:28It's kind of the same.
01:30It is an XML file. It uses a different namespace it's called up here, but it's
01:35got the same media type and it's got the same kind of items and you can see
01:39there is a manifest and there is some metadata and there's a spine at the
01:42bottom, there is a guide at the bottom. It's 99% the same.
01:46So if you go to Amazon's web site to their Kindle Direct Publishing portal, that
01:53is the name for the program, KDP for publishers who want to publish to Kindle,
01:59you'll see that a lot of their documentation says, "Okay well what we want from
02:02you, writer or a publisher, is we want an HTML file."
02:06Convert your book to HTML using these guidelines and upload it and we will
02:11convert it to MOBI for you. Or if you insist, it can be a Word document or even a PDF. It's crazy.
02:18It wasn't until very recently, maybe in the last couple of months that they
02:22quietly started accepting EPUBs for conversion to MOBI.
02:26As I said, if your EPUB is fully validating, that's basically what a MOBI format
02:33is and they do a very good job of converting it.
02:36However, I would not suggest that you upload your EPUB directly to KDP.
02:41Even though they will take it and they will convert it for you. Because it's
02:44always better to preview it on your computer, because you want to see what it's
02:48going to look like once it's on the Kindle, and that's what this chapter is about,
02:52is how do you convert your EPUB to a Kindle and what kind of things do you need
02:56to be aware of before you even convert, because what you don't want to happen is
03:00to upload the EPUB and then have Amazon kick it back and say "This is
03:04unacceptable because there are problems."
03:06Now once you join KDP and it's very simple as you can see. You can just sign
03:10in with your own Amazon account if you have one or go ahead and create one if you don't.
03:14It's free and they welcome independent publishers or publishing companies with open arms.
03:19Then you can download a whole bunch of guidelines and PDFs.
03:22They have a very good forum that you can get into.
03:25You don't even have to log in, like you see I am guest, with lots of very busy
03:29forums, all about like how to prep your file and how you get paid and so on.
03:34If you look at those guidelines, you'll see that there are some formatting
03:37issues having to do with the EPUB, MOBI file, and the CSS itself that you
03:43should be aware of.
03:44And I kind of pulled out some of the high points.
03:46It's definitely not comprehensive, but things that you should be aware of when
03:50you are formatting your EPUB for the Kindle is first of all every EPUB has to
03:56have a standalone cover image and it has to be exactly 600 pixels wide by 800
04:02pixels tall and it has to be a JPEG.
04:04So you need to get that cover image into its own JPEG file and this is
04:10actually something that you also need to do for iBooks, is that they're going
04:13to want to know what is the cover image, but when we talk about actually
04:17submitting your ebook to the iBookstore, they just want to know where is the
04:21cover image and then they will go ahead and write the code for you, if you
04:24don't want to do it yourself.
04:25But it also has to be referenced in the content.opf file.
04:30So they give you in this guideline instructions about here are the three lines
04:33of code that we want you to enter in the metadata and then the spine, and I'm
04:37going to show you a faster way to actually do this in a little bit.
04:41A navigational table of contents that you are all familiar with right now,
04:45toc.ncx, is required and that's not a biggie.
04:48Your EPUB I am sure has one already, but also they require a content TOC like
04:54a first page or some page in the beginning of the document that has links to the chapters.
05:01Because in the Kindle interface there is a button or a choice that the users
05:05press to see that, so they want that. Ot has to be part of it.
05:08If you don't have one, they are going to kick it back.
05:10As far as formatting is concerned, you may have noticed this if you have a
05:13Kindle, but by default all paragraphs get a first line indent of a quarter inch.
05:18If you don't set anything for the text indent, then that's what's going to happen.
05:22So you have to remember in your CSS to set a text indent of zero, for example, if
05:26you don't want them indented or some other measure, and of course if you don't
05:29want it zero then you are going to have to add some margin space because
05:33otherwise you are going to have this one big block of text.
05:36They don't put space in between paragraphs by default.
05:39Also everything is fully justified, left and right.
05:41Now Kindle 1 users, were able to turn that off. Kindle 2 users are not able to
05:46turn that off and who knows what's happening with Kindle 3.
05:49I have heard it says in the documentation that you can use CSS to overwrite.
05:53So you can say the text should be left aligned for paragraphs in your CSS, but
05:58I've also heard that sometimes it doesn't work. So be aware that.
06:01That is an ongoing issue with formatting your EPUBs for a Kindle.
06:05Also float, they don't support float in CSS.
06:09So in other words anything that would use float like say a drop cap and also
06:12runaround text wrap sort of things doesn't work.
06:15So let me show you how to add that cover image.
06:18I am going to come over here to Finder where I have a file called fix cover.
06:23Now here is my cover.
06:25This image is exactly 600x800 pixels and here is my coverless EPUB.
06:30I am going to open this with our friend Sigil.
06:36One of Sigil's greatest features is that it saves you from having to actually
06:40get in there and write code in those content.opf and the toc.ncx files.
06:46You just have the user interface.
06:47For example if you want to add the cover image, you click in front of the
06:51heading of your first file, you go to Insert > Image, choose your image,
07:03right there, and that puts it right on top of the text.
07:07Don't worry about it.
07:09At this point what you want to do is in the Images folder over here, you see how
07:13it added it to the Images folder.
07:15Select it, right-click, and choose Add Semantics, this is the Cover Image.
07:20That actually wrote all the code that we need in our content.opf file.
07:25Finally, with your cursor still blinking, after this image go back up to the
07:30Insert menu and choose Chapter Break and it creates a new XHTML file and
07:36again adds all the information for the manifest and the spine to the content.opf file.
07:41That's the end of story. Then you can just close it. Isn't it great?
07:46So let's see what that looks like.
07:47I am going to open up my finished one here.
07:53There is the cover image and there are all the links for the navigational table of contents.
07:59So that's very simple. Just a few things that you need to do to add to your
08:03EPUB before we go ahead and convert to Kindle, which I'll be talking about in
08:07the next few videos.
Collapse this transcript
Converting with KindleGen and Kindle Previewer
00:00Once you've prepped your EPUB file for optimal conversion to Kindle, as I said in
00:06the previous video you really shouldn't upload it directly to the Kindle Direct
00:10Publishing Portal, even though they'll take it and they'll convert it for you.
00:14It's really better to convert it on your Desktop.
00:16Now there is a wonderful program called Caliber that is famous for being able to
00:20convert formats of ebooks from one format to the other and that can take an HTML
00:25file or an EPUB file and convert it to MOBI, sometimes even back again.
00:29While that's a great program and I have used it, Amazon themselves is really
00:33pushing for users to use their own conversion software.
00:37In fact, they say that in their publisher's guidelines that only the Kindle
00:41converters are officially approved.
00:44So, I figured I might as well show you how those work and they do work very well.
00:47If you go to the Kindle Publishing Programs page at this URL up here, it's kind
00:52of hard to find because you know, this Kindle Publishing Programs there is all
00:56different iterations around their site.
00:58So take note of that URL because if you scroll down, this is the hiding place
01:05for all their software.
01:07So what you want to do is you want to download first of all KindleGen.
01:11This is the actual guts of the conversion program.
01:14It's command line software, meaning it runs in the CLI interface of Windows or in
01:19Terminal of Macintosh.
01:21But don't worry, you are not actually going to have to run it in the command line.
01:24But you should download this and you have to agree to the terms of use
01:28and then download for Windows, Linux, or Mac OS 10.5 and above, and it has to be an Intel Mac.
01:36Read the installation instructions because it will tell you to make sure to run
01:39your software update.
01:42In addition, we have the Kindle plug- in for InDesign. While we are here.
01:47This is a beta plug-in that actually works quite well.
01:49I am going to show how to use that in the next video.
01:52It works with either CS4 or CS5 of InDesign, so go ahead and download that.
01:57Then down here you want to download the Kindle Previewer 1.5. This is fantastic.
02:02This is something that Apple should have for iBooks.
02:06This is an actual previewer for the Kindle. It converts your images to grayscale
02:11just like current Kindles are right now and you can see it right on your
02:14Desktop. We are going to take a look at that as well.
02:16Kindle Previewer works in concert with KindleGen, that command line stuff.
02:20So, download all this, install it, and then come back here.
02:24Now in my Finder here or in Explorer if you have downloaded the Exercise Files,
02:30I have a few versions of the same EPUB file.
02:33So we are going to see like you have your final EPUB, right here we are going to
02:37call it stage1, and we're going to run it through the conversion software.
02:42The way to do that is to start up the Kindle Previewer app.
02:46So I am going to go to Applications, go down to Kindle Previewer,
02:51and double-click it.
02:52So this is actually, if you have a MOBI file you could open it right up here and
02:57it's going to show you it as you're looking at it on a Kindle.
02:59But we're going to choose Open Book and point to our EPUB file, stage1, and open it up.
03:11What happened?
03:12It failed to compile the book.
03:14I'm actually going to show you how the different kind of messages you are going to get here.
03:18This is always a sad thing to see, but you have to click this downward pointing
03:22arrow here under Compilation Details to see if you can figure out what happened.
03:27Look over here on the left and scroll down. You don't have understand everything
03:31but it's kind of understandable, but at the very bottom you'll see Error,
03:35The book title was not set.
03:37Please call the set_book_title() function.
03:40Well actually all you need to do is open up your EPUB in Sigil or open it up in
03:46XML Author and go ahead and add the book title to the metadata in the
03:52content.opf file, something that we've talked about in a number of videos.
03:56Do that and then try again.
03:57So I've already done that and here in the Exercise Files we have added the title
04:05to stage2, so we are going to open up stage2.
04:08From Kindle Previewer, Open Book and come back here, stage2, open it up.
04:16It has successfully compiled the book.
04:19That's always good news but there are warnings. That's not good.
04:22You know it's interesting that it will compile the book but it will give you
04:26warnings that could make Amazon reject the book after you submit it.
04:29So never upload a book that has warnings.
04:32Let's see what the warnings are.
04:35Scroll down. You can see that it's adding the metadata where it wants.
04:39It's parsing files. Cover.
04:41I forgot to specify the cover image!
04:44Remember, I showed you how to do that in the previous video under prepping your
04:47EPUB file for Kindle conversion.
04:50I have already done that to the stage3 file, this guy over here.
04:55So we are going to go ahead and open it up and go back to KindleGen,
05:01stage3, click Open.
05:04It has successfully compiled the book, nothing about warnings.
05:07If you want to check for yourself, everything looks pretty cool.
05:11Just click OK and the output file has been generated here.
05:15It's actually pointing to this folder.
05:17Let's actually take a look at it over here and it opened the book, but I want to
05:21show you what it did, is it just made a little folder and it gives you the date
05:25of when I created it.
05:26So it's really nice that it gives us those names for those versions as you're testing.
05:30Now let's take a look over here.
05:32So notice that it actually changes the view to grayscale and if you page through
05:37the document you can see what your book looks like on a Kindle.
05:43Now there are still a couple of things missing in this one.
05:45I actually made a final one down here.
05:48Let's open Kindle Previewer.
05:49We want to open up the one in the final folder.
05:53So come back over here in final. In addition to showing the cover, like if you
06:05click up here you can see that cover, then we also have little icons that stand
06:10for the linked table of contents.
06:12Remember I said that was required for them, that you need to have a TOC page
06:16that you've done yourself with links, and then also here is a navigational table of contents.
06:21So if you have a Kindle, there's a button that you press to see the TOC and here
06:25is navigational table of contents, and you can click and jump over there.
06:31Then under Devices you can say well, let me see what this would look like if I
06:34was looking at Kindle on the iPhone.
06:36Aha! So you can see what your formatting is going to look like and how it's going
06:43to change the cover.
06:45So it's really cool.
06:46You need to download KindleGen and Kindle Previewer and that's one of the best
06:51ways to convert your files from EPUB to the MOBI format.
Collapse this transcript
Using the Kindle plug-ins for InDesign
00:00It's pretty cool that you can use KindleGen and the Kindle Previewer to convert
00:05your EPUBs to MOBI file format for the Kindle.
00:08I think it's even cooler to be able to export directly out of InDesign to the MOBI format.
00:13And that's what the beta plugins are for.
00:16So if you haven't installed them or you didn't even know they existed, high thee
00:20over to this URL and then scroll down.
00:23I mentioned this in the previous video, but scroll down here to the Download
00:28Kindle Plugin for Adobe InDesign.
00:30So it's a beta, but it works very well.
00:33I've been testing it for a while.
00:34You need to agree to the terms of use.
00:37Don't forget to click on the PDF to get the documentation.
00:40There's not that much information there, but it does tell you that you have to
00:44run it on an Intel Mac.
00:46The Intel Mac has to be a 10.5 or 10.6.
00:50For Windows, no problem if you're still at XP. It works on Vista and 7 as well.
00:54Download them and then it's got an installer, so you go ahead and install it,
00:58follow the installation instructions, and so on.
01:00It doesn't take that long and it's free.
01:02That's the best thing.
01:04I already have it installed in InDesign.
01:06And you can see it, if you go to the File menu and go down to Export for Kindle.
01:14And also I have a book file.
01:16So if you open that up, here's the History book in the Exercise folder.
01:20If I double-click on the INDB file and you want to export a book to
01:25Kindle format, go to the History Text panel menu and look, there is Export Book for Kindle.
01:32But actually what I want to show you is this just single document.
01:35So we've worked with this many times in this video, so it's just a single
01:38document with some headings. All right, nothing big.
01:41We're going to export this for Kindle.
01:43So I am going to go to the File menu > Export for Kindle.
01:46Where do you want to save it?
01:49Save it as a MOBI file. I'll just keep it right on the Desktop.
01:52We'll call it CAHistoryText, just one text file.
01:58Now look at this. You want to Include the InDesign TOC entries and so it's
02:02wondering which TOC style you want.
02:04And I do want it to create a TOC out of these entries.
02:09Then it wants to know where is the cover image?
02:11This something that InDesign really needs, and it's remembering the last place
02:17that I went, but let's just go ahead and grab the cover image here.
02:21Remember it's going to be 600x800,
02:23a JPEG, and it should be color.
02:26And then what is the book title. In case you didn't add that to the file info
02:30for the document, you can add it right here.
02:32And do you want to View eBook after Exporting?
02:35It's going to open up in your default program for reading the MOBI file format.
02:39So if you have the Kindle ereader installed, it'll probably open up in that.
02:44We'll click Export. And there it is.
02:48Where you opened it up in Kindle for the Mac.
02:50What I wanted to show you was that it made this table of contents document for us
02:55and it's just incredible that it did that.
02:57There's our cover and it's in color, because we're using on an app, not on the Kindle.
03:02And it made this document.
03:03We didn't have to make links our self.
03:05It's really neat that they did that out of just a one-page document.
03:09And then we can go ahead and read through, and scroll through, and so on.
03:13And if you want to see what this looks like in the Kindle, let's close out
03:18of here and we'll go to Kindle Previewer and open up that book that we just created.
03:26This one right here.
03:29So here's the cover as seen on a Kindle.
03:32And here is the linked table of contents that it created for us.
03:38And here is the navigational table of contents that would come up.
03:41And then if you want to see what this would look like on a different sized
03:44device, like the big Kindle DX.
03:46Or the little baby Kindle for iPhone.
03:53You can see it right here with the Kindle Previewer.
03:56So I think it's just great that they have plugins for Adobe InDesign, for CS4 and for CS5.
04:02And I think in a lot of workflows it makes a lot of sense to export directly
04:06to the Kindle format.
Collapse this transcript
Converting for other resellers
00:00Just like Amazon has its own set of publishing guidelines for the Kindle,
00:05other ebook resellers often have their own publishing guidelines for the EPUB.
00:10They all start from the same point, that it has to be a valid EPUB.
00:13You have to go through EPUB Checker, as I talked about it in the previous video,
00:16and it has to pass that test.
00:18But sometimes what's valid for the EPUB Checker is not valid for the reseller.
00:23So for example if you want to resell on the iBookstore, you want to be
00:27an iTunes publisher.
00:28Apple publishes a very voluminous 60 or 80 page PDF with what's allowed and
00:34what's not allowed inside EPUB beyond validation.
00:38For example, you have some ability to include different font faces.
00:41You can include some video and audio and they have special specifications for
00:46the cover, that kind of thing.
00:48Now unfortunately you can not see those publishing guidelines until you
00:52actually join the program.
00:54It is free for you to join the program and then you can get and work with them,
00:57but because you have to join the program before you can see them, I can't really
01:00show them to you here on the screen.
01:01We will be talking a little bit more about getting involved with the iBookstore
01:06as your own publisher in the next chapter.
01:09If you want to see publishing guidelines for other ereaders or sellers like the
01:14Sony reader bookstore or the Kobo bookstore,
01:17unfortunately they really want to work with large publishers only. If you have
01:22say less than 25 titles then they want you to use an aggregator and those
01:27aggregators very seldom take EPUB files.
01:30The only other big major vendor that is completely open to working with
01:34individual publishers is a Barnes & Noble and the Nook, which is really cool little
01:40ereader that comes in many different sizes and form factors. And there are
01:45just a few different kinds of things that you want to do to you EPUB before you
01:49upload it to the Barnes & Noble Nook store.
01:52First of all of course you should download and install the Nook reader for your platform.
01:59So for example you can install it on an iPad. You can install it on your phone.
02:04I like this Nook for PC and other devices, so Mac users we are other devices.
02:11You click here, then you can download it for the Mac and for the Blackberry.
02:15Now it's not the same as the Kindle Preview. You are not going to see what it
02:19would look like exactly on the Nook.
02:21It's just more of a way to access the books that you purchase from the Barnes &
02:26Noble Nook ebook store on these devices, because most of the books they sell
02:31have DRM, digital rights management.
02:34So you can't just send them around willy-nilly and share them.
02:37But it is important that if you want to EPUBs there, that you have some method
02:42of seeing what it's going to look like and a reader that at least shares some of
02:45the same code as the actual ereader device.
02:48If you follow the links to their PubIt bookstore,
02:52PubIt is their special program for smaller publishers and authors to upload
02:58EPUBs and they are very open, the Barnes & Noble people. If you come down here you
03:04don't even have to register. You can learn more about the service, especially,
03:10check this out, the Formatting Guide.
03:14You could click on the EPUB Formatting Guide and download a very nice little PDF
03:18that gives you some information about if you want to format your EPUB for the
03:22Nook readers. Here's what we suggest.
03:24Basically if you have a valid EPUB already they're good to go.
03:28They don't have any special requirements for the cover but if you have a cover
03:33that's been called out separately like we just did for the Kindle or like you
03:36might want to do for the iBookstore,
03:37it will be fine with them.
03:39They did have a little bit of information thought that I thought was interesting.
03:43Let me show you how we can edit an existing EPUB to better work with the Nook.
03:48Apparently unlike other ereaders, it doesn't add some margin around the page
03:55edges, so your tax will run right up to the edge of the screen and then they want you
04:00to add a little bit of margin around every page, and they actually give you the
04:04CSS code to add to your CSS file.
04:06So I'm going to ahead and open up this EPUB. Let's just open it up in Sigil where
04:12we can get to the styles right here. Let me make this type size larger. The code is this.
04:24You hit Return and use the @ symbol and type page and this is actually a
04:30page selector and then we use our usual bracket, and you want to add some margin settings.
04:36And this will add it around the outside edge of every "page" that the ereader
04:42shows the person reading the book.
04:44And they suggest margin-top 30 pixels, not ems, margin-left, 30 pixels, margin-
04:55right 30 pixels and then on the bottom, a little bit less, margin-bottom 20 pixels
05:06and movies and then we will just end it there.
05:08As far as I can tell, I have tested the same kind of CSS on an iPad and
05:13converting it to a Kindle doesn't cause any problems. It's completely
05:16compliant with the EPUB specs.
05:18So this should be good to go and this will prevent the text in your EPUBs from
05:23running up to the edge of a Nook.
05:25We will just save it and close it.
05:27And then this is what you would submit to the PubIt account that you have at the
05:32Nook bookstore, and if you want to see what it looks like, here I have downloaded
05:35the ereader. We will go ahead and open it. A Brief History of San Francisco.
05:43So you need to give this for the major retailers that you are going to be
05:49distributing your EPUB through. Go to the web site and nose around and see
05:53if they have a set of publisher guidelines for you.
05:55That way you won't run into any unpleasant surprises when your EPUB looks a
06:00little bit off on the different ereader devices.
Collapse this transcript
10. Distributing Your ebook
Getting an ISBN for each edition
00:00Every book that's for sale needs to have an ISBN, and an ISBN is 13 digit
00:07number, nowadays, that's a unique identifier for books and even book-like
00:12products like audio books and it establishes and identifies one title or one
00:18edition from one specific publisher.
00:20So if you enhance, for example, a print version of the book and a digital version
00:26of the book you need two different ISBNs. One for each one.
00:30Now I know that those of you listening who are in the book publishing business,
00:34maybe you are just the InDesign people working for a publisher, you really don't
00:38need to worry about this, but I know that there are a number of people watching
00:41this title who are independent authors or small publishers and maybe have never
00:46actually published a book on their own before and it is important that you
00:51purchase your own ISBN and assign them to your e-books. Even if it doesn't have a
00:56print edition, you need one for your e- book, even if you are just going to be
00:59publishing as a PDF. There is this whole international ISBN organization.
01:05The one for the US is Bowker over here at this URL, www.myidentifiers.com.
01:12So if your company or yourself is based in the US or one of its territories, this
01:17is where you purchase an ISBN from and this is actually very good site.
01:20It has got some really good guidelines over here in the right that you can download.
01:24And then to actually get the ISBN you go over here and choose Buy an ISBN.
01:29If you just buy one at a time, it's not cheap.
01:31Especially if you are going to be selling your e-book for something like you
01:34know $2.99 or even $9.99, you need to sell quite a bit to get this. I would recommend
01:40that you buy at least a block of 10 if you can possibly afford it, because then
01:44they go way down in price, and if you create one for the Kindle and one for an
01:48EPUB and one for PDF, that's three different ISBNs right there.
01:52So you are probably going to be using them a lot.
01:55It's not required that you buy an ISBN. I think the only reseller that I will be
02:00talking about this chapter they require you to have your own ISBN is the Apple
02:05iBookstore and even then only if you decide to publish directly through them as
02:10an iTunes Connect publisher.
02:12You can also get books into the iBook store by working with an aggregator, which
02:16we will be talking about in this chapter as well.
02:19But if you publish your book say through Amazon Kindle bookstore, it's optional.
02:24They can assign your own ISBN number. Same thing with the Barnes & Noble Nook.
02:28It's optional. They can assign their own ISBN number.
02:32Even if you decide to publish your ebook with the iBookstore using an
02:36aggregator, a lot of the aggregators as third-party companies include the cost of
02:41an ISBN number, because they are buying them I guess in blocks of a thousand.
02:44So it's not the same thing as copy right. Even if somebody assigns their own
02:49ISBN number through your book, you still won the copyright to the book or
02:53however you are working at the rights.
02:54So they are not really related that way.
02:56It's simply a unique identifier for the book.
02:59Now if you're not from the US you need to go to ISBN-international.org/agency
03:07and locate where it is the you purchase your ISBN numbers from.
03:11So you just choose a country from this drop-down list.
03:15Let's say I'm from Belgium and I speak French, then it shows me where should go
03:20and the email address and web site.
03:23Ah, well I understand that perfectly.
03:27But that's what you do to is you go through the different individual countries.
03:30While I was nosing around this international ISBN website I came upon this
03:35wonderful FAQ about guidelines for the assignments of ISBNs to ebooks.
03:40This is really good a really good reading.
03:41For example if saying that if you have published an e-book that has DRM, digital
03:46rights management, and an exact same e- book and exacting format that doesn't have
03:50DRM, you need to have two different ISBN numbers, one for each one.
03:54Because an ISBN conveys not just the exact edition and publisher and title of a
04:01book but also the rights that go along with the book.
04:05I think that over here on the homepage for Bowker one of these links is a PDF of
04:12the same thing. Guideline for the assignment of ISBN to ebooks.
04:18So I'm hoping that ISBNs are our not so much of a mystery anymore and I think
04:22you should go get yourself one. Or a dozen or a few dozen.
Collapse this transcript
Getting your ebook into the Kindle Store, iBookstore, or NOOKbook Store
00:00The three major ebook resellers that currently welcome independent authors and
00:06small-to-midsize publishers to work directly with them are the Amazon Kindle store,
00:10the Apple ibookstore and the Barnes & Noble Nook store.
00:16Now there are other ebook resellers like the Sony Reader store which is
00:21very large, to Kobo bookstore, but they are more geared to working with
00:26larger established publishers who already have hard covers or physical
00:30books listed with them.
00:32If you are an independent publisher or you have fewer than five or ten ebooks
00:36that you want to publish and you go to their website looking for guidelines they
00:40have a page up that tells you which aggregators to work with, they want you to
00:45be managed by a third-party;
00:46they don't want to deal with you directly.
00:48And I'll be talking about working with an aggregator later on in this chapter.
00:51Let's take a look at what's required out of becoming a direct reseller for each
00:57one of these vendors. For example;
00:59for the Amazon Kindle store you just need to go to this URL kdp.amazon.com and
01:07it's very simple to get started with, you just sign-in with your Amazon
01:10account if you have one already, and if you don't, you can set one up on the
01:14fly, and then once you get in then you are able to just upload your books
01:19through a very friendly portal.
01:21Now we are not able to show what a lot of these sites look like internally
01:25because they're private, but I can give you some general information.
01:29First of all in order to set up the account you're going to have to fill in a
01:34tax ID, that means your Social Security number or if you're a Corporation you
01:38want to register as a company that means your Employer Identification Number.
01:43If you don't have either one of those or say that you live outside of the US,
01:46you can still sell your books through the Kindle bookstore, but you are going to
01:49need something called an Individual Taxpayer Identification Number.
01:53And this is something that most of the other resellers will also require, and
01:57it's actually very simple to get, they have instructions, I just wanted to show
02:02you I jumped over here really quickly, if you go to the irs.gov and just look
02:06for Form W7, that is the form that you fill out, it's actually pretty simple, I
02:11actually downloaded it here.
02:13Kind of like the USW9 form, and what they're going to do is they are just going
02:18to give you a nine-digit code that you can then enter during your applications
02:22for the Kindle bookstore or the Apple iTunes ibookstore, and all they really
02:27want to know is you know where do you live, why do you need this, and are you
02:31who you say you are?
02:31They are going to want a photocopy of your passport or something like that.
02:35There's full instructions here, but I've talked with a number of people who
02:38have filled this out because at first it was very off-putting and they said
02:41it's actually not that big of a deal and we are able to get their ITIN number in a few days.
02:46So let's go back to Kindle Direct Publishing.
02:49Even if you have not yet become a member of KDP you can go ahead and find out
02:54more information about how it works and you can get to the Community forums,
02:58it's actually pretty robust.
02:59When you do have your EPUB ready they will take it in either EPUB or MOBI format
03:05or actually just about any other kind of format HTML, DOC, but of course what's
03:09great is that they will take your EPUB format.
03:11You're going to ask for some metadata like the title, the description, you have
03:16up to 4000 characters to enter description.
03:19The author, the contributors, when it was published, and ISBN is optional, if
03:24you don't have an ISBN, they will assign one for you, to use, just for the
03:28Kindle edition, and they want to know if it's public domain or if you have
03:32publication rights, and it's just like a little checkbox, so you can actually
03:35put together something that's public domain on the Kindle bookstore.
03:39Then the royalty rates are pretty well known, it's 70% to you as the publisher
03:44and they keep 30%, they actually do charge a little bit for downloads, so that
03:49if you have a huge book, it might be a few cents, it's going to be deducted.
03:53And by the way that 70% split 70- 30 is only for ebook that you price
03:59between $2.99 and $9.99.
04:03If it's less than that or more than that, then the royalty rate goes to 35%.
04:08So all this as detailed in the Terms and Conditions and Pricing Guidelines, I am
04:12just sort of giving you currently as I am recording this what the deal is.
04:16Let's just review that really quickly.
04:19So with the Amazon Kindle store, this is where you go to apply, they need your
04:23tax ID, they're going to pay you the royalties by the way by an electronics fund
04:27transfer or by check.
04:30So this is actually important because I have talked with some other publishers
04:32who they really prefer working with Kindle because they are the only ones who
04:36don't require a US bank account, they will be happy to send you check, of course
04:39they seem to find and print, it will cost $8 per check.
04:42And then if you want to read the Publishing Guidelines PDF I have seen it linked
04:46to publicly, so here is the URL if you want to grab it, and it's just basically
04:50like how to set up your EPUB or your HTML files in order to make the best
04:54looking Kindle edition possible.
04:57Let's talk about the Apple iBookstore.
04:59If you want to work directly with Apple you might want to come here first,
05:03this is the FAQ for book publishers, and I think I showed this page in another
05:07video and the very first question is how do I apply, and there is a link
05:11directly to the application.
05:12The application is done completely online;
05:14it's not onerous at all.
05:16And then it also has a link to aggregators.
05:19So if you'd rather not go through the hoops and it is kind of technical actually
05:25of uploading your ebooks to the Apple iBookstore, a little bit more difficult
05:30than the Kindle or the Nook, then you might want to work through an aggregator.
05:34So if you click here you will see a list of Apple-approved aggregators, these
05:38are third-party companies who have been approved by Apple to take your EPUBs and
05:43then get them onto the iBookstore and you can click through to here.
05:46We are going to really talk about aggregators in more detail later.
05:49But let's say that you actually do want to apply, so you click that Apply
05:53button, you brought here to this page where it says, what kind of thing do you want to sell?
05:59And you choose Books, and click Continue, and then it tells you the technical
06:05requirements and this -- I know it's surprising to a lot of people, but
06:08technically you have to have a Macintosh to publish on the iBookstore, because
06:13in order to upload your EPUBs and filling all the metadata, it's an Apple
06:17Macintosh application, it's not something you do online, which is how the Kindle
06:22handles it and how Barnes & Noble and lot of the aggregators handle it.
06:25It's an actual standalone application that requires an Intel Mac an operating
06:29system 10.5 or later.
06:31I have talked with some publishers who are completely PC-based and they are
06:34like, we have to buy a Macintosh just to work with the iBookstore.
06:38The iBookstore does require that you have an ISBN for every EPUB that you upload
06:43to them and of course they want you to deliver it in EPUB format they will
06:47accept no other format and it has to pass EPUB check, this is the EPUB
06:52validation that I talked about in a couple of videos.
06:55So you fill the application and give them your tax ID number and all that stuff
07:00and once you're accepted which should take just a few days you're given a URL
07:04where you can login and access what's called the iTunes Connect portal.
07:09It has links to report, and you can download iBookstore EPUB templates, it has a
07:13Publisher User Guide PDF with sample EPUBs, it has lots of interesting EPUB and
07:19CSS coding information to like include fixed layouts in your EPUBs for the iBook
07:25application, I will just announced this past week and/or multimedia you can
07:29actually include video and sound in your EPUBs.
07:33But that will only work with the Apple iBookstore with EPUBs for the
07:36iBookstore edition.
07:37So you get a lot of great information once you get accepted and then
07:40unfortunately I can't share any of these URLs with you because they are all private.
07:44But they do have a similar very generous kind of revenue-sharing model as the Kindle.
07:51It's 70% royalties for books, there is no 70% just in this one range and then
07:56less in other ranges, it's just like how it is if you're selling apps for the
08:00iPhone or something, it's 70%.
08:03You can even set a price to zero, if you want people to be able to download a
08:06free EPUB that you publish.
08:09The royalties that they payout to you are paid by Electronic Fund Transfer only.
08:13So it is required that you have a US bank account.
08:16And again so if you are an international publisher then you might want to
08:20just use an aggregator.
08:21The other reseller is the Barnes & Noble Nook store and it's really friendly and
08:27accommodating for independent authors and publishers, they of course have other
08:31programs for the big publishers but for the vast number of people who are
08:36getting all into digital publishing of their own books or they are small
08:39publishers who are converting their books to EPUB, this is very nice little
08:44portal called PUBIT.
08:46And all you need to do is login down here to create an account and you have to
08:51have a Barnes & Noble account, again it's just like an Amazon account, if you
08:54don't have one you can create one on the fly, and the only thing different about
08:57applying for the Barnes & Noble reseller account is that they want your credit
09:01card number, because they said if people return ebooks then they might have to
09:06actually charge you, but basically it's the same as what it was for us.
09:10It's like a combination of the iTunes and the Amazon requirements in that, an
09:15ISBN is optional, you don't have to purchase an ISBN, they can assign one for
09:19you, but you do need to have a tax ID number and you do need to have a US bank
09:24account because everything is just paid by Electronic Funds Transfer.
09:27So I have summarized this on this slide.
09:31This is where you go to apply, you can only upload an EPUB format again, and
09:36they have very nice guidelines for how to prep the EPUB for them which I talked
09:40about in the previous video.
09:41And then their royalty breakdown you get 65% royalties for books that are
09:46priced from 299 to 999, and otherwise it's 35% for things that are more
09:51expensive and less expensive.
09:53All these places have pricing guidelines that you really need to look at because
09:56they want to make sure that the price that you set for your digital books are
10:00not higher than your setting for print books.
10:03Some of them say, they have to be at least 20% less and they have all sorts of
10:07these breakdowns, but it's all spelled out pretty well.
10:09Whether you work with the Kindle store, the Apple iBookstore or the Barnes &
10:14Noble Nook store, it's pretty neat being in-charge of your own destiny that way
10:18being your own publisher.
Collapse this transcript
Using third-party aggregators
00:00Setting up individual publisher accounts with Apple and Amazon and Sony and
00:07Barnes & Noble and whoever, that's not the only way to go.
00:10A very good option that you might consider is working with a third party and
00:13whatvare known as aggregators and aggregators are, just like the name implies, they
00:19aggregate all of the mom and pop sort of publishers and they systemize them and
00:25manage them as a service to the large resellers. And they take a little cut or
00:31they charge a little fee and they make both people happy.
00:34They make the independent publishers because they take care of all the hard
00:37behind the scenes stuff, they make it nice and easy for people aren't really
00:40into this, and they make it very easy for the large publishers because the large
00:46publishers can rely on them for sending in quality product and taking care of
00:49things, doing all the tech support and that kind of stuff.
00:52So it's an option. In fact on Apple's website if you apply for an iTunes account
00:58and they reject, you they will send you to this URL or even during the
01:02application process they are like "Yyou know you might want to consider just
01:06using an aggregator."
01:07So this list here is what they'll point you to and it shows the different
01:11services that are approved aggregators for the iBookstore to apply.
01:16They can all create an EPUB, which kind of defeats the purpose of ours right, for this title.
01:21So we don't care about this column. They help manage all the metadata, they can
01:25help you create multimedia EPUBs, and so on.
01:29You know, the thing is though that this list of aggregators keeps changing.
01:32Six months ago there were whole bunch of other names on here and they're gone and it is a mystery
01:38in the industry as to why like for example one of the biggest ones, there was
01:42Lulu Books and there is still a way to use Lulu to get your books on the iPad.
01:46I am going to show you that in a minute.
01:48So you are not really limited to only these Apple approved aggregators as far as
01:52I know and unfortunately they are not that friendly to independent publishers
01:58who want to supply their own EPUBs.
01:59They are more for like an independent author, like Smashwords.
02:03Smashwords is a very cool company.
02:05They've been around for a while.
02:07You come to this beautiful webpage, how to publish e-books in the Apple iPad,
02:13iBook store and if you scroll down you'll find this sentence over here that
02:18stopped me in my tracks, "Your book must be uploaded to Smashwords as a
02:22Microsoft Word doc file."
02:24No, you can not upload a PDF or EPUB or MOBI as your source file. What they do
02:31is they give you this fantastic Microsoft Word template and as long as you only
02:35apply the styles in the template and use the fonts and all of the other
02:39instructions, then they take that Microsoft Word file and they run it through the meat grinder.
02:46So that is one of the aggregators, which is really not what we're interested in.
02:51If you go to one of the older aggregators, which as far as I know they're still
02:54working, like Lulu.com they were very well known for doing print on-demand books.
03:00So you could sent them a PDF or even a Microsoft Word document and choose
03:03different designs for the cover in the interior and then send people to a
03:07Lulu.com link. Somebody buys your book, lulu.com will charge $20 for the book and
03:13then give you eight, and they only print as much as people order.
03:16So they have gotten into the digital publishing realm as well. In fact they can
03:20be a big help in giving your help in giving your books on to the iBookstore.
03:23So this is what they offer. They include ISBN; you don't have to get an ISBN number.
03:27They do sales reporting, they do the document conversion to EPUB if you want, though
03:32they will accept an EPUB.
03:34But down here you will find out like as a publisher if you have your own ISBN,
03:38you want to a little bit more control, you have to have at least 25 titles good
03:41to go. Otherwise you got to come over here and use For Authors.
03:44But whether you are an author or publisher because it's the same. lulu.com takes
03:5020% of the money that Apple gives you as royalties.
03:55So they handle all of the stuff about getting your book into the iBookstore and
04:00they handle all the math and reporting stuff with the iBookstore with Apple,
04:04then your account is with lulu.com and you find out how much money the royalties
04:09were coming in from the iBookstore. lulu.com icon takes 20% automatically and
04:14then sends you a check or does an electronic file transfer and so on.
04:17But it's kind of neat because your content is there and should you decide to
04:21actually publish a print book, they're good to go to help you out with that.
04:24So it's actually a pretty cool company. I just wanted to point out that there
04:27are many e-book aggregators and I think it's worth it to you investigate this
04:32for a little while and check out what they offer.
04:35Like this company Bibliocore.
04:37These people are so nice. They are right upfront.
04:40I like the plain English language on their webpage about how does it work,
04:44how much does it cost.
04:46If you want to send them an e-book to get on the iBookstore, it would have to
04:49be on EPUB, have no unmanifested files, and that means-- I am sure you all know
04:54what the manifest is.
04:55It's part of the content.OPF page. It lists all files that are in the EPUB.
05:01So don't want to have any extra images, for example, that are not listed in the manifest.
05:05It has to have an ISBN number and it has to be valid.
05:09It has to pass EPUB checks and so on.
05:11Now these people they don't charge or cut of the profits What they do is they
05:15charge so much per year and then less than that for successive years.
05:19Unfortunately they don't say on their website, they are not upfront with exactly
05:23how much they charge. They want you to submit the application but I did talk with
05:28them and it's pretty decent.
05:31One of similar to them is called BookBaby and these people do say exactly how
05:34much they charge right upfront.
05:35Right now they have reduced the price to $99 a year. That's for the first year.
05:40That's per book and then after that if you want to keep the book going with them,
05:43 then it's like $19 year or nine dollars year and you can find out more here but
05:48what I like is that you can upload an EPUB but they will also make it available for
05:53the Kindle and the Nook and Sony Reader.
05:55So they are an aggregator for the Sony Reader bookstore and they have a
05:59very nice e-publishing guide that you might want to download and learn some things from.
06:03So if you are considering going with an aggregator, I think it's worth your
06:06time to investigate at least two or three of these companies. You want to make
06:10sure that they can take your EPUB file and that they have a good track record
06:14of being honest and upfront with all the authors and publishers that they work with,
06:18that they are responsive to your enquiries, and that they have been
06:21around for a while.
Collapse this transcript
Selling from your own web site or ecommerce site
00:00There is nothing forcing you to sell your EPUBs or your ebooks on a reseller
00:06site or having to be exclusive on that site, unless their terms and conditions
00:10say that it has to be exclusive.
00:12You can always sell it on your own website.
00:14So create your EPUBs and write up some instructions for people about how to read
00:18the EPUB, point them to some ereaders, or to Ibis Reader or something like that. Sell it yourself.
00:25You don't even have to be a programmer.
00:27You can use a service like eSellerate that we're looking at right now on screen.
00:32eSellerate is a website where a lot of small independent software developers
00:36will sell their plug-ins, and extensions, and scripts and things, because it is
00:40very easy for an independent user to get started with them.
00:43You upload your files to them. They have pretty good user interface for
00:46assigning an SKU and assigning discount codes and so on.
00:50And then you just link to the eSellerate site and create your own store.
00:54I'll show you a couple of examples in a bit.
00:56A competitor of the eSellerate that you may have already used is Kagi.
01:00Kagi is often used to sell software, but both these places can sell anything digital.
01:05So either use eSellerate or Kagi or another solution provider, any kind of
01:10ecommerce provider that has the ability to store digital media, so that when
01:16people purchase it, they can download it from that site.
01:18That's what you're looking for.
01:20I did a search on Kagi and I found that here is an example of somebody who is
01:23selling EPUBs using the Kagi store.
01:27The system lets you modify what the store looks like quite a bit and really
01:31customize it or you can even integrate it into your own website if you'd like,
01:35rather than sending somebody to an outside service.
01:38Here is another publisher that's using eSellerate, Take Control, and here's
01:42their catalog. So they're just starting to move to from PDF to also offer EPUBs.
01:49But if I click here, Take Control of Working with Your iPad, to the actual
01:54book page where we have lots of great information and if we want to buy this,
01:59you click Buy eBook.
02:00And it brings you to the eSellerate store page, where the purchaser can enter in
02:06their name and their credit card number and then download the ebook.
02:10In fact, on their blog that I co-host, indesignsecrets.com, we have a store here
02:15where we're reselling PDF ebooks in our eSellerate store.
02:19So if you want to purchase this book than you just find the link to purchase it,
02:25and it brings you right to our eSellerate store with a full description and
02:29buttons to buy it and so on.
02:30So once you have your EPUB ready, you're not beholding to these resellers.
02:35You can go ahead and start selling it immediately on your own.
02:37Kagi and eSellerate, they normally don't charge any kind of fee to get started with.
02:41They just take a percentage or a few cents from every transaction.
02:45So it's a really great way to set up your own ebook store on your own web site.
Collapse this transcript
11. Keeping Up with the Field
Next Steps
00:00Well thank you so much for sticking through this.
00:03We tried to cover everything about EPUBs and Kindle publishing as of today.
00:09We are at the very beginning of this digital publishing revolution and I'm sure
00:15that five months from now there's going to be all sorts of new things that we can do
00:18with CSS and EPUBs and new tags they support and ways to sell it.
00:23So let me tell you about more resources that will help you keep up to date with his field.
00:27First of all on lynda.com there are some really great video titles on CSS and as
00:33you have learned, CSS is a big part of EPUB and Kindle format publishing.
00:38So there is a good one called creating a CSS Style Guide: Hands-on Training and
00:43id you're working with Dreamweaver it will apply to any kind of CSS that you
00:48are doing, not just Dreamweaver CSS.
00:50There's another one called CSS Crash Course by SitePoint and though it's a little old,
00:55I think this looks like a very accessible course for people who are not
00:57familiar with CSS at all.
00:58How to format text, what is a selector, what's inheritance, all that
01:03stuff applies to EPUBs.
01:05Another video on lynda.com is from my friend Jim Maivald who do this great
01:10video on publishing workflows with XML and XML is very closely associated with the EPUB format.
01:19All those files were XML files and then of course we were dealing with XHTML files.
01:23So if you want to go a little bit further in setting up some sort of automated
01:27production that would result in EPUB you would definitely want to start with
01:31learning about XML and InDesign right here.
01:34Outside of lynda.com, here are some other places where you can keep up to date
01:38in this quickly changing field of ours.
01:41One of my favorite ones is on twitter.com.
01:43Now even if you don't tweet, even if you don't have an account, you can go to
01:48search.twitter.com and do a search for this hash tag EPRDCTN. It stands for
01:55eproduction and this is what everybody's posting links and asking questions
02:01about creating ebooks and Kindle books and EPUBs and all sorts of stuff from
02:07the very geekiest to just selling or working for a publishing company, and
02:11you're in charge of this a lot of stuff, about metadata, a lot of talk about ISBN
02:16numbers and resellers.
02:18So this is a wonderful place to get more information to ask questions.
02:23And a resource is that I've mentioned a few times during the course of this title is
02:27mobileread.com. I have talked about their forms and also their wiki.
02:32Their wiki if you remember was the place where it had listed every single ereader
02:36device and their pixels and their resolution.
02:38This is like a volunteer organization that people just post all the information
02:43they can and also the forms themselves are a fantastic places, whether you are
02:48simply a consumer or an author or especially though, if you keep going down here,
02:55you want to learn about ebook software.
02:57So for example, Caliber a fantastic program for converting from one format to
03:01another and that's also an ebook library manager, they do all their support here.
03:06And so does Sigil, which I used many times during the course of this title.
03:10EPUBReader is a Firefox add-on that I demoed and then there's this whole
03:14section called ebook formats with all these different informants that we been
03:18talking about and a place to ask your questions among other colleagues who are
03:22dealing with the same issues as you are and they may have already learned how to
03:25solve those problems.
03:26This is a fantastic resource and I hope to see you there. mobileread.com.
03:32I know that I mentioned a number of times Three Press Consulting. These are the
03:36people who have the website where you can upload your ebook for validation and
03:40they also came up with the Ibis Reader, online ebook reader.
03:43They have a great blog. Liza Daly is one of the owners of Three Press consulting.
03:48She's a luminary in her field and this is the blog that I check daily.
03:52I want to see daily what Daly is writing about.
03:56Another blog that I always check is Pigs, Gourds and Wikis.
03:59Don't ask me why Liz called at that, but this is another. Liz Castro wrote a book
04:05called EPUB Straight to the Point, which is all about how to create EPUBs from
04:09Adobe InDesign and Microsoft Word.
04:11And she's a coder through and through.
04:13She's well known for writing the HTML, XHTML, and CSS Visual QuickStart
04:18Guides for Peachpit Press.
04:20She has got a really great blog where when she discovers something new, then
04:23she will write about it with really good captions and sample files. She's a huge
04:28help and a huge asset to our industry. Liz Castro's blog, pigsgourdsandwikis.com.
04:34Finally don't forget to keep up with me on indesignsecrets.com where I try to
04:39write posts having to do with EPUB and everything else having to do with InDesign.
04:43If you come to indesignsecrets.com and you go to blog posts, you will see we have
04:46a section just for EPUBs, so check that out as well.
04:50So thanks again everybody and I hope to see you again soon!
Collapse this transcript


Suggested courses to watch next:

InDesign Secrets (9h 42m)
Anne-Marie Concepción


InDesign CS5.5 New Features (1h 22m)
James Fritz

Designing a Magazine Layout (3h 25m)
Nigel French


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 104,141 instructional videos.

get started learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 2,025 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.

preview image of new course page

Try our new course pages

Explore our redesigned course pages, and tell us about your experience.

If you want to switch back to the old view, change your site preferences from the my account menu.

Try the new pages No, thanks

site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked