I am trying to use the package booktabs to make my tables look nicer. However, Latex gives me an error whenever I use \toprule \midrule or \bottomrule. Here is a simple example I created:



\usepackage{booktabs} % To thicken table lines


    Header 1 & Header 2\\
    Body 1 & Body 2\\
    Body 3 & Body 4\\


Here is the latex output:


I also browsed to /usr/local/texlive/2011/texmf-dist/tex/latex/ to check if the package is really there. And it is. I cannot see why latex is throwing these errors. Can anyone help?

closed as too localized by egreg, lockstep, Paulo Cereda, Brent.Longborough, doncherry May 16 '12 at 15:52

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • As you write in the title, the commands are \toprule, \midrule and \bottomrule, not the \topline, \midline and \bottomline that you're using in the table. – egreg May 16 '12 at 15:31
  • 1
    Why is this closed? I'm having the exact issue mentioned in the question. – Kelly S. French Nov 8 '16 at 15:49
  • You might be here looking for this answer regarding \toprule undefined control sequence. – Miladiouss Nov 13 at 0:07

Change \topline to \toprule, and same with mid and bottom counterparts.

  • oh gosh. that worked. I found that example online in a forum and guessed it was working. So I looked for the error at my site. Many thanks. It looked like missed the forest for the trees... – Josh May 16 '12 at 15:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.