View Single Post
Old 11-15-2012, 06:24 PM   #9
Man Eating Duck
Addict
Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.
 
Posts: 253
Karma: 69784
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Quote:
Originally Posted by st_albert View Post
Except, we're still using CS4, so I have to manually change the chapter header styles from <p to <hx ( and insert sigil_split_markers at the same time).
Headings really should be h-tags, as they have semantic meaning in addition to formatting. We create academic books which usually have three or more heading levels , so this might be more important to us than for a straight novel.

I would eliminate as much manual fiddling as possible, have a look at the new saved search features in Sigil. This way you can keep the indesign file as a master document and quickly generate a new epub if there are small corrections in the text, I currently use about two minutes to create a finished epub from the indesign source.

This might be basic, but in Sigil: In Tools -> Saved searches, create a new search group, add your custom searches. After testing you can run them all in one go. I would suggest something like this for headings (untested):

Find: (?sU)<p class="heading2">(.*)</p>
Replace: <h2 class="heading2">\1</h2>

Page breaks:
Find: (?sU)<p class="pagebreak">(.*)</p>
Replace: <hr class="sigil_split_marker" />

For headings which should have a page break before them you can just prepend the split marker to your replacement text.

I have also written a small script which might be useful to you. It replaces existing fonts in the epub with healthy ones, removes encryption.xml and adds the file necessary to make iBooks use the fonts. If you're interested I can post it when I get back to work. Anything to save a few clicks when you're repeating a task numerous times
Man Eating Duck is offline   Reply With Quote