Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-07-2012, 03:02 AM   #16
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
I'm very well aware of how to edit the code - I'm a professional programmer and do this stuff as a part of my job. But in the cases where Calibre will do the job for me, I let it do so. In the cases that it doesn't, that's when deeper investigations are required, but even then the problem can always, in my experience, be sorted using Calibre's "search and replace" facility.
HarryT is offline   Reply With Quote
Old 05-11-2012, 06:27 PM   #17
PortMan
Junior Member
PortMan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2012
Device: Nook Touch
OK, here are some passages from the html files:

For the first one (the one with almost nothing in the CSS file):
Code:
<p><span style="margin-right: 10px;font-size: large;">1</span><span style="text-transform: uppercase;">In</span> the  beginning God created the  heaven and the  earth.</p>
<p><span style="margin-right: 10px;font-size: large;">2</span>And the earth was without  form, and void; and  darkness<i>was</i> upon the face of the deep.   And the  Spirit of God  moved upon the face of the waters.</p>
<p><span style="margin-right: 10px;font-size: large;">3</span>And God  said, Let there be  light: and there was light.</p>
Here's a passage from the second one:
Code:
<p class="calibre3">“Why does it have to be you?” Teena asked.</p>
<p class="calibre3">He looked up and saw how she stood with her back to him.</p>
<p class="calibre3">“Teena” he said, sadly.</p>
<p class="calibre3">“Why?”</p>
PortMan is offline   Reply With Quote
Advert
Old 05-12-2012, 07:38 PM   #18
geormes
Groupie
geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.
 
geormes's Avatar
 
Posts: 152
Karma: 216188
Join Date: Jul 2010
Device: Nook Classic, Kobo Touch, Nook Simple Touch, Kobo Aura
Quote:
Originally Posted by JSWolf View Post
Another issue is the code does get changed. If you are converting an ePub that has @page and/or embedded fonts, you get a nightmare in return due to Calibre's placing all the CSS @ code in almost every XML file. I prefer to know how to edit the code. In fact, it's not that difficult to do. Sometimes all it takes is removing @page & body if either/both exist and putting in a new body style. Sometimes all you need is a body style with the margin as you want them.

Code:
body {
  font-family: serif;
  widows: 0;
  orphans: 0;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  text-align: justify
}
Most newer ereaders let you change fonts, font-size, margins, etc. Why not have Calibre remove fonts, margins, font-size, etc. when doing an epub to epub conversion? Then you are left with a calibre generated stylesheet like this:

.calibre {
display: block
}
.calibre1 {
height: auto;
width: auto
}
.calibre2 {
font-weight: bolder
}
.calibre3 {
display: block;
font-weight: bold
}
.calibre4 {
display: block
}
.calibre5 {
font-style: italic
}
geormes is offline   Reply With Quote
Old 05-12-2012, 10:20 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,294
Karma: 145488788
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 HarryT View Post
I'm very well aware of how to edit the code - I'm a professional programmer and do this stuff as a part of my job. But in the cases where Calibre will do the job for me, I let it do so. In the cases that it doesn't, that's when deeper investigations are required, but even then the problem can always, in my experience, be sorted using Calibre's "search and replace" facility.
But once you do the conversion, you don't know if it failed unless you know where the section breaks are supposed to be and where they now are not.
JSWolf is offline   Reply With Quote
Old 05-12-2012, 10:22 PM   #20
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,294
Karma: 145488788
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 geormes View Post
Most newer ereaders let you change fonts, font-size, margins, etc. Why not have Calibre remove fonts, margins, font-size, etc. when doing an epub to epub conversion? Then you are left with a calibre generated stylesheet like this:

.calibre {
display: block
}
.calibre1 {
height: auto;
width: auto
}
.calibre2 {
font-weight: bolder
}
.calibre3 {
display: block;
font-weight: bold
}
.calibre4 {
display: block
}
.calibre5 {
font-style: italic
}
Because the way I did it allows you to have the embedded font or if the reader app/device allows font changing, you can change the font. It gives you more choice without taking anything away.
JSWolf is offline   Reply With Quote
Advert
Old 05-13-2012, 11:43 AM   #21
geormes
Groupie
geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.geormes ought to be getting tired of karma fortunes by now.
 
geormes's Avatar
 
Posts: 152
Karma: 216188
Join Date: Jul 2010
Device: Nook Classic, Kobo Touch, Nook Simple Touch, Kobo Aura
Quote:
Originally Posted by JSWolf View Post
Because the way I did it allows you to have the embedded font or if the reader app/device allows font changing, you can change the font. It gives you more choice without taking anything away.
True. But I am LAZY.
If an automated method exists that comes close to what I want most of the time, I prefer it. If I really like the embedded font and it's not on my device I can usually add it.
Did I mention I am LAZY?
geormes is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do not remove paragraph spaces in Kindle output module andrewdru Conversion 15 08-29-2011 11:29 AM
WTB: Ability to change indent without ticking 'remove spaces between lines' gweminence Calibre 9 08-27-2011 09:05 AM
expression to remove double spacing between paragraphs ktj Calibre 4 07-26-2011 02:38 PM
How can I remove spaces from folder and file names? jusmee Calibre 1 11-06-2009 10:36 PM
Anyway to remove paragraph spaces in pdb files? twister Other formats 3 03-12-2009 09:36 PM


All times are GMT -4. The time now is 08:01 AM.


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