TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I create a command,


but when I use this command


What I get is

a b c

but what I want is


How can I remove two blanks?

share|improve this question

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

Browse other questions tagged or ask your own question.