11-29-2017, 02:52 PM | #1 |
Connoisseur
Posts: 67
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
|
Span Span Span Sigil cleaning up indesign
Hi
I'm looking at creating graphically heavy fixed layout epub3 Indesign makes a good looking set of pages on the surface but behind the surface is some horrible looking code. Every word in every paragraph is wrapped up in a span. while on the surface it looks fine it bothers me. I guess its fair enough that the first word of each line needs a location but the rest of the line can just follow along with spans used for italic or bold maybe. Is there a quick way to get sigil to strip out the unnecessary span code. thank you for reading |
11-29-2017, 04:31 PM | #2 |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
Advert | |
|
11-29-2017, 08:32 PM | #3 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
I would second using TagMechanic.
|
11-29-2017, 08:41 PM | #4 |
Grand Sorcerer
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I third it.
|
11-29-2017, 09:35 PM | #5 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
If you want to know why Adobe InDesign wraps empty spans around everything then you should remember the bad old days of iBook epubs. In those days Apple goofed hugely with their proprietary epub format such that you had to wrap everything and anything that was centered in empty spans(spans with no styling). I think this problem has now been fixed by Apple(it only took them 6 or 7 years to fix it). You can read about this on Liz Castro's old website. This is why InDesign still wraps all text in spans. I call this InDesign feature Adobe Overkill. Unfortunately InDesign still surrounds all text with empty span tags even now. And yes, they are even slower than Apple at fixing anything.
Last edited by slowsmile; 11-29-2017 at 09:48 PM. |
Advert | |
|
11-29-2017, 10:18 PM | #6 |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@slowsmile - I've always thought that InDD's heritage, Pagemaker and Postscript, might have led to the EPUB goulash it spits out. My favourite metaphor of an InDD FXL EPUB is - imagine a Ferrari powered by a bazillion rubber bands.
BR |
11-30-2017, 02:06 AM | #7 |
Connoisseur
Posts: 67
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
|
|
11-30-2017, 02:19 AM | #8 | |
Connoisseur
Posts: 67
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
|
Quote:
I might give sierra an external partition at some point, because naturally it doesn't work on yosemite which I am very comfortable with. unfortunately parallels has serious graphics problems running sierra in a vm e.g ibooks author you can't see the contents of the document. of course ibooks author on yosemite crashes if it sees an epub. I also forceably removed ibooks from yosemite because it was trying to pull my epub and pdf files off my nas in itunes into some cryptic location. I'm hoping to get a sane work path eventually. |
|
11-30-2017, 08:27 PM | #9 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@blackest...Wow, it seems that you have to jump through hoops using InDesign on your Mac. I used InDesign for ebooks on Windows for a while in the past. It's still my go to app for imprint books. But not for ebooks. In my opinion I think the Adobe InDesign team added the epub conversion capability as a rushed afterthought because I found that it has too many odd quirks and problems(that you have to know about) whenever you create epubs using InDesign. I switched to using Sigil and have never regretted it. Sigil just gives you more control over your epub formatting.
I hope you find an easier workpath!! |
12-01-2017, 03:59 AM | #10 |
You kids get off my lawn!
Posts: 4,220
Karma: 73492664
Join Date: Aug 2007
Location: Columbus, Ohio
Device: Oasis 2 and Libra H2O and half a dozen older models I can't let go of
|
This looks really interesting. I checked to see what version of Sigil I have installed...it's 0.5.3!! Guess I should look into upgrading it first. (Hey, it's worked for me, so why change it?!)
|
12-01-2017, 06:36 AM | #11 |
Grand Sorcerer
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
0.5.x was pretty solid. I stuck with it for a long time myself.
|
12-01-2017, 10:48 AM | #12 | |
Connoisseur
Posts: 67
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
|
Quote:
I finally got the latest version of UnDesign (a typo but i'll keep it) installed under windows 10. It's text output is still a bazillion rubber bands. Really , really ugly code. Seems like a dead end. On the plus side i treated myself to a new external hard drive and i set up sierra and el capitan on there El capitan was from a backup drive so is pretty much fully configured. Ibooks Author is not blowing up when presented with an epub generated from indesign. One thing I also found was a failure of my conversion process to import words with spaces a lot of the time, so lines of characters not words spell check was able to figure it out about 80% of the time but it is easier just to use preview to pull the text out the pages. That and Text Edit saves a lot of unnecessary work. So currently I think indesign is good enough for converting image layout only. I am going to see if iBooks Author will be any better for text layout. I'm probably going to be forced to use Sigil to add the text and generate templates but we shall see. |
|
12-01-2017, 09:13 PM | #13 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@blackest...I've tried both InDesign and Jutoh in the past but both have large learning curves. I eventually settled on Scrivener for both my writing environment and for its epub converter. Scrivener gives the cleanest conversion to epub that I've ever seen. Sure it has it's little quirks, but nothing like the problems and junk that is generated by InDesign for epub conversions. I now use the scriv doc to epub conversion as my start point for finishing off the epub in Sigil which is quite a quick workflow that works fairly well for me.
Last edited by slowsmile; 12-01-2017 at 09:22 PM. |
12-02-2017, 02:26 AM | #14 | |
Connoisseur
Posts: 67
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
|
Quote:
Maybe epub is a conspiracy designed to keep books in print It would explain a lot. Maybe something like bootstrap is needed. If it's relatively easy to code a website that will work on a phone or a 5k monitor why is it so hard in epub ... I know it would break a lot of eink readers but mostly its computers tablets and phones which can run anything. https://www.ibm.com/developerworks/l...pub/index.html I looked at this, the example from IBM which breaks really badly and I also found korean Sigil clone on view porter .com (i'm not linking to them) maybe it's easier to port a web page ... been a tiring week, things really haven't got any easier. |
|
12-02-2017, 07:24 PM | #15 |
Connoisseur
Posts: 67
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
|
I found this post which looks useful for the span problem
This code is really easy to get rid of just but simple search & replace in Calibre for:
<span class="calibre26"> then <span class="calibre27"> and so on and so forth, after you're done you're left with a lot of </span>'s so just use "Beautify all files" function and voila, youre HTML files are clean. If you get some more annoying code such as: <p id="block_1"><b class="calibre_pb_1"></b></p> in the next file you might see: <p id="block_2"><b class="calibre_pb_2"></b></p> notice the running numbers.. what you want to do is use regex search & replace (also available in calibre) and it goes like this: Search for: <p id="block_[0-9]*"><b class="calibre_pb_[0-9]*"></b></p> Voila! those silly page breaks calibre makes are gone. As for fixing the styling back to place, most of those spans calibre creates are repeated styling and usually contains only 2 rules, so it's rather easy to look at the CSS and see what kind of styling was applied on those spans and put them into the <p class="calibre25"> calibre25 css style. |
Tags |
indesign, sigil, span |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Span Span Span Span | MULTIVAC | ePub | 7 | 12-06-2014 09:58 AM |
Odd Sigil behavior = <span style="font-size: 0.9em;">??? | knadles | Sigil | 18 | 07-23-2013 05:59 PM |
span in span: is this problematic? | tbuyus | ePub | 8 | 03-31-2013 09:01 AM |
Sigil 0.4.1 : unwanted span added by Sigil | Bertrand | Sigil | 0 | 09-02-2011 06:28 AM |
Remove <br /> together with span, and only span | Razzia | Recipes | 3 | 05-30-2011 07:55 PM |