On Mon, 11 Nov 2002, Dekel Tsur wrote:
> On Mon, Nov 11, 2002 at 03:13:26PM +0100, Christian Ridderstr?m wrote:
> > I'm trying to use a command with an optional argument in Lyx. I'm not
> > very experienced in Latex, but I found an example which I put in the
> > preamble.
> >
> > \newcommand{\example}[2][YYY]{
> > Mandatory arg: #2; \\
> > Optional arg: #1. \\
> > }
> >
> > When I use it with one argument, it works nicely... but when I give
> > two arguments it still uses the "optional" argument. What's going on,
> > i.e. what am I missing here?
>
> If you want to use the optional argument, you should write
> \example[opt. arg]{mand. arg}
> and not
> \example{mand. arg}{opt. arg}
>
duh...
Thanks, I knew I was making a latex error here...
/Christian
--
Christian Ridderstr�m, +46-8-790 91 37 http://www.md.kth.se/~chr
Mechatronics lab, Dept. of Machine Design http://www.md.kth.se