表格单元格中的多行 [英] Multiple lines in a cell of a table

查看:19
本文介绍了表格单元格中的多行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张如下图所示的表格:

I have a table as shown in this figure:

表格的 LaTeX 代码是:

The LaTeX code for the table is:

egin{table}  
egin{tabular}{ | c | c | }  
  hline  
  includegraphics[scale=0.45]{../0_1.eps} & 1.10 2.20 3.30 4.40 \  
  hline   
end{tabular}  
end{table}

我想让四个数字出现在第二个单元格内的不同行中,以减小其宽度.我想知道怎么做?

I would like to make the four numbers appear in different lines inside the second cell, in order to reduce its width. I wonder how to do it?

我试过换行符,

includegraphics[scale=0.45]{../0_1.eps} & 1.10 linebreak 2.20 linebreak 3.30 linebreak 4.40 \

但结果与之前相同,即没有 linebreak.

But the result is the same as before i.e. without linebreak.

我刚刚尝试了 Rob 的建议.但是结果并不紧凑,因为我的意图是减小表格的大小.见下图:

I just tried what Rob suggested. But the result is not compact, because my intention is to reduce the size of the table. See the figure below:

推荐答案

试试

egin{table}   
defaselinestretch {}selectfont %
% aselineskip = 14.4pt
elax %% Uncomment this if the result is not compact.
egin{tabular}{ | c | p{2cm} | }   
  hline   
  $vcenter{hbox{includegraphics[scale=0.45]{../0_1.eps}}$ & 
    $vcenter{strut 1.10par 2.20par 3.30par 4.40strut}$ \   
  hline    
end{tabular}   
end{table} 

这篇关于表格单元格中的多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