Kevin D. McAllister on Wed, 11 Dec 2002 18:50:06 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] latex \newcommand question


* Tue, Dec 10, 2002 at 05:02:36PM -0500, Jeff Abrahamson wrote:
> Any latex folks know why I can't say the following?
> 
>     \newcommand{\col3}[1]{\parbox{6 cm}{\vskip 1 mm #1}}
> 
> The error is this:
> 
>     ! You can't use `macro parameter character #' in internal vertical mode.
>     <recently read> ##
> 
>     l.56 ...d{\col3}[1]{\parbox{6 cm}{\vskip 1 mm #1}}
> 

Through a simple change I have been able to get the latex parser to
pass it through (I don't know that it does what you want) but simply
removing the number from the end of the command name seems to fix the
problem.

i.e.
\newcommand{\colthree}[1]{\parbox{6 cm}{\vskip 1 mm #1}}

It appears that the parser assumes the command name is completed when
it gets to a non [a-zA-Z] character, so then the 3 gets parsed next as
a separate entity from the command name and it screws everything up.

It seems to be the way that tex parses its \def parameters.

-- 
Kevin D. McAllister
kevin@mcallister.ws
_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug