I am relatively new to LaTeX, so please bear with me.
I have just started using macros and finding them quite useful. However, I find myself having to use the tilde (~) a lot of times to get a space between the macro defined string and the next word.
Example:
\newcommand{\ftp}{File Transfer Protocol}
but when I write this:
The \ftp is awesome because blah blah blah.
I get this (note there isn't a space between 'Protocol' and 'is'):
The File Transfer Protocolis awesome blah blah blah.
so I have to use the tilde:
the \ftp~is awesome because blah blah blah.
so that I can get that space:
The File Transfer Protocol is awesome blah blah blah.
My question is then: is there anyway I can avoid having to type the tilde every time?
xspacepackage. – Peter Grill Mar 13 '13 at 18:58~here as it forces a space that is not breakable. Better would be\. – Qrrbrbirlbel Mar 13 '13 at 19:33\xspace:\newcommand{\foobar}{Foobar\xspace}– Qrrbrbirlbel Mar 13 '13 at 20:20the {\ftp} is awesome.... The advantage of this over~or\is that it's independent of whether your macro is followed by a space or a punctuation mark. E.g.I like {\ftp} and more {\ftp}.– John Wickerson Mar 13 '13 at 20:59\xspace. Thanks. – nunos Mar 13 '13 at 22:05