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 07-15-2014, 04:54 PM   #1
shentar
Member
shentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enough
 
Posts: 13
Karma: 510
Join Date: Jul 2011
Device: kindle
azw3 to epup issues

Having mislaid my kindle (OK, I put it somewhere safe which is always a mistake) I decided to convert the azw3 file to epub and read it on my nook. The automatic conversion managed to add a page break after every line in the Table of Contents and after every paragraph. The option "Do not split on page breaks" in the EPUB output section seemed to cure the ToC issue but the resultant epub, although appearing OK in the epub viewer, still has a page break after every paragraph when displayed by the nook.

I can provide samples of the output, although I don't know what would be helpful if you don't have a nook to try it on.

Any ideas?
Thanks,
shentar is offline   Reply With Quote
Old 07-15-2014, 06:23 PM   #2
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
Posts: 5,995
Karma: 9379756
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch (Wifi only)
"Put it somewhere safe" indeed! It is pretty darn safe now.

I would guess that the html markup inside the book is incorrectly using <h2> header tags to mark paragraphs, instead of <p> paragraph tags. Look at the Structure Detection tab in the conversion settings -- you can disable adding pagebreaks on them.
eschwartz is offline   Reply With Quote
Old 07-15-2014, 07:02 PM   #3
shentar
Member
shentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enough
 
Posts: 13
Karma: 510
Join Date: Jul 2011
Device: kindle
Quote:
Originally Posted by eschwartz View Post
"Put it somewhere safe" indeed! It is pretty darn safe now.

I would guess that the html markup inside the book is incorrectly using <h2> header tags to mark paragraphs, instead of <p> paragraph tags. Look at the Structure Detection tab in the conversion settings -- you can disable adding pagebreaks on them.
I've been putting things in a safe place for 50 years. If I can ever find the place there is a fortune in treasures awaiting me. Oh, all right, probably a huge pile of old tat.

This is the (truncated and abbreviated) html generated:


Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>1: Random Ramona</title>
    <meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/>
    <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="preface" title="1: Random Ramona">
      <div class="preface">
        <div class="preface">
          <div class="preface">
            <h4 class="titlepreface">
              <a id="idp29440" class="calibre1"></a>
              <a href="part0003.html#toc-idp29440" class="calibre1">1: PROLOGUE: ONE MONTH AGO</a>
            </h4>
          </div>
        </div>
      </div>
      <p class="prefacefirstpara">Dont be silly, Bob, said Mo. everybody knows vampires dont exist.</p>
      <div class="calibre7"></div><p class="chapter">I froze (blah blah blah) denial.</p>
      <div class="calibre7"></div><p class="chapter">We cant be sure of that. I mean, (blah blah blah) place</p>
Now, my use of HTML predates style sheets but the 'class="chapter"' stuff looked suspicious to me. However, looking in the .css file "chapter" seems innocuous, but the "calibre7" block contains the worrying line
Code:
page-break-after: always
Is this a smoking gun and if so where is the safety catch?
Sorry, I'm a sucker for a mixed metaphor.

<A few minutes later>
Could it be that the internal epub viewer is ignoring the page break command because it doesn't have a fixed page size, but the nook is honouring it? Tomorrow I will unpack the epub, remove the line from the css and repack it to see if I can get something more readable.

Last edited by shentar; 07-15-2014 at 07:08 PM. Reason: Further thoughts
shentar is offline   Reply With Quote
Old 07-15-2014, 07:05 PM   #4
theducks
Grand Sorcerer
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: 14,649
Karma: 5629001
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by shentar View Post
I've been putting things in a safe place for 50 years. If I can ever find the place there is a fortune in treasures awaiting me. Oh, all right, probably a huge pile of old tat.

This is the (truncated and abbreviated) html generated:


Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>1: Random Ramona</title>
    <meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/>
    <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="preface" title="1: Random Ramona">
      <div class="preface">
        <div class="preface">
          <div class="preface">
            <h4 class="titlepreface">
              <a id="idp29440" class="calibre1"></a>
              <a href="part0003.html#toc-idp29440" class="calibre1">1: PROLOGUE: ONE MONTH AGO</a>
            </h4>
          </div>
        </div>
      </div>
      <p class="prefacefirstpara">Dont be silly, Bob, said Mo. everybody knows vampires dont exist.</p>
      <div class="calibre7"></div><p class="chapter">I froze (blah blah blah) denial.</p>
      <div class="calibre7"></div><p class="chapter">We cant be sure of that. I mean, (blah blah blah) place</p>
