[Tex/LaTex] Vertically Center Row Entries in Table

tablesvertical alignment

in the MWE below, I wanted to be able to center the row entries vertically in the table. Thanks!

Here is my code:

\documentclass{book}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{array}
\usepackage[svgnames,table]{xcolor}

\begin{document}

\chapter*{List of Abbreviations}

\begin{center}
\rowcolors{2}{cyan!25}{white}
\begin{tabular}{ m{3cm} m{7cm} }
\rowcolor{cyan!50}
\arrayrulecolor{white}
\arrayrulewidth=1pt
\renewcommand{\arraystretch}{1.5}
\textbf{Abbreviation} & \textbf{Explanation} \\ [2ex]
\textbf{ACPR} & Adjacent Channel Power Rejection \\ [2ex]
\textbf{BER} & Bit Error Rate \\ [2ex]
\textbf{EVM} & Error Vector Magnitude \\ [2ex]
\textbf{FM} & Frequency Modulation \\ [2ex]
\textbf{HP} & High Port \\ [2ex]
\textbf{IMR} & Inter Modulation Rejection \\ [2ex]
\end{tabular}
\end{center}

\end{document}

Best Answer

Some suggestions:

  • Drop the [2ex] vertical spacing directives;

  • To compensate, increase \arraystretch to ca 1.75;

  • Use p rather than m column types; and

  • Omit the \arrayrulecolor{white} and \arrayrulewidth=1pt directives, as the code doesn't feature either horizontal or vertical lines.

enter image description here

\documentclass{book}
\usepackage[table]{xcolor}
\begin{document}

\begin{center}
\renewcommand{\arraystretch}{1.75}%
\rowcolors{2}{cyan!25}{white}
\begin{tabular}[t]{>{\bfseries}p{3cm} p{7cm}}
\rowcolor{cyan!50}
Abbreviation & Explanation \\ 
ACPR & Adjacent Channel Power Rejection \\ 
BER & Bit Error Rate \\ 
EVM & Error Vector Magnitude \\ 
FM & Frequency Modulation \\ 
HP & High Port \\ 
IMR & Inter Modulation Rejection \\ 
\end{tabular}
\end{center}

\end{document}

Addendum to address the OP's follow-up query: To have a thick white line separate the two header cells, add the instructions \arrayrulecolor{white} and \setlength{\arrayrulewidth}{2pt} before \begin{tabular} and change the first header cell from Abbreviation to \multicolumn{1}{l|}{\bfseries Abbreviation}.

Related Question