1

I'm having a really hard time doing what I thought would be simple.

I have this permutation:

\pi=\left(\begin{array}{cccccccccccc}
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\
2 & 1 & 3 & 4 & 5 & 9 & 6 & 7 & 8  \\
\end{array}\right)

and I want the sequence 345 to have a brace labelled $\sigma$ and I need the sequence 678 to have the same thing.

Dai Bowen
  • 6,117

1 Answers1

2

You can use nicematrix, but

  1. the space occupied by the overbraces is not taken into account;
  2. we need a trick to move the parenthesis a bit farther from the matrix.

In order to fix point 1, a phantom tall enough is added. For 2, some explicit spacing. I guess you wanted 12 and 6789, in order to single out the disjoint cycles, otherwise it would make little sense.

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

\begin{document}

Some text to see whether the vertical spacing is good. Some more text in order to get more than one line. This should be enough. [ \pi=\left(;\begin{NiceArray}{*{9}{c}} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \ 2 & 1 & 3 & 4 & 5 & 9 & 6 & 7 & 8 \CodeAfter \OverBrace[shorten,yshift=1pt]{1-1}{2-2}{\sigma} \OverBrace[shorten,yshift=1pt]{1-6}{2-9}{\tau} \end{NiceArray};\right) \smash[b]{\vphantom{% \begin{matrix}0\0\0\0\end{matrix} }} ] Some text to see whether the vertical spacing is good. Some more text in order to get more than one line.

\end{document}

enter image description here

egreg
  • 1,121,712