0

I'm using the arydshln package to insert a dashed line between two lines of data, but when I look at the result of a large table in \scriptsize the line appears to be too close to the lower data line. Here is a sample of my code. Does anyone know how to increase the space above and below the dashed line?

\documentclass[]{article}
\usepackage{arydshln,booktabs}
\begin{document}
\begin{table}[!htbp]
    \begin{center}
     \caption{Stuff}
      \begin{tabular}{clc|clc|}
         \toprule
Rank&   Method  &   $h=1$&Rank& Method  &   $h=6$ \\
\midrule
1   &   Naive (SS)  &   0.064   &   1   &   Mean (Cr)   &   0.067   \\
2   &   Autobox (MA)    &   0.141   &   2   &   Naive (All Parts)   &   0.076   \\
3   &   SS  &   0.312   &   3   &   DRP (All Parts) &   0.078   \\
4   &   DS  &   0.315   &   4   &   DS  &   0.175   \\
5   &   Mean (DS)   &   0.484   &   5   &   Autobox (DS)    &   0.201   \\
6   &   MA  &   0.563   &   6   &   Mean (DS)   &   0.290   \\
7   &   Autobox (SS)    &   0.578   &   7   &   Naive (Cr)  &   0.316   \\
8   &   Mean (MA)   &   0.593   &   8   &   Autobox (All Parts) &   0.328   \\
9   &   Mean (SS)   &   0.664   &   9   &   Naive (SS)  &   0.433   \\
10  &   DRP (All Parts) &   0.807   &   10  &   Mean (SS)   &   0.462\\
20  &   Cr  &   4.167   &   12  &   Cr  &   0.985   \\
\hdashline
    &       &       &   20  &   SS  &   8.605   \\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\end{document} 
1

Here is a way. Note you shouldn't use vertical rules with booktabs. Also don't use the center environment within table – it adds unwanted vertical spacing. Use the \centering directive instead. I added the caption package to have a decent vertical spacing between caption and table wghen the caption is above the table.

\documentclass[]{article}
\usepackage{arydshln,booktabs, caption}

\begin{document}

\begin{table}[!htbp]
    \centering
     \caption{Stuff}
      \begin{tabular}{clc|clc|}
         \toprule
Rank& Method & $h=1$& Rank & Method & $h=6$ \\
\midrule
1 & Naive (SS) & 0.064 & 1 & Mean (Cr) & 0.067 \\
2 & Autobox (MA) & 0.141 & 2 & Naive (All Parts) & 0.076 \\
3 & SS & 0.312 & 3 & DRP (All Parts) & 0.078 \\
4 & DS & 0.315 & 4 & DS & 0.175 \\
5 & Mean (DS) & 0.484 & 5 & Autobox (DS) & 0.201 \\
6 & MA & 0.563 & 6 & Mean (DS) & 0.290 \\
7 & Autobox (SS) & 0.578 & 7 & Naive (Cr) & 0.316 \\
8 & Mean (MA) & 0.593 & 8 & Autobox (All Parts) & 0.328 \\
9 & Mean (SS) & 0.664 & 9 & Naive (SS) & 0.433 \\
10 & DRP (All Parts) & 0.807 & 10 & Mean (SS) & 0.462\\
20 & Cr & 4.167 & 12 & Cr & 0.985 \\[0.5ex]
\hdashline\noalign{\vskip 0.5ex}
    & & & 20 & SS & 8.605 \\
\bottomrule
\end{tabular}
\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.