15

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?

1

1 Answer 1

21

The example in the tabularx documentation is

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

Then use X as usual.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .