tags:

views:

205

answers:

4

I have a table as shown in this figure:

alt text

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?

Thanks and regards!


EDIT:

I tried \linebreak,

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

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


EDIT:

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:

alt text

+1  A: 

\linebreak ? sometimes works for me in tables and sometimes doesn't.

Mica
Thanks, Mica! But it does not work.
Tim
i just set a table using tabular and a table environment with the book class and miktex, and \linebreak worked for me. :P it also cross compiled with texlive on debian.
Mica
+2  A: 

Try using a p column with \par to indicate line breaks.

\begin{table}  
\begin{tabular}{ | c | p{2cm} | }  
  \hline  
  \includegraphics[scale=0.45]{../0_1.eps} & 1.10\par 2.20\par 3.30\par 4.40 \\  
  \hline   
\end{tabular}  
\end{table}
Rob Hyndman
Thanks, Rob! But it makes no change.
Tim
Are you including the \par commands? It works for me.
Rob Hyndman
I forgot to use p{2cm}. But now I have it, the result is not compact as my intention is to reduce the size of the table.
Tim
So reduce \parskip. Inside the table environment, set \parskip=0cm and it will take out those vertical spaces.
Rob Hyndman
+1  A: 

You can use mathmode in the last cell: ${1.10 \atop 2.20 } \atop {3.30 \atop 4.40}$.

That will be nice and small...

If you want it bigger, cf. Typesetting fraction terms to be larger in an equation.

Charles Stewart
+2  A: 

Try

\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} 
Alexey Malistov