LaTeX 阶梯型矩阵

原创
2019/12/02 17:14
阅读数 1.9K
\documentclass[b5paper]{article}
\usepackage{nicematrix}
\begin{document}
\[\begin{pNiceArray}{>{\strut}CCCC}%
	[create-extra-nodes,margin,%extra-margin=2pt,
	code-after = {\tikz\draw[name suffix = -large,
		blend mode = multiply]
		(1-1.north west)
		|- (2-2.north west)
		|- (3-3.north west)
		|- (4-4.north west)
		|- (4-4.south east) ; } ]
	A_{11} & A_{12} & A_{13} & A_{14} \\
	A_{21} & A_{22} & A_{23} & A_{24} \\
	A_{31} & A_{32} & A_{33} & A_{34} \\
	A_{41} & A_{42} & A_{43} & A_{44}
\end{pNiceArray}\]
\end{document}



\documentclass[b5paper]{article}
\usepackage{nicematrix}
\begin{document}
\[\begin{pNiceArray}{>{\strut}CCCCC}%
     [create-extra-nodes,margin,extra-margin=2pt,
     code-after={\tikz\draw[name suffix=-large,
     	blend mode = multiply]
     	(1-1.north west)
     	|- (2-2.north west)
     	|- (3-4.north west)
     	|- (3-5.south east);}]
1 & 0 & 2 & 0 & -3\\
0 & 1 & -1 & 0 & -4\\
0 & 0 & 0 & 1 & 1 \\
0 & 0 & 0 & 0 & 0
\end{pNiceArray}\]
\end{document}


\documentclass[b5paper]{article}
\usepackage{nicematrix}
\begin{document}
\[\begin{pNiceArray}{>{\strut}CCCCC}%
	[create-extra-nodes,margin,extra-margin=2pt,
	code-after={\tikz\draw[dashed,name suffix=-large,blend mode=multiply]
		(1-1.north west)
		|- (2-2.north west)
		|- (3-4.north west)
		|- (3-5.south east);}]
	1 & 0 & 2 & 0 & -3\\
	0 & 1 & -1 & 0 & -4\\
	0 & 0 & 0 & 1 & 1 \\
	0 & 0 & 0 & 0 & 0
\end{pNiceArray}\]
\end{document}

\documentclass[b5paper]{article}
\usepackage{nicematrix}
\usetikzlibrary{calc}
\begin{document}
\[\begin{pNiceArray}{>{\strut}CCCCC}%
	[create-extra-nodes,margin, % extra-margin=1pt,
	code-after={\tikz\draw[dashed,name suffix=-large,blend mode=multiply]
		($(1-1.north west)+(3pt,0pt)$)
		|- (2-2.north west)
		|- (3-4.north west)
		|- ($(3-5.south east)-(3pt,0pt)$);}]
	1 & 0 & 2 & 0 & -3\\
	0 & 1 & -1 & 0 & -4\\
	0 & 0 & 0 & 1 & 1 \\
	0 & 0 & 0 & 0 & 0
\end{pNiceArray}\]
\end{document}

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部