Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!myers From: myers@ut-emx.uucp (Eric Myers) Newsgroups: comp.text.tex Subject: Re: ^^M delimited arguments in a macro? Keywords: \obeylines Message-ID: <39012@ut-emx.uucp> Date: 1 Nov 90 16:36:34 GMT References: <320@ariel.its.unimelb.edu.au> Organization: Center for Relativity, University of Texas Lines: 36 In article <320@ariel.its.unimelb.edu.au> duty@ariel.its.unimelb.edu.au (Duty Programmer) writes about something that does not quite work: >I have the following construction in my file: > >\def\test #1 #2 #3\par{blah #1 blah #2 blah #3} > >\begingroup \obeylines >\test first second and then this is the third argument >\endgroup Although \obeylines makes ^^M perform as \par, they are not the same. You need the ^^M in your definition, and you need \obeylines in force when you try to see the end of the line. Hence try it this way: {\obeylines % to see ^^M during definition \gdef\foo#1 #2 #3 {\message{1=#1 2=#2 3=#3}} } \obeylines % to see ^^M at end of lines \foo first second and then this is the third argument \foo first second and then this is the third argument \bye Incidentally, in Plain TeX there is no way, save with grouping, to turn off \obeylines. Hence I've found this useful: \def\unobeylines{\catcode`\^^M=5} % make ^^M just -- Eric Myers "Frankie say '\relax'" Center for Relativity, Department of Physics, University of Texas at Austin myers@emx.utexas.edu | myers@utaphy.bitnet | myers@ut-emx.UUCP