Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-06-2017, 03:59 AM   #1
ibu
Addict
ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.
 
Posts: 264
Karma: 9246
Join Date: Feb 2010
Location: Berlin, Germany
Device: Kobo H20, iPhone 6+, Macbook Pro
Internal Basic Stylesheet of the Kobo Software?

Webbrowsers contain a standard basic stylesheet to be able to display pure HTML which comes without any CSS.

When you open an epub which contains no CSS at all, the Kobo software displays for example a page margin of some millimeters - even if the page margins are set to zero in the Kobo settings.

Where can I find the internal basic stylesheet of the Kobo software please?

What is the best way to "overwrite" specific internal CSS rules of the basic stylesheet please? For example to get page margins of zero width?

Thanks.
ibu is offline   Reply With Quote
Old 03-06-2017, 06:12 AM   #2
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
It is complicated, because not all of the internal settings are done with CSS, and even the ones that are done with CSS don't come from a single static stylesheet but instead the device creates a stylesheet on the fly from various fragments depending on what settings the user has selected.

For example the ePub reader has a completely different method of setting the margins than the KePub reader, and the KePub reader uses two completely different methods depending on whether it is in full-screen mode or not.

The ePub reader also accepts an XPGT stylesheet which is not CSS, some publishers include this in the book usually named page-template.xpgt, it can set margins and do some things that can't be done via CSS.

To set the base page margins to zero for ePub books you can use CSS as:
@page { margin: 0px; }
body { margin: 0px; }

but you might also need to remove the XPGT stylesheet if the book has one, and if the publisher (or Calibre during the conversion process) has set the margins in a subclass of body then you also need to remove them from that subclass because you can't override them just by adding !important to the body style.

e.g. when Calibre converts a book that originally has body margins set as:
<body>
</body>
body { margin-left: 5pt; margin-right: 5pt; }

it changes that to:
<body class="calibre">
</body>
.calibre { margin-left: 5pt; margin-right: 5pt; }

so if the book has ever been through the Calibre conversion process you probably need to go through and delete the margins from the .calibre class too.

Edit: To be able to completely remove all margins, header, footer, etc. to use every pixel on the screen for book content you need to either use the ePub reader in full-screen mode, or the KePub reader in full-screen mode plus a firmware patch called `KePub default margins`.

Last edited by GeoffR; 03-06-2017 at 07:29 AM. Reason: ... to use every pixel on the screen for book content ...
GeoffR is offline   Reply With Quote
Advert
Old 03-06-2017, 07:39 AM   #3
ibu
Addict
ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.
 
Posts: 264
Karma: 9246
Join Date: Feb 2010
Location: Berlin, Germany
Device: Kobo H20, iPhone 6+, Macbook Pro
Thanks for the helpful informations, GeoffR.

Sounds really complicated.

May be the complexity can be reduced.

Is there any disadvantage to let calibre convert every epub into a kepub?
If not, we could discuss only kepub.

To get a better control about the presentation of webpages, web authors use reset css.

Is there any good set of reset css for the kobo mechanisms?
ibu is offline   Reply With Quote
Old 03-06-2017, 08:04 AM   #4
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 ibu View Post
Is there any disadvantage to let calibre convert every epub into a kepub?
If not, we could discuss only kepub.
The ePub reader has some features that the KePub reader lacks (and vice versa), and the ePub reader also does some things better than the KePub reader (and vice versa), so although some people prefer the KePub reader there are also others that prefer the ePub reader.

For example the ePub reader can use ligature substitutions if the font contains them, can understand CSS such as @page, page-break-after, and others that the KePub reader ignores, can lay out text correctly with narrow line spacings (even negative spacings) whereas the KePub reader suffers problems when the line spacing is narrower than a certain value.

In general, the KePub reader has more features, but the ePub reader does better at the basic job of laying out text.

Quote:
To get a better control about the presentation of webpages, web authors use reset css.

Is there any good set of reset css for the kobo mechanisms?
Some publishers use it, but it will only reset some things and not others, and it can cause problems. It is usually best just to use the default values that the device sets and only force your own settings when it is really necessary.

For example, the ePub reader has an option of displaying page numbers in the margins, but if you set the body right margin too small (such as resetting to 0px) then those page numbers can overlap the text.

Last edited by GeoffR; 03-06-2017 at 08:18 AM. Reason: grammer
GeoffR is offline   Reply With Quote
Old 03-09-2017, 06:14 AM   #5
ibu
Addict
ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.
 
Posts: 264
Karma: 9246
Join Date: Feb 2010
Location: Berlin, Germany
Device: Kobo H20, iPhone 6+, Macbook Pro
Is there any recommendable webpage which offers a list of all by Kobo devices supported CSS properties specially for EPUB3 with the file extension kepub?

For example:
The website "epubtest.org" does not list any Kobo device:

http://epubtest.org/testsuite/epub3/.../list-styling/

I like to find out, for example, if there's any way to realize
h2 {page-break: before}
in a EPUB3 in a Kobo H2O.

Further I would like to find a good page, where the support of Kobo for other EPUB3 features than CSS are listed.

For example:
The property
linear="no" in a spine entry has no effect in a Kobo.

Thanks.
ibu is offline   Reply With Quote
Advert
Old 03-09-2017, 07:10 AM   #6
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
The Kobo devices are listed on the site. But, they haven't been tested for a while so are in the archives. See http://epubtest.org/testsuite/epub3/archive/.
davidfor is offline   Reply With Quote
Old 03-09-2017, 07:34 AM   #7
ibu
Addict
ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.
 
Posts: 264
Karma: 9246
Join Date: Feb 2010
Location: Berlin, Germany
Device: Kobo H20, iPhone 6+, Macbook Pro
Thanks for the hint David.

What a pity, that there are no actual tests for the Kobo devices, particularly for all the relevant CSS properties, e.g. page-break. (I tried to guess the URL for the archive of the features, but without success)

Or are there other websites, who fill the gap?
ibu is offline   Reply With Quote
Old 03-09-2017, 08:50 AM   #8
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 ibu View Post
I like to find out, for example, if there's any way to realize
h2 {page-break: before}
in a EPUB3 in a Kobo H2O.
There are some notes on KePub CSS here. (EPD refers to the KePub reader on e-ink devices.)

The best way to cope with the lack of support for page-break-before: always; in KePubs is just to split the html file at that point, there will always be a page break between files. This also has the benefit of reducing memory use, and is worth doing even in ePubs instead of using page-break-before: always; because the ePub reader performs much better with small files.

Edit: The bigger problem is the lack of support for page-break-after: avoid; in KePubs. I don't know of any way to get around that.

Last edited by GeoffR; 03-09-2017 at 08:57 AM. Reason: page-break-after: avoid;
GeoffR is offline   Reply With Quote
Old 03-09-2017, 09:08 AM   #9
ibu
Addict
ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.
 
Posts: 264
Karma: 9246
Join Date: Feb 2010
Location: Berlin, Germany
Device: Kobo H20, iPhone 6+, Macbook Pro
Thanks GeoffR.

I suspected, that "page-break: before" is not supported. I agree: the lack of "page-break: avoid" is worth.

Because you emphasized "in KePubs". Does it mean, epubs (which means, it must be an EPUB2) do support "page-break"?

About the performance:
Is that generelly true, even for newer devices like a H2O? I mean, is there really a difference in the performance the user could "feel", or is it only one, which can be measured?

I ask, because I like the idea of "one single content document does it all" very much.
ibu is offline   Reply With Quote
Old 03-09-2017, 09:24 AM   #10
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 ibu View Post
I suspected, that "page-break: before" is not supported. I agree: the lack of "page-break: avoid" is worth.

Because you emphasized "in KePubs". Does it mean, epubs (which means, it must be an EPUB2) do support "page-break"?
Yes the Adobe ePub reader supports page-break-before: always; page-break-after: avoid; page-break-inside: avoid; etc.

(there is no such CSS property as page-break, there is only page-break-before, page-break-after, page-break-inside.)

Quote:
About the performance:
Is that generelly true, even for newer devices like a H2O? I mean, is there really a difference in the performance the user could "feel", or is it only one, which can be measured?

I ask, because I like the idea of "one single content document does it all" very much.
It makes a big difference, if you try to put a whole large book into a single html file then you will get a very poor reading experience in the ePub reader with slow page turns, and you might also have problems with the TOC and chapter stats graph features in the KePub reader because these assume that there is one chapter per html file.

This is not just Kobo devices, most ereaders will cope better with an ebook made up of lots of small files than with one large file. Some will even crash or be unable to open the book if the html files are too big.
GeoffR is offline   Reply With Quote
Old 03-09-2017, 09:40 AM   #11
ibu
Addict
ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.
 
