I have a table as shown in this figure:
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:
You can put multiple lines in a cell with pressing Alt + Enter keys simultaneously while entering texts. Pressing the Alt + Enter keys simultaneously helps you separate texts with different lines in one cell. With this shortcut key, you can split the cell contents into multiple lines at any position as you need.
Inserting a line break within a cell After you type each line, just press ALT-ENTER on your keyboard to insert a hard return. (If you're using the Mac version of Excel, it's CTRL-OPTION-ENTER or CTRL-COMMAND-ENTER.)
Split cellsIn the table, click the cell that you want to split. Click the Layout tab. In the Merge group, click Split Cells. In the Split Cells dialog, select the number of columns and rows that you want and then click OK.
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}
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}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With