I'm trying to put a table inside a list environment but without success. I'd like to have the table inside the item (matching \linewidth
) and not floating in the next page.
\begin{description}
\item[Lorem ipsum] \hfill \\
Lorem ipsum dolor sit amet...
\item[Lorem ipsum] \hfill \\
\begin{table}[h]
\centering
\caption{Foobar}
\label{tab:foobar}
\begin{tabular}{@{}ll@{}}
\toprule
\textbf{foo} & \textbf{bar} \\
\midrule
Lorem ipsum & foo \\
Lorem ipsum & bar \\
\bottomrule
\end{tabular}
\end{table}
\end{description}
How can this be achieved?
table
environment. – Peter Grill Feb 11 '14 at 0:17