<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div class="" style="word-wrap:break-word; line-break:after-white-space">What I thought was a simple macro definition is yielding puzzling results.
<div class="">The full testfiles are attached below. Bottom line:</div>
<div class="">with these definitions</div>
<div class="">
<blockquote type="cite" class="">
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal; min-height:14px">
<br class="">
</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
\newcommand{\dist}[2]{\ensuremath{\operatorname{dist}(#1,#2)}}% distance function</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
\newcommand{\distsub}[1]{\ensuremath{\operatorname{dist}_{#1}}}%subscripted distance name </div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
\newcommand{\dists}[3]{\ensuremath{\distsub{#1}(#2,#3)}}%subscripted distance function</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal; min-height:14px">
<br class="">
</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal; min-height:14px">
<br class="">
</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
\newcommand{\distX}[1]{\ensuremath{\distsub{X}}}</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
\newcommand{\distY}[1]{\ensuremath{\distsub{Y}}}</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal; min-height:14px">
<br class="">
</div>
</blockquote>
<br class="">
<div class=""><span class="x_Apple-style-span" style="border-collapse:separate; font-variant-ligatures:normal; font-variant-east-asian:normal; line-height:normal; border-spacing:0px"><span class="x_Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div class="" style="word-wrap:break-word">
<div class="">
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">why are my closing parentheses (not part of the macro) dropped?</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica"><br class="">
</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica"><br class="x_Apple-interchange-newline">
Zbigniew Nitecki</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Department of Mathematics</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Tufts University</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Medford, MA 02155</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font:normal normal normal 12px/normal Helvetica; min-height:14px; font-size:12px">
<br class="">
</div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">telephones:</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Office<span class="x_Apple-converted-tab"> </span>(617)627-3843</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Dept.<span class="x_Apple-converted-tab"> </span>(617)627-3234</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Dept. fax<span class="x_Apple-converted-tab"> </span>(617)627-3966</font></div>
<span class="x_Apple-style-span" style="font-size:12px"><a href="http://www.tufts.edu/~znitecki/" class="">http://www.tufts.edu/~znitecki/</a></span></div>
</div>
</span><br class="x_Apple-interchange-newline">
</div>
</span><br class="x_Apple-interchange-newline">
</span></div>
</div>
</div>
<div style="word-wrap:break-word; line-break:after-white-space">
<meta content="text/html; charset=us-ascii">
<div>
<div></div>
</div>
</div>
<div style="word-wrap:break-word; line-break:after-white-space">
<meta content="text/html; charset=us-ascii">
<div>
<div></div>
</div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class="">
<div class=""></div>
<br class="">
</div>
</div>
</body>
</html>