This manual describes the usage, options, and implementation details of the xpinyin v3.1 LaTeX package for automatic Pinyin annotation of Chinese characters.
The xpinyin package is a LaTeX extension designed to provide automatic Pinyin annotation for Chinese characters. It supports source files encoded in both GBK and UTF-8 and automatically selects the necessary dependencies (such as CJK, CJKutf8, or xeCJK) based on the compilation engine used (LaTeX, pdfLaTeX, or XeLaTeX). The package ensures correct output of tone marks by utilizing appropriate Western fonts. This manual is written in Chinese.
The package supports LaTeX, pdfLaTeX, and XeLaTeX, automatically selecting the appropriate CJK or xeCJK dependencies.
By default, the Pinyin font is set to match the document's main font (\normalfont), but it can be changed using the 'font' option.
For multi-reading characters, you can use the \xpinyin command to set a specific pronunciation, or use the 'multiple' option to highlight them.