![agregue un superíndice a la llave `\matrix (m) [tabla]` en tikzpicture](https://rvso.com/image/472796/agregue%20un%20super%C3%ADndice%20a%20la%20llave%20%60%5Cmatrix%20(m)%20%5Btabla%5D%60%20en%20tikzpicture.png)
Me gustaría agregar un superíndice a una llave existente en un archivo \matrix (m) [table]
. Esto denotará la transpuesta. Necesito decorar la abrazadera para preservar el espacio con otra \matrix (m) [table]
.
Mi matriz y mi intento están dados por
\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}
pero la transpuesta sólo termina en el medio de la matriz, sin decorar la llave derecha de la matriz. ¿Existe una buena manera de hacer esto mientras se sigue usando \matrix (m) [table]
?
Respuesta1
Podrías usar algo como \node[anchor=west, xshift=0.67em] at (m-1-1.north east) {$\top$};
, pero en realidad también podrías simplemente reemplazar el delimitador derecho (lo que también representaría el superíndice en el tamaño de fuente correcto):
\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}