# Alignment with \mbox in one line [duplicate]

In my MWE below, I included an \mbox in my \align environment. I wanted the text line to be flush left, but when I inclued the text line as a separate line, all the equations got shifted to the right. How can I bascially include the \mbox in one line, then continue with the rest of the formula in the align environment?

Here is my code:

\documentclass{article}
\usepackage{amsmath,fourier,physics}

\begin{document}
\begin{align}
\mbox{Now ~} \dfrac{1}{z!}  = & (z!)^{-1} \\
\ln p(z)  = & z\ln\lambda - \lambda - \ln z! \nonumber \\
\mbox{Differentiating with respect to $\lambda$, we have}\nonumber \\
\pdv{\ln p(z)}{\lambda} = & \dfrac{z}{\lambda} - 1
\end{align}

\end{document}
• Load mathtools rather than amsmath. Use \text{..} rather than \mbox{..} in usual places. And, in case you want one whole line (or paragraph) in between math use \intertext{..} or \shortintertext{..}. Oct 9 '15 at 21:50
• The & should be before the = sign. Oct 9 '15 at 21:54

• & goes before the relation so it gets the correct spacing
• use \text rather than \mbox
• load mathtools (which in turn loads amsmath) and use \intertext{..} to get a whole paragraph in between

\documentclass{scrartcl}

\usepackage{mathtools,fourier,physics}

\begin{document}

\begin{align}
\text{Now} \quad \frac{1}{z!}  &= (z!)^{-1} \\
\ln p(z) &= z\ln\lambda - \lambda - \ln z! \nonumber \\
\intertext{Differentiating with respect to $\lambda$, we have}
\pdv{\ln p(z)}{\lambda} &= \dfrac{z}{\lambda} - 1
\end{align}

\end{document}

\intertext seems to be a solution:

\documentclass{article}
\usepackage{amsmath,fourier,physics}

\begin{document}
\begin{align}
\mbox{Now ~} \dfrac{1}{z!}  = & (z!)^{-1} \\
\ln p(z)  = & z\ln\lambda - \lambda - \ln z! \nonumber \\
\intertext{Differentiating with respect to $\lambda$, we have}
\pdv{\ln p(z)}{\lambda} = & \dfrac{z}{\lambda} - 1
\end{align}

\end{document}