Hi

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?

Screenshot of result: 
http://www.md.kth.se/~chr/lyx/bugs/opt_arg_screenshot_dvi.jpg

Screenshot of lyx-file:
http://www.md.kth.se/~chr/lyx/bugs/opt_arg_screenshot.jpg

Link to lyx-file:
http://www.md.kth.se/~chr/lyx/bugs/opt_arg.lyx


/Christian

http://www.md.kth.se/~chr/lyx/bugs/opt_arg.lyx
-- 
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



Reply via email to