[OS X TeX] dropped parentheses

Murray Eisenberg murrayeisenberg at gmail.com
Sun Jul 18 15:21:34 EDT 2021


> On 18 Jul2021, at 1:29 PM, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu> wrote:
> 
> 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
> 
> 
> <disttest-2.tex><disttest-2.log><disttest-2.pdf>----------- Please Consult the Following Before Posting —————

Luis Sequeira alraedy pointed out the source of the error, namely, the spurious “[1]” in the definitions of \distX and \disY.

Here I wanted to point out that you may need to adjust the spacing, since (X, \distX) gives, to my eye, too much space before the closing parenthesis. By contrast, something like...

	\newcommand{\distone}{\ensuremath{\distsub{1}}}

…used, say, in "$(X,\distone)$”, looks OK to me.

---
Murray Eisenberg		murrayeisenberg at gmail.com
Mobile (413)-427-5334
503 King Farm Blvd #101		
Rockville, MD 20850-6667	





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20210718/2c2efe1a/attachment.htm>


More information about the MacOSX-TeX mailing list