I have a table with a header row whose contents I want to be bold and centered. I also want vertical rules between each pair of columns for the entire table.
I like the solution of creating a macro for this, as suggested in this answer for create table with only header bold and center. That leaves me with this MWE:
\documentclass{article}
\newcommand*{\thead}[1]{\multicolumn{1}{c|}{\bfseries #1}}
\begin{document}
\begin{tabular}{ l | l }
% Header row
\thead{Left Header} & \thead{Right Header} \
% Non-header rows. Long cell so we can see centering working
Top Left & Top Right \
Bottom Left & Bottom Right is looooooooong
\end{tabular}
\end{document}
Everything looks good except for the wayward vertical rule to the right of "Right Header".
I know I can make a dedicated macro for the last header in the row, like this:
\newcommand*{\thead}[1]{\multicolumn{1}{c|}{\bfseries #1}}
\newcommand*{\theadlast}[1]{\multicolumn{1}{c}{\bfseries #1}}
but I want the invoked command to be as uniform across the row as possible... ideally the same command would be used for every column, with no variation in arguments or the command. Is there a reasonable way to do this?
Note: I'm trying to stick with the built-in tabular plus the array and tabularx packages; I'm trying to understand how to customize the built-in tabular environment without resorting to additional packages.

