4

I want to vertically stack 3 elements (regular line width), braced with { (\left{) (equally aligned, so the 2nd element is aligned with the tip of the {), then draw an arrow out of the third element which will be at the center of another { brace containing 3 equally spaced lines. After that draw a } brace covering the two first elements of the first stacking and the first element of the nested stacking and nothing else.

Something like this

   {a     }
   {      }
...{b     }...
   {    {d}
   {c → {e
        {f

where vertically stacked '{' and '}' represent a big brace. I've tried using

\left\{
\begin{array}{l}
    \text{a} \\
    \text{b} \\
    \text{c} \left\{
    \begin{array}{l}
        \text{d}\\
        \text{e}\\
        \text{f}
    \end{array}
    \right.
\end{array}
\right.

for the first part but that ends up leaving more space for c thus making b not be vertically centered (so to not overlap). I also am not sure how to make the rightmost brace, tried some things with arrays and vphantom but couldn't get much to work

2
  • @JasperHabicht just a character there, nothing too relevant
    – Blendy
    Commented Jun 17 at 19:36
  • Please extend your code snippet to a complete compilable code example (this is a general requirement on this site as is makes it easier for others to understand your intentions and attempts). Commented Jun 17 at 20:06

1 Answer 1

4

Welcome to TeX.SX! There are surely more elegant ways to do this, but maybe like this:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
x\(\left\{
\begin{array}{@{}l@{}}
    \text{a} \\[1em]
    \text{b} \\[1em]
    \text{c}\rightarrow\smash{\left\{
    \begin{array}{@{}l@{}}
        \text{d} \\
        \text{e} \\
        \text{f}
    \end{array}
    \right.}
\end{array}
\right\}\)x
\end{document}

output of above code


For more flexibility, for example if the right brace should already end at the "e", you can use the nicematrix package and add empty lines between "a" and "b" as well as between "b" and "c":

\documentclass{article}
\usepackage{amsmath}
\usepackage{nicematrix}

\begin{document}
x\(
\begin{NiceArray}{ll}[right-margin=1em, left-margin=1em, baseline=3]
    \text{a} &          \\
             &          \\
    \text{b} &          \\
             & \text{d} \\
    \text{c} \rightarrow 
             & \text{e} \\
             & \text{f} \\
\CodeAfter
    \SubMatrix{\lbrace}{1-1}{5-1}{.}
    \SubMatrix{.}{1-2}{4-2}{\rbrace}
    \SubMatrix{\lbrace}{4-2}{6-2}{.}
\end{NiceArray}\)x
\end{document}

output of above code


And for even more flexibility, you can use TikZ for drawing the braces which even allows you to shift the tip of the right brace:

\documentclass{article}
\usepackage{amsmath}
\usepackage{nicematrix, tikz}
\usetikzlibrary{decorations.pathreplacing, calligraphy}

\begin{document}
x\(
\begin{NiceArray}{ll}[right-margin=1em, left-margin=1em, baseline=3]
    \text{a} &          \\
             &          \\
    \text{b} &          \\
             & \text{d} \\
    \text{c} \rightarrow 
             & \text{e} \\
             & \text{f} \\
\CodeAfter
    \begin{tikzpicture}
        \draw[decorate, very thick, decoration={calligraphic brace, amplitude=3.5, mirror}] 
            ([xshift=-.75ex]1-|1) -- ([xshift=-.75ex]6-|1);
        \draw[decorate, very thick, decoration={calligraphic brace, amplitude=3.5, aspect=0.625}] 
            ([xshift=.75ex]1-|3) -- ([xshift=.75ex]5-|3);
        \draw[decorate, very thick, decoration={calligraphic brace, amplitude=3.5, mirror}] 
            ([xshift=.5ex]4-|2) -- ([xshift=.5ex]7-|2);
    \end{tikzpicture}
\end{NiceArray}\)x
\end{document}

output of above code

6
  • Sorry, in the representation of my original question there was a brace after the e, the rightmost brace isn't supposed to cover the e
    – Blendy
    Commented Jun 17 at 19:38
  • @Blendy I see, but then it is probably better to use empty lines between a and b and b and c .. Commented Jun 17 at 19:40
  • even then, how would the rightmost brace not cover the e? if the rightmost and leftmost braces are equally tall and e is vertically aligned with c (as it's meant to be) then the rightmost brace will cover e as the leftmost covers c, unless I understood you wrong
    – Blendy
    Commented Jun 17 at 19:43
  • @Blendy See my edit using a different approach and the nicematrix package. But if you want the tip of the right brace end at the height of the x ... then, you need to use TikZ. Commented Jun 17 at 19:44
  • 1
    Peraphs it is more simple using cascade package.
    – Sebastiano
    Commented Jun 17 at 23:07

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.