Graphics, Figures & Tables ⇒ Multicolumn/multirow tables
Multicolumn/multirow tables
I am new to Latex and having some problems making tables. I would like my table to look like the attached figure but the I don't get the multicolumn working at the headline 'Reinforcement'. Do anyone have suggestions?
Thanks in advice, best regards jimp.
Thanks in advice, best regards jimp.
- Attachments
-
- Table
- help.png (6.7 KiB) Viewed 20690 times
Last edited by jimp on Thu Aug 25, 2011 2:59 pm, edited 1 time in total.
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
Multicolumn/multirow tables
The multirow package allows to typeset entries spanning multiple rows (who knew?). For further details consult the package manual. Open a command line for instant access.
For entries spanning multiple columns use the \multicolumn command.
Best regards and welcome to the board
Thorsten
Code: Select all
texdoc multirow
Best regards and welcome to the board
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
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Multicolumn/multirow tables
Hi Jimp,
welcome to the board!
Have a look at Creating tables with LaTeX, there are examples for multicolumn and multirow tables together with an explanation of \multicolumn and \multirow.
Stefan
welcome to the board!
Have a look at Creating tables with LaTeX, there are examples for multicolumn and multirow tables together with an explanation of \multicolumn and \multirow.
Stefan
LaTeX.org admin
Multicolumn/multirow tables
Thanks for the tip but I'm in a bit hurry due a deadline on Friday and my !"#! mentor required my work done in LateX this monday. So I am going to ask if Im on the right way with this code =)
Code: Select all
\begin{table*}[h!]
\centering
\begin{tabular}{| c | c | c | c | c | c | c |}
\hline
\multicolumn{7}{| c |}{Reinforced beams} \\
\hline
Support length & Linear model & Non linear model & Loading plate & Support & \multicolumn{2}{| c |}{Reinforcement} & Total \\
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
\hline
\end{tabular}
\caption{Number of elements in each part of the reinforced beams.}
\label{table78}
\end{table*}
Multicolumn/multirow tables
Never mind! I managed to do it!
jimp wrote:Thanks for the tip but I'm in a bit hurry due a deadline on Friday and my !"#! mentor required my work done in LateX this monday. So I am going to ask if Im on the right way with this code =)
Code: Select all
\begin{table*}[h!] \centering \begin{tabular}{| c | c | c | c | c | c | c |} \hline \multicolumn{7}{| c |}{Reinforced beams} \\ \hline Support length & Linear model & Non linear model & Loading plate & Support & \multicolumn{2}{| c |}{Reinforcement} & Total \\ \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \hline \end{tabular} \caption{Number of elements in each part of the reinforced beams.} \label{table78} \end{table*}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Multicolumn/multirow tables
I would do it slightly different and devide some cells in the table header.
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[tableposition=top]{caption}
\usepackage{multirow}
\begin{document}
\begin{table}[!ht]
\caption{Beam model reinforcement (115x630)}\label{tab:bemore}
\centering
\footnotesize
\begin{tabular}{|*8{c|}}\hline
Support & Linear & Non-linear & Loading & \multirow{2}{*}{Support} & \multicolumn{2}{c|}{Reinforcement} & Total \\\cline{6-8}
length (m) & Model & Model & plate & & Hex & Cohessive & \\\hline
0,06 & 13192 & 13192 & 840 & 245 & 750 & 720 & 28894 \\\hline
0,09 & & & & & & & \\\hline
0,12 & & & & & & & \\\hline
\end{tabular}
\end{table}
\end{document}
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
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Multicolumn/multirow tables
That's a start! Note , you have got 8 columns. So in the column definition (and in the first multicolumn) you need one more c cell to make it work:
Stefan
Code: Select all
\begin{table*}[h!]
\centering
\begin{tabular}{| c | c | c | c | c | c | c | c |}
\hline
\multicolumn{8}{| c |}{Reinforced beams} \\
\hline
Support length & Linear model & Non linear model & Loading plate & Support & \multicolumn{2}{c |}{Reinforcement} & Total \\
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
\hline
\end{tabular}
\caption{Number of elements in each part of the reinforced beams.}
\label{table78}
\end{table*}
LaTeX.org admin
Multicolumn/multirow tables
Thank you, Stefan_K. I noticed that just some time after my post.
localghost, thanks alot! Looks very good!
localghost, thanks alot! Looks very good!
localghost wrote:I would do it slightly different and devide some cells in the table header.Code: Select all
\documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage[tableposition=top]{caption} \usepackage{multirow} \begin{document} \begin{table}[!ht] \caption{Beam model reinforcement (115x630)}\label{tab:bemore} \centering \footnotesize \begin{tabular}{|*8{c|}}\hline Support & Linear & Non-linear & Loading & \multirow{2}{*}{Support} & \multicolumn{2}{c|}{Reinforcement} & Total \\\cline{6-8} length (m) & Model & Model & plate & & Hex & Cohessive & \\\hline 0,06 & 13192 & 13192 & 840 & 245 & 750 & 720 & 28894 \\\hline 0,09 & & & & & & & \\\hline 0,12 & & & & & & & \\\hline \end{tabular} \end{table} \end{document}