mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 01:08:45 +00:00
Support lgathered and rgathered math environments
* src/mathed/math_splitinset.C (MathSplitInset::validate): Only require amsmath for AMS stuff * src/mathed/math_factory.C (createMathInset): create MathSplitInset if the latexkey is "split" * src/mathed/math_parser.C (Parser::parse1): create MathSplitInset if the latexkey is "split" * lib/symbols: Add aligned, gathered, lgathered and rgathered git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15227 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
006106094d
commit
411024615c
@ -87,6 +87,14 @@ smallmatrix matrix none
|
|||||||
vmatrix matrix none
|
vmatrix matrix none
|
||||||
CD matrix none
|
CD matrix none
|
||||||
|
|
||||||
|
# split environments with optional valign argument.
|
||||||
|
# the others (split and alignedat) are hardcoded.
|
||||||
|
aligned split none
|
||||||
|
gathered split none
|
||||||
|
# from Morten H\o gholm's mathtools.sty:
|
||||||
|
lgathered split none
|
||||||
|
rgathered split none
|
||||||
|
|
||||||
# references
|
# references
|
||||||
pageref ref none
|
pageref ref none
|
||||||
prettyref ref none
|
prettyref ref none
|
||||||
|
@ -276,6 +276,8 @@ MathAtom createMathInset(string const & s)
|
|||||||
return MathAtom(new MathFontOldInset(l));
|
return MathAtom(new MathFontOldInset(l));
|
||||||
if (inset == "matrix")
|
if (inset == "matrix")
|
||||||
return MathAtom(new MathAMSArrayInset(s));
|
return MathAtom(new MathAMSArrayInset(s));
|
||||||
|
if (inset == "split")
|
||||||
|
return MathAtom(new MathSplitInset(s));
|
||||||
return MathAtom(new MathSymbolInset(l));
|
return MathAtom(new MathSymbolInset(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1178,6 +1178,18 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
|
|||||||
if (l->inset == "matrix") {
|
if (l->inset == "matrix") {
|
||||||
cell->push_back(createMathInset(name));
|
cell->push_back(createMathInset(name));
|
||||||
parse2(cell->back(), FLAG_END, mode, false);
|
parse2(cell->back(), FLAG_END, mode, false);
|
||||||
|
} else if (l->inset == "split") {
|
||||||
|
string const valign = parse_verbatim_option() + 'c';
|
||||||
|
cell->push_back(MathAtom(new MathSplitInset(name, valign[0])));
|
||||||
|
parse2(cell->back(), FLAG_END, mode, false);
|
||||||
|
} else {
|
||||||
|
dump();
|
||||||
|
lyxerr << "found math environment `" << name
|
||||||
|
<< "' in symbols file with unsupported inset `"
|
||||||
|
<< l->inset << "'." << endl;
|
||||||
|
// create generic environment inset
|
||||||
|
cell->push_back(MathAtom(new MathEnvInset(name)));
|
||||||
|
parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +109,8 @@ void MathSplitInset::infoize(std::ostream & os) const
|
|||||||
|
|
||||||
void MathSplitInset::validate(LaTeXFeatures & features) const
|
void MathSplitInset::validate(LaTeXFeatures & features) const
|
||||||
{
|
{
|
||||||
features.require("amsmath");
|
if (name_ == "split" || name_ == "gathered" || name_ == "aligned" ||
|
||||||
MathNestInset::validate(features);
|
name_ == "alignedat")
|
||||||
|
features.require("amsmath");
|
||||||
|
MathGridInset::validate(features);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@ What's new
|
|||||||
- Parse the optional argument of the AMS math environments aligned, gathered
|
- Parse the optional argument of the AMS math environments aligned, gathered
|
||||||
and alignedat.
|
and alignedat.
|
||||||
|
|
||||||
|
- Support lgathered and rgathered math environments.
|
||||||
|
|
||||||
* User Interface:
|
* User Interface:
|
||||||
|
|
||||||
- Fix a crash that occured on exit if the clipboard was not empty (only on
|
- Fix a crash that occured on exit if the clipboard was not empty (only on
|
||||||
|
Loading…
Reference in New Issue
Block a user