没有合适的资源?快使用搜索试试~ 我知道了~
首页Latex表格处理教程
Latex表格处理教程
需积分: 33 17 下载量 85 浏览量
更新于2023-07-07
收藏 128KB PDF 举报
这个教程给出了如何利用Latex创建复杂表格。尤其对于论文撰写有很大帮助。
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/2695951/bg1.jpg)
L
A
T
E
X Table Tricks
Adrian P. Robson
adrian.robson@northumbria.ac.uk
24
th
June, 2009
Contents
1 Standard Tables 2
2 Spacing 2
2.1 Row Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1.1 Arraystretch . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1.2 Extrarowheight . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.3 Bigstruts . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.4 Comparison of Methods . . . . . . . . . . . . . . . . . . . 4
2.2 Column Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Vertical Alignment and Text Wrapping 5
4 Ragged Right Alignment 5
4.1 Simple Command . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4.2 Column Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.3 Tabluary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.4 Comparison of Methods . . . . . . . . . . . . . . . . . . . . . . . 7
5 Multiple Rows 7
5.1 Multiple Rows with Text Wrapping . . . . . . . . . . . . . . . . . 8
5.2 Over Sized Spanning Rows . . . . . . . . . . . . . . . . . . . . . 9
6 Specifying Table Width 10
6.1 Tabularx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6.2 Tabulary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6.3 Comparison of Methods . . . . . . . . . . . . . . . . . . . . . . . 12
7 Larger Tables 12
7.1 Sideways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
7.2 Longtable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8 Footnotes in Tables 13
9 Professional Layout 13
1
![](https://csdnimg.cn/release/download_crawler_static/2695951/bg2.jpg)
1 Standard Tables
Tables are made in L
A
T
E
X using the tabular environment like this
\begin{tabular}{|l|l|l|}
\hline
\multicolumn{3}{|c|}{A Table}\\\hline
\hline
1,1 & 1,2 & 1,3\\\hline
2,1 & 2,2 & 2,3\\\hline
3,1 & 3,2 & 3,3\\\hline
\end{tabular}
A Table
1,1 1,2 1,3
2,1 2,2 2,3
3,1 3,2 3,3
For more information on basic tables consult a good text like The Not So Short
Introduction to L
A
T
E
X 2
ε
[9].
2 Spacing
2.1 Row Spacing
The standard row height is too small when \hline is used. There are three
ways of correcting this: modifying the arraystretch command, changing the
extrarowheight length, or using the bigstrut command.
2.1.1 Arraystretch
The crudest way to increase row spacing, which works without any addition
packages, is to increase the arraystretch ratio. This injects space above and
below all the rows’ text. It is done like this:
{
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{|c|l|}
\hline
a & Row 1 \\ \hline
b & Row 2 \\ \hline
c & Row 2 \\
d & Row 4 \\ \hline
\end{tabular}
}
The renewcommand and the table are enclosed in braces to limit the scope of
the redefinition. Its effect is to turn
a Row 1
b Row 2
c Row 3
d Row 4
into
a Row 1
b Row 2
c Row 3
d Row 4
and with a
bigger value
a Row 1
b Row 2
c Row 3
d Row 4
2
![](https://csdnimg.cn/release/download_crawler_static/2695951/bg3.jpg)
2.1.2 Extrarowheight
A more sophisticated approach is to used the array package [8] and change the
length \extrarowheight as follows:
\usepackage{array}
...
{
\setlength{\extrarowheight}{1.5pt}
\begin{tabular}{|l|l|}
\hline
a & Row 1 \\ \hline
b & Row 2 \\ \hline
c & Row 3 \\
d & Row 4 \\ \hline
\end{tabular}
}
This adds space only above the rows’ text, which with the correct value com-
pensates for the \hline commands. Its effect is to turn
a Row 1
b Row 2
c Row 3
d Row 4
into
a Row 1
b Row 2
c Row 3
d Row 4
and with a
bigger value
a Row 1
b Row 2
c Row 3
d Row 4
2.1.3 Bigstruts
The above methods apply the compensation to all rows, even if they do not
have \hline commands. A subtler alternative is to use the bigstrut package
[6] like this:
\usepackage{bigstrut}
...
\begin{tabular}{|l|l|}
\hline
a & Row 1 \bigstrut \\ \hline
b & Row 2 \bigstrut \\ \hline
c & Row 2 \bigstrut[t] \\
d & Row 4 \bigstrut[b] \\ \hline
\end{tabular}
which changes the basic table
a Row 1
b Row 2
c Row 3
d Row 4
into
a Row 1
b Row 2
c Row 2
d Row 4
3
剩余13页未读,继续阅读
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/default.jpg!1)
powerhawk
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
会员权益专享
最新资源
- 保险服务门店新年工作计划PPT.pptx
- 车辆安全工作计划PPT.pptx
- ipqc工作总结PPT.pptx
- 车间员工上半年工作总结PPT.pptx
- 保险公司员工的工作总结PPT.pptx
- 报价工作总结PPT.pptx
- 冲压车间实习工作总结PPT.pptx
- ktv周工作总结PPT.pptx
- 保育院总务工作计划PPT.pptx
- xx年度现代教育技术工作总结PPT.pptx
- 出纳的年终总结PPT.pptx
- 贝贝班班级工作计划PPT.pptx
- 变电值班员技术个人工作总结PPT.pptx
- 大学生读书活动策划书PPT.pptx
- 财务出纳月工作总结PPT.pptx
- 大学生“三支一扶”服务期满工作总结(2)PPT.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)