I'm trying to draw a figure consisting of two boxes, using the framed
environment, aligned side by side, each containing a small header and an align*
environment. I'd like some symmetry. I.E. that the top and bottom lines of the boxes line up and the boxes are of equal width and symmetrical about the center of the page.
This is what I've got so far (Making use of some shorthands in the align
environments, but I'd like a solution that does not depend on the contents of the align
s):
\begin{figure}
\centering
\begin{minipage}{0.45\textwidth}
\begin{framed}
\centering
\textbf{Unit}
\scalebox{.9}{\parbox{\linewidth}{%
\begin{align*}
\unit{A}:&\quad A \rightarrow \allEn\pstar A\\
\unit{A}(\env)=&\quad\finpr{\Id{A(\env,e)}}{\e\in E}
\end{align*}
}}
\end{framed}
\end{minipage}
\quad
\begin{minipage}{0.45\textwidth}
\begin{framed}
\centering
\textbf{Co-Unit}
\scalebox{.9}{\parbox{\linewidth}{%
\begin{align*}
\counit{B} : &\quad \pstar\allEn B \rightarrow B\\
\counit{B}(\env, \e') =&\quad \pi_{\e'} : \Pi_{e\in E}B(\env, \e)\rightarrow B(\env, \e')
\end{align*}
}}
\end{framed}
\end{minipage}
\caption{The unit and co-unit of the adjunction}
\label{UnitCoUnitDefinition}
\end{figure}
If you look carefully, these boxes aren't quite aligned vertically.
Is there a way to fix the size of the boxes to be equal regardless of the contents of the boxes?
\finpr
, because this definition provides no difference between the two box heights. – Werner Apr 1 at 20:55{\left\langle#1\right\rangle_{#2}}
instead. This appears to have fixed the issue as you've said. I'm currently deciding whether re-jig the question so it's useful for others (i.e. using an example with obviously different height aligns) – Xandros Apr 1 at 21:15\left
...\right
, don't just assume things will be the same without it. – Werner Apr 1 at 21:16