Quote:
Originally Posted by wildfire070
Here's a SFW link to an example story. The beginning 2 lines after the author's note in the epub downloaded by FFF should be centered, along with the "XXX" dividers throughout the story but everything is left-aligned.
|
By default, FFF removes style and align attributes from tags.
From defaults.ini:
Spoiler:
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. data-orighref is used by
## internalize_text_links to preserve links when chapters are
## inserted.)
## 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,colspan,rowspan,data-orighref
You can keep style and align attrs for AO3 only, or all epubs like so:
Code:
[archiveofourown.org]
add_to_keep_html_attrs:,style,align
# use one or the other, not both
[epub]
add_to_keep_html_attrs:,style,align
You'll have to do an overwrite always download to get these changes.
That will fix centering in these stories and lot of embedded styles in other.
Quote:
Originally Posted by wildfire070
Same with the dividers in this story, but another weird thing I've noticed with this particular story is that when downloaded via FFF, there isn't a space after a period to separate sentences in the body of the story. It appears normal on AO3 and in the epub that is downloaded directly from AO3, but the epub generated with FFF doesn't have a space after periods.
|
The spacing between sentences issue in this one is a little more complex.
For whatever reason, the HTML the author uploaded for the story text contains no newlines at all. It's all:
Code:
<p>Blah blah blah.<span class="Apple-converted-space"> </span>Blah blah blah.</p><p>New paragraph, same "line".<span class="Apple-converted-space"> </span>Blah blah blah.</p>
(It doesn't actually matter, but the first 'space' in each span is actually a 'non-breaking space'(0xA0) instead of normal 'space'(0x20). Which is also a weird thing to do.)
By default, FFF also removes most 'empty' tags. From defaults.ini:
So the <span> tags above are being removed, taking all the whitespace between sentences with them.
You can keep those <span> tags by adding to keep_empty_tags. I don't recommend doing that universally, but on a story by story basis:
Code:
[https://archiveofourown.org/works/43658766]
add_to_keep_empty_tags:,span
Again, you'll have to do an overwrite always download to get these changes.
I honestly don't remember what ebook readers had problems with what attributes many years ago. It would have been in the days of first gen Nook and Kindle and may have been before I started working on the project.
I vaguely recall that removing empty tags was added specifically for AO3 because it has (had?) a tendency to have extra 'empty' tags that introduced spaces mid word a lot. Or perhaps some word processor's HTML output did.