Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

\documentclass[10pt,DIV=12,a4paper,numbers=noenddot]{scrreprt}


\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{booktabs} % To thicken table lines

\begin{document}

\begin{table}
    \begin{tabular}{ll}
    \topline
    Header 1 & Header 2\\
    \midline
    Body 1 & Body 2\\
    Body 3 & Body 4\\
    \bottomline
    \end{tabular}
    \end{table}

\end{document}

Here is the latex output:

http://www.text-upload.com/read.php?id=367245&c=7201095

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?

share|improve this 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
add comment

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.

1 Answer

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

share|improve this answer
    
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
add comment

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