1

I am using tabular environment inside a description environment like:

\item[This is some description]
  \begin{tabular}{ll}
   apple:       &  200g \\
   pear:        &  206g \\
   banana:      &  114g \\
   orange:      &  150g \\
   grapefruit:  &  350g 
 \end{tabular}

 \lipsum[1]

However, the table then is not vertically aligned with the description label (see image).

How can this be achieved?

enter image description here

2
  • 3
    Try \item[This is some description] \begin{tabular}[t]{ll} (observe added [t] at table.
    – Zarko
    Commented Apr 26, 2021 at 6:22
  • Ah, that was easy, thank you! :) If you want to make this an answer also explaining the meaning of said parameter t I will accept. Commented Apr 26, 2021 at 6:52

1 Answer 1

2

The standard form for tabular is

\begin{tabular}[pos]{table spec}

where [pos] is option for position of its baseline: [t] at top, [b] at bottom and c at the vertical center, which is default. For details see LaTeX/Tables.

In your case, the MWE is:

\documentclass{article}
\usepackage{lipsum}

\begin{document}
    \begin{description}
\item[This is some description]
  \begin{tabular}[t]{ll}
   apple:       &  200g \\
   pear:        &  206g \\
   banana:      &  114g \\
   orange:      &  150g \\
   grapefruit:  &  350g
 \end{tabular}

 \lipsum[1]
     \end{description}
\end{document}

which produce:

enter image description here

You must log in to answer this question.

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