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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 09-12-2019, 11:39 PM   #136
Sirtel
Wizard
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 2,019
Karma: 19745632
Join Date: Jan 2014
Location: Estonia
Device: Kindle Voyage/Oasis 2/Oasis 3/Nook Glowlight Plus 7.8''/Kobo Libra H2O
Quote:
Originally Posted by kovidgoyal View Post
@sirtel: How are you inserting paragraph margins? As in what code are you using and what procedure to insert it?
Both by hand in the individual book comments (metadata editor, comments field, the html view) and S&R in the bulk metadata editor (tried both character match and regex). As there already were <p> tags with a style attached in the comments (font family and font size), I just added margin: 0 0 0 0 to the paragraph style, to remove excessive spacing. Like <p style="font-family: 'Verdana'; font-size: 12px; margin: 0 0 0 0">

Worked in the current release, didn't work in the beta (inserted code for margins just vanished every time).
Sirtel is offline  
Old 09-13-2019, 12:34 AM   #137
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: 35,468
Karma: 12737927
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Works for me with:

Code:
<p style="margin: 0">xxx</p>
<p style="margin: 0">yyy</p>
kovidgoyal is offline  
Advert
Old 09-13-2019, 12:35 AM   #138
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: 35,468
Karma: 12737927
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Note that the book details panel/comments editor has support for mch more limited set of html and css because it is no longer based ona ful browser. https://doc.qt.io/qt-5/richtext-html-subset.html
kovidgoyal is offline  
Old 09-13-2019, 12:41 AM   #139
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: 35,468
Karma: 12737927
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Actually scratch that while setting the margin in the html view and switch back to normal view works it gets stripped during actual setting, I will look into it.
kovidgoyal is offline  
Old 09-13-2019, 12:45 AM   #140
Hopkins
Enthusiast
Hopkins began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
Quote:
Originally Posted by jhack-jos View Post
Dear Kovid,

excellent bug fixes!
All the problems previously mentioned are now solved.

Thanks to that, I was able to find another important breaking bug for the Japanese users. It seems that it is still not possible to properly turn page, both with the arrow keys or the page up / page down keys.
When trying to turn page, the viewer instead skips huge blocks of texts and goes to the "next section" of the book. I found no way to view the missing blocks of text.
FWIW, I can also confirm this on Chinese books. The paging of vertical text books (specifically writing-mode: vertical-rl) jumps more than 1 page. The same book laid out horizontally pages correctly. I suppose this could be a Qt problem.
Hopkins is offline  
Advert
Old 09-13-2019, 12:47 AM   #141
Sirtel
Wizard
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 2,019
Karma: 19745632
Join Date: Jan 2014
Location: Estonia
Device: Kindle Voyage/Oasis 2/Oasis 3/Nook Glowlight Plus 7.8''/Kobo Libra H2O
Quote:
Originally Posted by kovidgoyal View Post
Actually scratch that while setting the margin in the html view and switch back to normal view works it gets stripped during actual setting, I will look into it.
Thank you.
Sirtel is offline  
Old 09-13-2019, 05:39 AM   #142
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: 35,468
Karma: 12737927
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@Sirtel: The margins are explicitly removed, because Qt tends to set margins on every paragraph automatically, leading to very messy markup. To address your use case, however, I have made it easy to configure the CSS used inthe book details panel via Preferences->Look & feel_>Book details just add the following rule there:


Code:
p { margin: 0}

and you should be fine.
kovidgoyal is offline  
Old 09-13-2019, 12:52 PM   #143
Sirtel
Wizard
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 2,019
Karma: 19745632
Join Date: Jan 2014
Location: Estonia
Device: Kindle Voyage/Oasis 2/Oasis 3/Nook Glowlight Plus 7.8''/Kobo Libra H2O
Quote:
Originally Posted by kovidgoyal View Post
@Sirtel: The margins are explicitly removed, because Qt tends to set margins on every paragraph automatically, leading to very messy markup. To address your use case, however, I have made it easy to configure the CSS used inthe book details panel via Preferences->Look & feel_>Book details just add the following rule there:


Code:
p { margin: 0}

