Latex-三线表(表格问题)

用Latex写文章时,写过的表格。

\begin{table}[H]%[htbp]
	\caption{Collapsed data of $\chi_1^x$ }
	\label{table2}
	\centering
	\begin{tabular}{lcccc}
		\toprule
		& \multicolumn{2}{c}{Origin data}
		&\multicolumn{2}{c}{Collapse data} \\
		\cmidrule{2-5}
		Lattice size & $\Delta x$&$\Delta y$& $\Delta x^{'}$&$\Delta y^{'}$ \\
		\midrule
		N=50&0.01&6000.1&1.001&3000.1 \\
		N=100&0.02&6000.2&1.002&3000.2\\
		N=200&0.03&6000.3&1.003&3000.3\\
		N=400&0.04&6000.4&1.004&3000.4 \\
		N=600&0.05&6000.5&1.005&3000.5 \\
		N=800&0.06&6000.6&1.006&3000.6 \\
		\bottomrule
	\end{tabular}
\end{table}

在这里插入图片描述

 \begin{table}[H]%[htbp]     
	\caption{Fitting coefficients for different lattice sizes }
	\label{table1}
	\centering
	\begin{tabular}{lccc}
		\toprule
		Lattice size &$\delta$ &$\Delta_0$ &$\Delta_{m1}$\\
		\midrule
		N=20&2.0E-4&1.2E-4&0.308\\
		N=30&3.0E-5&1.3E-5&0.308\\
		N=40&4.0E-6&1.4E-6&0.308\\
		N=60&6.0E-9&1.6E-9&0.308\\
		N=70&7.0E-11&1.7E-11&0.308 \\
		\bottomrule
	\end{tabular}
\end{table}

在这里插入图片描述
上面表格的第一行和最后一行是加粗的三线表格;
下面的表格是第一行及最后一行是双线的三线表格。

\begin{ruledtabular}
	\begin{table}[H]%[htbp]
		\caption{Collapsed data of $\chi_1^x$ }
		\label{table2}
		\centering
		\begin{tabular}{lcccc}
			& \multicolumn{2}{c}{Origin data}
			&\multicolumn{2}{c}{Collapse data} \\
			\cmidrule{2-5}
			Lattice size & $\Delta x$&$\Delta y$& $\Delta x^{'}$&$\Delta y^{'}$ \\
			\midrule
			N=50&0.01&6000.1&1.001&3000.1 \\
		    N=100&0.02&6000.2&1.002&3000.2\\
		    N=200&0.03&6000.3&1.003&3000.3\\
		    N=400&0.04&6000.4&1.004&3000.4 \\
	     	N=600&0.05&6000.5&1.005&3000.5 \\
		    N=800&0.06&6000.6&1.006&3000.6 \\
		\end{tabular}
	\end{table}
\end{ruledtabular}

在这里插入图片描述

\begin{ruledtabular}
	\begin{table}[H]%[htbp]
		\caption{Fitting coefficients for different lattice sizes }
		\label{table1}
		\centering
		\begin{tabular}{lccc}
			Lattice size &$\delta$ &$\Delta_0$ &$\Delta_{m1}$\\
			\midrule
			N=20&2.0E-4&1.2E-4&0.308\\
			N=30&3.0E-5&1.3E-5&0.308\\
			N=40&4.0E-6&1.4E-6&0.308\\
			N=60&6.0E-9&1.6E-9&0.308\\
			N=70&7.0E-11&1.7E-11&0.308 \\
		\end{tabular}
	\end{table}
\end{ruledtabular}

在这里插入图片描述

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
如果你的三线表内容较多,需要跨页显示,可以使用 `longtable` 宏包来实现。`longtable` 宏包提供了一个可以跨页的表格环境,可以在多个页面中显示完整的表格。 以下是一个示例代码,演示如何在 LaTeX 中创建跨页的三线表: ```latex \documentclass{article} \usepackage{longtable} \usepackage{booktabs} \begin{document} \begin{longtable}{ccc} \caption{示例跨页三线表} \\ \toprule 列1 & 列2 & 列3 \\ \midrule \endfirsthead \multicolumn{3}{c}{{\tablename\ \thetable{} 续上页}} \\ \toprule 列1 & 列2 & 列3 \\ \midrule \endhead \bottomrule \multicolumn{3}{r}{{续下页}} \\ \endfoot \bottomrule \endlastfoot 数据1 & 数据2 & 数据3 \\ 数据4 & 数据5 & 数据6 \\ % 这里可以继续添加更多数据行 \end{longtable} \end{document} ``` 在这个示例中,我们首先加载了 `longtable` 和 `booktabs` 宏包。然后,在 `longtable` 环境中使用 `tabular` 环境来创建表格,与之前的示例类似。不同之处在于,我们使用了 `\caption` 命令来添加表格标题,并在 `\\` 后面添加 `\toprule` 和 `\midrule` 命令来绘制顶部和中部的水平线。 在表格的内容部分,我们使用了 `\endfirsthead` 和 `\endhead` 命令来指定表的内容,`\endfoot` 命令来指定每页底部的内容,`\endlastfoot` 命令来指定最后一页底部的内容。通过这些命令,我们可以在跨页显示时保持表和底部的一致性。 你可以根据需要修改表格的列数和内容,并添加更多的数据行。希望这个示例对你有所帮助!如果你还有其他问题,请随时提问。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值