[Tex/LaTex] Multiline formula with each column left-aligned

horizontal alignmentlyxmath-mode

I am using LyX and I want a multiline and multicolumn display formula with each column aligned to the left.

But when I add a formula and add columns, some are aligned to the right and some are aligned to the left.

How do I control it and make all columns aligned to the left?

Best Answer

When you use the align environment (Insert --> Math --> AMS Align), the columns are aligned as rlrlrl..., as the usual use case is alignment around a relation. If you leave the odd columns (first, third, etc.) empty and place the content in the even columns, you will have just left alignment. This will, however, distribute the columns evenly over the text width, so if you have few/narrow columns, there may be a lot of white space between them.

An alternative then is to first add a normal display math environment (Ctrl + Shift + M) and within this add an aligned environment: Insert --> Math --> Aligned. This has the same alignment as align, so you would have to leave columns empty, but there won't be the extra space between them.

enter image description here enter image description here