Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 11-03-2014, 04:11 AM   #16
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by anacreon View Post
I've just had problems with a poor epub (converted to kepub when transferred to the reader), where I lost a line of text at the bottom (saw just the extreme top of a few letters). I noticed that it had no page_style, so copied one from a good epub and set it to 5 pt top and bottom.
I've tried adding it to my added CSS for conversions, so

body { orphans: 1; widows: 1; } div, p , blockquote {line-height: 1.0}, page { margin-bottom: 5pt; margin-top: 5pt }

but don't know whether it is the right syntax. The beginning was copied from some advice somewhere, and I have no knowledge of the language (Python is it?).

I'd welcome advice.
If you are converting to kepub then I doubt that will have any useful effect: the kepub reader ignores orphans/widows settings, overrides the line height with the height selected on the device, and already has large built-in margins so adding more with @page is probably not helpful.

Edit: On second thought, div {line-height: 1.0} might have an effect, as the kepub reader only overrides line-height for body, p, but I think it is just as likely to be a bad effect as a good one.

Last edited by GeoffR; 11-03-2014 at 04:55 AM. Reason: kepub reader doesn't override line-height for div
GeoffR is offline   Reply With Quote
Old 11-03-2014, 05:54 AM   #17
anacreon
Guru
anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.
 
anacreon's Avatar
 
Posts: 977
Karma: 3475832
Join Date: May 2012
Location: France
Device: Elipsa, Sage, Libra 2
Quote:
Originally Posted by GeoffR View Post
If you are converting to kepub then I doubt that will have any useful effect: the kepub reader ignores orphans/widows settings, overrides the line height with the height selected on the device, and already has large built-in margins so adding more with @page is probably not helpful.

Edit: On second thought, div {line-height: 1.0} might have an effect, as the kepub reader only overrides line-height for body, p, but I think it is just as likely to be a bad effect as a good one.
As a matter of fact, the @page made a huge difference on my epub converted to kepub: I can see all lines, and have the 5pt I want on the bottom instead of the last but one line squashed against the page number, which made it unreadable. But perhaps it is because I added it in the style sheet of the epub.

What I would like is for it to work when I use the convert button in Calibre and that is what I wanted advice on. Thanks to all for the advice. I'll try cybmole's with my margin settings.

@cybmole: why do you eliminate adobe hyphenation?

Last edited by anacreon; 11-03-2014 at 05:59 AM.
anacreon is offline   Reply With Quote
Advert
Old 11-03-2014, 07:05 AM   #18
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by anacreon View Post

@cybmole: why do you eliminate adobe hyphenation?
Because I don't like the unintelligent way in which e-readers hyphenate. ( like part way through some character's surname)
I find myself wanting to check the source to see if the hyphen is supposed to be there !
Kindles don't hyphenate, neither did Sony T2 & older models, but when I briefly had a Sony T3, the bad hyphenation was driving me nuts until I found this css for disabling it. So I've used it ever since.

Maybe Kobo hyphenates quite well, but I'm happier without. I think the kobo android app has a hyphens on/off toggle, ( or maybe that's only the mantano app ), but not the kobo e-reader, so I turn it off in the book & it's fixed for wherever I read.

same with widows / orphans which fool me into thinking chapter end coming up - oh maybe not.....

I strip all line height CSS entries also, as they interfere with device controls, but that has to be a manual edit. I never did find a one-line fits all extra css override

Last edited by cybmole; 11-03-2014 at 07:08 AM.
cybmole is offline   Reply With Quote
Old 11-03-2014, 07:41 AM   #19
Anak
Guru
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 603
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Quote:
Originally Posted by anacreon View Post
I've just had problems with a poor epub (converted to kepub when transferred to the reader), where I lost a line of text at the bottom (saw just the extreme top of a few letters). I noticed that it had no page_style, so copied one from a good epub and set it to 5 pt top and bottom.
I've tried adding it to my added CSS for conversions, so

body { orphans: 1; widows: 1; } div, p , blockquote {line-height: 1.0}, page { margin-bottom: 5pt; margin-top: 5pt }

