2

By default \multirow places the text in the center for vertical alignment.

How can I achieve top alignment with \multirow?

  • 1
    I'd say the entire purpose of \multirow is to center its argument vertically. If you want the argument to be placed in a specific cell (e.g., the top-most cell, just place the material in that cell directly (and avoid the \multirow overhead). If, for some reason, you must continue to use \multirow, simply use 1 as the number of rows the material has to span. – Mico Aug 4 '15 at 11:20
  • Please give us an example where this would make sense. – LaRiFaRi Aug 4 '15 at 11:21
  • You could use \raisebox, but you would need to either calculate or fudge the distance needed. – John Kormylo Aug 4 '15 at 11:31
  • @Mico nice suggestion, i'll try now. Thanks a lot! – Kristof Tak Aug 4 '15 at 11:53
2

The multirow package's main user macro is typically invoked as follows:

\multirow{<nrows>}{*}{<text>}

where <nrows> is an integer that states the number of rows that should be spanned and <text> is -- you guessed it -- the material that needs to be typeset. Note that the whole purpose of this macro is to vertically center the material across the number of rows indicated by <nrows>.

If you do not want to center the material vertically across several rows and, instead, place the material in the top row, you could either omit the \multirow machinery entirely and simply write

<text> 

in the applicable cell or, if for some reason you simply must continue to use \multirow, write

\multirow{1}{*}{<text>}

in the applicable cell.

I would recommend the former method. Less code clutter, for sure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.