2

I'm a LaTeX beginner. I know (somewhat) how to make a traditional table but I cannot figure out how to reproduce this table. table 1

I would very much appreciate if someone could show me how this kind of table is drawn. Thank you!

\documentclass[11pt]{article}

\setlength{\parskip}{1em}
\setlength{\parindent}{1em}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{graphicx}

\usepackage{caption}
\usepackage{comment}

\usepackage{ftnxtra}

\usepackage{array}

\usepackage{tabu}


\begin{document}

\renewcommand{\linespread}{1.1mm}

\begin{table}[t]{\textbf{Table 1}\\}

\begin{tabular}{ | l | l | l | p{2.25cm} |}

\hline
Country & Survey Year & 1 Percent Tax on Wealthiest 10 Percent of Households & Progressive Tax Rate Schedule: 1 Percent on Top 10 Percent and Additional 1 Percent on Top 5 Percent \\

\hline

\hline Canada & 1999 & 0.6 & 1.1 \\ 

\hline Germany & 2006 & 1.1 & 2.0 \\ 

\hline Italy & 2004 & 1.0 & 1.7 \\ 

\hline Japan & 2003 & 1.2 & 2.0 \\

\hline United Kingdom & 2000 & 0.8 & 1.3 \\ 

\hline United States & 2006 & 1.1 & 3.1 \\ 

\hline Unweighted Average & \textemdash & 1.1 & 1.9 \\ 

\hline

\end{tabular}

\end{document}
3
  • Please do not use ``` for each line, mark the whole code and press CTRL+K then. There's also an \end{table} missing. Do you really need to change the linespread?
    – user31729
    Aug 3, 2015 at 22:27
  • If you know where to break the lines, just enter them in column order. Another trick is to use \multicolumn for only one column (to change l to p). Aug 3, 2015 at 22:56
  • Oh, and you can also use \parbox[b] inside the tabular. Aug 4, 2015 at 1:42

2 Answers 2

3

Here are two ways — breaking lines in cells with the makecell package; we also can give a common formatting, alignment, &c. to cells introduced by the commands \thead and \makecell. Btw, you shouldn't set both \parskip and \parindent to a non-zero value. Also, \linespread is a factor, not a length.

With vertical lines:

\documentclass[11pt]{article}
\usepackage{geometry}
\setlength{\parskip}{1em}
\setlength{\parindent}{1em}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{graphicx}

\usepackage{caption}
\captionsetup{font ={bf, sf}}
\usepackage{comment}

\usepackage{ftnxtra}

\usepackage{array}
\usepackage{makecell}
\renewcommand\theadalign{bc}

\begin{document}

\begin{table}[t]
  \sffamily\renewcommand{\arraystretch}{1.25}
  \caption{A first table}
  \begin{tabular}{ | l | *{3}{c|} }
    \hline
    Country & Survey Year & \thead{1 Percent Tax on Wealthiest & \\ 10 Percent of Households} & \thead{Progressive Tax Rate Schedule:\\ 1 Percent on Top 10 Percent and\\ Additional 1 Percent on Top 5 Percent} \\
    \hline\noalign{\vskip0.667ex}
    \hline
    Canada & 1999 & 0.6 & 1.1 \\
    \hline
    Germany & 2006 & 1.1 & 2.0 \\
    \hline
    Italy & 2004 & 1.0 & 1.7 \\
    \hline
    Japan & 2003 & 1.2 & 2.0 \\
    \hline
    United Kingdom & 2000 & 0.8 & 1.3 \\
    \hline
    United States & 2006 & 1.1 & 3.1 \\
    \hline
    Unweighted Average & \textemdash & 1.1 & 1.9 \\
    \hline
  \end{tabular}
\end{table}

\end{document} 

enter image description here

Without vertical lines, using booktabs: in the opinion of many, it looks more professional:

\documentclass[11pt]{article}
\usepackage{geometry}
\setlength{\parskip}{1em}
\setlength{\parindent}{1em}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{graphicx}

\usepackage{caption}
\captionsetup{font ={bf, sf}, singlelinecheck=off}
\usepackage{comment}

\usepackage{ftnxtra}

\usepackage{array, booktabs}
\usepackage{makecell}
\renewcommand\theadalign{bc}

\begin{document}

\begin{table}[t]
  \sffamily\renewcommand{\arraystretch}{1.25}
  \caption{A first table}
  \begin{tabular}{ @{\,}l *{3}{c}@{\,} }
    \toprule
    Country & Survey Year & \thead{1 Percent Tax on Wealthiest \\ 10 Percent of Households} & \thead{Progressive Tax Rate Schedule:\\ 1 Percent on Top 10 Percent and\\ Additional 1 Percent on Top 5 Percent} \\
    \midrule
    Canada & 1999 & 0.6 & 1.1 \\
    Germany & 2006 & 1.1 & 2.0 \\
    Italy & 2004 & 1.0 & 1.7 \\
    Japan & 2003 & 1.2 & 2.0 \\
    United Kingdom & 2000 & 0.8 & 1.3 \\
    United States & 2006 & 1.1 & 3.1 \\
    \addlinespace
    Unweighted Average & \textemdash & 1.1 & 1.9 \\
    \bottomrule
  \end{tabular}
\end{table}

\end{document} 

enter image description here

1

This version uses manual line breaks. Not sure why you want to use all these packages and not use booktabs.

\documentclass[11pt]{article}
\setlength{\parskip}{1em}
\setlength{\parindent}{1em}
\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage{graphicx}
\usepackage{caption}
%\usepackage{comment}
%\usepackage{ftnxtra}
%\usepackage{array}
%\usepackage{tabu}

\begin{document}
\renewcommand{\linespread}{1.1mm}
\begin{table}[t]
\caption{}
\tiny
\centering\begin{tabular}{|l|c|c|c|}
\hline
 &&& Progressive Tax Rate Schedule: \\
 && 1 Percent Tax on Wealthiest & 1 Percent on Top 10 Percent and \\
Country & Survey Year &  10 Percent of Households & Additional 1 Percent on Top 5 Percent \\
\hline
Canada & 1999 & 0.6 & 1.1 \\ 
Germany & 2006 & 1.1 & 2.0 \\ 
Italy & 2004 & 1.0 & 1.7 \\ 
Japan & 2003 & 1.2 & 2.0 \\
United Kingdom & 2000 & 0.8 & 1.3 \\ 
United States & 2006 & 1.1 & 3.1 \\ 
\hline
Unweighted Average & \textemdash & 1.1 & 1.9 \\ 
\hline
\end{tabular}
\end{table}
\end{document}

table

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .