I would like to enter a Chinese (Simplified) Characters in a TeX doc that is rendered by XeTeX and have the Pinyin transcription automatically added below the according characters. So, I only enter the Chinese characters and the Pinyin should be looked up through a library.
I have seen that ChinesePod does something similar, so I imagined that someone else must have thought of that and written something for TeX already. Do you know any tools/packages for that for TeX?
Here is a picture of how it should look like: http://cl.ly/35Lr
ruby
package to print the pinyin under each corresponding character. However selecting the correct pinyin may not be trivial: characters often have multiple pronunciations depending on their meaning in context, e.g. 长 is cháng when meaning "long", but zhǎng when meaning "elder", "grow", "leader". – imnothere Mar 31 '11 at 2:00