1

I have been trying to create a table using the following code but the table is going out of the page (horizontally):

\begin{table} [!htbp]
\centering
\begin{tabular}{lccccc}
\toprule
Variable &  No. of Observations & Mean  & Std. Deviation &  Minimum & Maximum\\
\midrule
Unpaid Household Work & 343,59 &    665.55 &    359.82 &    0 & 2820\\
Unpaid Care Work &  343,678 &   128.49 &    211.72 &    0 & 1650\\
Unpaid Domestic Work &  343,706 & 538.43 &  243.05 &    0 & 2130\\
Dependency Ratio &  335,726 &   0.19    & 0.41 &    0   & 18\\
Sex Ratio & 324,363 &   1.43 &  0.99    & 0 &   7.41\\
Monthly Consumption Expenditure (INR) & 344,926 & 12975.12  & 7955.47 & 700 &   131833\\
\bottomrule
\end{tabular}
\caption{Summary Statistics of All Continuous Variables.}
\end{table}

enter image description here

Mico
  • 506,678

1 Answers1

1

I suggest you switch from a tabular to a tabularx environment (with a target width of \textwidth), and then (a) allow automatic line breaking in the first column, and (b) abbreviate 4 of the 5 data column headers.

enter image description here

\documentclass{article}
\usepackage{booktabs}
\usepackage{tabularx,ragged2e}
% 'L' column type: suppress full justification, perform hanging indentation
\newcolumntype{L}{>{\RaggedRight \hangafter=1 \hangindent=1em}X}

\begin{document}

\begin{table} [!htbp]

\begin{tabularx}{\textwidth}{@{} L ccccc @{}} \toprule Variable & No.\ of Obs. & Mean & St.\ Dev. & Min. & Max. \ \midrule Unpaid household work & 343,59 & 665.55 & 359.82 & 0 & 2820\ Unpaid care work & 343,678 & 128.49 & 211.72 & 0 & 1650\ Unpaid domestic work & 343,706 & 538.43 & 243.05 & 0 & 2130\ Dependency ratio & 335,726 & 0.19 & 0.41 & 0 & 18\ Sex ratio & 324,363 & 1.43 & 0.99 & 0 & 7.41\ Monthly consumption expenditure (INR) & 344,926 & 12975.12 & 7955.47 & 700 & 131833\ \bottomrule \end{tabularx} \caption{Summary statistics of all continuous variables.} \end{table}

\end{document}

Mico
  • 506,678