Optional argument to latex-command

2002-11-11 Thread Christian Ridderström
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

Re: Optional argument to latex-command

2002-11-11 Thread Andre Poenitz
On Mon, Nov 11, 2002 at 03:13:26PM +0100, Christian Ridderström wrote: 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? Isn't the rule to give the optional argument in square

Re: Optional argument to latex-command

2002-11-11 Thread Dekel Tsur
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:

Re: Optional argument to latex-command

2002-11-11 Thread Christian Ridderström
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.

Optional argument to latex-command

2002-11-11 Thread Christian Ridderström
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

Re: Optional argument to latex-command

2002-11-11 Thread Andre Poenitz
On Mon, Nov 11, 2002 at 03:13:26PM +0100, Christian Ridderström wrote: 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? Isn't the rule to give the optional argument in square

Re: Optional argument to latex-command

2002-11-11 Thread Dekel Tsur
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:

Re: Optional argument to latex-command

2002-11-11 Thread Christian Ridderström
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.

Optional argument to latex-command

2002-11-11 Thread Christian Ridderström
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

Re: Optional argument to latex-command

2002-11-11 Thread Andre Poenitz
On Mon, Nov 11, 2002 at 03:13:26PM +0100, Christian Ridderström wrote: > 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? Isn't the rule to give the optional argument in

Re: Optional argument to latex-command

2002-11-11 Thread Dekel Tsur
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

Re: Optional argument to latex-command

2002-11-11 Thread Christian Ridderström
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. > > > >