6

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.

2
  • 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) Commented Oct 15, 2012 at 16:28
  • Thanks David. I thought that this feature was not allowed with tabularx, not noticing that I was making a typo. Commented Oct 16, 2012 at 1:00

1 Answer 1

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

0

You must log in to answer this question.

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