![]() |
#466 | ||||
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 409
Karma: 1244354
Join Date: Jan 2012
Device: Kobo Touch
|
Quote:
As you can't compare the look of printed books with the look of digital books you should not compare different formats of digital books with each other - not if at least one of the readers allows you to use another format. Quote:
I like the header and footer and I like the blank line after every paragraph and I would hate having no border at all. Not saying everyone has to prefer the same, but to say it's a general "shortcoming" is wrong. Also not all KePubs, as I have said before, have blank lines between paragraphs. Quote:
Quote:
Also the Kobo follows the original layout of the publisher (in ePubs at least). That's why you only get the blank line if the book is formatted that way. And that's why it's unfair to make it seem like you will always have blank lines after paragraphs which Kobo devices - it's not true. |
||||
![]() |
![]() |
![]() |
#467 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Point two and three are not related specifically to format but formatting. If I send my epub with the extended driver as kepub, no aditional line appears there.
Last edited by Terisa de morgan; 05-19-2013 at 01:54 PM. |
![]() |
![]() |
![]() |
#468 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 600
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
|
Quote:
In de CSS. Be sure that margins set to zero, like @page {margin:0;} p {margin:0;padding:0;} div {margin:0;} Change the image dimensions in the svg code to the exact image demensions of your cover file If you have a cover of 1200×800 px, the code should look like Code:
<div> <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 800 1200" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"> <image height="1200" width="800" xlink:href="../Images/cover.jpeg"></image> </svg> </div> |
|
![]() |
![]() |
![]() |
#469 | |||
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,925
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Quote:
Quote:
If there is not a cover image already being displayed, use Sigil to split the first file at the <body> tag and paste the code into the new file. You might want to check for various resources for learning about epub formatting around the web. One I like is the Pigs, Gourds and Wikis web site. Regards, David Last edited by DNSB; 05-19-2013 at 02:14 PM. |
|||
![]() |
![]() |
![]() |
#470 | |
Member Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,999
Karma: 11348924
Join Date: Jan 2011
Location: Limbo
Device: none
|
Ok this is probably a little over my league. I opened the first .html file within the epub.zip then I opened that html file by adding .txt so that I can see what's inside and modify if necessary and the closest thing to what you mention which is @page goes like this:
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; } If that's what defines the position of the cover, maybe I could add margin-left and margin-right values ? Also to make it all even more confusing, I forgot to mention that on my computer the e-book cover looks normal, it's only in my Kobo reader that it's stretched. Well because a specific css sheet is for a specific book isn't it ? if it was all standard then all css sheets would be exactly the same. But when you look at them they are widely different, some for instance apply text rules with the name "p", others with the name "body" etc ... When through caliber it all becomes "caliber1" "caliber 2" etc ... which is even more confusing when you try to locate a value that for instance would rule indents. In the meantime, do I just randomly cram the new code here provided and where exactly ? Just before "@page" ? Or at the very beginning (cause there is still some weird code before that) Quote:
Last edited by Quexos; 05-19-2013 at 02:20 PM. |
|
![]() |
![]() |
![]() |
#471 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,925
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Your second and third points are based on the formatting applied by the publisher to the ebook. Kobo's philosophy seem to involve respecting publisher formatting giving you the closest to what the publisher originally intended. As near as I can tell, Kobo modifies the ebook to add the kepub elements but they do not modify other style elements. Much as jgoguen's driver does with epubs as they are copied to your Kobo from Calibre. I've seen kepubs that do not have the wide right/left margins and that have minimal spacing between lines and paragraphs so they are not an artifact of the ACCESS NetFront renderer but rather following what the ebook style specifies. If a kepub is not DRMed, you can edit it in the same way as an epub. Just be careful not to let Sigil or whatever other editor you use remove the EPUB3 elements that kepub uses. Regards, David |
|
![]() |
![]() |
![]() |
#472 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,925
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
p would apply to all paragraphs, p.para would apply to p tags with class=para, d.poem would apply to div tags with class=poem, etc. If you don't have a background in web page creation, the learning curve takes a while but it is worthwhile. There are quite a few web sites that will help you to learn. W3Schools, Pigs, Gourds and Wikis (some of her publications would be quite helpful), etc. As for the difference in images on your computer and on your Kobo, what program are you using to view them on your computer? A sample of the entire first file from an epub follows. The image is stored as cover.jpg in the Images folder and it is 510x680 pixels. Sigil will generate various folders when you open and then save an epub if they don't already exist. Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Text Redacted</title> <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" /> </head> <body class="nomargin"> <div> <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 510 680" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"> <image height="680" width="510" xlink:href="../Images/cover.jpg"></image> </svg> </div> </body> </html> David |
|
![]() |
![]() |
![]() |
#473 |
Member Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,999
Karma: 11348924
Join Date: Jan 2011
Location: Limbo
Device: none
|
Ok, like I said this is over my league. Like when you mention "poem" as an element to control some values, it's confusing cause I don't have poetry in my books so why is "poem" an element in css code ?
So I guess I'll stick with the basics of css and your sample code shows that this "svg" code is to be entered right after "body class" so I'll try that and see how it goes ![]() And to answer your question I view my ebooks with "Reader for PC" it's the Sony soft to see epubs. |
![]() |
![]() |
![]() |
#474 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,925
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Code:
.poem { display: block; margin-top: 1.5em; margin-bottom: 1.5em; margin-right:10%; margin-left:10%; } Code:
<p class="poem">In Flanders fields the poppies blow<br /> Between the crosses, row on row,<br /> That mark our place; and in the sky<br /> The larks, still bravely singing, fly<br /> Scarce heard amid the guns below.</p> If you want to see an epub on your PC close to how your Kobo will display it, try using Adobe's ADE. The code base is pretty much the same. Regards, David |
|
![]() |
![]() |
![]() |
#475 | |
Watching the Sky
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 239
Karma: 634112
Join Date: Sep 2012
Location: Winnipeg, MB
Device: Kobo Aura
|
Quote:
In CSS, you can reference tags on a page just by typing the tag's name. For example "body" would reference the <body>...</body> element, "p" would reference anything inside <p>...</p> tags, and something like "div" would match anything inside generic <div>...</div> tags. Tags can have two other identities added to them: IDs and classes. Generally classes are used to apply a common style to many different elements on a page. For example, I could have a div block and a p block with the class "centered-text" applied which, as long as I defined it properly in the CSS, would center the text in both elements. IDs are usually applied to unique code blocks that need to be identified as a singular entity. Here's an example of a p block with an ID and a class assigned: Code:
<p id="preface" class="lead-paragraph"> .... </p> So, in CSS you reference IDs using the ID prefaced by a # sign, so for the example above we'd reference that p block by defining "#preface" in the CSS. Likewise classes are referenced by the class name prefaced by a ".". In the example above, we could reference that same paragraph by defining ".lead-paragraph" in the CSS. You do not need to add in the type of block it is in the CSS unless you need to. For example, if I had both p blocks, tables and div's with the class "centered-text" but wanted to specify something only for the p tags, I could add a CSS reference of "p.centered-text" which says, simply, for all the p blocks with the class centered-text, here are some specifications. Hope this helps! |
|
![]() |
![]() |
![]() |
#476 |
Member Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,999
Karma: 11348924
Join Date: Jan 2011
Location: Limbo
Device: none
|
Ok I entered the code as suggested earlier in the thread and ... nothing. The cover is just as stretched as it was before. So even more confusion with css and codes. Why if instructed to display the image differently, the image keeps being twisted (but not on my computer) ...
I guess this shows that simply putting code that works for a book into another book is not necessarily going to work. Well we tried, thanks for the help anyways ![]() It's no big deal as the book is perfectly readable, it's just annoying to see that deformed cover but luckily this issue is with one book only. Like I said, I'll stick to basic css stuff which I seem to graps, like indents, margins, paddings, orphans and windows and their values which I can change. Last edited by Quexos; 05-19-2013 at 03:33 PM. |
![]() |
![]() |
![]() |
#477 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,925
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
OTOH, I seldom use the id selector, it's just too special purpose for my tastes. Regards, David |
|
![]() |
![]() |
![]() |
#478 | |||
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 600
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
|
@Jaden and @Terisa de morgan
I've changed my original comment, you're both right they are not necessarily shortcomings. So I changed it to: "The video clearly shows the output of the kepub format, which can not be changed by the user:", and added after "empty text line after each paragraph", that it does not happen with all kepubs.
True, I do not like the header (in its current form) but I didn't my mention my dislike in my post. I said the header and footer are relatively wide, caused by a huge margin and the position of the text on the screen. Some (not all) readers have a header and/or footer too. But these are generally much smaller because the margins are smaller and the text position is closer to the edge of the screen. E.g. The Cybook Odyssey HD has an option to turn the headers and footers on or off (seperately! Header and footer are also smaller). The Icarus Sense has a full screen mode, In the non full screen mode small header and footer are shown. Quote:
Quote:
Yes, Kobo tries to follow the original layout but because Kobo adds some own code to the kepub to make sure all Kobo functions work correctly (font size, line height, annotations etc.). Some code functions as a wrapper around the original code and this code is a sort of a "catch all", which is understandable as it is to costly to do it on an individual basis or manually. This Kobo code can have a huge influence on the output (e.g. add white lines between paragraphs). But true not with every kepub. Kobo probably decided to add code to the software (epub) to turn a epub into a kepub instead on the hardware side (device or software app) because it was easier to implement and cheaper to get the desired output. If
Quote:
Kobo does not control the local environment of an in shop product comparision of different ereaders. If the comparision is done with kepubs that have a blanc line between paragraphs the output looks quite different when compared to the other ereaders. And potential buyers may think it is odd or even that there is something wrong. So a fair in shop comparison depends very strongly on which books (kepubs) are preloaded on the device. I consider this tricky for Kobo. Most potential buyers probably only epub (but this may vary among countries) and are not aware that Kobo also has its own format kepub. And asuming that they have done their home work they go to a local shop to see it in action. Which device they will buy totally depends on if it looks "good", "right" or not compared to the other readers. Their "good" or "right" not yours or mine. ___________________________ This is the Kobo code I mentioned (the red code ("kobostylehacks") is the "catch all" code that may influence the original output): Code:
<title>Book title</title>
<link type="text/css" rel="stylesheet" media="all" href="../Styles/stylesheet.css"></link>
<!-- kobo-style -->
<link type="text/css" rel="stylesheet" href="css/kobo.css"></link>
<script type="text/javascript" src="js/kobo.js"></script>
<style type="text/css" id="kobostylehacks">div#book-inner p, div#book-inner div { font-size: 1.0em; } a { color: black; } a:link, a:visited, a:hover, a:active { color: blue; } div#book-inner * { margin-top: 0 !important; margin-bottom: 0 !important;}</style>
</head>
Code:
body> <div id="book-columns"><div id="book-inner"> <p class="p9"><span class="koboSpan" id="kobo.1.1">Chapter 2</span></span></p> <p class="p11"><span class="sz"><span class="koboSpan" id="kobo.2.1">Thursday 13 September, 07.03 A.M., Victoria Street</span></span></p> </div> </div> </body> Last edited by Anak; 05-19-2013 at 04:33 PM. |
|||
![]() |
![]() |
![]() |
#479 | |
Member Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,999
Karma: 11348924
Join Date: Jan 2011
Location: Limbo
Device: none
|
I appreciate your effort and am officially impressed by your comprehension of css but to be honest, I don't fully understand the logic of css.
1 when you show code that goes with those brackets like "</body>" I don't call that css, I call that HTML ... so more confusion for me. To me css goes something like .p{ margin-top: 1em; text-indent: 1.5em;} etc ... 2 css as I perceive it does not always act logically either. I've seen lots of css within epubs to realize that a same action in two different books may be triggered by different code. To take a very simple example to illustrate my point, a given book will have: .body{text-indent: 1.5em;} while another books will have .p{text-indent: 1.5em;} and the result in each book will be EXACTLY the same, the text will indent throughout the book even though two different selectors have been used, as a result, to me .body and .P are the same. 3 Even stranger, I have seen css code that does not even change anything making me wonder why the hell it is there at all ? again the simplest example possible: .p{text-indent: 1.5em;} .p2{text-indent: 2em;} etc ... In this case I have experimented changing the p2 indent value to 0em just to see what it would change in the book and ... NOTHING changed, it's like the value is redundant. so why ? to add more confusion ? So even though I would love to fully understand css, I think I will only stick with the basics of it. Because this is getting to a point where I spend more time trying to figure out the css and fixing it (whenever I can) than the time I spend reading, which kind of defeats the purpose of having switched from print books to e-books a couple years ago or so. Quote:
Last edited by Quexos; 05-19-2013 at 04:02 PM. |
|
![]() |
![]() |
![]() |
#480 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
Quexos, if you're using Sigil, you might learn a lot about how the stylesheet.css file works if you open up an existing epub that you think is nicely formatted.
In your examples about using p or body, either style will work, but that style needs to be used within the body of the text. So if your epub text reads: <p>This is a sample using p only.</p> you must use a corresponding style in the stylesheet.css file for p such as: Code:
p { display: block; margin-top: 0; margin-bottom: 0; margin-right: 0; margin-left: 0; text-align: justify; text-indent: 1.5em; } If you set a style for p, there should be no . before the p in the stylesheet. Same goes for using body. The elements that begin with a . are classes, so you could change <p class="calibre1">This is a sample using p only.</p> and have this added to your stylesheet.css file so the text would turn out in italics. Code:
.calibre1 { font-style: italic; } Last edited by Ripplinger; 05-19-2013 at 04:26 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Glo Kobo Software Update 2.5 | RZetlin | Kobo Reader | 234 | 05-17-2013 10:09 AM |
kobo, google play update, calibre update | tracym | Kobo Tablets | 16 | 06-25-2012 03:24 PM |
Kobo Vox- Software update issue | griff101 | Kobo Tablets | 18 | 06-21-2012 05:09 PM |
Software to batch update PDF metadata/ substitute software for Sony eBook library | ksri99 | Sony Reader | 6 | 05-20-2012 01:53 PM |
Hacks Update fail on any software update | hassan | Amazon Kindle | 5 | 11-03-2011 02:35 AM |