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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-30-2010, 11:50 AM   #1
John Everett
Junior Member
John Everett began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2010
Device: Apple iPad
Automating splitting at Chapter Breaks

Hi folks.

I am a new arrival, and new to Sigil, having used Calibre to make 100+ epub ebooks thus far.

When my iPad arrived finally, I found that that the epubs did not look as good as some others (more professionally made, I presumed), with lots of letters losing their lowest part (descenders), which got transferred to the top line of the next page. Messy.

This problem has vanished when compiling the same strict XHTML source files in Sigil.

But ...

Unless I am missing a trick, I have to hit the Add Chapter Break button manually at the start of each chapter, and this adds a new file nicely. OK when there are not too many chapters, but the next book I want to compile has over 70 short chapters.

My chapter headings in the XHTML source are all enclosed in <h2> tags. What I would love is an automation of my manual work: every <h2> tag (could equally easily be <h3>) gets the Chapter Break stuff added by just pressing a button, and the file splitting just happens while I watch.

Any thoughts, anyone?

John
John Everett is offline   Reply With Quote
Old 05-30-2010, 12:08 PM   #2
Catire
Lord of the Universe
Catire ought to be getting tired of karma fortunes by now.Catire ought to be getting tired of karma fortunes by now.Catire ought to be getting tired of karma fortunes by now.Catire ought to be getting tired of karma fortunes by now.Catire ought to be getting tired of karma fortunes by now.Catire ought to be getting tired of karma fortunes by now.Catire ought to be getting tired of karma fortunes by now.Catire ought to be getting tired of karma fortunes by now.Catire ought to be getting tired of karma fortunes by now.Catire ought to be getting tired of karma fortunes by now.Catire ought to be getting tired of karma fortunes by now.
 
Catire's Avatar
 
Posts: 670
Karma: 737849
Join Date: Jan 2008
Location: Maturin , Venezuela
Device: Sony Reader PRS-505 / PSP
Have you tried using search and replace across multiple files along with chapter markers?


Search :
<h2>

Replace :
<hr class="sigilChapterBreak" />
<h2>


and after that just press f6 or go to Tools>Split on Chapter markers.

Edit: Welcome to mobileread

Last edited by Catire; 05-30-2010 at 01:07 PM.
Catire is offline   Reply With Quote
Advert
Old 05-30-2010, 12:14 PM   #3
Pablo
Guru
Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.
 
Pablo's Avatar
 
Posts: 970
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
Go to Code view and replace <h2 with <hr class="sigilChapterBreak" /><h2 and after that go to Tools -> Split on SGF Chapter Markers.

Edit: Catire, that was fast!!!
Pablo is offline   Reply With Quote
Old 05-30-2010, 02:12 PM   #4
John Everett
Junior Member
John Everett began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2010
Device: Apple iPad
Alas

I have tried that.

The text is a full length novel, and Sigil went into a trance when I tried saving the epub.

If I manually do the splitting, the compiling takes just a few seconds.

John
John Everett is offline   Reply With Quote
Old 05-30-2010, 06:36 PM   #5
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,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by John Everett View Post
The text is a full length novel, and Sigil went into a trance when I tried saving the epub.
If Sigil hung, try to make the procedure repeatable. Then report it on the tracker so it can get fixed. See this for more information.
Valloric is offline   Reply With Quote
Advert
Old 05-30-2010, 11:39 PM   #6
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by John Everett View Post
Quote:
Originally Posted by Pablo View Post
Go to Code view and replace <h2 with <hr class="sigilChapterBreak" /><h2 and after that go to Tools -> Split on SGF Chapter Markers.
I have tried that.

The text is a full length novel, and Sigil went into a trance when I tried saving the epub.
This is very odd, do you have the latest version of Sigil, 0.2.0? Checking the Help - About window won't let you know if you have 0.2.0 or one of the betas because betas and release candidates were all identified in this window as Sigil 0.2.0. If in doubt install the latest version from here.

Basic search and replace (on full length novels) like the example above is 85% of what I use Sigil for and thus far it has preformed great. I have never used the Tools -> Split on SGF Chapter Markers feature.

Are you saying the search and replace (selecting all HTML files) worked and the Split on SGF Chapter Markers worked but it locked up when went to save the ePub?

Good luck working with Valloric to identify the bug you're running into to.

Last edited by DoctorOhh; 05-30-2010 at 11:52 PM.
DoctorOhh is offline   Reply With Quote
Old 05-30-2010, 11:57 PM   #7
John Everett
Junior Member
John Everett began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2010
Device: Apple iPad
Possible Solution

I have just replicated, then cured, the process I described above.

I created an xhtml file with 70+ explicit sigil Chapter Breaks, entered the Metadata, approved the default TOC (70+ <h2> tags), and then pressed the 'Split on Chapter Breaks' button in Tools.

Attempted the compile. Result - hanging.

Closed Sigil. Started again.

Same xhtml file exactly. Same as above, except this time I did a CLT A to the whole source file in Code View to bring it all looking green before I did the 'Split on Chapter Breaks' thing.

This time it compiled in seconds!

Phew!!

This was a relatively short file BTW. The epub is only 83kb.

I need to work on this a bit more. I deliberately left out any CSS file, and the only tags used in the whole thing were <h1> <h2> <p> and the <hr class="sigilChapterBreak" />

In due course I may be able to add more.

John
John Everett is offline   Reply With Quote
Old 05-31-2010, 04:17 AM   #8
John Everett
Junior Member
John Everett began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2010
Device: Apple iPad
Further down the line

I have recompiled a few more source files, using CTL A to engage the whole source file before using F6 to Split on Chapter Breaks, and can confirm that the result is perfect: a surprisingly quick 'Save as epub' outcome.

So I am now committed to Sigil for the rest of my source files.

Suggested area for development: could the load be a little quicker, and could the default opening View be Code View? It is obvious that the loading is doing a lot of work, and if this cannot be speeded up, perhaps some kind of progress indicator could be added to reassure one that the program is not hanging.

However, this is not a complaint.

Many thanks for this product and this forum.

John
John Everett is offline   Reply With Quote
Old 05-31-2010, 09:41 AM   #9
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,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by John Everett View Post
I created an xhtml file with 70+ explicit sigil Chapter Breaks, entered the Metadata, approved the default TOC (70+ <h2> tags), and then pressed the 'Split on Chapter Breaks' button in Tools.

Attempted the compile. Result - hanging.
Please create an issue on the tracker with this information and the original xhtml/epub file. If I can see it hang, I can fix it.
Valloric is offline   Reply With Quote
Old 06-01-2010, 02:53 AM   #10
John Everett
Junior Member
John Everett began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2010
Device: Apple iPad
Not hanging any more

I have found that I cannot get it too hang any more.

So I am not able to create a bug report.

The product is fine in my view.

John
John Everett is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre making unwanted chapter breaks PatNY Calibre 6 10-08-2010 09:58 PM
Remove Chapter Breaks and Search an Entire Document Marcy Sigil 6 04-15-2010 12:11 PM
Help w/ Chapter Breaks pastorjamie Calibre 1 02-25-2010 07:30 PM
Adding chapter breaks by number of pages/lines raptir Calibre 8 10-22-2009 12:11 PM
html2epub: chapter splitting on more than 1 heading level Portnull Calibre 1 06-25-2009 09:17 AM


All times are GMT -4. The time now is 08:48 AM.


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