|07-29-2011, 06:01 AM||#1|
Join Date: Jan 2011
Are these considered weird in Sigil?
I have been using Sigil for half a year now, and these strange things keep happening. Therefore, I decided to take the pictures of them and posted them here, hoping someone more experienced can answer for me why these are happening.
The first problem is illustrated in pic2 (please see the red circles I created).
After I pasted the document into a new Sigil file, I went to the Source Code View and found the strange things I marked in the red circles. What are these, and are they needed?
The second problem is illustrated in pic3.
After I left and entered the Source Code View several times, I discovered that this area was getting bigger with nothing showing up! What's going on?
The third problem is illustrated in pic4 and pic5.
I discovered that each time I inserted a picture, something like what I circled in red would appear before the picture document. I then found out that it did was to "normalize" the properties of the picture file. So again, is something like this normal?
|07-29-2011, 07:04 AM||#2|
Join Date: Dec 2009
Device: FBReader/OpenInkpot on Hanvon N516.
I can answer the very first part of your question. The long answer is that
looks pretty normal. It means the inline CSS can include stuff like this comment:
/* nested <i> tags */
without having the <i> interpreted as a HTML tag, which would cause an error because there's no closing </i> tag. (But it can't then include a literal "]]>", because that's how the end of the CDATA section is marked).
The CSS comment markers around it
are not strictly necessary. They're used to avoid making invalid HTML - CDATA is an XHTML-specific feature. (In HTML syntax, you can put anything except </style> inside a <style> tag). But this is EPUB, so it should always be parsed as XHTML.
The short answer is: best practice is _not_ to use inline stylesheets. If you can put your CSS in an external stylesheet
<link rel="stylesheet" type="text/css" href="..." />
then you won't have to worry about all these issues about mixing CSS and XML/HTML. It might well also stop Sigil (or whatever) inserting all those blank lines.
Last edited by sourcejedi; 07-29-2011 at 07:11 AM.
|07-29-2011, 01:49 PM||#3|
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
They are created if you use a Sigil styling button (Bold,Italic,Center...)
I also believe Sigil inserts a SGC-# for embedded Italics (renderer work around?)
The Gap: Tidy ON (the brush) switch to BV then back. Presto! Closed up.
(but I think you found a cosmetic bug, it should not grow over time)
I have not seen your 3rd problem (I use JPG's)
|07-29-2011, 02:15 PM||#4|
Jr. - Junior Member
Join Date: Aug 2010
Location: East Texas
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
I never knew what all that stuff was but I learned early on that it could be deleted with seeming impunity.
The "Tidy" tip will be useful to get rid of the growing line feeds.
|07-30-2011, 12:57 PM||#5|
Join Date: Sep 2009
I've just submitted a fix for the CDATA issue, though this will need to come back when Sigil moves to ePub 3 because of the scripting it allows. If you need to use 'magic' characters in a style header then use the entity name instead. For css this really only means using & instead of & in urls, but when scripting comes in Sigil will have to revert to wrapping then in CDATAs again.
I've not seen the 3rd thing you mention. The best thing would be to open an issue on the tracker and (most importantly) attach an example ePub where you see this happening.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Sigil 0.3.4 / Problème CSS entre Sigil et iPad||Grivels||Software||10||07-03-2011 10:06 AM|
|Weird formatting issues - Sigil .epub in Calibre viewer||december||Sigil||9||06-18-2010 05:04 PM|
|Other Non-Fiction Chesterton, G K: All Things Considered, v1, 8 February 2010.||Patricia||Kindle Books||2||02-07-2010 11:42 PM|
|Other Non-Fiction Chesterton, G K: All Things Considered, v1, 8 February 2010.||Patricia||BBeB/LRF Books||0||02-07-2010 10:57 PM|
|Can ebooks be considered like iphone 'apps' ?||pakiyabhai||News||4||12-11-2009 02:11 PM|