[Tex/LaTex] fit table on page width

tableswidth

I am having problems trying to fit a table on page width. Here is a part of my code.

\begin{landscape}
\begin{table}[H] \scriptsize 
\setkeys{Gin}{keepaspectratio}
\resizebox*{1.8\textwidth}{2\textheight} {
   % \begin{adjustbox}{width=1.3\textwidth,center}
        \begin{tabular}{*{12}{ | c}}
    \toprule
...
    \bottomrule
  \end{tabular}
        }
    %\end{adjustbox}

\end{table}
\end{landscape}

T tried with adjustbox but it doesn't work (adjustbox.sty not found).

I use Texmaker (4.01) on Ubuntu 12.03 LTS.

Best Answer

Please always post complete small documents that show the problem. It is hard to offer advice for such a frament however

\begin{table}[H] 

avoid using H as it disables the float mechanism (which is the whole point of the table environment)

{1.8\textwidth}{2\textheight}

You should avoid scaling tables as it makes inconsistent font sizes, better to use \small or another suitable size (I see you have tried \scriptsize but teh \resizebox would negate any effects of the size change. But here you are scaling the table to be twice as big as the page so it has no chance of fitting.

You are using c columns which are as wide as their widest entry, perhaps you want p{1cm} columns for some width, to allow text in the entries to wrap to multiple lines. It is impossible to say given your fragment.