![多行连线](https://linux22.com/image/425944/%E5%A4%9A%E8%A1%8C%E8%BF%9E%E7%BA%BF.png)
答案1
以下是使用版本arydshln
:
\documentclass{article}
\usepackage{arydshln}
\begin{document}
\begin{tabular}{llllll}
A: & 0 & \multicolumn{1}{l:}{1} & 1 & 0 & 0 \\
B: & 0 & \multicolumn{1}{l:}{1} & 0 & 1 & 0 \\
\cdashline{4-4}
C: & 1 & 1 & \multicolumn{1}{l:}{0} & 0 & 1 \\
\cdashline{4-4}
D: & 1 & \multicolumn{1}{l:}{0} & 0 & 1 & 0 \\
\cdashline{4-4}
E: & 1 & 1 & \multicolumn{1}{l:}{1} & 0 & 1 \\
\end{tabular}
\bigskip
\setlength{\dashlinedash}{2pt}
\setlength{\dashlinegap}{0.5pt}
\begin{tabular}{llllll}
A: & 0 & \multicolumn{1}{l:}{1} & 1 & 0 & 0 \\
B: & 0 & \multicolumn{1}{l:}{1} & 0 & 1 & 0 \\
\cdashline{4-4}
C: & 1 & 1 & \multicolumn{1}{l:}{0} & 0 & 1 \\
\cdashline{4-4}
D: & 1 & \multicolumn{1}{l:}{0} & 0 & 1 & 0 \\
\cdashline{4-4}
E: & 1 & 1 & \multicolumn{1}{l:}{1} & 0 & 1 \\
\end{tabular}
\bigskip
\setlength{\dashlinedash}{1pt}
\setlength{\dashlinegap}{1pt}
\begin{tabular}{llllll}
A: & 0 & \multicolumn{1}{l:}{1} & 1 & 0 & 0 \\
B: & 0 & \multicolumn{1}{l:}{1} & 0 & 1 & 0 \\
\cdashline{4-4}
C: & 1 & 1 & \multicolumn{1}{l:}{0} & 0 & 1 \\
\cdashline{4-4}
D: & 1 & \multicolumn{1}{l:}{0} & 0 & 1 & 0 \\
\cdashline{4-4}
E: & 1 & 1 & \multicolumn{1}{l:}{1} & 0 & 1 \\
\end{tabular}
\end{document}
答案2
一个选项是使用NiceTabular
来自nicematrix
包的。
\documentclass{article}
\usepackage{tikz}
\usepackage{nicematrix}
\begin{document}
\begin{NiceTabular}{lccccc}
A: & 0 & 0 & 1 & 0 & 0 \\
B: & 0 & 1 & 0 & 1 & 0 \\
C: & 1 & 1 & 0 & 0 & 1 \\
D: & 1 & 0 & 0 & 1 & 0 \\
E: & 1 & 1 & 1 & 0 & 1 \\
\CodeAfter
\tikz \draw [dashed] (1-|4) -- ([yshift=0.2ex]3-|4) -| ([yshift=0.2ex]4-|5) -| (6-|4);
\end{NiceTabular}
\end{document}