# Change tabular row height including a matrix [duplicate]

I am looking for a way, to change the height of a row in a tabular environment (or evenly add space at the top and bottom) but without changing the size of an included matrix.

If I use \renewcommand{arraystretch}{1.5} (which works perfectly in any other case) unfortunately also changes the size of my matrix. See MWE:

\documentclass[a4paper,12pt]{report}

\usepackage{amsmath}
\begin{document}

\begin{tabular}{|c|c|}\hline
$\begin{pmatrix} 1\\2\\3 \end{pmatrix}$&2 \\ \hline
\end{tabular}

\renewcommand{\arraystretch}{1.5}
\begin{tabular}{|c|c|}\hline
$\begin{pmatrix} 1\\2\\3 \end{pmatrix}$&2 \\ \hline
\end{tabular}

\end{document}


Which gives me the following output:

and

But I actually want something like this:

Is there any way to do this?

## marked as duplicate by Werner tables StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jan 20 at 19:30

• Please have a look at this post. Unfortunately the accepted answer may not be the most useful one. – user121799 Jan 20 at 17:14
• And this answer may be more directly applicable. – user121799 Jan 20 at 17:21

The cellspace package is done for that: you can define minimal vertical spacings at the toˆp and bottom of cells in columns with specifier prefixed with the letter S (or C if you load siunitx):

\documentclass[a4paper,12pt]{report}
\usepackage{cellspace}
\setlength{\cellspacetoplimit}{3pt}
\setlength{\cellspacebottomlimit}{3pt}

\usepackage{amsmath}
\begin{document}

\begin{tabular}{|Sc|c|}\hline
$\begin{pmatrix} 1\\2\\3 \end{pmatrix}$&2 \\ \hline
\end{tabular}

\end{document}


• It works but it gives me 2 warnings: Command \@startpbox has changed. Check if current package is valid. (and same with \@endpbox) You have an idea how to get rid of it? – chris Jan 20 at 17:32
• @chris/ I have the latest version (1.7, from 8/12/2018), and have the same warnings. Maybe this is linked to a recent change in array (dated 30/12/2018). I'll send a message to the package author. – Bernard Jan 20 at 18:15