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 02-21-2014, 06:02 AM   #16
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 EndlessWaves View Post
#1 Apart from the gap at the bottom the text does go right to the edges with a margin of 0 so as mentioned above if you're seeing otherwise it's something that the book's creator has felt necessary to set for some reason (legtimate or otherwise)
Unfortunate, this is not correct. The Kobo adds a default minimum margin that cascades the margins that are set in the book.

Code:
@page {margin:0;}
body, p {margin:0;}
or
Code:
body, p {margin-left:0;margin-right:0;}
This will not give you a left to right edge to edge text display.

create a page with these simple, minimalistic css instructions:


Code:
/* set all page margins to 0 */
@page {margin:0;}
body, p, div {
margin:0;
padding:0;
}
/* foreground color to black and background color to white */
p, div {
color: black;
background-color: white;
}
/* save the book as as .epub and/or .kepub.epub
/*
/* The black foreground area is the actual text display window
/* The white edge at the top, right, bottom and left are the
/* minimum default margins set by Kobo and which can not be
/* altered by the user or CSS properties.
/*
/* In short, Kobo readers don't use the full screen to display text.
/* That is an decision made by Kobo and Kobo is the only manufacturer
/* to my knowledge that does this.
/*
/* E.g. Kobo Touch
/* Screen size: 800 × 600
/* Kobo default minimum margin: 10px (approximately, it represents the
/* white margins around the edge of the screen.)
/* The maximum, useable available screen resolution is: 780×580.
/* But this is even to optimistic as Kobo also uses
/* a relative huge bottom margin
/* and in the case of Kobos proprietary kepub format also
/* a relative huge top margin
/*
/* Same applies to other Kobo readers, just 'scale' the
/* minimum Kobo default margin
Anak is offline   Reply With Quote
Old 02-21-2014, 07:31 AM   #17
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 cybmole View Post
can it be done via CSS tweaks added to the kobotouchdriver, then i'd not be changing the actual book in my calibre library.

surely it's a @page settting, not a margin-top setting , unless that goes in the body CSS ?
For a calibre user already using the kobo driver's kobo_extra.css to address widows/orphans, adding an extra @page with a margin-top value of choice, is easily the least masochistic solution. Fix once and forget about it.

Then, if Kobo ever again decide to change the default top margin in new firmware, all you need to do is change one line and resend all your books from calibre. As they already did this twice in my short Kobo experience, I like to be prepared -- though having witnessed this forum's meltdown after the first change maybe they won't do that again in a hurry

Last edited by jackie_w; 02-21-2014 at 07:35 AM.
jackie_w is offline   Reply With Quote
Advert
Old 02-21-2014, 07:36 AM   #18
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Anak: Firstly, you have the colours reversed. It didn't show up how you wanted it to.

And you are wrong about the side margins. Or at least for an epub. For both my Glo (FW3.2.0) and my Touch (FW3.0.1), the text stretches all the way across the screen. There is a small gap at the top and the footer at the bottom. The margin at the bottom is a bit harder to judge. The black background stops with the text, not the bottom of the view port. Attached is a screen shot from the Glo that shows how much space is being used.

Kepubs are different. They do have a fixed margin on the sides. And they have the header. The footer appears to take the same space.
Attached Thumbnails
Click image for larger version

Name:	screen_003.png
Views:	321
Size:	113.5 KB
ID:	119352  
davidfor is offline   Reply With Quote
Old 02-21-2014, 08:12 AM   #19
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 jackie_w View Post
For a calibre user already using the kobo driver's kobo_extra.css to address widows/orphans, adding an extra @page with a margin-top value of choice, is easily the least masochistic solution. Fix once and forget about it.

Then, if Kobo ever again decide to change the default top margin in new firmware, all you need to do is change one line and resend all your books from calibre. As they already did this twice in my short Kobo experience, I like to be prepared -- though having witnessed this forum's meltdown after the first change maybe they won't do that again in a hurry
I will try your suggestions, but I read this elsewhere:
If there are any "@page" rules in "kobo_extra.css", it removes any existing @page rules from the stylesheets in the epub.
I now should create a kobo-extra.css file , as per the above , and place it in root directory of Kobo Aura via windowcopy/paste ?

calibre adds a page_styles.css
@page {
margin-bottom: 5pt;
margin-top: 5pt
}
to every conversion ?

so I need to decide on a margin-bottom: value or else the calibre code will be removed & it will default to ?zero? - which may actually be good as the general gripe seems to be too much white space at bottom ?

having done that I need to place the kobo_extra.css file in root directory of Kobo, via windows copy/paste, and then re-send my books in order to see the effect ?
I have tried that & I am not seeing any effect ?
i am seeing 2 x enabled kobo device drivers in calibre - that is one too many , and that is maybe the problem ?

kobo reader device interface 2.16 timothy Legge and David Forrester
kobo touch interface 2.1.6 David Forrester

i will disable the 1st one & try again
NO - still not seeing it- I my check .css - i see a missing } could be why

3rd try: 3rd FAIL
my kobo_extra.css file is

@page {margin-top: 10pts; margin-bottom: 0:}
body { orphans: 0; widows: 0; }

this file is in root of Kobo Aura
calibre is showing only 1 active Kobo driver - the one with modify CSS ticked.

I wonder do I need a restart of calibre to get the new choice of Kobo device driver to take effect ?
4th try: ( after calibre restart). 4th fail - time to give up & wait for help

finaln thought - try to inspect the on-device copy of the book with calibre editor.... well that ddsocvers a new bug - calibre edito alwasy oens the same 1 of 3 books on device, no matter which one is highlighted - park that issue for later - try open with sigil instead....
well the changed CSS is in there:
@page {
margin-top: 10pts
}
body {
orphans: 0;
widows: 0
}
maybe my eyes can't distinguish a 10pts top from a 5 pts. I suppose a retest with 25pts is called for....

no. the book is on the device, the 25pts code is in the book. but there is no visible extra space at top of pages

Last edited by cybmole; 02-21-2014 at 08:52 AM.
cybmole is offline   Reply With Quote
Old 02-21-2014, 09:19 AM   #20
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 davidfor View Post
Anak: Firstly, you have the colours reversed. It didn't show up how you wanted it to.

And you are wrong about the side margins. Or at least for an epub. For both my Glo (FW3.2.0) and my Touch (FW3.0.1), the text stretches all the way across the screen. There is a small gap at the top and the footer at the bottom. The margin at the bottom is a bit harder to judge. The black background stops with the text, not the bottom of the view port. Attached is a screen shot from the Glo that shows how much space is being used.

Kepubs are different. They do have a fixed margin on the sides. And they have the header. The footer appears to take the same space.

Good to know that Kobo did made some changes to the left and right margins. I have not tested with 2.8+ firmware versions because I didn't expect Kobo to change it.

The black area is the maximum available space to display text or can be controlled by user input. I agree the footer is the same size for kepub and epub.
Anak is offline   Reply With Quote
Advert
Old 02-21-2014, 09:43 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 cybmole View Post
@page {
margin-top: 10pts
}
pts is not a valid unit, try 10pt

Also some publishers (e.g. Baen) put the @page margins in every html file which is a pain because it will override anything you put in the stylesheet.
GeoffR is offline   Reply With Quote
Old 02-21-2014, 09:46 AM   #22
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 cybmole View Post
maybe my eyes can't distinguish a 10pts top from a 5 pts. I suppose a retest with 25pts is called for....

no. the book is on the device, the 25pts code is in the book. but there is no visible extra space at top of pages
Is it possibly a simple typo? I have mine set to
@page {margin-top: 10pt; margin-bottom: 0; margin-left: 0; margin-right: 0}

i.e. pt singular, not pts plural

Edit: Too slow! Geoff beat me to it
jackie_w is offline   Reply With Quote
Old 02-21-2014, 09:57 AM   #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 GeoffR View Post
Also some publishers (e.g. Baen) put the @page margins in every html file which is a pain because it will override anything you put in the stylesheet.
If this is a problem for you, have you tried using the Modify Epub option, 'Modify @page and body margin styles'? You may need to revisit your calibre Prefs - Common Options - PageSetup - Margins settings before running it. I have all mine set to 'Unchanged' (which is not very descriptive). I think (needs testing) this option can remove html inline @page statements depending on your Prefs settings.
jackie_w is offline   Reply With Quote
Old 02-21-2014, 09:59 AM   #24
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 jackie_w View Post
Is it possibly a simple typo? I have mine set to
@page {margin-top: 10pt; margin-bottom: 0; margin-left: 0; margin-right: 0}

i.e. pt singular, not pts plural

Edit: Too slow! Geoff beat me to it


ok - take 6.....
yes !
- predictably my top space now looks too big but I can press on, thanks
cybmole is offline   Reply With Quote
Old 02-23-2014, 03:38 AM   #25
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
ok - with the help from you all I have the @page changes nicely automated

is there any slick way to do something similar for fixed line heights ?
they are a pain to do manually book by book: it's easy to miss one & they come both with & without closing ; so a simple regex will leave isolated ; in CSS file

e.g. there can be any/all of

line-height:1.2;
line-height:1.2
line-height:1.2em;
line-height:1.2em

scattered through out the various css classes

the calibre search & replace during conversion does not work for stylesheets

Last edited by cybmole; 02-23-2014 at 03:50 AM.
cybmole is offline   Reply With Quote
Old 02-23-2014, 05:10 AM   #26
ewphoenix123
Addict
ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'
 
Posts: 201
Karma: 42238
Join Date: Oct 2012
Device: Kobo: Glo, Aura , Aura H2O, Aura ONE, Forma, Elipsa
whilw we are at the topic of automating css-settings on transfer.

Anyone know a way to remove "text-align: left;" and "text-align:justify" and keep "text-align:center" automaticaly.
ewphoenix123 is offline   Reply With Quote
Old 02-23-2014, 09:09 AM   #27
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 cybmole View Post
is there any slick way to do something similar for fixed line heights ?
they are a pain to do manually book by book: it's easy to miss one & they come both with & without closing ; so a simple regex will leave isolated ; in CSS file

e.g. there can be any/all of

line-height:1.2;
line-height:1.2
line-height:1.2em;
line-height:1.2em

scattered through out the various css classes
The idea of adding a line-height option to kobo_extra.css, similar to widows/orphans and @page, was discussed briefly (see Kobo Device Driver Update thread in the calibre/Devices subforum post #160 onwards), but was decided against, because it wouldn't be as harmless as the other two.

If it helps, I think you could refine your regex search a bit like this:
Code:
line-height:\s*1.2(em)?[;]?
(warning: my regex skills aren't the best)

Also, another tip, if you open the epub in calibre Editor and pull up the css file and Beautify it (purple daisy in Code View toolbar in v1.25), the ';' separator is added to all attributes, even the last one in the list. So that would make for less guesswork.
jackie_w is offline   Reply With Quote
Old 02-23-2014, 03:21 PM   #28
imkh
Enthusiast
imkh is the One.imkh is the One.imkh is the One.imkh is the One.imkh is the One.imkh is the One.imkh is the One.imkh is the One.imkh is the One.imkh is the One.imkh is the One.
 
Posts: 31
Karma: 101916
Join Date: Nov 2013
Device: Kobo Aura HD
Quote:
Originally Posted by cybmole View Post
ok - with the help from you all I have the @page changes nicely automated

is there any slick way to do something similar for fixed line heights ?
they are a pain to do manually book by book: it's easy to miss one & they come both with & without closing ; so a simple regex will leave isolated ; in CSS file

e.g. there can be any/all of

line-height:1.2;
line-height:1.2
line-height:1.2em;
line-height:1.2em

scattered through out the various css classes

the calibre search & replace during conversion does not work for stylesheets
I change the line-height for all my epubs by using edit books in calibre - its possible to use the search and replace there and to stipulate stylesheets in the search. It's quick and easy but doesn't add any extra css classes as calibre conversion can do.

And ewphoenix123, its quick to use the calibre editor search and replace in the stylesheets for text-align as well.

Last edited by imkh; 02-23-2014 at 03:30 PM.
imkh is offline   Reply With Quote
Old 02-23-2014, 04:31 PM   #29
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Hey guys, just a side note:

Widows and orphans are "broken" in kepubs. It doesn't matter what you set they are always disabled (like setting a 0 value). You can easily test yourselves...

Last edited by arspr; 02-23-2014 at 04:37 PM.
arspr is offline   Reply With Quote
Old 02-23-2014, 10:27 PM   #30
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by arspr View Post
Hey guys, just a side note:

Widows and orphans are "broken" in kepubs. It doesn't matter what you set they are always disabled (like setting a 0 value). You can easily test yourselves...
Or, due the large number of complaints about the text not filling the screen, Kobo decided not to support widows and orphans in their format. That is a reasonable decision on their part as they are the ones who own the format.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to completely remove the right and left margins? tiramisù Amazon Kindle 103 05-04-2015 12:22 AM
how to remove margins after converting mobi/ePub? choychoydog Conversion 0 03-07-2013 12:02 AM
How can I blank margins of picture batch remove? asdas Workshop 2 07-11-2012 04:26 PM
How to remove margins in Pdf? ludo1980 Amazon Kindle 6 12-15-2010 07:19 PM
remove pdf margins Hanselda Bookeen 12 05-13-2009 08:30 AM


All times are GMT -4. The time now is 08:06 AM.


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