Tables – How to Wrap Text in Tables Using Multirow Package

horizontal alignmentmultirowtables

I searched a bit, but I could not find a reliable way to wrap text in tables with columns spanning more than one row. Any ideas on how to fit this table in the page?:

\documentclass[12pt,a4paper]{article}
\usepackage{booktabs}
\usepackage{multirow}

\begin{document}
    \begin{tabular}{cccc}
    \toprule
    & & \multicolumn{2}{c}{Logic of rule adoption} \\
    \cmidrule{3-4}
       & & Logic of consequences & Logic of appropriateness \\
    \midrule
    \multirow{2}{*}{Principal actor in rule adoption process} & EU-driven & External incentives model & Social learning model \\
      & CEE-driven & Lesson-drawing model & Lesson-drawing model \\
    \bottomrule
    \end{tabular}
 \end{document}

Best Answer

In answer to your question about wrapping text contained within a \multirow, you can put the contents <stuff> in a paragraph box \parbox{<len>}{<stuff>} where you specify the width <len>:

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{multirow}% http://ctan.org/pkg/multirow

\begin{document}
  \begin{tabular}{cccc}
    \toprule
    & & \multicolumn{2}{c}{Logic of rule adoption} \\
    \cmidrule{3-4}
    & & Logic of     & Logic of \\
    & & consequences & appropriateness \\
    \midrule
    \multirow{2}{*}{\parbox{4cm}{Principal actor in rule adoption process}} & EU-driven & External incentives model & Social learning model \\
    & CEE-driven & Lesson-drawing model & Lesson-drawing model \\
    \bottomrule
  \end{tabular}
\end{document}

However, this is still very wide in terms of your document specifications (12pt,a4paper). So, here's perhaps a better table layout and some margin adjustments (using geometry):

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage[margin=3cm]{geometry}% http://ctan.org/pkg/geometry

\begin{document}
\noindent\begin{tabular}{ccc}
    \toprule
    & \multicolumn{2}{c}{Logic of rule adoption} \\
    \cmidrule{2-3}
    \parbox{0.3\linewidth}{\centering Principal actor in rule adoption process} & 
    \parbox{0.3\linewidth}{\centering Logic of consequences} & 
    \parbox{0.3\linewidth}{\centering Logic of appropriateness} \\
    \midrule
    EU-driven & External incentives model & Social learning model \\
    CEE-driven & Lesson-drawing model & Lesson-drawing model \\
    \bottomrule
  \end{tabular}
\end{document}

Note the \noindent to avoid a paragraph indent, otherwise it will push the table over to the right, over the text (right) margin.

Related Question