4

I have equations in two different align environments. How do I align them equally in such a way that the = sign is in the exact position following the sequence.

The MWE:

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
B &= \mu.H \\
  &= \mu_0.H + \mu_0.M
\end{align}
As $\mu = \mu_0.\mu_r$,
\begin{align}
B &= \mu_0.\mu_r.H \\
  &= \mu_0(H + M)
\end{align}
\end{document}

enter image description here

9

Use just one align environment and \intertext (from the amsmath package) or \shortintertext (from the mathtools package) for the text:

\documentclass[12pt]{article}
\usepackage{mathtools}

\begin{document}

\begin{align}
B &= \mu.H \\
  &= \mu_0.H + \mu_0.M
\intertext{As $\mu = \mu_0.\mu_r$,}
B &= \mu_0.\mu_r.H \\
  &= \mu_0(H + M)
\end{align}

\begin{align}
B &= \mu.H \\
  &= \mu_0.H + \mu_0.M
\shortintertext{As $\mu = \mu_0.\mu_r$,}
B &= \mu_0.\mu_r.H \\
  &= \mu_0(H + M)
\end{align}

\end{document}

enter image description here

  • @subhamsoni Yes, if amsmath is loaded. – Gonzalo Medina May 19 '14 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.