[Tex/LaTex] Vertical lines are being broken up (disrupted) by the horizontal booktabs lines

booktabsrulestables

My vertical lines are being broken up (disrupted) by horizontal booktabs lines. How can I fix this?

It's well and good to say use \hline but I also need a cmidrule that spans only the second two columns which have no \hline equivalent to my knowledge. Also \hline is ugly because it doesn't automatically leave any vertical space between the line and the preceding/following lines of text.

Table

\documentclass[a4paper,12pt]{article}
\date{}
\usepackage{a4wide}
\usepackage{booktabs} %for top, middle and bottomline
\usepackage{multirow} %multi column and row spanning
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage{multicol}
\usepackage{blindtext}


    \begin{document}

    \begin{multicols}{2}

    \subsection*{Results}

 \resizebox{\columnwidth}{!}{%
\begin{tabular}{@{} l | c | c @{}}
\toprule
Characteristic & \multicolumn{2}{c}{Result}\\
 \cmidrule{2-3}
 & Seaweed isolate & Coral isolate \\
\midrule
Cell shape & Rod & Rod\\
Gram stain & $-$ & $-$\\
Oxidase & $+$ & $-$\\
Catalase & $+$ & $-$\\
MSA & Growth & No growth\\
Anaerobic & Growth (weak) & No growth\\
Motility & & \\
Indole production & & \\
Hugh \& Leifsons & & \\
\bottomrule
\end{tabular}
}

    \blindtext

    {\noindent
    \begin{tabularx}{\columnwidth}
    { | l | >{\raggedright\arraybackslash} X | >{\centering\arraybackslash} X | }
    Leave this column alone. & Left justify and adjust this column. &
    Centre and adjust this column. \\ 
    \end{tabularx}
    }

    \end{multicols}

    \end{document}

Best Answer

You can use the \extrarowheight command from the array package to stretch all the rows. Otherwise you can define your own "strut" command to enlarge a single row. The code below is based on array's strut box. If you are using vertical lines, then us it on the sides also.

EDIT: There is also the bigstrut package

I have also include an example how to do it properly with booktabs

\documentclass{article}
\usepackage{array}
    %\setlength{\extrarowheight}{1pt}
\usepackage{booktabs} %for top, middle and bottomline
\usepackage{bigstrut}
    \setlength\bigstrutjot{3pt}

\makeatletter
\newlength\mylena
\newlength\mylenb
\newcommand\mystrut[1][2]{%
    \setlength\mylena{#1\ht\@arstrutbox}%
    \setlength\mylenb{#1\dp\@arstrutbox}%
    \rule[\mylenb]{0pt}{\mylena}}
\makeatother

\begin{document}
\noindent With mystrut\par
\bigskip
\begin{tabular}{|l|c|c|}
\hline
    \mystrut   & \multicolumn{2}{c|}{Result}\\
\cline{2-3}
    \mystrut
    Characteristic    & Seaweed isolate & Coral isolate  \\
\hline
    \mystrut
    Cell shape        & Rod             & Rod\\
    Gram stain        & $-$             & $-$\\
    Oxidase           & $+$             & $-$\\
    Catalase          & $+$             & $-$\\
    MSA               & Growth          & No growth\\
    Anaerobic         & Growth (weak)   & No growth\\
    Motility          &                 & \\
    Indole production &                 & \\
    Hugh \& Leifsons  &                 & \\
\hline
\end{tabular}

\bigskip
\noindent With bigstrut\par
\bigskip
\begin{tabular}{|l|c|c|}
\hline
    \bigstrut   & \multicolumn{2}{c|}{Result}\\
\cline{2-3}
    \bigstrut
    Characteristic    & Seaweed isolate & Coral isolate  \\
\hline
    \bigstrut[t]
    Cell shape        & Rod             & Rod\\
    Gram stain        & $-$             & $-$\\
    Oxidase           & $+$             & $-$\\
    Catalase          & $+$             & $-$\\
    MSA               & Growth          & No growth\\
    Anaerobic         & Growth (weak)   & No growth\\
    Motility          &                 & \\
    Indole production &                 & \\
    \bigstrut[b]
    Hugh \& Leifsons  &                 & \\
\hline
\end{tabular}

\bigskip
\noindent With booktabs\par
\bigskip
\begin{tabular}{@{}lcc@{}}
\toprule
                      & \multicolumn{2}{c@{}}{Result}\\
\cmidrule(l){2-3}
     Characteristic   & Seaweed isolate & Coral isolate \\
\cmidrule( r){1-1}
\cmidrule(lr){2-2}
\cmidrule(l ){3-3}
    Cell shape        & Rod             & Rod\\
    Gram stain        & $-$             & $-$\\
    Oxidase           & $+$             & $-$\\
    Catalase          & $+$             & $-$\\
    MSA               & Growth          & No growth\\
    Anaerobic         & Growth (weak)   & No growth\\
    Motility          &                 & \\
    Indole production &                 & \\
    Hugh \& Leifsons  &                 & \\
\bottomrule
\end{tabular}
\end{document}

The output is

enter image description here