8

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?


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

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Tim
  • 1
  • 141
  • 372
  • 590

6 Answers6

8

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
  • 30,301
  • 7
  • 73
  • 85
7

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
  • 26,407
  • 13
  • 68
  • 88
3

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.

Community
  • 1
  • 1
Charles Stewart
  • 11,661
  • 4
  • 46
  • 85
3

I would look into using the multirow package. Details on spanning multiple columns/rows are here.

andyras
  • 15,542
  • 6
  • 55
  • 77
1

Minipage might accomplish this.

\begin{minipage}{3in}
% escape the weirdness of tabular with your own mini page
1.10 \\ 2.20 \\ 3.30 \\ 4.40
\end{minipage}

You may also want a \strut on the first and last lines, to prevent it abutting any tabular borders.

sudo rm -rf
  • 29,408
  • 19
  • 102
  • 161
Partly Cloudy
  • 6,508
  • 3
  • 27
  • 16
1

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

Mica
  • 18,501
  • 6
  • 46
  • 43
  • 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 Apr 22 '10 at 16:42