I'm creating a list with enumerate of both positive and negative numbers, and would like the numbers to be lined up with one another, i.e. all in the same column. I also have a second list with decimal numbers, and I would like to line up the decimal points. I tried using \begin{align} within the enumerate list as in
\begin{enumerate}
\begin{align*}[t]
\item $-&2$
\item $3$
\item $-18$
\item $83.2$
\item $-112.2$
\end{align*}
\end{enumerate}
but it gives me the error \begin{aligned} allowed only in math mode. I have the amsmath package loaded, and I'm compiling with xelatex.
Edit: xelatex is now giving me this error even when I have commented out the problem area.
\begin{aligned}[t]
insteadarray
environment with thesiunitx
package for alignment?align
is a multi-row environment for aligning things which is exactly what you want, you are using separate align environments for each entry which means there is no alignment at all (apart from the syntax error of putting the align environment inside$..$
)