I am trying to join the rows of table that contains parboxes and figures, but multirow doesn't seem to work. Could someone please help me? Below is a minimum working example. Thanks, Jorge.
UPDATE1: Note that I really need the extra vertical space above Fig. B (that's why I embed it in a \parbox).
UPDATE2: It seems the real problem is that \tabular or \multirow are unable to properly take into account the height of the tallest cell when it is defined by a \parbox. I have modified my example to show the problem.
NEW MINIMUM WORKING EXAMPLE:
\documentclass{article}
\usepackage{graphbox,graphicx,multirow,multicol,geometry,array}
\begin{document}
This works:\\
\begin{tabular}{|l|l|r@{}|}
\hline
blah & blah & \multirow{4}{*}{\fbox{Text}}\\
\hline
blah & blah & \\
\hline
blah & blah & \\
\hline
blah & blah & \\
\hline
\end{tabular}
\vspace{1cm}
This doesn't work:\\
\begin{tabular}{|l|l|r@{}|}
\hline
blah & blah & \multirow{4}{*}{\fbox{\parbox[b][3cm][b]{1cm}{Text}}}\\
\hline
blah & blah & \\
\hline
blah & blah & \\
\hline
blah & blah & \\
\hline
\end{tabular}
\end{document}
OUTPUT:
OLD MINIMUM WORKING EXAMPLE:
\documentclass{article}
\usepackage{graphbox}
\usepackage{graphicx}
\usepackage{multirow}
\begin{document}
% All separate rows
\noindent{}I want to join the rows in the last column of this table (keeping the bottom vertical alignment, so that the bottom of fig. B is now aligned with the "Some other text" line):\\
\begin{tabular}{|l|l|r|}
\hline
\parbox[t][][t]{4cm}{Some text}
& \parbox[t][][t]{4cm}{
Some text\\
Some text\\
Some text\\
\\
\includegraphics[width=3cm]{example-image-A}
}
&
% I embed Fig. B in a parbox to create the artificial space above it!
% (Also, why it's not aligned to the right, as specified in the tabular options?)
\parbox[t][1cm][b]{5cm}{
\includegraphics[align=t,width=4cm,height=4cm]{example-image-B}
}
\\
\hline
\small{Some other text} & &\\
\hline
\end{tabular}
\vspace{1cm}
% Attempt to join rows in right-most column:
\noindent{}Using \emph{multirow} doesn't seem work:\\
\begin{tabular}{|l|l|r|}
\hline
\parbox[t][][t]{4cm}{Some text}
& \parbox[t][][t]{4cm}{
Some text\\
Some text\\
Some text\\
\\
\includegraphics[width=3cm]{example-image-A}
}
& \multirow{2}{*}{
% I embed Fig. B in a parbox to create the artificial space above it!
% (Also, why it's not aligned to the right, as specified in the tabular options?)
\parbox[t][1cm][b]{5cm}{
\includegraphics[align=t,width=4cm,height=4cm]{example-image-B}
}
}
\\
\hline
\small{Some other text} & &\\
\hline
\end{tabular}
\end{document}
UPDATE: @Bernard proposed a workaround by tweaking the height of a neighboring cell (see below), which suited my particular need. The original problem (multirow cell height adjustment with \parbox elements) remains unsolved, though.
\documentclass{article}
\usepackage{graphbox}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{geometry}
\usepackage{array}
\begin{document}
\setlength{\extrarowheight}{2pt}
\begin{tabular}{|l|l|r@{}|}
\hline
\parbox[t][][t]{4cm}{Some text}
& \parbox[t][][t]{4cm}{
Some text\\
Some text\\
Some text\\
\\
\includegraphics[width=3cm]{example-image-A}\\[1.5cm]
}
&
\\
\cline{1-2}
\small{Some other text} & & \multirow{-8.4}{*}{\includegraphics[align=b,width=4cm,height=4cm]{example-image-B}}\\
\hline
\end{tabular}
\end{document}
OUTPUT: