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 03-24-2011, 05:36 AM   #1
library addict
Grand Sorcerer
library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.
 
library addict's Avatar
 
Posts: 12,867
Karma: 35535698
Join Date: Nov 2010
Location: USA
Device: Nexus 7 2, Samsung Galaxy Tab A 8" (retired=Sony PRS650, Kobo Mini)
Converted ePub file displays correctly in Calibre Viewer, but not on Sony

When I convert one of my LIT files to ePub, the section breaks appear correctly in the Calibre viewer, but do not appear in ADE or on my Sony 650.

After conversion to ePub, the string appears as
<div class="calibre6">
<br class="calibre6"/>
</div>
<div class="calibre6">
<br class="calibre6"/>
</div>
<div class="calibre6">
<br class="calibre6"/>
</div>

Is there a reason "calibre6" doesn't work with ADE/Sony to create the white space?
library addict is offline   Reply With Quote
Old 03-24-2011, 07:53 AM   #2
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
It's unlikely that it has anything to do with the "calibre6" style, but since you haven't posted the css for this style it's hard to tell you for certain what's going on. It's more likely that ADE doesn't acknowledge a <br> inside an empty <div>. (and the Sony uses the same rendering engine as ADE)

You can use search replace to replace this string:
Code:
<div[^>]*>\s*<br(\s?/)?>\s*</div>
With this:
Code:
<p></p>
But then you also need to enable the 'format scene breaks' option under heuristics. I can add this case to the format scene breaks option so it works in the future.
ldolse is offline   Reply With Quote
Old 03-24-2011, 08:22 AM   #3
library addict
Grand Sorcerer
library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.
 
library addict's Avatar
 
Posts: 12,867
Karma: 35535698
Join Date: Nov 2010
Location: USA
Device: Nexus 7 2, Samsung Galaxy Tab A 8" (retired=Sony PRS650, Kobo Mini)
Where do I find the css? There is a line which has stylesheet1.css

I never put anything in the "extra css" field, just use the defaults Calibre has. I usually manage to muddle through with the little bit of info I understand from reading this board, but confess I don't do anything too fancy. And everytime I think I am beginning to undertand regular expressions, it just makes me realize how much more I have to learn.
library addict is offline   Reply With Quote
Old 03-24-2011, 08:29 AM   #4
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: 29,659
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by library addict View Post
Where do I find the css? There is a line which has stylesheet1.css

I never put anything in the "extra css" field, just use the defaults Calibre has. I usually manage to muddle through with the little bit of info I understand from reading this board, but confess I don't do anything too fancy. And everytime I think I am beginning to undertand regular expressions, it just makes me realize how much more I have to learn.
Use Sigil, it makes the edit process simple.
Or
select the book in the Library (view) of Calibre: Tap 'T' (tweak)
Explode the book. Locate stylesheet1.css
BTW there appears to be a missing space (required) before the closing /> in the BR
theducks is offline   Reply With Quote
Old 03-24-2011, 08:42 AM   #5
library addict
Grand Sorcerer
library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.library addict ought to be getting tired of karma fortunes by now.
 
library addict's Avatar
 
