我想在我的矩阵中画一条虚线,但使用 \Blocks 似乎会阻止线到达矩阵的末端。请参阅下面的输出。
Mat_\B(p) = J_{\dim F} = \begin{pNiceMatrix}[last-col]
\Block[borders={right, bottom}]{3-3}{}1 & & & \Block[borders={bottom}]{3-1}{0}\\
& \Ddots[line-style=standard] & \\
\Cdots[line-style=dashed]& & 1 & \Cdots[line-style=dashed] & \leftarrow \dim F\\
\Block[borders={right}]{1-3}{0} & & & 0
\end{pNiceMatrix}
答案1
您可以使用键shorten-start
和shorten-end
负值。
\documentclass{article}
\usepackage{nicematrix,tikz}
\def\B{\mathcal{B}}
\newcolumntype{I}{!{\vrule}}
\begin{document}
$\operatorname{Mat}_\B(p) = J_{\dim F} =
\begin{pNiceArray}[last-col]{cccIc}
1 & & \\
& \Ddots & & 0 \\
\Cdots[line-style=dashed,shorten-start=-2.2mm] & & 1 & \Cdots[line-style=dashed,shorten-end=-2mm] & \leftarrow \dim F \\
\Hline
& & & 0
\end{pNiceArray}$
\end{document}