How do you create a comparison table like this?
In particular, the slanted labels that save space, and the circles / half-filled circles. These kinds of tables seem fairly common — is there a special package for creating tables like this?
Also, I think there already is a question about exactly the same kind of table, but unfortunately it had a title as vague as this one, so I wasn't able to find it.
Best Answer
Here's a partial reconstruction of the table.
Some comments.
\rot
to handle rotating the slanted labels. It uses\rotatebox[origin=br]{-60}
to rotate the label -60 degrees about the bottom right corner. That is placed inside an\hbox
that's1em
wide with infinite shrinkability on the left so that the label protrudes out the left side of the box.\LEFTcircle
and\CIRCLE
from thewasysym
package over and over, so I defined\feature
which takes a single argument (in this case, 0, 1, or 2) and produces the appropriate symbol. (Based on the footnotes, I probably should have called it\property
instead.)array
package, I created a new column typeG
(for group) that corresponds to three centered columns with no intercolumn space. I also defined\f
which takes three digits and produces the three features (properties) for a group. (I probably should have gone with\g
to stick with group rather than\f
for features.)array
specifier!
to insert an extra\kern1em
between those columns.\ex
(which was to stand for example, but on reflection, something related to scheme would have been better) which takes 9 arguments. The first 3 correspond to the scheme, marks, and example. The remaining 6 expect 3 digits to pass to\f
. Finally, the 10th braced group is unbraced using\@firstofone
and then passed to\f
. I admit, that's kind of a hack, but it makes using\ex
easier.threeparttable
consists of a caption, the tabular, and the tablenotes below.booktabs
's\toprule
,\midrule
, and\bottomrule
to typeset the horizontal rules. (This looks much better than\hline
.)\hfil
s. I think it would look better to not center the notes.Scheme
is indented slightly for some reason in your example. I didn't understand the point of that, so I didn't do it. Adding\quad
(or some other horizontal spacing command) could reproduce that.-
in that column withNone
or maybe just leave it blank. I'd probably also replace the-
in the main columns with an en dash. I just think it looks better. Conveniently, you only have to replace-
with--
in\feature
to change it everywhere, including the table notes.Some metacomments.
symbols-a4
document (runtexdoc symbols-a4
).threeparttable
which I'd never used before so I took a stab at it.) Posting a minimal example demonstrating what you've tried and asking about particular elements you are stuck on works best. E.g., "How do I rotate the text in a cell of a table?"