View Single Post
Old 11-05-2009, 04:31 PM   #1
NASCARaddicted
Addict
NASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and grace
 
Posts: 340
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch, Pocketbook Touch HD
Remove spacing between paragraphs - what about div tags ?

Currently I converting a few html files to epub.

I use the paragraph tags <p> and </p> to mark a new paragraph (wow, who would have thought that)

When I convert from html to epub, I use the "Remove spacing between paragraphs" command. I know, this command sets an intent of 1.5 em on a paragraph - and I love it. With this, my ebooks look even closer to real books.

However, latelty I started to use div tags in the html files to to "enhance" the look of the text. For example, I use margin-left and margin-right on a few lines, so that the outfit of some of the text differs from the rest of the text.

In this case, the special text is a list of things with numbers in front of it.
I want it to look like:
normal text, normal text, normal text,
normal text, normal text, normal text,
normal text, normal text, normal text,
1.special text, special text
2.special text, special text
3.special text, special text
normal text, normal text, normal text,
normal text, normal text, normal text,
normal text, normal text, normal text,
normal text, normal text, normal text,


As I said, I use div tags for this (I am a novice on html so maybe I am wrong, but personally, I think div tags are great).

However, this also caused some problems, because the "Remove spacing between paragraphs" command not only sets an intent on the p-tag but also on the div tags.

So now my text looks something like:
normal text, normal text, normal text,
normal text, normal text, normal text,
normal text, normal text, normal text,
1.special text, special text
2.special text, special text
3.special text, special text
normal text, normal text, normal text,
normal text, normal text, normal text,
normal text, normal text, normal text,
normal text, normal text, normal text,

See what I mean ? The list part doesn't look even anymore. The "1" has an intent - even thought I don't want it to have on.

I noticed all this stuff is can be changed by editing the stylesheet.css file - but this can become tedious.

So, to sum it all up: Is there a way to tell Calibre to set an intent on the p tags - but to leave the div tags alone ?

Thanks in advance

Last edited by NASCARaddicted; 11-05-2009 at 04:44 PM.
NASCARaddicted is offline   Reply With Quote