2

I'm trying to write a summation with a system of aligned equations as lower limit. To do that I wrote:

$$
I_{P+AH, a} = \sum
_{\begin{empheq}[left=\empheqlbrace]{align*}
 &\tau_i \text{ ATTIVO} \\
 &d_i < d_{a_i} 
\end{empheq}}
c
$$

but Texmaker gives me an error (bad math environment). How can I do it?

2 Answers2

4

You're getting an error because you try to use empheq inside another math environment, which doesn't make sense. However, you don't really need empheq for that, you can just use substack surrounded with \left\{ ... \right.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
I_{P+AH, a} = \sum_{\left\{ \substack{
     \tau_i \text{ ATTIVO} \\
     d_i < d_{a_i}
} \right.}
c
\]
\end{document}

If you want the conditions to be left-aligned, you can follow @daleif's suggestion and use a subarray environment instead of \substack.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
I_{P+AH, a} = \sum_{\left\{ \begin{subarray}{l}
     \tau_i \text{ ATTIVO} \\
     d_i < d_{a_i}
\end{subarray} \right.}
c
\]
\end{document}

Also, it is not related to your problem, but you should not use $$...$$, you should use \[...\] instead.

Vincent
  • 20,157
4

Here's are array-based and smallmatrix*-based solutions. (Many thanks to @daleif for suggesting the second solution type.)

enter image description here

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
I_{P+AH, a} 
= \sum_{
  \Bigl\{ \begin{array}{@{}l@{}}
             \tau_i \textsc{ attivo} \\
             d_i < d_{a_i} 
          \end{array} }
c 
= \sum_{
  \bigl\{ \begin{smallmatrix*}[l]
             \tau_i \text{ \scshape attivo} \\
             d_i\, <\, d_{a_i}
          \end{smallmatrix*}}
c
\]
\end{document}
Mico
  • 506,678