06-23-2010, 10:24 PM | #31 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
extra css is not used by the recipe system. You have to use the extra_css field in the recipe itself for that.
|
06-23-2010, 11:04 PM | #32 |
Member
Posts: 10
Karma: 10
Join Date: May 2010
Device: iPod Touch
|
Thanks!
It seems to me that the navigation bar style should be consistent across all recipes, no? I wonder whether it would make sense (and whether it is feasible) to modify the code so that the "extra-css" would override the recipe-defined "extra_css" field. Hummmm... (tinker, tinker). Last edited by marcot; 06-29-2010 at 09:53 AM. |
Advert | |
|
06-29-2010, 04:17 PM | #33 |
Member
Posts: 18
Karma: 46
Join Date: Jun 2010
Device: Nook
|
OK, I feel silly for being unable to find it, but where can I edit the content server's source files? I have the newest version in Linux. Figured they'd be somewhere in /opt/calibre, but I can't find them...
EDIT: I found the stuff in the resources folder! Last edited by dirtygreek; 06-29-2010 at 04:21 PM. |
07-16-2010, 05:55 PM | #34 |
Connoisseur
Posts: 82
Karma: 13557
Join Date: Jul 2010
Location: Albuquerque, NM
Device: Kobo, KT, KGlo, H2O, Libra
|
removing (essentially) all formatting?
While the css generator is very cool if you are working with input files from the same source, which are well-formatted, I've had some trouble if I'm converting books from various sources into a common output style for my kobo.
Personally, I'd to have something like all text in paragraph blocks set to 1em, with the line height at 0.9-ish em, with the rest of the tags just set to default (no scaling of line height in these, actually). If my input file has font-size, class, etc tags, that can become a real pain to achieve. What I personally would love to see, is an option where, to a certain extent, the css generator ignore *all* attributes to the various html tags - so just keep <h1>, <h2>, ..., <p>, bold, italic, and so on - and ignore any and all attributes setting widths, heights, etc, and any css files and classes specified. Then what I'd see on my kobo is fairly consistent across all books! The question is, then, is there a way to do this currently that I'm totally missing? I've dug around in the code some, and so far I can see where you might make changes to do this (cssflat, stylizer?), but I'm totally unfamiliar with python (more of a c++/java, plus some perl and bash scripting person)... any suggestions would be appreciated! |
07-16-2010, 07:21 PM | #35 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you want to neglect style information in style attibutes, the easiest way is to just stop the parsing of those attributes. Look at the __init__ method in Stylizer that's where all css from the input document is read and parsed.
|
Advert | |
|
07-16-2010, 08:41 PM | #36 |
Connoisseur
Posts: 82
Karma: 13557
Join Date: Jul 2010
Location: Albuquerque, NM
Device: Kobo, KT, KGlo, H2O, Libra
|
On the one hand, that sounds great! on the other, I'm feeling lazy and not wanting to deal with installing all of the needed packages/libraries to get things complied and running in cygwin (although I'm surprised not everything I needed was there, I did a full cygwin install!)... especially when I can put together some somewhat nasty bash scripts to do the same thing
but maybe something other people might be interested in, if I get motivated at some point... |
07-16-2010, 10:44 PM | #37 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Running calibre from source is trivial, instructions are in the user manual.
|
07-22-2010, 12:46 PM | #38 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jul 2010
Device: kobo
|
No NavBar
i am using with success this
extra_css = ''' .calibre_navbar {display: none;} .calibre_navbar1 {display: none;} .calibre_navbar2 {display: none;} ''' Could the NoNavBar be a device parameters ? For example kobo does not support it, at this time, i need to update every recipe that i used ... Thanks |
07-22-2010, 12:50 PM | #39 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
When you say "doesn't support it" what do you mean?
|
07-22-2010, 07:14 PM | #40 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jul 2010
Device: kobo
|
No NavBar
"kobo does not support it"
AFAIK They are no way to select and follow NavBar link on the kobo eReader In fact to follow any EPUB link Fabrice |
07-22-2010, 07:24 PM | #41 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Ah well, just leave it in there, it just takes up one line of screen real estate.
|
08-28-2010, 01:20 AM | #42 | |
Member
Posts: 16
Karma: 10
Join Date: Aug 2010
Location: Canada
Device: Sony
|
Quote:
All I have found so (did read some posts and the tutorial on compiling your ebook) are is references to the built in CSS screen and using internal stylesheet. This is my first day here, sorry if I asked this in the wrong thread. |
|
08-28-2010, 01:21 AM | #43 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That is also consolidated
|
08-28-2010, 01:32 AM | #44 |
Member
Posts: 16
Karma: 10
Join Date: Aug 2010
Location: Canada
Device: Sony
|
Thanks for the quick reply!
Just to be clear, Can I do all the CSS in an external stylesheet and skip the CSS screen? Have the template already all done in XHTML 1.0 Strict w/ external CSS file with the plan of recycling for each new title created. |
08-28-2010, 01:36 AM | #45 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yes, provided all the html files link to the sheet
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom CSS for output | deckoff | Calibre | 1 | 08-29-2010 12:55 AM |
ePub with custom .css on a 505 | dicknskip | Sony Reader Dev Corner | 3 | 06-10-2010 12:34 AM |
User stylesheets for ePub files | salty-horse | Sony Reader Dev Corner | 12 | 02-23-2010 08:44 AM |
ePub conversion: override existing css with a custom one | sbin | Calibre | 1 | 01-09-2010 05:03 AM |
Calibre's generated css for epub | brewt | Calibre | 7 | 12-29-2008 10:59 AM |