Chinaunix首页 | 论坛 | 博客
  • 博客访问: 280381
  • 博文数量: 55
  • 博客积分: 2535
  • 博客等级: 少校
  • 技术积分: 585
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-25 16:41
个人简介

Je pense donc je suis.

文章分类

全部博文(55)

文章存档

2014年(11)

2011年(3)

2010年(40)

2009年(1)

我的朋友

分类: LINUX

2010-05-06 09:10:54

在列格式里面使用>{\centering}m{宽度}就可以了,但是此时tabular环境要调用array宏包,并且换行不能使用\\实现,而需要\tabularnewline来换行。下列展示了如何实现一个三行两列的表格,并且cell width分别是2cm和6cm。
\documentclass{article}
\usepackage{array}   %tabular需要调用array包,以便实现指定列宽。
\begin{document}
\begin{tabular}{|>{\centering}m{2cm}|>{\centering}m{6cm}|}\hline
Title & Content \tabularnewline
\hline
No man is happy but by comparison  & He who knows himself best is the best \tabularnewline
\hline
This is a test to test the length of cell &lklljk \tabularnewline\hline
\end{tabular}
\end{document}
阅读(2527) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~