# Why do my header cells extend past the linewidth?

I am having an issue where the tablehead and tablefirsthead cells are extending past the text width. As you can see by my example, I use \textwidth and a decimal number to specify that I want each column to be a percentage of the textwidth. This strategy works for the body cells but not for the header cells. Why is this so? How can I fix this?

\documentclass{book}

\usepackage[margin=1.0in]{geometry}
\usepackage{supertabular}
\usepackage[table]{xcolor}
\usepackage{makecell}

\pagestyle{plain}

\setlength\extrarowheight{2pt}

\newcommand{\TableCell}[1]{
\makecell*[{{p{\linewidth}}}]{
\begin{flushleft}
#1
\end{flushleft}
}
}

\newcommand{\thickline}{
\Xhline{4\arrayrulewidth}
}

\begin{document}

}
}
\tabletail{\thickline}
\tablelasttail{\thickline}

\begin{supertabular*}{\textwidth}{m{0.4\textwidth}|m{0.2\textwidth}|m{0.2\textwidth}|m{0.2\textwidth}}
\TableCell{Content 1} &
\TableCell{Content 2} &
\TableCell{Content 3} &
\TableCell{Content 4} \\
\end{supertabular*}

\end{document}


• Any column is padded on either side by \tabcolsep space on either side. And there are also three rules, each \arrayrulewidth wide. So you have an excess of 8\tabcolsep+3\arrayrulewidth on each row. – egreg Jan 22 '18 at 18:18