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.

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}
share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

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}
share|improve this answer
    
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
3  
@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
add comment

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.