View Full Version : Editing problems


Brientje
09-30-2010, 09:48 AM
Hi,

I have a problem and I'm hoping that someone can help me.
I have used Sigil and Calibre for a long while now and I haven't expirienced any trouble with it until now. I don't know if the problem lies with Sigil or with something else.
I have made an epub book from pdf. First I have converted the book to html by using BookDesigner and then after making some changes (toc and pagebreaks) I have made the epub version by using Calibre. From there I have made some other changes with Sigil, like making open lines between paragraphs (like the line between Hi and First of all...) I want to keep my alineas together. The problem starts when I look at the book with ADE or my reader. The spaces have disappeared and all the alineas are pressed together.
I have the same problem with another book, this book was already in Epub form and I just wanted to creat empty lines between certain paragraphs. But they also don't show in ADE and on my reader.
I have done these kind of things before, but I have never had this problem before!
I have checked the book on an other Epub program, like Jutoh and the spaces were still in the book. So I think the problem lies with the ADE/reader, they can't show the spaces for some kind of reason.
I really have no idea why. I have seen the sticky with the bugs in ADE like in the CSS stylesheet, but I don't know if this problem has something to do with that. Could someone tell me what I'm doing wrong?

Thanks,
Brientje

ghostyjack
09-30-2010, 01:38 PM
I know some people here frown upon it but have you tried the following:

<p>&nbsp;</p>

This gives me a blank line (or more precisly a line that contains a single space in it but you can't see than when reading).

I find this useful for scene breaks or for sorting out the layout of the title page, etc.

charleski
09-30-2010, 03:14 PM
If you want a linebreak, use a separate class for the first paragraph after the break and set it to
margin-top: 1.2em;
margin-bottom: 0;
in the css.

Don't get into the bad habit of using <br/>s or empty paragraphs, it just makes things harder for you in the end.

Jellby
10-01-2010, 04:20 AM
... or use a styled <div> with, for instance:

div.scenebreak {
height: 0;
margin-top: 2em;
page-break-after: avoid;
}

ghostyjack
10-01-2010, 04:55 AM
I wish someone would explain why it's bad to use <p>&nbsp;</p>. When I'm reading the book, I can't see anything added and it does provide a means of adding a one-line high space.

Pablo
10-01-2010, 06:23 AM
I First I have converted the book to html by using BookDesigner and then after making some changes (toc and pagebreaks) I have made the epub version by using Calibre.

If you use BookDesigner, you could try my HTML02HTML utility. It converts BookDesigner's "html0" to a clean HTML with CSS ready to be imported with Sigil (see my signature)

Jellby
10-01-2010, 06:29 AM
I wish someone would explain why it's bad to use <p>&nbsp;</p>. When I'm reading the book, I can't see anything added and it does provide a means of adding a one-line high space.

Basically, it's not semantic. If you want some vertical space, add some vertical space, and not a paragraph with a non-breaking space.

The effect might most of the time be what you want, but you can't easily style it. What if you want more or less space? What if a page-break happens just after it? What if you (or someone else) decides to have paragraphs with a coloured background?

theducks
10-01-2010, 07:56 AM
Basically, it's not semantic. If you want some vertical space, add some vertical space, and not a paragraph with a non-breaking space.

The effect might most of the time be what you want, but you can't easily style it. What if you want more or less space? What if a page-break happens just after it? What if you (or someone else) decides to have paragraphs with a coloured background?

Oooo...!:bulb:
Maybe I have been doing it wrong and your way would be lots more better :)
I have been placing small jpeg's into the scene breakes (just like they appear in their paper cousins).

Would a single "Background Image" in the CSS (by itself) be a better way, or does ther need to be foreground text to force the size?

charleski
10-01-2010, 08:08 AM
Everything Jellby said. And also, don't forget to think about the future. Loads of ebooks look fine now, but under the hood they're a ticking time-bomb that might explode when converted into some future format.

The main point of separating the semantic and presentational aspects of the code is that it makes it very easy to modify the presentation to suit any changing conditions. If a future format comes out that offers some compelling enhancements, which is better: changing a couple of lines in the css or having to do an exhaustive search and replace on the entire code?

It's pretty obvious that many people are having a hard time producing good-looking ebooks as it is, even when working from digital sources. The way to avoid this is to ensure that the code is structured as clearly as possible using the semantic/presentational distinction.

Brientje
10-01-2010, 11:12 AM
Thank you all so much for your replies!
But after trying the suggestions I noticed that perhaps I havent explained myself good enough, so if cooy/paste an example;

