4

The pinyinscope environment of the xpinyin package adds pinyin annotations to all Chinese characters therein, including those that appear in the footnote.

Is it possible to suppress pinyin annotation for footnotes inside a pinyinscope environment (or inside an \xpinyin* command)?

My current work around is to use the \footnotemark+\footnotetext combination. But this is hardly efficient when there are a lot of footnotes to be entered.

MWE

\documentclass{article}
\usepackage[UTF8]{ctex}
\usepackage{xpinyin}

\begin{document}
\begin{pinyinscope}
文字文字文字\footnote{腳註\ inside \texttt{pinyinscope}}
\end{pinyinscope}

\begin{pinyinscope}
文字文字文字\footnotemark % work-around
\end{pinyinscope}
\footnotetext{腳註\ using \texttt{\string\footnotemark} and \texttt{\string\footnotetext}}
\end{document}

enter image description here enter image description here

5

My idea is to let the pinyin part become empty in the footnotes. To realise it I redefine the \footnote command and control the format option of the \xpinyin command. The package manual (in Chinese) gives details of options. The following codes do work as a workaround with both plflatex and xelatex, although I think they are a little ugly.

\documentclass{article}
\usepackage[UTF8]{ctex}
\usepackage{xpinyin}

\makeatletter
\let\oldfootnote=\footnote
\renewcommand{\footnote}[1]{\oldfootnote{\xpinyin*[format={\@gobble}]{#1}}}
\makeatother

\begin{document}
\begin{pinyinscope}
文字文字文字\footnote{腳註\ inside \texttt{pinyinscope}}
\end{pinyinscope}

\begin{pinyinscope}
文字文字文字\footnotemark % work-around
\end{pinyinscope}
\footnotetext{腳註\ using \texttt{\string\footnotemark} and \texttt{\string\footnotetext}}

\end{document}

Anyway, I still suggest you to contact with the package author to solve this problem in essential and also expect a wiser solution.

  • 1
    @KevinC The authors noticed this bug yesterday and have fixed it. See their discussion at link – Wenbo Jan 13 '14 at 2:48
  • 1
    It is an undocumented feature. I'm glad you know it. – Qing Lee Jan 13 '14 at 10:54
3

This feature has been added in the new version (avaliable in ctex-kit currently). I will submit it to CTAN soon. If you have any other suggestions, please let me know.

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

  • Thank you for this nice package and the prompt response! I really appreciate your devotion to ctex. I'll let you know if other issues come up ;) – Herr K. Jan 13 '14 at 15:19

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.