10-25-2010, 03:58 PM | #1 |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Help:how to add CSS additional data by converting books
First sorry,I am dislectic,can't find or make keywords,second my english is not that good.
I have more then 500 books in calibre. I want to add some lines in the css of all those books. I found the css section and I added a path to a styles.css that I created. In the css file are the following rules. Code:
h1 {text-align:center;} h2 {text-align:center;} h3 {text-align:center;font-weight: bold;font-size: 1.44449em;} p {margin: 0; padding: 0;} body, div, p, h1, h2, h3, h4, none { margin: 0; padding: 0; } p.indent{text-indent:0;} I now do it by hand. What do I do wrong, or is it simply not possible to do this ? Last edited by Nick_1964; 10-25-2010 at 04:00 PM. |
10-26-2010, 07:37 AM | #2 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
|
Advert | |
|
10-26-2010, 08:09 AM | #3 |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
I tried that, but for some reason when I use paste, there is nothing visible in the field.
Maybe When I type, gonna trie that now ! |
10-26-2010, 08:11 AM | #4 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@Nick, Referencing a css filename in the Extra CSS box should work, it certainly did at one time as I used to do it all the time.
Perhaps take a step-by-step approach. 1. Try Agama's suggestion but on a single book only. 2. If that works, replace the css with the css filename (as you tried originally) but still only converting a single book. 3. If that works try step 2 but highlight 2 books for conversion. At what point does the extra css no longer work? P.S. Are you sure the word none is valid in this line of CSS? Code:
body, div, p, h1, h2, h3, h4, none { margin: 0; padding: 0; }
Last edited by jackie_w; 10-26-2010 at 08:15 AM. |
10-26-2010, 08:19 AM | #5 |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Tried both with one book but the code does not insert in to the ebook.
Maybe it only works when converting from one sort to another, not epub to epub. Even without the "none", it doesn't work. |
Advert | |
|
10-26-2010, 08:30 AM | #6 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
|
10-26-2010, 08:32 AM | #7 |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
|
10-26-2010, 08:33 AM | #8 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
epub to epub should work fine. I just tried converting with
Code:
body {background-color:yellow} [Edit:] Oops. Too slow... |
10-26-2010, 08:41 AM | #9 |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
In the viewer... but does the change allso appear in the book itself when editing it with sigil ??
|
10-26-2010, 08:44 AM | #10 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Maybe you could make a new, simple ePub without extra CSS, then try a reconvert with the extra CSS. If that fails then you could post your simple ePub to this forum for testing. What version of calibre are you on?
|
10-26-2010, 08:47 AM | #11 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
I don't think updating the CSS in your epubs en-masse is as simple as this.
For instance if you put Code:
h1 {text-align:center;} Code:
<h1 class="mystyle">Chapter One</h1> Code:
.mystyle {text-align:left} You would need to be more specific in ExtraCSS e.g. Code:
h1.mystyle {text-align:center} |
10-26-2010, 09:09 AM | #12 | |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
I have the latest version 0.7.24 I will try that first. Then I follow the advice of jacky_w For my simple thoughts it was like this, after conversion my css code is just put at the bottom of the css file. When it only change's value's if my change isn't already in the css or if my priority is higher,then I have a problem, I must convert my rules in such a priority that mine is always overruling the one already in the css. That's to difficult for me because the books aren't made by me and the rules in the css files are always different... I just want to have all my books the same look, chapter numbers in the middle,everything starting in the left. (sorry for the bad english but sometimes a book look like this: ) Code:
Hello I am mister Nick Oh yeah ? Yes it is.. Sorry Code:
Hello I am mister Nick Oh yeah ? Yes it is.. Sorry Last edited by Nick_1964; 10-26-2010 at 09:12 AM. |
|
10-26-2010, 09:13 AM | #13 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
|
10-26-2010, 09:18 AM | #14 | |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
This is of course a one-book-at-a-time process but it works. |
|
10-26-2010, 09:47 AM | #15 | |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
For me it's simple, chapter numbers in the middle, text all to the left, pagebreak at the end of a chapter.. But because I am dislectic in a special way it is not easy for me to tell what I mean,then somehow try to tell (write it) in English , allso after just one year english lessons... I must look more into the tweak utility but even don't know where to find that.. but thats another story. I made the simple e-book and it convert the css, so I have to do it manually.. I do it a little more easy, I use total commander,batch rename all extentions in zip,then I can go in it with total commander, replace the css file. At the end, I rename them all back into epub but even then, it's a hell of a job,because not all of the css files has the same name in it... |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I edit/add Meta Data | 4jacks | Kindle Formats | 4 | 10-07-2010 04:33 AM |
Add books - Meta Data format | wwaldo | Calibre | 2 | 03-17-2010 07:38 PM |
Additional CSS for conversion | LARdT | Calibre | 6 | 02-18-2010 07:52 PM |
ADDITIONAL CSS | LARdT | Calibre | 1 | 02-04-2010 08:02 PM |
Way to add additional information with Calibre? | MidknytOwl | Sony Reader | 5 | 09-11-2009 01:53 PM |