I have created a table that is the width of my page, but when trying to center the text in the top row over the merged cell, the text is not centering with respect to the entire length of the cell.
\documentclass[a4paper,twoside,12pt]{article}
\usepackage{graphicx}
\usepackage{array}
\newcolumntype{N}{>{\centering\arraybackslash}m{.5in}}
\newcolumntype{G}{>{\centering\arraybackslash}m{2in}}
\begin{document}
\begin{table}[H]
\centering
\begin{tabular}{N|N|N|N|N|N|N|N|N|}
\cline{2-9}
\multicolumn{1}{N|}{\textbf{}} & \multicolumn{4}{G|}{\textbf{Emissions (Pre Catalytic Converter)}} & \multicolumn{4}{G|}{\textbf{Emissions (Post Catalytic Converter)}} \\ \hline
\multicolumn{1}{|N|}{\textbf{Dyno Load (\%)}} & \textbf{CO (\%)} & \textbf{HC (ppm)} & \textbf{Nox (ppm)} & \textbf{$\boldsymbol{\mathrm{CO_2}}$ (\%)} & \textbf{CO (\%)} & \textbf{HC (ppm)} & \textbf{Nox (ppm)} & \textbf{$\boldsymbol{\mathrm{CO_2}}$ (\%)} \\ \hline
\multicolumn{1}{|N|}{10} & 0.77 & 23 & 523 & 14.0 & 0.09 & 18 & 130 & 13.8 \\ \hline
\multicolumn{1}{|c|}{30} & 0.78 & 13 & 555 & 14.2 & - & - & - & - \\ \hline
\multicolumn{1}{|c|}{70} & 0.70 & 14 & 580 & 14.4 & - & - & - & - \\ \hline
\multicolumn{1}{|c|}{90} & 0.74 & 15 & 630 & 14.5 & 0.70 & 15 & 618 & 14.6 \\ \hline
\multicolumn{1}{|c|}{Neutral} & 0.06 & 7 & 21 & 15.6 & 0.06 & 5 & 27 & 15.7 \\ \hline
\end{tabular}
\caption{\textbf{}}
\label{2000Emissions}
\end{table}
\end{document}
Best Answer
In this case it is easier to just use two lines for the titles:
Notes:
\multicolumn{1}{N|}{\textbf{}}
, just leaving it blank is sufficient.However, I think you table would lok much better if you eliminated the vertical rules and used the
booktabs
package:Code:
Code:
booktabs
: