# Long table headings with multicolumn and multirow

Hello, I am trying to make the above longtable (it has one more page), but I can't do the headings as the picture and the text alignment, can anyone help me please?

\begin{center}
\begin{longtable}{p{2.5cm} p{6cm} p{3cm} p{3cm} p{3cm}}
\hline \multicolumn{1}{c}{\textbf{Preventive Maintenance Treatment}} & \multicolumn{1}{c}{\textbf{Description}} & \multicolumn{1}{c}{\textbf{Triggering Distresses}}  & \multicolumn{1}{c}{\textbf{Extended Pavement Service Life}}  & \multicolumn{1}{c}{\textbf{Cost/lane mile (2009 dollars)}} \\ \hline

\multicolumn{5}{c}%
{{\bfseries \tablename\ \thetable{} -- (Cont.) Summary of Techniques used to Support Multi-Objective Optimization Models \citep{Wu2012}.}} \\

\hline \multicolumn{1}{c}{\textbf{Preventive Maintenance Treatment}} & \multicolumn{1}{c}{\textbf{Description}} & \multicolumn{1}{c}{\textbf{Triggering Distresses}}  & \multicolumn{1}{c}{\textbf{Extended Pavement Service Life}}  & \multicolumn{1}{c}{\textbf{Cost/lane mile (2009 dollars)}} \\ \hline

\hline \multicolumn{5}{r}{{Continued on next page}} \\
\endfoot

\hline
\endlastfoot

\textbf{Thin overlay}

&
A HMA overlay with one lift of surface course generally with a thickness of 38 mm or less.
&
cracking (transverse, longitudinal, alligator and block); rutting; ride quality and ravelling.
&
ranges from 3 to 23 years.
&
$\$$29,409 to \$$249,699 \\ \textbf{Chip Seal} & The pavement is sprayed with asphalt (generally emulsified) and then immediately covered with aggregate and rolled. Chip seals are used primarily to seal the surface of a pavement with non load-associated cracks and to improve surface friction, although they also are commonly used as a wearing course on low volume roads . & cracking (transverse, longitudinal, alligator and block) and ravelling. & ranges from 3 to 8 years. &$\$$6,732 to \$$145,976
\\
\textbf{Microsurfacing}

&
A mixture of polymer modified asphalt emulsion, mineral aggregate, mineral filler, water, and other additives, properly proportioned, mixed, and spread on a paved surface. Microsurfacing differs from slurry seal in that it can be used on high volume roadways to correct wheel path rutting and provide a skid resistant pavement surface.
&
cracking (transverse, longitudinal, alligator and block) and shallow rutting.
&
ranges from 3 to 8 years.
&
$\$$19,436 to \$$32,698 \\ \textbf{Slurry seal} & A mixture of slow setting emulsified asphalt, well graded fine aggregate, mineral filler, and water. It is used to fill cracks and seal areas of old pavements, to restore a uniform surface texture, to seal the surface to prevent moisture and air intrusion into the pavement, and to improve skid resistance. & ride quality and cracking & ranges from 4 to 7 years. &$\$$26,505 to \$$32,542
\\
\textbf{Crack sealing}
& A maintenance procedure that involves placement of specialized materials into working cracks (Crack in a pavement that undergo significant deflection and thermal opening and closing movements greater than 2 mm, typically oriented
transverse to the pavement centreline) using unique configurations to reduce the intrusion of incompressibles into the crack and to prevent infiltration of water into the underlying pavement layers.
& cracking (transverse, longitudinal, alligator and block).
& ranges from 0 to 4 years.
&
$\$$883 to \$$9,792 \\ \textbf{Fog seal} & A light application of slow setting asphalt emulsion diluted with water and without the addition of any aggregate applied to the surface of a bituminous pavement. Fog seals are used to renew aged asphalt surfaces, seal small cracks and surface voids, or adjust the quality of binder in newly applied chip seals. & cracking (transverse, longitudinal, alligator and block) and patching. & ranges from 4 to 5 years. &$\$$1,029 to \$$211,579
\\
\textbf{Mill and resurfacing}
& The old oxidized surface of HMA is removed and replaced with new material. Generally, the old surface has become brittle and cracked and the replacement surface provides improved protection to the underlying layers.
& cracking (transverse, longitudinal, alligator and block), ride quality and rutting.
& ranges from 4 to 20 years.
&
$\$$63,612 to \$$679,684 \\ \textbf{Cold in-place recycling} & A process in which a portion of an existing bituminous pavement is pulverized or milled, and then the reclaimed material is mixed with new binder and, when needed, virgin aggregates. The binder used most often is emulsified asphalt with or without a softening agent. The resultant blend is placed as a base for a subsequent overlay or surface treatment. & cracking (transverse, longitudinal, alligator and block) and ride quality. & ranges from 4 to 17 years. &$\$$44,176 to \$$337,525
\\
\textbf{Hot in-place recycling}
& A process which consists of softening the existing asphalt surface with heat, mechanically removing
the surface material, mixing the material with a recycling agent, adding virgin asphalt and aggregate to the material (if required), and then replacing the material on the pavement.
& cracking (transverse, longitudinal, alligator and block) and rutting
& ranges from 3 to 8 years.
&
$\$$31,136 to \$$130,383 \\ \end{longtable} \end{center}  • Hello, could you post the tabular you have so far so we don't have to start writing an example from scratch? Thanks. – Alenanno Aug 19 '16 at 9:20 • I would do without using multicolumn or multirow, ssimply nesting tabulars into other tabulars when needed – Nico Vecchio Aug 19 '16 at 9:50 • I could not put the code in the comment says to long. How can I do it? – rita justosilva Aug 19 '16 at 10:03 • no in comment! please, edit your question and ad code there :-) – Zarko Aug 19 '16 at 10:15 ## 2 Answers This is just a start: % arara: pdflatex \documentclass{article} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage{longtable} \usepackage{natbib} \usepackage{booktabs} \usepackage{array} \newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}} \usepackage{microtype} \begin{document} \begin{longtable}{C{2.5cm} m{6cm} C{3cm} C{3cm} C{3cm}} \toprule \textbf{Preventive Maintenance Treatment} & \multicolumn{1}{c}{\textbf{Description}} & \textbf{Triggering Distresses} & \textbf{Extended Pavement Service Life} & \textbf{Cost/lane mile (2009 dollars)} \\ \midrule \endfirsthead \multicolumn{5}{c}% {{\bfseries \tablename\ \thetable{} -- (Cont.) Summary of Techniques used to Support Multi-Objective Optimization Models \citep{Wu2012}.}} \\ \midrule \textbf{Preventive Maintenance Treatment} & \multicolumn{1}{c}{\textbf{Description}} & \textbf{Triggering Distresses} & \textbf{Extended Pavement Service Life} & \textbf{Cost/lane mile (2009 dollars)} \\ \midrule \endhead \midrule \multicolumn{5}{r}{{Continued on next page}} \\ \endfoot \bottomrule \endlastfoot \textbf{Thin overlay} & A HMA overlay with one lift of surface course generally with a thickness of 38 mm or less. & cracking (transverse, longitudinal, alligator and block); rutting; ride quality and ravelling. & ranges from 3 to 23 years. &$\$$29,409 to \$$249,699 \\
\textbf{Chip Seal}
&
The pavement is sprayed with asphalt (generally emulsified) and then immediately covered with aggregate and rolled. Chip seals are used primarily to seal the surface of a pavement with non load-associated cracks and to improve surface friction,
although they also are commonly used as a wearing course on low volume roads  .
&
cracking (transverse, longitudinal, alligator and block) and ravelling.
&
ranges from 3 to 8 years.
&
$\$$6,732 to \$$145,976 \\ \textbf{Microsurfacing} & A mixture of polymer modified asphalt emulsion, mineral aggregate, mineral filler, water, and other additives, properly proportioned, mixed, and spread on a paved surface. Microsurfacing differs from slurry seal in that it can be used on high volume roadways to correct wheel path rutting and provide a skid resistant pavement surface. & cracking (transverse, longitudinal, alligator and block) and shallow rutting. & ranges from 3 to 8 years. &$\$$19,436 to \$$32,698
\\
\textbf{Slurry seal}
& A mixture of slow setting emulsified asphalt, well graded fine aggregate, mineral filler, and water. It is used to fill cracks and seal areas of old pavements, to restore a uniform surface texture, to seal the surface to prevent moisture and air intrusion into the pavement, and to improve skid resistance.
&
ride quality and cracking
&
ranges from 4 to 7 years.
&
$\$$26,505 to \$$32,542 \\ \textbf{Crack sealing} & A maintenance procedure that involves placement of specialized materials into working cracks (Crack in a pavement that undergo significant deflection and thermal opening and closing movements greater than 2 mm, typically oriented transverse to the pavement centreline) using unique configurations to reduce the intrusion of incompressibles into the crack and to prevent infiltration of water into the underlying pavement layers. & cracking (transverse, longitudinal, alligator and block). & ranges from 0 to 4 years. &$\$$883 to \$$9,792
\\
\textbf{Fog seal}
& A light application of slow setting asphalt emulsion diluted with water and without the addition of any aggregate applied to the surface of a bituminous pavement. Fog seals are used to renew aged asphalt surfaces, seal small cracks and
surface voids, or adjust the quality of binder in newly applied chip seals.
&  cracking (transverse, longitudinal, alligator and block) and patching.
& ranges from 4 to 5 years.
&
$\$$1,029 to \$$211,579 \\ \textbf{Mill and resurfacing} & The old oxidized surface of HMA is removed and replaced with new material. Generally, the old surface has become brittle and cracked and the replacement surface provides improved protection to the underlying layers. & cracking (transverse, longitudinal, alligator and block), ride quality and rutting. & ranges from 4 to 20 years. &$\$$63,612 to \$$679,684
\\
\textbf{Cold in-place recycling}
&  A process in which a portion of an existing bituminous pavement is pulverized or milled, and then the reclaimed material is mixed with new binder and, when needed, virgin aggregates. The binder used most often is emulsified asphalt with
or without a softening agent. The resultant blend is placed as a base for a subsequent overlay or surface treatment.
& cracking (transverse, longitudinal, alligator and block) and ride quality.
& ranges from 4 to 17 years.
&
$\$$44,176 to \$$337,525 \\ \textbf{Hot in-place recycling} & A process which consists of softening the existing asphalt surface with heat, mechanically removing the surface material, mixing the material with a recycling agent, adding virgin asphalt and aggregate to the material (if required), and then replacing the material on the pavement. & cracking (transverse, longitudinal, alligator and block) and rutting & ranges from 3 to 8 years. &$\$$31,136 to \$$130,383
\\
\end{longtable}
\end{document}


Please take this code and tidy it up to your needs. Than please reduce as much as you can. The code you have given us is much too big and leaves too much work for us. Reduce to the minimum, ask specific questions! The table is not even fitting on the page so it would be cumbersome for me to continue here.

Please just take some ideas from above. I will delete this answer later on, as it is not complete.

• (+1), don't erase answer, it contain valuable information for OP and also I wrote supplement to it :-) – Zarko Aug 19 '16 at 15:15
• The problem with the table not fitting the page is related to the caption of the second page that forces that. How can I force the second page caption to text with? – rita justosilva Aug 19 '16 at 15:32

Differences: not much ...

• adopted columns widths that table is fit into text width (determined by geometry package, option showframe is set to see page layout, in final document version had to be removed)
• reduced is font size to \small
• reduced is \tabcolsep to 3pt
• used \caption{...} for caption of longtable
• added \midrule to separate each table row (here maybe would be better to use \addlinespace from booktabs which add ~3pt vertical space between rows,this space can be increased with option [<space>]) be consider, however matter of taste

The design of caption is the same. Complete MWE is:

\documentclass{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
%\usepackage{microtype}

\usepackage{array,booktabs,longtable}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\usepackage[justification=centering]{caption}
\usepackage{natbib}
\usepackage[showframe]{geometry}

\begin{document}
{
\setlength\tabcolsep{3pt}
\small
\begin{longtable}{@{}C{2.1cm} m{5.5cm} C{2.5cm} C{2cm} C{2cm}@{}}
\caption{Summary of Techniques used to Support Multi-Objective Optimization Models \citep{Wu2012}.}
\label{my table}    \\
\toprule
\textbf{Preventive Maintenance Treatment}
&   \multicolumn{1}{c}{\textbf{Description}}
&   \textbf{Triggering Distresses}
&   \textbf{Extended Pavement Service Life}
&   \textbf{Cost/lane mile (2009 dollars)}                          \\
\midrule
\caption{ (cont.) Summary of Techniques used to Support Multi-Objective Optimization Models \citep{Wu2012}.}\\
\midrule
\textbf{Preventive Maintenance Treatment}
&   \multicolumn{1}{c}{\textbf{Description}}
&   \textbf{Triggering Distresses}
&   \textbf{Extended Pavement Service Life}
&   \textbf{Cost/lane mile (2009 dollars)}                          \\
\midrule
%    \midrule
\multicolumn{5}{r}{{Continued on next page}} \\
\endfoot
\bottomrule
\endlastfoot
\textbf{Thin overlay}
&
A HMA overlay with one lift of surface course generally with a thickness of 38 mm or less.
&
cracking (transverse, longitudinal, alligator and block); rutting; ride quality and ravelling.
&   ranges from 3 to 23 years.
&   $\$$29,409 to \$$249,699 \\ \addlinespace[3pt]%\midrule \textbf{Chip Seal} & The pavement is sprayed with asphalt (generally emulsified) and then immediately covered with aggregate and rolled. Chip seals are used primarily to seal the surface of a pavement with non load-associated cracks and to improve surface friction, although they also are commonly used as a wearing course on low volume roads . & cracking (transverse, longitudinal, alligator and block) and ravelling. & ranges from 3 to 8 years. &$\$$6,732 to \$$145,976    \\
\textbf{Micro\-surfacing}
&
A mixture of polymer modified asphalt emulsion, mineral aggregate, mineral filler, water, and other additives, properly proportioned, mixed, and spread on a paved surface. Microsurfacing differs from slurry seal in that it can be used on high volume roadways to correct wheel path rutting and provide a skid resistant pavement surface.
&
cracking (transverse, longitudinal, alligator and block) and shallow rutting.
&
ranges from 3 to 8 years.
&
$\$$19,436 to \$$32,698 \\ \midrule \textbf{Slurry seal} & A mixture of slow setting emulsified asphalt, well graded fine aggregate, mineral filler, and water. It is used to fill cracks and seal areas of old pavements, to restore a uniform surface texture, to seal the surface to prevent moisture and air intrusion into the pavement, and to improve skid resistance. & ride quality and cracking & ranges from 4 to 7 years. &$\$$26,505 to \$$32,542    \\
\midrule
\textbf{Crack sealing}
& A maintenance procedure that involves placement of specialized materials into working cracks (Crack in a pavement that undergo significant deflection and thermal opening and closing movements greater than 2 mm, typically oriented
transverse to the pavement centreline) using unique configurations to reduce the intrusion of incompressibles into the crack and to prevent infiltration of water into the underlying pavement layers.
& cracking (transverse, longitudinal, alligator and block).
& ranges from 0 to 4 years.
&
$\$$883 to \$$9,792 \\ \midrule \textbf{Fog seal} & A light application of slow setting asphalt emulsion diluted with water and without the addition of any aggregate applied to the surface of a bituminous pavement. Fog seals are used to renew aged asphalt surfaces, seal small cracks and surface voids, or adjust the quality of binder in newly applied chip seals. & cracking (transverse, longitudinal, alligator and block) and patching. & ranges from 4 to 5 years. &$\$$1,029 to \$$211,579    \\
\midrule
\textbf{Mill and resurfacing}
& The old oxidized surface of HMA is removed and replaced with new material. Generally, the old surface has become brittle and cracked and the replacement surface provides improved protection to the underlying layers.
& cracking (transverse, longitudinal, alligator and block), ride quality and rutting.
& ranges from 4 to 20 years.
&
$\$$63,612 to \$$679,684 \\ \midrule \textbf{Cold in-place recycling} & A process in which a portion of an existing bituminous pavement is pulverized or milled, and then the reclaimed material is mixed with new binder and, when needed, virgin aggregates. The binder used most often is emulsified asphalt with or without a softening agent. The resultant blend is placed as a base for a subsequent overlay or surface treatment. & cracking (transverse, longitudinal, alligator and block) and ride quality. & ranges from 4 to 17 years. &$\$$44,176 to \$$337,525   \\
\midrule
\textbf{Hot in-place recycling}
& A process which consists of softening the existing asphalt surface with heat, mechanically removing
the surface material, mixing the material with a recycling agent, adding virgin asphalt and aggregate to the material (if required), and then replacing the material on the pavement.
& cracking (transverse, longitudinal, alligator and block) and rutting
& ranges from 3 to 8 years.
&
\$\$$31,136 to \$$130,383   \\
\end{longtable}
}
\end{document}