# Misalignment of equations using amsmath

I would like all my equations to be aligned to the left on the same margin ie. move the first one forwards or the other two backwards.

The second 2 equations are inside an enumerate package though:

\begin{align*}
\frac{4}{5} + \frac{3}{2}
\end{align*}
\begin{enumerate}
\item Find equivalent fractions with the same denominator:
\begin{align*}
\frac{4}{5} + \frac{3}{2}=\frac{8}{10} + \frac{15}{10}
\end{align*}
\item Add the numerators:
\begin{align*}
\frac{8}{10} + \frac{15}{10}=\frac{23}{10}
\end{align*}
\end{enumerate}


So I am unsure how to get them to lineup as I believe the enumerate has a natural indent built in?

Code for testing (must be compiled using LuaLaTex):

\documentclass[14pt,extrafontsizes]{memoir}
\usepackage[margin=10px, paperwidth=640px, paperheight=720px]{geometry}
\usepackage[fleqn]{amsmath}
\usepackage{multicol}
\usepackage{enumerate}
\usepackage{titlesec}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\titleformat*{\section}{}

\begin{document}
\section*{\Huge \underline{Addition of Fractions}}
\LARGE
\begin{align*}
\frac{4}{5} + \frac{3}{2}
\end{align*}
\begin{enumerate}
\item Find equivalent fractions with the same denominator:
\begin{align*}
\frac{4}{5} + \frac{3}{2}=\frac{8}{10} + \frac{15}{10}
\end{align*}
\item Add the numerators:
\begin{align*}
\frac{8}{10} + \frac{15}{10}=\frac{23}{10}
\end{align*}
\end{enumerate}
\end{document}

• Please post a complete small document that shows all options used and allows testing answers. Are you using [fleqn] ? – David Carlisle Jul 21 '13 at 17:49
• you are using three separate instances of align*, each for one equation. all equations to be aligned must be within the scope of a single align* environment to actually be lined up. and yes, enumerate may be affecting this, but we need to know what document class you're using, as davidc suggests. – barbara beeton Jul 21 '13 at 17:54
• I have added code onto the main post :) – user1448093 Jul 21 '13 at 17:58

Yes, environment enumerate and others add a left and right margin, thus the equations are moved to the right.

At least for the first level of such environments that internally using the environment list, the following example resets \mathindent to keep the same position:

\documentclass[fleqn]{article}
\usepackage{amsmath}

\usepackage{etoolbox}
\patchcmd\list{#2\relax}{%
#2\relax
}{}{}

\begin{document}
\begin{align*}
\frac{4}{5} + \frac{3}{2}
\end{align*}
\begin{enumerate}
\item Find equivalent fractions with the same denominator:
\begin{align*}
\frac{4}{5} + \frac{3}{2}=\frac{8}{10} + \frac{15}{10}
\end{align*}
\item Add the numerators:
\begin{align*}
\frac{8}{10} + \frac{15}{10}=\frac{23}{10}
\end{align*}
\end{enumerate}
\end{document}


Remarks:

• The trick does not work for deeper nested environments, because \mathindent would become negative and such values seem to be ignored.
• The right margin remains unmodified.

You can use the same method used by the AMS classes:

\documentclass{memoir}
\usepackage[fleqn]{amsmath}
\usepackage[T1]{fontenc}

\makeatletter
\def\fullwidthdisplay{\displayindent\z@ \displaywidth\columnwidth}
\edef\@tempa{\noexpand\fullwidthdisplay\the\everydisplay}
\everydisplay\expandafter{\@tempa}
\makeatother

\begin{document}
\begin{equation*}
\frac{4}{5} + \frac{3}{2}
\end{equation*}
\begin{enumerate}
\item Find equivalent fractions with the same denominator:
\begin{equation*}
\frac{4}{5} + \frac{3}{2}=\frac{8}{10} + \frac{15}{10}
\end{equation*}
\item Add the numerators:
\begin{equation*}
\frac{8}{10} + \frac{15}{10}=\frac{23}{10}
\end{equation*}
\end{enumerate}
\end{document}


## Notes

1. The package titlesec is incompatible with memoir; use memoir's features to change the appearance of titles

2. Underlining is not a good typographical device

3. Enormous fonts don't enhance readability, rather they hinder it. You already have a base font size of 14pt which is rather large. Don't use \LARGE naked in a document.

4. align should be used for multiple line groups of equations, not for a single one, for which equation is to be preferred.

• Thanks for the tips. reason for the size is im transcribing it into illustrator and that size fits the final format best! I'll take the rest into account! :) – user1448093 Jul 21 '13 at 18:29

If you want to align several equations you need to:

• have them all in the same align* environment
• add a & symbol in your equations where you want them to be aligned
• add a \\ symbol at the end of each line

If you just want to get what is on your picture you can use the following code:

\begin{align*}
& \frac{4}{5} + \frac{3}{2} \\
\intertext{1. Find equivalent fractions with the same denominator:}
& \frac{4}{5} + \frac{3}{2}=\frac{8}{10} + \frac{15}{10} \\
\intertext{2. Add the numerators:}
& \frac{8}{10} + \frac{15}{10}=\frac{23}{10} \\
\end{align*}


and play with the fleqn option of the amsmath package. However this is not optimal if you want to have a longer enumeration since it is not automatic at all! To change that I found that it is possible to have an align* environment inside an enumerate environment (as long as the first \item command is before the \begin{align*} command) but not the opposite...

NOTE This output has been obtained with the fleqn option.