parse(ar, FLAG_BRACE_LAST, mode);
// do not create a BraceInset if they were written by LyX
// this helps to keep the annoyance of "a choose b" to a minimum
- // But create a BraceInset if a script follows (#9348)
- InsetMathBrace const * mb = ar[0]->asBraceInset();
- if (ar.size() == 1 && (ar[0]->extraBraces()
- || (mb && mb->cell(0).size()
- && !mb->cell(0)[0].nucleus()->asScriptInset())))
+ if (ar.size() == 1 && ar[0]->extraBraces())
cell->append(ar);
else
cell->push_back(MathAtom(new InsetMathBrace(ar)));
docstring const halign = parse_verbatim_item();
cell->push_back(MathAtom(new InsetMathArray(buf, name,
InsetMathGrid::guessColumns(halign), 1, (char)valign[0], halign)));
- parse2(cell->back(), FLAG_END, mode, false);
+ parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, false);
}
else if (name == "tabular") {
Encodings::MATH_CMD | Encodings::TEXT_CMD,
is_combining, termination);
}
- if (c) {
+ if (c && buf->params().encoding().encodable(c)) {
if (termination) {
if (nextToken().cat() == catBegin) {
getToken();