# How can I remove the blank space before and after a command [closed]

I create a command,

``````\newcommand{\cmd}{b}
``````

but when I use this command

``````a\cmd{}c
``````

What I get is

a b c

but what I want is

abc

How can I remove two blanks?

-

## closed as too localized by Marco Daniel, Joseph Wright♦Aug 4 '12 at 21:50

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Welcome to TeX.SX! With that definition and usage you'll get the second instance, not the first. Probably you should show your real case. – egreg Jul 4 '12 at 14:51
A complete code is necessary because like egreg wrote, you should show your real case. Perhaps you want `a b c` ? – Alain Matthes Jul 4 '12 at 16:35
if you never want a space before or after the contents of the command, define it as \newcommand{\cmd}{\unskip b\ignorespaces}. – barbara beeton Jul 4 '12 at 17:07
If there are line breaks in your actual command definition, you need to add comment signs, see Why the end-of-line `%` in macro definitions?. – Caramdir Jul 4 '12 at 17:45
You sure your definition does not contain spaces as in `\newcommand{\cmd}{ b }`. This would yield the result that you describe that you are getting. – Peter Grill Jul 4 '12 at 17:49