adrian@mti.mti.com (Adrian McCarthy) (01/19/91)
I've got input which looks like this: \mymacro{hello} <-- blank line implies \par more text. Is there something I can put in the definition of \mymacro to get TeX to ignore that implied \par? I want the above input to expand to something simple like: {\bf hello} more text. Any clues or pointers to the TeXbook? I really can't change to format of the input. Thanks, Aid. (adrian@gonzo.mti.com)
marcel@cs.caltech.edu (Marcel van der Goot) (01/19/91)
In <1317@mti.mti.com> Adrian McCarthy (adrian@mti.mti.com) asks > \mymacro{hello} > <-- blank line implies \par > more text. > > Is there something I can put in the definition of \mymacro to get TeX to > ignore that implied \par? Yes, if you always use \mymacro in this way: \def\mymacro#1\par{ ... } will get rid of the \par. It will still insert an extra space (from the first newline character) though. If you want to get rid of that one as well, insert a space between "#1" and "\par". If you sometimes use \mymacro differently, things get a lot harder. You could do something like temporarily changing the definition of \par, or you could use \futurelet to check if a \par is coming next. I don't want to go into that now. > I really can't change to format of the input. Why not? No editor? No compiler so that you can write a trivial filter? No computer? ... (just curious) Marcel van der Goot marcel@vlsi.cs.caltech.edu