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 want to make a table with rules that are thicker than the default. It's pretty straightforward to do, however the result looks bad: the lines have gaps in them (see image below). There must be a way to make this look better.

\documentclass{article}
\setlength{\arrayrulewidth}{2pt}
\begin{document}
  \begin{tabular}{|c|c|}
    \hline
    hello & world \cr
    \hline
    hello & world \cr
    \hline
  \end{tabular}
\end{document}

enter image description here

share|improve this question
    
Welcome to TeX.SX. –  Claudio Fiandrino Feb 16 '13 at 14:31
    
You might want to have a look at booktabs. It's a package designed to make nice tables. –  Alexander Feb 16 '13 at 14:38
3  

1 Answer 1

up vote 9 down vote accepted

Add \usepackage{array}. However, in general, vertical lines in tables are frowned upon and you should use them only if there's a good reason for it. As well, in LaTeX tabular-like environments, the macro \\ is prefered over \cr.

enter image description here

\documentclass{article}
\pagestyle{empty}
\setlength{\arrayrulewidth}{2pt}
\usepackage{array}
\begin{document}
  \begin{tabular}{|c|c|}
    \hline
    hello & world \\
    \hline
    hello & world \\
    \hline
  \end{tabular}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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