Re: multirow woes (wrapped text)



Herbert Voss wrote:
Dan Bolser wrote:


Hi, I am using the multirow package to write a table describing 1:n relationships.


Unfortunatly, the text for my 'Name' column can get quite long, and is wrapped to a fixed column width. (First I was using array, but then simply used the width atribute of the multirow specification). If the text wraps into more lines than the multirow has rows (nrows), the text is wrapped onto the next block of my table.

This looks ugly and wrong. Any suggestions on how I can fix this? (Other than by hand).


do you really need multirow?

Herbert


\documentclass[a4]{article} \usepackage{array} \begin{document}

\begin{tabular}{|m{1em}|m{4cm}|m{1em}|}\hline
 W & Well, just goes to show what happens & w1\newline w2\\\hline
 X & when you try to be too clever        & x1\newline x2\\\hline
 Y & this group is fine                   & y1\newline y2\\\hline
 Z & me too                               & z1\newline z2\\\hline
\end{tabular}

\end{document}



After implementing your idea I have the following table format...


.... %% Set 'Name' column width \newlength{\nameCol} \setlength{\nameCol}{20em}

%% Set 'Fig' column width
\newlength{\figCol}
\setlength{\figCol}{3em}
....
\begin{longtable}{
rrl>{\raggedright\arraybackslash}m{\nameCol}rrrrrrm{\figCol}m{2em}m{3em}
}
....

Where the last two columns have zero to five \newlines in them (always the same number of newlines on a row. Is there any way to get all my cells top aligned?

by playing with p, b and m I can get them all middle aligned or all bottom aligned, but not all top aligned. Is there a trick I am missing?

The way the different \parbox[x]'s align in a row is quite confusing!

Thanks very much for the original idea,

Dan.




.