7

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

lockstep
  • 250,273
gcbenison
  • 173

1 Answers1

11

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}
yo'
  • 51,322