3

I want a equation like this

Code is below

But now I can't number equations like the above as without using \cdot and (1) etc. manually. I'm so confused. Please help. Thank you.

\begin{equation*}
 \left\{\,
  \begin{IEEEeqnarraybox}[
     \IEEEeqnarraystrutmode
     \IEEEeqnarraystrutsizeadd{2pt}
      {2pt}
    ][c]{rCl}
f(t) & = & g(t)\\
f'(t)&=&g'(t) \end{IEEEeqnarraybox} \right. \quad
\Longleftrightarrow \quad \left\{\,
  \begin{IEEEeqnarraybox}[
     \IEEEeqnarraystrutmode
     \IEEEeqnarraystrutsizeadd{7pt}
      {7pt}
    ][c]{rCl}
   e^t & = & a\sqrt{t}\qquad\cdots (1)
   \\
   e^t & = & \frac{a}{2\sqrt{t}}\qquad\cdots (2)
  \end{IEEEeqnarraybox}
 \right.
 \label{eq:example_left_right2}
\end{equation*}
egreg
  • 1,121,712
Rupert
  • 33

1 Answers1

1

Well, I'll start by saying that I could not easily figure a way to finagle ieeeeqnarraybox to do this [not that it couldn't be done with enough effort]. However, you can achieve nearly the same result with the amsmath and cases packages.

\documentclass[]{IEEEtran}

\usepackage{amsmath,cases}

\begin{document}

\begin{numcases}{
\begin{cases}
f(x) = g(x) \\
f'(x) = g'(x) 
\end{cases}
\Longleftrightarrow \quad
}
e^t = a\sqrt{t}  \vphantom{\frac{a}{2\sqrt{t}}} \\
               % \vphantom used to keep space in each case equal
e^t =  \frac{a}{2\sqrt{t}}
\end{numcases}

\end{document}

This gives a nice looking:

eq no leader

You can optionally call \usepackage[subnums]{cases} to enable sub-equation numbering, where each case would be labeled (1a) and (1b), respectively.

While I could not get the spacing to work automatically (inspired by @DavidCarlisle from here) due to the complexity of the expression, you can add a couple lines to automatically create leader lines as shown below. I think that with the nature of how this code works, it will end up being more hassle than it is worth to tweak the leader lines, but it can be done if that is the look you truly desire. Personally, I would go with the first solution and omit the leader lines.

\documentclass[]{IEEEtran}

\usepackage{amsmath,cases}

\begin{document}

% Create a new length to be used in two locations
% for ease of adjustment
\newlength{\spacerightside}
\setlength{\spacerightside}{3.4em} % Adjust leader length on right

\begin{numcases}{
\hskip 3em % Adjust left spacing
\begin{cases}
f(x) = g(x) \\
f'(x) = g'(x) 
\end{cases}
\Longleftrightarrow \quad
}
e^t = a\sqrt{t}  \vphantom{\frac{a}{2\sqrt{t}}} \leaders\hbox{ $\cdot$} \hskip \spacerightside \\
                     % \vphantom used to keep space in each case equal
e^t =  \frac{a}{2\sqrt{t}}
\leaders\hbox{ $\cdot$}  \hskip \spacerightside
\end{numcases}

\end{document}

eq with leader

cslstr
  • 6,545