This code produces a table with three centered column:
\begin{table}[htbp]
\centering
\begin{tabularx}{\textwidth}{| c | c | c |}
\hline
Alpha & Beta & Gamma \\ \hline
0 & 2 & 4 \\ \hline
1 & 3 & 5 \\ \hline
\end{tabularx}
\end{table}
This code produces a full-width table with columns of equal width:
\begin{table}[htbp]
\centering
\begin{tabularx}{\textwidth}{| X | X | X |}
\hline
Alpha & Beta & Gamma \\ \hline
0 & 2 & 4 \\ \hline
1 & 3 & 5 \\ \hline
\end{tabularx}
\end{table}
I can't get how to produce full-width table, with centered header (~ first row) and columns of width |50%|25%|25%|
respectively?
Would be nice if I could define these styles somewhere at the beginning of the document, so that all further tables will be able to use it.
tabularx
, but for some reason they do it in a convoluted manner by combining two columns. Also no harm in asking, I was just being lazy to write an answer :)