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

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

问题描述

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

I have a table as shown in this figure:

该表的LaTeX代码为:

The LaTeX code for the table is:

\begin{table}  
\begin{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?

我尝试了\ linebreak,

I tried \linebreak,

\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:

推荐答案

尝试

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

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

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