I would like to know the "best" environment to align equations to the left. I already use fleqn
at the beginning of my document and $\begin{aligned} ... \end{aligned}$
when I write equations in the "enumerate" environment. I would like to align my text like this,
but I don't know what is the best environment to do that and how to do it. Also, sometimes, I get weird indentations, at the beginning of lines depending on the environment and I sometimes have my text left aligned while right aligned (see third block of equation) and I was wondering why Latex aligns my equations like this.
The code:
\documentclass[fleqn, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath, amsthm, amssymb, mathtools}
\usepackage[margin=1.25in, showframe]{geometry}
\setlength{\mathindent}{0pt}
\setlength{\jot}{1ex}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.25}
\begin{document}
\begin{align*}
I=O+P \\
\int^o_p (x-1)^2 \,dx
\end{align*}
$\begin{aligned}
I=O+P \\
\int^o_p (x-1)^2 \,dx
\end{aligned}$
\begin{align*}
u_1\in U_1 \Rightarrow u_1\in U_1 \cup U_2 \\
u_2\in U_2 \Rightarrow u_2\in U_1 \cup U_2 \\
\textrm{Since } U_1 \cup U_2 \textrm{ is a subspace of $V$, } u_1+u_2\in U_1 \cup U_2 \\
\Rightarrow u_1+u_2\in U_1 \textrm{ or } u_1+u_2\in U_2
\end{align*}
\begin{align*}
R_{eq}=\left(\frac{1}{R_1}+\frac{1}{R_2}\right)^{-1} &= \left(\frac{1}{3000}+\frac{1}{1000}\right)^{-1} \\
&= 750
\end{align*}
\end{document}
Thanks in advance for your answers.
Best Answer
I suggest that you (a) replace the first two
align*
environments withgather*
environments and (b) start using alignment points in thealigned
environment (and place a\noindent
directive before thealigned
environment).As an alternative to suggestion (a) above, consider (a') keep using the
align*
environments but start using alignment markers (&
), one at the start of both lines in the firstalign*
environment, and one at the start of all four lines in the secondalign*
environment.You also asked,
That would be because you're not using a single alignment marker in that
align*
environment. See suggestion (a') above.