|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 192
Karma: 1237440
Join Date: Dec 2014
Location: Ottawa, Canada
Device: Kobo Glo, Arc7HD/10HD, smartphones
|
sideloaded epubs - how do i "unlock" formatting? Calibre or Sigil
howdy,
so, i've sideloaded*** a book or two(hundred) into my new-to-me Kobo Glo (firmware 3.12), and i've noticed that while i CAN adjust margins (left-right only, not top-bottom), i can't adjust font size or font spacing. i've read (but don't truly understand) that i can do something to a CSS to "unlock" formatting so that the Glo can override it. i'm using Edward Robertson's The Cutting Room as the guinea-pig. great book, but reading it on my tablet (Arc7HD) using Google Play Books kind of sets my expectations of being able to do similar font/spacing/etc adjustments on the Glo... so, is there a specific CSS file that i could use and shove into ALL of my epubs so that i can have a consistent and tweakable reading experience? i'm dabbling a little bit in Calibre 2.13 as well as Sigil 0.8.2 so if it's something i can pre-set and automatically apply to whatever book i run through a "convert" or "export" function, that would be awesome. or manually replace a CSS file, that's fine too. i'm used to sideloading using the basic Win Explorer method of drag-n-drop, but if doing it via Calibre is better and automatic anyways then i can break that habit. i'd only load 5 to 25 books at a time, cuz when i loaded 400 of them browsing through them was a huge PITA. i do prefer the manual drag-n-drop, though... EDIT: *** eh, i forgot to mention that i originally ran the books through Calibre's Convert epub->epub function (default settings) since without that i couldn't get covers that i changed to stay embedded. maybe this was too harsh? or is that where i can make specific overrides? Last edited by burnafterreading; 12-25-2014 at 11:08 AM. |
![]() |
![]() |
![]() |
#2 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 39
Karma: 13450
Join Date: Feb 2013
Location: Civitavecchia (Italy)
Device: Kobo Glo
|
maybe I can help you.
Since I have more than 1000 epubs onto my Glo (90% are sci-fi), I had the same needing as you. What I did was to try different settings grabbed from different sources. Eventually I created a sort of standard css which is (at least for me) good for the most part of my epubs. Of course I'm talking about epubs very simple in their layout. I'll pm one of them. Open it with Sigil and have a look at the css. P.S. Usually I set cover 758x1024 (which allows to see it on the full display) |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
I don't think there is a universal stylesheet that will work very well, there are just too many different ways of creating epubs for one stylesheet to work on them all.
These are the common things that publishers do that prevent things being adjustable: Font size: Specifying font sizes in absolute units px, pt, in, etc. causes problems, not just on Kobo devices. To fix, convert them to relative units em, %, etc. or small, medium, large, x-large, etc. Line spacing and justification: Specifying line-height or text-align properties at paragraph level will prevent them being adjusted at paragraph level. To fix, delete all line-height and text-align:left / text-align:justify properties at paragraph level. For best results, leave the line-height property intact for headings, table of contents entries, etc. and leave text-align:left intact for headings, poetry and other special types of paragraph, specify a default line-height and text-align at body level, and let the ordinary paragraph level elements inherit from body. This will give an epub that works properly on all devices, but also allows Kobo devices to adjust the line spacing and text alignment. Another thing that prevents line height being adjusted is use of the font: property. To fix, replace font: with seperate font-family and font-size properties. e.g. this form will prevent line spacing, alignment, and font size from being adjustable: Code:
h2 {line-height: 1.5; font-size 18pt; text-align: left;} p {line-height: 1.5; font-size: 12pt; text-align: justify;} Code:
body {line-height: 1.5; text-align: justify;} h2 {line-height: 1.5; font-size: 1.5em; text-align: left;} p {font-size: 1em;} Another possibility to consider is converting the epubs to kepubs for sideloading. The kepub reader is more heavy-handed in how it enforces the adjustment settings, so line spacing and justification settings will often be overrided for kepubs even when they wouldn't be for epubs. (But the downside to this is that sometimes they are too heavy-handed, and some things which shouldn't be overridden are.) Edit: There is also a patch (see the developer's subforum) that will allow the line spacing and justification settings to work for some epubs where they wouldn't before, it addresses the most common reason that these adjustments don't work, but it doesn't fix all the possible problems that epubs can be created with. Last edited by GeoffR; 12-25-2014 at 08:03 PM. Reason: There is also a patch ... |
![]() |
![]() |
![]() |
#4 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,743
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
And one further note on using one CSS for many ePub, unless you get the class names correct, it will just not work well as you won't have CSS classes for the undefined ones and it will look awful.
|
![]() |
![]() |
![]() |
#5 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,743
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Don't convert ePub > ePub just to replace the cover. That's very bad form. Replace the cover in the Edit metadata dialog and then use Polish Books to replace the cover.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 192
Karma: 1237440
Join Date: Dec 2014
Location: Ottawa, Canada
Device: Kobo Glo, Arc7HD/10HD, smartphones
|
thanks for the pointers thus far! i'll try these with some of the more nasty epubs (seems The Cutting Room was pretty clean to begin with, if i judge based on how many XHTML files show up when opened in Sigil). some of the Agatha Christie stuff i have is downright nasty - 70+ XHTML files, some nearly blank or with just a heading, etc...
i'll try the PolishBooks function in Calibre. you're right, the Convert is bad form - it actually makes things worse! i sideloaded the same book with / without the Convert function being used, and the WITHOUT actually let me adjust the font/line settings albeit it had no cover. i had a thought - if i use a well-assembled epub (like The Cutting Room or something similar with enough chapters) and replace its text with a new book's text and then save-as with the appropriate name... excessive? i'd only do 10-25 books every 6 months since that's my current reading pace. or maybe just extract the raw text, and re-create an epub cleanly. i clearly have a lot of stuff to learn about how these things are put together - it not just a fancy .txt file like i thought! |
![]() |
![]() |
![]() |
#7 | ||
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,743
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#8 | |
No Comment
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,240
Karma: 23878043
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
|
Quote:
This does involve reformatting the ebooks. Which isn't that bad in Sigil. Usually. Don't you just love ebooks with an id on every paragraph. The goal isn't to reformat the ebooks to look just like the original, but to fit your basic formatting requirements. Most ebooks (99%+) don't have any real fancy formatting. The basic elements in a reformat are: paragraphs, chapter headings, section breaks, italic, bold, small, blockquotes. The reformatting involves taking out most of the css referencing in the html, and replacing it with the simple html tags, which are then defined in the css. As an example of a difficult thing to reformat, you have to identify and fix all of the section breaks. Since this is usually done with css (doing a large top or bottom margin), you get look through the entire book looking for section breaks (in the rendered text view, so it doesn't take too long). Most books use one or two methods for section breaks, some use a wide variety of techniques. My css has 140 lines (it grows from time to time), and provides standard headers, body, paragraph (and things like left, right, centre). A bunch indents (from -3.5em to 6 em in 0.5 increments), font sizes (0.5em to 3.0 em, some in 0.1 increments), line heights, margin bottoms (for blank lines). Then it has elements for invisibility, various types of formatted text (including footnotes which I place inline with the text in a bordered box with small text). I have a few elements for blockquotes. And to handle sub and super scripts. Most of the css elements don't get used much, but in the books I've reformatted, the books all look alike, both on the screen and in the source text. I also add standard cover, title, and end pages. |
|
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
i check for & fix just two things in epubs before sending to kobo
using sigil 1. in stylesheet - remove all line height statements using this regex: FIND line-height:[^;}\r\n]*;? REPLACE with nothing - check that minimal match is unticked and regex is set to current file 2. again in stylesheet : manually remove any font-family declarations with FIND font-family: you will them be able to control line spacing and choice of fonts via the device controls PS assuming you only want to read any given agatha christie story once, you can get some in epub format from your local library ( assuming you have one that lends epubs) - borrow, read, return, no re-coding hassle. if you are working with downloads, sometimes it's better to try a different source than to have to fix lots of conversion errors.... I expect there are many unauthorized poor quality old conversions from scans out there... Last edited by cybmole; 12-27-2014 at 03:03 AM. |
![]() |
![]() |
![]() |
#10 |
No Comment
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,240
Karma: 23878043
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
|
|
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
|
![]() |
![]() |
![]() |
#12 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,743
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#13 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 192
Karma: 1237440
Join Date: Dec 2014
Location: Ottawa, Canada
Device: Kobo Glo, Arc7HD/10HD, smartphones
|
Quote:
i'll try a few things with a random ebook and see how complex the various processes are. most books i buy from Google or Kobo and leave them as-is, so really this would only affect a small handful of books i read (or it would be a cleanup of a backup of something i already bought). sometimes, i wonder what would happen if Kobo or Google went out of business - would the books i bought disappear? that type of "paranoia" makes me grab an epub of whatever i bought and keep it just-in-case, and if i have it i might as well clean it up. i don't know WHY, but sometimes the downloaded epub doesn't display the same way as the native book directly from the store/viewer. |
|
![]() |
![]() |
![]() |
#14 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 153
Karma: 216188
Join Date: Jul 2010
Device: Nook Classic, Kobo Touch, Nook Simple Touch, Kobo Aura
|
If you are using Calibre to reformat from epub to epub, try the following:
select convert books verify input and output format = epub select look and feel select Filter Style Information tab in the text box next to Other CSS Properties add font-size I also add text-align, line-height, and font-family in the box(separated by commas) This usually works. If not it is time for Sigil. I have an older version of Sigil and have not kept up with improvements since they dropped the Linux version. |
![]() |
![]() |
![]() |
#15 | |
No Comment
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,240
Karma: 23878043
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
|
Quote:
I don't know about the Agatha Christie books in specific. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sync sideloaded Kindle books without "the cloud"? | bizzybody | Android Devices | 3 | 11-28-2014 02:54 AM |
Touch Quick question: Does the Nook not display sideloaded content under "new reads"? | rahulm | Barnes & Noble NOOK | 2 | 07-05-2011 11:52 PM |
Question about the "share" feature on sideloaded books | Randomhero | Nook Developer's Corner | 0 | 02-04-2011 02:22 AM |
Any way to apply calibre's "Series" (and number) meta-info from within Sigil...? | Vintage Season | Sigil | 2 | 07-02-2010 11:35 PM |
"PK": Only text when I open in Sigil an ePub file generated with Calibre | Terisa de morgan | Sigil | 3 | 12-14-2009 11:24 AM |