|
|
Thread Tools | Search this Thread |
11-25-2022, 11:29 AM | #1 |
Enthusiast
Posts: 41
Karma: 10
Join Date: Mar 2019
Device: kindle 8th
|
Please help. Epub to kfx conversion extract css format from another book.
Hi everyone, I study law and use a kindle, unfortunately the books of my degree are not in the amazon store, so I had to buy them in Epub. Now I want to convert them to kfx, but I want them to look the same in terms of format: margins, space between lines, indentation, space between titles and paragraphs and others like the books I bought on Amazon. Send to kindle only converts to azw3 but not to kfx.
1. Is there a way to extract the css styles of the kindle books that I like? To apply those parameters to my conversion 2. If not then could you please tell me your workflow to convert a book to kfx and have it as you like? 3. If there is a more direct way to address my problem please tell me. Maybe you are looking at the problem the wrong way. 4. I don't know anything about css but I want to learn because there is a lot of information here in the forums that would be very useful to me but I don't understand much of it. where to start? I searched about css in google but I see that it is for websites not for books, so I guess they are 2 different css. Thank you all very much for your answers and have a nice day. |
11-25-2022, 12:53 PM | #2 | |
want to learn what I want
Posts: 1,284
Karma: 6433040
Join Date: Sep 2020
Device: Calibre E-book viewer
|
Quote:
CSS for ebooks is pretty much the same as for html, as EPUBs are mostly a bunch of xhtml files and images, though I think better answers regarding styling questions will come from other forum members. Basically you have an element (paragraph, for instance) to which you apply a rule (text-align, for example) Last edited by Comfy.n; 11-25-2022 at 02:49 PM. |
|
11-25-2022, 12:56 PM | #3 |
want to learn what I want
Posts: 1,284
Karma: 6433040
Join Date: Sep 2020
Device: Calibre E-book viewer
|
Forgot to suggest opening any EPUB you like in Calibre Editor or Sigil, and see what CSS rules you'd like to tweak
Last edited by Comfy.n; 11-25-2022 at 06:07 PM. |
11-25-2022, 01:19 PM | #4 |
the rook, bossing Never.
Posts: 12,376
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
The azw3 is closer to epub than KFX.
We don't create KFX at all. Even on Amazon, if you used Download for USB transfer and a Kindle that has later than FW 3.5.x or so you never get KFX. KFX is delivered to Kindle apps and newer Kindles using WiFi/3G/4G etc. |
11-25-2022, 02:41 PM | #5 |
Resident Curmudgeon
Posts: 76,484
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You can download Kindle Previewer and install the KFX plugins for Calibre and use Calibre to convert your ePub to KFX and then send the KFX to your Kindle via USB.
|
11-25-2022, 05:46 PM | #6 | ||||||
Wizard
Posts: 2,304
Karma: 12587727
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
Every single book is going to be completely different on the inside, so there's no one-button press or one-button solution for this. - - - Your best bet, like JSWolf said, is to just: 1) Convert your EPUBs into Amazon formats using Calibre or Kindle Previewer. 2) Transfer that over to your Kindle. - - - To try to "normalize all your ebooks"... that's a lifelong task. :P If you learn the basics of HTML+CSS though, you COULD know enough to go inside ebooks and fix some particularly egregious errors. Like let's say you try to read a book and the font size is HORRIBLE. You could poke around inside and remove the offending code. Or if the publisher accidentally stuck dark text/backgrounds, making "Dark Mode" impossible (black-on-black text). You could go in and fix those pieces. Quote:
- - - But, if you really want to learn about ebooks... then you could dig into the innards. Open some of those EPUBs in Sigil/Calibre and take a look inside. Or if you have Amazon ebooks, install the fantastic Calibre plugins: That lets you convert from Amazon's ebooks into an EPUB, which you can then open up and look inside. Open up some of your favorite books and see how they do it. - - - Another great way to learn is to find ebooks in the MobileRead library. You can open those up and look inside + see how they're created. Usually the people here take very high pride in their work, so the HTML+CSS is going to be A LOT CLEANER and easier to understand. If you want to see some of my ebooks, here's an example:
I did that one in 2019. Open up that EPUB in Sigil and take a closer look. For the most part, almost all my ebooks (over 650+) are using very similar code with only slight deviations. Quote:
But, like I explained above, each ebook is going to have unique innards, so things might not easily be able to carry over in "one button push". Better to learn the basics of HTML+CSS, so you can open up the book and see WHAT THE HECK IT'S doing, then surgically go in there and correct your exact issue if needed. Like if some heading is using an AWFUL FONT that's too thin + unreadable on e-ink, you can go inside and zap that problem. :P Quote:
Quote:
But the stuff geared towards websites is usually very fancy/complicated. Ebooks are very simplified, and all you really need are: The Basic Building Blocks of HTML + CSS HTML basics
and CSS:
It seems overwhelming initially, but if you learn piece-by-piece, you can figure it out. - - - Like what does this do? HTML: Code:
<h2>Why Homeschooled Children Love Reading</h2> <p class="noindent">I saw the headline in Monday’s <i>Harvard Gazette</i>: “Life Stories Keep Harvard Bibliophile Fixed to the Page.” My first thought was, “I bet he was homeschooled.”</p> Code:
h2 { text-align: center; text-indent: 0; } .noindent { text-indent: 0; }
And now let's look at the CSS:
There you go, now you're well on your way. Open up your favorite ebooks and try to see what the heck they're doing. If you don't understand something, you can always ask. - - - Extra: What do you think this CSS does? Code:
blockquote { margin-top: 1em; margin-bottom: 1em; margin-left: 10%; margin-right: 10%; } .right { text-indent: 0; text-align: right; } - - - Side Note: If you want to see that homeschooling ebook I worked on, you can find it here: Open it in Sigil (or Calibre) and see the clean code! Poke around, see if you can figure out what piece does what! No problem. Last edited by Tex2002ans; 11-26-2022 at 03:21 AM. |
||||||
11-25-2022, 09:22 PM | #7 |
Enthusiast
Posts: 41
Karma: 10
Join Date: Mar 2019
Device: kindle 8th
|
Hello, I thank you all for your help. There are wonderful people here on this forum.
Dear Text2002 ans, you have given me a lot of information, it took me several days to learn everything you said. The examples you gave are wonderful, I appreciate that you have taken all the time to teach me, I will review what you say with a magnifying glass, perhaps that is why I suddenly take time to answer if I have any doubts. Comfy.n don't know html either hahaha, the only thing I know about any programming language was a course of a few hours in python. I'm going to install sigil, I've heard a lot of good things here, and I'm going to play around with a book. spoiling you learn hahaha. Jswolf : If I have the plugin, and have used it a couple of times, it's painfully slow. But I feel that I still need to know things, Amazon books look nice, but when they are converted, they lack I don't know what, they don't look professional. I am going to follow your advice to all of them and they are right when it comes to fixing the most serious or annoying errors, the rest is very cumbersome when you have several books. Greetings to all. |
12-05-2022, 03:56 PM | #8 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
I've used this style sheet for ten years: https://notjohnkdp.blogspot.com/2013...yle-sheet.html
I occasionally tweak it, but copying those items into a plain-text file named epub.css will handle about any book you're likely to create. (No tables. I don't mess with tables in ebooks.) |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to make a book in kfx format have the same number of pages as one in azw3? | ksyll | Conversion | 3 | 08-28-2022 07:41 PM |
EPUB to KFX conversion insights | Goli4th | Library Management | 7 | 07-16-2022 05:30 PM |
Epub to KFX conversion issue | Surreal | Introduce Yourself | 0 | 10-18-2019 03:15 PM |
Does converting to KFX format change or limit the CSS styling of the source file? | jdunning | Conversion | 3 | 08-01-2019 11:35 PM |
Why, During ePub to ePub Conversion does Calibre changes existing CSS classes? | JSWolf | Conversion | 7 | 08-06-2011 08:32 PM |