1

I'm trying to use gb4e and pinyin package for putting pinyin in my linguistics examples. However I have a bunch of weird errors which would go away if I comment out using pinyin. Maybe \ex is causing the problem?

\documentclass{article}
\usepackage{gb4e}
\usepackage{pinyin}

\begin{document}
    \begin{exe}
    \ex{ 
        \textit{\ta1 \ke3\neng2 \ci2\zhi2 le -- \ta1 \liang3 \zhou1 \mei2 \lai2 \shang4 \ban1 le.}

         he may resign PART -- he two week not come to work PART.

         He may have resigned -- he has not come to work for two weeks.}

    \ex{ 
         \textit{\wo3 \cai1 \ta1 \ci2\zhi2 le -- \ta1 \liang3 \zhou1 \mei2 \lai2 \shang4 \ban1 le.}

         I guess he resign PART -- he two week not come to work PART.

         I guess that he has resigned -- he has not come to work for two weeks.}
    \end{exe}
\end{document}
1
  • 1
    Welcome to TeX.SX! Try loading first pinyin and then gb4e
    – egreg
    Commented Nov 23, 2015 at 21:28

1 Answer 1

1

The pinyin.sty file aims to be compatible with both Plain TeX and LaTeX, but does so in a disputable way. For some reasons, this conflicts with the setup done by gb4e. The solution seems to be in just exchanging the loading order.

\documentclass{article}

\usepackage{pinyin}
\usepackage{gb4e}

\begin{document}
    \begin{exe}
    \ex{
        \textit{\ta1 \ke3\neng2 \ci2\zhi2 le -- \ta1 \liang3 \zhou1 \mei2 \lai2 \shang4 \ban1 le.}

         he may resign PART -- he two week not come to work PART.

         He may have resigned -- he has not come to work for two weeks.}

    \ex{
         \textit{\wo3 \cai1 \ta1 \ci2\zhi2 le -- \ta1 \liang3 \zhou1 \mei2 \lai2 \shang4 \ban1 le.}

         I guess he resign PART -- he two week not come to work PART.

         I guess that he has resigned -- he has not come to work for two weeks.}
    \end{exe}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .