# Tag each line of array inside a { symbol [duplicate]

I want to tag each line of an array that is inside the { symbol. For the example bellow I use align, but a solution with equation, subequation or some other "top" structure might also work.

Here is an example:

\begin{align}
\mathbf{S} = \left\{ \begin{array}{lll}
a & \text{name a} \\
b & \text{name b} \\
c & \text{name c},
\end{array} \right.
\end{align}


I would like to have number-letter tag for each line of this structure, i.e. (1a), (1b) and (1c) for example.

## marked as duplicate by egreg align StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Nov 13 '16 at 14:10

• Welcome! Where do you want to have these tags? At the right margin or at the right of the matrix (like a bordered matrix)? – Bernard Nov 13 '16 at 11:54
• At the right margin, as the "normal equation" tags that I can refer to through the text. By default, Latex assigns single equation number to the whole expression above. – nevermind Nov 13 '16 at 12:47
• I recommend the empheq solution to the question marked for duplicate. – egreg Nov 13 '16 at 14:11

You can emulate a Bmatrix environment with empheq and alignat and use the subequations environment. You don't have to load amsath, as ampheq loads mathtools, which is an extension of amsmath. For single left brace, the simplest is the subnumcases environment:

 \documentclass{article}
\usepackage{empheq, cases}

\begin{document}

\begin{subequations}
\begin{empheq}[left={\mathbf{S} = \empheqlbrace}, right=\empheqrbrace]{alignat = 2}
a &\hspace{2\arraycolsep} & & \text{name a} \\
b & & & \text{name b} \\
c & & & \text{name c},
\end{empheq}
\end{subequations}

\begin{subnumcases}{\mathbf{S} = }
a & \text{name a} \\
b & \text{name b} \\
c & \text{name c},
\end{subnumcases}

\end{document}


• I don't think the right brace is wanted: the OP has \right. – egreg Nov 13 '16 at 14:09
• Thank you very much, this is the answer I needed! The right brace is not needed, but it is not central to my problem. – nevermind Nov 13 '16 at 14:23
• I don't know why I thought you wanted a pair of braces. For a single left brace, you can use the cases package: it defines a subnumcases environment. I'll add it in a moment – Bernard Nov 13 '16 at 14:30
• It is possible to have single brace inside your code as well, I simply removed "\empheqrbrace" after "right=". – nevermind Nov 13 '16 at 15:44
• You even can remove right=: neither left= nor right= are mandatory. – Bernard Nov 13 '16 at 15:46