Now, my use of HTML predates style sheets but the 'class="chapter"' stuff looked suspicious to me. However, looking in the .css file "chapter" seems innocuous, but the "calibre7" block contains the worrying line
Code:
page-break-after: always
Is this a smoking gun and if so where is the safety catch?
Sorry, I'm a sucker for a mixed metaphor.
It looks like the culprit to me
as atest
comment-out the line(in the CSS: /* stuff to ignore */ )
theducks is offline   Reply With Quote
Old 07-15-2014, 07:15 PM   #5
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
Posts: 5,995
Karma: 9379756
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch (Wifi only)
class="chapter" is the problem, I believe.

But then again, so is the pagebreak.

calibre scans for class="chapter" to locate chapter beginnings. You can change that in Structure Detection, but it would probably be a good idea to get rid of it anyway.

the specified pagebreaks, on the other hand, are built into the book already -- but either or both would be sufficient to cause these problems.

Last edited by eschwartz; 07-15-2014 at 07:28 PM.
eschwartz is offline   Reply With Quote
Old 07-15-2014, 07:17 PM   #6
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
Posts: 5,995
Karma: 9379756
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch (Wifi only)
In fact, that whole div (pattern) is a complete and utter waste of space. No content, and it messes things up weirdly -- it is a special div to add in pagebreaks.

Regex the whole thing out.

Last edited by eschwartz; 07-15-2014 at 07:28 PM.
eschwartz is offline   Reply With Quote
Old 07-15-2014, 07:26 PM   #7
shentar
Member
shentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enough
 
Posts: 13
Karma: 510
Join Date: Jul 2011
Device: kindle
I edited the .css file and removed the
Code:
page-break-after: always
clause from the calibre7 style. That on its own seems to have cured the 1-paragraph page problem and rendered the book readable.

I had more or less resigned myself to reading the thing on my phone but the nook is much easier on the eyes. I have no doubt I will find the kindle when I am about 5 pages from the end of the book.

I thank you for your help, gentlemen, but now I must run as the cat is throwing up a massive hairball on the lounge carpet.

Is it worth opening a bug report?
shentar is offline   Reply With Quote
Old 07-15-2014, 07:28 PM   #8
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
Posts: 5,995
Karma: 9379756
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch (Wifi only)
No, this book is acting exactly as expected. It is simply coded badly.
eschwartz is offline   Reply With Quote
Old 07-15-2014, 07:47 PM   #9
theducks
Grand Sorcerer
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: 14,649
Karma: 5629001
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by eschwartz View Post
No, this book is acting exactly as expected. It is simply coded badly.
Badly?
IMHO It is a mess
theducks is offline   Reply With Quote
Old 07-15-2014, 07:55 PM   #10
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
Posts: 5,995
Karma: 9379756
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch (Wifi only)
Quote:
Originally Posted by theducks View Post
Badly?
IMHO It is a mess
I didn't say HOW badly.
eschwartz is offline   Reply With Quote
Old 07-16-2014, 05:50 AM   #11
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 629
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
And, if I might add, the inclusion of all that bad coding means your ebook reader (hardware or software, doesn't matter) has to work much harder to render that mess into something like a coherent textual display.
Sabardeyn 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
epub to azw3 conversion formatting issues topquark Conversion 45 07-31-2014 05:28 AM
mobi to epup error wallaceff Conversion 13 02-26-2012 10:22 PM
EPUP für Kindle (DuoKan) Marc_liest Amazon Kindle 4 02-23-2012 04:51 PM
What happened to epup conversion? kevinp Calibre 4 03-01-2011 03:55 PM
Epup in PDF? fun4sew Erste Hilfe 10 01-25-2010 02:26 AM


All times are GMT -4. The time now is 04:50 PM.


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