Re: Macros with optional arguments - LyX 1.6.1

2009-01-08 Thread Jean-Marc Lasgouttes
Stefan Schimanski writes: >> I think that \global\newcommand works in any case. > > It does? I think I tried and it did not. I might be wrong. I cannot find reference to that right now. > A second requirement: the distinction between \newcommand and > \renewcommand is very fragile. It is far fro

Re: Macros with optional arguments - LyX 1.6.1

2009-01-08 Thread Stefan Schimanski
Am 07.01.2009 um 22:45 schrieb Jean-Marc Lasgouttes: xargs is only needed if you have macros with optional arguments. Of course, \newcommand could handle the case with one optional. But, what we need in fact is something equivalent to \global\def for this case. Is there a way to do this wi

Re: Macros with optional arguments - LyX 1.6.1

2009-01-08 Thread Stefan Schimanski
Am 07.01.2009 um 22:45 schrieb Jean-Marc Lasgouttes: xargs is only needed if you have macros with optional arguments. Of course, \newcommand could handle the case with one optional. But, what we need in fact is something equivalent to \global\def for this case. Is there a way to do this wi

Re: Macros with optional arguments - LyX 1.6.1

2009-01-07 Thread Jean-Marc Lasgouttes
xargs is only needed if you have macros with optional arguments. Of course, \newcommand could handle the case with one optional. But, what we need in fact is something equivalent to \global\def for this case. Is there a way to do this with \newcommand? Why \global? I think that \global\new

Re: Macros with optional arguments - LyX 1.6.1

2009-01-07 Thread Stefan Schimanski
Am 07.01.2009 um 10:59 schrieb Jean-Marc Lasgouttes: [cc:ing to lyx-devel] "James C. Sutherland" writes: Okay, I think that I found the problem: I am missing the "xargs" package. The exported LaTeX file actually had a line: \usepackage{xargs}[2008/03/08] which I discarded. This is

Re: Macros with optional arguments - LyX 1.6.1

2009-01-07 Thread Jean-Marc Lasgouttes
[cc:ing to lyx-devel] "James C. Sutherland" writes: > Okay, I think that I found the problem: I am missing the "xargs" > package. The exported LaTeX file actually had a line: > \usepackage{xargs}[2008/03/08] > which I discarded. This is presumably where the "\newcommandx" tag is > define

Re: macros for commands

2007-10-14 Thread Bernhard Roider
Jean-Marc Lasgouttes schrieb: Bernhard Roider <[EMAIL PROTECTED]> writes: - it is wrong to define that in binding files, since these definitions are available to menus and toolbars too. I propose to move the definitions to their own file. ok, then should we create another directory like "b

Re: macros for commands

2007-10-11 Thread Helge Hafting
Bernhard Roider wrote: That's true. What about abbreviation command definition (CmdDef) shortcut is also already used lyxmacro? edit(or) macro? Helge Hafting

Re: macros for commands

2007-10-11 Thread Jean-Marc Lasgouttes
Bernhard Roider <[EMAIL PROTECTED]> writes: >> - it is wrong to define that in binding files, since these definitions >> are available to menus and toolbars too. I propose to move the >> definitions to their own file. > > ok, then should we create another directory like "bind" or "ui"? Either

Re: macros for commands

2007-10-11 Thread Jean-Marc Lasgouttes
Bernhard Roider <[EMAIL PROTECTED]> writes: >> - the "macro" name is a bit confusing wrt mathed macros and latex >> macros (if we support them one day). Even if it is only in the code, >> it is better to avoid that. Unfortunately, I do not have plenty of >> good names. Procedure? > > That's

Re: macros for commands

2007-10-10 Thread Abdelrazak Younes
Bernhard Roider wrote: Abdelrazak Younes schrieb: +/// information for a macro +struct LyXAction::macro_info { macroInfo please. this one is similar to func_info in the same class I know and this is bad too. Feel free to correct that too ;-) +case LFUN_CALL: { +FuncRequest f

Re: macros for commands

2007-10-10 Thread Bernhard Roider
Abdelrazak Younes schrieb: Bernhard Roider wrote: Andre Poenitz schrieb: On Fri, Oct 05, 2007 at 12:24:45AM +0200, Bernhard Roider wrote: hello all, the attached patch adds - the possibility to define macros in the bind file, like \define "my macro" "command-sequence inset-insert ert 1; cha

Re: macros for commands

2007-10-10 Thread Bernhard Roider
Jean-Marc Lasgouttes schrieb: I have two small reservations : - the "macro" name is a bit confusing wrt mathed macros and latex macros (if we support them one day). Even if it is only in the code, it is better to avoid that. Unfortunately, I do not have plenty of good names. Procedure?

Re: macros for commands

