From the course: InDesign Secrets
207 Fixing style collisions in EPUB output - InDesign Tutorial
From the course: InDesign Secrets
207 Fixing 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.
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Contents
-
-
229 Batch converting ID files to current version with the Book panel6m 9s
-
230 Getting around InDesign limitations6m 46s
-
(Locked)
231 Creating better callout lines with effects and object styles5m 47s
-
232 Swapping column and row information in tables6m 9s
-
(Locked)
233 Making bigger text link targets4m 52s
-
-
-
161 Keeping page numbers on top of master items3m 55s
-
162 Adding automatic currency symbols in a table cell or before text3m 50s
-
(Locked)
163 Make a pop-up footnote for your ebook3m 48s
-
(Locked)
164 Deleting tabs at the beginning of paragraphs and applying a paragraph style3m 10s
-
(Locked)
165 Five InDesign Presentation tips6m 28s
-
-
-
(Locked)
111 Packaging images on the pasteboard3m 32s
-
(Locked)
112 Automatically updating figure references for books6m 9s
-
(Locked)
113 Adding Tool Tips to your form fields in InDesign3m 21s
-
(Locked)
114 Setting poetry, flush left, center on longest line3m 54s
-
(Locked)
115 Use bookmarks to navigate long documents in production4m 57s
-
(Locked)
-
-
(Locked)
107 Using the same keyboard shortcut for two different commands with the Context feature5m 22s
-
(Locked)
108 Making a text highlighter3m 33s
-
(Locked)
109 Updating an interactive PDF without losing work done in Acrobat5m 30s
-
(Locked)
110 Adding custom text at the beginning of each line automatically4m
-
(Locked)
-
-
(Locked)
089 Three great Object Styles for any designer8m 1s
-
(Locked)
090 Choosing alpha channel image transparency2m 25s
-
(Locked)
091 Adding and reading metadata for InDesign files3m 25s
-
(Locked)
092 Adding ALT tags to your images6m 59s
-
(Locked)
093 How to Place & Link a text frame's text but not its formatting7m 4s
-
(Locked)
094 Setting the baseline position of a caption2m 39s
-
(Locked)
-
-
(Locked)
051 Five things that should be in every new file5m 19s
-
(Locked)
052 Forcing EPUB page breaks with invisible objects6m 21s
-
(Locked)
053 Understanding component information6m 39s
-
(Locked)
054 Creating running heads using section markers4m 16s
-
(Locked)
055 Making a font with InDesign using the IndyFont script5m 20s
-
(Locked)
056 Finding where that color is used7m 17s
-
(Locked)
-
-
(Locked)
047 Specifying an exact amount of space between objects5m 17s
-
(Locked)
048 Fixing last lines that are too short8m 16s
-
(Locked)
049 Creating web graphics from your InDesign artwork7m 20s
-
(Locked)
050 Using “No Language” to suppress unwanted hyphenation, spell-checking, and smart quotes2m 48s
-
(Locked)
-
-
(Locked)
037 Updating a linked table without losing formatting5m 18s
-
(Locked)
038 Creating electronic sticky notes4m 49s
-
(Locked)
039 Moving master page items to the top layer for visibility2m 48s
-
(Locked)
040 Five guide tricks that will impress your coworkers6m 18s
-
(Locked)
041 Letting InDesign add the diacritics4m 21s
-
(Locked)
042 Using single-cell table cells for custom paragraph formatting6m 2s
-
(Locked)
-
-
(Locked)
027 Creating running heads using variables5m 1s
-
(Locked)
028 Live Caption tips and tricks8m 3s
-
(Locked)
029 Making professional drop caps10m 37s
-
(Locked)
030 Making two-state buttons in interactive documents5m 5s
-
(Locked)
031 Moving pages from one document to another3m 15s
-
(Locked)
032 Wrapping bulleted text around a curve5m 58s
-
(Locked)
-
-
(Locked)
007 Selecting through and into objects using cmd-click and Select Above/Below5m 46s
-
(Locked)
008 Some great tips and tricks for the Swatches panel9m 40s
-
(Locked)
009 Saving down for backward compatibility with INX and IDML5m 54s
-
(Locked)
010 Using the INX and IDML formats to fix problems4m 46s
-
(Locked)