0

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
    Apr 26 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. Apr 26 at 6:52
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

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.