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

2003-03-31 Thread Stephen A. Witt
On Mon, 31 Mar 2003, Nori Heikkinen wrote:

 this has been pissing me off recently.  if i define a new command

 \newcommand{\TM}{Turing machine}

 and then say in my document

 ... the \TM defined by blah blah ...

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



Use the xspace package in Latex.



\usepackage{xspace}


\newcommand{\TM}{Turing machine\xspace}



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2003-03-31 Thread Alan Shutko
Nori Heikkinen [EMAIL PROTECTED] writes:

 this has been pissing me off recently.  if i define a new command 

 \newcommand{\TM}{Turing machine}

\usepackage{xspace}
\newcommand{\TM}{Turing machine\xspace}

Although I find a lot of people prefer to write 

 ... the \TM\ defined by blah blah ...

or 

 ... the \TM{} defined by blah blah ...

since they have to do that for most commands they didn't write, and
they want all their commands to be consistent.

-- 
Alan Shutko [EMAIL PROTECTED] - I am the rocks.
Looking for a developer in St. Louis? http://web.springies.com/~ats/
Mexican/Italian Food by Pepe Roney


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2003-03-31 Thread Hubert Chan
 Nori == Nori Heikkinen [EMAIL PROTECTED] 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 [EMAIL PROTECTED] - 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.


pgp0.pgp
Description: PGP signature


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

2003-03-31 Thread Roberto Sanchez

this has been pissing me off recently.  if i define a new command

\newcommand{\TM}{Turing machine}

and then say in my document

... the \TM defined by blah blah ...

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

so i have to say

... the \TM ~defined by ...

I can't just define it to be

{Turing machine~}

because i want to be able to put punctuation directly after it.

How do people get around this?  or do you just deal?

Leave your definition as is and use \TM{} some other text.  That should 
solve your problem.

HTH,

-Roberto Sanchez

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2003-03-31 Thread Nori Heikkinen


on Mon, 31 Mar 2003 06:38:09PM -0500, Alan Shutko insinuated:
 Nori Heikkinen [EMAIL PROTECTED] writes:
 
  this has been pissing me off recently.  if i define a new command 
 
  \newcommand{\TM}{Turing machine}
 
 \usepackage{xspace}
 \newcommand{\TM}{Turing machine\xspace}

cool.

 Although I find a lot of people prefer to write 
 
  ... the \TM\ defined by blah blah ...
 
 or 
 
  ... the \TM{} defined by blah blah ...
 
 since they have to do that for most commands they didn't write, and
 they want all their commands to be consistent.

how do you mean, they have to do that for most commands they didn't
write?

/nori

-- 
.~.  nori @ sccs.swarthmore.edu
/V\  http://www.sccs.swarthmore.edu/~nori/jnl/
   // \\  @ maenad.net
  /(   )\   www.maenad.net
   ^`~'^
  pgp servers finicky: get my (*new*) key here:
   http://www.maenad.net/geek/gpg/7ede5499.asc
  (please *remove* old key 11e031f1!)


pgp0.pgp
Description: PGP signature


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

2003-03-31 Thread Nori Heikkinen
on Mon, 31 Mar 2003 03:29:11PM -0800, Stephen A. Witt insinuated:
 On Mon, 31 Mar 2003, Nori Heikkinen wrote:
 
  this has been pissing me off recently.  if i define a new command
 
  \newcommand{\TM}{Turing machine}
 
  and then say in my document
 
  ... the \TM defined by blah blah ...
 
  i will get the output ``the Turing machinedefined by blah blah.''
 
 
 
 Use the xspace package in Latex.
 
 
 
 \usepackage{xspace}
 
 
 \newcommand{\TM}{Turing machine\xspace}

that's exactly what i wanted -- thanks!

/nori

-- 
.~.  nori @ sccs.swarthmore.edu
/V\  http://www.sccs.swarthmore.edu/~nori/jnl/
   // \\  @ maenad.net
  /(   )\   www.maenad.net
   ^`~'^
  pgp servers finicky: get my (*new*) key here:
   http://www.maenad.net/geek/gpg/7ede5499.asc
  (please *remove* old key 11e031f1!)


pgp0.pgp
Description: PGP signature


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

2003-03-31 Thread Alan Shutko
Nori Heikkinen [EMAIL PROTECTED] writes:

 on Mon, 31 Mar 2003 06:38:09PM -0500, Alan Shutko insinuated:
 Although I find a lot of people prefer to write 
  ... the \TM\ defined by blah blah ...
 since they have to do that for most commands they didn't write, and
 they want all their commands to be consistent.

 how do you mean, they have to do that for most commands they didn't
 write?

If you use a standard LaTeX command like \LaTeX or \textonethird, you
need to put {} or \  after the command, because those commands
don't use \xspace and don't put a space after the command
automatically.  If you use \xspace, you have to remember you need to
write \textonethird{}, but you can just write \tbsp (since tbsp
automatically puts space afterwards if needed).  That's inconsistent,
and makes you remember that some commands are different than others.
If you didn't use \xspace, you have to put {} after _everything_,
which is easy to remember.

Personally, I like \xspace, but I can see why some people choose not
to use it.

-- 
Alan Shutko [EMAIL PROTECTED] - I am the rocks.
Looking for a developer in St. Louis? http://web.springies.com/~ats/
HACKERS discover the powers of two


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2003-03-31 Thread Nathan E Norman
On Mon, Mar 31, 2003 at 07:44:01PM -0500, Nori Heikkinen wrote:
 
 how do you mean, they have to do that for most commands they didn't
 write?

A builtin, like \TeX.  I can't write \TeX is really cool, I have to
write \TeX{} is really cool.

-- 
Nathan Norman - Incanus Networking mailto:[EMAIL PROTECTED]
  The best we can hope for concerning the people at large is that
  they be properly armed.
  -- Alexander Hamilton


pgp0.pgp
Description: PGP signature