When I try to use the xecjk and listings packages together, I get error messages that include the following:
! LaTeX error: "kernel/message-already-defined" ! Message 'Require-XeTeX' for module 'xeCJK' already defined. ! Emergency stop. | This is a coding error. | | LaTeX was asked to define a new message called 'Require-XeTeX' by the module | 'xeCJK': this message already exists. (end error messages). Switching the included order of the packages does not correct the problem. Here is a somewhat minimal example: \documentclass{article} \usepackage{listings} \usepackage{xecjk} %\usepackage{listings} \begin{document}% \thispagestyle{empty}% \Huge% 一二三四五六七八九十。 一二三四五六七八九十。 一二三四五六七八九十。 一二三四五六七八九十。 一二三四五六七八九十。 \end{document}% A test source file and log file is attached. In my case, I typed xelatex test in a Windows 7 command prompt. If both "\usepackage{listings}" lines are commented out, everything seems to work fine. See attached test.pdf for compilation without listings package. Many many thanks in advance, Dan
test.tex
Description: TeX document
test.log
Description: Binary data
test.pdf
Description: Adobe PDF document
-------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex