# Special column separator in first line

I need to reproduce the following table using LaTeX.

I've tried to use a custom column separator, like @{$\oplus$}, but it affect every line of the table and that is not what I need.

\begin{tabular}{|c@{+}c@{=}c@{+}c@{=}c@{+}c@{+}c|}
\hline
cell & cell & cell & cell & cell & cell & cell \\
\hline
cell & cell & cell & cell & cell & cell & cell \\
cell & cell & cell & cell & cell & cell & cell \\
\hline
\end{tabular}


I would like to be able to use a math symbol in place of + or =, like \oplus.

\documentclass{article}

\usepackage{array}

\begin{document}

\setlength\extrarowheight{2pt}
\begin{tabular}{|*{7}{c|}}
\hline
\multicolumn{1}{|c!{\makebox[0pt]{$+$}}}{cell}&
\multicolumn{1}{c!{\makebox[0pt]{$=$}}}{cell}&
\multicolumn{1}{c!{\makebox[0pt]{$+$}}}{cell}&
\multicolumn{1}{c!{\makebox[0pt]{$=$}}}{cell}&
\multicolumn{1}{c!{\makebox[0pt]{$+$}}}{cell}&
\multicolumn{1}{c!{\makebox[0pt]{$+$}}}{cell}&
\multicolumn{1}{c|}{cell}\\
\hline
cell & cell & cell & cell & cell & cell & cell \\
cell & cell & cell & cell & cell & cell & cell \\
\hline
\end{tabular}
\end{document}

• Thank you very much. Subsidiary question: What is the purpose of the \makebox[0pt] command? – John Doe Mar 5 '17 at 17:12
• @TomBarthe try it without:-) the content of ! (or @) is at the right hand edge of the previous cell, so if you just did + it would look as if it was to the left of the vertical rule below. \makebox forces it to have zero width overprinting the cell padding on either side so it sits over the | (but put in ++++++ and it will overprint the cell contents with no warning unless you increase \tabcolsep to leave more room. – David Carlisle Mar 5 '17 at 17:16

The first table is cleaner, the second table is with the obnoxious vertical rules.

\documentclass{article}
\usepackage{booktabs}

\begin{document}

\begin{tabular}{ c *{6}{@{$\mskip\thickmuskip$}c@{$\mskip\thickmuskip$}c} }
\toprule
cell & $+$ & cell & $=$ & cell & $+$ & cell & $=$ & cell & $+$ & cell & $+$ & cell \\
\midrule
cell && cell && cell && cell && cell && cell && cell \\
cell && cell && cell && cell && cell && cell && cell \\
\bottomrule
\end{tabular}

\bigskip

\begin{tabular}{ |c *{6}{@{$\mskip\thickmuskip$}c@{$\mskip\thickmuskip$}c}| }
\hline
cell & $+$ & cell & $=$ & cell & $+$ & cell & $=$ & cell & $+$ & cell & $+$ & cell \\
\hline
cell &\vline& cell &\vline& cell &\vline& cell &\vline& cell &\vline& cell &\vline& cell \\
\hline
cell &\vline& cell &\vline& cell &\vline& cell &\vline& cell &\vline& cell &\vline& cell \\
\hline
\end{tabular}

\end{document}