[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] no space after defined \newcommands in LaTeX



>>>>> "Nori" == Nori Heikkinen <nori@sccs.swarthmore.edu> writes:

Nori> this has been pissing me off recently.  if i define a new command
Nori> \newcommand{\TM}{Turing machine}

Nori> and then say in my document

Nori> ... the \TM defined by blah blah ...

Nori> i will get the output ``the Turing machinedefined by blah blah.''

Yup.  That's because the space after \TM signals the end of the macro
name, so it gets eaten up.  The standard way around it is do use "\ ".
i.e. "... the \TM\ defined by blah blah..."  If you want something
uglier, you can use "... the \TM{} defined by blah blah ..."  You
probably don't want to use ~ since ~ is a non-breaking space.

-- 
Hubert Chan <hubert@uhoreg.ca> - http://www.uhoreg.ca/
PGP/GnuPG key: 1024D/124B61FA
Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA
Key available at wwwkeys.pgp.net.   Encrypted e-mail preferred.

Attachment: pgpWDzj7s_U45.pgp
Description: PGP signature


Reply to: