View Single Post
Old 12-05-2013, 04:34 PM   #185
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Automatic correction of invalid html is not going to change. It is the foundation of many robust features in Tweak Book. I find the entire idea of software that refuses to render html because it is not valid XML, ridiculous, it is simply too easy to generate non well formed XML. Fortunately, the larger web development community agrees with me, see HTML5. If ebooks had developed just a few years later, epub would have been based on HTML 5 instead of XHTML and everyone's life would have been a lot better. Remember that Tweak Book is not a epub 2 specific tool, unlike Sigil. Therefore, its fundamental design choices are not going to be limited by epub 2.

And note that auto-correction in Tweak Book is based on the HTML 5 parsing algorithm, therefore the result is exactly what you would get if you viewed the HTML in a browser (and ebook readers are all going to be based on browser engines in the future (indeed most of them already are)).
I still don't agree with you in this point but, hey, you are the coder and I'm just enjoying your work... I'll try to post my point of view once more and then if I do not convince you (probably because your criterion is far more appropriate than mine) I'll shut up forever on this issue

I agree that the automatic tools like Fix HTML, Beautify, Format Converter or even just the default book viewer MUST be fully silent and smart against this kind of syntax errors, solving them on the fly in the best possible way.

But if you are manually tweaking an ebook (epub, azw3, html5 or html234, it doesn't matter), then you are supposed to have some knowledge about what you are doing. And then what you do need is being told that you've made a mistake and where you've made it. You should always have the option to fix it yourself, because the correct fix isn't probably the automated one (as my small previous example showed). Of course, if you really want, you can always perform an automated and silent "Fix HTML" procedure. But I really think that being oblivious of your own bugs because the advanced tweaker doesn't give any kind of feedback is not a "serious" option in a "developer" tool.

And I don't really have any preference in HOW I'm given the warning by the software. Sigil uses a warning text and a rendering stop in that point on the book preview window, but other systems could be more desirable (or not). I just want some kind of advice/warning/whatever over an automatic (and possibly wrong) fix, which I know I can always launch nevertheless.



Now a possible bug. Look at the screenshot of a real CSS. (Forgive my joke with the screenshot name):
  • font-size in line 80 is violet but in line 106 is green
  • After the font-size in 80 you have ":" in blue italics. In every other place they are violet. The value "small" is also blue. And the ending semicolon is also different.
  • Look at the multi coloured page-break-before in line 97

EDITED

And another possible bug. Look at the other screenshot which shows the default Calibre Viewer and the File Viewer included in the tool.
  • The embedded font is not being used. CharisWhatever.ttf.
  • The "A Fire Upon The Deep" paragraph has a page-break-before: always; which is also being ignored. Look at the inspector.
Attached Thumbnails
Click image for larger version

Name:	Rainbow ;-).jpg
Views:	265
Size:	434.7 KB
ID:	116269   Click image for larger version

Name:	Book View.jpg
Views:	256
Size:	511.2 KB
ID:	116270  

Last edited by arspr; 12-05-2013 at 05:11 PM. Reason: Another possible bug
arspr is offline