I'm trying to vertically center every row of the table, but I can't. How can I do it?
%\documentclass{article}
\documentclass[margin=10pt]{standalone}
\usepackage{array,booktabs,siunitx}
\newcolumntype{Q}[1]{>{\hfil$}p{#1}<{$\hfill}} % centered, automatic math mode
\usepackage[table]{xcolor} % for "\rowcolor" macro
\usepackage{amsmath}
\renewcommand{\rmdefault}{phv}
%\usepackage{mathpple}
%\usepackage{palatino}
\usepackage{lxfonts}
%
% \usepackage{multicol}
\begin{document}
\centering
\setlength{\extrarowheight}{20pt} % for a more "open" look
\begin{tabular}{|*{5}{Q{2cm}|}} % or: {|*{b}{c|}}
\hline
\rowcolor{yellow} \textbf{$a$} & \textbf{$b$}& \textbf{$a+b$} & \textbf{$a-b$} \\
\hline
\dfrac{157}{3} & \dfrac{14}{9} & \dfrac{485}{9} & \dfrac{457{9} \\
\hline
\dfrac{704}{25} & 3 & \dfrac{779}{25} & \dfrac{625}{25} \\
\hline
\end{tabular}
\end{document}


mcomumn type instead of thepused in your\newcolumntypecommand – koleygr Dec 09 '17 at 19:46