Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!m.cs.uiuc.edu!roundup.crhc.uiuc.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!s41.csrd.uiuc.edu!eijkhout From: eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) Newsgroups: comp.text.tex Subject: Re: [OzTeX] ^^M^^M not the same as \par. Message-ID: <1991Mar29.200048.14404@csrd.uiuc.edu> Date: 29 Mar 91 20:00:48 GMT References: <1991Mar28.071310.26773@basho.uucp> Sender: news@csrd.uiuc.edu (news) Organization: UIUC Center for Supercomputing Research and Development Lines: 55 john@basho.uucp (John Lacey) writes: >I have a problem with OzTeX 1.3. If I say `\def\foo#1\par{...}', >and then say `\foo text\par', I get #1 as four tokens, `t', >`e', `x', and `t'. How would you want it otherwise? There are two kinds of tokens: character tokens and control sequence tokens (oh well. parameter tokens is the third kind), and you didn't say \foo\text\par, so you get four character tokens. >BUT, if instead I say `\foo text^^M^^M' (either just like that >or by actually pressing two returns), I get five tokens---the >obvious four and a trailing blank space. Now I think you're holding something back here. If you write \foo text^^M^^M \nextmacros.... \againsomehting \par you will get #1 <- text \nextmacros\againsomething so I suspect that you left an empty line after the ^^M^^M call. Explanation: the first ^^M is the end of the line so the second one is never seen. Contrary to popular misconceptions, a \par is not the result of two ^^M's in a row, it is the effect of an ^^M while TeX is still in state N, that is, if there were at most space characters on the line so far. Exercise for the reader: do you get a \par in the following cases: --- \space --- --- \expandafter\relax \space --- --- \catcode`Q=10 Q --- ??? Victor.