Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-21-2021, 10:41 PM   #1
jcobban
Software Architect
jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.
 
Posts: 13
Karma: 1000000
Join Date: May 2013
Location: ottawa canada
Device: kobo
Question Epub Reader Mangling section start

I am using Epub Reader to read an EPUB but it is mangling the presentation of the opening text of the first paragraph in each section. The EPUB file is obviously specifying some special formatting which is telling Epub Reader to not break the text, but the text is wider than a column, so it extends beyond the width of the column and overlays on text of the next column, or if the window is not wide enough the text extends beyond the window. I am going to try other Linux apps to see if I can get around this, but I thought I would let the community know. If there are any suggestions of ways I can get around this I would appreciate it, and if anyone wants to volunteer to experiment with the book I can send a copy, since the file is DRM-free. To be fair to the publisher, who so generously insists upon not using DRM, I would of course want any experimenter to delete the book once finished testing, or at least to patronize this very generous publisher Baen Books.



I have been using Calibre for at least 15 years now.
jcobban is offline   Reply With Quote
Old 11-21-2021, 11:15 PM   #2
jcobban
Software Architect
jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.
 
Posts: 13
Karma: 1000000
Join Date: May 2013
Location: ottawa canada
Device: kobo
Followup:

The relevant portion of the document in the Calibre epub editor looks like:

Code:
<p class="pcalibre p4">Honor stood in the observation dome on <i class="calibre5">Imperator</i>’s spine. Her flagship was inverted, and her eyes were dark and thoughtful as she gazed up at the white-swirled sapphire of the planet called Tschermak.</p>
jcobban is offline   Reply With Quote
Advert
Old 11-22-2021, 04:40 AM   #3
mikelv
Developer of EPUBReader
mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.
 
Posts: 271
Karma: 1922
Join Date: Oct 2009
Device: none
Quote:
Originally Posted by jcobban View Post
I have been using Calibre for at least 15 years now.
To make sure, I got it right: you are using the EPUBReader browser extension for reading the ebook?
mikelv is offline   Reply With Quote
Old 11-26-2021, 04:39 AM   #4
jcobban
Software Architect
jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.
 
Posts: 13
Karma: 1000000
Join Date: May 2013
Location: ottawa canada
Device: kobo
Thank you for replying. I am using the program that is invoked by Calibre. Calibre has three icons that it adds to the application menu, Calibre, Book Reader, and Book Editor.
jcobban is offline   Reply With Quote
Old 11-27-2021, 02:54 AM   #5
mikelv
Developer of EPUBReader
mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.
 
Posts: 271
Karma: 1922
Join Date: Oct 2009
Device: none
I have moved the thread to the Calibre forum.
mikelv is offline   Reply With Quote
Advert
Old 11-27-2021, 07:34 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,852
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That is a bug in chromium. Your book is using text-transform: uppercase on the first line of the text. That breaks in column mode in chromium. Either remove that from the book or switch to flow mode in the viewer settings for this book.
kovidgoyal is offline   Reply With Quote
Old 12-01-2021, 11:12 PM   #7
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
I think so too. I often use font-variant: small-caps; for that effect.

So if my guess is right, putting this in the Styles may work similarly.

.pcalibre {
text-transform: none !important;
font-variant: small-caps; }

Last edited by nqk; 12-01-2021 at 11:15 PM.
nqk is offline   Reply With Quote
Old 12-04-2021, 12:49 AM   #8
jcobban
Software Architect
jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.
 
Posts: 13
Karma: 1000000
Join Date: May 2013
Location: ottawa canada
Device: kobo
Question

Quote:
Originally Posted by kovidgoyal View Post
That is a bug in chromium. Your book is using text-transform: uppercase on the first line of the text. That breaks in column mode in chromium. Either remove that from the book or switch to flow mode in the viewer settings for this book.
Thank you. I do not understand how Chromium is involved. I am not explicitly invoking any browser and my default browser is Firefox. I am just requesting Calibre to open the book. I just checked and I do not even have Chromium, or any other Google software, installed on the computer where I am encountering the problem. Does the Calibre BookReader use Chromium code internally? This is not a book I created and although it is not protected by DRM I am uncomfortable about altering a file for which I do not own the copyright. This issue affects every section of the book. I have never encountered this problem before and I have hundreds of e-books including several dozen from this publisher. Should I report this as an issue to the publisher? Should I download some other file format than epub?
jcobban is offline   Reply With Quote
Old 12-04-2021, 12:53 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,852
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre includes chromium and uses it. And yes report the issue to the publisher, or use one of the workarounds i mentioned in my previous post.
kovidgoyal is offline   Reply With Quote
Old 12-04-2021, 01:02 AM   #10
jcobban
Software Architect
jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.
 
Posts: 13
Karma: 1000000
Join Date: May 2013
Location: ottawa canada
Device: kobo
Quote:
Originally Posted by kovidgoyal View Post
calibre includes chromium and uses it. And yes report the issue to the publisher, or use one of the workarounds i mentioned in my previous post.
Thank you for your very quick response. As I look at the EpubReader I see:


I don't see anything in the options, for example under Preferences, that looks like what you suggested I do.
jcobban is offline   Reply With Quote
Old 12-04-2021, 01:11 AM   #11
jcobban
Software Architect
jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.
 
Posts: 13
Karma: 1000000
Join Date: May 2013
Location: ottawa canada
Device: kobo
Quote:
Originally Posted by nqk View Post
I think so too. I often use font-variant: small-caps; for that effect.

So if my guess is right, putting this in the Styles may work similarly.

.pcalibre {
text-transform: none !important;
font-variant: small-caps; }
Thank you for your suggestion. This changes the presentation of the remainder of the paragraph but does not resolve the mangling of the first line of the paragraph.



Note how the last word is truncated and there are obviously several words between "GRE..." and "DISEMBARKED" which extend beyond the edge of the window.
jcobban is offline   Reply With Quote
Old 12-04-2021, 01:34 AM   #12
jcobban
Software Architect
jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.jcobban ought to be getting tired of karma fortunes by now.
 
Posts: 13
Karma: 1000000
Join Date: May 2013
Location: ottawa canada
Device: kobo
Quote:
Originally Posted by kovidgoyal View Post
calibre includes chromium and uses it. And yes report the issue to the publisher, or use one of the workarounds i mentioned in my previous 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
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:

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.

Last edited by jcobban; 12-04-2021 at 01:36 AM.
jcobban is offline   Reply With Quote
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: 35,380
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, 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
Old 12-07-2021, 04:33 AM   #14
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by jcobban View Post
Thank you for your suggestion. This changes the presentation of the remainder of the paragraph but does not resolve the mangling of the first line of the paragraph.
Oh, it was my bad, I think you have to add :first-line.

.pcalibre:first-line {
text-transform: none !important;
font-variant: small-caps;
font-size: 107%; }
nqk is offline   Reply With Quote
Reply

Tags
epub, linux


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUB of manual seems to hide everything from section 1.1.1 to section 2 halloleo Calibre 9 07-17-2021 01:45 AM
Odyssey How to use table of contents to start reading from chapter not sub section? therobyouknow Bookeen 7 10-07-2012 10:10 AM
How do I correct varying section breaks (epub to epub) library addict Calibre 0 02-21-2012 12:56 PM
Using Calibre to make doc -> mobi files. Problems with "start reading" section. Stodder Calibre 0 07-03-2011 10:32 AM


All times are GMT -4. The time now is 01:32 AM.


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