I'm trying to create a table with horizontal and vertical lines, but the lines aren't meeting in the corners and I can't work out why. Can anyone point out what I'm doing wrong?
\documentclass[a4paper,10pt]{report}
\usepackage{booktabs}
\begin{document}
\begin{tabular} { | r | p{2cm} | p{2cm} | }
\toprule
\# & One & Two \\
\midrule
1 & alpha & bravo \\
2 & apple & banana \\
\bottomrule
\end{tabular}
\end{document}
Running this through a few different versions of pdflatex always produces this output, in Acrobat Reader and evince:
How do I get the horizontal and vertical lines to meet?
booktabs
manual explains that these should not be used, and also that they will not work with its rules. If you do want to create a grid, use the LaTeX horizontal line system.\toprule
and\bottomrule
draw a heavier rule than\midrule
. This is a really good feature ofbooktabs
(also the spacing is especially cared for), but it's of course incompatible with vertical rules. Simply don't use vertical rules and your table will be prettier.