I'm trying to fit tables to page-width that I include in the .tex document via the /input method. I'm doing this because I'm exporting tables from Stata to Latex with the estout methods, and include these tables into my document. However, some tables are too wide and I'd like to scale them down to make them fit.
I think this question is different from many questions that ask to fit tables because I'm calling the table through the /input{} method. However, I'm a beginner in Latex and might just not have tried the right things yet.
Ideally, i don't want to change the stata latex output manually but rather have either a) some option in Stata estout or b) some latex code in the main document.
Thanks in advance for any help!
The main document:
\documentclass[•]{article}
\usepackage{booktabs}
\begin{document}
\input{tables/desstat_behav_corr}
\end{document}
And the input document:
\begin{table}[htbp]
\centering
\caption{Pairwise correlations of behavioural variables}
\begin{tabular*}{\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{8}{c}}
\toprule &\multicolumn{8}{c}{} \\
& ceo\_age& cfo\_age&CapIQ\_CEOfixed\_to\_total&CapIQ\_CEObonus\_to\_total&CapIQ\_CEOlongterm\_to\_total&CapIQ\_CFOfixed\_to\_total&CapIQ\_CFObonus\_to\_total&CapIQ\_CFOlongterm\_to\_total\\
\midrule
ceo\_age & 1& & & & & & & \\
cfo\_age & 0.260& 1& & & & & & \\
CapIQ\_CEOfixed\_to\_total& 0.0202& -0.0563& 1& & & & & \\
CapIQ\_CEObonus\_to\_total& 0.0323& 0.0844& -0.442& 1& & & & \\
CapIQ\_CEOlongterm\_to\_total& 0.00911& 0.0740& -0.316& 0.0130& 1& & & \\
CapIQ\_CFOfixed\_to\_total& -0.0748& -0.0879& 0.673& -0.308& -0.279& 1& & \\
CapIQ\_CFObonus\_to\_total& 0.0708& 0.0534& -0.380& 0.794& -0.0360& -0.361& 1& \\
CapIQ\_CFOlongterm\_to\_total& 0.0766& 0.0395& -0.318& -0.0245& 0.814& -0.325& -0.0415& 1\\
\bottomrule
\end{tabular*}
\end{table}

I get the error message:
#1 Latex error: not in outer par mode #2 Undefined control sequence #3 Missing number, treated as zero
How do I use it correctly?
– Yimmer Nov 18 '13 at 22:37tablesince that is a float. It must be done on thetabular. Also, I recommend the use oftabularnottabular*, since the latter will limit the rules to the\textwidthbut not the tabular contents. – Steven B. Segletes Nov 18 '13 at 22:51CapIQ_CFOtext from each entry. – Steven B. Segletes Nov 18 '13 at 22:56