///
void mathematica(MathematicaStream & ms) const override { ms << mathMacro_->cell(idx_); }
///
- void mathmlize(MathStream & ms) const override { ms << mathMacro_->cell(idx_); }
+ void mathmlize(MathMLStream & ms) const override { ms << mathMacro_->cell(idx_); }
///
void htmlize(HtmlStream & ms) const override { ms << mathMacro_->cell(idx_); }
///
}
-void InsetMathMacro::write(WriteStream & os) const
+void InsetMathMacro::write(TeXMathStream & os) const
{
mode_type mode = currentMode();
MathEnsurer ensurer(os, mode == MATH_MODE, true, mode == TEXT_MODE);
}
// 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);
}
-void InsetMathMacro::mathmlize(MathStream & ms) const
+void InsetMathMacro::mathmlize(MathMLStream & ms) const
{
// macro_ is 0 if this is an unknown macro
LATTEST(d->macro_ || d->displayMode_ != DISPLAY_NORMAL);