![]() |
#1 |
Nameless Being
|
Weird formatting issues - Sigil .epub in Calibre viewer
All right, I've been beating my head against this for most of the day with no success, so I'm calling in the cavalry - maybe someone here can help! I'm not really sure whether this best classifies as a Sigil or a Calibre problem, but I'll try here first.
Here's my problem: I hand-created an .epub file in Sigil, nothing too fancy - just some chapters and a single stylesheet. Everything looks great in Sigil... but when I try to open the .epub in the Calibre viewer (and subsequently try to convert it to .mobi), it seems to be stripping off all my formatting from my "special" paragraph tags -- any italicized, center-aligned, etc. classes are all made plain and indented on the left, just like my normal paragraphs. Changing these classes to h1, h2, etc. settings (in other words, replacing a <p class="title"> with an <h2 class="title"> designation) will make the font larger, but doesn't fix the 'stripping' problem (i.e., I just have large text that is still left-aligned and non-italicized). I've attached the .epub file here in case anyone wants to see the original code. Thanks for any help you can provide! |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
You put the style code in the CDATA section, which means it gets ignored.
I fixed it for you and also fixed the text-indent problem and a filename issue, but you need to add another selector with text-indent: 0 and use it for the opening paragraphs. (I still use the old version of Sigil so the organisation of the files will be a bit different). |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Nameless Being
|
So that's what 'CDATA' means! It kept auto-inserting itself into any copy/pasted style code so insistently that I just gave up and left it alone, assuming it was something Sigil found important for some reason. (Can you tell it's my first time working with .epub?
![]() Thank you so much for the help! I will work on the borked selectors and hopefully get this thing working this time. |
![]() |
![]() |
#4 | |
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 519
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
|
The weird thing is, the CDATA is not visible in Code view.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
![]() |
![]() |
![]() |
#7 | |
Reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 519
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
|
Quote:
The following code: Code:
<style type="text/css"> /*<![CDATA[*/ <link rel="stylesheet" type="text/css" href="../Styles/StyleNovel.css"/> /*]]>*/ </style> Code:
<style type="text/css"> /**/ <link rel="stylesheet" type="text/css" href="../Styles/StyleNovel.css"/> /**/ </style> |
|
![]() |
![]() |
![]() |
#8 |
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
You mean the CDATA is there before loading, is not there in Sigil, and then reappears when you save the book?
|
![]() |
![]() |
![]() |
#9 |
Reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 519
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
|
Yes, that's exactly what happens.
|
![]() |
![]() |
![]() |
#10 |
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
I'll have to take a better look at it then.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre ePub TOC and Sigil | salasnet | Calibre | 3 | 09-26-2010 05:34 PM |
Image AR in Calibre EPUB Viewer | Starson17 | Calibre | 2 | 08-15-2010 05:58 PM |
ePub-Sigil-Calibre-Sony PRS505 | dicknskip | Calibre | 20 | 06-10-2010 03:58 PM |
Book Error In Sigil After Calibre Conversion (from lit to epub) | Guns4Hire | Sigil | 13 | 03-05-2010 05:02 PM |
Formatting issues when converting PDF to EPUB | raptir | Calibre | 2 | 10-21-2009 10:32 PM |