Graphics, Figures & Tablesbooktabs and @{\extracolsep{\fill}}

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
lauraf
Posts: 29
Joined: Tue Jan 13, 2009 12:44 pm

booktabs and @{\extracolsep{\fill}}

Post by lauraf »

Hi all,

I am having a problem using the package booktabs together with @{\extracolsep{\fill}}.

For example:

Code: Select all

\documentclass{article}

\usepackage{booktabs}

\begin{document}

\begin{center}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}llr}
\toprule
\multicolumn{2}{l}{Item} \\
\cmidrule{1-2}
Animal & Description & Price (\$) \\
\midrule
Gnat  & per gram & 13.65 \\
      & each     &  0.01 \\
Gnu   & stuffed  & 92.50 \\
Emu   & stuffed  & 33.33 \\
Armadillo & frozen & 8.99 \\
\bottomrule
\end{tabular*}
\end{center}

\end{document}
``Item'' is not aligned with the entries below it. I don't understand why. I have played around with various options but nothing seems to work :x

Does anybody know how to fix this?

Many thanks!
Laura

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply