I am brand new to LaTex, and I am trying to create a report displaying statistical data, for an academic publication.
The table is quite a large one, consisting of several nested columns, and is 23 cells wide in the data region (away from the titles etc). The publication is in A4 format, so the table has to fit into an A4 page (portrait format).
I remember reading somewhere that Serif fonts should NOT be used for tabular data, so at least I know that I have to use a san serif font. However, this is my first foray into using LaTeX, and would appreciate some advice from the more seasoned pros in here.
I would be very grateful if someone could recommend (best practise) font and font size to use for the column headers and cell data for such a table.
I have attached the table I am trying to create, hopefully, that helps.
Best Answer
None of the following is to contradict tohecz's comment above, especially regarding serif versus sans-serif fonts. But if you can't find a better table design, or can't do a landscape table, then you'll have to do more than just set a font size for the table. You'll probably have to:
You'll also want to read the documentation on the
booktabs
package for some advice on table layout, particularly on avoiding excess rules (and probably all vertical ones). And thesiunitx
package is good for aligning columns of measurements.One result using
booktabs
andsiunitx
, with dummy body text for size comparison:Annotated code, broken up for legibility and inline comments (but compiles fine in this form):
The resulting table is legible, but just barely fits in the margins provided. If you had more data or bigger margins, this table would rapidly approach what some people refer to as an "eye chart" table. At that point, you'd definitely have to change the requirements or move away from one giant table entirely. Maybe go to one table for males, one for females. Maybe just put a figure in with confidence interval bars or similar.