21

I have a set of equations that I'd like to display together (as an example, the Maxwell's equations).

Requirement #1: I'd like to have them labelled like in an align environment

\begin{align}
&\nabla\times\bar E = -\frac{\partial\bar B}{\partial t}-\bar J_{\text{mi}} \\
&\nabla\times\bar H = \bar J + \bar J_i + \frac{\partial\bar D}{\partial t}\\
&\nabla\cdot\bar J + \nabla\cdot\bar J_i = - \frac{\partial\rho}{\partial t}\\
&\nabla\cdot\bar J_{\text{mi}} = - \frac{\partial\rho_{\text{mi}}}{\partial t}\\
&\nabla\cdot\bar D = \rho\\
&\nabla\cdot\bar B = \rho_m
\end{align}

alt text

Requirement #2: I'd like to have them grouped by a lateral brace like in a cases environment

\begin{equation}
\begin{cases}
&\nabla\times\bar E = -\frac{\partial\bar B}{\partial t}-\bar J_{\text{mi}} \\
&\nabla\times\bar H = \bar J + \bar J_i + \frac{\partial\bar D}{\partial t}\\
&\nabla\cdot\bar J + \nabla\cdot\bar J_i = - \frac{\partial\rho}{\partial t}\\
&\nabla\cdot\bar J_{\text{mi}} = - \frac{\partial\rho_{\text{mi}}}{\partial t}\\
&\nabla\cdot\bar D = \rho\\
&\nabla\cdot\bar B = \rho_m
\end{cases}
\end{equation}

alt text

I don't like the cases environment because of the spacing of the equations (note the difference in the display of the \frac command) and because of the labelling (Req #1).

Is there a way to merge these two environments?

Werner
  • 603,163

2 Answers2

15

Use empheq.

\documentclass{article}
\usepackage{amsmath,empheq}
\begin{document}
\begin{empheq}[left=\empheqlbrace]{align}
&\nabla\times\bar E = -\frac{\partial\bar B}{\partial t}-\bar J_{\text{mi}} \\
&\nabla\times\bar H = \bar J + \bar J_i + \frac{\partial\bar D}{\partial t}\\
&\nabla\cdot\bar J + \nabla\cdot\bar J_i = - \frac{\partial\rho}{\partial t}\\
&\nabla\cdot\bar J_{\text{mi}} = - \frac{\partial\rho_{\text{mi}}}{\partial t}\\
&\nabla\cdot\bar D = \rho\\
&\nabla\cdot\bar B = \rho_m
\end{empheq}
\end{document} 
Lev Bishop
  • 45,462
2

Perhaps you should try this:

\newcommand{\pd}[2]{\frac{\partial{#1}}{\partial{#2}}}

\begin{eqnarray}
  \left\{
  \begin{aligned}
    \del\times\vec{E}&\;=\;-\pd{\vec{B}}{t}-...\\
    \del\times\vec{E}&\;=\;\vec{J}+...\\
    .
    .
    .
  \end{aligned}
  \right.
\end{eqnarray}
  • of course: \del ---> \nabla (I changed \nabla to \del in my document.sty file) –  Aug 30 '10 at 17:44