|
|
Thread Tools | Search this Thread |
06-12-2022, 07:29 AM | #1 |
Enthusiast
Posts: 47
Karma: 10
Join Date: Aug 2021
Device: Kindle Oasis
|
Is there a way to transfer the layout/CSS data from one epub to another?
I got a copy of the Great Gatsby from Project Gutenberg and when I send this via email to my Kindle the layout looks great.
I’ve got some other epub files that when I transfer to my kindle in the same way via email the layout isn’t as good. I presume this is because of the layout/CSS settings in the respective epub files. Is there a way to transfer the CSS/layout data between two epub files? |
06-12-2022, 07:35 AM | #2 |
Resident Curmudgeon
Posts: 76,465
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Transferring the CSS from one ePub to another won't work unless both ePub use the exact same classes. And I doubt you'd find to random ePub using the same classes. Also, there may be some classes in the HTML that are not in the transferred CSS. So really, it's not going to work.
The solution is to hand edit each ePub. |
Advert | |
|
06-12-2022, 07:36 AM | #3 |
The Grand Mouse 高貴的老鼠
Posts: 72,538
Karma: 309500000
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Yes and no and yes.
Yes, you could use Sigil to copy the CSS files from one ePub to another. No, that won't help, because the effect that the CSS has on the layout depends on how CSS is used in the HTML. Of course, if you're prepared to also edit the use of the CSS in the HTML (using Sigil) you could. But you might not consider it to be worth the effort. I'd recommend looking at calibre's options for conversion to ePub. They also work on converting ePub -> ePub to re-write some of the styling. |
06-12-2022, 01:02 PM | #4 |
Enthusiast
Posts: 47
Karma: 10
Join Date: Aug 2021
Device: Kindle Oasis
|
Is there a way, say using Calibre’s epub > epub functionality, to remove all of the formatting from an epub, effectively reverting the epub back to absolute basics/default formatting?
|
06-12-2022, 01:30 PM | #5 | |
The Grand Mouse 高貴的老鼠
Posts: 72,538
Karma: 309500000
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
|
|
Advert | |
|
06-12-2022, 01:59 PM | #6 | |
Running with scissors
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Quote:
After deleting the css from the stylesheet.css you can add your own there, which shouldn't use any classes except for default size bold and italic which you copied and saved from the original css. Here's what I use (compressed to save screen space): Code:
body{font-size:100%;border:0;margin:0;padding:0;width:auto;} body *{line-height:inherit;} p{font-size:100%;margin:0;padding:0;border:0;text-indent:2em;} a{color:inherit;text-decoration:none;} h1,h2,h3,h4{text-align:center;} .italic{font-style:italic;} .bold{font-weight:bold;} img{max-width:100%;border:none;} I'm doing this for my kobo, so I use calibre to convert from the amazon format to epub, and have calibre's settings to set the font size to 1em or 100%. Occasionally I start with an epub so I do an epub to epub conversion. On the kobo the above css gives a ragged right layout, which is what I want. My objective with all this folderol is to have a consistent line spacing and font size and ragged right. So every time I open a new book I don't need to adjust any of the sliders. The end result isn't pretty but with novels there rarely is any fancy formatting that matters. |
|
06-12-2022, 01:59 PM | #7 |
Bibliophagist
Posts: 40,573
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Not the epub => epub functionality, but using calibre's editor, you could remove any CSS stylesheets and inline styles.
|
06-12-2022, 02:49 PM | #8 |
Resident Curmudgeon
Posts: 76,465
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
An ePub with no CSS is going to look awful. You are best to learn HTML/CSS so you can edit the CSS so the eBooks looks how you like.
|
06-12-2022, 04:01 PM | #9 | |
Grand Sorcerer
Posts: 11,519
Karma: 230505500
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
Quote:
I have consistent font size and line spacing in all my books, without nuking the existing css. |
|
06-13-2022, 12:03 AM | #10 | |
Running with scissors
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Quote:
I've had to get aggressive in ripping out the css because I download probably at least 1 book a day on average from ereaderiq. Trying to do a nice job like you do takes too much time, since most of these free books don't engage me so I stop and move on to the next one. Last edited by hobnail; 06-13-2022 at 12:08 AM. |
|
06-13-2022, 03:33 PM | #11 | |
Resident Curmudgeon
Posts: 76,465
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Tags |
convert, css, epub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Arc Can I transfer my Kobo data? | karc04 | Kobo Tablets | 4 | 02-08-2017 08:00 PM |
PRS-T1 data transfer not happening | Mike L01 | Sony Reader | 17 | 12-30-2011 07:29 AM |
iPad fixed layout meta-data | Guido Henkel | Conversion | 1 | 09-03-2011 08:03 PM |
data transfer problem | ramacsony | Introduce Yourself | 4 | 06-04-2010 12:42 AM |
Data Transfer | GhostHawk | Ectaco jetBook | 4 | 01-02-2010 02:44 PM |