[texhax] \multirow & horizontal centring
Andre Majorel
aym-xet at teaser.fr
Sat Dec 13 20:06:01 CET 2014
On 2014-12-13 13:18 +0100, Ulrike Fischer wrote:
> 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}
So that's what I was doing wrong ! \centering had no effect
because the width of the \multirow was "*".
Thank you.
--
André Majorel http://www.teaser.fr/~amajorel/
More information about the texhax
mailing list