![]() |
#526 |
Opinion Artiste
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#527 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#528 | |
Opinion Artiste
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 301
Karma: 61464
Join Date: Mar 2009
Location: Albany, OR
Device: Nexus 5, Nexus 7, Kindle Touch, Kindle Fire
|
Quote:
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 |
|
![]() |
![]() |
![]() |
#529 |
Opinion Artiste
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#530 |
Opinion Artiste
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
Advert | |
|
![]() |
#531 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#532 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
|
|
![]() |
![]() |
![]() |
#533 |
Member
![]() 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? |
![]() |
![]() |
![]() |
#534 |
Opinion Artiste
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 301
Karma: 61464
Join Date: Mar 2009
Location: Albany, OR
Device: Nexus 5, Nexus 7, Kindle Touch, Kindle Fire
|
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."
|
![]() |
![]() |
![]() |
#535 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
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.
|
![]() |
![]() |
![]() |
#536 | |
Opinion Artiste
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 301
Karma: 61464
Join Date: Mar 2009
Location: Albany, OR
Device: Nexus 5, Nexus 7, Kindle Touch, Kindle Fire
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#537 | |
book creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,657
Karma: 3856660
Join Date: Oct 2008
Location: Luxembourg
Device: Kindle Scribe
|
Quote:
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) |
|
![]() |
![]() |
![]() |
#538 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#539 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 Code:
<h2 class="chaptertitle" id="chapter13">CHAPTER XIII: THE AXIOM OF INFINITY AND LOGICAL TYPES</h2> 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> 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> 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. |
![]() |
![]() |
![]() |
#540 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,424
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Now fixed.
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |