Hi Xu, hi CJK list! @list:
I'm forwarding this issue to you, because there seems to be an incompatibility between "CJK" and "listings" when GB2312 is used. You can view the original bugreport here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348636 @Xu: Using gb2312 as your encoding will indeed fail, even in CJK4.6.0. I have tried using UTF-8 and it works flawlessly. CJK4.6.0 supports Arphic and other Chinese fonts in UTF-8 now, and you can get the experimental Debian packages if you put these lines in your /etc/apt/sources.list file: deb http://chinese.alioth.debian.org latex-cjk/ deb-src http://chinese.alioth.debian.org latex-cjk/ I'm including the same test file you provided, but reencoded in UTF-8. When you have installed CJK4.6.0, you only have to run "latex" on it. Kind regards Danai SAE-HAN 韓達耐 -- 题目:《初入淮河》(选一) 作者:杨万里(1127-1206) 船离洪泽岸头沙,人到淮河意不佳。 何必桑乾方是远,中流以北即天涯!
\documentclass{book} \usepackage{CJKutf8} \usepackage{listings} \begin{document} \begin{CJK}{UTF8}{} \CJKfamily{gkai} \chapter{中文} blah blah \begin{lstlisting} some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. some verbatim contents here. \end{lstlisting} blah blah \clearpage \end{CJK} \end{document} %%% Local Variables: %%% coding: utf-8-unix %%% mode: latex %%% TeX-master: t %%% TeX-command-default: "LaTeX" %%% End: