2

Consider the following minimal working example

\documentclass[10pt]{article}
\usepackage{amsmath}

\usepackage{booktabs}
\begin{document}
\begin{table}
\begin{center}
\begin{tabular}{p{3cm}p{4cm}}
\toprule
variables & definition \tabularnewline
\midrule
Tobin's $q$ & \(\displaystyle \frac{\text{MVCS} + \text{MVPS} + \text{DEBT}}{\text{book\ value\ of\ assets}}\)\tabularnewline
\bottomrule
\end{tabular}
\end{center}
\end{table}
\end{document}

whose output is as follows

enter image description here

Now, I would rather have the cell contents aligned on top, as in

enter image description here

How do I achieve this?

2
  • I think your cell contents are already aligned top.
    – hesham
    Commented Jun 13, 2020 at 14:58
  • Perhaps just the uncommon math display style that you are using is what makes it seems not aligned top.
    – hesham
    Commented Jun 13, 2020 at 15:01

2 Answers 2

3

The following custom command can be used to remove the tabular management of the line spacing

\newcommand{\notopspacing}[1]{\raisebox{\dimexpr\arraystretch\ht\strutbox-\height\relax}{#1}}

Applying this command to your code (as it is)

\documentclass[10pt]{article}
\usepackage{amsmath}
\newcommand{\notopspacing}[1]{\raisebox{\dimexpr\arraystretch\ht\strutbox-\height\relax}{#1}}
\usepackage{booktabs}
\begin{document}
    \begin{table}
    \begin{center}
    \begin{tabular}{p{3cm}p{4cm}}
    \toprule
    variables & definition \tabularnewline
    \midrule
    \notopspacing{Tobin's $q$} & \notopspacing{\(\displaystyle \frac{\text{MVCS} + \text{MVPS} + \text{DEBT}}{\text{book\ value\ of\ assets}}\)} \tabularnewline
    \bottomrule
    \end{tabular}
    \end{center}
    \end{table}
\end{document}

Gives the following output

enter image description here

Note that there are lots of improvements you should carry out in your code! (other answers only show some)

4

Math mode and \frac put the baseline at (slightly below) the center. This solution uses a second tabular to achieve the desired effect.

Note, unless you want to specify the widths, you don't need p columns for the outer tabular in this case.

\documentclass[10pt]{article}
\usepackage{amsmath}

\usepackage{booktabs}
\begin{document}
\begin{table}
\begin{center}
\begin{tabular}{p{3cm}p{4cm}}
\toprule
variables & definition \tabularnewline
\midrule
Tobin's $q$ & \begin{tabular}[t]{@{}c@{}}
  MVCS + MVPS + DEBT \\
  \hline
  book value of assets
\end{tabular}\\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .