[XeTeX] \newcommand and ZWNJ

وفا خلیقی، Vafa Khalighi vafa at live.com.au
Thu Apr 30 10:37:26 CEST 2009



Hi

If I define a new command, where the name of the command is in Persian like:



\newcommand\سیاه[1]{\textbf{#1}}
(Sorry if you see it the wrong way, I have written it in the correct format but because of RTL and LTR direction, it looks wrong.)
Then that works fine but if a command name contains ZWNJ character which is common in Persian like:


\newcommand\متن‌سیاه[1]{\textbf{#1}}
Then I get error and that is
%%%%%%%%%%%%%%%%%%%%%%
! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.3 \newcommand\متن‌س
                           یاه[1]{\textbf{#1}}
? %%%%%%%%%%%%%%%%%%%%%%%%%


But it does not happen if I use \def instead \newcommand


Does anyone know if there is a way that I can use \newcommand to define a command whose name contain ZWNJ character like متن‌سیاه

This is a minimal LTX document:



\documentclass{article}
\newcommand\سیاه[1]{\textbf{#1}}
\newcommand\متن‌سیاه[1]{\textbf{#1}}
\begin{document}
Test


\end{document}

As I mentioned above, the first new command is ok but the second one produces the error. Any solutions to fix this?


_________________________________________________________________
Need a new place to rent, share or buy? Let ninemsn property search for you.
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Edomain%2Ecom%2Eau%2F%3Fs%5Fcid%3DFDMedia%3ANineMSN%5FHotmail%5FTagline&_t=774152450&_r=Domain_tagline&_m=EXT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20090430/da6aac08/attachment.html 


More information about the XeTeX mailing list