Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-24-2010, 10:03 PM   #1
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Opening ePub in Sigil breaks TOC and loses italics

I'm having a problem whereby simply opening up a certain ePub file, the TOC becomes un-nested and the italics in the book are lost. The only editing I did was to add an extra line of space between one of the headers and the body text in one of the sections before the book starts. And I know it's not the edit that "broke" things because before I do any edits and check the TOC in the TOC editor I can see how the TOC has already been changed. So something is being done upon import.

The epub file is one converted by Calibre from an original epub.

Does anyone have any idea what can be going on?
PatNY is offline   Reply With Quote
Old 08-24-2010, 10:13 PM   #2
shall1028
Nameless Being
 
Two (X)HTML excerpts from the original epub file (not imported into Sigil) would be useful.

1) two heading lines that should be nested in the TOC

e.g.

<some-tag>This heading should be the parent</some-tag>
<some-other-tag>This one should be the child</some-other-tag>

2) an excerpt of some words that should be italicized with some unitalicized ones each side.

e.g.

this is in Roman and <some-font-changing>this is Italics</some-font-changing>; of course we're back to Roman.
  Reply With Quote
Advert
Old 08-25-2010, 12:10 AM   #3
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Quote:
Originally Posted by shall1028 View Post
Two (X)HTML excerpts from the original epub file (not imported into Sigil) would be useful.

1) two heading lines that should be nested in the TOC

e.g.

<some-tag>This heading should be the parent</some-tag>
<some-other-tag>This one should be the child</some-other-tag>;
Sorry, forgot to mention it is the metadata TOC that is being broken. To be honest I rarely use an in-line TOC and often ignore or delete it. Will it help if I send someone the file to diagnose?

Quote:
2) an excerpt of some words that should be italicized with some unitalicized ones each side.

e.g.

this is in Roman and <some-font-changing>this is Italics</some-font-changing>; of course we're back to Roman.
Here's an excerpt from the file where the italics are lost upon import:

