[OS X TeX] dropped parentheses
Luis Fernando Sequeira
lfsequeira at gmail.com
Sun Jul 18 15:13:58 EDT 2021
> What I thought was a simple macro definition is yielding puzzling results.
> The full testfiles are attached below. Bottom line:
> with these definitions
>
> \newcommand{\dist}[2]{\ensuremath{\operatorname{dist}(#1,#2)}}% distance function
> \newcommand{\distsub}[1]{\ensuremath{\operatorname{dist}_{#1}}}%subscripted distance name
> \newcommand{\dists}[3]{\ensuremath{\distsub{#1}(#2,#3)}}%subscripted distance function
>
>
> \newcommand{\distX}[1]{\ensuremath{\distsub{X}}}
> \newcommand{\distY}[1]{\ensuremath{\distsub{Y}}}
>
>
> why are my closing parentheses (not part of the macro) dropped?
>
>
> Zbigniew Nitecki
> Department of Mathematics
> Tufts University
> Medford, MA 02155
Because the last two commands do not have any real arguments. Remove the [1] in the last two lines:
\newcommand{\distX}{\ensuremath{\distsub{X}}}
\newcommand{\distY}{\ensuremath{\distsub{Y}}}
Regards
Luís Sequeira
More information about the MacOSX-TeX
mailing list