View Full Version : InDesign CS6 export to EPUB problems


Klip
08-24-2012, 04:08 AM
Hi there
I'm helping a client who will need to prepare their books on InDesign CS6, the idea is to create a workflow that will require the least possible editing in the EPUB stage.

But what I'm seeing is that this version of InDesign creates some problems -

For example, there are some alert-boxes in the book that need to be shown with a blue background. In CS5 I created an object style for that text-frame, and InDesign spat out an empty style rule with that name and inserted the correct class reference in the HTML so I could format the boxes by editing the style rule. Each text box has a heading inside it that is styled with the a paragraph style (bluebox_head) and that just got exported as normal - a style was created with the correct formatting. So all looked fine.

In CS6, on export there is no rule created for the object style in CSS, and what's more, the paragraph styles used inside that text frame are duplicated - a style is created for each instance of that heading in the HTML document, named incrementally.

So I've got all these duplicate styles in the CSS document - "bluebox-head-1" and "bluebox-head-2" and so on and on, each with identical rules.

Now - it may be possible to fix this with a find and replace in EPUB stage but what a mess!

Am I doing something wrong?

Klip
08-24-2012, 05:26 AM
OK - I've figured out something more.

This problem does not occur when exporting from a single InDesign document - (at least, the CSS rule for the object style is still not created, but at least I'm not getting the duplicate rules)

But it does happen when exporting an InDesign book document - and I think the problem is because although the styles are defined in the document that is used as the style source, the actual objects that the styles are applied to, are only in later documents.

JSWolf
08-24-2012, 11:39 PM
Do you know that most readers are B/W and blue won't show as blue?

Klip
08-25-2012, 02:28 AM
Hi
I should have mentioned :)
The book is a sort of in-company manual that is intended to be read on iPads or possibly Android phones - not a book that will be for sale on the open market.

amyg
08-26-2012, 09:25 PM
InDesign does some messy stuff with creating css styles and the html tags that point to them. That's why I don't use its automatic tagging. You can bypass all this and create your own CSS sheet that you can give your client. The stylesheet can contain styling for all your paragraph styles (classes) and object styles (divs). On Epub export, there is an option to add your own stylesheet. Then create an export tag for blue box_head. The fly-out menu on the Paragraph Styles pallet has an option to edit all export tags at once. I think when you save the template for your client, all the epub export setting will be saved with it. You can just give your client the css sheet and the InDesign template.

Still though, I have not been able to make an epub from InDesign that requires no editing after it is in epub form. I always have to go in and tweak some things.

Klip
08-27-2012, 03:38 AM
That's what I used to do, amyg - but it no longer works:
With this version of InDesign, it adds your CSS document to InDesign's automatically created CSS, instead of replacing it. So there are two .css documents, both linked to all the XHTML documents. It does this even if you click the option not to create styles - then it just creates a much shorter default style sheet with rules for body, div, and all images.

So if you are clever you can write the imported CSS in such a way that they overwrite the InDesign version but I cant always figure a way to do that.

But my problem is not really with the CSS generated - I can always replace that. It's with the class references in the XHTML document. Because they get duplicated in this way, unless I do a regular expression find and replace to change them all to the same class reference, I would have to write a style for each of these duplicated classes, that are actually the same :(

Possible to do, but it's so messy!

PageLab
08-27-2012, 08:01 PM
If the ePUB is intended to be read only in iBooks, on the iPad, you can use CSS to target all of these duplicated classes in one shot, like this:


p[class^="bluebox_head"] {
/* your styles */
}


This does not work on eReaders that use Abobe RMSDK. Other than that, GREP is your best friend.

amyg
08-27-2012, 08:57 PM
I wonder what's creating your problem. You don't have this with other paragraph styles, do you? Just the ones in these boxes. Hmm, weird. So what is the different between these text frames and your other text frames? I want to try to recreate your problem but I don't think I have enough information.

PageLabs solution looks like a good one. Though I'm not sure if it will work on the Androids.

And yeah, I hate that InDesign CS6 forces a stylesheet on you. I definitely like CS5.5 better. This was a step backwards in my opinion.

Klip
08-28-2012, 01:58 AM
PageLab - thanks for that - I'll have to find out if it will work for the client's reading device. I suspect they want it to work on Android as well. But at least it's a possible fix.

amyg - It does this for tables too, and for images in tables, for some reason. I think the reason it does this for the text boxes is because those are formatted with an object style and not a paragraph style. It is a bit of a mystery for me because it does not do this when there are several text-boxes in a single InDesign document, just when it is set up as an InDesign book document, with several InDesign documents combined.

Klip
08-28-2012, 02:00 AM
I've just got a reply from Elizabeth Castro, who says she will forward my problem to "the folks at Adobe" :)

So maybe I'll get an answer from there.

amyg
08-28-2012, 01:25 PM
Oh! You're using the book feature! InDesign's book feature sucks when it comes to epub output. I don't use it anymore. I do use object styles without this issue.

I hope Liz will help you get Adobe to fix it. That would be great and I think she may actually have the clout to do that. It would be nice sometimes to be able to use the book feature but for now, I will continue to avoid it.

Klip
08-29-2012, 03:09 AM
Yes - I tried to avoid using the book feature too, but the one thing it does do is create the correct (as far as this client is concerned!) IDs in the spine and manifest - based on individual file names. Apparently with this client's setup, that's essential. They are dealing with an enormous load of manuals and there's some kind of server-side processing that needs to happen, and having the correct IDs is important to them.

SusanM
09-26-2012, 07:12 PM
That's what I used to do, amyg - but it no longer works:
With this version of InDesign, it adds your CSS document to InDesign's automatically created CSS, instead of replacing it. So there are two .css documents, both linked to all the XHTML documents. It does this even if you click the option not to create styles - then it just creates a much shorter default style sheet with rules for body, div, and all images.

So if you are clever you can write the imported CSS in such a way that they overwrite the InDesign version but I cant always figure a way to do that.

But my problem is not really with the CSS generated - I can always replace that. It's with the class references in the XHTML document. Because they get duplicated in this way, unless I do a regular expression find and replace to change them all to the same class reference, I would have to write a style for each of these duplicated classes, that are actually the same :(

Possible to do, but it's so messy!

I noticed the same thing, but I ended up with two stylesheets - one generated by InDesign and my external stylesheet. I also found that my object style did not export so I ended up adding a top margin to the frame.

I thought object styles were supposed to export. Also, does the relative to page format work for iBooks? I haven't tested this out or do you have to select fixed for iBooks?