![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2010
Device: Papyre 5.1 (Hanlin)
|
Making EPUB 'My Way' CSS
Hi,
I am converting-making epub with Calibre and so far, so good. It's terrific. However, there's something I don't know how to make, surely due to my ignorance: I input XHMTL as simple as possible. That is: plain p, h2, h3, and h1 tags with some em and blockquotes. No more as what I do are plain text novels. Then I add a very simple css with very basic rules (align letf, size 1em, 1.4em...). Nothing more as I like/need my code and texts to be as simple and clean as possible. The question: Is there any way I cand stop Calibre from adding all the classes and extra CSS stuff so that I simply inject the CSS in the conversion dialogues and I get the simple output I want? Thanks a lot, folks. Gustavo, posting from Madrid |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
I don't think you can stop Calibre adding all the classes to the <p>, <h1> etc tags inside the converted epub, but if you already have a standard css file which you use with your simple html, then those Calibre-created classes should give you the same visual result as your standard css file.
There are several ways to make Calibre use your standard css file:
|
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2010
Device: Papyre 5.1 (Hanlin)
|
Thanks. I'll try though some of the answer I have already tried and Calibre (if I recall it all right) adds a lot of extra things.
Anyway, nothing I cannot really live with it. I hoped there were some 'template-like' setting where I could place my CSS output preferences (and some othe ones as well) and forget about them for ever ![]() Bye Gustavo |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
If either option 3 or 4 works for you, you can add css to your Calibre preferences defaults. Then you could 'forget about it' for all new conversions.
|
![]() |
![]() |
![]() |
#5 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
1) Explode the ePub. 2) Copy your own stylesheet.css over the top of calibre's generated one. 3) Use a simple regex to remove all class="calibre..." from the generated HTML documents. 4) Rebuild the ePub. You can omit step 3 but this will leave redundant data in the book. I know it's a few steps but it doesn't take long and you only do it once for each book, provided you do not reconvert. (Maybe there would be a way to program this as a plugin to automate it.) I agree, it would be useful to be able to do this via some sort of conversion dialogue. ![]() Last edited by Agama; 03-27-2012 at 07:22 AM. |
|
![]() |
![]() |
![]() |
#6 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2010
Device: Papyre 5.1 (Hanlin)
|
@Agama;
I do that in one or two steps less: I open the file in OxygenXML, I replace the CSS and I make a full regex in all files inside the epub. But the wonders of templating... ![]() |
![]() |
![]() |
![]() |
#7 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
What's OxygenXML? Sounds interesting. Is it expensive?
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2010
Device: Papyre 5.1 (Hanlin)
|
There's a reasonable priced version. The demo is fully functional for 30 days. I have no relation with them, BTW.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
epub to epub converting: making chapters? | Joy736 | Conversion | 8 | 10-30-2011 04:47 PM |
Why, During ePub to ePub Conversion does Calibre changes existing CSS classes? | JSWolf | Conversion | 7 | 08-06-2011 07:32 PM |
Override ePub CSS with userStyle.css? | barium | Sony Reader Dev Corner | 11 | 07-16-2011 03:25 PM |
Confused about making changes to my CSS in Sigil | Michael Grossman | Sigil | 11 | 06-17-2011 08:34 PM |
epub CSS versus "Regular" CSS | konrad | ePub | 4 | 02-18-2011 09:29 AM |