Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-16-2020, 04:27 AM   #16
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
So, to get the expected behavior (like that of a W3C compliant browser) you have to add a specific Qt CSS property ?! (or to be exact, kept)
...
Whoah.
Great.
Absolutely obvious.
*sighs*
All right, then. Just in case, could you try <p></p> if it works?
I know currently than Calibre filter and delete empty paragraphs, but if it works, it would be probaly a more elegant solution.

Last edited by un_pogaz; 01-16-2020 at 05:04 AM.
un_pogaz is offline   Reply With Quote
Old 01-16-2020, 05:38 AM   #17
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,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, empty paragraph is simply discarded by QTextBrowser. However, with yet another workaround for a Qt bug, <p>&nbsp;</p> does work, so I have changed it to that.

https://github.com/kovidgoyal/calibr...ac2d06b4a01bfa
kovidgoyal is online now   Reply With Quote
Old 01-16-2020, 06:18 AM   #18
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
YES, thanks.
Also work in 4.8 and propably all V4.

EDIT: Arf NOoooo
The HTML view repalce all entities. And worse, replace "unbreakable space" by "normal space"

The HTML <p>&nbsp;</p> becomes <p> </p> (with normal space) and will therefore be deleted the next time it is loaded in HTML mode.

Damnit

Last edited by un_pogaz; 01-16-2020 at 06:36 AM.
un_pogaz is offline   Reply With Quote
Old 01-16-2020, 06:45 AM   #19
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,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by un_pogaz View Post
The HTML view repalce all entities. And worse, replace "unbreakable space" by "normal space"
You need to include the fix using PlainTextEdit from that patch. That works around the bug with QPlainTextEdit replacing nbsp
kovidgoyal is online now   Reply With Quote
Old 01-23-2020, 05:23 AM   #20
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
The update is arrived and bug report:
When I switch from "HTML code" to "Normal View", this message appears and the changes are not saved.
Spoiler:
calibre, version 4.9.0
ERREUR : Exception non gérée: <b>TypeError</b>:unbound method toPlainText() must be called with PlainTextEdit instance as first argument (got QPlainTextEdit instance instead)

calibre 4.9 Portable embedded-python: True is64bit: False
Windows-7-6.1.7601-SP1 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '7', '6.1.7601')
Python 2.7.16+
Windows: ('7', '6.1.7601', 'SP1', u'Multiprocessor Free')
Interface language: fr
Successfully initialized third party plugins: Modify ePub (1, 4, 0) && KePub Output (3, 1, 3)
Traceback (most recent call last):
File "site-packages\calibre\gui2\comments_editor.py", line 1142, in change_tab
TypeError: unbound method toPlainText() must be called with PlainTextEdit instance as first argument (got QPlainTextEdit instance instead)
un_pogaz is offline   Reply With Quote
Old 01-23-2020, 05:42 AM   #21
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,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
weird I cannot reproduce o my development machine, must be specific to PyQt version, in any case this fixes it: https://github.com/kovidgoyal/calibr...9d7ad1fcabcaeb
kovidgoyal is online now   Reply With Quote
Old 01-23-2020, 08:15 AM   #22
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by un_pogaz View Post
The update is arrived and bug report:
When I switch from "HTML code" to "Normal View", this message appears and the changes are not saved.
It also happens here (Win 10, x64).
thiago.eec is offline   Reply With Quote
Old 01-23-2020, 02:05 PM   #23
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by kovidgoyal View Post
I was just about to report that bug, but this does indeed fix it. (By the by, is there any way to stop this module from spontaneously inserting inline styles?)

Unfortunately, I have another 4.9 bug to report, which is unaffected by that patch. In the standard calibre "library list" view, highlighting multiple ebooks and selecting "Edit metadata individually" (either by typing "e" or using the context menu) brings up the bulk editor instead.

