Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I introduce some vertical spaces in the table before the headers in Latex. The method I use below has introduced a gap, but the gap is too big. How can I have a more controllable vertical gap?

\begin{table}
    \begin{tabular*}{0.95\columnwidth}{l|l}
        \hline
         Parameters & ~ \\ \hline
         \rule{0pt}{3pt} & ~ \\

        ~ & ~ \\
        \hline
    \end{tabular*}
    \caption{}
\label{Tbl:X}
\end{table}
share|improve this question

migrated from stackoverflow.com May 29 '12 at 15:12

This question came from our site for professional and enthusiast programmers.

    
See the answer to Column padding in tables for different ways of padding rows/columns with whitespace. –  Werner May 29 '12 at 16:00
add comment

1 Answer

LaTeX doesn't really have a perfect answer for it. You can add or substract space vertically by using \\[<value>]. However this will appear above the rule if you use \hline.

So a poor man's solution would be:

\begin{tabular*}{0.95\columnwidth}{l|l}
    \hline
     Parameters & ~ \\ \hline
       &            \\[-5pt]        % adjust value as necessary                            
     x & y \\ \hline
share|improve this answer
    
anyway to get this below the line? –  Androidian Jun 1 '12 at 9:46
    
@Androidian my solution shows a way to get a space below the line by producing an empty table row and backtrack. That is the only "out-of-the-box" solution available. The array package also has \extrarowheight, but that applies to all rows not to individual ones. –  Frank Mittelbach Jun 1 '12 at 10:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.