2

I use pinyin in glosses and found a way to convert it automatically (using pinyin package with xelatex). However, the call to pinyin adds space before a dot. The following code produces kuài . rather than kuài.. Is there a way to fix this? The manual is in Chinese and I do not understand the code of the xpinyinpackage.

\documentclass{book}                          


\usepackage{xpinyin}

\begin{document}

\pinyin{kuai4.}

\end{document} 
2
  • It works if you put the dot outside the argument: \pinyin{kuai4}. (But as I don't know pinyin I have no idea if this is senseful). Jul 31 '15 at 13:50
  • That would not work since it is automatically included in the call to pinyin in this glossing environment described in the other question. Jul 31 '15 at 18:05
2

I don't know what other consequence this can have, but the space is set at the start with (something equivalent to)

\xpinyinsetup{pysep={ }}

so you can countermand it:

\documentclass{book}
\usepackage{xpinyin}

\xpinyinsetup{pysep={}}

\begin{document}

\pinyin{kuai4.}

\end{document}

You can also do it locally with

\pinyin[pysep={}]{kuai4.}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.