Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-31-2010, 09:17 PM   #76
Ankh
Guru
Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.
 
Ankh's Avatar
 
Posts: 713
Karma: 2003741
Join Date: Oct 2008
Location: Ottawa, ON
Device: Kobo Touch
Quote:
Originally Posted by Jellby View Post
Font embedding (or at least basic embedding) seems to be quite simple. I guess WISIWYG support is a different thing.
Ancient thread, but my need is current. Like Jellby, I also like to edit files by hand.

But what I really lack at this time is a command line tool, accepting two parameters, input and output ePub file. What I want that tool to do for me is to parse all XHTML elements, and then use those results to do font subsetting for all embedded fonts (cut out all glyphs that are not used in that particular edition).
Ankh is offline   Reply With Quote
Old 10-31-2010, 10:30 PM   #77
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 theducks View Post
You are importing multiple EPUB filesand trying to combine them into a single EPUB?
No - it's a single ePub, but I'm importing the original unzipped files. There are 35 xhtml files, 1 css and 5 images. No problem with the import process itself. Just that Sigil creates new css files for each xhtml file. So I have 35 duplicate css files which seems a tad wasteful.
RealImages1 is offline   Reply With Quote
 
Advertisement
Old 11-01-2010, 08:52 PM   #78
st_albert
Fanatic
st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.
 
Posts: 552
Karma: 94420
Join Date: Feb 2010
Device: none
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.

Last edited by st_albert; 11-01-2010 at 09:00 PM.
st_albert is offline   Reply With Quote
Old 11-02-2010, 05: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
Old 11-02-2010, 11:24 AM   #80
st_albert
Fanatic
st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.
 
Posts: 552
Karma: 94420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by RealImages1 View Post
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.
Mike
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.
st_albert is offline   Reply With Quote
Old 11-03-2010, 08: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
Old 11-03-2010, 09:35 PM   #82
theducks
Grand Sorcerer
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: 15,222
Karma: 5940081
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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
Old 11-03-2010, 11:17 PM   #83
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 theducks View Post
Just re-order (drag to the proper read order place) your book list and the TOC follows
Ha ! Of course. Silly me. Guess this is what happens when you try to use part of an application without actually learning the whole thing. On the other hand - if it's called a "TOC Editor", maybe it's not entirely crazy to expect it to edit the TOC...

Many thanks.
RealImages1 is offline   Reply With Quote
Old 11-04-2010, 12:02 AM   #84
theducks
Grand Sorcerer
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: 15,222
Karma: 5940081
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by RealImages1 View Post
Ha ! Of course. Silly me. Guess this is what happens when you try to use part of an application without actually learning the whole thing. On the other hand - if it's called a "TOC Editor", maybe it's not entirely crazy to expect it to edit the TOC...

Many thanks.
It does, in a way
Say your Entry says "Bapter 7"
You can change it in the TOC editor to "Chapter 7" and it makes the change in the main document.
Anything you do in the TOC editor, affects the main document. Un-ticking, makes a notation in the h# tag to hide from Sigil TOC.

The thing you CAN NOT do is make the TOC say one thing (from the editor) and have another value in the actual document. For that, you need to manually add title="BlahBlah" to the tag, which overides the normal text.
theducks is offline   Reply With Quote
Old 11-04-2010, 07:16 PM   #85
st_albert
Fanatic
st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.
 
Posts: 552
Karma: 94420
Join Date: Feb 2010
Device: none
Regarding the multiple css files issue, this appears to have been addressed in the new sigil 0.3.0 FINAL release.

Just announced today. See http://sigildev.blogspot.com/2010/11/030-final.html
st_albert is offline   Reply With Quote
Old 11-04-2010, 09:38 PM   #86
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
Regarding the multiple css files issue, this appears to have been addressed in the new sigil 0.3.0 FINAL release.

Just announced today. See http://sigildev.blogspot.com/2010/11/030-final.html
You're right. Unfortunately, although this version is headlined as "Universal", it doesn't run on an older PowerPC G5.
RealImages1 is offline   Reply With Quote
Old 11-05-2010, 01:03 AM   #87
st_albert
Fanatic
st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.
 
Posts: 552
Karma: 94420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by RealImages1 View Post
You're right. Unfortunately, although this version is headlined as "Universal", it doesn't run on an older PowerPC G5.
Sadly, support for Mac OS Tiger (10.4) was dropped a month or two ago. Maybe one of the early 10.5 (leopard) versions will run on your machine. Look into linux if you can.

Else, buy a cheap PC (and put linux on it).

[sardonic] You can't stop progress. [/sardonic off]
st_albert is offline   Reply With Quote
Old 11-05-2010, 02:13 AM   #88
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
Sadly, support for Mac OS Tiger (10.4) was dropped a month or two ago. Maybe one of the early 10.5 (leopard) versions will run on your machine. Look into linux if you can.

Else, buy a cheap PC (and put linux on it).

[sardonic] You can't stop progress. [/sardonic off]
In fact, I am running Leopard. It's not having an Intel processor that's the problem. Sigil is not alone in abandoning support for PPCs. Apple themselves now pretty much ignore them as well. So - it's not so much about 'progress' as such - it's more a form of prejudice like racism or sexism. Owning a PPC puts one very firmly on the wrong side of the tracks.

Having said that, this old G5 hums along very sweetly.

After 25 years on PCs I switched to Mac about 18 months ago. Exercising great self-restraint, I will refrain from giving you the usual "Mac-convert" quotes, but I will say that I weep now thinking of all those wasted years and all that unnecessary gnashing of teeth.
RealImages1 is offline   Reply With Quote
Old 11-05-2010, 06:32 AM   #89
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by RealImages1 View Post
In fact, I am running Leopard. It's not having an Intel processor that's the problem. Sigil is not alone in abandoning support for PPCs. Apple themselves now pretty much ignore them as well. So - it's not so much about 'progress' as such - it's more a form of prejudice like racism or sexism. Owning a PPC puts one very firmly on the wrong side of the tracks.
I was about to respond with sensible technical reasons why Sigil dropped support for Tiger and PPC's, but then I read that bolded part, and now I don't see the point anymore. It's so patently absurd it doesn't deserve a response.

Last edited by Valloric; 11-05-2010 at 06:35 AM.
Valloric is offline   Reply With Quote
Old 11-05-2010, 06:26 PM   #90
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 Valloric View Post
I was about to respond with sensible technical reasons why Sigil dropped support for Tiger and PPC's, but then I read that bolded part, and now I don't see the point anymore. It's so patently absurd it doesn't deserve a response.
My sincere apologies, Valloric. I meant no offense. It was supposed to be tongue in cheek. I should have put a smilie there.

Sigil is a great piece of software and it leaves me gobsmacked that you make it available free.

If you can accept my apology, I would actually be very, very interested to learn something about the limitations of PPCs.

Mike

Last edited by RealImages1; 11-05-2010 at 09:19 PM.
RealImages1 is offline   Reply With Quote
Reply

Tags
epub application, epub creation, epub editor, wishlist

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
tools for epub creation Toxaris ePub 15 03-05-2010 05:54 AM
creation tools for Mac? nathanb Workshop 1 09-11-2009 11:33 PM
on-the-fly epub creation ilovejedd ePub 19 04-16-2009 08:36 PM
Half of book missing after running converter tools, ideas? ficbot Other formats 0 04-11-2009 01:42 PM
epub creation tools jbenny ePub 20 03-13-2009 01:30 PM


All times are GMT -4. The time now is 02:11 AM.


MobileRead.com is a privately owned, operated and funded community.