答案1
您可以tabularray
像这样使用该包:
\documentclass{article}
\usepackage{tabularray}
\UseTblrLibrary{amsmath}
\begin{document}
\begin{equation}
\text{Trans}_{z_{n-1}}(d_n) =
\begin{+bmatrix}[
hline{Y} = {solid},
vline{Y} = {solid}
]
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0\\
0 & 0 & 1 & d_{n}\\
0 & 0 & 0 & 1
\end{+bmatrix}
\end{equation}
\end{document}
答案2
答案3
\documentclass[twocolumn]{ltxdoc}
\usepackage{amsmath}
\usepackage{lipsum}
\begin{document}
\begin{equation}
Trans_{z_{n-1}}(d_n) = \left[\begin{array}{ccc@{\enskip\vrule\enskip}c}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0\\
0 & 0 & 1 & d_{n}\\
\hline
0 & 0 & 0 & 1
\end{array}\right]
\end{equation}
\end{document}