# How can I horizontally align text in a multirow element?

In the tabular environment, horizontal alignment is traditionally achieved using such arguments as l, c, and r for the table spec. However, when \multirow (from package multirow) is used, the chosen alignment seems to no longer apply. This example

\documentclass{standalone}
\usepackage{multirow}

\begin{document}
\begin{tabular}{|r|p{5cm}|}
\multirow{2}{2.3cm}{text1 text1 text1} & text2 \\
& text3 \\
& text4 \\
\end{tabular}
\end{document}


produces

The problem is that "text1" is left-aligned despite the fact that the first column was created using an 'r' argument to tabular. How can I specify the alignment of the text in the multirow element? For example, how could I right-align or center it instead?

If you specify a width in \multirow, it is essentially a p column, so you specify alignment in the same way:

\documentclass{standalone}
\usepackage{multirow}

\begin{document}
\begin{tabular}{|r|p{5cm}|}
\multirow{2}{2.3cm}{\raggedleft text1 text1 text1} & text2 \\
& text3 \\
& text4 \\
\end{tabular}
\end{document}

• What do you mean by "the same way"? – Cerran Feb 28 '15 at 22:39
• @Cerran I mean without multirow or any other package, if you want to align text in a p column or \parbox you use \centering, \raggedright, or \raggedleft. multirow works just like those standard latex constructs. – David Carlisle Feb 28 '15 at 22:46