17

This is possible duplicate of increasing space between two rows. But because of two many math expression there, I could not possibly understand it. Regrets.

I would like to increase the space between two rows so that table can be filled manually using pen or pencil. Here is MWE.

\documentclass[a4paper]{article}

%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{booktabs}
%% Sets page size and margins
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
\begin{document}
\begin{table}
\centering
\begin{tabular}{p{5cm} p{5cm}}
\toprule 
Item & Quantity \\
\midrule 
Widgets & \dotfill \\ 
Gadgets & \dotfill \\
\midrule 
\end{tabular}
\end{table}
\end{document}
4
  • Widgets & \dotfill \\[10pt] Gadgets & \dotfill \\ which uses the optional argument to \\ or, alternately, \midrule &\\ Widgets & \dotfill \\ &\\ Gadgets & \dotfill \\ \midrule which manually adds blank rows Oct 4, 2016 at 11:36
  • @ Steven B. Segletes it increased the space between 2nd and 3rd row, but not between first and second row.
    – Vaibhav
    Oct 4, 2016 at 11:47
  • Here is what I did: \begin{table} \centering \begin{tabular}{p{5cm} p{5cm}} \toprule Item & Quantity \\ [10pt] \midrule Widgets & \dotfill \\ [10pt] Gadgets & \dotfill \\ \midrule \end{tabular} \end{table} \end{document}
    – Vaibhav
    Oct 4, 2016 at 11:47

3 Answers 3

14

Here I show 3 ways:

  1. the optional argument to \\[]

  2. Add blank lines manually

  3. Add a custom strut to lines where needed.

Approach 1 will not work following a \modrule.

\documentclass[a4paper]{article}

%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{booktabs}
%% Sets page size and margins
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
\begin{document}
%\begin{table}
\centering
Use optional argument to \verb|\\|, but can't be used for line after a
\verb|\midrule|

\begin{tabular}{p{5cm} p{5cm}}
\toprule 
Item & Quantity \\
\midrule 
Widgets & \dotfill \\[10pt]
Gadgets & \dotfill \\
\midrule 
\end{tabular}
%\end{table}

\bigskip

Add blank lines manually

\begin{tabular}{p{5cm} p{5cm}}
\toprule 
Item & Quantity \\
\midrule 
&\\
Widgets & \dotfill \\
&\\
Gadgets & \dotfill \\
\midrule 
\end{tabular}

\bigskip

Add a strut where needed

\def\mystrut{\rule{0pt}{2\normalbaselineskip}}
\begin{tabular}{p{5cm} p{5cm}}
\toprule 
Item & Quantity \\
\midrule 
Widgets\mystrut & \dotfill \\
Gadgets\mystrut & \dotfill \\
\midrule 
\end{tabular}

\end{document}

enter image description here

3
  • 1
    The first option is the simplest, doesn't even require use of additional packages. Jul 23, 2018 at 18:37
  • The strut is the best because it doesn't mess with horizontal lines in the table. Is there a way to make the strut go down as well as up?
    – Andrea
    May 19, 2022 at 16:47
  • 1
    @Andrea Yes, for example, \def\mystrut{\rule[-\normalbaselineskip]{0pt}{2\normalbaselineskip}}, using the optional argument. May 19, 2022 at 21:13
26

You can use \addlinespace from booktabs:

\documentclass[a4paper]{article}

%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{booktabs}
%% Sets page size and margins

\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

\begin{document}

\begin{table}
\centering
\begin{tabular}{p{5cm} p{5cm}}
\toprule
Item & Quantity \\
\midrule
\addlinespace[1cm]
Widgets & \dotfill \\
\addlinespace[0.8cm]
Gadgets & \dotfill \\
\midrule
\end{tabular}
\end{table}

\end{document} 

enter image description here

15

Modify arraystretch:

\documentclass{article}
\usepackage{booktabs}
\begin{document}
{ % begin box to localize effect of arraystretch change
\renewcommand{\arraystretch}{3.0}
\begin{table}
    \centering
    \begin{tabular}{p{5cm} p{5cm}}
        \toprule 
        Item & Quantity \\
        \midrule 
        Widgets & \dotfill \\ 
        Gadgets & \dotfill \\
        \midrule 
    \end{tabular}
\end{table}
} % end box
\end{document}

enter image description here

2
  • Though the problem is it involves all the tables in a document.
    – Vaibhav
    Oct 4, 2016 at 12:02
  • 1
    Right @Vaibhav, and I edited to localize the change. But it still adds space in unwanted areas, e.g., the header row. The other answers are much better! Oct 4, 2016 at 12:22

You must log in to answer this question.

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