In the following code the 3rd equation is going out of the alert block. I want to align those equations beautifully inside the alert block. And also I want to indicate that the first equation is 'Mass conservation', second is 'Momentum conservation' and last as 'Total fluid energy conservation'. How can I do that?
\documentclass[handout,13pt,compress,c]{beamer}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{mathtools}
\usetheme{PaloAlto}
\begin{document}
\begin{frame}
\frametitle{Physical equations}
\framesubtitle{The equations that we are solving by Enzo during the simulation}
\begin{alertblock}{Eulerian equations of ideal magnetohydrodynamics (MHD) including gravity, in comoving coordinate}
$$ \dfrac{\partial \rho }{\partial t} + \dfrac{1}{a}\nabla .(\rho \vec{v}) = 0 $$
$$ \dfrac{\partial \rho \vec{v}}{\partial t} + \dfrac{1}{a}\nabla .\left(\rho \vec{v}\vec{v} + \vec{I}p^* - \dfrac{\vec{B}\vec{B}}{a}\right) = -\dfrac{\dot{a}}{a}\rho \vec{v} - \dfrac{1}{a}\rho \nabla \phi $$
$$ \dfrac {\partial E} {\partial t} + \dfrac {1}{a} \nabla . \left[ (E+p^*) - \dfrac{1}{a}\vec{B}(\vec{B}.\vec{v})\right] = - \dfrac{\dot{a}}{a}\left( 2E - \dfrac{B^2}{2a}\right) - \dfrac{\rho }{a}\vec{v}.\nabla \phi - \Lambda + \Gamma + \dfrac{1}{a^2}\nabla . \vec{F}_{cond}, $$
\end{alertblock}
\end{frame}
\end{document}
Best Answer
Here is one option using
alignat*
Also, you don't need
\dfrac
in display math and you should use\[\]
over double dollars.Why is \[ ... \] preferable to $$ ... $$?
By naming, do mean numbering and referencing a label name later on?
To change the numbers to names, add
\tag{name}
.