01-16-2014, 07:04 PM | #1 |
Gregg Bell
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. |
01-16-2014, 07:21 PM | #2 |
Ex-Helpdesk Junkie
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. |
Advert | |
|
01-16-2014, 07:41 PM | #3 |
Grand Sorcerer
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.
|
01-16-2014, 08:07 PM | #4 |
Ex-Helpdesk Junkie
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?
|
01-16-2014, 08:36 PM | #5 |
Grand Sorcerer
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. |
Advert | |
|
01-16-2014, 10:21 PM | #6 |
creator of calibre
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. |
01-17-2014, 03:59 AM | #7 |
Wizard
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. |
01-17-2014, 04:27 AM | #8 |
creator of calibre
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 |
01-17-2014, 06:33 AM | #9 |
Grand Sorcerer
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. |
01-17-2014, 07:23 AM | #10 | ||
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
Quote:
Now, the DOCTYPE is not required to have a DTD, but that is another discussion. |
||
01-17-2014, 07:36 AM | #11 |
creator of calibre
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. |
01-17-2014, 07:53 AM | #12 |
Grand Sorcerer
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
|
01-17-2014, 08:14 AM | #13 |
creator of calibre
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 |
01-17-2014, 08:30 AM | #14 | |
frumious Bandersnatch
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:
|
|
01-17-2014, 08:57 AM | #15 |
Grand Sorcerer
Posts: 27,464
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
  instead of | Alt68er | Sigil | 16 | 01-02-2014 08:02 PM |
Use of for spacing | Ripplinger | Sigil | 11 | 11-25-2012 04:36 AM |
iBooks does NOT LIKE | Erin | Apple Devices | 0 | 09-13-2011 11:17 AM |