LaTex--创建表格(三线表)
2023-02-15 本文已影响0人
请叫我大帅666
带线框表
\subsubsection{Tables}
\begin{table}
\caption{An example of DS}
\label{table}
\setlength{\tabcolsep}{4pt}
\begin{tabular}{lp{20pt}lp{20pt}lp{20pt}lp{20pt}lp{20pt}l}
\hline % 标题
$U$&
$1$&
$2$&
$3$&
4 \\
\hline
$ 1 $&
1& 0 & 1& 1 \\
$ 2 $&
0& 1 & 0& 0 \\
$ 3 $&
1& 1 & 0& 1 \\
$ 4 $&
1& 0 & 1& 0 \\
\hline
\end{tabular}
\label{tab1}
\end{table}
三线表(不带线框)
\subsubsection{Tables}
\begin{table}
\caption{An example of DS}
\label{table}
\setlength{\tabcolsep}{4pt}
\begin{tabular}{p{20pt}p{20pt}p{20pt}p{20pt}p{20pt}}
\hline % 标题
$U$&
$1$&
$2$&
$3$&
d \\
\hline
$ 1 $&
1& 0 & 1& 1 \\
$ 2 $&
0& 1 & 0& 0 \\
$ 3 $&
1& 1 & 0& 1 \\
$ 4 $&
1& 0 & 1& 0 \\
\hline
\end{tabular}
\label{tab1}
\end{table}