View Single Post
Old 03-30-2021, 12:20 PM   #12
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: 80,109
Karma: 148951733
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Just remember that an eBook is not a pBook and you cannot always expert the pBook format to work for an eBook. Make the eBook work as an eBook and do not try to duplicate the pBook format exactly.

For example, don't use chapter headers with overly large wasted space or offset text at a smaller size. Don't use paragraph spaces in the eBook as they don't work. Also, have the text full justified. But you only need to specify that once in the <body> class. Also, the main body text should not be given a font size so it an go with the default of 1em. Also, forget line-height as that doesn't work. Don't set a L/R margin. And don't embed fonts unless you have a need. Just trying to duplicate the fonts of the pBook doesn't work.

I've seen way too many eBooks make these mistakes and need fixing.

Here is a simple CSS that I ended up with after fixing the CSS.

Code:
blockquote {
  margin-top: 1em;
  margin-right: 1.5em;
  margin-bottom: 1em;
  margin-left: 1.5em;
}
body {
  widows: 1;
  orphans: 1;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  text-align: justify;
}
img {
  max-height: 100%;
  max-width: 100%;
}
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
}
.chapter {
  font-size: 2.2em;
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
.copy {
  font-size: small;
  text-align: center;
  text-indent: 0;
  margin-top: 0.8em;
}
.copy1 {
  font-size: small;
  text-align: center;
  text-indent: 0;
}
.coverpage {
  text-align: center;
  padding: 0;
  margin: 0;
}
.ded {
  font-size: large;
  text-align: center;
  text-indent: 0;
  margin-top: 3em;
}
.indent9 {
  padding-left: 1.8em;
}
.largecap {
  font-size: 2.2em;
  font-weight: bold;
  line-height: 0;
}
.noindent {
  text-indent: 0;
}
.part {
  font-size: 2.2em;
  margin-top: 3em;
  text-align: right;
}
.space {
  margin-top: 0.8em;
  text-indent: 0;
}
.space1 {
  margin-top: 1em;
}
.spacebreak {
  text-align: center;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
table.padded {
  width: 100%;
}
td.left {
  text-align: left;
  vertical-align: top;
  text-indent: 0;
}
Here is a sample of the eBook code following <body>.

Code:
<h2 class="chapter">Chapter One</h2>
<p class="noindent"><span class="largecap">‘<b>T</b></span>here’s something very wrong here and I expect you to do something about it. Isn’t that what the police are for?’</p>
<p>Sergeant Troy observed his breathing, a trick he had picked up from a colleague at Police Training College who was heavily into T’ai Ch’i and other faddy Eastern pursuits. The routine came in very handy when dealing with abusive motorists, boot-deploying adolescents and, as now, with barmy old ladies.</p>
<p>‘Indeed we are, Miss…er…’ The sergeant pretended he had forgotten her name. Occasionally this simple manoeuvre caused people to wonder if their visit was really worth the bother and to drift off, thus saving unnecessary paperwork.</p>
<p>‘Bellringer.’</p>
<p>Chiming in, thought the sergeant, pleased at the speed of this connection and at his ability to keep a straight face. He continued, ‘But are you sure there’s anything here to investigate? Your friend was getting on in years, she had a fall and it was too much for her. It’s quite common, you know.’</p>
<p>‘Rubbish!’</p>
<p>She had the sort of voice that really got up his nose: clear, authoritative, upper upper middle class. I bet she’s ordered a few skivvies around in her time, he thought, the noun springing easily to mind. He and his wife enjoyed a good costume drama on the television.</p>
<p>‘She was as strong as an ox,’ Miss Bellringer stated firmly. ‘As an ox.’ There was a definite tremor on the repetition. Jesus, thought Sergeant Troy, surely the old bat wasn’t going to start snivelling. Mechanically he reached for the Kleenex under the counter and returned to his breathing.</p>

Last edited by JSWolf; 03-30-2021 at 12:34 PM.
JSWolf is online now   Reply With Quote