<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br>Hi<br><br>If I define a new command, where the name of the command is in Persian like:<br><br>
<meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;"><!--StartFragment-->\newcommand\سیاه[1]{\textbf{#1}}</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">(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.)</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">Then that works fine but if a command name contains ZWNJ character which is common in Persian like:</p><p style="margin: 0px; text-indent: 0px;"><br></p>
<meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;"><!--StartFragment-->\newcommand\متن‌سیاه[1]{\textbf{#1}}</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">Then I get error and that is</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">%%%%%%%%%%%%%%%%%%%%%%</p><p style="margin: 0px; text-indent: 0px;"><br><meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>! LaTeX Error: Missing \begin{document}.
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">See the LaTeX manual or LaTeX Companion for explanation.</p>
<p style="margin: 0px; text-indent: 0px;">Type  H &lt;return&gt;  for immediate help.</p>
<p style="margin: 0px; text-indent: 0px;"> ...                                              </p>
<p style="margin: 0px; text-indent: 0px;">                                                  </p>
<p style="margin: 0px; text-indent: 0px;">l.3 \newcommand\متن‌س</p>
<p style="margin: 0px; text-indent: 0px;">                           یاه[1]{\textbf{#1}}</p>
<p style="margin: 0px; text-indent: 0px;">? <!--EndFragment--></p><!--EndFragment--></p>%%%%%%%%%%%%%%%%%%%%%%%%%<br><br><br>But it does not happen if I use \def instead \newcommand<br><br><br>Does anyone know if there is a way that I can use \newcommand to define a command whose name contain ZWNJ character like متن‌سیاه<br><br>This is a minimal LTX document:<br><br>
<meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;"><!--StartFragment-->\documentclass{article}</p>
<p style="margin: 0px; text-indent: 0px;">\newcommand\سیاه[1]{\textbf{#1}}</p>
<p style="margin: 0px; text-indent: 0px;">\newcommand\متن‌سیاه[1]{\textbf{#1}}</p>
<p style="margin: 0px; text-indent: 0px;">\begin{document}</p>
<p style="margin: 0px; text-indent: 0px;">Test</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">\end{document}</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">As I mentioned above, the first new command is ok but the second one produces the error. Any solutions to fix this?<br><!--EndFragment--></p><br><br /><hr />Let ninemsn property search for you. <a href='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' target='_new'>Need a new place to rent, share or buy?</a></body>
</html>