0

How to increase the length of the horizontal lines in tables?

The following is our table as it is now:

enter image description here

But we want the lines to be longer as shown in the following table:

enter image description here

This is the code we have for the table:

\begin{table}[H]
\centering
\begin{tabular}{@{}ccccc@{}} \Xhline{2\arrayrulewidth} 
Feature & Mean   & Standard Deviation & Max   & Min    \\ \hline
e25\_20  & 40.355 & 19.815             & 87.36 & 0.0   \\
e25\_60  & 59.556 & 17.55              & 80.39 & 24.74 \\
ec\_20   & 17.668 & 14.704             & 200.3 & 0.1   \\
ec\_60   & 75.23  & 54.485             & 207.5 & 0.2   \\
leak     & 0.0    & 0.0                & 0     & 0     \\
temp\_20 & 11.482 & 8.862              & 59.7  & -5.68 \\
temp\_60 & 10.369 & 6.124              & 22.37 & 0.82  \\
valv     & 0.0    & 0.0                & 0     & 0     \\
vwc\_20  & 46.593 & 21.342             & 116   & 0     \\
vwc\_60  & 68.768 & 16.141             & 97    & 39    \\ \Xhline{2\arrayrulewidth}
\end{tabular}
\caption{Caption}
\end{table}
4
  • Welcome to TeX.SE!
    – Mensch
    Nov 10, 2021 at 14:41
  • Please write a minimal working example. See link for more details what it means. -- in particular, add some minimal preamble. If
    – user202729
    Nov 10, 2021 at 14:42
  • 2
    the lines would be longer but you have added @{} the only use of which is to remove the padding. Nov 10, 2021 at 14:44
  • Use @{\hspace{20pt}} instead of @{} Nov 10, 2021 at 14:56

1 Answer 1

1

Like this? Note I added some vertical padding to the table cells with the help of makecell

\documentclass[]{article}
\usepackage{float}
\usepackage{makecell}

\begin{document}

\begin{table}[H]
\centering\setcellgapes{6pt}\makegapedcells
\begin{tabular}{!{\qquad}ccccc!{\qquad}} \Xhline{2\arrayrulewidth}
Feature & Mean & Standard Deviation & Max & Min \\ \hline
e25\_20 & 40.355 & 19.815 & 87.36 & 0.0 \\
e25\_60 & 59.556 & 17.55 & 80.39 & 24.74 \\
ec\_20 & 17.668 & 14.704 & 200.3 & 0.1 \\
ec\_60 & 75.23 & 54.485 & 207.5 & 0.2 \\
leak & 0.0 & 0.0 & 0 & 0 \\
temp\_20 & 11.482 & 8.862 & 59.7 & -5.68 \\
temp\_60 & 10.369 & 6.124 & 22.37 & 0.82 \\
valv & 0.0 & 0.0 & 0 & 0 \\
vwc\_20 & 46.593 & 21.342 & 116 & 0 \\
vwc\_60 & 68.768 & 16.141 & 97 & 39 \\ \Xhline{2\arrayrulewidth}
\end{tabular}
\caption{Caption}
\end{table}

\end{document} 

enter image description here

2
  • Yes, Exactly like that! Thank you very much :-)
    – Buster3650
    Nov 10, 2021 at 22:33
  • You're welcome. Always glad when I can help!
    – Bernard
    Nov 10, 2021 at 22:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .