title: How to fit a table to the width of the page?
body: <p>Im trying to create a latex table using overleaf. How can I fit this table to be shown on one page? Attached is a picture that shows how my table is currently looking like.</p>
  <pre><code>\documentclass{article}
  \usepackage{booktabs}
  \usepackage{dcolumn}
  \begin{document}
  \begin{table}[ht]
  \caption{Summary Statistics and Sell in May Effect}
  \centering
  \begin{tabular}{c c c c c c c c c c}
  \hline\hline 
   &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; t-Values of &amp; t-Values of January\\ [0.5ex]
    &amp;   &amp;   &amp;  &amp;  &amp;  &amp;  &amp; Adjusted Sell &amp; Dummy with\\
      &amp;  &amp;  &amp;  &amp;  &amp; &amp; t-Values of Sell in &amp; in May &amp; Adjusted Sell\\
        &amp;  &amp;  &amp; Mean &amp;  &amp;  &amp; May Dummy &amp; Dummy with &amp; in May Dummy\\
       Country &amp; Period &amp; Observations &amp; Return &amp; Deviation &amp; Alpha1 &amp; (No January 
       Effect) &amp; January Effect &amp; in May Dummy\\
  \hline
  1 &amp; 50 &amp; 837 &amp; 970 \\
  2 &amp; 47 &amp; 877 &amp; 230 \\
  3 &amp; 31 &amp; 25 &amp; 415 \\
  4 &amp; 35 &amp; 144 &amp; 2356 \\
  5 &amp; 45 &amp; 300 &amp; 556 \\ [1ex]
  \hline
  \end{tabular}
  \label{table:nonlin} % is used to refer this table in the text
  \end{table}
  \end{document}
  </code></pre>
  <p><img src="https://i.stack.imgur.com/HFmlu.png" alt="Current table" /></p>