我想为以下矩阵方程分配一个方程编号;我想要方程后面右边括号中的数字。
\documentclass{article}
\usepackage{rotating}
\usepackage{kbordermatrix}
\begin{document}
\[ C = \raisebox{-2\baselineskip}{%
\begin{tabular}[b]{c@{\hspace*{0.5em}}c}
& To node
\\
\begin{sideways}
From node
\end{sideways}
& \raisebox{0.5\height}%
{\(\kbordermatrix
{ & 1 & 2 & 3 & 4 & 5 \\
1 & 1 & x_1 & x_5 & 0 & 0 \\
2 & x_1 & 1 & x_2 & x_3 & x_4 \\
3 & x_5 & x_2 & 1 & x_6 & 0 \\
4 & 0 & x_3 & x_6 & 1 & x_7 \\
5 & 0 & x_4 & 0 & x_7 & 1
}
\)%
}
\end{tabular}}
\]
\end{document}
答案1
\documentclass{article}
\usepackage{rotating}
\usepackage{kbordermatrix}
\begin{document}
% \[
\begin{equation} % here
C = \raisebox{-2\baselineskip}{%
\begin{tabular}[b]{c@{\hspace*{0.5em}}c}
& To node
\\
\begin{sideways}
From node
\end{sideways}
& \raisebox{0.5\height}%
{\(\kbordermatrix
{ & 1 & 2 & 3 & 4 & 5 \\
1 & 1 & x_1 & x_5 & 0 & 0 \\
2 & x_1 & 1 & x_2 & x_3 & x_4 \\
3 & x_5 & x_2 & 1 & x_6 & 0 \\
4 & 0 & x_3 & x_6 & 1 & x_7 \\
5 & 0 & x_4 & 0 & x_7 & 1
}
\)%
}
\end{tabular}}
% \]
\end{equation}
\end{document}