I tried to top align the cell for "Education" by \makecell[t]
and it didn't work out. So I tried to top align the whole table and used \begin{tabularx}{\linewidth}[t]
but it still didn't change anything. Though I only need "Education" to be top aligned, I would also be happy to know how to top align the whole table. Much appreciated in advance]1
\documentclass{article}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{makecell}
\begin{document}
\begin{table}[htbp]
\small
\caption{Definition of Variables}
\begin{tabularx}{\linewidth}[t]{ r X }
\toprule
Variable & Description \\
\midrule
SR1+ & Positive SR1 \\
SRdummy1 & Dummy variable that equals one if SR1 is positive and zero otherwise \\
SR2+ & Positive SR2 \\
SRdummy2 & Dummy variable that equals one if SR2 is positive and zero otherwise \\
LnInc & The Natural logarithm of the household income \\
Age & The age of the household head \\
\makecell[t]{Education} & \makecell[l]{The Education level of the household head;\\
equals 1 with level of non-educational; \\
equals 2 with level of primary school; \\
equals 3 with level of junior high school; \\
equals 4 with level of high school; \\
equals 5 with level of secondary/vocational school; \\
equals 6 with level of college/vocational; \\
equals 7 with level of undergraduate degree; \\
equals 8 with level of Master's degree; \\
equals 9 with level of PhD degree; } \\
Kid & The number of kids (age under 16) in the household \\
Old & The number of elders (age over 60) in the household \\
HHsize & Number of persons living together in the household \\
Male & Dummy variable that equals one if the household head is male and zero otherwise \\
Married & Dummy variable that equals one if the household head is married and zero otherwise \\
Party & Dummy variable that equals one if the household head is a member of the Communist Party of China and zero otherwise \\
Job & Dummy variable that equals one if the household head is employed and zero otherwise \\
House & Dummy variable that equals one if the household holds real estate asset and zero otherwise \\
\bottomrule
\end{tabularx}
\label{tab:definition}
\end{table}
\end{document}
Best Answer
There is no need for
makecell
here. The column has specifierX
that allows line breaks by\newline
:Example with indented follow-up lines:
If the vertical space allows it, a little separation between the entries looks nicer: