Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-30-2009, 10:29 PM   #526
ekaser
Opinion Artiste
ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.
 
ekaser's Avatar
 
Posts: 301
Karma: 61464
Join Date: Mar 2009
Location: Albany, OR
Device: Nexus 5, Nexus 7, Kindle Touch, Kindle Fire
A Tale of Two ePubs

I have two ePubs (amongst others), one from each of two different publishers. They both started as .LIT files, and both .LIT files look fine in MS Reader. I converted both of them to ePub using Calibre, and they both look fine when viewed in Stanza. One of them looks fine in Calibre's viewer, but the other doesn't wrap. Each 'paragraph' is a single very long line in the Calibre viewer. I've tried unZIPing both ePubs and comparing some of the html, but I'm not great html wizard and haven't spotted anything obvious to me.

Any idea what might cause this behavior in one of the files (and/or is there anything in the Calibre conversion settings I can change that might fix it)?

I don't have an e-reader yet (it's on order), so can't test the files in actual e-reader hardware.

Everett
ekaser is offline   Reply With Quote
Old 07-31-2009, 12:56 AM   #527
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: 45,424
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Look for a <pre> tag in the html and convert it to <p> tag.Don't forget to convert the closing tag as well.
kovidgoyal is offline   Reply With Quote
Advert
Old 07-31-2009, 11:37 AM   #528
ekaser
Opinion Artiste
ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.
 
ekaser's Avatar
 
Posts: 301
Karma: 61464
Join Date: Mar 2009
Location: Albany, OR
Device: Nexus 5, Nexus 7, Kindle Touch, Kindle Fire
Quote:
Originally Posted by kovidgoyal View Post
Look for a <pre> tag in the html and convert it to <p> tag.Don't forget to convert the closing tag as well.
Thanks! That turned out not to be the problem, but it got me looking in the right place. It turned out (I think) to be a problem with the <DIV> blocks (after comparing the two files further). I ended up removing all of the <DIV> and </DIV> markers, except for a few around headings, and that fixed the problem.

Now here's the (possibly) interesting thing. The mis-performing .LIT file is one that I bought over 6 years ago to use on a Pocket PC. At the time, for whatever reason, I'd used the CLIT program to split the LIT file apart into it's HTML components. When recently starting conversions of favorite books to epubs (in preparation for receiving my first eInk reader), I downloaded Calibre, started figuring out how to use it, and used the original .LIT files as the source to convert from, resulting in the EPUB file that didn't wrap. After unZIPing the epub and figuring out that the DIVs appeared to be the problem, I remember/realized that I also had the HTML files that had been generated by CLIT. So out of curiousity, I used Calibre to convert that HTML file to an epub, and it worked fine! So, I think (not 100% sure, but pretty sure) that the problem occurred in Calibre's conversion of the LIT file to its internal HTML format.

Everett
ekaser is offline   Reply With Quote
Old 07-31-2009, 02:28 PM   #529
ekaser
Opinion Artiste
ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.
 
ekaser's Avatar
 
Posts: 301
Karma: 61464
Join Date: Mar 2009
Location: Albany, OR
Device: Nexus 5, Nexus 7, Kindle Touch, Kindle Fire
I think I may have figured out what the errant statement is in the LIT->EPUB output that's causing the "no wrap" problem, it's <div class="calibre5"/>. What is in the source LIT file that's causing this problem, I don't know. I've added a note to the ticket regarding this.

Everett
ekaser is offline   Reply With Quote
Old 08-01-2009, 11:05 AM   #530
ekaser
Opinion Artiste
ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.
 
ekaser's Avatar
 
Posts: 301
Karma: 61464
Join Date: Mar 2009
Location: Albany, OR
Device: Nexus 5, Nexus 7, Kindle Touch, Kindle Fire
I've found another case, where converting a single HTML file to an EPUB causes bogus formatting, this time the wrong font and other stuff. The problem again appears to be the insertion of a flakey <div class="calibre10"/> block (only the first one has the '/', all subsequent ones omit it). I've added this (and the 'offending' HTML source file) to the same ticket as the above EPUB problem.

Everett
ekaser is offline   Reply With Quote
Advert
Old 08-01-2009, 01:44 PM   #531
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: 45,424
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Thanks, I'm a tad busy at the moment, so it will be a few days before I can look at it.
kovidgoyal is offline   Reply With Quote
Old 08-01-2009, 01:51 PM   #532
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,911
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 ekaser View Post
I've found another case, where converting a single HTML file to an EPUB causes bogus formatting, this time the wrong font and other stuff. The problem again appears to be the insertion of a flakey <div class="calibre10"/> block (only the first one has the '/', all subsequent ones omit it). I've added this (and the 'offending' HTML source file) to the same ticket as the above EPUB problem.

Everett
What you need to do is look at the CSS for calibre10 and see what it is doing and fix what needs fixing.
JSWolf is offline   Reply With Quote
Old 08-01-2009, 07:33 PM   #533
Spit
Member
Spit began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2009
Device: none
Hi,

When I use calibre to create an epub file from a pdf to read on a sony 505 can i change the font size?

I tried putting 8,10,12 etc in the font size box but the smallest font is always at default it seems. I just wanted more text on screen.

Any tips for this?
Spit is offline   Reply With Quote
Old 08-02-2009, 11:10 AM   #534
ekaser
Opinion Artiste
ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.
 
ekaser's Avatar
 
