Graphics, Figures & Tablesmultirow | Text wrap in Tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
looreenzoo
Posts: 7
Joined: Tue Jan 04, 2011 4:49 pm

multirow | Text wrap in Tables

Post by looreenzoo »

Hi all,

I searched on the internet, but I could not find the way to wrap text in tables with columns spanning more than one row. Here is a MWE and thank you in advance!

Code: Select all

\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}

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

multirow | Text wrap in Tables

Post by localghost »

You can always try a \parbox of a certain width.


Thorsten
looreenzoo
Posts: 7
Joined: Tue Jan 04, 2011 4:49 pm

multirow | Text wrap in Tables

Post by looreenzoo »

Sorry for the late reply. If I put the text in a \parbox wide for instance 75 pt, it goes below the table.

Code: Select all

\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}{*}{\parbox{75 pt}{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}
By the way, I also posted the question here: http://tex.stackexchange.com/questions/ ... age-loaded
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

multirow | Text wrap in Tables

Post by localghost »

looreenzoo wrote:[…] By the way, I also posted the question here: http://tex.stackexchange.com/questions/ ... age-loaded
You got an answer there which you accepted. Do you want others here to continue searching for a solution? That's one reason why why I hate crosspostings.
Post Reply