04-05-2024, 02:10 PM | #1 |
Member
Posts: 17
Karma: 10
Join Date: Jun 2021
Device: Kobo Sage
|
Kobo Book Description Formatting
Hey, so I have a weird pet peeve around how the spacing for the book descriptions on my kobo [sage]. The line spacing between paragraphs is too big, and until I found a (somewhat clunky) workaround, the book descriptions always started with an extra blank paragraph space.
So far the only solution I've come up with is to use line breaks instead of paragraph breaks, but the drawback there is that on the kobo line breaks often are not always clear to be new paragraphs. Bonus if anyone is able to help me figure out how to use a smaller font size for the book description as well? [Edit to add: I sideload all my books through calibre, and while I know I can change the format/appearance of descriptions in calibre, this does not seem to translate over to my kobo reader] |
04-05-2024, 05:02 PM | #2 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
If/when you become comfortable using kobopatch it may be possible to add further synopsis customisations. Anything which can be achieved using simple CSS styles should be possible. If, having tried them, the existing patches aren't enough for you then come back and we can talk more. |
|
04-05-2024, 05:59 PM | #3 |
Grand Sorcerer
Posts: 10,448
Karma: 225537496
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
There is no patch for this issue, AFAIK. If you use the <p> tag for paragraphs in the calibre comments, your Kobo will insert an empty paragraph there. I've found that the only way to get around this issue is to replace <p> with <br> in the comments. There may be other ways (I dimly remember trying something with metadata plugboards once), but they haven't worked as well for me.
The line-spacing patch decreases line-height, but it doesn't remove the empty paragraphs Kobo readers insert in book descriptions. |
04-05-2024, 06:49 PM | #4 |
Wizard
Posts: 1,518
Karma: 11250344
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Forma, Pocketbook Era, Kindle Oasis 2
|
I use Sigil, and when I put a book description into the metadata editor field, I format like so:
Code:
<p>First paragraph of description.</p><p>Second paragraph.</p><p>Third paragraph and so on.</p> I use a Sage and this is not giving me any extra space when I pull up book details. So if you want to try via Sigil, this may help. No guarantees, since I have no idea what, specifically, your desired look is. |
04-05-2024, 07:20 PM | #5 | |
Grand Sorcerer
Posts: 10,448
Karma: 225537496
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
Quote:
|
|
04-05-2024, 07:25 PM | #6 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Code:
body { font-family: Georgia; margin: 0px; padding: 0px; } Code:
body[qApp_deviceIs???=true] { font-size: ???px; } body[qApp_deviceIs???=true] { line-height: ???em; } An extra bit of CSS code appended to the end of the first item, should suffice to narrow the gap between paragraphs e.g. Code:
p {margin:.5em 0 0 0;} |
|
04-05-2024, 08:58 PM | #7 | |
Member
Posts: 17
Karma: 10
Join Date: Jun 2021
Device: Kobo Sage
|
Quote:
All you have to do is do a mass search/replace selecting the comments section as your field and enter Code:
<div>¶* (*basically div and a paragraph space) |
|
04-05-2024, 09:13 PM | #8 | |
Member
Posts: 17
Karma: 10
Join Date: Jun 2021
Device: Kobo Sage
|
Quote:
|
|
04-05-2024, 09:42 PM | #9 |
Member
Posts: 17
Karma: 10
Join Date: Jun 2021
Device: Kobo Sage
|
Okay, so I got 90% of what I wanted changed. The last thing is gonna needs some digging as I wanna change the margin-top/margin-bottom (or even just the margin in general) for the <p> tag.
ex. in plain html: Code:
<p style="margin:0.5em 0"> Last edited by m_pluto; 04-05-2024 at 09:43 PM. Reason: formatting |
04-05-2024, 10:24 PM | #10 |
Member
Posts: 17
Karma: 10
Join Date: Jun 2021
Device: Kobo Sage
|
So here is an example of what I have going on (still figuring out how to get the screenshot feature working, so I had to settle for taking a picture with my phone for now....). I'd like to change the margins to be less than half, more than what <br/> would allow for between the paragraphs (if at all possible). Bonus points for text indent maybe if possible?
Spoiler:
|
04-06-2024, 01:08 AM | #11 | |
Grand Sorcerer
Posts: 10,448
Karma: 225537496
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
Quote:
|
|
04-06-2024, 09:35 AM | #12 |
the rook, bossing Never.
Posts: 11,675
Karma: 87654321
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
|
04-06-2024, 11:02 AM | #13 | ||
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Quote:
The patch named Custom synopsis details line spacing would be the safest one to customise with the extra <p> tag CSS required for your 10%. BTW I don't think you need to take the living-dangerously option of manually editing calibre's database to remove the automatic linefeed chars in the calibre comments field. You should be able to do that using a calibre Metadata Plugboard with the template language. Comments is one of the fields available for on-the-fly modifying during calibre's send-to-device plus the calibre Kobo driver (KOBOTOUCH/KOBOTOUCHEXTENDED) option of automatic metadata update on every USB connect. All that should be needed is a simple replace '\n' with ''. |
||
04-06-2024, 05:27 PM | #14 | |
Member
Posts: 17
Karma: 10
Join Date: Jun 2021
Device: Kobo Sage
|
Quote:
As for the metadata, huh, I'll look into that, as I hadn't thought of it before. |
|
04-06-2024, 07:25 PM | #15 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Spoiler:
It should work as you wish on your Sage once you enable it. Your new requirements are handled by the last half of the 1st Replace (in red). Change those margin and text-indent values as you see fit. You can customise line-height as you've done previously using the last Find/Replace. Please note that the additional code for <p> tags made the Replace code longer than the Find code. So it was necessary to free up some space elsewhere by removing code that will never be used by your Sage. Hence the need for the two blue Find/Replace lines. N.B.: If anyone other than @m_pluto is reading this, please don't use it on any of these older Kobo devices:
ETA: I tested this myself on an old AuraOne 7.8" device which is equivalent to a Sage for nickel.yaml patches. Last edited by jackie_w; 04-06-2024 at 07:29 PM. Reason: ETA |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I paste description (comments) without the html formatting? | webipsum | Calibre | 5 | 07-15-2014 07:38 PM |
Touch Kobo Touch book description | trekker25 | Kobo Reader | 6 | 04-02-2012 03:09 PM |
[KOBO] Strip existing formatting to apply my own default formatting to all books | digital_steve | Calibre | 2 | 08-10-2010 06:34 PM |
Retaining formatting in metadata (book description) | FizzyWater | Calibre | 5 | 05-13-2010 10:26 PM |