Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-12-2022, 02:25 PM   #16
fre1102
Member
fre1102 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2022
Device: Kobo Libra H2O
Quote:
Originally Posted by JSWolf View Post
What happens if you convert from the Kindle version to ePub and then try that?
That's what this is. It was originally an azw file (if I remember right, there are other Amazon extensions I think, but most are (or were) .azw) that was converted to an epub to work on Aldiko on an Android tablet. There were a few that never really worked well that were converted to and from different formats trying to solve things--one of the books I remember suddenly got misspellings in it like it was not reading but OCR-ing and transcribing, as in 'd' became 'cl', 'i' became 'l', 'D' became 'l)', etc. So I was converting them from file format to file format trying to find some that worked. I don't think this is one, though, since I remember buying the first...four(?) of the series then she wrote a fifth, or then I learned of the fifth. The fifth I bought as epub. The cover is different and that bothers me.
fre1102 is offline   Reply With Quote
Old 09-12-2022, 02:43 PM   #17
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,841
Karma: 6120478
Join Date: Nov 2009
Device: many
Is there by any chance a page-template (.xpgt) xml file or adobe-template.xpgt file inside the epub. If so, try removing that as some older epub2 epubs used this to create columns.

Last edited by KevinH; 09-14-2022 at 12:57 PM.
KevinH is online now   Reply With Quote
Old 09-12-2022, 03:24 PM   #18
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 777
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
If you make a testing copy of the epub (perhaps in a test Calibre library), you could strip the css out of the stylesheet, copy the book (with a different name) over to your Kobo and see if the narrowness goes away. That, at least would let you focus on the css and not something else.

I've gone through that stylesheet you posted, removed everything that's not obviously table related, added some of my generic stuff in at the top and posted it below. You could try deleting everything in your test book's stylesheet page and copying mine in. Then go to the Tools menu and Remove Unused CSS Rules, then Fix HTML Files - All Files and then Beautify All Files. I'm pretty sure that will remove all the no-longer-present classes in your text. All the fancy stylings will go away, but it should be semi-decent.
Code:
@page {
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
}
body {
/* Basic Styling for BODY Sections of a File */
	height:	100%;
	margin:	0;
	orphans:	1;
	padding:	0;
	widows:	1;
}
* + *	{
/* Lobotomized Owl Selector - what to do any time two objects follow each other - limit to margin-top */
  margin-top:	0.6em;
}
h1, h2, h3, h4 {
/* Basic Chapter Heading Styling */
  page-break-before: always;
  page-break-after: avoid;
  text-align: center;
}
h1 + p, h2 + p, h3 + p, h4 + p, hr + p, ol + p, ul + p, .chapquote + p, .headline + p, .letter + p, .note + p, .poem + p, .placard + p, .song + p	{
/* Non-indented Paragraphs Styling (for paragraphs that follow something and shouldn't be indented) */
  text-indent: 0;
}
h1 + p::first-letter, h2 + p::first-letter, h3 + p::first-letter, h4 + p::first-letter, hr + p::first-letter, .chapquote + p::first-letter	{
/* First-Letter Styling (for the first letter following certain things (IOW, dropcaps)) */
  font-weight: bold;
}
h2 + p::first-line, h3 + p::first-line, h4 + p::first-line, hr + p::first-line, .chapquote + p::first-line	{
/* Make first line of first paragraphs smallcap */
	font-size:	1.05em;
	font-variant:	small-caps;
}
hr {
/* Thematic break to use 3 asterisks between parts of story */
  margin-top: 0.9em;
  margin-bottom: 0.9em;
  border: none;
}
hr::before {
  content: "***";
  display: block;
  text-align: center;
}
p {
/* Basic paragraph styling */
	display: block;
	text-indent: 1.2em;
}
blockquote	{
/* Blockquote Styling */
	display: block;
	font-size:	small;
	font-style: italic;
	margin-left: 1.7em;
	margin-right: 1.7em;
}
.calibre14 {
  display: table-row-group;
  vertical-align: middle;
}
.calibre15 {
  display: table-row;
  vertical-align: inherit;
}
.calibre16 {
  display: table-cell;
  text-align: inherit;
  vertical-align: top;
  width: 3.45in;
  padding: 0 5.4pt;
}
.calibre17 {
  display: block;
  font-family: Arial;
  font-size: 1.125em;
  font-weight: bold;
  line-height: 1.2;
  page-break-after: avoid;
  text-autospace: none;
  margin: 12pt 0 3pt;
}
.calibre18 {
  display: table-cell;
  text-align: inherit;
  vertical-align: top;
  width: 49.5pt;
  padding: 0 5.4pt;
}
.calibre19 {
  display: table-cell;
  text-align: inherit;
  vertical-align: top;
  width: 135pt;
  padding: 0 5.4pt;
}
.calibre33 {
  display: table-cell;
  text-align: inherit;
  vertical-align: top;
  width: 0.75in;
  padding: 0 5.4pt;
}
.msotablegrid {
  border-collapse: collapse;
  border-spacing: 2px;
  display: table;
  margin-bottom: 0;
  margin-top: 0;
  text-indent: 0;
}
.msotablegrid1 {
  border-collapse: collapse;
  border-spacing: 2px;
  display: table;
  margin-bottom: 0;
  margin-left: 54.9pt;
  margin-top: 0;
  text-indent: 0;
}

