I am absolutely blown away. I have spent a month on and off looking for a solution to this extremely obvious issue and it has not be addressed anywhere that I can see.
When using align for equations, unless I spam & before every single line I write, the default equation alignment is to the last character of each line, which results in the equations being in a way nobody would ever want to read.
How do I permanently set align to align to the first character of each line without having to & every line?
[![\begin{align}
T=\f{1}{2}m\dot{x}_1^2+\f{1}{2}\dot{x}_2^2\\
U_{spring}=\f{1}{2}kx^2\\
U=\f{1}{2}kx_1^2+\f{1}{2}kx_2^2+\f{1}{2}k_{12}(x_2-x_1)^2\\
\L=T-U\\
\pd{\L}{x_1}=\d{}{t}\pd{\L}{\dot{x}}_1\Rightarrow-\f{1}{2}k2x_1-\f{1}{2}k_{12}2(x_2-x_1)(-)=m\ddot{x}_1\\
m\ddot{x}_1=-kx_1+k_{12}x_2-k_{12}x_1=-(k+k_{12})x_1+kx_2\\
=-(k+k_{12})x_1+k_{12}x_2\\
m\ddot{x}_2=k_{12}x_1-(k+k_{12})x_2
\end{align}][1]][1]
\begin{align}
&T=\f{1}{2}m\dot{x}_1^2+\f{1}{2}\dot{x}_2^2\\
&U_{spring}=\f{1}{2}kx^2\\
&U=\f{1}{2}kx_1^2+\f{1}{2}kx_2^2+\f{1}{2}k_{12}(x_2-x_1)^2\\
&\L=T-U\\
&\pd{\L}{x_1}=\d{}{t}\pd{\L}{\dot{x}}_1\Rightarrow-\f{1}{2}k2x_1-\f{1}{2}k_{12}2(x_2-x_1)(-)=m\ddot{x}_1\\
&m\ddot{x}_1=-kx_1+k_{12}x_2-k_{12}x_1=-(k+k_{12})x_1+kx_2\\
&=-(k+k_{12})x_1+k_{12}x_2\\
&m\ddot{x}_2=k_{12}x_1-(k+k_{12})x_2
\end{align}
Best Answer
You should do two things: use
\documentclass[fleqn]{article}
(or whichever document class you're using), but also usegather
instead ofalign
.align
and its cousins are for vertically aligning text around some specified character, usually=
, butgather
is for a general list of equations. (You can also usegather*
to get an un-numbered version.)If you really want to redefine
align
in particular, you could callin your preamble and just use
align
where I usedgather
, but that makes your code less clear.