Posts: 264
Karma: 9246
Join Date: Feb 2010
Location: Berlin, Germany
Device: Kobo H20, iPhone 6+, Macbook Pro
Quote:
Originally Posted by GeoffR View Post
Yes the Adobe ePub reader supports page-break-before: always; page-break-after: avoid; page-break-inside: avoid; etc.
Good to know, thanks.
You wrote in another posting, that, in generell, the layout capability of the adobe software is better than from the other software for kepubs.
Is there anywhere a nice big data table which faces that two types of software next together?
Quote:
Originally Posted by GeoffR View Post
(there is no such CSS property as page-break, there is only page-break-before, page-break-after, page-break-inside.)
Sorry, my mistake. I know that, but forgot it in the moment, where I wrote the last posting.

Quote:
Originally Posted by GeoffR View Post
It makes a big difference, if you try to put a whole large book into a single html file then you will get a very poor reading experience in the ePub reader with slow page turns, and you might also have problems with the TOC and chapter stats graph features in the KePub reader because these assume that there is one chapter per html file.
OK, that is a clear statement. I will give the idea of one single file than.
ibu is offline   Reply With Quote
Old 03-09-2017, 10:13 AM   #12
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,141
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Also see https://github.com/kobolabs/epub-spec
PeterT is offline   Reply With Quote
Old 03-09-2017, 10:15 AM   #13
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,141
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Oops I see that link had been posted. Sorry 'bout that
PeterT is offline   Reply With Quote
Old 03-09-2017, 10:42 AM   #14
ibu
Addict
ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.ibu can eat soup with a fork.
 
Posts: 264
Karma: 9246
Join Date: Feb 2010
Location: Berlin, Germany
Device: Kobo H20, iPhone 6+, Macbook Pro
Quote:
Originally Posted by PeterT View Post
I read that document, but there's not much useful information in it.

Example:
The KePub-Software does not support the attribute
linear="no"
in the element itemref in the spine.
That is not mentioned document from kobolabs.

What would be so useful, would be data tables, where we could just look, if a specific feature of EPUB3 or a specific CSS property is supported by Kobo.

Like the following table for web browsers.
Example:
http://caniuse.com/#search=page-break-before
ibu is offline   Reply With Quote
Old 03-09-2017, 10:48 AM   #15
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 ibu View Post
You wrote in another posting, that, in generell, the layout capability of the adobe software is better than from the other software for kepubs.
Is there anywhere a nice big data table which faces that two types of software next together?
I don't think there is anything as organised as that, I am just voicing my impressions after a few years reading both KePubs and ePubs. (If I buy a book from Kobo I often read it with the KePub reader and note all the mistakes as I go, then later I edit the book in calibre to fix all the mistakes and sideload the corrected version as an ePub for future reading.)

It makes a big difference how well the ebook is constructed; in general I think the KePub reader does better with poorly-constructed books, because it overrides the publisher's bad choices; the ePub reader does better with well-constructed books because it doesn't override the publisher's good choices.

It also depends a lot on what settings you choose to read the book. I like full justification with hyphenation, and fairly narrow line spacing. The KePub reader does quite well with left-justified text and wide line spacing, but it has a number of bugs that come into effect with full justification or narrow line spacing.

There are firmware patches that can help with some of the KePub problems; I use one to fix the justification bug even though it has the side-effect of disabling kerning. I then read KePubs with only a few fonts that don't depend too much on kerning, and refrain from selecting the narrower line spacings. But reading an ePub is a nicer experience as I can use fonts that make heavy use of kerning and ligatures and still get good justification and word spacing, and more comfortable line spacing.

The KePub reader used to have a horrible hyphenation bug, but it was finally fixed back in firmware 3.16.0. I'm hoping Kobo will eventually fix the problems with justification, word spacing, line spacing and add support for ligature substitutions and page breaking styles, but until then I am glad the ePub reader is available as an alternative.

Last edited by GeoffR; 03-09-2017 at 10:52 AM. Reason: spelling
GeoffR is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo The complete internal basic stylesheet? ibu Kobo Reader 2 08-11-2013 07:25 AM
PRS-600 OS X: Sony software does not recognise internal storage AprilHare Sony Reader 5 10-08-2011 01:07 AM
JetBook Lite internal software? steven522 Ectaco jetBook 0 04-26-2010 11:40 AM
Recommendation for basic scanning software (non OCR) yunti Workshop 1 11-27-2009 07:08 AM
Revised iRex iLiad specs indicate change in internal software Alexander Turcic iRex 9 06-07-2006 06:08 AM


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


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