
: Efficient way to colour code text? For the purposes of learning Chinese, I want to write every character in a short novel in a colour that corresponds to its tone (pronunciation thing). The
For the purposes of learning Chinese, I want to write every character in a short novel in a colour that corresponds to its tone (pronunciation thing). The book is an epub, and I've been doing the html inside it like this:
<span style="color:#64B4FF"> 今 </span>
This works to display the colours correctly, but the file is now so big and unwieldy that highlighting and dictionary lookup has become unacceptably slow. Is there a more efficient way to do this, or a better file format to use? I don't want to convert to pdf because then I would lose the ability to do dictionary lookups.
Possibly relevant info: the characters are in utf-8 right now, there are only five possible colours, and I'm using moon+ reader on Android with the goldendict dictionary.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @Erin

: How do I repack a .mobi file? I used Kindle Unpack in Calibre to unpack a .mobi file, so I could correct mistakes in images and text. It was easy - images were JPGs or JPEGs and text was

: Create Kindle dictionary as KF8 / Floating images in a Kindle dictionary I'm working on a Game of Thrones Kindle dictionary and would like to float images in some of the definitions. (width
1 Comments
Sorted by latest first Latest Oldest Best
If you want to stick with EPUB, you can save space by giving each tone a class with a short name and defining the class's color in the CSS. So the example you gave would look something like this:
<span class="a"> 今 </span>
The CSS file, named something like stylesheet.css, would define the class like this:
span.a {
color: #64B4FF
}
You'd need to add a link to the stylesheet in the head element of each HTML file like this:
<link href="stylesheet.css" type="text/css" rel="stylesheet"/>
The path in href is relative, and this example assumes stylesheet.css is in the same directory as the HTML file.
I don't know if this approach will save enough space to speed up highlighting and dictionary lookups, but it's something to try.
Free books android app tbrJar TBR JAR Read Free books online gutenberg