[latexrefman-discuss] *The* solution is to type @code{@{@}} after the command and before the space.

Vincent Belaïche vincent.belaiche at domain.hid
Sat Jan 30 18:26:37 CET 2016


In node `\newcommand & \renewcommand', I can read this:

   A command with no arguments that is followed in the
   source by a space will swallow that space.  The solution
   is to type @code{@{@}} after the command and before the
   space.


Well, this is not *The* solution, as there are two alternative
solutions:

1) follow the command by an explicit space `\ '

2) Use package xspace, and tail the definition of command by \xspace.

I think that we already had a discussion that this manual should not
give opinions about what is good or bad, but just describe things as
they are. Shouldn't we document also the two alternative solutions.

  Vincent.






More information about the latexrefman mailing list