View Single Post
Old 12-04-2021, 09:08 PM   #13
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: 46,482
Karma: 169115146
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by jcobban View Post
Thank you. I found the flow option under Page Layout and it does address the issue.

The xhtml file that is being displayed starts with
Spoiler:
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
  <head>
    <title>To End in Fire</title>
    <meta name="Generator" content="Cocoa HTML Writer"/>
    <meta name="CocoaVersion" content="2022.5"/>
    <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
    <link rel="stylesheet" type="text/css" href="page_styles.css"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  </head>
  <body class="calibre">
<div class="calibre2" id="calibre_pb_6"></div>
<p class="p2"><br class="calibre3"/></p>
<p class="p2"><br class="calibre3"/></p>
<p class="p9"><b class="calibre1">Mendel Spaceport</b></p>
<p class="p9"><b class="calibre1">Planet Mesa</b></p>
<p class="p9"><b class="calibre1">Mesa System</b></p>
<p class="p2"><br class="calibre3"/></p>
<p class="pcalibre p4">Cathy

Now since I cannot see why the priginal publisher would have included a reference to Calibre specific styles in the .epub it strikes me that "Cocoa" must be a tool used by Calibre to convert the document from its original .epub to the internal xhtml format used by Calibre. In which case the problem is in the conversion to xhtml. But why would the Cocoa tool convert to a style which is misinterpreted by the Chromium code which Calibre has chosen to use for layout?

When I look at a book from the same publisher (actually the immediately preceding volume in the same series) the internal Calibre file looks like:
Spoiler:

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta content="text/css" http-equiv="Content-Style-Type"/>
    <title>Cauldron of Ghosts</title>
    <meta content="Cocoa HTML Writer" name="Generator"/>
    <meta content="1265.19" name="CocoaVersion"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link href="stylesheet.css" rel="stylesheet" type="text/css"/>
<link href="page_styles.css" rel="stylesheet" type="text/css"/>
</head>
  <body class="calibre">
<div class="calibre4" id="calibre_pb_0">
<div class="calibre4" id="calibre_pb_1">
<div class="calibre4" id="calibre_pb_2">
<div class="calibre4" id="calibre_pb_3">
<div class="calibre4" id="calibre_pb_4">
<p class="chapter" id="calibre_toc_3">Chapter 2</p>
<p class="left">“Well, it would have been nice if they’d given us another week or so to complete our preparations, but I guess you can’t


My goal is to avoid other users of Calibre from encountering this frustration, not just to fix the problem for myself.
As for why the publisher has references to calibre styles? Probably that Baen uses calibre to convert to epub. AFAIK, "Cocoa HTML Writer" is part of MacOS X. BTW, the version of calibre used by Baen has generally been on the old side.

And for what it is worth, calibre does not modify an epub file imported into it's library unless you edit, polish Modify Epub, etc. the file. When you send the epub to your ereader, save to disk, etc., the metadata updates stored in the metadata.opf file stored in the same directory as the epub will be used to update the metadata in the copy of the epub but the original in the library does not get modified unless you choose to do so.

Last edited by DNSB; 12-04-2021 at 09:11 PM.
DNSB is offline   Reply With Quote