答案1
这是维基百科行列式页面上的代码:
\documentclass{minimal}
\usepackage[papersize={4.8cm, 2.6cm}, margin=0cm]{geometry}
\usepackage{tikz}
\pagestyle{empty}
\begin{document}
\raggedright
\begin{tikzpicture}[semithick]
\clip (-0.4, -0.3) rectangle (4.4, 2.3);
\foreach \vert in {1, 2, 3} {
\foreach \horz/\hnum in {1/1, 2/2, 3/3, 4/1, 5/2} {
\node (a\vert-\horz) at (\horz - 1, 3 - \vert) {$a_{\vert\hnum}$};
}
}
\draw
(a1-1) -- (a2-2) (a2-2) -- (a3-3)
(a1-2) -- (a2-3) (a2-3) -- (a3-4)
(a1-3) -- (a2-4) (a2-4) -- (a3-5);
\draw [densely dashed]
(a1-3) -- (a2-2) (a2-2) -- (a3-1)
(a1-4) -- (a2-3) (a2-3) -- (a3-2)
(a1-5) -- (a2-4) (a2-4) -- (a3-3);
\draw [thick, dotted] (2.5, -0.3) -- (2.5, 2.3);
\end{tikzpicture}
\end{document}