2

I'm currently drawing borders like so:

begin{tabular}{|c|c|c|}
 \hline
 a & b & c \\
 \hline
 d & e & f \\
 \hline
 g & i & j \\
 \hline
\end{tabular}

However, this requires a \hline between every row. Is there a concise, and preferable native, method of drawing all borders?

7
3

Since you say you are open to using a different table environment, try tabu. It has many options including \everyrow{}, which can be used to insert lines at every row.

\documentclass{article}
\usepackage{tabu}
\begin{document}
\everyrow{\hline}
\begin{tabu}{|c|c|c|}
  a & b & c \\
  d & e & f \\
  g & i & j \\
\end{tabu}
\end{document}
2
  • A slightly off-topic question. I have read that tabu has some bugs which will not be fixed until the next version. On ctan, the latest version appears to be from 2011, which indicates to be that the 'next version' is not out yet. Will any updates affect my work in the next year or so? – George Tian Sep 4 '18 at 11:43
  • @GeorgeTian, yes I gather that tabu has some issues, and not everyone is a fan. I use it often though and don't have problems. I think it's more or less abandoned by its developer, so I wouldn't hold my breath for updates. – David Purton Sep 4 '18 at 11:54

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.