Am Donnerstag, 1. Dezember 2016 um 12:03:02, schrieb Enrico Forestieri 
<for...@lyx.org>
> On Thu, Dec 01, 2016 at 11:47:19AM +0100, Kornel Benko wrote:
> > Am Donnerstag, 1. Dezember 2016 um 01:01:44, schrieb Enrico Forestieri 
> > <for...@lyx.org>
> > > 
> > > Or we can add the braces on output, as done in the attached patch (also
> > > including the previous one). The braces will be added anytime a macro
> > > has optional arguments (not only when it is nested), but, given that this
> > > avoids a latex error, I think it is acceptable.
> > > 
> > > The test case now displays and compiles fine for me.
> > > 
> > 
> > Confirmed, works very nice. Please commit.
> 
> I found a small glitch with the previous patch. As the braces are always
> added and lyx removes only the ones appearing in a macro argument, if you
> copy/paste a macro with optional arguments you always get the outer braces,
> which tend to accumulate. Instead, the attached patch only adds the braces
> if the macro is actually in the argument of a math macro, thus avoiding
> this issue. Please, also test this one.
> 

First test looks good. Started export test suite ... this can take a while.
I have to go now, so feel free to commit.

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to