Quote:
Originally Posted by Jellby
Unless there is already some CSS like this:
Code:
p span { font-weight: bold; }
I guess?
|
Now you mentioned it...
I do encounter this problem, practically all of my vertical layout books, since some of texts need to be "tate-chu-yoko":
Code:
html { -epub-writing-mode: vertical-rl; }
.tcy { -epub-text-combine: horizontal; }
<p>今天是<span class="tcy">9</span>月<span class="tcy">24</span>日</p>
With the current version Kobo Touch Extended Driver, my books are converted to:
Code:
<p>
<span class="koboSpan" id="x">今天是</span>
<span class="tcy">
<span class="koboSpan" id="x">9</span>
</span>
<span class="koboSpan" id="x">月</span>
<span class="tcy">
<span class="koboSpan" id="x">24</span>
</span>
<span class="koboSpan" id="x">日</span>
</p>
and the "tcy" styles are all gone on my Kobo Glo.
Currently I just hack the container.py to make it skipping all <span> and <a>:
Code:
def __append_kobo_spans_from_text(self, node, text):
if node.tag.endswith('span') or node.tag.endswith('a'):
return False
...
I don't think it solves the problem though -- for example, I've seen *some particular publisher* (cough * MediaFactory * cough) made books like this:
Code:
.c1 { ... }
.c2 { ... }
.c3 { ... }
.c4 { ... }
...
<p class="c1"><span class="c2">...</span></p>
<p class="c3"><span class="c4">...</span></p>
...
And my hacked container.py wouldn't add any koboSpan on it. (fortunately the book was already a kepub, so I don't get too many problems for now.)
Any suggestions?