and you should be fine.
Many, many thanks! I'll try it when I get to my computer later.
Sirtel is offline  
Old 09-13-2019, 10:26 PM   #144
Sirtel
Wizard
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 2,019
Karma: 19745632
Join Date: Jan 2014
Location: Estonia
Device: Kindle Voyage/Oasis 2/Oasis 3/Nook Glowlight Plus 7.8''/Kobo Libra H2O
Works perfectly. Thank you, Kovid. Calibre rocks!
Sirtel is offline  
Old 09-13-2019, 11:11 PM   #145
Aeroblast
Junior Member
Aeroblast began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2019
Device: Kindle, Apple ,MS Edge
Would you like to add support for a rtl page-progression-direction to the viewer? For japanese and traditional Chinese books.
Aeroblast is offline  
Old 09-13-2019, 11:27 PM   #146
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: 35,468
Karma: 12737927
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Aeroblast View Post
Would you like to add support for a rtl page-progression-direction to the viewer? For japanese and traditional Chinese books.
Patches are welcome.
kovidgoyal is offline  
Old 09-14-2019, 12:26 AM   #147
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: 35,468
Karma: 12737927
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I looked at the scrolling issue with vertical text and basically I dont see a good way to implement it in a general fashion. One would need to detect that the file is using vertical text (I suppose one could use EPUB properties for that) and then implement specialised scrolling routines for it. Since I cant read the text and I dont have a good sense for how it should work, I am not the right person to do that. But as I said patches are welcome. The relevant code is in two places:

Initial preparation of the book happens in srv/render_book.py that would need to be changed to pass along the metadata about vertical text/page progression etc. Then in view.pyj look at show_spine_item_stage2() where data about the HTML file is sent to the iframe where it is rendered. Add the necessary metadata there about display properties.

Then look in iframe.pyj where that data is actually used and finally look in flow_mode.pyj and paged_mode.pyj for actual scrolling implementations.

Set up a calibre development environment following: https://manual.calibre-ebook.com/develop.html

If you run the viewer as

calibre-debug -w file.epub

changes to the pyj files should be auto-compiled and any console.log() or print() calls in the pyj files shouldbe printed out to the terminal for debugging.
kovidgoyal is offline  
Old 09-14-2019, 09:27 AM   #148
Aeroblast
Junior Member
Aeroblast began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2019
Device: Kindle, Apple ,MS Edge
Quote:
Originally Posted by kovidgoyal View Post
I looked at the scrolling issue with vertical text and basically I dont see a good way to implement it in a general fashion. One would need to detect that the file is using vertical text (I suppose one could use EPUB properties for that) and then implement specialised scrolling routines for it. Since I cant read the text and I dont have a good sense for how it should work, I am not the right person to do that. But as I said patches are welcome. The relevant code is in two places:

Initial preparation of the book happens in srv/render_book.py that would need to be changed to pass along the metadata about vertical text/page progression etc. Then in view.pyj look at show_spine_item_stage2() where data about the HTML file is sent to the iframe where it is rendered. Add the necessary metadata there about display properties.

Then look in iframe.pyj where that data is actually used and finally look in flow_mode.pyj and paged_mode.pyj for actual scrolling implementations.

Set up a calibre development environment following: https://manual.calibre-ebook.com/develop.html

If you run the viewer as

calibre-debug -w file.epub

changes to the pyj files should be auto-compiled and any console.log() or print() calls in the pyj files shouldbe printed out to the terminal for debugging.
Thanks for your reply!
I'll find out what can I do for it.
Aeroblast is offline  
Old 09-14-2019, 02:21 PM   #149
rashkae
Guru
rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.
 
rashkae's Avatar
 
Posts: 827
Karma: 3485135
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
Comments on 3.99.4

I don't know if it can be fixed, but I observe that height in proportion to the screen no longer work, (ex: height: 100% or max-height: 100%)

Also, the inspector in the Book viewer doesn't seem to work. Data doesn't populate into the bottom half of the inspector pane.. but it works perfectly in the Editor.
rashkae is offline  
Old 09-14-2019, 03:30 PM   #150
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 1,550
Karma: 5975684
Join Date: Jun 2010
Device: Windows 10 tablet,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by rashkae View Post
Comments on 3.99.4

I don't know if it can be fixed, but I observe that height in proportion to the screen no longer work, (ex: height: 100% or max-height: 100%)

Also, the inspector in the Book viewer doesn't seem to work. Data doesn't populate into the bottom half of the inspector pane.. but it works perfectly in the Editor.
Edit:

Quote:
Change the maximum screen area (in pixels) used to display text. A value of zero means that all available screen area is used.
Use full screen inspector will be on the right, if you are not using full screen then undock inspector and move it.

bernie
gbm is online now  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Android App] Calibre Companion 1.7 Beta testing Adoby Devices 31 09-07-2012 11:13 PM
Kobo Wifi beta testing mdclements Kobo Reader 0 10-15-2011 04:49 PM
Beta testing libprs500's new GUI kovidgoyal Calibre 409 01-07-2009 01:33 PM


All times are GMT -4. The time now is 12:49 PM.


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