03-06-2017, 03:59 AM | #1 |
Addict
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. |
03-06-2017, 06:12 AM | #2 |
Wizard
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 ... |
Advert | |
|
03-06-2017, 07:39 AM | #3 |
Addict
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? |
03-06-2017, 08:04 AM | #4 | ||
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
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:
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 |
||
03-09-2017, 06:14 AM | #5 |
Addict
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. |
Advert | |
|
03-09-2017, 07:10 AM | #6 |
Grand Sorcerer
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/.
|
03-09-2017, 07:34 AM | #7 |
Addict
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? |
03-09-2017, 08:50 AM | #8 | |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
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; |
|
03-09-2017, 09:08 AM | #9 |
Addict
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. |
03-09-2017, 09:24 AM | #10 | ||
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
(there is no such CSS property as page-break, there is only page-break-before, page-break-after, page-break-inside.) Quote:
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. |
||
03-09-2017, 09:40 AM | #11 | |||
Addict
Posts: 264
Karma: 9246
Join Date: Feb 2010
Location: Berlin, Germany
Device: Kobo H20, iPhone 6+, Macbook Pro
|
Quote:
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:
Quote:
|
|||
03-09-2017, 10:13 AM | #12 |
Grand Sorcerer
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
|
03-09-2017, 10:15 AM | #13 |
Grand Sorcerer
Posts: 12,167
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
|
03-09-2017, 10:42 AM | #14 | |
Addict
Posts: 264
Karma: 9246
Join Date: Feb 2010
Location: Berlin, Germany
Device: Kobo H20, iPhone 6+, Macbook Pro
|
Quote:
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 |
|
03-09-2017, 10:48 AM | #15 | |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
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 |
|
|
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 |