Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-19-2022, 06:39 AM   #1
fabianmoreno01
Member
fabianmoreno01 began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2022
Device: Kobo Aura One
Patching vs. editing CSS for W/O and Breaks

Hello!

I'm new here so I apologize if this has been treated elsewhere. I've taken a look and not seen it yet.

I'm looking to do a couple things on my Kobo Aura One:

– Avoiding widows and orphans
– Inserting a page break before each poem in the poetry books I'm reading (the title of each poem is in upper caps so I reckon it's treated as some sort of heading).

What would be the easiest way of doing this? I haven't clearly understood if I'd rather modify the CSS of the book or patch the firmware of the device...

Important note: I am using version 3.48 of Calibre since my Mac is still running on High Sierra, so I don't have access to some common plug-ins like the KoboTouchExtended.

THANK YOU
fabianmoreno01 is offline   Reply With Quote
Old 03-11-2022, 04:43 AM   #2
jesson345
Enthusiast
jesson345 began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2021
Device: kobo glo hd
1,I think the best way is modify css to meet your requirements。Both calibre or sigil can do it,you dont need the KOBOTOUCH add-on.

2,Epubs css can be well supported by Kobos default setting,except for one thing:Multi fonts support。you must turn on it in line 432 of libnickel.so.1.0.0.yaml file.

Un-Force user font-family in KePubs:
- Enabled: yes
jesson345 is offline   Reply With Quote
Old 03-11-2022, 06:55 AM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jesson345 View Post
1,I think the best way is modify css to meet your requirements。Both calibre or sigil can do it,you dont need the KOBOTOUCH add-on.
The problem with that statement is that the KoboTouch driver is built into calibre and is needed. Editing the book to achieve the desired effects is the right thing, but, the question was really what changes to make.
Quote:
2,Epubs css can be well supported by Kobos default setting,except for one thing:Multi fonts support。you must turn on it in line 432 of libnickel.so.1.0.0.yaml file.

Un-Force user font-family in KePubs:
- Enabled: yes
I don't use patches, but, as the OP does not have access to the KoboTouchExtended driver, they won't be sending books as kepubs. In which case, that patch won't do a thing.


@fabianmoreno01:

The only way to guarantee that each poem starts on their own page is to split them into separate files. This can be done in the calibre editor. If all the poems are in a single file, open the file, right click in the text and select the "Split at multiple locations". Then you need to enter where the split is to take place. There are some examples. But, if the poem titles are a heading, then this could be "//h:h2" where you replace the "2" with the heading level used. Sigil should have something similar.

For widows and orphans, there are a couple of ways to do it. If you are editing the book, then you can add "widows:1;orphans1" to the class for the paragraph text. Or you can do it in the config file on the device by adding the following lines into the "Reading" section:

Code:
readingAdobeOrphans=1
readingAdobeWidows=1
That will set the default widows and orphans for all books. But, it can be overriden. If you do put kepubs on the device, they do not do widows and orphans handling so nothing is needed.
davidfor is offline   Reply With Quote
Reply

Tags
css, orphans, page break, patches, widows


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS question: breaks and indents ignaz wrangel ePub 32 10-09-2015 12:27 PM
Calibre 2.0 problem editing CSS BobC Editor 14 08-24-2014 03:02 PM
Css for keeping scene breaks? Waylander Conversion 1 12-11-2013 09:12 AM
ADE breaks CSS --> CSS Validation: Parse Error / Value Error dasboeh ePub 4 12-10-2012 03:25 AM
CSS for line breaks after dashes? JaneFancher Sigil 4 04-05-2010 12:18 PM


All times are GMT -4. The time now is 02:01 AM.


MobileRead.com is a privately owned, operated and funded community.