Re: tex2lyx and optional arguments

2003-11-20 Thread Andre Poenitz
On Tue, Nov 18, 2003 at 10:16:29PM +0100, Georg Baum wrote: > Am Dienstag, 18. November 2003 09:37 schrieb Andre Poenitz: > > On Mon, Nov 17, 2003 at 08:58:36PM +0100, Georg Baum wrote: > > > Am Montag, 17. November 2003 09:52 schrieb Andre Poenitz: > > > > Looks good. Is this ready for 'commit'? >

Re: tex2lyx and optional arguments

2003-11-19 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Am Dienstag, 18. November 2003 09:37 schrieb Andre Poenitz: >> On Mon, Nov 17, 2003 at 08:58:36PM +0100, Georg Baum wrote: > Am >> Montag, 17. November 2003 09:52 schrieb Andre Poenitz: > > Looks >> good. Is this ready for 'commit'? >>

Re: tex2lyx and optional arguments

2003-11-18 Thread Georg Baum
Am Dienstag, 18. November 2003 09:37 schrieb Andre Poenitz: > On Mon, Nov 17, 2003 at 08:58:36PM +0100, Georg Baum wrote: > > Am Montag, 17. November 2003 09:52 schrieb Andre Poenitz: > > > Looks good. Is this ready for 'commit'? > > > > Yes. Maybe with the size() -> !empty() change suggested by An

Re: tex2lyx and optional arguments

2003-11-18 Thread Andre Poenitz
On Mon, Nov 17, 2003 at 08:58:36PM +0100, Georg Baum wrote: > Am Montag, 17. November 2003 09:52 schrieb Andre Poenitz: > > Looks good. Is this ready for 'commit'? > > Yes. Maybe with the size() -> !empty() change suggested by Angus. BTW, this > construct is used at a few other places in tex2lyx,

Re: tex2lyx and optional arguments

2003-11-17 Thread Georg Baum
Am Montag, 17. November 2003 16:42 schrieb Jean-Marc Lasgouttes: > BTW, what does the following comment mean? What are the entries that > you skip? > > + // We can use our TeX parser, since the syntax of the layout file is > + // modeled after TeX. > + // Unknown tokens are just silentl

Re: tex2lyx and optional arguments

2003-11-17 Thread Georg Baum
Am Montag, 17. November 2003 09:52 schrieb Andre Poenitz: > Looks good. Is this ready for 'commit'? Yes. Maybe with the size() -> !empty() change suggested by Angus. BTW, this construct is used at a few other places in tex2lyx, some from me, some from others. Georg

Re: tex2lyx and optional arguments

2003-11-17 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Am Freitag, 14. November 2003 21:11 schrieb Georg Baum: >> Yes. We can even steal the list of 'known' commands from >> lib/reLyX/syntax.default. Creating this list was the main thing >> that I did not like with this solution. Georg> I

Re: tex2lyx and optional arguments

2003-11-17 Thread Andre Poenitz
On Sun, Nov 16, 2003 at 02:31:05PM +, Angus Leeming wrote: > Georg Baum wrote: > Very neat solution! > > > +read_syntaxfile(system_syntaxfile); > > +if(syntaxfile.size()) > > +read_syntaxfile(syntaxfile); > > Isn't it better to use if (!syntaxfile.empty()) here

Re: tex2lyx and optional arguments

2003-11-17 Thread Andre Poenitz
On Sat, Nov 15, 2003 at 06:25:36PM +0100, Georg Baum wrote: > Am Freitag, 14. November 2003 21:11 schrieb Georg Baum: > > Yes. We can even steal the list of 'known' commands from > > lib/reLyX/syntax.default. Creating this list was the main thing that I > > did not like with this solution. > > It

Re: tex2lyx and optional arguments

2003-11-16 Thread Angus Leeming
Georg Baum wrote: Very neat solution! > +read_syntaxfile(system_syntaxfile); > +if(syntaxfile.size()) > +read_syntaxfile(syntaxfile); Isn't it better to use if (!syntaxfile.empty()) here? I'll leave the patch for André to apply on his return from the conference.

Re: tex2lyx and optional arguments

2003-11-15 Thread Georg Baum
Am Freitag, 14. November 2003 21:11 schrieb Georg Baum: > Yes. We can even steal the list of 'known' commands from > lib/reLyX/syntax.default. Creating this list was the main thing that I > did not like with this solution. It turned out to be rather easy. I have used the syntax.default file from

Re: tex2lyx and optional arguments

2003-11-15 Thread Georg Baum
Am Freitag, 14. November 2003 18:48 schrieb Andre Poenitz: > > Solution 2: > > Create a list of commands that take optional arguments and only serach > > for them when they are expected. The drawback is of course the > > hardcoding of commands. > > > > > > I don't like either solution. Does anybo

Re: tex2lyx and optional arguments

2003-11-14 Thread Andre Poenitz
> Problem: > tex2lyx currently cannot handle commands with optional arguments, > because the brackets are translated to normal text. LyX then produces > {[} instead of [. One example where this happens is the userguide. > > Solution 1: > Call something like > > string opts; > string opt = p.getOp

Re: tex2lyx and optional arguments

2003-11-14 Thread Angus Leeming
Jose' Matos wrote: > On Thursday 13 November 2003 20:56, Georg Baum wrote: >> Problem: >> >> Solution 2: >> Create a list of commands that take optional arguments and only >> serach for them when they are expected. The drawback is of course >> the hardcoding of commands. >> >> >> I don't like eith

Re: tex2lyx and optional arguments

2003-11-14 Thread Jose' Matos
On Thursday 13 November 2003 20:56, Georg Baum wrote: > Problem: > > Solution 2: > Create a list of commands that take optional arguments and only serach for > them when they are expected. The drawback is of course the hardcoding of > commands. > > > I don't like either solution. Does anybody have

tex2lyx and optional arguments

2003-11-13 Thread Georg Baum
Problem: tex2lyx currently cannot handle commands with optional arguments, because the brackets are translated to normal text. LyX then produces {[} instead of [. One example where this happens is the userguide. Solution 1: Call something like string opts; string opt = p.getOpt(); while (opt.si