When you're exporting a free flowable layout to EPUB, InDesign will reformat the layout using CSS styles. Normally, InDesign will easily convert illegal characters or styles that start with a number, however if there are two different illegal characters,you are faced with a situation InDesign calls a Style Collision. Watch this Lynda.com tutorial to learn how to fix Style Collisions in EPUB output.
- When you export a document to EPUB from within InDesign, InDesign looks at all the paragraph styles and reformats them into CSS styles in the EPUB. CSS Styles have a much stricter naming convention than InDesign's paragraph styles and that's where you might end up in trouble. This is an actual document from a client that I have obfuscated for this video that shows the style problem and allows me to show you the solution that we came up with. If we look at the paragraph styles for this document, you can see that their paragraph styles are named kind of strangely.
They have the same exact paragraph name such as example preceded with a 1 and a parenthesis, and then they also have an example with an a with two parenthesis, and example with an a and a bracket with a parenthesis following it, and they have an example with a 1 and a backslash. This all makes sense to them, this is how they've been creating these files for the past umpteen years. And now they want to move them to EPUB. Well, what's served perfectly fine for print and pdf is going to cause problems, because a lot of these characters are illegal in CSS names.
And normally, InDesign deals with that with equanimity. It just replaces the illegal characters with a hyphen, and replaces numbers that start out styles, which you can't use in CSS, with underscores, which is fine. But that's all it knows how to do, is replace things with underscores and hyphens. And when you have two style names with a different illegal character, it's going to replace them both with the same dash, and so, they're going to merge. InDesign calls this a Style Collision.
And you'll get a dialog box warning you about collisions in recent versions of InDesign. I'm going to go ahead and export this document to EPUB. This only happens when you export free flowable, by the way, not fixed layout. And click Save, the only settings that may matter are the fact that it's set to EPUB 3.0, though the same thing will happen with EPUB 2.0, and in CSS, I've disabled Preserve Local Overrides, which I always do, Include Embeddable Fonts. I'm going to click Ok, you'll see that we immediately get a warning, that says that we have two CSS name collisions.
The paragraph style called 1) enumeration and 1. enumeration generate a conflict. InDesign renames them both to the same style, _-- enumeration. That means that anything that was styled 1. enumeration is going to lose its formatting in the EPUB. It's going to take on the formatting of 1) enumeration. We have the same thing happening here, with two conflicting example paragraph styles. In the original project from the client, it was a book made up of 30 different InDesign documents totaling over a thousand pages, and we had over 150 conflicting style names.
The answer, usually, is to go back to the paragraph styles panel and rename them, so that they are unique. But when you have a lot of them to do, or the client doesn't want you to rename styles, then there is a better solution. That's what I'm going to show you now. But before we do that, you need to keep a record of what are the colliding styles. Who are the problem children? InDesign looks like it lets you select this text and copy it, and that's what I would normally do, and then paste it into a text frame in my document to use as a reference, but I've never been able to get the copy to work correctly, it's like it doesn't actually put it in the Clipboard.
That just might be a temporary glitch. So for now, what I'm going to do is to take a screenshot. And I'll use the Mac keyboard shortcut to take a screenshot of just this dialog box, which is command+shift+4, gives me little crosshairs, and I'll drag it over this, and then that saves it automatically to the desktop. Because in order to edit my styles, I need to close out of this warning. By the way, turned off Preview EPUB, that's why it's not opening up in Adobe Digital Editions. I'll place that screenshot right in my document.
And I'll zoom in a little bit, so we can see it better. The answer to fixing this collision problem without renaming your styles, is to map the conflicting styles to different class names. You could do that one by one, we could go to 1 enumeration and come down here to Export Tagging, and just give it a class name that is unique. That way InDesign won't rename the illegal characters to its default renaming, it will use this class name.
But a better way, if you have a lot of these, is to do it from the paragraph styles panel menu, the Edit All Export Tags dialog box. So here I'm going to look for 1 enumeration with the parenthesis, or actually, I have 1. enumeration already selected. I'll go ahead and change that class name to enum1 and then the one with the parenthesis is right here, we want to give this a different class name. I'll call it enum2, let's do the same thing for examples.
So there's 1\ example, call this example1 and then there's 1) example, we'll call this example2. That's it, click Ok. We can get rid of this. And now let's go ahead and export this once again to EPUB, and all we're hoping for is no warning dialog box, because we're not previewing it, remember? Click Save, Replace it. Okay, that's it, all the collisions are gone.
That is the fastest way to solve the CSS style naming collisions in InDesign. Use it in good health.
Updated
12/23/2020Released
8/25/2011New techniques will be added to the collection every other week, so check back early and often. Find more tips and tricks at indesignsecrets.com.Note: Because this is an ongoing series, viewers will not receive a certificate of completion.
Skill Level Intermediate
Duration
Views
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.
Related Courses
-
InDesign CC 2018 Essential Training
with David Blatner6h 30m Beginner -
InDesign: Interactive PDFs
with David Blatner2h 27m Intermediate -
InDesign CC 2018: EPUB
with Anne-Marie Concepción4h 35m Intermediate -
InDesign CC 2019 Essential Training
with David Blatner5h 23m Beginner -
InDesign Quick Start
with David Blatner22m Beginner
-
This Week's Secret
-
Introduction
-
Welcome to InDesign Secrets1m 10s
-
-
December 2020
-
November 2020
-
October 2020
-
September 2020
-
Use one frame, not many4m 37s
-
August 2020
-
July 2020
-
June 2020
-
May 2020
-
Threading filled frames3m 14s
-
Custom page numbering tricks5m 13s
-
November 2012
-
October 2012
-
061 Embedding images7m 44s
-
-
September 2012
-
057 Text wrapping6m 54s
-
-
August 2012
-
July 2012
-
June 2012
-
May 2012
-
April 2012
-
March 2012
-
January 2012
-
April 2020
-
Making speech bubbles3m 32s
-
Working with ligatures5m 9s
-
February 2012
-
December 2011
-
016 Running a script9m 33s
-
November 2011
-
October 2011
-
August 2011
-
September 2011
-
March 2020
-
February 2020
-
Auto-expand acronyms4m 39s
-
-
January 2020
-
December 2019
-
November 2019
-
October 2019
-
409 Copy and paste effects4m 39s
-
-
September 2019
-
408 The master page trick1m 46s
-
August 2019
-
July 2019
-
June 2019
-
May 2019
-
April 2019
-
March 2019
-
February 2019
-
376 Make cast shadows3m 35s
-
-
January 2019
-
November 2018
-
December 2018
-
369 Shared CC Libraries tips5m 15s
-
October 2018
-
360 Find spacing problems4m 50s
-
363 Export all text8m 16s
-
-
August 2018
-
351 Change default fonts5m 51s
-
352 Best default RGB4m 45s
-
-
September 2018
-
July 2018
-
May 2018
-
343 Border spacing fix4m 59s
-
June 2018
-
346 Export to HTML55m 38s
-
April 2018
-
February 2018
-
March 2018
-
January 2018
-
325 Link text frames6m 10s
-
December 2017
-
November 2017
-
September 2017
-
October 2017
-
313 Quick Apply preferences6m 35s
-
August 2017
-
July 2017
-
May 2017
-
290 Work with scripts3m 35s
-
June 2017
-
April 2017
-
286 How to format ellipses5m 39s
-
March 2017
-
281 Share a CC library7m 10s
-
January 2017
-
February 2017
-
December 2016
-
271 Add images to an index4m 39s
-
November 2016
-
September 2016
-
October 2016
-
260 Batch process images7m 33s
-
263 Sync master pages5m 51s
-
-
August 2016
-
July 2016
-
June 2016
-
April 2016
-
May 2016
-
240 Side-by-side tables5m 35s
-
March 2016
-
February 2016
-
228 Setting text at an angle6m 24s
-
December 2015
-
January 2016
-
222 Adding paragraph shading1m 50s
-
October 2015
-
November 2015
-
September 2015
-
July 2015
-
August 2015
-
204 Creating a8m 14s
-
205 Managing scripts5m 38s
-
May 2015
-
189 Placing InDesign files5m 14s
-
-
June 2015
-
193 Printing tracked changes5m 41s
-
-
April 2015
-
186 Making long shadows5m 41s
-
February 2015
-
March 2015
-
January 2015
-
December 2014
-
November 2014
-
October 2014
-
September 2014
-
August 2014
-
July 2014
-
148 Cropping with paste into5m 18s
-
-
June 2014
-
May 2014
-
141 Inserting glyphs6m 42s
-
April 2014
-
March 2014
-
February 2014
-
January 2014
-
December 2013
-
November 2013
-
October 2013
-
September 2013
-
August 2013
-
105 Working with MiniBridge5m 45s
-
106 Customize your QR codes6m 17s
-
July 2013
-
June 2013
-
May 2013
-
April 2013
-
March 2013
-
February 2013
-
December 2012
-
069 Ten uses of the Story Editor11m 39s
-
-
January 2013
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: 207 Fixing style collisions in EPUB output