latex 表格绘制

表格放在页面中间

  • 格式
\begin{table*}
	\centering
	\begin{tabular}{  % 表格列标题信息
	}
	
	% 表格
		
	\end{tabular}
\end{table*}
  • 原始表格
\begin{table}
	\begin{tabular}{ | c | c | c | c |}
		\hline
		Day 	& Min Temp 	& Max Temp	 & title \\ 
		\hline
		Monday 	& 11C		& 22C		 & A  \\ 
		\hline 
		Tuesday & 9C 		& 19C		 & B  \\ 
		\hline 
	\end{tabular}
\end{table}}

在这里插入图片描述

  • 表格放在页面中间(或者是双栏页面)
\begin{table*}
	\centering
	\begin{tabular}{ | c | c | l | r |}
		\hline
		Day 	& Min Temp 	& Max Temp	 & title \\ 
		\hline
		Monday 	& 11C		& 22C		 & A  \\ 
		\hline 
		Tuesday & 9C 		& 19C		 & B  \\ 
		\hline 
	\end{tabular}
\end{table*}

表格中,列格式对齐

表格的列中,有某一行的属性是相同的
以下是页面居中
方式一

\begin{table*}
	\centering
	\begin{tabular}{c| r | @{.} | l}
		
		Pi expression &   integer value &  fractional values	\\
	%	\multicolumn{2}{c}{Value} \\
		\hline
		$\pi$ 					& 3		&1416 \\
		$\pi^{\pi}$ 		    & 36	&46 \\
		$(\pi^{\pi})^{\pi}$ 	& 80662	&7 \\
	\end{tabular}
\end{table*}

在这里插入图片描述

  • 方式二
\begin{table*} 	
	\centering
	\begin{tabular}{c r @{.} l}
		Pi expression &
		\multicolumn{2}{c}{Value} \\
		\hline
		$\pi$ 					& 3		&1416 \\
		$\pi^{\pi}$ 		    & 36	&46 \\
		$(\pi^{\pi})^{\pi}$ 	& 80662	&7 \\
	\end{tabular}
\end{table*}

在这里插入图片描述

一列需要使用多行

表格的一列需要使用多行:
方案1:
usepackage{multirow}
搜索一下multirow的用法

方案2:
\begin{tabular}{|p{宽度}|p{宽度}|}

\end{tabular}

多行合并,对应列不变

放在导言区部分,否则会报错

\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}%放在导言区 

然后使用&\tabincell{c}{}&就可以在表格中自动换行

	\begin{tabular}{|c|c|} 
	\hline 					% 横线
	A &                         the first line        \\ 
	\hline 
	B &  \tabincell{c}    {11\\ 22\\33}        \\ 
	\hline 
	\end{tabular} 

在这里插入图片描述

Latex 表格多行或者多列 - Yong_Luo的个人空间 - OSCHINA https://my.oschina.net/duluo180/blog/62685

三线图

\begin{table*}
	\centering
	\begin{tabular}{lrrrrrr}  
	\toprule
	Scenario  & $\delta$ (s) & Runtime (ms) \\
	\midrule
	Paris       			& 0.1 	 		& 13.65  				& 0.1  & 13.65  & 0.1  & 13.65      \\
	            			& 0.2  			& 0.01  				& 0.1  & 13.65  & 0.1  & 13.65       \\
	New York                & 0.1  			& 92.50  				& 0.1  & 13.65  & 0.1  & 13.65      \\
	Singapore   		    & 0.1 		    & 33.33   			    & 0.1  & 13.65  & 0.1  & 13.65     \\
	            			& 0.2  			& 23.01    			    & 0.1  & 13.65  & 0.1  & 13.65    \\
	\bottomrule
	\end{tabular}
	\caption{Booktabs table}
	\label{tab:booktabs}
\end{table*}

在这里插入图片描述

设置表格的大小

设置方法,在表格中加入

\setlength{\tabcolsep}{1.0mm}
\begin{table}[] 	
	\setlength{\tabcolsep}{1.0mm}{
	\begin{tabular}{|c|c|} 
		\hline 					% 横线
		A &                         the first line        \\ 
		\hline 
		B &  \tabincell{c}    {11\\ 22\\33}        \\ 
		\hline 
	\end{tabular} 
	}
\end{table}

(1条消息)Latex 表格过大(或过小)的调整方法_latex_wbl901的博客-CSDN博客
https://blog.csdn.net/wbl90/article/details/52597429/

latex调整表格table大小_涛声依旧e_新浪博客
http://blog.sina.com.cn/s/blog_821b37de0102y3xa.html

Latex表格太宽处理方法 (How to shorten Latex table length) - Jerry_Jin - 博客园

  • List item

https://www.cnblogs.com/jins-note/p/9513362.html

不太好用
(1条消息)Latex 表格过大(或过小)的调整方法_latex_wbl901的博客-CSDN博客
https://blog.csdn.net/wbl90/article/details/52597429/

命令解说

  • \hline % 横线

在线画图

Create LaTeX tables online
http://www.tablesgenerator.com/#

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值