Missing lines in tabular with minimal.cls

If I replace the class by minimal in the code below for a very simple table, the vertical line disappears. Why?

\documentclass{article}
\begin{document}
\begin{tabular}{c|c}
a&b\\
c&d
\end{tabular}
\end{document}

-

1 Answer

That's because minimal.cls does not contain an assignment to the length \arrayrulewidth controlling the "width" of rules in tabulars. This dimension is created in the LaTeX kernel (with a value of 0pt) but each class has to assign it a convenient positive value if the rules are to actually appear; the standard assignment (see, for example, article.cls) is \setlength\arrayrulewidth{.4\p@}.

Providing a suitable assignment will cause the rules to appear (of course, you will also have to assign values to \tabcolsep and \arraycolsep (for array environments) to obtain a proper spacing):

\documentclass{minimal}

\setlength\arraycolsep{5pt}
\setlength\tabcolsep{6pt}
\setlength\arrayrulewidth{.4pt}

\begin{document}

\begin{tabular}{|c|}
text
\end{tabular}
\end{document}

-
Great! Thank you @Gonzalo. Normally I'd wait 24h before accepting, but here, I think that it is clearly the answer. I think that @Yiannis Lazarides will be interested, since it was one of his answers that prompted this question of mine. –  Bruno Le Floch Mar 11 '11 at 4:20
@Bruno: That's why I keep telling people not to use minimal for minimal working examples, even when the name sound like it. –  Martin Scharrer Mar 11 '11 at 8:33
@Bruno Le Floch ... eventually the mystery disappeared:) –  Yiannis Lazarides Mar 11 '11 at 11:11