1

I'm trying to write a nested system of equations with a curly brace on the right of each system, some text and then another curly brace which covers all other systems. However, the rightmost curly brace appears too far and too wide and \vdots goes at the opposite direction of the curly brace. The following code demonstrates the problem:

\documentclass{article}
\usepackage{mathtools}
\newenvironment{rcases}
{\left.\begin{aligned}}
{\end{aligned}\right\rbrace}
\begin{document}
\begin{equation*}
\begin{rcases}
\begin{equation*}
\begin{rcases}
P(x_{10},&x_{20},\ldots ,x_{n0}) \nonumber \ \\ 
&\vdots \\
P(x_{1,d+1},&x_{20},\ldots ,x_{n0})
\end{rcases}
\text{Some text}
\end{equation*}
\vdots \\ 
\begin{equation*}
\begin{rcases}
P(x_{10},&x_{2d},\ldots ,x_{n0}) \nonumber \ \\
&\vdots \\
P(x_{1,d+1},&x_{2d},\ldots ,x_{n0})
\end{rcases}
\text{some text}
\end{equation*}
\end{rcases}
\text{some text}
\end{equation*}
\end{document}

Any ideas will be much appreciated!

4
  • You have two equation* environments nested. That's not intended to work.
    – Manuel
    Feb 5, 2015 at 9:49
  • Didn't you get a lot of errors with your code? Feb 5, 2015 at 9:49
  • @Karlkoeller: I did! @ Manuel: It seems that it works (kind of) but not exactly what I want. Feb 5, 2015 at 9:51
  • Also, I cannot make out where these errors come from Feb 5, 2015 at 9:53

2 Answers 2

5

I don't know what you are trying to achieve. Probably this?

enter image description here

Code:

\documentclass{article}
\usepackage{mathtools}


\begin{document}
\begin{equation*}
\begin{rcases}
\begin{rcases}
P(x_{10},&x_{20},\ldots ,x_{n0}) \\ 
&\vdots \\
P(x_{1,d+1},&x_{20},\ldots ,x_{n0})
\end{rcases}
\text{Some text}\\
\mskip150mu\vdots \\
\begin{rcases}
P(x_{10},&x_{2d},\ldots ,x_{n0}) \\ 
&\vdots \\
P(x_{1,d+1},&x_{2d},\ldots ,x_{n0})
\end{rcases}
\text{some text}
\end{rcases}
\text{some text}
\end{equation*}
\end{document} 

Note that rcases environment is already defined by mathtools and that you can't nest equation environments.

4
  • Yes, I want exactly this thing! Feb 5, 2015 at 9:57
  • (Almost) perfect! Two things though: on my system, rcases need to be defined. But most important is that the middle \vdots appears right, just before the big curly brace. Feb 5, 2015 at 10:06
  • @SotirisKal. If you are loading mathtools, rcases is defined unless you have a very old version. In this case please update your package. About the middle \vdots modify the value in \mskip150mu to your needs. Feb 5, 2015 at 10:10
  • You're right! My version is too old. Thanks! Feb 5, 2015 at 10:13
4

A slight improvement with the alignedat environment and the \vdotswithin command, from mathtools:

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\[ \begin{rcases}
\begin{rcases}
\begin{alignedat}{2}
P(x_{10}&,x_{20}& ,\ldots ,x_{n0}) \\[-1.5ex]
&\vdotswithin{x_20,}&
\\[-1.25ex]
P(x_{1,d+1}&, x_{20}& ,\ldots ,x_{n0})
\end{alignedat}
\end{rcases}
\text{Some text}\\
\mskip90mu\vdots \\
\begin{rcases}
\begin{alignedat}{2}
P(x_{10}&, x_{2d}&,\ldots ,x_{n0}) \\[-1.5ex]
 & \vdotswithin{x_{2d},}& \\[-1.25ex]
P(x_{1,d+1}&, x_{2d} &,\ldots ,x_{n0})
\end{alignedat}
\end{rcases}
\text{some other text}
\end{rcases}
\text{some text}
\]

\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 .