EDIT: Almost forgot, there's another comments-editor bug that's persisted through at least the last few versions. When highlighting a boldface word or phrase from right to left, highlighting the "last" character (the first one in the word) causes the "bold" button to switch to "normal" status and neither clicking it nor pressing control-B has any effect. The selection stays bold, and only by highlighting from left to right can the it be debolded. The same goes for italics and underlined text, and it manifests in both the "review downloaded metadata" and "edit metadata individually" comment environments (which I expect use the same coding, but it's good to be thorough).

Last edited by Rev. Bob; 01-23-2020 at 03:32 PM.
Rev. Bob is offline   Reply With Quote
Old 01-23-2020, 05:32 PM   #24
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
4.9.1
Yes.
It's works.
Thanks you so mush Kovid.
un_pogaz is offline   Reply With Quote
Old 01-24-2020, 10:55 PM   #25
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,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Rev. Bob View Post
I was just about to report that bug, but this does indeed fix it. (By the by, is there any way to stop this module from spontaneously inserting inline styles?)
no, there isn't.

Quote:
Unfortunately, I have another 4.9 bug to report, which is unaffected by that patch. In the standard calibre "library list" view, highlighting multiple ebooks and selecting "Edit metadata individually" (either by typing "e" or using the context menu) brings up the bulk editor instead.
Will be fixed in the next release.

Quote:

EDIT: Almost forgot, there's another comments-editor bug that's persisted through at least the last few versions. When highlighting a boldface word or phrase from right to left, highlighting the "last" character (the first one in the word) causes the "bold" button to switch to "normal" status and neither clicking it nor pressing control-B has any effect. The selection stays bold, and only by highlighting from left to right can the it be debolded. The same goes for italics and underlined text, and it manifests in both the "review downloaded metadata" and "edit metadata individually" comment environments (which I expect use the same coding, but it's good to be thorough).
that's a limitation of QTextEdit, not much I can do about it. formatting style applies left of cursor. When you select from right to left, left of cursor is before the formatting. You can see this in action by simply moving the cursor without doing any selecting.
kovidgoyal is online now   Reply With Quote
Old 03-04-2020, 01:02 PM   #26
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 235
Karma: 100000
Join Date: Oct 2012
Device: Calibre
I get this issue, too.

Calibre 4.x adds a blank line
Code:
<p><br></p>
after each newline of comments added in Calibre 3.x and earlier versions, thereby "double-spacing" newlines. Why is this?
Geremia is offline   Reply With Quote
Old 03-05-2020, 04:39 AM   #27
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
Read the topic

TLDR:
The problem arose with the use of the new QtWebEngine in V4.0.0.
The problem was solved in 4.9.1.

However, I discovered that old comments made before 4.9 still retain the <p><br></p>, but this is normal, Calibre will correct and update the comment only when YOU make a edition.

Last edited by un_pogaz; 03-05-2020 at 05:23 AM.
un_pogaz is offline   Reply With Quote
Old 03-05-2020, 04:41 AM   #28
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,543
Karma: 26944418
Join Date: Mar 2012
Location: Sydney Australia
Device: none
There is no such thing a calibre 4.x. The current release is 4.11.2, if you are not using that version then you should install it.

As discussed in the preceding 20+ posts there were a couple updates in recent releases to address the 'blank lines in comments' issue.

BR
BetterRed is offline   Reply With Quote
Old 03-26-2020, 12:02 PM   #29
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 235
Karma: 100000
Join Date: Oct 2012
Device: Calibre
Quote:
Originally Posted by BetterRed View Post
The current release is 4.11.2, if you are not using that version then you should install it.
I'm using 4.12.
Quote:
Originally Posted by BetterRed View Post
As discussed in the preceding 20+ posts there were a couple updates in recent releases to address the 'blank lines in comments' issue.
Perhaps when I had Calibre 3 it put those empty <p> tags. Still, Calibre 4.12 doesn't strip them.
Geremia is offline   Reply With Quote
Old 03-26-2020, 12:07 PM   #30
theducks
Well trained by Cats
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: 29,768
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Geremia View Post
I'm using 4.12.Perhaps when I had Calibre 3 it put those empty <p> tags. Still, Calibre 4.12 doesn't strip them.
Calibre never auto touches EXISTING STUFF. You need to clean existing comments.
theducks is online now   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
Adding spaces after images and between paragraphs awcross Sigil 7 06-14-2017 02:47 PM
Stop Sigil from inserting unwanted lines between paragraphs Benasam Sigil 16 05-28-2014 03:16 PM
Adding space between paragraphs Gazella Conversion 5 04-03-2014 04:35 PM
Touch Extra spacing between paragraphs on my e-books Aiden Barnes & Noble NOOK 8 12-11-2013 11:17 AM
Getting extra Paragraphs MacEvansCB Calibre 5 12-19-2010 02:46 PM


All times are GMT -4. The time now is 10:40 PM.


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