[XeTeX] How to prevent Chinese chars to be treated as part of TeX command?

mhbezine209 mhbezine2009 mhbezine2009 at gmail.com
Sat Oct 17 05:34:24 CEST 2009


I find a problem of XeTeX: I often encounter errors like
"! Undefined control sequence l.6 \TeX你好"
when I typeset Chinese documents with XeTeX.
See example below to have an idea on the source of errors.
------cut from here----------
\documentclass{article}
\usepackage{xeCJK}
\begin{document}
\TeXÄãºÃHello
\end{document}
-------end----------------------

Such errors occur when chinese characters (or any other non-ASCII unicode
chars) follow a valid command immediately.
In other words, if there is no space between Chinese characters and a
command name,
XeTeX will treat the Chinese characters as part of the command name, so it
issues an error message.  I do not know whether it is a bug of XeTeX or it
is intended. Anyway, I find this design is very annoying because I must
manually add a white space or {} after each command name so as to avoid such
errors. Does anybody to have good solution to resolve this problem? It would
be disirable if this feature of XeTeX can be disabled with one command or a
macro. I think it would be better to restrict command names in ASCII chars.
Thanks for any discussion on this issue:-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20091017/8cd797ba/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aaa.tex
Type: application/x-tex
Size: 99 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20091017/8cd797ba/attachment.tex>


More information about the XeTeX mailing list