I'm pretty new to LaTeX and I've been trying to figure out a way to create a table where my table headers are centered but the rest of the table is not. I tried using the {\centering Blarg} commands, but they didn't work. Here is a minimal working example:
Code: Select all
\documentclass [12pt,letterpaper]{report}
\begin {document}
\begin{table}
\begin{center}
\begin{tabular}{|p{45mm} p{45mm} p{45mm}|}
\hline
\begingroup\centering Header 1\endgroup & \begingroup\centering Header 2\endgroup & \begingroup\centering Header 3\endgroup \\
Some random text here to fill the box & Some random text here to fill the box & Some random text here to fill the box \\
\hline
\end{tabular}
\end{center}
\end{table}
\end{document}
Code: Select all
\begin{center}
Blarg
\end{center}
Thanks!
-Tarun