11-27-2011, 08:05 PM | #1 |
Zealot
Posts: 133
Karma: 998
Join Date: Apr 2010
Device: Nook
|
Change Calibre Sytlesheet
Is it possible to change the style sheet that Calibre generates for a single ePub?
I know you can change the base font, but what I would like to fix is the chapter headings I am getting in one ePub. They are huge by comparison to the rest of the text. In this light, so is the spacing before them. I see in Sigil after conversion that the HTML is loaded with Calibre tags like: <h5 class="calibre2"> Is there a way I can edit the style "Calibre2" for example? Is there a way to edit the style of a heading after conversion or set it before conversion. The was a public domain book in AZW format. I hope I am being clear. Sigil allows me many options, and it seemed I could edit the style sheet - once. After wards it would not let me edit it again. Any thoughts would be appreciated as always. |
11-27-2011, 08:41 PM | #2 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Calibre does not use or add it's own style sheet. What it does is normalize the existing styles from the input. In this case editing with Sigil is the easiest way to fix the issues you're having this this particular book.
|
11-28-2011, 07:54 PM | #3 |
Zealot
Posts: 133
Karma: 998
Join Date: Apr 2010
Device: Nook
|
Thanks for your assistance
With Sigil open to my ePub, I see the stylesheet.css to edit, but how do I cross-reference the heading1, heading2 in Sigil's left, upper window, with the Calibre1, Calibre2 as displayed in the stylesheet opened in Sigil. I see where I can change the top margin, but knowing which heading ties in with heading1 is where I am at a loss. |
11-28-2011, 08:02 PM | #4 | |
Well trained by Cats
Posts: 29,820
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
ex. <h3 class="calibre72">A weird chapter</h3> adjusting the style: .calibre72 will affect ALL places that have class="calibre72" You can make new classes (both places) if not all places used are to be changed. (there are more tricks of the trade once you get comfortable |
|
11-29-2011, 01:09 AM | #5 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
FYI there is a Sigil forum where more experienced users of Sigil exist to answer these questions. |
|
11-30-2011, 09:19 AM | #6 |
Zennist
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
|
Themus, have you tried Calibre's built-in epub editor? I find it the simplest, most convenient way to make tweaks to epubs and CSS sheets. It's what I use to delete embedded Charis fonts as well as xml files which can screw up formatting on my Sony reader, fix metadata TOC errors, and adjust margins and font sizes in the css file.
I used to use Sigil more, but ever since Calibre added the "Tweak Epub" feature, I only use Sigil if there needs to be extensive editing to the book's text itself. I think the tweak epub feature is one of Calibre's best assets. Once Calibre "explodes" the epub for editing, you can use the excellent and free Notepad++ utility to do the actual edits to the epub's exotic file types (css, opf, toc, etc). Last edited by PatNY; 11-30-2011 at 09:26 AM. |
12-01-2011, 04:35 PM | #7 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
I am so new at this - how do you access the Tweak Epub feature in Calibre?
I'm afraid to play too much with it, for fear I'll break something. |
12-01-2011, 05:15 PM | #8 | |
Well trained by Cats
Posts: 29,820
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
It is near the bottom: Backup your Calibre settings folder before you start. A quick restore (just replace the damaged contents. Calibre must be shut down. Last edited by theducks; 12-02-2011 at 11:00 AM. Reason: My bad. wrong tweak |
|
12-01-2011, 09:44 PM | #9 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
Under the Advanced heading, I see one called Tweaks - is that the one you mean? I didn't see anything called Tweak Epub. (I'm using Windows 7 and the most current release of Calibre - 8.28, I think it is)
|
12-01-2011, 09:54 PM | #10 |
creator of calibre
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Right click on the book you want to Tweak and select Tweak EPUB. Or just select the book and press the T key.
|
12-01-2011, 09:59 PM | #11 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Right click on any book and "Tweak ePub" will be an option in the context menu.
|
12-02-2011, 10:57 AM | #12 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
oh! thank you - I was looking on the Preferences menu. I've got a sample text file I've created that I use to play with new features - I think I'll play with it some more now.
|
12-02-2011, 03:09 PM | #13 |
Zennist
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
|
Becca, yes the Tweak ePub feature is available right from the main Calibre window under the right-click context menu when you select a book. It's so handy to have.
I notice you have a PRS-350 also. If you ever have issues with a cover not showing up on the Sony reader (and it shows up fine everywhere else), it could be an xml file in the epub. Simply delete it and the cover shows up fine (though you'll have to do another epub-to-epub conversion in Calibre first after deleting it). The file will be called something like roadmap.xml or cover.xml. I always delete it now using Tweak ePub before I do any conversions. Another file which plays havoc with the Sony reader is the xpgt file. It will set spacing and margins on the reader that you can't fix by simply tweaking the css file. Delete the xpgt file and problem solved. I also routinely delete all embedded charis fonts in my epubs as I have the Boroda custom firmware installed on my reader which lets me use a set custom font. So far I have not seen any detrimental effects to my epubs by deleting these files. And it appears many readers (Stanza, Calibre's own reader) routinely ignore xml and xpgt files anyway since the issues they cause on my Sony reader do not appear in those other places. Oh, and to be safe, back up your epub before using the Tweak ePub feature for the first time. |
12-03-2011, 12:31 PM | #14 | |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
Quote:
oh, yeah! I so very much don't know what I'm doing (yet) that I back up everything. sometimes twice. Next term, I'm taking a beginning class on CSS and HTML - with luck what looks like gibberish to me now will make sense shortly. |
|
12-05-2011, 09:03 PM | #15 |
Zealot
Posts: 133
Karma: 998
Join Date: Apr 2010
Device: Nook
|
Thank you everyone for responding. I have used the Tweak ePub on the text portions and with Notepad++. Tonight I did examine the styles sheet.
There of course is a learning curve in all this and digesting what syntax does what and where. Calibre is top-notch and really the best ePub application I know of. Sigil is up there too in it's own right. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre language change? | mago55 | Calibre | 8 | 11-16-2020 01:49 AM |
Change Margins With Calibre | Jafo | Conversion | 19 | 04-19-2011 08:39 PM |
Which format does Calibre change to ePub best? | ksmith100056 | Barnes & Noble NOOK | 20 | 01-02-2011 01:31 PM |
Calibre Look Change? | Rand Brittain | Calibre | 11 | 11-15-2010 06:41 PM |
Calibre-How do I change my device? | LateMommy | General Discussions | 2 | 06-28-2010 10:05 AM |