Use AMS align instead of eqnarray on newline-insert by default (#2543)

This commit is contained in:
Guillaume Munch 2015-12-10 21:14:05 +00:00
parent 9c43747cc9
commit 87861bc6d5
2 changed files with 40 additions and 6 deletions

View File

@ -2,7 +2,7 @@
\lyxformat 503
\begin_document
\begin_header
\origin unavailable
\origin /systemlyxdir/doc/
\textclass scrartcl
\begin_preamble
% DO NOT ALTER THIS PREAMBLE!!!
@ -207,11 +207,12 @@
\bullet 1 0 6 -1
\bullet 2 2 35 -1
\bullet 3 2 7 -1
\tracking_changes false
\tracking_changes true
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\author 2047637253 "Guillaume Munch"
\end_header
\begin_body
@ -27752,7 +27753,9 @@ arg "newline-insert newline"
\end_inset
inside a formula.
This creates either an
\change_deleted 2047637253 1449850740
This creates either an
\series bold
eqnarray environment
\series default
@ -27779,8 +27782,39 @@ reference "subsec:Standard-align-Environment"
\end_inset
.
The align environment is recommended because it provides in any case a
typographically correct output.
\change_inserted 2047637253 1449851860
This creates either an
\series bold
align environment
\series default
that is described in
\begin_inset CommandInset ref
LatexCommand ref
reference "subsec:Standard-align-Environment"
\end_inset
or, when automatically loading the package
\family sans
AMS math
\family default
is disabled in the document settings, an
\series bold
eqnarray environment
\series default
that is described in
\begin_inset CommandInset ref
LatexCommand ref
reference "subsec:Eqnarray-Environment"
\end_inset
.
\change_unchanged
The align environment is recommended because it provides in any case a typograph
ically correct output.
\end_layout
\begin_layout Standard

View File

@ -1528,7 +1528,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
if (type_ == hullSimple || type_ == hullEquation) {
cur.recordUndoInset();
bool const align =
cur.bv().buffer().params().use_package("amsmath") == BufferParams::package_on;
cur.bv().buffer().params().use_package("amsmath") != BufferParams::package_off;
mutate(align ? hullAlign : hullEqnArray);
// mutate() may change labels and such.
cur.forceBufferUpdate();