View Single Post
Old 11-03-2010, 08:35 PM   #82
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by RealImages1 View Post
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
Just re-order (drag to the proper read order place) your book list and the TOC follows
theducks is offline   Reply With Quote