1

I'm trying to mimic the design of this table:

enter image description here

Any advice?

Brian
  • 253

1 Answers1

2

In Order to mimic the design of this table, you will need:

  • booktabs for the horizontal lines (\cmidrule for the shortened versions; See here for bold lines)

  • multicolumn for the headings (e.g. for your first row \multicolum{5}{c}{\textbf{Model 1: Total sample})

  • siunitx for numbers aligned with their decimal points (see the S column), or numprint (n and N column types)

  • \textbf{} for bold text and \textit{} for italic text and/or

  • makecell to have a global formatting of specific cells, using its thead and makecell commands

  • arydashln for the dashed horizontal lines, though I think midruule from the booktabs package would look better.

  • caption for the bold caption (and search this side on how to achieve "Table F" instead of "Table 1.1"

  • Some time to typeset all this

Maybe you need packages like pgfplotstable if you like to input your data with .dat or .txt or .csv-files.

All of this packed in a tabular environment. If you are having concerns about the small ticks below the fourth horizontal line, you should write (or search for) an own question on this topic. However, the documentation of booktabs (Terminal - texdoc booktabs) shows easy and beautiful ways to go without such things.

LaRiFaRi
  • 43,807
  • Perhaps you could add a multicolumn example, cf. the comments to the question. – Torbjørn T. May 06 '14 at 13:45
  • This table is not so well done: the headers in the variable line are misplaced with respect to the numbers in their columns. – Bernard May 06 '14 at 14:02
  • @Bernard just add it to my answer. S column with {\emph{coeff}} would be right, I guess. – LaRiFaRi May 06 '14 at 14:18
  • @Larifari: I would raher use the thead command, from makecell: you can declare globally font characteristics, alignment (vertical and horizontal) and vertical spacing in the preamble. Your didn't mention the arydshln package for the dashed line, though I suspect it was employed in place of a thinner line as booktabs provides. – Bernard May 06 '14 at 14:24
  • @Bernard Don't know this. But pls feel free to edit. – LaRiFaRi May 06 '14 at 14:31
  • LaRiFaRi, in my table when I use \textbf{} on some of the numbers, these numbers are no longer aligned by the decimal point. Any help? – Brian May 09 '14 at 13:25
  • http://tex.stackexchange.com/questions/2766/siunitx-aligning-numbers-by-decimal-points-in-tables-doesnt-work-for-bolded-or – LaRiFaRi May 09 '14 at 18:42
  • Or for single values http://tex.stackexchange.com/questions/66253/siunitx-bold-single-numeric-cells. Please use the search function on this page. I found these two and others in seconds. – LaRiFaRi May 09 '14 at 18:46