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 07-29-2011, 05:01 AM   #1
StevenLin
Member
StevenLin began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2011
Device: none
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). Click image for larger version

Name:	pic 2.JPG
Views:	138
Size:	101.7 KB
ID:	74905
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. Click image for larger version

Name:	pic 3.JPG
Views:	139
Size:	89.8 KB
ID:	74906
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. Click image for larger version

Name:	pic 4.JPG
Views:	136
Size:	125.0 KB
ID:	74907 Click image for larger version

Name:	pic 5.JPG
Views:	119
Size:	169.5 KB
ID:	74908
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?
StevenLin is offline   Reply With Quote
Old 07-29-2011, 06:04 AM   #2
sourcejedi
Groupie
sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.
 
sourcejedi's Avatar
 
Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: FBReader/OpenInkpot on Hanvon N516.
I can answer the very first part of your question. The long answer is that

<![CDATA[
]]>

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

/*<![CDATA[*/

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 06:11 AM.
sourcejedi is offline   Reply With Quote
 
Enthusiast
Old 07-29-2011, 12:49 PM   #3
theducks
Grand Sorcerer
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: 14,432
Karma: 5560777
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by StevenLin View Post
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 CDATA is from Sigil. Note the SGC tag definitions.
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)
theducks is offline   Reply With Quote
Old 07-29-2011, 01:15 PM   #4
Jabby
Jr. - Junior Member
Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.
 
Posts: 569
Karma: 2000170
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.

Thanks all!

Regards- John
Jabby is offline   Reply With Quote
Old 07-30-2011, 11:57 AM   #5
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,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
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 &amp; 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.
charleski is offline   Reply With Quote
Old 08-01-2011, 12:42 AM   #6
StevenLin
Member
StevenLin began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2011
Device: none
Thanks to all of you!!! You have been great help to my problem.
StevenLin 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
Sigil 0.3.4 / Problème CSS entre Sigil et iPad Grivels Software 10 07-03-2011 09:06 AM
Weird formatting issues - Sigil .epub in Calibre viewer december Sigil 9 06-18-2010 04:04 PM
Other Non-Fiction Chesterton, G K: All Things Considered, v1, 8 February 2010. Patricia Kindle Books 2 02-07-2010 10:42 PM
Other Non-Fiction Chesterton, G K: All Things Considered, v1, 8 February 2010. Patricia BBeB/LRF Books 0 02-07-2010 09:57 PM
Can ebooks be considered like iphone 'apps' ? pakiyabhai News 4 12-11-2009 01:11 PM


All times are GMT -4. The time now is 02:24 AM.


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