My question is very similar to Vertical alignmnent in tabularx X column type and there seems to be many similar questions so hopefully I haven't missed the answer somewhere.

However, I would like to create a new column that is a copy of tabularx X column, with the difference being the new column Y is an m column compared to a p column (which X is by default as described in the docs).

\tabularxcolumn - The default denition of X is p{#1}.


So I would like to define a new column type like


and then convert the Y column type to m instead of p as it would currently be. That way I can leave X as it's original definition. If I use


Then X is changed to an m column which is not desired. I would need something like


But that doesn't work.

Thanks for any help,

  • Do you want/need both X and Y columns in a single table?
    – Werner
    Oct 11, 2018 at 18:00
  • Potentially, I would like to be able to have a p type X column and a m type X column if possible.
    – Prevost
    Oct 11, 2018 at 18:02

1 Answer 1


you need to patch in a second X-like columntype, this just duplicates the definition of X so you can separately specify \tabularxcolumn for X and \tabularxycolumn for Y

enter image description here


aa aaa aaa aaa aaa aaa&
bb bb bb bb bb bb bb bb bb bb bb bb bb bb b &
aa aaa
aa aaa aaa aaa aaa aaa&
bb bb bb bb bb bb bb bb bb bb bb bb bb bb b &
aa aaa
aa aaa aaa aaa aaa aaa&
bb bb bb bb bb bb bb bb bb bb bb bb bb bb b &
aa aaa
  • I thought it worked but I was looking at the PDF (which compiled fine) but there were errors. I am using > pdfLaTeX Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6500 64-bit). My original use was in knitr, but it failed there, and then I went to TexStudio, but it failed there as well. I started with a blank tex document and copied and pasted your code. Any thoughts? Thanks!
    – Prevost
    Oct 19, 2018 at 23:02
  • @Prevost sorry I had omitted another place to patch in the Y version of X columns, the original wasn't counting Y columns in its count of the number of active X columns. code and result image updated Oct 20, 2018 at 0:02
  • That's great compiles no errors! Could that code be theoretically created from just your docs?
    – Prevost
    Oct 20, 2018 at 0:19
  • @Prevost not from the user level documentation, it's definitely an extension of the design not just "using tabularx". Perhaps it could be derived from the documented code, although actually I only looked at the docstripped code with comments removed, perhaps that's why I missed one place the first time:-) Oct 20, 2018 at 8:12

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.