Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!accuvax.nwu.edu!rufus.math.nwu.edu!len From: len@rufus.math.nwu.edu (Len Evens) Newsgroups: comp.text Subject: TeX macro question Keywords: TeX Message-ID: <1706@accuvax.nwu.edu> Date: 30 Nov 89 13:35:37 GMT Expires: 30 Dec 89 06:00:00 GMT Sender: news@accuvax.nwu.edu Reply-To: len@rufus.math.nwu.edu (Len Evens) Distribution: usa Organization: Northwestern Univ. Evanston, Il. Lines: 33 I am trying to understand the first example in The TeXbook in Appendix E. (This is a set of macros for a business letter format with a letterhead.) It contains the following code \def\address{\beginlinemode\getaddress} {\obeylines\gdef\getaddress #1 #2 {#1\gdef\addressee{#2}% etc. This seems to be a fairly common kind of construction. In use, the block of lines following `\address' in a source file becomes an argument used elsewhere (for example, in making a label); in particular, the control sequence `\addressee' becomes the first line in the address. There seem to be some other examples in Appendix D of the TeXbook with similar forms, but I haven't been able to find a general description of why such macros are supposed to work. In particular, I don't understand the use of `\getaddress' which is defined in the 2nd and third lines to have two arguments but which is called without arguments by \address. Can anyone either explain this or direct me to a reference which clarifies the construction? (It may be somewhere in the TeXbook, but my usual method of leafing back a forth between the text and the index has not turned up anything relevant.) Leonard Evens len@math.nwu.edu Department of Mathematics Northwestern University Evanston, IL 60208 312-491-5537