4

How can I add vertical space between the double line in the example below? I tried to use \vspace, but that results in a Misplaced \noalign error.

\documentclass{article}

\begin{document}
    \begin{table}[h]
        \centering
        \begin{tabular}{|l|l|}
            \hline
            Test 1 & Blah \\
            \hline
            % <Add space here>
            \hline
            Test 2 & Blah \\
            \hline
        \end{tabular}
    \end{table}
\end{document}

enter image description here

  • 2
    \setlength\doublerulesep{2cm} – David Carlisle Apr 10 '14 at 12:07
  • 2
    don't use [h] on its own (LaTeX usually warns about that) use [htp] – David Carlisle Apr 10 '14 at 12:08
9

The space is controlled by the parameter \doublerulesep which you can set at any point in the document

\setlength\doublerulesep{2cm} 

Either in the preamble for the whole document or if just this table, inside the table environment alongside \centering and any other local declarations.

2

Another straightforward 'duh' way of doing this; hacky, but it works, and you have complete control over individual double hline segments without having to mess with any other environments or variables:

\hline  
\multicolumn{15}{c}{}\\[-0.5em]
\hline

Adapt this for the particular number of columns in your table (in this case 15), and particular interval you desire between hlines (in this case -0.5em)

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.