5

This is obliquely related to this query, except that I would like to have a tabularx environment where the entire first column is in italics (or some other standard formatting). The following obviously does not work:

\documentclass{article}
\usepackage{array, tabularx}
\begin{document}
\begin{table}[htbp]
\begin{tabularx}{\linewidth}{>{\em}X{}<XX}
a & a & a \\
b & b & b
\end{tabularx} 
\end{table}
\end{document}

I do actually need tabularx since I expect the last column to contain quite long sentences.

  • 1
    answer already given but your code would have worked apart from {}< which should be omitted or should be <{} (Using \itshape is most likely more semantically correct than using \em but it would have worked) – David Carlisle Oct 15 '12 at 16:28
  • Thanks David. I thought that this feature was not allowed with tabularx, not noticing that I was making a typo. – tchakravarty Oct 16 '12 at 1:00
5

Using {>{\itshape\arraybackslash}XXX} works:

\documentclass{article}
\usepackage{array, tabularx}
\begin{document}
\begin{table}[htbp]
\begin{tabularx}{\linewidth}{>{\itshape\arraybackslash}XXX}
a & a & a \\
b & b & b
\end{tabularx}
\end{table}
\end{document}

enter image description here

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.