How to make the starred tabular
to center text:
\documentclass[varwidth]{standalone}
\begin{document}
\begin{tabular*}{\linewidth}{@{}c@{\extracolsep{\fill}}}
\hline
Text to be centered \\
\hline
\end{tabular*}
\end{document}
Result:
How is that possible to make the text centered?
\extracolsep{\fill}
used for? Try it without. Alsotabular*
might just extend the table rules but not increase the cell width.\extracolsep
is the documented interface to changing\tabskip
in LaTeX so it wasn't a bad guess even though it doesn't work. (Especially as I don't think any documented use works in this instance)