tikzpicture の `\matrix (m) [table]` 括弧に上付き文字を追加する

tikzpicture の `\matrix (m) [table]` 括弧に上付き文字を追加する

内の既存の中括弧に上付き文字を追加したいと思います\matrix (m) [table]。これは転置を示します。別の との間隔を維持するために中括弧を装飾する必要があります\matrix (m) [table]

私のマトリックスと試みは次のように表される。

\documentclass{article}
%%% tikz
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations.text,decorations.pathreplacing,matrix,calc,positioning}
\usetikzlibrary{calligraphy}% AFTER decorations.text
\tikzset{ 
    table/.style={
        matrix of math nodes,
        row sep=-\pgflinewidth,
        column sep=-\pgflinewidth,
        nodes={rectangle,text width=3em,align=center},
        text depth=1.25ex,
        text height=2.5ex,
        nodes in empty cells,
        left delimiter=[,
        right delimiter={]},
        ampersand replacement=\&
    }
}
\newcommand*{\connectorH}[4][]{
  \draw[#1] (#3) -| ($(#3) !#2! (#4)$) |- (#4);% https://hugoideler.com/wp-content/uploads/2013/01/connector.tex
}

\begin{document}
\begin{figure}
  \centering
  \begin{tikzpicture}[baseline,decoration=brace]
    \matrix (m) [table] {
      %1     %2     %3     %4       %5    %6        %7
      A_{1,:}^\top\\
      A_{2,:}^\top\\
    };
    \node at (m-1-1.north east) {$\qquad\quad{\top}$};
\end{tikzpicture}
\end{figure}
\end{document}

しかし、転置は行列の中央でのみ終了し、行列の右括弧は装飾されません。 を使用しながらこれを行う良い方法はありますか\matrix (m) [table]?

答え1

のようなものを使用することもできます\node[anchor=west, xshift=0.67em] at (m-1-1.north east) {$\top$};が、実際には右側の区切り文字を置き換えるだけでもかまいません (これにより、上付き文字も正しいフォント サイズで表示されます)。

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix}
\tikzset{ 
    table/.style={
        matrix of math nodes,
        row sep=-\pgflinewidth,
        column sep=-\pgflinewidth,
        nodes={
            text width=3em,
            align=center
        },
        text depth=1.25ex,
        text height=2.5ex,
        nodes in empty cells,
        left delimiter={[},
        right delimiter={]},
        ampersand replacement=\&
    }
}

\begin{document}
  \begin{tikzpicture}
    \matrix (m) [table, right delimiter={]^{\top}}] {
      A_{1,:}^{\top} \\
      A_{2,:}^{\top} \\
    };
  \end{tikzpicture}
\end{document}

ここに画像の説明を入力してください

関連情報