View Single Post
Old 11-03-2010, 07:37 PM   #81
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 sigil checks each "new" possible css file to see if it's identical to one it has already imported. It just sees what resources are referred to in each xhtml, and tries to import them too.
Well - I've learnt a bit of stuff !

I should probably begin by reiterating that all I'm wanting to do is find a simple way to generate clean, accurate OPF and NCX files once I've got all my xhtml and css done. Since my first post here in September, I have been working on an applescript to make the OPF. I have developed a version that gets me half-way, but still leaves a fair amount of hand coding. As I don't really know applescript (instead relying pretty heavily on snippets picked up from forums such as macscripter.net) I am not able to get it fully functional. Also it's very limited in that it has hard coded POSIX paths which are specific to my machine. I will probably continue to pick away at it as time allows, but for the moment I need something more immediately. Generating an NCX with applescript has defeated me altogether.

So - with Sigil, I decided the simplest way around the multiple css file imports was to make a duplicate of my main project folder (with all relevant sub-folders and files) and then do a multifile Replace to remove all links to the css file from every xhtml file. I can then import this modified version into Sigil with no problems. And Sigil then gives me a very nice OPF, which (after un-zipping the ePub) I can put back into my original project.

But the NCX is still a little problematic in that the TOC Editor in Sigil doesn't seem to allow for re-ordering. In fact it generates the TOC in alphabetical order and I cannot see a way to change this. Please tell me if I'm wrong about this ! The only solution I can think of is to name every original xhtml file with an ascending numeric system based on the order in which I want them to appear in the book - which is, of course, exactly what Sigil does when it's doing the whole job itself. It's important I think, to use a naming convention with increments of 10 (so: Chap010.xhtml, Chap020.xhtml, etc) in order to allow for later changes and additions. For instance an author might decide at the last minute that he or she wants to put in a dedication page.

Thanks to all those who've helped me here and if anyone's got comments or (hopefully, improvements) on this I would love to hear them.

Mike
RealImages1 is offline   Reply With Quote