commit 87861bc6d52676e2d184d3ebb95ea6eb14ea7416
Author: Guillaume Munch <[email protected]>
Date: Thu Dec 10 21:14:05 2015 +0000
Use AMS align instead of eqnarray on newline-insert by default (#2543)
diff --git a/lib/doc/Math.lyx b/lib/doc/Math.lyx
index f7ce572..99d0392 100644
--- a/lib/doc/Math.lyx
+++ b/lib/doc/Math.lyx
@@ -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
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 6ff8833..097a344 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -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();