Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-21-2020, 03:40 PM   #16
thiago.eec
Wizard
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: 1,212
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by Brett Merkey View Post
The example you gave really shows nothing because it was just CSS that gets blown away. The critical code is in the HTML structure. Look at it. Does Calibre really delete classes that you had in the original format? I would shudder if it did...
What? If the the CSS classes' names have been changed on the style sheet, the same changes are required to be done on the XHTML, or it won't work at all.
If I have a class called 'nonindent' and calibre change it on the style sheet to 'nonindent1', then calibre surely changed all the occurrences of class="nonindent" on the XHTML to 'nonindent1'. Changing a class name on the CSS but not on the XHTML would definitely screw things up.

On my example, this is a fragment of the original XHTML:
Spoiler:

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ops="http://www.idpf.org/2007/ops" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<head>
  <title>The Bed of Procrustes: Philosophical and Practical Aphorisms</title>
  <link href="Tale_9780679643685_epub_css_r1.css" rel="stylesheet" type="text/css"/>
  <link href="page-template.xpgt" rel="stylesheet" type="application/vnd.adobe-page-template+xml"/>
  <meta name="Adept.resource" value="urn:uuid:54ff3e10-062a-4b56-9c80-3dc241dc8c9d"/>
</head>

<body>

  <h1 class="chapter" id="bm1"><a id="page105"></a>POSTFACE</h1>

  <p class="nonindent">The general theme of my work is the limitations of human knowledge, and the charming and less charming errors and biases when working with matters that lie outside our field of observation, the unobserved and the unobservables—the unknown; what lies on the other side of the veil of opacity.</p>

  <p class="indent">Because our minds need to reduce information, we are more likely to try to squeeze a phenomenon into the Procrustean bed of a crisp and known category (amputating the unknown), rather than suspend categorization, and make it tangible. Thanks to our detections of false patterns, along with real ones, what is random will appear less random and more certain—our overactive brains are more likely to impose the wrong, simplistic narrative than no narrative at all.<a class="hlink" href="#bm1-ftn1" id="bm1-ftn1a"><sup class="frac">*</sup></a></p>

  <p class="indent">The mind can be a wonderful tool for self-delusion—it <a id="page106"></a>was not designed to deal with complexity and nonlinear uncertainties.<a class="hlink" href="#bm1-ftn2" id="bm1-ftn2a"><sup class="frac">*</sup></a> Counter to the common discourse, <em>more information means more delusions:</em> our detection of false patterns is growing faster and faster as a side effect of modernity and the information age: there is this mismatch between the messy randomness of the information-rich current world, with its complex interactions, and our intuitions of events, derived in a simpler ancestral habitat. Our mental architecture is at an increased mismatch with the world in which we live.</p>


Now, the converted fragment:
Spoiler:

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>The Bed of Procrustes: Philosophical and Practical Aphorisms</title>
  <link href="page-template.xpgt" rel="stylesheet" type="application/vnd.adobe-page-template+xml"/>
  <meta name="Adept.resource" value="urn:uuid:54ff3e10-062a-4b56-9c80-3dc241dc8c9d"/>
  <link href="../styles/0002.css" rel="stylesheet" type="text/css"/>
  <link href="../styles/0001.css" rel="stylesheet" type="text/css"/>
</head>

<body class="calibre">

  <h1 class="chapter" id="bm1"><a id="page105"></a>POSTFACE</h1>

  <p class="nonindent1">The general theme of my work is the limitations of human knowledge, and the charming and less charming errors and biases when working with matters that lie outside our field of observation, the unobserved and the unobservables—the unknown; what lies on the other side of the veil of opacity.</p>

  <p class="indent">Because our minds need to reduce information, we are more likely to try to squeeze a phenomenon into the Procrustean bed of a crisp and known category (amputating the unknown), rather than suspend categorization, and make it tangible. Thanks to our detections of false patterns, along with real ones, what is random will appear less random and more certain—our overactive brains are more likely to impose the wrong, simplistic narrative than no narrative at all.<a class="hlink1" href="part0028.html#bm1-ftn1" id="bm1-ftn1a"><sup class="frac">*</sup></a></p>

  <p class="indent">The mind can be a wonderful tool for self-delusion—it <a id="page106"></a>was not designed to deal with complexity and nonlinear uncertainties.<a class="hlink1" href="part0028.html#bm1-ftn2" id="bm1-ftn2a"><sup class="frac">*</sup></a> Counter to the common discourse, <em class="calibre1">more information means more delusions:</em> our detection of false patterns is growing faster and faster as a side effect of modernity and the information age: there is this mismatch between the messy randomness of the information-rich current world, with its complex interactions, and our intuitions of events, derived in a simpler ancestral habitat. Our mental architecture is at an increased mismatch with the world in which we live.</p>

As you can see, calibre changed both the CSS and the XHTML. Changing just one of them would be catastrophic.
thiago.eec is offline   Reply With Quote
Old 01-21-2020, 04:47 PM   #17
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: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
Quote:
As you can see, calibre changed both the CSS and the XHTML. Changing just one of them would be catastrophic.
As such, you are correct. You have my sympathies. Perhaps you have given me yet another reason not to update my Calibre! Or perhaps there is something else going on here. Calibre doing that not only seems intrusive, but, from your example, inconsistent, since the original class names were preserved in the other lines of your example code.