but don't know whether it is the right syntax. The beginning was copied from some advice somewhere, and I have no knowledge of the language (Python is it?).

I'd welcome advice.
I would suggest to put all your prefered default settings in the body selector.
This is what I usually define as my default preferences:
Code:
body {
border-width : 0;
font-family : ACaslonPro, serif;
font-size : 100%;
font-style : normal;
font-variant : normal;
font-weight : normal;
line-height : normal;
margin : 0;
orphans : 1;
padding : 0;
text-align : justify;
text-indent : 0;
widows : 1;
}

div, p {
margin:0;
padding:0;
}
Probably, not all selectors are really necessary as some of my default settings are identical to the device defaults. I add them here only to 'guarantee' the outcome and avoid 'unpleasant' surprises.

The other selectors you use should only describe what is different from your default settings.

Not like this:
Code:
.indent {
margin: 0;
padding: 0;
text-indent: 1em;
}
but like this:
Code:
.indent {
text-indent: 1em;
}

This also makes or keeps the epub most flexible and all device features can be adjusted by the user. Like font adjustments, margin adjustments, etc.

@page rule
Use this rule only if you read in full screen mode. Only then the reader overrides the hard coded default top and bottom margins that Kobo has added to the firmware.
As long the pageometer is still visible at the bottom of the screen you are not reading in full screen mode.
As mentioned in other post(s) in this thread, most publishers include a @page rule to the CSS and therefore adding a @page rule is not necessary. If it needs tweaking, then modify the orginial @page rule.

Don't use the @page rule to define a left and/or right page margin (margin-left: 5pt;margin-right: 5pt). This will cut off any character with a negative right side bearing.

Last edited by Anak; 11-03-2014 at 07:53 AM.
Anak is offline   Reply With Quote
Old 11-08-2014, 11:09 AM   #20
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Quote:
Originally Posted by GeoffR View Post
This is what my Glo looks like when I read epubs. Although it is patched, the patches are not needed to get the margins like this. If you wanted the bottom margin much smaller than this then you would need to patch, but if you just want to increase the top margin to make it balanced then you can do that without a patch.

There will always be some individual books that give problems. If you want perfect consistency from book to book (I do!) then there is really no choice but to edit those problem books to remove the publisher's many and varied inconsistencies.

Edit: The top page margin used here is 36px on the Glo (= 45px on the H2O), or about 12pt. Most publishers seem to use a page margin of 5pt all around or none at all.

