latex 表格如何精细控制行高,行距,行与行之间的距离

 

latex 表格如何精细控制行高,行距,行与行之间的距离

http://blog.csdn.net/robert_chen1988/article/details/52695496

标签: latex表格行高行间距
  4889人阅读  评论(0)  收藏  举报
  分类:

若是简单调整行距,则可以在插入表格前添加一行这样的命令:

\renewcommand\arraystretch{1.5}


若更加精细调整,各行间距可能不一样,之前在网上搜索,一直没有找到 latex 中控制表格行高的解决方案,最近几天使用latex 忽然找到了一个简单并且实用的方法:


使用表格线安装包,插入一个透明的表格线,通过控制表格线的上下距离来控制行高。

\usepackage{array}

\usepackage{booktabs}


使用表格时的命令:

\begin{tabular}

\specialrule{0em}{1pt}{1pt}

\end{tabular}


specialrule 命令第一个大括号控制表格线的粗细,若为0,则表格线透明,第二个大括号是表格线与上方内容的距离,第三个大括号是表格线与下方内容的距离,通过改变后两个大括号中的值来控制行高!


举例:

[plain]  view plain  copy
  1. \usepackage{array}  
  2. \usepackage{booktabs} %调整表格线与上下内容的间隔  
  3. \usepackage{multirow}  


[plain]  view plain  copy
  1. \begin{tabular}[b]{p{5cm}<{\raggedright}p{7cm}<{\raggedright}}  
  2. \multicolumn{2}{l}{\small{\textbf{Table 1}}}\\  
  3. \multicolumn{2}{l}{\small{Notations adopted in our paper}}\\\specialrule{0.05em}{3pt}{3pt}  
  4. Notations  &Description\\\specialrule{0.05em}{3pt}{3pt}  
  5. Indices  &\\  
  6. \specialrule{0em}{1pt}{1pt}  
  7. $t$        &Period index, $t=1,2,\dots,T$\\  
  8. \specialrule{0em}{3pt}{3pt}  
  9. Problem parameters  &\\  
  10. \specialrule{0em}{1pt}{1pt}  
  11. $B_{0}$  &Initial capital quantity\\  
  12. $P$      &Product price\\  
  13. $a$      &Fixed production launching cost\\  
  14. $v$      &Unit variable production cost\\  
  15. $h$      &Unit inventory cost\\  
  16. $\pi$    &Unit penalty cost for back orders\\  
  17. \specialrule{0em}{3pt}{3pt}  
  18. Random variables  &\\  
  19. \specialrule{0em}{1pt}{1pt}  
  20. \multirow{3}*{$d_{t}$}      &Random demand at period $t$ with probability density function $f_{t}(d_{t})$,cumulative distribution function $F_{t}(d_{t})$, mean $\mu_{t}$, variance $\sigma^{2}$\\  
  21. \specialrule{0em}{3pt}{3pt}  
  22. State variables  &\\  
  23. \specialrule{0em}{1pt}{1pt}  
  24. $I_{t}$      &Inventory at the end of period $t$\\  
  25. $B_{t}$      &Capital quantity at the end of period $t$\\  
  26. \specialrule{0em}{3pt}{3pt}  
  27. Decision variables  &\\  
  28. \specialrule{0em}{1pt}{1pt}  
  29. $Q_{t}$ &order quantity at the beginning of period $t$\\  
  30. \specialrule{0.05em}{2pt}{0pt}  
  31. \end{tabular}  


显示效果:

  • 4
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值