1

I have a table with four columns with some added annotations. I use booktabs style with vertical lines to separate the two large categories (hardware and software) in the table. The issue is that the vertical line is not shown in the first column.

What might be wrong? Additionally, I don't think it's a good idea to have a vertical line in the table, but without the vertical line, it is hard to read the contents; what options do I have to remove the vertical line, but distinctively separate the columns.

enter image description here

\documentclass[9pt]{article}

\usepackage{booktabs}
\newcommand{\spaceit}{\hspace{0.2cm}}

\usepackage{threeparttable}

\begin{document}
    \begin{table}[t]
        \caption{Research history \& directions}
        \centering

        \begin{threeparttable}

        \begin{tabular}{@{}l|ll|ll@{}} \toprule
         & \multicolumn{2}{c}{Software} & \multicolumn{2}{c}{Hardware}\\ 
         \cmidrule(r){2-3} \cmidrule(r){4-5}
                     & Data structures \& Algorithms & Software Engineering & Hardware Systems & Communication\\ \midrule
         A & \tnote{1}\spaceit Ray tracing modeling   & Widget framework                 &                                       & VLC\tnote{a} \\ 
         \bottomrule
         \end{tabular}

         \begin{tablenotes}
             \item[1] Published academic research: papers, books, technical reports ({1} -- {10})
             \item[a] Visible Light Communication
             \item[b] Component Based Software Engineering
             \item[c] Data Acquisition System
             \item[d] Web-based System Management
             \item[e] Software \& Hardware Testing System
         \end{tablenotes}

         \end{threeparttable}
    \end{table}         
\end{document}
  • 1
    You have set no vertical rule on the left. It is a bad idea to use vertical rule with booktabs commands. – egreg Oct 31 '16 at 0:04
  • 2
    The problem is unrelated to booktabs; you need \multicolumn{2}{c|}{Software}. See tex.stackexchange.com/q/267024/21344 for full solution and also a way to typeset a similar table, separating the groups without resorting to vertical rules. – Paul Gessler Oct 31 '16 at 0:05
  • 1
    The booktabs perspective is that it is a bad idea to use vertical rules with tables. Loading booktabs will not make the use of vertical rules any better or any worse. – Andrew Oct 31 '16 at 0:32
2

Here is a way to separate the two groups in a nicer way:

\documentclass[9pt]{extarticle}
\usepackage[showframe]{geometry}
\usepackage[table,  svgnames]{xcolor}
\usepackage{booktabs, caption}
\newcommand{\spaceit}{\hspace{0.2cm}}

\usepackage{threeparttable}

\begin{document}

\begin{table}[t]
  \caption{Research history \& directions}
  \centering
  \begin{threeparttable}
    \begin{tabular}{@{}lll cll@{}}
      \arrayrulecolor{black} \cmidrule[\heavyrulewidth]{2-3} \cmidrule[\heavyrulewidth]{5-6}
      & \multicolumn{2}{c}{\bfseries Software} &\raisebox{0pt}[0pt][0pt]{\color{Lavender}\rule[-9.4ex]{1.5em}{12ex}} & \multicolumn{2}{c}{\bfseries Hardware}\\
      \cmidrule(r){2-3} \cmidrule(r){5-6}
        & Data structures \& Algorithms & Software Engineering &   & Hardware Systems & Communication \\
      \addlinespace
      A & \tnote{1}\spaceit Ray tracing modeling & Widget framework & & VLC\tnote{a} \\
      \cmidrule[\heavyrulewidth]{2-3} \cmidrule[\heavyrulewidth]{5-6}
    \end{tabular}
    \smallskip
    \begin{tablenotes}\footnotesize
      \item[1] Published academic research: papers, books, technical reports ({1} -- {10})
      \item[a] Visible Light Communication
      \item[b] Component Based Software Engineering
      \item[c] Data Acquisition System
      \item[d] Web-based System Management
      \item[e] Software \& Hardware Testing System
    \end{tablenotes}
  \end{threeparttable}
\end{table}

\end{document} 

enter image description here

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.