# table in latex - unwanted breaks in rows

In the below table I added \\ at the start to create a space between the variables, which worked, but now I have this gap- no border between the rows in the column that was initially there- as seen in screenshot- how do I get rid of these gaps again? Many thankss

code is:

% Uncomment the following line to allow the usage of graphics (.png, .jpg)
%\usepackage[pdftex]{graphicx}
% Comment the following line to NOT allow the usage of umlauts
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{amsmath}
% Start the document
\begin{document}

\begin{table}
\centering % Centre the table on the slide
\begin{tabular}{|c|c|c|c|}
\toprule
Name & Equation & Description & Variables\\
\toprule
Reynolds & $Re=\frac{g}{g}$ & desc  & \shortstack{$\mu$- dynamic viscosity \\ v- velocity \\ L \\ $\rho$- density  }\\
\\ Ohnesorge & $Oh=\frac{f}{g}$ & $\rho$  & \shortstack{$\mu$ \\ $\sigma$- surface-tension coefficient \\ L \\ $\rho$ }\\
\\ Weber & We &  $\frac{ff}{ff}$ & \shortstack{$\nu$ \\ $\sigma$ \\ L \\ $\rho$ }\\

\bottomrule
\end{tabular}

\end{table}

\end{document}

• Don't use vertical rules | with booktabs, it's designed againt these pipes. – AboAmmar Nov 29 '20 at 13:20
• Replace \\ \\ with \\ & & & \\ – leandriis Nov 29 '20 at 13:27
• thanks @leandriis that worked :)) – Sara Ismail-Sutton Nov 29 '20 at 13:47

I would write your tables like this:

\documentclass{article}
\usepackage{booktabs, makecell}
\usepackage{amsmath}

\begin{document}
\begin{table}
\centering % Centre the table on the slide
\begin{tabular}{lccl}
\toprule
Name        & Equation & Description & Variables\\
\midrule
Reynolds    & $Re=\frac{g}{g}$ & desc   & \makecell[l]{$\mu$: dynamic viscosity \\
$v$: velocity \\
L \\
$\rho$: density }\\
Ohnesorge   & $Oh=\frac{f}{g}$ & $\rho$ & \makecell[l]{$\mu$: dynamic viscosity \\
$v$: velocity \\
L \\
$\rho$: density }\\
Weber       & We      & $\frac{ff}{ff}$ & \makecell[l]{$\nu$ \\
$\sigma$ \\
L \\
$\rho$ }\\
\bottomrule
\end{tabular}
\end{table}
\end{document}


As in @Zarko's answer, I'd do away with all vertical lines -- trust me, they're not needed, and they won't be missed. I'd also left-align the cell contents, top-align the cell contents across rows, replace the second \toprule directive with \midrule, and replace the all-blank lines with the less profligate \addlinespace.

\documentclass{article}
\usepackage[utf8]{inputenc} % this is the default nowadays
\usepackage[T1]{fontenc}
\usepackage{booktabs} % for \toprule, \midrule, \bottomrule, and \addlinespace macros
\usepackage{amsmath}  % for \smash[b] macro

% Start the document
\begin{document}
\begin{table}
\centering % Centre the table horizontally
\begin{tabular}{@{} llll @{}} % suggestion: use 'l', not 'c', col. type
\toprule
Name & Equation & Description & Variables\\
\midrule
Reynolds & $\mathit{Re}=\smash[b]{\frac{g}{g}}$ & desc
& $\mu$ -- dynamic viscosity \\
&&& $v$ -- velocity \\
&&& $L$ \\
&&& $\rho$ -- density  \\
Ohnesorge & $\mathit{Oh}=\smash{\frac{f}{g}}$ & $\rho$
& $\mu$ \\
&&& $\sigma$ -- surface-tension coeff. \\
&&& $L$ \\
&&& $\rho$ \\
Weber & $\mathit{We}$ &  $\smash{\frac{ff}{ff}}$
& $\nu$ \\
&&& $\sigma$ \\
&&& $L$ \\
&&& $\rho$ \\
\bottomrule
\end{tabular}
\end{table}
\end{document}


If you actually want vertical rules compatible with the horizontal rules of booktabs (even if it is not at all in the spirit of booktabs), you can use {NiceTabular} of nicematrix.

\documentclass{article}
\usepackage{booktabs}
\usepackage{nicematrix}
\usepackage{makecell}
\usepackage{amsmath}
% Start the document
\begin{document}

\begin{table}
\centering % Centre the table on the slide
\begin{NiceTabular}{|c|c|c|c|}
\toprule
Name & Equation & Description & Variables\\
\toprule
Reynolds & $Re=\frac{g}{g}$ & desc  & \shortstack{$\mu$- dynamic viscosity \\ v- velocity \\ L \\ $\rho$- density  }\\
\\ Ohnesorge & $Oh=\frac{f}{g}$ & $\rho$  & \shortstack{$\mu$ \\ $\sigma$- surface-tension coefficient \\ L \\ $\rho$ }\\
\\ Weber & We &  $\frac{ff}{ff}$ & \shortstack{$\nu$ \\ $\sigma$ \\ L \\ $\rho$ }\\
\bottomrule
\end{NiceTabular}
\end{table}

\end{document}


I recommend the design in the spirit of booktabs as described in others answers.