0

I have two equations, places inside subequations. How can I put the bracket { on the left side of these subequations?

enter image description here

P.S.I tried cases, but it doesn't work there - error "Missing $ inserted"

\begin{subequations} \begin{cases}
\begin{equation} subeq.1 \end{equation}
\begin{equation} subeq.2 \end{equation}
\end{cases} \end{subequations}
user48115
  • 218

3 Answers3

3

Use the empheq environment The homonymous package load amsmath and mathtools:

\documentclass{article}
\usepackage{empheq}

\begin{document}

\begin{subequations}
  \begin{empheq}[left=\empheqlbrace]{align}
    x &  = y + z\\
    a^{2} &  =  b^{2} + c^{2}
  \end{empheq}
\end{subequations}

\end{document} 

enter image description here

egreg
  • 1,121,712
Bernard
  • 271,350
  • Thanks, @Bernard. Unfortunately, this solution doesn't work for big formulas, when it is nessesary to use \begin{equation} \end{equation}.

    What do I need to change to make the code below works?

    \begin{subequations}

    \begin{empheq}[left=\empheqlbrace]{align}

      \begin{equation}
    
      x   = y + z
    
      \end{equation}
    
      \begin{equation}
    
      a²   =  b² + c²
    
      \end{equation} 
    
        \end{empheq}
    
    

    \end{subequations}

    – user48115 Aug 02 '16 at 19:48
  • You have several subequations, and don't want them to be aligned? Replace align with gather. empheq works with all amsmath environments (not with the subenvironments such as aligned or gathered). – Bernard Aug 02 '16 at 19:53
  • If I replace align with gather I still can't use \begin{equation} \end{equation} --- LaTeX Error: Bad math environment delimiter.

    \begin{subequations} \begin{empheq}[left=\empheqlbrace]{gather}
    \begin{equation} subeq.1 \end{equation}
    \begin{equation} subeq.2 \end{equation}
    \end{empheq} \end{subequations}

    – user48115 Aug 04 '16 at 10:46
  • Did I misunderstand you @Bernard?

    Also, I do want my equations to be aligned, but I have long subequations (couple lines long). Therefore I can't use {align} and \ for each new lines) as you wrote in your first answer, because in this case every new line will be recognised as a new formula and obtain a number.

    – user48115 Aug 04 '16 at 10:55
  • For the last but one comment: if you use gather, you don't use equation. The latter is for one-lined equations, the former for a group of equations. gather with one equation is the same as equation. – Bernard Aug 04 '16 at 11:04
  • Could you post an explicit code? What you want is not clear to me. – Bernard Aug 04 '16 at 11:08
2

stealing @Bernard's example, i've expanded it to show a multi-line situation. the [t] is a necessary option on the aligned block to keep the block from being centered vertically, but unfortunately it also has the effect of placing the equation number on the top line of that component.

\documentclass{article}
\usepackage{empheq}

\begin{document}

\begin{subequations}
  \begin{empheq}[left=\empheqlbrace]{align}
    x &  = \begin{aligned}[t]
           & y + z + \text{something to make this wider}\\
           & + \text{more stuff to produce multiple lines}
           \end{aligned}\\
    a^2 &  =  b + c
  \end{empheq}
\end{subequations}

\end{document}

enter image description here

one other comment ... bernard's answer uses "unicode" superscripts. doesn't always work (and there aren't unicode superscripts for greek letters or really anything but digits), so it's not recommended to use those in math.

but otherwise, bernard's answer is solid.

  • I edited Bernard's answer; apparently he's using a smart editor that maps those characters into “real” TeX style exponents. – egreg Aug 04 '16 at 20:33
  • Thanks, for the solution @Barbara. I've figured out that I couldn't understand Bernard's solution because I didn't realise how align and aligned work. – user48115 Aug 05 '16 at 16:16
0

With the amsmath package:

\[
  left text \begin{cases}
               sub1 & 1\\
               sub2 & 2
            \end{cases}
\]