08-24-2010, 10:03 PM | #1 |
Zennist
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? |
08-24-2010, 10:13 PM | #2 |
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. |
Advert | |
|
08-25-2010, 12:10 AM | #3 | ||
Zennist
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
|
Quote:
Quote:
Code:
Don’t tell me it’s<span class="italic">my</span>fault. |
||
08-25-2010, 12:24 AM | #4 | |
Well trained by Cats
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:
Italics is not a "pre-defined" Style" Code:
.italics{ font-style: italic } |
|
08-25-2010, 03:23 AM | #5 |
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! |
Advert | |
|
08-25-2010, 03:28 AM | #6 | ||
Nameless Being
|
epub TOC concern
Quote:
Quote:
|
||
08-25-2010, 08:17 AM | #7 | |
Zennist
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:
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 & Flow </span> </h2> </div> 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? |
|
08-25-2010, 08:38 AM | #8 | ||
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Quote:
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 & Flow</h3> |
||
08-25-2010, 08:45 AM | #9 |
Wizard
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 & Flow </span> </h2> </div> If you're using span class="italic" in the code then you definitely need a corresponding selector in your css. |
08-25-2010, 10:27 AM | #10 |
Zennist
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
|
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.
|
08-25-2010, 11:13 AM | #11 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
08-25-2010, 11:35 AM | #12 |
Zennist
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. |
08-25-2010, 01:10 PM | #13 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
08-25-2010, 03:41 PM | #14 |
Guru
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.
|
08-25-2010, 04:52 PM | #15 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
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. |
|
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 |