View Single Post
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,234
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