I have 2 parts (i) and (ii) that I am trying to write out, but I can't seem to get the (i) and (ii) it look nicely, i.e. itemised. I tried using the \begin{enumerate}
command but it doesnt seem to work together with the align
environment? How would I get the 2 parts to be itemised/look nicely? (regarding the (i) and (ii)).
\documentclass{report}
\usepackage{amsmath,amsthm,enumitem}% http://ctan.org/pkg/{amsmath,amsthm}
\theoremstyle{definition}
\newtheorem{defn}{Definition} % definition numbers are dependent on theorem numbers
\begin{document}
\begin{defn}
Let $x, y$ be some unknowns, we let:
\begin{align*}
(i) x^2 + y^2 &:= (x+y)(x-y) \\
&:= (1+2)(3+4) \\
&:= (3\times 7) \\
&\phantom{:}= 21 \\
&\phantom{:}= 42/2\\ \\
(ii) x^2 + y^2 &:= (x+y)(x-y) \\
&:= (1+2)(3+4)(3+4)(3+4)(3+4) \\
&:= (3\times 7)(3\times 7)(3\times 7) \\
&\phantom{:}= 123456789 \\
&\phantom{:}= 42/2
\end{align*}
\end{defn}
\end{document}
Best Answer
Use
aligned
for this withenumerate
.Below I have used the
calc
package and extended the case to show how to handle the situation where the left hand sides are not of the same width and you still desire to align all of thealigned
elements. I have done this in two step just for readability, where you set\WidestLHS
to be the widest left hand side in your entire list, and then apply the macro\FormatLHS
to each of the left hand sides of the equations.If all your left hand sides are of the same width, or you do not desire that the
:=
be aligned across the list items, then you do not need to use these two macros.Note:
Code: