0

I want to create a kbordermatrix with an underbrace and some text below. I tried it with

\documentclass{scrartcl}
\usepackage{kbordermatrix}
\begin{document}
\[
\underbrace{
\kbordermatrix{ 
& 1 & 2  \\
1 & a & b \\
2 & c & d 
}}_{test}
\]
\end{document}

which gave me this output:

enter image description here

As you can see the underbrace also goes below the rowlabels since they are treated as an extra column. Is there a way of using an underbrace which is only below the actual matrix?

Bobyandbob
  • 4,899
  • 1
    Possible duplicate: https://tex.stackexchange.com/a/102463/124842, you could write ...2 & \tikzmark{lower1}c & d\tikzmark{lower2} ... . Or the last example of http://latex.org/know-how/508-latex-tricks-xv – Bobyandbob Nov 11 '17 at 17:09
  • @Bobyandbob Thx for your answer. I found the first thread you linked but the solution there is not working with kbordermatrices. The solution in the article of your second link however does. – Squeezelemma Nov 11 '17 at 17:18
  • 1link works also`\documentclass{article} \usepackage{array} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture,baseline=(#1.base)] \node (#1) {\strut};}

    \usepackage{kbordermatrix} \begin{document}

    [ \kbordermatrix{ & 1 & 2 \ 1 & a & b \ 2 & \tikzmark{lowerT1}c & d\tikzmark{lowerT2} } ]

    \begin{tikzpicture}[overlay, remember picture,decoration={brace,amplitude=5pt}] \draw[decorate,thick] (lowerT2.south) -- (lowerT1.south) node [midway,below=5pt] {Test}; \end{tikzpicture} \end{document}`

    – Bobyandbob Nov 11 '17 at 17:28
  • ... you have to compile twice. – Bobyandbob Nov 11 '17 at 17:28

0 Answers0