Hello,
How do I centre the column headings in a table, please?
Thank you,
Richard
Oh, p.s. Do you think column headings should be centred? It's a very simple table containing text for my final year project report.
Graphics, Figures & Tables ⇒ Centre a table column heading?
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Centre a table column heading?
I wonder what keeps you from presenting the code for that table. It would make things easier to see.stinkinrich88 wrote:[...] Oh, p.s. Do you think column headings should be centred? It's a very simple table containing text for my final year project report.
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 52
- Joined: Sat Jun 07, 2008 11:56 am
Centre a table column heading?
Apologies, the code is below:
Code: Select all
\begin{tabular}{|l|l|p{4.8cm}|}
\hline
col1 & col2 & col3 \\ \hline
1 & Some text & A sentence in this cell. \\ \hline
2 & More text & \multirow{2}{4.8cm}{A sentence text describing two rows} \\ \cline{1-2}
3 & More text & \\ \hline
\end{tabular}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Centre a table column heading?
You can center the column headings with a trick.
Think about tables without vertical lines and take a look at the booktabs package.
Code: Select all
\begin{tabular}{|c|l|p{4.8cm}|} \hline
col1 & \multicolumn{1}{c|}{col2} & \multicolumn{1}{c|}{col3} \\ \hline
1 & Some text & A sentence in this cell. \\ \hline
2 & More text & \multirow{2}{4.8cm}{A sentence text describing two rows} \\ \cline{1-2}
3 & More text & \\ \hline
\end{tabular}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 52
- Joined: Sat Jun 07, 2008 11:56 am
Re: Centre a table column heading?
ahh neat-o, thanks! I tried something like this before but the vertical lines were a *tiny* bit out of line. Thank you very much, I'll definitely take a look at that package, too!