[Tex/LaTex] How to align multiple separate equations by equal sign to center of page

equationshorizontal alignment

I have several =-aligned equations like this:

\begin{equation}
\begin{split}
a &= b
b &= c
\end{split}
\end{equation}

\begin{equation}
\begin{split}
foo &= x
bar &= y
baz &= z
\end{split}
\end{equation}

However, when it shows up it looks essentially like this:

        a = b
        b = c
        ... content
       foo = x
       bar = y
       baz = z

The equal signs are not aligned across different equation blocks.

Wondering if there is a way to:

  1. Align them to each other.
  2. Align them to the center of the page.

Best Answer

If you really want all the equality signs centered, consider

\documentclass{article}
\usepackage{mathtools}
\usepackage{lipsum}
\usepackage{tikz}% just for illustration
\begin{document}
\begin{equation}
\begin{split}
\mathllap{a} &= \mathrlap{b}\\
\mathllap{b} &= \mathrlap{c}
\end{split}
\end{equation}
\lipsum[1]
\begin{equation}
\begin{split}
\mathllap{foo} &= \mathrlap{x}\\
\mathllap{bar} &= \mathrlap{y}\\
\mathllap{baz} &= \mathrlap{z}
\end{split}
\end{equation}
\tikz[remember picture,overlay]{\draw[red](current page.north)--(current page.south);}
\end{document}

enter image description here

The TikZ and lipsum stuff are just for illustration.

And depending on how long "content" is, you may also use

\documentclass{article}
\usepackage{lipsum}
\usepackage{mathtools}
\begin{document}
\begin{align*}
a &= b\\
b &= c\\
\intertext{\lipsum[1]}
foo &= x\\
bar &= y\\
baz &= z
\end{align*}
\end{document}

enter image description here

Related Question