2007-10-09 Thread Bernhard Roider
ouch, that coding styles - i am mixing different styles from different projects... thanks abdel, i will rework it acordingly. bernhard Abdelrazak Younes schrieb: Bernhard Roider wrote: Andre Poenitz schrieb: On Fri, Oct 05, 2007 at 12:24:45AM +0200, Bernhard Roider wrote: hello all, the at

Re: macros for commands

2007-10-09 Thread Jean-Marc Lasgouttes
Bernhard Roider <[EMAIL PROTECTED]> writes: > so here it is, now tested as i managed to compile again (after hours > of investigation and no idea what the real problem was). > > if there are no objections i'll commit later this week I have two small reservations : - the "macro" name is a bit con

Re: macros for commands

2007-10-08 Thread Abdelrazak Younes
Bernhard Roider wrote: Andre Poenitz schrieb: On Fri, Oct 05, 2007 at 12:24:45AM +0200, Bernhard Roider wrote: hello all, the attached patch adds - the possibility to define macros in the bind file, like \define "my macro" "command-sequence inset-insert ert 1; char-backward; self-insert some

Re: macros for commands

2007-10-08 Thread Bernhard Roider
Andre Poenitz schrieb: On Fri, Oct 05, 2007 at 12:24:45AM +0200, Bernhard Roider wrote: hello all, the attached patch adds - the possibility to define macros in the bind file, like \define "my macro" "command-sequence inset-insert ert 1; char-backward; self-insert some important latex code; c

Re: macros for commands

2007-10-05 Thread Bernhard Roider
Original-Nachricht > Datum: Fri, 5 Oct 2007 00:29:32 +0200 > Von: Andre Poenitz <[EMAIL PROTECTED]> > An: Bernhard Roider <[EMAIL PROTECTED]> > CC: lyx-devel@lists.lyx.org > Betreff: Re: macros for commands > On Fri, Oct 05, 2007 at 12:24:45A

Re: macros for commands

2007-10-04 Thread Abdelrazak Younes
Andre Poenitz wrote: On Fri, Oct 05, 2007 at 12:24:45AM +0200, Bernhard Roider wrote: hello all, the attached patch adds - the possibility to define macros in the bind file, like \define "my macro" "command-sequence inset-insert ert 1; char-backward; self-insert some important latex code; cha

Re: macros for commands

2007-10-04 Thread Andre Poenitz
On Fri, Oct 05, 2007 at 12:24:45AM +0200, Bernhard Roider wrote: > hello all, > > the attached patch adds > - the possibility to define macros in the bind file, like > > \define "my macro" "command-sequence inset-insert ert 1; char-backward; > self-insert some important latex code; char-forward"

Re: macros

2004-04-13 Thread Angus Leeming
Andre Poenitz wrote: > I'll try to create a diff and attach this to this mail, would be > nice if someone could attach it to one of the macor related bugs on > bugzilla lest it gets lost. Ok, this is down attached to bug #1552. -- Angus

Re: macros

2004-04-13 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> But first of all they should work, shouldn't they? Up to now Andre> opening two documents with user defined macros had a decent Andre> potential to screw either document. I think Angus was right Andre> with his remark to get the str

Re: macros

2004-04-13 Thread Andre Poenitz
On Tue, Apr 13, 2004 at 11:08:30AM +0200, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > Andre> Now, what should we do? I could declare math macros (with > Andre> arguments, macros without arguments are no problem) a 'Power > Andre> User Feature' and r

Re: macros

2004-04-13 Thread Andre Poenitz
On Mon, Apr 12, 2004 at 08:01:37PM +0100, Angus Leeming wrote: > Andre Poenitz wrote: > > Now, what should we do? I could declare math macros (with arguments, > > macros without arguments are no problem) a 'Power User Feature' and > > require basic TeX knowledge from people that wish to use it. Or

Re: macros

2004-04-13 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> Now, what should we do? I could declare math macros (with Andre> arguments, macros without arguments are no problem) a 'Power Andre> User Feature' and require basic TeX knowledge from people that Andre> wish to use it. Or we could l

Re: macros

2004-04-12 Thread Angus Leeming
Andre Poenitz wrote: > Now, what should we do? I could declare math macros (with arguments, > macros without arguments are no problem) a 'Power User Feature' and > require basic TeX knowledge from people that wish to use it. Or we > could live with the mess as we did up to now. Do it the latex way

Re: Macros

2000-03-08 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> Is it true that there is no lyxfunc that simply inserts its Andre> argument as text in the current buffer (similar to the Andre> behaviour of LFUN_UNKNOWN_ACTION? Andre> Or am I just optically chaleenged? I would think that self-

Re: Macros and Multiple files

1999-01-27 Thread Fred Hucht
On Wed, 27 Jan 1999, Judicael Courant wrote: JC> JC> Hi ! JC> JC> I would like to split a big document F.lyx in several parts, say JC> A.lyx, B.lyx, C.lyx. So I am using the "Insert -> Include file" JC> facility in my document F, and I create the files A.lyx, B.lyx, JC> C.lyx. Now, I want to us