X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathMacro.cpp;h=d2c35c7e5bea913e1d857fc319871945de87d0db;hb=d9082639080b9de993742bd352f92e5183058cf5;hp=a21460091fda3e6cbe0f2a9d0000c3b7cff82d5d;hpb=649755f48180b0466cdf212178dc9bdcc5d18210;p=lyx.git diff --git a/src/mathed/InsetMathMacro.cpp b/src/mathed/InsetMathMacro.cpp index a21460091f..d2c35c7e5b 100644 --- a/src/mathed/InsetMathMacro.cpp +++ b/src/mathed/InsetMathMacro.cpp @@ -1214,8 +1214,11 @@ void InsetMathMacro::write(TeXMathStream & os) const } // add space if there was no argument - if (first) + // or add braces if we have optionals but none are present and [ follows + if (first) { os.pendingSpace(true); + os.useBraces(d->optionals_ > 0); + } // write \(no)limits modifiers if relevant writeLimits(os);