14

I'd like to create a new column type which works exactly like a X column from tabularx but that also has the text vertically centered. I tried with the newcolumntype command but I can't figure out where to put the second column type? Example:

\newcolumntype{n}{>{\centering\arraybackslash}X}

Where should I put the mto specify that the cells content should be vertically centered?

20

The example in the tabularx documentation is

\renewcommand{\tabularxcolumn}[1]{>{\small}m{#1}}

Then use X as usual.

  • but is it possible with the newcolumntype command? – franz May 7 '13 at 16:52
  • 1
    @franz no, you can't turn a p column into an m column with \newcolumntype. – David Carlisle May 7 '13 at 16:54
  • 1
    In what way does this Q&A differ from tex.stackexchange.com/a/105671/27721 ? – nutty about natty Jul 6 '13 at 6:17
  • @nuttyaboutnatty The other question gives a working example – beldaz May 8 '17 at 11:13

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.