Quote:
Originally Posted by vjjustin
In the dictionary customization patch, is there anyway to adjust the paragraph height (The space between paragraphs)? Line-height only changes the space between lines within a paragraph.
Couple of dictionaries I converted has blank space after every paragraph, which is almost every line. This is killing the appearance and usefulness.
Edit: I see that margin-top is already set to zero. Is there any way to add margin-bottom as well? This might be the reason.
|
I don't know whether this is any help to you, but just in case ...
If my own extra custom dictionaries are anything to go by they usually aren't structured like the Kobo default ones (which use HTML ordered lists <ol><li> etc). A lot of my custom dictionaries use a nested <blockquote> structure instead. I think the default css for <blockquote> probably includes a top/bottom margin of 1em. When patching my own Kobos I've changed the following section of the patch `Dictionary text font-family/font-size/line-height - beta`in libnickel.so.1.0.0.patch
Original patch:
Code:
# ##### N.B. Do not change the next 2 lines #####
find_base_address = `* { font: %1px %2; line-height: %5em; }`
replace_string = 0000, `* { font: %1px %2; line-height: %5em; }\ndiv.descriptionFont { font-family: %3; }\nol { font-size: %1px; font-weight: bold; margin-left: %4em; margin-top: 0px; }\nol p { font-size: %1px; font-weight:normal; }\n`, `* { font-size: 40px; line-height: 1.4em; font-family: Georgia ;}\n \nol { margin-left: 1em; margin-top: 0px; }\nol p { font-size: 1em; font-weight:normal; }\n`
# ##### N.B. Do not change anything above this line #####
If your custom dictionaries also use nested <blockquote>, you could try to reduce the excess vertical whitespace by changing the replace_string (despite the warning

):
Code:
replace_string = 0000, `* { font: %1px %2; line-height: %5em; }\ndiv.descriptionFont { font-family: %3; }\nol { font-size: %1px; font-weight: bold; margin-left: %4em; margin-top: 0px; }\nol p { font-size: %1px; font-weight:normal; }\n`, `* { font-size: 40px; line-height: 1.4em; font-family: Georgia ;}\n\nol {margin-left:1em; margin-top:0}\nblockquote {margin:0.5em 0 0.5em 1em} blockquote>blockquote {margin:-0.5em 0 0 2em}\n`
N.B.:
- Don't forget that it is important to retain the original length of the replace_string.
- To add the extra <blockquote> CSS I needed to reduce the characters available for changing the font-family from Georgia to a custom font. This may or may not be important to you.