View Single Post
Old 11-02-2010, 04:09 AM   #79
RealImages1
Member
RealImages1 began at the beginning.
 
Posts: 10
Karma: 20
Join Date: Sep 2010
Location: Auckland, New Zealand
Device: iPad
Quote:
Originally Posted by st_albert View Post
Hmm, I don't think I've had that happen to me, though my usual MO when I do this is to import a single (huge) xhtml with embedded CSS, then create my own separate CSS file using the embedded elements, then split the xhtml into chapters. Which all inherit the same CSS file after splitting.

So I'm guessing here: It is probably because all of the xhtml files contain a reference to the external CSS file, so sigil imports that too, over and over, and presumably renames it to something like Style001.css, Style002.css, etc.

Are all the imported CSS files identical (except in name, of course)? If so you could delete all but one, then modify the references in each xhtml file to point to the one css file. Note that you can do search-and-replace with a regular expression ("regex") over all your xhtml files, so all the modifications can be done in one lick, rather than having to edit them all individually.

Help on using the power of sigil's regex search and replace is available elsewhere in this forum. Or if you get stuck, ask.


ETA: I should read more thoroughly. What I just said above would seem to be the case, and my suggestion is the same (though perhaps more verbose) as that of theducks, a couple of posts previous. Should be an easy fix if our assumptions are correct.
Many thanks for that clarification, St Albert,

Very interesting to hear of your workflow/MO. For myself, I prefer to get to the seperate chapter (etc) xhtml files and css as quickly as possible because that is where I feel most comfortable working. In her excellent ePub book, Liz Castro goes into great detail on how to manipulate files from Word or InDesign. I appreciate the effort she's put into it and the clarity with she writes, but I have to say I hate all that 'recovery from...' approach.

I see you are right in that theducks said pretty much the same thing as you did, but your (more detailed) version was more immediately understandable.

I have a number of thoughts in response, but rather than rambling on in the abstract, I would like to take a few days to experiment further. I'll probably get back on this !

The one thing I would say is that repeatedly importing the same file would seem to me to be a bug in Sigil. But then - I am on an older version. Maybe the latest one has fixed the problem.

Thanks again for your advice and especially the offer to help more.

Mike
RealImages1 is offline   Reply With Quote