From 87861bc6d52676e2d184d3ebb95ea6eb14ea7416 Mon Sep 17 00:00:00 2001 From: Guillaume Munch Date: Thu, 10 Dec 2015 21:14:05 +0000 Subject: [PATCH] Use AMS align instead of eqnarray on newline-insert by default (#2543) --- lib/doc/Math.lyx | 44 ++++++++++++++++++++++++++++++++---- src/mathed/InsetMathHull.cpp | 2 +- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/lib/doc/Math.lyx b/lib/doc/Math.lyx index f7ce572989..99d0392930 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 6ff8833fee..097a3445c5 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(); -- 2.39.5