I am trying to do centering and text sizing in tabularx environment using the following definitions:


However, when I want to center "s" using the following command, I get an error:


Any ideas what might work? Thanks.

  • Try \newcolumntype{s}{>{\centering\arraybackslash\hsize=.25\hsize}X} – Jesse Mar 20 '14 at 13:48
  • sorry doesn't work for me :( – Sumit Mar 20 '14 at 13:52
  • Hmmmmm..., it works on my tabularx using |bs| specifier. – Jesse Mar 20 '14 at 13:56
  • @Sumit please always include a complete small document that shows the error. "doesn't work for me" doesn't allow anyone to help you. Every question should have an example starting \documentclass and ending \end{document} – David Carlisle Mar 20 '14 at 15:12

You have not supplied a document so this is untested but you have incorrect syntax here:


> takes a single argument and > and its argument must immediately precede the column specification or another > clause. So you need


or, if you prefer

| improve this answer | |

With package ragged2e:


which also allows hyphenation.

| improve this answer | |

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.