I use the AMS align
environment to write some algebraic steps which have many lines of equations. I want to add some space (or preferably horizontal) after each line of equation with =
. How can I do that?
So what I want to achieve is:
a = 1x2+3
---------
= 2+3
---------
= 5
Or other visually pleasing way to separate multiple lines of equations.
Best Answer
Adding horizontal lines in AMS align in LyX
Use the menu element Edit > Math > Add Line Above/Below. This inserts
\hline
between the desired lines.However for AMS
align
this produces a line that starts at the left margin, which is probably not what you wish for. The solution is to replace thealign
environment with analigned
environment, in which the\hline
seems to be better behave.Detailed instructions: Create a new display math inset (Ctrl+Shift+M), and inside it type
\aligned
. This creates aaligned
inset, in which you add as many columns and rows as desired. You can now cut-paste from youralign
environment to your newaligned
environment. Now, use Edit > Math > Add Line Above/Below to add lines where desired.Result in the code preview pane:
Increase spacing between lines in AMS align
Define a math macro
\linespacing
with contents\rule[-#1]{0pt}{0pt}
and use it to increase spacing with the next line.Result in the code preview pane: