【笔记】latex做表格

这里写自定义目录标题

	\begin{table}[width=.9\linewidth,cols=4,pos=h]
		\caption{This is a test caption. This is a test caption. This is a test
			caption. This is a test caption.}\label{tbl1}
		\begin{tabular*}{\tblwidth}{@{}LLLL@{} }
			\toprule
			Methods & Images & Type & Targets\\
			\midrule
			\multirow{3}{*}{Rectangular box} & \multirow{3}{*}{1655} & Rust & 6387 \\
			& & Others & 2003 \\
			& & Mid-late & 677 \\
			\bottomrule
		\end{tabular*}
	\end{table}

在这里插入图片描述
前面一定要加

			& & Others & 2003 \\
			& & Mid-late & 677 \\

不可以这样,会到前面去

			Others & 2003 \\
			Mid-late & 677 \\

在这里插入图片描述

表格换行,用这个搞定

在这里插入图片描述

\begin{table}[width=.9\linewidth,cols=6,pos=h]
	\caption{Attributes of the four datasets}\label{tbl1}
	\begin{tabular*}{\tblwidth}{@{}LLLLLL@{} }
		\toprule
		\makecell{Dataset\\Comb.} & \makecell{Train\\set}  & Valset & \makecell{Dataset\\Comb.} & \makecell{Train\\set} & \makecell{Val\\set} \\
		\midrule
		1 & \multicolumn{2}{c}{W} & 5 & W & \multirow{3}{*}{R+C} \\
		2 & \multicolumn{2}{c}{W+S} & 6 & W+S \\
		3 & \multicolumn{2}{c}{R+C} & 7 & W+S+R+C \\
		
		4 & \multicolumn{2}{c}{W+S+R+C}\\
		\bottomrule
	\end{tabular*}
\end{table}

用\cline,下一行与line的间距会显得很挤
在这里插入图片描述

用\cmidrule就好很多
在这里插入图片描述

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值