I can use the align environment to properly align non-separated equations like this:
begin{align}
a^2 + b^2 &= c^2\\
&= d
\end{align}
but how can I align separated equations with text inbetween? For example:
\documentclass[12pt, a4paper]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
My first equation:
\begin{equation}
a^2 + b^2 &= c^2
\end{equation}
My second equation:
\begin{equation}
1 = 3 - 2
\end{equation}
\end{document}
I would like the two equations to be aligned at the equality sign.
You could place both equations in an align
environment and add the text in between with \intertext{...}
:
\documentclass[12pt, a4paper]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
My first equation:
\begin{align}
a^2 + b^2 &= c^2\\
\intertext{My second equation:}
&= d
\end{align}
\end{document}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With