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

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 12-20-2019, 12:16 PM   #16
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 56,124
Karma: 51910878
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by Brett Merkey View Post
Interesting. I find that Calibre silently deletes media queries in my ePub to AZW3 conversions. How do you get around that? Perhaps you can post sometime with your experiences by starting another conversation. In particular, I would like to insert a media query into the ePub so that a resulting AZW3 conversion will have negative margins on html or body. Calibre wipes them without apology. :-)
Convert the ePub without the media queries and the negative margins. Then open the converted KF8 (AZW3) in the editor and add in the media queries and negative margins in CSS. Problem solved.
JSWolf is online now   Reply With Quote
Old 12-20-2019, 02:27 PM   #17
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 6,987
Karma: 32272951
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by Brett Merkey View Post
Interesting. I find that Calibre silently deletes media queries in my ePub to AZW3 conversions. How do you get around that? Perhaps you can post sometime with your experiences by starting another conversation. In particular, I would like to insert a media query into the ePub so that a resulting AZW3 conversion will have negative margins on html or body. Calibre wipes them without apology. :-)
I don't use calibre to convert from epub to AZW3 or mobi. I do use a couple of programs to check how the file will look on Amazon devices (Kindle Previewer 3 for instance) but for the most part, I try to deliver a decent looking epub and the author is responsible for uploading it to Amazon. I have had a couple of times where I have corrected issues after the upload to Amazon has revealed those issues but those are relatively rare and were related to conversion to mobi.

One item to note is that this is not my profession. It started when one author whom I knew asked me to help with problems converting an OCRed copy of a pbook into a decent ebook after the rights reverted. This has resulted in some referrals but I try to keep those limited in number. My day job as a network/system administrator is time consuming enough though being paid to play with your favourite toys does make it easier to get up and head to work each day.
DNSB is offline   Reply With Quote
Old 12-20-2019, 03:29 PM   #18
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 146
Karma: 215930
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
@JSWolf:
Quote:
open the converted KF8 (AZW3) in the editor and add in the media queries and negative margins in CSS. Problem solved.
Not really. If I am going to edit the AZW3, then I can put negative margins directly into the AZW3 directly—no need for extra query code.

What I sought (futilely) is to keep a nicely coded ePub version with the media query (for the Kindle device) there, allowing me to have negative margins in my Paperwhite in an automated fashion upon conversion. The media query code would remain in the ePub in my library without affecting the display in the ePub.

Last edited by Brett Merkey; 12-20-2019 at 03:48 PM.
Brett Merkey is offline   Reply With Quote
Old 12-20-2019, 03:35 PM   #19
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 146
Karma: 215930
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
@David,
Thanks for the clarification. I was hoping that you had found a path around Calibre's behavior in killiing media query code in the CSS.
Your day job can be stressful. Making books better on the side sounds like more fun!
Brett Merkey is offline   Reply With Quote
Old 12-20-2019, 03:43 PM   #20
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: 24,833
Karma: 34300019
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by Brett Merkey View Post
Interesting. I find that Calibre silently deletes media queries in my ePub to AZW3 conversions. How do you get around that? Perhaps you can post sometime with your experiences by starting another conversation. In particular, I would like to insert a media query into the ePub so that a resulting AZW3 conversion will have negative margins on html or body. Calibre wipes them without apology. :-)
Brett
Something must be malformed about your media queries.
I use the clean CSS feature in the Editor all the time and do not remember a Mangled @media (this damage was the reason I stopped using that feature in Sigil )
theducks is offline   Reply With Quote
Old 12-20-2019, 04:00 PM   #21
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 146
Karma: 215930
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
Quote:
I use the clean CSS feature in the Editor all the time and do not remember a Mangled @media
The clean CSS tool is not the problem here; neither is my very simple media query for Kindle. The conversion process makes the code "go away." ;-)

Example:
Quote:
@media amzn-kf8 {
/* CSS for KF8 devices */
}
Ditto for various uses of Calibre's ways to Add CSS or code during the conversion process. This all amounts to nothing more than minor irritation. As pointed out above, it is just one more step to ready a book for my Paperwhite by editing the converted CSS directly. The real nuisance here is the behavior of Amazon's Paperwhite that wastes ~100 pixels of screen space!

Last edited by Brett Merkey; 12-20-2019 at 04:10 PM.
Brett Merkey is offline   Reply With Quote
Old 12-20-2019, 05:34 PM   #22
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 56,124
Karma: 51910878
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by Brett Merkey View Post
The clean CSS tool is not the problem here; neither is my very simple media query for Kindle. The conversion process makes the code "go away." ;-)

Example:


Ditto for various uses of Calibre's ways to Add CSS or code during the conversion process. This all amounts to nothing more than minor irritation. As pointed out above, it is just one more step to ready a book for my Paperwhite by editing the converted CSS directly. The real nuisance here is the behavior of Amazon's Paperwhite that wastes ~100 pixels of screen space!
Given that you don't like the margins of your Kindle, I suggest you get a different Reader such as a Kobo.
JSWolf is online now   Reply With Quote
Old 12-22-2019, 12:49 AM   #23
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 6,987
Karma: 32272951
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by Brett Merkey View Post
@David,
Thanks for the clarification. I was hoping that you had found a path around Calibre's behavior in killiing media query code in the CSS.
Your day job can be stressful. Making books better on the side sounds like more fun!
Hmm... making book sounds like something that might have police knocking on my door. Seriously, it is not more fun than my day job but definitely more relaxing since I have to deal with a lot fewer people--sheesh, the network goes down for 15 seconds when you accidentally trigger a failover on the core firewall HA pair and you'd think the sky was falling.

For me using the Kindle Previewer is the path around calibre's stripping media queries when going from epub to AZW3/KF8. I have used KindleUnpack to extract an epub from AZW3 (KF8 to epub option) which leaves the media queries intact in the epub output but it also can leave a lot of crap (inline styles, files split at seemingly random spots, etc.).
DNSB is offline   Reply With Quote
Old 12-22-2019, 06:07 PM   #24
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 56,124
Karma: 51910878
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by DNSB View Post
Hmm... making book sounds like something that might have police knocking on my door. Seriously, it is not more fun than my day job but definitely more relaxing since I have to deal with a lot fewer people--sheesh, the network goes down for 15 seconds when you accidentally trigger a failover on the core firewall HA pair and you'd think the sky was falling.

For me using the Kindle Previewer is the path around calibre's stripping media queries when going from epub to AZW3/KF8. I have used KindleUnpack to extract an epub from AZW3 (KF8 to epub option) which leaves the media queries intact in the epub output but it also can leave a lot of crap (inline styles, files split at seemingly random spots, etc.).
I've seen some pretty hideous code when shifting from KF8 to ePub. Such bad code that I'll just forgo the book and move on to something else to read.
JSWolf 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
Question about Calibre font subsetting GrannyGrump Calibre 2 12-23-2014 12:07 AM
Problem with font subsetting grumbles Editor 17 06-20-2014 02:35 PM
Font subsetting problem yktan Calibre 5 09-19-2013 11:00 PM
Bug in font subsetting JSWolf Calibre 9 01-17-2013 09:46 AM
ePub Font Subsetting Cygfrydd ePub 2 08-17-2010 08:53 AM


All times are GMT -4. The time now is 06:59 AM.


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