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 01-16-2014, 07:04 PM   #1
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
Posts: 2,255
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
  issue in 0.7.2

eschwartz in another thread said:

One issue you probably DO care about is 0.7.2 converted   into a regular space, thus breaking the blank paragraphs sometimes used as scene breaks. That was fixed in 0.7.3

I went (I'm using 0.7.2) and experimented with this, and it seemed to me that the non-breaking spaces were functioning like they always did. I've enclosed three screenshots, showing:

1) a simple   functioning as a break between paragraphs

2) the  s used in my asterisks

3) the css style sheet for the asterisks

It all seems normal to me or am I missing something?

As a side question: On that style sheet screen shot, those two things I've circled in blue (someone else did this style sheet for me). Why are those comments even in there? I mean, doesn't the style sheet (as long as it's linked) apply uniformly?

Thanks.
Attached Thumbnails
Click image for larger version

Name:	nbsp1.JPG
Views:	204
Size:	217.1 KB
ID:	118027   Click image for larger version

Name:	nbsp2.JPG
Views:	195
Size:	215.1 KB
ID:	118028   Click image for larger version

Name:	nbsp3.JPG
Views:	199
Size:	178.5 KB
ID:	118029  
Gregg Bell is offline   Reply With Quote
Old 01-16-2014, 07:21 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Well, I base this all on what I've heard, but I believe the problem happens with multiple saving instances.

As far as the comments on the css, I would guess your source grouped the styles according to where they are used -- i.e. the "Title Page only CSS" will apply anywhere that class is used, but it is only being used (theoretically) in the title page. And same goes for the ToC only css.

In other words, it is a suggestion that those styles should be used exclusively for formatting the title page. Some non-DRM'ed books I've gotten do similar things in the stylesheet. Personally, I would think there is greater clarity (and safety) in making three stylesheets, then linking each one where they belong, but who says life has to make sense?

Perhaps someone else will pop up here to elucidate the matter further. I just play with the books I've bought -- other people here (like you) do this for a living and have far more experience with Sigil.

Last edited by eschwartz; 01-16-2014 at 07:23 PM.
eschwartz is offline   Reply With Quote
Advert
Old 01-16-2014, 07:41 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,464
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
0.7.2 had/has no issues with the nbsp entity. It was the UTF-8 non-breaking space character that was being converted to a normal space.
DiapDealer is offline   Reply With Quote
Old 01-16-2014, 08:07 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Didn't it transform the   into the unicode character, and then next time you open it, it converted from unicode to a normal space?
eschwartz is offline   Reply With Quote
Old 01-16-2014, 08:36 PM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,464
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Not that I'm aware of.

I remember an isolated report of something like that occurring with 0.7.4 on a Mac (the Mac build uses a beta version of Qt5), but I couldn't duplicate it on Windows or Linux. It had something to with generating the ToC if I recall.

Last edited by DiapDealer; 01-16-2014 at 08:39 PM.
DiapDealer is offline   Reply With Quote
Advert
Old 01-16-2014, 10:21 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Here is the problem, which I had to navigate myself while making Edit Book for calibre:

1) Qt internally converts the unicode nbsp character u+00a0 into normal spaces, when extracting text from QPlainTextEdit. This can be worked around by overriding appropriate methods in the QPlainTextEdit sub-class

2) Instead of doing the overwriting Sigil chose to convert unicode nbsp into   to workaround the bug

3) Named entities like   are invalid in XHTML without a proper doctype

4) Therefore Sigil before 0.7.3 could take a valid epub and by converting the nbsp characters into named entities render it invalid (if it did not declare a doctype, which is optional and many epubs do not). Of course this "invalidity" was only with respect to the useless epubcheck. The epubs continued to work fine in all actual epub readers.

5) This was fixed by converting the nbsp characters into *numeric* instead of named entities in Sigil 0.7.3

The best approach is of course to fix Qt as I did for Edit Book, but I dont know if any Sigil developers have any interest in doing that.
kovidgoyal is offline   Reply With Quote
Old 01-17-2014, 03:59 AM   #7
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Actually, for XHTML a doctype is mandatory. Which one is another discussion. I always add them in an ePUB2 because it makes my life easier. The automatic removal of those in the calibre editor is a no-go for me personally.

Sent from my Nexus 5 using Forum Fiend v1.1.5.
Toxaris is offline   Reply With Quote
Old 01-17-2014, 04:27 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, it is not mandatory, and in fact since the XML spec allows XML processors to not load externally defined DTDs, using it is unsafe in combination with named entities.