Posts: 301
Karma: 61464
Join Date: Mar 2009
Location: Albany, OR
Device: Nexus 5, Nexus 7, Kindle Touch, Kindle Fire
Quote:
Originally Posted by JSWolf View Post
What you need to do is look at the CSS for calibre10 and see what it is doing and fix what needs fixing.
If I knew more about HTML and was more familiar with Calibre itselt, I might. But I'm still a newbie with Calibre, so I have to settle (for now) for just being a "bug reporter."
ekaser is offline   Reply With Quote
Old 08-02-2009, 11:19 AM   #535
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,911
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 ekaser View Post
If I knew more about HTML and was more familiar with Calibre itselt, I might. But I'm still a newbie with Calibre, so I have to settle (for now) for just being a "bug reporter."
If you attach the CSS and tell us which entry is the problem I can have a look and see what might be the problem.
JSWolf is offline   Reply With Quote
Old 08-02-2009, 11:08 PM   #536
ekaser
Opinion Artiste
ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.ekaser has a propeller beanie that spins backward.
 
ekaser's Avatar
 
Posts: 301
Karma: 61464
Join Date: Mar 2009
Location: Albany, OR
Device: Nexus 5, Nexus 7, Kindle Touch, Kindle Fire
Quote:
Originally Posted by JSWolf View Post
If you attach the CSS and tell us which entry is the problem I can have a look and see what might be the problem.
I had opened a ticket on the Calibre web site, and attached the two example files to that ticket. I can't predict what code in the input HTML is causing the problems with the EPUB HTML output, so trying to post snippets here would probably be less than fruitful.
ekaser is offline   Reply With Quote
Old 08-06-2009, 04:16 AM   #537
mtravellerh
book creator
mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.
 
mtravellerh's Avatar
 
Posts: 9,657
Karma: 3856660
Join Date: Oct 2008
Location: Luxembourg
Device: Kindle Scribe
Quote:
Originally Posted by Spit View Post
Hi,

When I use calibre to create an epub file from a pdf to read on a sony 505 can i change the font size?

I tried putting 8,10,12 etc in the font size box but the smallest font is always at default it seems. I just wanted more text on screen.

Any tips for this?
In a CSS sheet, try this

body {font-size: 120%}

That should work!

Try a few different percentages to see what size you prefer. I don't know if this works on the Sony, but it does work on ADE so I guess it will work on a Sony, as well!

Please be advised, though, that converting directly from PDF still is not really a good idea (convert your PDF to txt or html first before converting it to ePub)
mtravellerh is offline   Reply With Quote
Old 08-06-2009, 06:14 AM   #538
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,911
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Yes, font size by % will work on the 505/700.
JSWolf is offline   Reply With Quote
Old 08-14-2009, 11:39 AM   #539
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
toc.ncx in calibre-generated epub displays improperly in ADE

I mentioned this in the Viewing software forum, but I thought I'd bring it up here too since it involves calibre.

I recently used calibre (0.6.5 linux) to convert an HTML document to an epub, commandline:

Code:
ebook-convert imp-c.html imp.epub --output-profile="sony" --chapter="//h:h2" --cover="CoverDesign.jpg" --authors="Bertrand Russell" --title="Introduction to Mathematical Philosophy" --author-sort="Russell, Bertrand" --extract-to=epub_extract
In the HTML source used to generate it, the chapter headings looked like this:

Code:
<h2 class="chaptertitle" id="chapter13">CHAPTER 
XIII: THE AXIOM OF INFINITY AND LOGICAL TYPES</h2>
...with a (typically harmless) linefeed after "CHAPTER".

Calibre's chapter detection put items like the following into the toc.ncx zipped inside the epub:

Code:
    <navPoint id="cdd7d91a-1d3f-48d7-8546-19fc1a8ae123" playOrder="16">
      <navLabel>
        <text>CHAPTER 
XIII: THE AXIOM OF INFINITY AND LOGICAL TYPES</text>
      </navLabel>
      <content src="imp-c_split_16.html#chapter13"/>
    </navPoint>
Again with a linefeed after "CHAPTER".

On my Sony, the TOC was fine, but if viewed in ADE, the linebreak in the TOC file seems to result in parts of chapter name displayed on top of themselves:



If I changed the toc.ncx file inside the ePub to avoid the linefeed, as in:

Code:
    <navPoint id="cdd7d91a-1d3f-48d7-8546-19fc1a8ae123" playOrder="16">
      <navLabel>
        <text>CHAPTER XIII: THE AXIOM OF INFINITY AND LOGICAL TYPES</text>
      </navLabel>
      <content src="imp-c_split_16.html#chapter13"/>
    </navPoint>
(Or, equivalently, changed the source HTML and reconverted...) ...then things worked fine in ADE.

Insofar as this could be considered a "bug", it seems like it's a bug with ADE, since I don't think linefeeds in XML files are ever supposed to do anything (and this looks like an XML file). But you still might consider altering how calibre generates these files to avoid this issue.

(Along similar lines, I've noticed that calibre's viewer itself often responds inappropriately to linebreaks in source documents...)

Last edited by frabjous; 08-14-2009 at 11:43 AM.
frabjous is offline   Reply With Quote
Old 08-14-2009, 11:47 AM   #540
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: 45,424
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Now fixed.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Epub Output: Line Height greenapple Conversion 20 01-27-2013 09:27 AM
EPUB output justification toki08 Calibre 10 01-08-2011 04:14 PM
Calibre epub output details and Nook squidward Calibre 6 11-24-2010 03:21 PM
epub output metadata troymc Calibre 5 05-22-2010 12:23 AM
Problem with epub output in Cybook Gen3 fjf Calibre 3 02-03-2010 02:23 AM


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


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