Posts: 12,867
Karma: 35535698
Join Date: Nov 2010
Location: USA
Device: Nexus 7 2, Samsung Galaxy Tab A 8" (retired=Sony PRS650, Kobo Mini)
Spoiler:
@namespace h "http://www.w3.org/1999/xhtml";
.atx {
display: block;
font-size: 0.70588em;
margin-bottom: 0.5em;
margin-left: 3em;
margin-top: 0.5em;
text-align: justify
}
.box {
border: solid;
border-width: 1;
display: block;
line-height: 1.2;
margin-bottom: 1em;
margin-left: 20px;
margin-right: 20px;
margin-top: 1em;
padding-bottom: 1em;
padding-left: 1em;
padding-right: 1em;
padding-top: 1em
}
.calibre {
background-color: #FFF;
display: block;
font-size: 1.41667em;
line-height: 1.2;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
padding-left: 0;
padding-right: 0;
text-align: justify
}
.calibre1 {
display: block;
line-height: 1.2;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
margin-top: 1em
}
.calibre10 {
font-style: italic
}
.calibre11 {
font-weight: bolder
}
.calibre12 {
display: block;
font-size: 1.4em;
font-weight: bold;
margin-bottom: 0.83em;
margin-left: 0;
margin-right: 0;
margin-top: 0.83em
}
.calibre13 {
display: block;
line-height: 1.2
}
.calibre2 {
color: inherit;
cursor: default;
line-height: 1.2;
text-decoration: inherit
}
.calibre3 {
height: 100%;
line-height: 1.2;
width: 100%
}
.calibre4 {
display: block;
font-size: 1.41667em;
line-height: 1.2;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
padding-left: 0;
padding-right: 0;
text-align: justify
}
.calibre5 {
color: blue;
cursor: pointer;
text-decoration: underline
}
.calibre6 {
display: block;
line-height: 1.2
}
.calibre7 {
display: block;
font-size: 1.41176em;
font-weight: bold;
line-height: 1.2;
margin-bottom: 0.83em;
margin-left: 0;
margin-right: 0;
margin-top: 0.83em
}
.calibre8 {
font-weight: bolder;
line-height: 1.2
}
.calibre9 {
display: block
}
.cct {
display: block;
font-size: 0.70588em;
text-align: justify
}
.centerAligned {
display: block;
line-height: 1.2;
margin-bottom: 1.5em;
margin-top: 1.5em;
text-align: center
}
.cfmh {
display: block;
font-size: 0.70588em;
font-style: italic;
text-align: justify
}
.crt {
display: block;
font-size: 0.52941em;
text-align: center
}
.crt1 {
display: block;
font-size: 0.55556em;
text-align: center
}
.crt2 {
display: block;
font-size: 1em;
text-align: center
}
.crt3 {
display: block;
font-size: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
text-align: center
}
.ctag {
display: block;
font-size: 0.70588em;
text-align: center
}
.epiv {
display: block;
font-size: 0.52941em;
margin-left: 8px;
margin-right: 2em;
margin-top: 2em;
text-align: justify
}
.eps {
display: block;
font-size: 0.70588em;
font-style: italic;
margin-bottom: 2em;
margin-right: 2em;
text-align: right
}
.fmh {
display: block;
font-size: 1em;
font-weight: bold;
line-height: 1.2;
margin-bottom: 1em;
margin-top: 2em;
text-align: center
}
.fmhT {
display: block;
font-size: 1em;
line-height: 1.2;
margin-bottom: 2em;
margin-top: 0.5em;
text-align: center
}
.fmtx {
display: block;
font-size: 0.70588em;
text-align: justify;
text-indent: 0
}
.fmtx1 {
display: block;
font-size: 0.70588em;
text-align: justify;
text-indent: 1em
}
.imgepub {
height: auto;
line-height: 1.2;
max-width: 100%;
width: auto
}
.tx {
display: block;
font-size: 1em;
text-align: justify;
text-indent: 0
}



I did manage to fix with an ePub to ePub conversion using the coding ldolse gave me.

Thanks for all of your help.
Moderator Notice
Please wrap long paste's in 'spoiler' tags (eye with red X)

Last edited by theducks; 03-24-2011 at 09:19 AM.
library addict is offline   Reply With Quote
Old 03-24-2011, 09:33 AM   #6
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: 29,659
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
The code makes even less sense now.
BTW Conversion can only work so many wonders

GIGO

You have some 'G' in your original.

IMHO Top, Bottom Margins or Padding the preceding or next block is the way to space out paragraphs,headers ...

calibre6 is a Block with a Line height increase which would be OK for the Div, but NOT for the BR which is part of the (non-existent) content within the div. If yo must stay with the Div, simply replace the BR with a <p>&nbsp;</p> ( a space has height)
theducks is offline   Reply With Quote
Old 03-24-2011, 09:58 AM   #7
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Quote:
Originally Posted by theducks View Post
If yo must stay with the Div, simply replace the BR with a <p>&nbsp;</p> ( a space has height)
That's essentially why I suggested the search and replace with the format scene breaks option - it would do this for you during conversion, but you wouldn't want to stick &nbsp; in the replace box, entities can sometimes have un-desirable effects in the middle of conversion.
ldolse 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
Transfer Calibre converted file to Amazon via email RunnerGirl Calibre 3 11-11-2010 09:17 AM
calibre bloating converted file? blubb Calibre 3 10-18-2010 01:59 PM
Problems Transferring Converted Epub File to Nook Flyweight Calibre 0 08-10-2010 08:44 PM
Calibre viewer setting file time banjomike Calibre 6 06-14-2010 05:18 PM
Calibre viewer no longer displays covers Sigwolf Calibre 3 04-21-2010 11:27 AM


All times are GMT -4. The time now is 11:42 PM.


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