The stake no longer stood upright, but leaned sharply, as though about to fall, and a thin loop of rope trailed from it, floating like a hangman's noose on the waning tide. William was conscious of some visceral uneasiness; the tide alone would not have taken the whole body. Some said there were crocodiles or alligators here, though he had not yet seen one himself. He glanced down involuntarily, as though one of these reptiles might suddenly lunge from the water at his feet.
The air was still warm, but a small shiver went through him.
He shook this off, and turned away toward his lodgings. There would be a day or two before he must go, he thought, and wondered whether he might see the blue-eyed Mrs. MacKenzie again before he left.

LORD JOHN LINGERED for a moment on the porch of the inn, watching his son vanish into the shadows under the trees. He had some qualms; the matter had been arranged with more haste than he would have liked-but he did have confidence in William's abilities. And while the arrangement clearly had its risks, that was the nature of a soldier's life. Some situations were riskier than others, though.
He hesitated, hearing the buzz of talk from the taproom inside, but he had had enough of company for the night, and the thought of tossing to and fro under the low ceiling of his room, stifling in the day's trapped heat, determined him to walk about until bodily exhaustion should ensure sleep.

I want the empty line between ...again before he left. and LORD JOHN LINGERED... Not between each paragraph. Sorry for the mix-up. I hope someone has a suggestion to help me with this.

Jellby
10-01-2010, 11:26 AM
Like this:

<p>The stake no longer ... before he left.</p>

<p class="spaced">LORD JOHN LINGERED for a moment ... ensure sleep.</p>

with:

p { margin: 0; text-indent: 1em; }
p.spaced { margin-top: 2em; text-indent: 0; }

or:

<p>The stake no longer ... before he left.</p>

<div class="scenebreak"/>

<p>LORD JOHN LINGERED for a moment ... ensure sleep.</p>

with:

p { margin: 0; text-indent: 1em; }
div.scenebreak { height: 0; margin-top: 2em; page-break-after: avoid; }
div.scenebreak + p { text-indent: 0; }

theducks
10-01-2010, 11:32 AM
Thank you all so much for your replies!
But after trying the suggestions I noticed that perhaps I havent explained myself good enough, so if cooy/paste an example;

The stake no longer stood upright, but leaned sharply, as though about to fall, and a thin loop of rope trailed from it, floating like a hangman's noose on the waning tide. William was conscious of some visceral uneasiness; the tide alone would not have taken the whole body. Some said there were crocodiles or alligators here, though he had not yet seen one himself. He glanced down involuntarily, as though one of these reptiles might suddenly lunge from the water at his feet.
The air was still warm, but a small shiver went through him.
He shook this off, and turned away toward his lodgings. There would be a day or two before he must go, he thought, and wondered whether he might see the blue-eyed Mrs. MacKenzie again before he left.

LORD JOHN LINGERED for a moment on the porch of the inn, watching his son vanish into the shadows under the trees. He had some qualms; the matter had been arranged with more haste than he would have liked-but he did have confidence in William's abilities. And while the arrangement clearly had its risks, that was the nature of a soldier's life. Some situations were riskier than others, though.
He hesitated, hearing the buzz of talk from the taproom inside, but he had had enough of company for the night, and the thought of tossing to and fro under the low ceiling of his room, stifling in the day's trapped heat, determined him to walk about until bodily exhaustion should ensure sleep.

I want the empty line between ...again before he left. and LORD JOHN LINGERED... Not between each paragraph. Sorry for the mix-up. I hope someone has a suggestion to help me with this.

The Paragraph for the type beginning with smallcaps (Lord John...) should have a class selector of its own. say:
<p class="newscene">LORD JOHN LINGERED for a moment on the porch of the inn, watching his son vanish into the shadows under the trees. He had some qualms; the matter had been arranged with more haste than he would have liked-but he did have confidence in William's abilities. And while the arrangement clearly had its risks, that was the nature of a soldier's life. Some situations were riskier than others, though. </p>

the style sheet can now control ALL paragraphs that have that same class selector.

p.newscene {
padding-top: 2em; /* pad the normal top margin for this class */
/* margin-top: 1em; inherit page paragraph margin preffered */
}


See, 1 class that pads extra at the start of a scene, but can inherit the general para (p) style. K.I.S.S. :thumbsup:

Valloric
10-02-2010, 10:08 AM
Everything Jellby said. And also, don't forget to think about the future. Loads of ebooks look fine now, but under the hood they're a ticking time-bomb that might explode when converted into some future format.

This. This a hundred times over.

ghostyjack
10-04-2010, 04:54 AM
Now that makes sense. Looks like I'll need to go through all my books any make the changes now before they get to unmanageable levels.

Brientje
10-05-2010, 06:22 AM
Thanks,

I've tried it and (of course:D) it worked!!
You guys are the best!