Quote:
Originally Posted by Macsurfcat
I would note that the structural elements are the consequence of "styles" in InDesign, which have both structural and stylistic qualities. When InDesign exports to epub, styling and structure are separated (elements and CSS). Does that make sense?
|
Actually, I just converted a book exported from InDesign today. For people who have never seen the code from InDesign, here is a sample from the EPUB output:
Quote:
<p class="Article-Copy para-style-override-7"><span class="char-style-override-8">Declare an end to any and all “entitlements” to corporate welfare.</span> President Clinton signed a bill that ended individuals’ legal entitlement to federal subsidies. We should put businesses on notice that they are not owed anything, either.</p>
|
Of course, the code gets MUCH more hairy when there is all of this kerning tweaks/other stuff going on. InDesign creates so many spans and "para-style-override" and "char-style-override" classes. A bunch of redundant/irrelevant CSS:
Code:
p.Article-Copy {
-epub-ruby-position:over;
color:#000000;
font-family:"Myriad Pro", sans-serif;
font-size:1em;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:1.2;
margin-bottom:0px;
margin-left:0px;
margin-right:0px;
text-align:justify;
text-decoration:none;
text-indent:14px;
}
[...]
span.char-style-override-7 {
font-size:0.444em;
}
span.char-style-override-8 {
font-family:"Myriad Pro";
font-style:normal;
font-weight:bold;
}
First Recommendation: When using InDesign in any step of the ebook workflow, the best advice is to make sure the typesetter USES STYLES. Using them properly would really cut down on nearly all of those "style-override" classes.
This makes figuring out/cleaning the actual code a thousand times easier.
Second Recommendation: On top of this, having a consistent in-house stylesheet which is used across a SERIES of books... would make this code cleanup MUCH quicker/easier. (For example, I work on a quarterly journal. Every issue follows the same exact InDesign styles. So when I get the EPUB, I can just "click a button" to run the regex, that cleans up InDesign cruft).
Sigil Recommendation: I then use Tools - Reports - Style Classes in HTML Files, to catch any more leftover InDesign cruft.
Back to Oxygen: I don't really see a real advantage of Oxygen Author over a tool like Sigil in these cases where you just have to do some code cleanup from InDesign export.
Much better/cheaper to convince the publisher to work on creating clean/consistent InDesign files in the first place. Which will make the ebook conversion step MUCH easier/faster.
As I said, I have a journal down to nearly a "one-button" press.