[Tex/LaTex] Adjusting column size in Latex table

columnstablestexmakerwidth

I am using the code below to get a simple table but I need to adjust the width of each column.

\begin{table}[H]
\centerline{
\begin{tabular}{|c|c|}
\hline
\textbf{Group} & \textbf{Count} \\ \hline
1 & 1030 \\ \hline
2 & 425 \\ \hline
3 & 274 \\ \hline
4 & 109 \\ \hline
\end{tabular}
}
\end{table}

I tried using the tabular* as shown below but I get a lot of errors

\begin{table}[H]
\centerline{
\begin{tabular*}{.5\linewidth}{@{\extracolsep{\fill}}{|c|c|}}
\hline
\textbf{Group} & \textbf{Count} \\ \hline
1 & 1030 \\ \hline
2 & 425 \\ \hline
3 & 274 \\ \hline
4 & 109 \\ \hline
\end{tabular*}
}
\end{table}

Best Answer

You can adjust the width of cokumns by using the p column type:

\begin{tabular}{p{2in}p{1in}}

The array package offers some controlled-width column types, as well, along with the ability to define your own column types.

Related Question