有人能看到如何修复这个问题,使它同时适用于行和列吗?
我在这里尝试过:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[\begin{bmatrix}
d_{11}\makebox(-10,0){\rule[-13.5ex]{01.4pt}{3\normalbaselineskip}}
& d_{12} & d_{13} \makebox(-15,0){\rule[1.5ex]{3\normalbaselineskip}{0.4pt}} \\
d_{21} & d_{22} & d_{23} \\
d_{31} & d_{32} & d_{33}
\end{bmatrix}\]
\end{document}
答案1
您可以使用nicematrix
包与 Ti 结合使用钾Z:
\documentclass{article}
\usepackage{nicematrix, tikz}
\begin{document}
\[\renewcommand{\arraystretch}{1.2}\begin{bNiceMatrix}
d_{11} & d_{12} & d_{13} \\
d_{21} & d_{22} & d_{23} \\
d_{31} & d_{32} & d_{33}
\CodeAfter
\begin{tikzpicture}
\node[circle, draw=red, inner sep=6pt] (circle) at (1-2) {};
\draw[red] (circle) -- (1-1.west);
\draw[red] (circle) -- (1-3.east);
\draw[red] (circle) -- (3-2.south);
\end{tikzpicture}
\end{bNiceMatrix}\]
\end{document}