0

I am writing a multipage table using the \longtable package, and it includes equations within the cells of one columns. Since I want to preserve the document equation enumeration for later referencing within the text, I wrapped the equations around a \parbox.

The vertical centering is correct in the equations column, but problem arises with the neighboring cells; which I cannot manage to center vertically.

I tried the following suggestions without success:

I provide a minimal working example here:

\documentclass{article}

% ----- Definition of used packages \usepackage{amsmath, amsthm, amsfonts} \usepackage{fullpage} % To eliminate blank margins around text \usepackage[makeroom]{cancel} % To cancel equations \usepackage{siunitx} % To print SI units \usepackage[table]{xcolor} % Provides colors \usepackage{longtable, array} % For the inclusion of larger tables

\begin{document}

\newcommand\eqcolsep{8cm}

\begin{equation} a = b + c \end{equation}

\begin{center} \rowcolors{1}{}{lightgray} % Alternate coloring of rows \renewcommand{\arraystretch}{1.5} % Change upper-lower margin \begin{longtable}{ m{5cm} m{\eqcolsep} m{2cm} } \hline \textbf{Parameter} & \centering \textbf{Equation} & \textbf{Units} \ \hline \parbox{5cm}{ This is fancy description for the equation on the right side } & \parbox{\eqcolsep}{ \begin{equation} \begin{split} a = \frac{a}{b} + \ \frac{c}{d} \label{eqn:eqn1} \end{split} \end{equation} } & \si{\meter\kilogram\squared} \ %\vspace{1mm} \hiderowcolors \caption{ Summary of parameters } \label{tab:params} \end{longtable} \end{center}

The Eq. \ref{eqn:eqn1} was used here.

\end{document}

enter image description here

I would really appreaciate if someone could suggest some way to do it without adding extra packages. Thanks in advance.

wdsgn
  • 311
  • 1
    Cells in columns that use the m specifier are already typeset inside parboxes. There's no need for another parbox. I think having one parbox within the other is what is confusing it. Just take out the inner parboxes and I think you'll get what you want. If not, give more details. – frabjous Jun 29 '22 at 20:17
  • @frabjous, thanks :). This solved the issue! I did not know that the specifier m already includes a parbox. – wdsgn Jun 30 '22 at 08:30

0 Answers0