I got a little lost in the Kobo Rocks thread and the line spacing discussion, so I would like to know...

Can I use calibre to get tighter line spacing, and still fine tune the line spacing thru the Kobo GUI?

What would I need to set on the following screen.

Thanks.

Not absolutely certain but I think you need to attach the line spacing to a <p> or <div> or other lower level tag and not to the body tag. For an .epub file, the line-height in the body will have no effect. If you use the lower level tags, the Kobo UI will not let you modify the line spacing.

Not absolutely certain but I think you need to attach the line spacing to a <p> or <div> or other lower level tag and not to the body tag. For an .epub file, the line-height in the body will have no effect. If you use the lower level tags, the Kobo UI will not let you modify the line spacing.

Regards,
David

So your saying that i can have fixed tighter line spacing OR changing it through the GUI, but I can't have both?

You can force the Kobo to have tighter line spacing by editing the stylesheet.css file for the epub. 120% or 1.2em works well for me. Once it's within the epub though, the slider to adjust line spacing from the Kobo GUI has no effect, which isn't really a problem if you've set the css correctly to your liking.

I use Sigil to set the line-height in the stylesheet, usually on the p tag, e.g.,

Code:

p
{
line-height: 1.2em;
}

If there is already a p tag in the stylesheet then you need to add it to that. You can also be more selective--perhaps you do not want to set the line-height for all paragraphs, but only for some styles?

Also, some epubs do not use p tags for paragraphs, they may use divs or spans. This is annoying, but with Sigil you can easily check for this.

I was hoping that someone had already done this and would be able to give a known answer (that could be entered on the window I captured in my first post.)

Everyone, thank you for the suggestions, but ...

Quote:

Originally Posted by DNSB

Not absolutely certain but I think you need to attach the line spacing to a <p> or <div> or other lower level tag and not to the body tag. For an .epub file, the line-height in the body will have no effect. If you use the lower level tags, the Kobo UI will not let you modify the line spacing.

Regards,
David

Quote:

Originally Posted by Ripplinger

You can force the Kobo to have tighter line spacing by editing the stylesheet.css file for the epub. 120% or 1.2em works well for me. Once it's within the epub though, the slider to adjust line spacing from the Kobo GUI has no effect, which isn't really a problem if you've set the css correctly to your liking.

Quote:

Originally Posted by ShellShock

I use Sigil to set the line-height in the stylesheet, usually on the p tag, e.g.,

Code:

p
{
line-height: 1.2em;
}

If there is already a p tag in the stylesheet then you need to add it to that. You can also be more selective--perhaps you do not want to set the line-height for all paragraphs, but only for some styles?

Also, some epubs do not use p tags for paragraphs, they may use divs or spans. This is annoying, but with Sigil you can easily check for this.

Some of these suggestions are as helpful as telling me I can modify the spacing by editing the EPub.

I'm currently using a modified font, so I can get closer line spacing, but I would like to use the internal fonts (once Kobo fixes the italics bug(s).)

You can try the code I posted above in the Calibre Extra CSS field, see if it works. It may not, especially if there is already a p tag in the stylesheet.

I emailed Kobo support about the problem with italics displaying as bold in epubs for some of their fonts, e.g. Kobo Nickel. Their response was essentially I should use kepub instead, as this is their main platform, and the fonts work OK in kepubs. They do not seem interested in fixing the fonts for epubs.

So your saying that i can have fixed tighter line spacing OR changing it through the GUI, but I can't have both?

Thanks.

Correct. I use 1.1 in my stylesheet for body text and 1.2 for headings and other non-body text. I also tend to use one font for all my reading so I don't run into the different appearing line spacing with different fonts. Margins are also set in the stylesheet. the Kobo slider will let you increase the left/right margins if you wish to do so.

You can force the Kobo to have tighter line spacing by editing the stylesheet.css file for the epub. 120% or 1.2em works well for me. Once it's within the epub though, the slider to adjust line spacing from the Kobo GUI has no effect, which isn't really a problem if you've set the css correctly to your liking.

The line spacing slider doesn't work even if it can make changes as the minimum of 1.3 is too big to start with and can only get bigger from there.

I use Sigil to set the line-height in the stylesheet, usually on the p tag, e.g.,

Code:

p
{
line-height: 1.2em;
}

If there is already a p tag in the stylesheet then you need to add it to that. You can also be more selective--perhaps you do not want to set the line-height for all paragraphs, but only for some styles?

Actually, do the following and it will work better overall...

Code:

p, div, h1, h2 {
line-height 1.2em
}

Put that at the top of the CSS and if there are any other styles used that change the line-height, that will override your 1.2em and if not, your 1.2em will work as is for all those.

Quote:

Also, some epubs do not use p tags for paragraphs, they may use divs or spans. This is annoying, but with Sigil you can easily check for this.

A span is not a paragraph level tag. So it doesn't need a line-height to change the Kobo default.

The line spacing slider doesn't work even if it can make changes as the minimum of 1.3 is too big to start with and can only get bigger from there.

But if you want to make a temporary change to a bigger line spacing, you can't. Or if you are sharing the library with your family and they like different settings. When I fiddle with an epub, I like to remove as many of the hard-coded settings as possible. That gives the most flexibility when reading the book. For line spacing, Kobo's minimum of 1.3 is almost right for me. I'd probably use 1.2 if it was there, but it isn't enough of advantage to make me hard-code it.

And for anyone who wants to know, the line spacing settings are: 1.3, 1.35, 1.4, 1.6, 1.775, 1.9, 2, 2.2, 3. I have no idea why those numbers, but they have been like this for a while.