bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: spurious space after macro expansion in math mode for TeX output


From: Gavin Smith
Subject: Re: spurious space after macro expansion in math mode for TeX output
Date: Sat, 12 Nov 2022 11:23:47 +0000

On Sat, Nov 12, 2022 at 12:12:05PM +0100, Vincent Lefevre wrote:
> On 2022-11-12 09:57:49 +0000, Gavin Smith wrote:
> > I've added the following to the manual:
> > 
> >    • Expanding macros in a math context may lead to poor spacing in TeX
> >      output.  For example:
> > 
> >           @iftex
> >           @macro atan
> >           \\mathop{\\rm atan}
> >           @end macro
> >           @end iftex
> > 
> >           @math{@atan{}(x)}
> > 
> >      The braces following ‘@atan’ are treated by TeX as a subformula,
> >      leading to extra space before the opening parenthesis.  You can
> 
> You should also say that one may also get an additional space
> at the beginning of the macro (while the extra space before the
> opening parenthesis can be avoided by adding a dummy argument,
> this one cannot).

The words "For example" mean that the example does not necessarily cover
every detail and possibility.  The workaround with \gdef works for space
in both locations, so if someone has problems with spacing, they can
see this suggestion in the manual and try it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]