6

I need something like this:

\left\{
first line  (1a)
second line (1b)
third line  (1c)
\right.

all lines should be aligned to left

1

2 Answers 2

9

(Update according to egreg's commend. Thanks!)

The first example of empheq given by Bernard is invalid if omitting the overload option when loading empheq package. For the latex file provided by Bernard, it has no problems at all. However, when I used \usepackage[overload]{empheq} in IEEEtrans with a lot other packages loaded, it will freeze the pdflatex on my computer, I cannot see why, so I loaded it without overload option. Here is the version when loading empheq without overloadoption (\empheqlbrace is the big left parenthesis. \, is just used to add extra space; the default is too tight.):

\begin{subequations}
    \begin{empheq}[left={K(A)=\empheqlbrace\,}]{align}
      & (I \otimes e^A) \psi\left(A^T \oplus (-A) \right) \\
      & (e^{A^T/2} \otimes e^{A/2}) \operatorname{sinch}\left(\frac{1}{2}[A^T \oplus (-A)]\right) \\
      & \frac{1}{2}(e^{A^T} \oplus e^A) \tau\left(\frac{1}{2}[e^T \oplus (-A)]\right),
    \end{empheq}
\end{subequations}

whose output looks like: demo image


For a question on citations, it works out of box, e.g. see the following codes:

\documentclass[a4paper,10pt]{article}

\usepackage{amsmath}
\usepackage{empheq}

\begin{document}
We refer to the subequation (\ref{eq:2}) and the whole equation (\ref{eq:all}).
\begin{subequations}
  \label{eq:all}
    \begin{empheq}[left={K(A)=\empheqlbrace\,}]{align}
      & (I \otimes e^A) \psi\left(A^T \oplus (-A) \right)
        \label{eq:1} \\
      & (e^{A^T/2} \otimes e^{A/2}) \operatorname{sinch}\left(\frac{1}{2}[A^T
        \oplus (-A)]\right)
        \label{eq:2}\\
      & \frac{1}{2}(e^{A^T} \oplus e^A) \tau\left(\frac{1}{2}[e^T \oplus
        (-A)]\right),
        \label{eq:3}
    \end{empheq}
\end{subequations}
\end{document}

which gives

5
  • Welcome to TeX.SX! While I prefer the syntax you used, I tried Bernard's example with TeX Live 2015 and it works without problems. Maybe you didn't notice the overload option.
    – egreg
    Aug 5, 2015 at 16:03
  • I tried using this and it works fine. But how do I reference the sub equations. I tried providing sub labels, but they don't work.
    – nxkryptor
    May 16, 2017 at 14:03
  • @nxkryptor Sorry I didn't check it for long time. It works out of box for me, by just using \labe{} for both citing the whole equation and sub equations.
    – oracleyue
    Oct 11, 2017 at 11:30
  • Can't you just write \eqref{eq:2} instead of (\ref{eq:2})? Jul 20, 2019 at 1:10
  • @ViktorGlombik Well, you certainly can do that if the packages support \eqref, which I remember comes from amsmath? Mostly I do use eqref.
    – oracleyue
    Jul 22, 2019 at 6:00
7

Two solutions: one with the empheq package and an align environment, another with the subnumcases environment from the cases package. I had to adjust spacing for the brace in both, as I found the default was not so good (too small in the first case, too large in the second):

    \documentclass{article}

    \usepackage[utf8]{inputenc}
    \usepackage[overload]{empheq}
    \usepackage{cases} 

    \begin{document}

    \begin{subequations}
    \begin{align}[left = \empheqlbrace\,]
      & a = b \\
       & c = d
    \end{align}
    \end{subequations}

    \begin{subnumcases}{}
    \!\! a = b \\
    \!\! c = d
    \end{subnumcases}

    \end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .