Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!lll-winken!ames!orion.arc.nasa.gov!ogawa From: ogawa@orion.arc.nasa.gov (Arthur Ogawa) Newsgroups: comp.text.tex Subject: Re: Strange result in macros Summary: Difference between delimited and undelimited args Keywords: macro, delimited, undelimited Message-ID: <1991Jan25.084958.27482@news.arc.nasa.gov> Date: 25 Jan 91 08:49:58 GMT References: <1991Jan24.095405.8868@uni-paderborn.de> Sender: usenet@news.arc.nasa.gov (USENET Administration) Organization: /usr/local/lib/rn/organization Lines: 27 The macro \foo, defined as \long\def\foo#1 {Hurrah #1 Hurrah} Has a delimited argument: the delimiter is the whitespace immediately preceeding the left brace. In your document, Now I test \foo{Why} and \gnat{Why not?} and everything's ok. But watch out for the difference to \foo{Me}-too and \gnat{You}-never. Your first instance traces to: \foo #1 ->Hurrah #1 Hurrah #1<-Why In the second, it traces to \foo #1 ->Hurrah #1 Hurrah #1<-{Me}-too This behaviour is easy to understand if you keep in mind that the argument to \foo ends at the first whitespace character---unlike the definition of \gnat. This is an attribute of TeX (see chapter 20 of the TeXbook), not a peculiarity of LaTeX. Keep at it, your experimentation will pay off richly in a deeper understanding of TeX!