How to centering all elements in a table on laTex. I have tried \begin{center} method but it didn't work for me. Any other idea? Please help. Thanks in advance!
I don't know if I understood you're question correct or not, but here's an example of how to center the content inside a cell:
\documentclass{article}
\begin{document}
\begin{table}[h]
\begin{center}
\begin{tabular}{|c|c|}
\hline
Centered Text& Also Centered \\
\hline
Text& Also Centered \\
\hline
\end{tabular}
\caption{Caption}
\label{tab:my_label}
\end{center}
\end{table}
\end{document}
When you're using \begin{center}
and end{center}
the whole environment will be centered. The c
in the tabular environment specify that the content inside a cell should be centered.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.