Last edited by enuddleyarbl; 09-12-2022 at 03:26 PM.
enuddleyarbl is offline   Reply With Quote
Old 09-12-2022, 03:44 PM   #19
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,811
Karma: 146918083
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 fre1102 View Post
That's what this is. It was originally an azw file (if I remember right, there are other Amazon extensions I think, but most are (or were) .azw) that was converted to an epub to work on Aldiko on an Android tablet. There were a few that never really worked well that were converted to and from different formats trying to solve things--one of the books I remember suddenly got misspellings in it like it was not reading but OCR-ing and transcribing, as in 'd' became 'cl', 'i' became 'l', 'D' became 'l)', etc. So I was converting them from file format to file format trying to find some that worked. I don't think this is one, though, since I remember buying the first...four(?) of the series then she wrote a fifth, or then I learned of the fifth. The fifth I bought as epub. The cover is different and that bothers me.
I suggest you download again from Amazon. I would think it most likely have been fixed. Then convert it to ePub and see what happens.
JSWolf is online now   Reply With Quote
Old 09-17-2022, 04:30 PM   #20
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,094
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
GIGO

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="Microsoft Word 10 (filtered)"/>
<title>THE</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<link rel="stylesheet" type="text/css" href="page_styles.css"/>
</head>
<body lang="EN-US" link="blue" vlink="purple" class="calibre">
<span class="calibre12"><br clear="all" class="calibre13" id="calibre_pb_2"/>
</span>
A naked span. Calibr/Sigil is not a great way to PREVIEW. They are too forgiving
theducks is offline   Reply With Quote
Old 09-17-2022, 09:50 PM   #21
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 777
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
I'm trying to figure out what that naked span is even intended to do. Everything in it, except for the deprecated <br clear="all" appears to have been added by Calibre's conversion process. "calibre12 and 13 are nothing but classes to set font, size and block. So, I'm assuming that in the original epub, that first line immediately after the body statement was:

<br clear="all"/>

Am I missing something? Is there any object anywhere at that point whose bottom margin needs to be cleared?

I hope the OP followed Jon's advice and re-downloaded the book from Amazon and re-converted it, because it sure looks odd.
enuddleyarbl is offline   Reply With Quote
Old 09-18-2022, 07:02 AM   #22
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,235
Karma: 105299897
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
I've only ever needed <br clear="all"/> in Wordpress to stop text wrapping on an image. Never needed it in an ebook.
Quoth is offline   Reply With Quote
Old 09-18-2022, 09:28 AM   #23
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 777
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
And, looking at the body statement, itself:
Code:
<body lang="EN-US" link="blue" vlink="purple" class="calibre">
where class="calibre" is:
Code:
.calibre {
display: block;
font-size: 1em;
padding-left: 0;
padding-right: 0;
text-align: justify;
text-justify-trim: punctuation;
margin: 0 5pt;
}
There's the line:
Code:
text-justify-trim: punctuation;
The teeny bit of information I can find on that is it's for languages like Japanese (I have no idea what it even does). Yet, the language is set to "EN-US".
enuddleyarbl is offline   Reply With Quote
Old 09-18-2022, 08:34 PM   #24
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by enuddleyarbl View Post
So, I'm assuming that in the original epub, that first line immediately after the body statement was:

<br clear="all"/>

Am I missing something? Is there any object anywhere at that point whose bottom margin needs to be cleared?
Support for this was recently added into LibreOffice 7.4:

He explains all the weird edge-cases found in documents people create... like multiple left/right floats in the same paragraphs.