Edit2: Although these margins can be set without a patch, the exact line spacing and font sizes I have selected are not available in the stock firmware.
Could you please tell me how to go about settings margins such as these?
Katsunami is offline   Reply With Quote
Advert
Old 11-09-2014, 12:27 AM   #21
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by Katsunami View Post
Could you please tell me how to go about settings margins such as these?
Without patching the firmware, just change the page margin in the book's stylesheet to @page {margin: 12pt 0 0 0}. You can do this automatically when sideloading the book from Calibre by ticking the "Modify CSS" option in Calibre's KoboTouch driver and creating a file called kobo_extra.css in the root directory of your device containing:
Code:
@page {margin: 12pt 0 0 0}
div, p {widows:1; orphans:1;}
(the orphans/widows setting is not strictly part of the margin, but this setting will override the default or the publisher's settings in the book which is to add up to two extra blank lines at the botom of the page).

There are some books where the above might not work because of the way the publisher has created the stylesheet, but those books can be fixed by using the Modify ePub plugin in Calibre to set the page margins (and remove the .xpgt file if necssary) before sideloading the book.

My device is actually patched though, I use a custom footer in combination with a patch to make the top and bottom margins adjustable from the device. The photo was taken with the slider set to margin size 6, which is what I would normally use for reading epubs, but I can make all four margins bigger or smaller with the adjustment slider on the settings (Aa) menu.

Edit: The advantge of patching is that I can switch between normal mode and full-screen mode and still have even top and bottom margins. (If you set the top margin by changing the book's stylesheet in Calibre, then it will only look balanced in normal reading mode. When you switch to full-screen mode the top margin will be much larger than the bottom margin.)

Edit2: The above really only applies to epubs. If you convert to kepub then there is no need to add any margin, as the kepub reader has very large built-in margins as part of the header/footer in normal mode, and the top/bottom margin is adjustable for kepubs in full-screen mode without a patch.

Last edited by GeoffR; 11-09-2014 at 12:40 AM. Reason: Advantage of patching is that margins are still balanced in full-screen mode ...
GeoffR is offline   Reply With Quote
Old 01-24-2015, 07:29 PM   #22
Maillemom
Connoisseur
Maillemom solves Fermat’s last theorem while doing the crossword.Maillemom solves Fermat’s last theorem while doing the crossword.Maillemom solves Fermat’s last theorem while doing the crossword.Maillemom solves Fermat’s last theorem while doing the crossword.Maillemom solves Fermat’s last theorem while doing the crossword.Maillemom solves Fermat’s last theorem while doing the crossword.Maillemom solves Fermat’s last theorem while doing the crossword.Maillemom solves Fermat’s last theorem while doing the crossword.Maillemom solves Fermat’s last theorem while doing the crossword.Maillemom solves Fermat’s last theorem while doing the crossword.Maillemom solves Fermat’s last theorem while doing the crossword.
 
Posts: 76
Karma: 28488
Join Date: Sep 2013
Location: Bensalem, PA
Device: Nook Classic, Nook STG, Nook Color, Kindle, Kobo H2O
Good Evening - I have read the entire thread and I am a little confused / frustrated.

I'm not a CSS novice, although it has been a while since I have written anything that used CSS, I'm not sure what exactly what I should be doing with the libnickel.so.1.0.0.patch file. Am I placing this in the root directory of my H2O.

All I want is to increase the top margin. For the most part the device is perfect for me, although it would be nice if my favorite font was listed.

Thanks in advance to anyone who answers.

Trice
Maillemom is offline   Reply With Quote
Old 01-25-2015, 06:16 PM   #23
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by Maillemom View Post
Good Evening - I have read the entire thread and I am a little confused / frustrated.

I'm not a CSS novice, although it has been a while since I have written anything that used CSS, I'm not sure what exactly what I should be doing with the libnickel.so.1.0.0.patch file. Am I placing this in the root directory of my H2O.

All I want is to increase the top margin. For the most part the device is perfect for me, although it would be nice if my favorite font was listed.

Thanks in advance to anyone who answers.
If you're wanting to patch the libnickel.so.1.0.0 file post #1 of this thread is the place to start (assuming your H2O is running fw 3.12.0). There are lots of goodies in the Kobo Patcher including extra features for modifying page margins.

If all you want to do is add a small top page margin for standard epubs (not kepubs) then if you're a calibre user the Modify CSS config option in your calibre KOBOTOUCH driver may be a simpler solution. Just create/add something like @page {margin-top: 10pt} to a kobo_extra.css file in your Kobo root directory.

As for having your favourite font listed in the font menu ... have you read post #1 of this Sticky thread? As long as you've named the fonts correctly, copied them to the correct Kobo /fonts directory and done a full power off/on you should be fine.
jackie_w is offline   Reply With Quote
Old 01-25-2015, 10:31 PM   #24
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,786
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I know firmware 3.12.0 ignores px and pt as font size modifiers. Does it respect px and pt as margin modifiers?
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS: margin-top and margin Leonatus ePub 16 06-16-2014 04:29 AM
Margin/word flow issues when converting from RAR(CSS?) to epub... camobmus Conversion 0 06-20-2013 04:20 PM
K5 Margin issues ? wolw Amazon Kindle 1 08-12-2012 12:07 PM
Question on Margin issues with OCR’d text processed for Kindle Timmy_B Workshop 2 11-06-2010 04:31 PM
calibre ignore margin-top and margin-bottom bender Calibre 2 12-11-2009 06:58 AM


All times are GMT -4. The time now is 11:47 PM.


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