Possible Duplicate:
\newcommand and spacing

I want to write a command as a shortcut to insert text.

\newcommand{\bl}{$blah blah$}

When I write the command like this, "blah blah" runs into the next word. If I put a space after the second "$", then when I have


I get

blah blah ,

with a space before the comma. What's the proper way of doing this.

marked as duplicate by Marco Daniel, Gonzalo Medina, cmhughes, Andrey Vihrov, egreg Mar 11 '12 at 20:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Use the xspace package,

\newcommand{\bl}{$blah blah$\xspace}
\bl, \bl this is fine.

Not the answer you're looking for? Browse other questions tagged or ask your own question.