I want to typeset something like this:
I couldn't find a way to achieve this using array or blkarray. Any help?
I want to typeset something like this:
I couldn't find a way to achieve this using array or blkarray. Any help?
You can do this with the nicematrix package. Note that you must compile twice to get the result.
Note also that \OverBrace is a relatively new addition to nicematrix, so if you're using an old installation you'll have to update.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
[
m\begin{BNiceArray}{cccc|cc}[right-margin=.4em]
1 & 2 & 3 & 4 & 5 & 6 \
11 & 12 & 13 & 14 & 15 & 16 \
\CodeAfter
\SubMatrix[{1-3}{2-6}]
\OverBrace[shorten,yshift=3pt]{1-1}{2-2}{n}
\OverBrace[shorten,yshift=3pt]{1-3}{2-4}{r}
\OverBrace[shorten,yshift=3pt]{1-5}{2-6}{s}
\end{BNiceArray}n
]
\end{document}
Maybe something like this is what you are looking for:
\begin{array}{c}
& n & & r & & s & \\
m\,\big\lbrace & \overbrace{A} & \big[ & \overbrace{P} & \big\vert & \overbrace{Q} & \big] & \big\rbrace\,n
\end{array}
I think it could be made prettier (e.g. fixing some space widths and resizing the variables), but I think the overall idea should be clear.
\overbraces to have the same height, just put them in an own row of your array and leave the braces empty.
– TiMauzi
Apr 01 '22 at 13:33
overbraceist your friend, I think. – TiMauzi Apr 01 '22 at 10:56array, as well. – TiMauzi Apr 01 '22 at 11:05