# Case Condition for two lines

I am searching for a way to write the case condition $\text{in } \Omega$ in the middle of the first and second line.

\documentclass{article}
\usepackage[utf8]{inputenc}%
\usepackage{mathtool}

\begin{document}

\begin{align*}
\begin{cases}
\boldsymbol\varepsilon(u) = \frac{1}{2}\left(\nabla u + \nabla u^T \right) & \text{in } \boldsymbol\Omega \\
\mathrm{div}\,\boldsymbol \sigma + f = 0 \\
u = \overline{u} & \text{on } \partial \boldsymbol\Omega_D \\
\boldsymbol \sigma n = \overline{ t} & \text{on } \partial \boldsymbol\Omega_N
\end{cases}
\end{align*}
\end{document}

• Welcome to TEX.SE! Please provide a full minimal working example which reproduces the issue, possibly starting with \documentclass{...} and ending with \end{document}. For example, we do not know how \bold might be defined. – campa Aug 13 at 14:51

Like this? B.t.w., \bold is not defined. I replaced it with \bm.

\documentclass{article}
\usepackage[utf8]{inputenc}%
\usepackage{mathtools, bm}
\newcommand{\Leg}[3][]{\left(\frac{#2}{#3}\right)_{#1}}
\DeclareMathOperator{\divg}{div}

\begin{document}

\begin{align*}
\begin{cases}
\boldsymbol\varepsilon(\bm{u}) = \frac{1}{2}\left(\nabla \bm{u} + \nabla \bm{u}^T \right) & \smash{\raisebox{-1.6ex}{in $\boldsymbol\Omega$}} \\
\divg\boldsymbol \sigma + \bm{f} = \mathbf{0} \\
\bm{u} = \overline{\bm{u}} & \text{on } \partial \boldsymbol\Omega_D \\
\boldsymbol \sigma \bm{n}= \overline{\bm{t}} & \text{on } \partial \boldsymbol\Omega_N
\end{cases}
\end{align*}
$\Leg{\pi}{θ}\quad \Leg{\pi}{θ}$%

\end{document}


• Thank you very much! – Kerem Aug 13 at 17:53

The main trick is using aligned; however, there are other improvements to your code:

1. “div” is an operator and it's much better to define a macro for it; since \div is preempted, I used the name \divop;

2. if an operator immediately follows & in align or aligned, it should be preceded by \! or a spurious thin space would be added; a little nuisance, but it's much better than \mathrm{div}\,;

3. \boldsymbol works, but \bm is better; remember to load bm after amsmath; you might keep \boldsymbol, but \bm is easier;

4. \bold is not predefined; probably you meant \mathbf; I recommend using \mathbf{u} and \bm{\sigma} rather than \mathbf u and \bm \sigma: it's semantically sounder;

5. \overline is less appealing than \bar for a single letter;

6. \tfrac is better in the context, because \frac in aligned would print a big fraction;

7. \left and \right in that context are useless: they add unwanted space and produce oversized parentheses.

\documentclass{article}
\usepackage{amsmath,bm}

\DeclareMathOperator{\divop}{div}

\begin{document}

\begin{align*}
\begin{cases}
\begin{aligned}
&\bm{\varepsilon}(\mathbf{u}) = \tfrac{1}{2}(\nabla \mathbf{u} + \nabla \mathbf{u}^T ) \\
&\!\divop\bm{\sigma} + \mathbf{f} = \mathbf{0}
\end{aligned}&\text{in } \bm{\Omega}
\\
\mathbf{u} = \bar{\mathbf{u}} & \text{on } \partial \bm{\Omega}_D \\
\bm{\sigma} \mathbf{n} = \bar{\mathbf{t}} & \text{on } \partial \bm{\Omega}_N
\end{cases}
\end{align*}

\end{document}


• The only thing I'm not happy with: cases uses an \arraystretch of 1.2, which is consistently ignored by aligned. Even redefining it within the aligned environment does not work. Sadly, I'm fussy enough to find the non uniform line spacing irritating :-) – campa Aug 13 at 15:24
• @campa I find that this spacing is better, so as to group the first two lines. – egreg Aug 13 at 15:26
• I am very sorry for the mistakes and thankful for your suggestions! – Kerem Aug 13 at 17:52