I'm very picky regarding alignment inside my proofs. What's frustrating me right now is that I have some lines that I want to be center-aligned (using \begin{gather}
) and others that I wish to align at the "=" sign (using \begin{align}
). My idea for how to do this was to just switch between the two within one proof, but this creates extra spacing (because closing one and opening another comes with implicit spacing).
I've messed around with adding in \vspace[-20pt]
or something to that effect, but it's a rather clumsy solution and I've had problems with it. Also, ideally I would be able to go from align to gather back to align and have the second align keep aligned with the first, and obviously closing and reopening everything doesn't allow this.
Can anybody think of a better way to switch between the two alignment structures? Perhaps using a box to nest my gathers within align or something. Essentially, I usually like most of my proof in align but then want a couple of tangential points in gather. I've spent a while pondering the amsmath readme (and this website), but I can't find an answer.
Many thanks in advance!
Here's a little example coding to demonstrate the issue with my current scheme:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\begin{document}
\begin{proof}
\begin{align*}
10 &= 2+2+2+2+2 \\
&= 3+3+3+1
\end{align*}\begin{gather*}
\intertext{But now it puts this annoying large space above this line...}
5=5
\end{gather*}
\end{proof}
\end{document}
align*
and a `gather* one after the other, because there's a line of text between them. Just put the text between the environments.\shortintertext
, but it's ingenious and should probably work okay unless the aligned material gets to be too long and has to be broken to another page. i'm not really sure what would happen then, but would be interested to find out, presented with a real example.