[Tex/LaTex] Error when specifying width of column in table

beamertableswidth

\documentclass{beamer}
\begin{document}

\begin{frame}
\begin{table}
\begin{tabular}{c{15mm} | c | c | c | c}
Television & Radio & Washer & Dryer & Computer \\
\end{tabular}
\end{table}
\end{frame}

\end{document}

I'm making a Beamer presentation, and I want to limit the width of some column so that the entry appears as two lines instead of making the column too wide. But when I specify the width as 15mm, I got

LaTeX Error: Illegal character in array arg.

How can I fix it?

Best Answer

Note that the word "Computer" takes up almost as much space as does the word "Television". Rather than fiddle with one column width at a time in an effort to make the table look OK, I'd use the tabularx environment to assure that all five columns have the same width.

\documentclass{beamer}
\usepackage{tabularx}  % for 'tabularx' environment
\useapackage{ragged2e} % for \Centering macro
\newcolumntype{C}{>{\Centering\arraybackslash}X}
\begin{document}
\begin{frame}
\begin{tabularx}{\textwidth}{| C | C | C | C | C |}
Television & Radio & Washer & Dryer & Computer \\
\end{tabularx}
\end{frame}
\end{document}
Related Question