I made 100 of tabulars like this and never had this problem. I want to end the tabular with an \hline, but after that there is a new line with 2 lines. How do I get rid of it?

- & private & onzichtbaar voor de buitenwereld\\
+ & public & zichtbaar voor de buitenwereld \\
\# & protected & zichtbaar voor subklassen\\
$\sim$ & geen naam & zichtbaar voor alles in dezelfde package\\
\caption{Visibiliteit van toestand en gedrag}

Remove the second \centering (just before \end{tabular}) it is doing nothing other than causing a blank row.

| improve this answer | |
  • 1
    I knew it was going to be a stupid mistake... I didn't know you don't have to close the centering tag. – Aaron Dec 18 '12 at 13:55
  • 1
    @Aaron: As a rule of thumb, you only have to close something of the form \begin{...}. – Mohan Dec 18 '12 at 14:15
  • as Mohan said, also if you had done \begin{center} instead of the first \centering you would have needed the closing \end{center} to come after \end{tabular} so environment nesting works out correctly. – David Carlisle Dec 18 '12 at 14:18

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.