Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-20-2014, 01:14 PM   #1
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
How to Format a Chinese eBook with pinyin

I have a Word document in Chinese with the pinyin characters above each character. (These are the phonetic rendering of the Chinese to help recognition of the characters - as used by Chinese Children learning to read.) The pinyin need to sit directly above the correct character.

By converting the file in Calibre, you can get close to the desired result by using a suitable font, and positioning the pinyin correctly above the characters by using a span tag for each Chinese character and another span tag for each pinyin. The characters are positioned by setting the span tag to vertical align:bottom, and a left margin of -0.7em and the span for the pin yin set to vertical-align:top and a positive left-margin.

This method uses a huge number of span tags, and I wonder if this is the correct method or if anyone knows a better way.
verydeepwater is offline   Reply With Quote
Old 12-20-2014, 01:39 PM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,595
Karma: 23164775
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by verydeepwater View Post
This method uses a huge number of span tags, and I wonder if this is the correct method or if anyone knows a better way.
In epub3 epubs and Kindle azw3 books, you could use ruby markup.
Doitsu is offline   Reply With Quote
Advert
Old 12-27-2014, 09:00 AM   #3
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
Ruby Markup

[QUOTE=Doitsu;3007323]In epub3 epubs and Kindle azw3 books, you could use ruby markup..

Thanks very much for this, it took me a while to try this but now I have. Quite amazing actually, but I am still having a problem using the text exported from the Word file in a way that the necessary tags can be added without having to re-type the whole thing.

The original was in Microsoft Word, with the pinyin above the corresponding character - formatted in Microsoft Chinese proofing tools, which I don't have installed. As I mentioned, by converting this with Calibre, you can get an html file with each character marked by a span tag. It would be possible to replace each span tag to mark all the pinyin text with <rt> </rt> and the Chinese characters with <rb> </rb> as in the Ruby coding in your link. The trouble is that the html text produced from the word file is not in the desired order. It seems the Ruby formatting needs the base to come first<rb>, followed by the corresponding pinyin marked as <rt>. In the html file, produced from the Word file, the text on the top comes first, always followed by the text which is underneath. Thus you would basically need to re-type or cut and paste very word to get things in the desired order.

Any help with this would be greatly appreciated.

Last edited by verydeepwater; 12-27-2014 at 09:04 AM.
verydeepwater is offline   Reply With Quote
Old 12-27-2014, 10:07 AM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,595
Karma: 23164775
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by verydeepwater View Post
The original was in Microsoft Word, with the pinyin above the corresponding character - formatted in Microsoft Chinese proofing tools, which I don't have installed. As I mentioned, by converting this with Calibre, you can get an html file with each character marked by a span tag.
Have you tried to export the Chinese Word file as a "filtered Web Page" with Word? This might create an .html file with ruby tags. If it doesn't generate ruby tags, the Calibre DOCX-to-EPUB converter won't generate ruby tags either.

If it does generate ruby tags, you may want to ask about this conversion issue in the Calibre Conversion forum. If Kovid Goyal considers this a bug, he might be able to fix this conversion issue for the next release.

BTW, you could simply use a regular expression search in Calibre Editor or Sigil to add the required ruby tags.

If you post a line from the original document, the same line converted by Calibre and the format that you need, either Calibre or Sigil users will post the required regular expressions.
Doitsu is offline   Reply With Quote
Old 01-02-2015, 03:55 AM   #5
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
Ruby Code

Saving the file as filtered html does produce html with perfect Ruby code, as you suggest. I hadn't imagined there could be such a simple solution. Thank you for your help.
verydeepwater is offline   Reply With Quote
Advert
Reply

Tags
chinese, chinese characters, formatting chinese ebooks, pinyin, span tags


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search chinese font with pinyin and french accents fxp33 General Discussions 6 09-29-2013 05:37 AM
Philosophy Anonymous- Zhou yi 周易 chinese pinyin english. Version 1. May 2013 fxp33 ePub Books 0 05-09-2013 07:39 PM
Glo Chinese ebook not displaying dpoon73 Kobo Reader 7 12-28-2012 12:03 AM
Trying to Find: PINYIN Bible cancelx General Discussions 16 03-26-2010 08:55 AM
Master Format for multi-format eBook Generation? cerement Workshop 43 04-01-2009 12:00 PM


All times are GMT -4. The time now is 02:03 PM.


MobileRead.com is a privately owned, operated and funded community.