[texhax] \multirow & horizontal centring

Ulrike Fischer news3 at nililand.de
Sat Dec 13 13:18:40 CET 2014


Am Thu, 11 Dec 2014 15:06:41 +0100 schrieb Andre Majorel:

> I'm having trouble with this. How do you centre horizontally the
> content of a \multirow ? It's "A1" in the example below :
> 
> \documentclass[a4paper, 11pt]{report}
> \usepackage{array}
> \usepackage{multirow}
> \begin{document}
> \begin{tabular}{|p{4cm}|>{\centering\arraybackslash}m{4cm}|>{\centering\arraybackslash}m{4cm}|}
> \hline
> \multirow{2}{*}{A1} & \multicolumn{2}{c|}{A2-3} \\
> \cline{2-3}
> & B2 & B3 \\
> \hline
> C1 & C2 & C3 \\
> \hline
> \end{tabular}
> \end{document}

If you set the width you can use \centering:

\multirow{2}{4cm}{\centering A1}

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



More information about the texhax mailing list