http://www.whatwg.org/specs/web-apps...html-documents
kovidgoyal is offline   Reply With Quote
Old 01-17-2014, 06:33 AM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,464
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Kovid's explanation of what happened is correct. It documents what happened from 0.7.2 to 0.7.4.

If, however (for the O.P.), your source does not make use of any non-breaking space characters (which it seems like it doesn't), 0.7.2 isn't going to cause you any issues in that regard. Your nbsp entities are safe.

0.7.3 was an attempt to fix the issue, but unfortunately introduced the problem where xhtml without a doctype (valid xhtml, mind you) was being invalidated by converting the non-breaking space characters to entities (with no regard for whether that conversion needed a DTD present to be valid).

0.7.4 was released to alleviate the doctype conundrum that 0.7.3 unwittingly introduced.

@Kovid. Any quick pointers to examples of the QPlainTextEdit subclass method overrides you mentioned? I've not even peeked yet at your code for calibre's edit-book, so even a file-name to get me in the right locale would be considered a great boon.

Last edited by DiapDealer; 01-17-2014 at 06:37 AM.
DiapDealer is offline   Reply With Quote
Old 01-17-2014, 07:23 AM   #10
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by kovidgoyal View Post
No, it is not mandatory, and in fact since the XML spec allows XML processors to not load externally defined DTDs, using it is unsafe in combination with named entities.

http://www.whatwg.org/specs/web-apps...html-documents
Sorry, I don't agree. On the W3schools site it clearly says about XHTML:
Quote:
* XHTML DOCTYPE is mandatory
*The XML namespace attribute in <html> is mandatory
This is clearly stated on the W3schools site: http://www.w3schools.com/html/html_xhtml.asp

Now, the DOCTYPE is not required to have a DTD, but that is another discussion.
Toxaris is offline   Reply With Quote
Old 01-17-2014, 07:36 AM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@DiapDealer: editor/text.py

@Toxaris: I linked you to whatwg.org -- the "official" html 5 spec. w3schools is just a random site on the internet. Choose whom you wish to trust.
kovidgoyal is offline   Reply With Quote
Old 01-17-2014, 07:53 AM   #12
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by kovidgoyal View Post
@Toxaris: I linked you to whatwg.org -- the "official" html 5 spec. w3schools is just a random site on the internet. Choose whom you wish to trust.
Actually, both the W3C and WHATWG have published specs, and according to the W3C HTML5 CR, "A DOCTYPE is a required preamble."
Doitsu is offline   Reply With Quote
Old 01-17-2014, 08:14 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The W3C also says:

"DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a different rendering mode that is incompatible with some specifications. Including the DOCTYPE in a document ensures that the browser makes a best-effort attempt at following the relevant specifications."

Since no ebook reading software I know of requires or uses a DOCTYPE for anything at all, I'd go with the WHATWG on this one.

Not to mention that the DOCTYPE the W3C reuires is <!DOCTYPE html> not the XHTML doctypes.

In any case, I am done trying to convince people, IMO DOCTYPEs are obsolete. You are welcome to reach that conclusion at your own pace
kovidgoyal is offline   Reply With Quote
Old 01-17-2014, 08:30 AM   #14
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
XHTML and HTML 5 are two different things.

But it doesn't matter for ePub 2.0.1, because it does not require XHTML documents to be valid XHTML:

Quote:
1.4.1.2: XHTML Content Document Requirements

A conformant XHTML Content Document must meet these conditions:
it is a well-formed XML document (as defined by XML 1.0); and
it is encoded in UTF-8 or UTF-16; and
it is a valid XML document according to the NVDL schema interaction provided in Appendix A; and
it has a MIME media type of either application/xhtml+xml or text/x-oeb1-document (deprecated); and
all XHTML elements and attributes not contained in an Inline XML Island are drawn from the XHTML subset identified in this document.
It says it must be valid XML (not XHTML), and with some restrictions on the XHTML contents.
Jellby is offline   Reply With Quote
Old 01-17-2014, 08:57 AM   #15
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,464
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by kovidgoyal View Post
@DiapDealer: editor/text.py
Thank you so much.
DiapDealer 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
&#160; instead of &nbsp; Alt68er Sigil 16 01-02-2014 08:02 PM
Use of &nbsp; for spacing Ripplinger Sigil 11 11-25-2012 04:36 AM
iBooks does NOT LIKE &nbsp; Erin Apple Devices 0 09-13-2011 11:17 AM


All times are GMT -4. The time now is 05:57 PM.


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