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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-21-2020, 04:40 PM   #16
thiago.eec
Addict
thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.
 
Posts: 289
Karma: 71602
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
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, 05: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: 138
Karma: 215930
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 05:54 PM.
Brett Merkey is offline   Reply With Quote
Old 01-21-2020, 09: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: 193
Karma: 1025332
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, 01: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: 218
Karma: 1700000
Join Date: Oct 2011
Location: Arlington, TX
Device: Kindle PW2, Nook ST, Nook Color, Sony PRST1
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, 02: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: 2,161
Karma: 3262212
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 02:18 PM.
stumped is offline   Reply With Quote
Old 01-25-2020, 03: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: 55,497
Karma: 51439670
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 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 09:32 PM.
JSWolf is offline   Reply With Quote
Old 01-25-2020, 04:33 PM   #22
BetterRed
null operator
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: 15,505
Karma: 16370000
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 online now   Reply With Quote
Old 01-26-2020, 02: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: 2,161
Karma: 3262212
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, 07: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: 55,497
Karma: 51439670
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 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, 07: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: 2,161
Karma: 3262212
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 05:01 PM.


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