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.
\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}
booktabs
, I'm left wondering why you want vertical lines. Thebooktabs
manual is pretty clear on why they are not a good thing in formal tables.)booktabs
manual on this. As you should not have vertical rules in formal tables, they are not supported bybooktabs
. (I suspect the implementation would also be awkward, to say the least.)