You can use the tabularx
package to insert a tabularx
that fits within the line (or 7in
, depending on your requirement) and \smash
the contents of your image to make it fit within your parameters vertically. Here's a quick example of what I mean:
\documentclass{article}
\usepackage{graphicx,tabularx}% http://ctan.org/pkg/{graphicx,tabularx}
\begin{document}
\noindent\begin{tabularx}{\linewidth}{lX}
a \\ b \\
c & \hfill
\smash{\raisebox{-.3\normalbaselineskip}{%
\includegraphics[height=3\normalbaselineskip]{example-image-a}}}
\end{tabularx}
\end{document}
\hfill
pushes the contents of the X
-column to the right (as it seems like you're after an r
-column, but it may not be necessary). The image height is forced to 3\normalbaselineskip
which makes it fit within 3 lines of the table. However, it's moved down slightly (.3\normalbaselineskip
) to accommodate for the fact that it's actually placed on the baseline, which doesn't center it vertically across the three rows. \smash
removes all vertical height, making it span more than one row (similar to what \multirow
from the multirow
package would do).
tabularx
is not necessary, but it may help in these situations, depending on your actual application/usage.
\documentclass{...}
and ending with\end{document}
.