转载https://blog.csdn.net/Gentleman_Qin/article/details/79970563
1.基本格式
&(1,2)%第一行第一列和第二列 中间用
效果如下:
2.添加竖线和横线
documentclass{article}
begin{document}
begin{tabular}{|c|c|}% 通过添加 | 来表示是否需要绘制竖线
hline % 在表格最上方绘制横线
(1,1)&(1,2)
hline %在第一行和第二行之间绘制横线
(2,1)&(2,2)
hline % 在表格最下方绘制横线
end{tabular}
end{document}
效果如下:
3.设置每一列的单元格格式
documentclass{article}
begin{document}
begin{tabular}{|l|c|r|} %l(left)居左显示 r(right)居右显示 c居中显示
hline
Name&Steve&Bill
hline
Matlab&Mathmatica&Mapl