# Spacing problem with xpinyin

The xpinyin package provides a way to annotate Chinese characters with their Latin phonetic transcriptions. For characters with multiple pronunciations, one would use

\xpinyin{<character>}{<pronunciation>}


to provide the correct phonetic transcription. However, \xpinyin doesn't seem to obey the spacing settings of the pinyinscope environment, as illustrated in the following example (notice the overlap of duan and xiang):

\documentclass{article}
\usepackage{xcolor}
\usepackage[UTF8]{ctex}
\usepackage{xpinyin}
\xpinyinsetup{multiple={\color{red}}}

\begin{document}
\kaishu
\begin{pinyinscope}[hsep=1ex]

\end{pinyinscope}
\end{document}


The problem remains if the option hsep=1ex is given when loading the package.

How to solve this problem?

• This is a bug of xpinyin. We'll fix it soon. – Leo Liu Jan 4 '14 at 6:30
• Before the bug is fixed, you can manually add a \CJKglue before \xpinyin in the middle of the sentence. – Leo Liu Jan 4 '14 at 7:11

## 1 Answer

This bug has just been fixed in the new version which was submitted to CTAN. You may update your system in a few days to get it.

Update: The new version is available in TeX Live 2013.