The column is flushed when the display of equations is flushed.
Not sure what to do with RtL languages.
Fixes bug 11324.
// static
-char InsetMathGrid::colAlign(HullType type, col_type col)
+char InsetMathGrid::colAlign(HullType type, col_type col, BufferParams const & bp)
{
switch (type) {
case hullEqnArray:
return "rcl"[col % 3];
case hullMultline:
- case hullGather:
return 'c';
+ case hullGather:
+ if (!bp.is_math_indent)
+ return 'c';
+ else
+ return 'l';
case hullAlign:
case hullAlignAt:
namespace lyx {
+class BufferParams;
+
/** Gridded math inset base class.
* This is the base to all grid-like editable math objects
// The following two functions are used in InsetMathHull and
// InsetMathSplit.
- /// The value of a fixed col align for a certain hull type
- static char colAlign(HullType type, col_type col);
+ /// The value of a fixed col align for a certain hull type (can
+ /// depend on the "indent math" setting).
+ static char colAlign(HullType type, col_type col, BufferParams const &);
/// The value of a fixed col spacing for a certain hull type
static int colSpace(HullType type, col_type col);
// alignment is not implemented in the LyXHTML output.
char InsetMathHull::defaultColAlign(col_type col)
{
- return colAlign(type_, col);
+ return colAlign(type_, col, buffer().params());
}
case hullXAlignAt:
case hullXXAlignAt:
case hullFlAlign:
- return colAlign(type_, col(idx));
+ return colAlign(type_, col(idx), buffer().params());
default:
break;
}
#include "MathStream.h"
#include "MathSupport.h"
+#include "Buffer.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
#include "support/gettext.h"
|| name_ == "aligned"
|| name_ == "align"
|| name_ == "alignedat")
- return colAlign(hullAlign, col);
+ return colAlign(hullAlign, col, buffer().params());
return 'l';
}
|| name_ == "aligned"
|| name_ == "align"
|| name_ == "alignedat")
- return colAlign(hullAlign, col(idx));
+ return colAlign(hullAlign, col(idx), buffer().params());
return InsetMathGrid::displayColAlign(idx);
}