Graphics, Figures & Tables ⇒ Centre a table column heading?
-
- Posts: 52
- Joined: Sat Jun 07, 2008 11:56 am
Centre a table column heading?
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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- 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¹
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?
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?
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}
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 52
- Joined: Sat Jun 07, 2008 11:56 am