Graphics, Figures & Tableswrapping text in multirow

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
pegazik
Posts: 2
Joined: Fri May 08, 2009 2:24 pm

wrapping text in multirow

Post by pegazik »

Hi,

The code below is supposed to create a simple table with multirows. I would like to have a line break after each word in the first column. I tried to obtain this effect by forcing the column width to 3cm. Unfortunately it does not work, probably because of multirows statement. Anyone knows how to solve this problem? I would be thankful.

Code: Select all

\begin{table}[h]
\begin{center}
\begin{tabular}{p{3cm} | c | c}
                   & {\bf Subtrigger} & {\bf Condition}  \\
\hline\hline
\multirow{3}{*}{\bf Monitor Sample} & s0 & \\
                                    & s3 & \\
                                    & s9 & \\
\hline
\multirow{4}{*}{\bf Alternative Monitor Sample} & s82 & \\
                                                & s83 & \\
                                                & s87 & \\
                                                & s61 & \\


\end{tabular}
\end{center}
\caption{Subtrigger definitions used for monitoring s67}
\label{tab:sel:monitortrigger}
\end{table}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

pegazik
Posts: 2
Joined: Fri May 08, 2009 2:24 pm

Re: wrapping text in multirow

Post by pegazik »

OK, it looks like it was not so difficult in the end. I used the parbox statement and it worked.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

wrapping text in multirow

Post by Stefan Kottwitz »

Hi pegazik,

welcome to the board!
Though your problem is solved I've just a remark: I wouldn't use \begin{center} ... \end{center} inside a table environment, that would cause additional vertical space. I recommend to use \centering instead. Perhaps have a look at center vs. \centering.

Stefan
LaTeX.org admin
Post Reply