Code:
Don’t tell me it’s<span class="italic">my</span>fault.
PatNY is offline   Reply With Quote
Old 08-25-2010, 12:24 AM   #4
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: 30,441
Karma: 58055868
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
[CODE
Don’t tell me it’s<span class="italic">my</span>fault.[/CODE]
is there a class ".italics" in the style sheet?
Italics is not a "pre-defined" Style"

Code:
.italics{
  font-style: italic
}
theducks is online now   Reply With Quote
Old 08-25-2010, 03:23 AM   #5
shall1028
Nameless Being
 
Me like specifying italics with the italics tag <i> (who'd a thunk it?) or at the very least the emphasis <em> tag.

Don’t tell me it’s <i>my</i> fault.

Phooey on SPAN! Double PHOOEY on SPAN plus a class!
  Reply With Quote
Advert
Old 08-25-2010, 03:28 AM   #6
shall1028
Nameless Being
 
epub TOC concern

Quote:
To be honest I rarely use an in-line TOC and often ignore or delete it.
By in-line I suspect you mean as part of an HTML file and I agree that with an epub file having a table of contents ability an in HTML TOC is pointless.

Quote:
Sorry, forgot to mention it is the metadata TOC that is being broken.
I did expect this to be what you meant. I was looking for the headings examples as Sigil will compose the epub TOC from them auto-magically.
  Reply With Quote
Old 08-25-2010, 08:17 AM   #7
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
theducks, I looked at the css and there is no class ".italics" defined there. But Calibre has no problems reading or converting the epub while maintaining italics so why should Sigil?

I also need to correct something I said earlier. The italics are still there when I open the epub in Sigil. It's when saving an epub in Sigil that they are lost. The metadata TOC, however, is changed immediately upon opening in Sigil.


Quote:
Originally Posted by shall1028 View Post
I was looking for the headings examples as Sigil will compose the epub TOC from them auto-magically.
Ok, here is what the coding looks like for the headings that are in the TOC:

heading top level:

Code:
<div class="partHead" id="ph01">
				<h2 class="partNumber" style="text-indent: 0%;">
					<span class="bold">
						Part 1
					</span>
				</h2>
				<h2 class="partTitle" style="text-indent: 0%;">
					<span class="bold">
						Memories Are Like Raindrops
					</span>
				</h2>
			</div>

heading next level:

Code:
<div class="chapterHead">
				<h2 class="chapterNumber" style="text-indent: 0%;">
					<span class="bold">
						1
					</span>
				</h2>
				<h2 class="chapterTitle" style="text-indent: 0%;">
					<span class="bold">
						Ebb &amp; Flow
					</span>
				</h2>
			</div>
The TOC should look like this (and does in Calibre & on my Touch):

Part 1: Memories Are Like Raindrops
1. Ebb & Flow


But in Sigil, immediately upon opening up the file, it looks like:

Part 1
Memories Are Like Raindrops
1
Ebb & Flow


All I wanted to do was to put some extra space between the chapter headings and the body text in this epub file. I discovered pdfhtml inspector last night and it will let me do it without messing up the TOC and italics, but it's not as user-friendly as Sigil. I much prefer Sigil for its wysiwyg interface.

So is there an easy fix that will let me use Sigil?
PatNY is offline   Reply With Quote
Old 08-25-2010, 08:38 AM   #8
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 PatNY View Post
theducks, I looked at the css and there is no class ".italics" defined there. But Calibre has no problems reading or converting the epub while maintaining italics so why should Sigil?

I also need to correct something I said earlier. The italics are still there when I open the epub in Sigil. It's when saving an epub in Sigil that they are lost.
Create a new issue on the tracker and attach the epub so that I can take a look at what's going on.

Quote:
Originally Posted by PatNY View Post
The metadata TOC, however, is changed immediately upon opening in Sigil.
As the manual says, Sigil creates the TOC from the headings in the text (like MS Word and OO Writer). Support for direct NCX preservation is forthcoming.

To get this in Sigil:

Part 1: Memories Are Like Raindrops
1. Ebb & Flow

you would use something like this:

Code:
<h2>Part 1: Memories Are Like Raindrops</h2>
<h3>1. Ebb &amp; Flow</h3>
You can put spans around parts of the text if you want to style them differently, and if you want to indent the <h3>, use an element/class style.
Valloric is offline   Reply With Quote
Old 08-25-2010, 08:45 AM   #9
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Sigil refactors the ToC based on the semantics of the html.

This means that your heading elements must use h tags to indicate the level. Since all the headings in your example are h2 tags, they will all end up on the same ToC level as you found. Furthermore, each individual h tag will generate a new ToC entry.

Your code needs to look like this:
Code:
<div class="partHead" id="ph01">
				<h1 class="partNumber" style="text-indent: 0%;">
					<span class="bold">
						Part 1<br />
						Memories Are Like Raindrops
					</span>
				</h1>
			</div>
<div class="chapterHead">
				<h2 class="chapterNumber" style="text-indent: 0%;">
					<span class="bold">
						1<br />
						Ebb &amp; Flow
					</span>
				</h2>
			</div>
If your headings all use the same format then it's easy to change this globally with a couple of regular expressions.

If you're using span class="italic" in the code then you definitely need a corresponding selector in your css.
charleski is offline   Reply With Quote
Old 08-25-2010, 10:27 AM   #10
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Quote:
Originally Posted by Valloric View Post
Create a new issue on the tracker and attach the epub so that I can take a look at what's going on.
The epub is under copyright. Do I need to add a "private" label as mentioned in the wiki? If so, where? I don't see a "label box" on the issue form that was mentioned in the wiki.
PatNY is offline   Reply With Quote
Old 08-25-2010, 11:13 AM   #11
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 PatNY View Post
The epub is under copyright. Do I need to add a "private" label as mentioned in the wiki? If so, where? I don't see a "label box" on the issue form that was mentioned in the wiki.
At the bottom of the form where it says "Labels:".
Valloric is offline   Reply With Quote
Old 08-25-2010, 11:35 AM   #12
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
At the bottom of the form window it just says:

Please provide any additional information below. If your source file
(SGF/EPUB/HTML/etc) is required to fully understand the problem, please
attach it to this issue. Read the ReportingIssues wiki page before
submitting!

Am I at the wrong place?

This is where I am trying to submit the report:

http://code.google.com/p/sigil/issues/entry

Or is it a Firefox issue?

I see no label box.
PatNY is offline   Reply With Quote
Old 08-25-2010, 01:10 PM   #13
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 PatNY View Post
I see no label box.
Me being the project owner, this screenshot probably has several fields you don't have when you open the form, but you should certainly be able to see the label boxes (in red). Other users have used them successfully.

Valloric is offline   Reply With Quote
Old 08-25-2010, 03:41 PM   #14
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
Actually Valoric for us it appears at the top (see attached image). Click on the highlighted drop-down and you will find the privacy option.
Attached Thumbnails
Click image for larger version

Name:	sigil.jpg
Views:	416
Size:	86.6 KB
ID:	57144  
ghostyjack is offline   Reply With Quote
Old 08-25-2010, 04:52 PM   #15
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 ghostyjack View Post
Actually Valoric for us it appears at the top (see attached image). Click on the highlighted drop-down and you will find the privacy option.
Oh frigging hell, now I remember I changed things a couple of months ago. Thanks for the heads up, and apologies to PatNY. The wiki needs updating.

Last edited by Valloric; 08-25-2010 at 04:57 PM.
Valloric is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Epub to Epub loses TOC edbro Calibre 6 10-12-2010 05:24 PM
Calibre ePub TOC and Sigil salasnet Calibre 3 09-26-2010 06:34 PM
Sigil loses all text after an html error grumbles Sigil 3 05-13-2010 11:28 AM
PDF conversion breaks links, TOC ToddA Calibre 3 02-06-2010 05:43 AM
sigil and toc bobcdy Sigil 5 10-17-2009 05:29 PM


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


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