Quote:
Originally Posted by Quoth View Post
I've only ever needed <br clear="all"/> in Wordpress to stop text wrapping on an image. Never needed it in an ebook.
Yes, <br> is rarely, if ever, needs to be used. I explained it all in "Valid Uses of Line Breaks?" here:

Quote:
Originally Posted by enuddleyarbl View Post
I hope the OP followed Jon's advice and re-downloaded the book from Amazon and re-converted it, because it sure looks odd.
Yes, in this case, it would be best to just redownload the latest copy. Most likely, they've corrected/updated this ancient file.

Quote:
Originally Posted by enuddleyarbl View Post
There's the line:
Code:
text-justify-trim: punctuation;
The teeny bit of information I can find on that is it's for languages like Japanese (I have no idea what it even does).
Looks like it was part of the CSS3 specs back in 2007/2010, but was dropped soon after:

Quote:
7.3. Justification Method: the ‘text-justify’ property

[...]

trim

This keyword specifies that compression is preferred to expansion and enables the trimming of blank space in glyphs where allowed by typographic tradition (for example, in spaces and fullwidth punctuation glyphs). If specified alone, the exact justification algorithm is UA-defined (as for ‘auto’).

[...]

11.3. Changes from the March 2007 CSS3 Text WD
  • Added ‘trim’ keyword to ‘text-justify’ as a replacement to ‘text-justify-trim’.
As of today's version (September 18, 2022), text-justify is "at risk":

Quote:
The following features are at-risk, and may be dropped during the CR period:

[...]
  • the text-justify property

[...]

“At-risk” is a W3C Process term-of-art, and does not necessarily imply that the feature is in danger of being dropped or delayed. It means that the WG believes the feature may have difficulty being interoperably implemented in a timely manner, and marking it as such allows the WG to drop the feature if necessary when transitioning to the Proposed Rec stage, without having to publish a new Candidate Rec without the feature first.
and it now only supports 4 settings:

Code:
auto | none | inter-word | inter-character
Quote:
Originally Posted by enuddleyarbl View Post
Yet, the language is set to "EN-US".
Yes, I agree. Usually when that occurs, it's a whole bunch of leftover gibberish from Word documents.

Tons and tons of needless CSS + overrides + every which type of obscure/obsolete CSS + IE-specific crap.

That is definitely not needed in English.

Last edited by Tex2002ans; 09-18-2022 at 08:40 PM.
Tex2002ans is offline   Reply With Quote
Old 09-19-2022, 09:46 AM   #25
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by theducks View Post
GIGO

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="Microsoft Word 10 (filtered)"/>
<title>THE</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<link rel="stylesheet" type="text/css" href="page_styles.css"/>
</head>
<body lang="EN-US" link="blue" vlink="purple" class="calibre">
<span class="calibre12"><br clear="all" class="calibre13" id="calibre_pb_2"/>
</span>
A naked span. Calibr/Sigil is not a great way to PREVIEW. They are too forgiving
Yeah and what about those tablegrid classes? Are they being called/deployed anywhere?

Hitch
Hitch is offline   Reply With Quote
Old 09-20-2022, 05:39 PM   #26
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,094
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
IIRC Clear=All was supposed to end a Float
I use <br /> inside a normal block when I want to force to 2 lines at a certain point. It also allows the TOC tool to treat both pieces as if the break was not there.

Code:
<h2>Chapter 42 <br> Life without a Universe</h2>
theducks is offline   Reply With Quote
Old 09-21-2022, 03:52 AM   #27
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,235
Karma: 105299897
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by theducks View Post
IIRC Clear=All was supposed to end a Float
I use <br /> inside a normal block when I want to force to 2 lines at a certain point. It also allows the TOC tool to treat both pieces as if the break was not there.

Code:
<h2>Chapter 42 <br> Life without a Universe</h2>
True about float (which is why sometimes needed in Wordpress) and breaking a heading over two lines instead of device wrap is useful, but clear=all would break it, needs to be a bare <br/>. If done in source wordprocessor the auto-generated contents page replaces <br/> with a space.
Quoth is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Method to Convert Fancy CSS to Everyday CSS? enuddleyarbl ePub 25 07-25-2022 02:07 PM
Customize viewer css. pygments.css not found drglenn Viewer 2 12-18-2020 04:52 PM
pagestyle.css extra / integrated in stylesheet.css / or not at all? chaot Workshop 14 02-24-2017 11:10 PM
Broken PW screen, anyway to widen margins? Xelnok Amazon Kindle 5 04-10-2013 01:51 PM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM


All times are GMT -4. The time now is 03:52 PM.


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