Latex控制三线表宽度且内容居中

我实现的效果如下:

重点解决两个问题:

1.宽度不能超过左侧栏宽度影响到右边;2.中间列要居中

解决方法是限制中间栏的宽度(这一列字最多,如果不限制就会写在一行变得特别长),使用的代码如下,第一个c代表第一列居中,第二个p给出第二列长度为4.5cm,p前面加入的语句代表居中,第三个c代表第三列居中,注意要在文章最前面导入array包\usepackage{array}

\begin{tabular}{c>{\centering\arraybackslash}p{4.5cm}c}

整个表格的latex代码如下:

\begin{table} % 表格开始  
\centering % 表格居中显示  
\caption{Simulation parameters} % 表头标题  
\label{table_example} % 表格标签,便于引用  
\begin{tabular}{c>{\centering\arraybackslash}p{4.5cm}c} % 定义三列表格  
% \begin{tabular}{p{2cm}cp{2cm}} 
\toprule  
Parameters & Symbol & Value \\ % 表头需要三个单元格,并用\\结束  
\midrule  
$v_{max}$ &  the maximum UAV flight speed & $ 50 $ m/s \\ % 每一行结束都需要\\   
$M_{UAV}$ & gross mass of UAV & 9.65kg \\ % 使用\times和^{}来输入乘法和上标  
$f_n$ & The computing capability of the UV & 0.5GHz \\  
$f_{UAV}$ & The computing capability of the UV & 4GHz \\
$f_{SAT}$ & The computing capability of the LEO satellite & 6GHz \\
$f_{BS}$ & The computing capability of the UV & 4GHz \\
$s$ &  the required CPU cycles per bit & 1000 cycles/bit \\  
$P$ &  transmission power of UV & 0.1W \\  
$PLoss$ & penetration loss & -20dBm  \\  
$t_p$ & propagation delay & 10ms  \\
$\theta^2$ & noise variance & -100dBm \\   
$B$ & transmission bandwidth & 1MHz \\   
$h_0^v$ & channel power gain at a reference distance of 1 m & $-50dB$ \\ 
$H$ & UAV flying fixed height & 50m \\  
$K$ & max episodes & 2000 \\ 
$T$ & time slots number & 40 \\ 
$\delta_t$ & slot time & 5s \\
$t_{fly}$ & flight time & 1s \\
\bottomrule  
\end{tabular}  
\end{table}

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值