3

The methods I am aware of for modifying vertical spacing in a table are \renewcommand{\arraystretch}{<length>} and \setlength{\extrarowheight}{<length>}. However, these commands affect the arrays inside the table as well.

Is there any command similar to \setlength{\tabcolsep}{10pt} but for row spacing?

This is the code for my table, and I'd like to increase the spacing between the matrices, as they look too close to each other.

    \begin{table}[hbt!]
    \centering
    \begin{tabular}{ccc}
        \hline
             Description & Symbol & Value\\ \hline
             State-Space Matrix & $A$ & $\left(\begin{array}{cccc} 0 & 0 & 1.0 & 0\\ 0 & 0 & 0 & 1.0\\ 0 & 744.7 & -40.32 & 0\\ 0 & -1152.0 & 40.32 & 0 \end{array}\right)$\\
             State-Space Matrix & $B$ & $\left(\begin{array}{c} 0\\ 0\\ 61.63\\ -61.63 \end{array}\right)$\\
             State-Space Matrix & $C$ & $\left(\begin{array}{cccc} 1.0 & 0 & 0 & 0\\ 0 & 1.0 & 0 & 0 \end{array}\right)$\\
             State-Space Matrix & $D$ & $\left(\begin{array}{c} 0\\ 0 \end{array}\right)$\\
             Open-loop Poles & $OL$ & $\left(\begin{array}{cccc} 0 & 0 & 0 & 0\\ 0 & -9.187+25.78{}\mathrm{i} & 0 & 0\\ 0 & 0 & -9.187-25.78{}\mathrm{i} & 0\\ 0 & 0 & 0 & -21.95 \end{array}\right)$\\
        \hline
    \end{tabular}
    \caption{Pre-Lab Parameters}
\end{table}

enter image description here

2

Here is an alternative using the cellspace package:

\documentclass{article}

\usepackage{cellspace}
\setlength\cellspacetoplimit{6pt}
\setlength\cellspacebottomlimit{6pt}

\begin{document}
    \begin{table}[hbt!]
    \centering
    \begin{tabular}{ccSc}
        \hline
             Description & Symbol & Value\\ \hline
             State-Space Matrix & $A$ & $\left(\begin{array}{cccc} 0 & 0 & 1.0 & 0\\ 0 & 0 & 0 & 1.0\\ 0 & 744.7 & -40.32 & 0\\ 0 & -1152.0 & 40.32 & 0 \end{array}\right)$\\
             State-Space Matrix & $B$ & $\left(\begin{array}{c} 0\\ 0\\ 61.63\\ -61.63 \end{array}\right)$\\
             State-Space Matrix & $C$ & $\left(\begin{array}{cccc} 1.0 & 0 & 0 & 0\\ 0 & 1.0 & 0 & 0 \end{array}\right)$\\
             State-Space Matrix & $D$ & $\left(\begin{array}{c} 0\\ 0 \end{array}\right)$\\
             Open-loop Poles & $OL$ & $\left(\begin{array}{cccc} 0 & 0 & 0 & 0\\ 0 & -9.187+25.78{}\mathrm{i} & 0 & 0\\ 0 & 0 & -9.187-25.78{}\mathrm{i} & 0\\ 0 & 0 & 0 & -21.95 \end{array}\right)$\\
        \hline
    \end{tabular}
    \caption{Pre-Lab Parameters}
\end{table}
\end{document}

enter image description here

  • The package cellspace worked perfectly. Thank you very much for the help. – Enrique Fernandez Apr 1 at 3:11
2

A tabstackengine approach. Column gap set with \setstacktabbedgap{}, and extra matrix vertical gap set by optional argument of \addstackgap (found in \zz definition).

If you wish to adjust the row spacing of the inner arrays, use \setstackgap{L}{<length>} to define the baselineskip.

\documentclass{article}
\usepackage{tabstackengine,array}
\setstacktabbedgap{1.5ex}% INTER-COLUMN GAP
\setlength\extrarowheight{3pt}
\newcommand\zz[1]{\addstackgap[5pt]{$\parenMatrixstack{#1}$}}
\begin{document}
\begin{table}[hbt!]
    \centering
    \begin{tabular}{ccc}
        \hline
             Description & Symbol & Value\\ \hline
             State-Space Matrix & $A$ & \zz {0 & 0 & 1.0 & 0\\ 0 & 0 & 0 & 1.0\\ 0 & 744.7 & -40.32 & 0\\ 0 & -1152.0 & 40.32 & 0} \\
             State-Space Matrix & $B$ & \zz{ 0\\ 0\\ 61.63\\ -61.63 }\\
             State-Space Matrix & $C$ & \zz{ 1.0 & 0 & 0 & 0\\ 0 & 1.0 & 0 & 0 }\\
             State-Space Matrix & $D$ & \zz{ 0\\ 0 }\\
             Open-loop Poles & $OL$ & \zz{ 0 & 0 & 0 & 0\\ 0 & -9.187+25.78{}\mathrm{i} & 0 & 0\\ 0 & 0 & -9.187-25.78{}\mathrm{i} & 0\\ 0 & 0 & 0 & -21.95}\\
        \hline
    \end{tabular}
    \caption{Pre-Lab Parameters}
\end{table}
\end{document}

enter image description here

  • The tabstackengine package worked just fine. Thank you for your time! – Enrique Fernandez Apr 1 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.