Inconsistency in code is a nasty business. Sorry.

Last edited by Brett Merkey; 01-21-2020 at 04:54 PM.
Brett Merkey is offline   Reply With Quote
Advert
Old 01-21-2020, 08:02 PM   #18
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,587
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by Brett Merkey View Post
The example you gave really shows nothing because it was just CSS that gets blown away. The critical code is in the HTML structure. Look at it. Does Calibre really delete classes that you had in the original format? I would shudder if it did...
Classes are in CSS. Tags are in HTML. An ebook without CSS would be like reading a web page in the earliest days of the web. As thiago.eec says, changing the CSS is catastrophic, although I would instead say "can be" instead of "is" since it depends on how drastic the changes are.
hobnail is offline   Reply With Quote
Old 01-25-2020, 12:30 PM   #19
Section8
Addict
Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.Section8 ought to be getting tired of karma fortunes by now.
 
Section8's Avatar
 
Posts: 264
Karma: 2121470
Join Date: Oct 2011
Location: Arlington, TX
Device: Kindle PW4, Moon+ Reader on a cheap Android tablet
Quote:
Originally Posted by JSWolf View Post
The reverse can be done by KindleGen. But after the conversion, you may want to use KindleUnpack to split the dual-format mobi so your eBooks don't take up a lot of extra space.
Thank-you. I've never played with KindleGen. I'll try it the next time I purchase an epub.
Section8 is offline   Reply With Quote
Old 01-25-2020, 01:16 PM   #20
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Whatever may or may not be going on in the depths of code, I strongly suspect that the two formats would render identically, if books were displayed side by side on devices set to same fonts, margins etc and with same screen size.

So there's no way that a reader can deduce "this one has gone through a (correctly specified) calibre conversion, that one has not..."
Lossy seems entirely the wrong adjective here. imlying that one format is somehow better than the other.

Last edited by stumped; 01-25-2020 at 01:18 PM.
stumped is offline   Reply With Quote
Advert
Old 01-25-2020, 02:26 PM   #21
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: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by stumped View Post
Whatever may or may not be going on in the depths of code, I strongly suspect that the two formats would render identically, if books were displayed side by side on devices set to same fonts, margins etc and with same screen size.

So there's no way that a reader can deduce "this one has gone through a (correctly specified) calibre conversion, that one has not..."
Lossy seems entirely the wrong adjective here. imlying that one format is somehow better than the other.
I know what's meant here. Lossy means converting but things changing (aka a Calibre conversion changing some of the CSS classes to .calibre#. @Section8 is wanting to convert with the least amount of changes to the code as possible.

Last edited by JSWolf; 01-25-2020 at 08:32 PM.
JSWolf is offline   Reply With Quote
Old 01-25-2020, 03:33 PM   #22
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: 21,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
↑ ↑ ↑ ✔

Quote:
Originally Posted by stumped View Post
. . . Lossy seems entirely the wrong adjective here. imlying that one format is somehow better than the other.
We've been there, done that -- post #2 raised the same point and the OP acknowledged the word 'lossy' wasn't quite right in post #3. Then the rest of the thread moved to the substantive issues.

Before posting I suggest you read what others have already posted.

BR
BetterRed is offline   Reply With Quote
Old 01-26-2020, 01:58 AM   #23
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Quote:
Originally Posted by BetterRed View Post
↑ ↑ ↑ ✔


We've been there, done that -- post #2 raised the same point and the OP acknowledged the word 'lossy' wasn't quite right in post #3. Then the rest of the thread moved to the substantive issues.

Before posting I suggest you read what others have already posted.

BR
i did, the "substantive issue" of my post was not use of the word "lossy" but was whether there was any observable difference in how the 2 formats render

before posting I suggest you read it again
stumped is offline   Reply With Quote
Old 01-26-2020, 06:43 AM   #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: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by stumped View Post
i did, the "substantive issue" of my post was not use of the word "lossy" but was whether there was any observable difference in how the 2 formats render

before posting I suggest you read it again
One thing that can be different is the font sizes. You would have to adjust the Calibre conversion options not to use the default font scale.
JSWolf is offline   Reply With Quote
Old 01-26-2020, 06:58 AM   #25
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Quote:
Originally Posted by JSWolf View Post
One thing that can be different is the font sizes. You would have to adjust the Calibre conversion options not to use the default font scale.
yes, that's why i sneaked in "correctly specified" calibre conversion.
I am aware that on default settings it makes a mess of some dropcap alignments, but I then go to to remove those anyway so I never bothered to learn how to fix it.
stumped is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AZW3 to EPUB conversion 2 columns ctemple Conversion 1 01-27-2019 08:56 PM
Failed Conversion from AZW3 to EPUB marie44 Conversion 10 03-24-2015 10:59 PM
Problem with conversion from AZW3 to ePub Kaetrin Conversion 3 05-30-2013 04:57 AM
Conversion from epub to azw3 Joy736 Conversion 12 01-01-2013 11:00 AM
Conversion Lossy or Lossless? KrowNB Conversion 6 03-11-2011 08:31 AM


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


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