3

Consider the following code:

\documentclass{article}

\usepackage{booktabs}

\begin{document}

\begin{table}
\centering
  \begin{tabular}{r @{\,--\,} l}
   \toprule
          &       \\
   \midrule
     8:10 &  8:55 \\
     8:55 &  9:40 \\
    10:00 & 10:45 \\
    10:45 & 11:30 \\
    11:30 & 12:00 \\
    12:40 & 13:25 \\
    13:25 & 14:10 \\
    14:25 & 15:10 \\
   \bottomrule
  \end{tabular}
\end{table}

\end{document}

output

How do I remove the first endash (i.e., the one between \toprule and \midrule) without changing the rest of the column?

3

The \multicolumn command completely over-rides the header for a cell or cells

\documentclass{article}

\usepackage{booktabs}

\begin{document}

\begin{table}
\centering
  \begin{tabular}{r @{\,--\,} l}
   \toprule
    \multicolumn{2}{c}{} \\
   \midrule
     8:10 &  8:55 \\
     8:55 &  9:40 \\
    10:00 & 10:45 \\
    10:45 & 11:30 \\
    11:30 & 12:00 \\
    12:40 & 13:25 \\
    13:25 & 14:10 \\
    14:25 & 15:10 \\
   \bottomrule
  \end{tabular}
\end{table}

\end{document}

This can be used not only here but for example to have a one-off cell alignment, to skip insertions using the array package > syntax, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.