Ok, I've looked at this code too long and need some fresh eyes and ideas.
Question: Why do I get too long vertical lines on my LaTeX table?
Please note that I've not experiencing any problems with the above code on online compilers such as http://docs.latexlab.org/docs
I'm using the texi2pdf in order to compile my document on Mac OSX Snow Leopard.
Code:
\begin{table}[h]
\begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}
\hline
ContainsPrize & \multicolumn{3}{|c|}{A} & \multicolumn{3}{|c|}{B} & \multicolumn{3}{|c|}{C} \\ \hline
MyChoice & A & B & C & A & B & C & A & B & C \\ \hline
openA & 0 & 0 & 0 & 0 & 0.5 & 1 & 0 & 1 & 0.5 \\
openB & 0.5 & 0 & 1 & 0 & 0 & 0 & 1 & 0 & 0.5 \\
openC & 0.5 & 1 & 0 & 1 & 0.5 & 0 & 0 & 0 & 0 \\
\hline
\end{tabular}
\caption{A nice caption text here...}
\end{table}
Which generates:
Any ideas? Buggy compiler? Alternatives?
Best Answer
This is tricky. What you have is actually a 3-dimensional table that you want to represent as a 2-dimensional image on the page. There are 3 input values and 3³ = 27 output values.
I think what you want here is Occam's Razor...
For example:
You could even play around with removing the vertical rules entirely and replacing them with vertical whitespace:
Maybe even rewrite the zeros as dashes, if the data still happens to make sense that way...
Note: I'm not sure that the latter two forms are actually clearer, even though they are less complex for the eyes to process. The reason is that, as mentioned earlier, this is inherently a 3-dimensional table with 27 values. The final two forms — which use horizontal rules only — muddy the dimensionality as they lead the eye to scan left-to-right. Compare and contrast this with the second form, in which the double-stroked rules serve to separate the three 3x3 grids from the labels above and to the left.
As much as I dislike vertical rules and double-stroked rules in general, I think the second form might actually be the clearest of the five shown here. I'd be curious to hear your thoughts.
In any event, below is the LaTeX source for the samples above.