Pinyin in Microsoft Word (or other platforms)

xiaophil
December 07, 2009, 02:24 AM posted in I Have a Question

Hi y'all!  As part of a project I am doing, I want to add pinyin above hanzi, just like a textbook.  Word 2007 is supposed to do this, but I find that for some reason it fails to show entire sections of pinyin.  Does anybody have any experiece with this?  Or does anybody have another free method for conveniently and automatically inserting pinyin above hanzi?  I found this website, but I think the output is pretty ugly.

Anyway, thanks in advance.

Profile picture
andrew_c
December 07, 2009, 03:44 AM

Some ideas:

1. It's below not above, but MDBG does this.  just change "word-by-word lookup" to  "inline / popup annotation" and select "Show Chinese and Pinyin inline".

2. Ruby characters, see Ruby markup examples .  Browser support for this varies.

3. Various released WLCP stylesheets do this.  Maybe you could write XML and then the WLCP xsl/css stylesheets will transform it the way you need?  You can check out how it's achieved, and then maybe write a small code to auto-generate the HTML yourself. See here for an example, it also shows English below, and selectively hides Pinyin above, but plenty of Pinyin are still present.  Also, the following is an attempt to copy and paste one annotated character, maybe you can use this as a template....  

fèng

4.  Maybe this is helpfu

Profile picture
xiaophil
December 07, 2009, 03:52 AM

Okay, cool.  I will definitely look.  Thanks so much!