View Single Post
Old 12-12-2015, 04:36 PM   #811
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Here's another New Test Version (direct link).

2015-12-12

- Add keep_html_attrs feature - deprecates keep_style_attr and keep_title_attr.
- Add replace_tags_with_spans feature.

These should help with edeniz's 'big' problems. Note that I changed my mind about keep_align_attr and instead added a generalized keep_html_attrs param.

From defaults.ini:
Code:
## Some attributes cause problems for EBook readers.  By default,
## FanFicFare will remove all attributes except the ones specified
## from all tags.  (The only exception is that <img> tags will also
## keep src, alt and longdesc attributes.)
## Example: To add 'style', 'title' and 'align' to the list to keep,
## in your personal.ini [defaults] put:
## add_to_keep_html_attrs:,style,title,align
keep_html_attrs:href,name,class,id

## Tags listed here will be replaced with <span class="tagname">.
## For example: <u>underlined text</u> becomes
## <span class="u">underlined text</span>
## Note that the output_css should contain the class .u, .big, etc for
## the spans to be useful.
## This feature is for replacing old tags deprecated/removed in newer
## HTML and EPUB standards.
replace_tags_with_spans:u,big,small
For replace_tags_with_spans to work, you need to have the appropriate CSS classes like:
Code:
## This is what I've added to defaults.ini:
output_css:
 ...
 .u        {text-decoration: underline;}
 .big { font-size: larger; }
 .small { font-size: smaller; }
I'm open to suggestions on the appropriate CSS for <big> and <small>. I haven't tested with different book readers yet.
JimmXinu is offline   Reply With Quote