I would like to add vertical lines in my table. Can anybody suggest me the change required in following code to get proper vertical lines in my table? Sample code is pasted below. Screenshot of the output is attached.
Thanks a lot.
\documentclass[sigconf, authordraft]{acmart}
\usepackage{booktabs}
\usepackage{multirow}
%
\begin{document}
\begin{table*}[!h]
\centering
\caption{Summary of Quantitative Evaluation}
\label{tab:table3}
\begin{tabular}{|p{0.5 cm}|p{0.85 cm}|p{12 cm}|}
%\begin{tabular}{ccc}
\toprule
Sl.No. & Metric & Remark \\
\midrule
1 & Rel Bias & Smaller relative bias (almost equal to 0) is obtained for all fused bands and for all 7 fusion methods.\\
\bottomrule
2 & Rel Bias & Smaller relative bias (almost equal to 0) is obtained for all fused bands and for all 7 fusion methods.
\\
\bottomrule
3& Rel Bias & Smaller relative bias (almost equal to 0) is obtained for all fused bands and for all 7 fusion methods. \\
\bottomrule
\end{tabular}
\end{table*}
\end{document}
Best Answer
To obtain intersecting vertical and horizontal lines with booktabs, you have to suppress the padding of booktabs rules. You can replace this padding with a minimal padding at the top and bottom of each cell in columns with specifier prefixed with the letter
S
, loading thecellspace
package. Here is a possible code:Note 1: If you load
siunitx
, which defines anS
column type, you have to use another prefix; the default isC
.Note 2: Other than booktabs, some packages define horizontal lines with variable thickness:
boldline
(no paddding, but also defines variable width vertical lines) andmakecell
(which also lets you define a fixed padding for all cells of a table).