# Set imported table width

I'm importing tables from stata into LaTeX, by using \import{C:/Users/.../filename.tex. This works completly fine, however, since I have some tables that don't fit on the page I want to adjust the fontsize for all tables. I've tried to wrap the tables in tabular and tried various different packages, but so far nothing helped my. So I would really appriciate it if you know how to adjust the fontsize of the table, or maybe scale them.

I've read this question which is similar, but I couldn't find an awnser without adjusting anything in the input file.

My code so far looks like this: Main document:

\documentclass[12pt]{article}
\usepackage{booktabs}
\begin{document}
...
\input{C:/Users/.../PrePostCrisisSector.tex}
...
\end{document}


Input file:

\begin{table}[htbp]\centering
\def\sym#1{\ifmmode^{#1}\else$$^{#1}$$\fi}
\caption{Sector return pre- and post crisis\label{PrePostSCrisis}}
\begin{tabular}{l*{1}{{r}{r}{r}{r}{r}{r}{r}{r}}}
\toprule
&PreCrisisSREITs&PreSCrisisReturn&PreSCrisisSD&PreSCrisisSharpe&PostCrisisSREITs&PostSCrisisReturn&PostSCrisisSD&PostSCrisisSharpe\\
\midrule
Diversified         &          58&        1.15&     14.0868&      0.0817&            &      2.1087&     14.3411&      0.1470\\
Health Care         &          77&        3.65&     11.0185&      0.3315&            &      2.8137&     12.0343&      0.2338\\
Hotel               &          70&       -0.06&     13.9054&     -0.0045&            &      1.3071&     18.5116&      0.0706\\
Industrial          &          49&        1.15&     11.1171&      0.1035&            &      2.9184&     13.7818&      0.2118\\
Manufactured Home   &          80&        1.10&      8.7773&      0.1250&            &      5.1106&      9.9770&      0.5122\\
Multifamily         &          74&        1.22&     17.3891&      0.0701&            &      2.9535&     14.2079&      0.2079\\
Office              &          67&        2.06&     12.0812&      0.1708&            &      2.2114&     11.5217&      0.1919\\
Other Retail        &          72&        1.55&     13.3247&      0.1163&            &      2.4823&     11.2678&      0.2203\\
Regional Mall       &          46&        1.09&     14.8050&      0.0739&            &      2.6113&     13.2250&      0.1974\\
Self-Storage        &          80&        2.33&     10.3806&      0.2241&            &      5.0595&     12.5498&      0.4032\\
Shopping Center     &          70&        2.95&     10.5588&      0.2795&            &      2.0632&     13.6709&      0.1509\\
Specialty           &          78&        3.12&      9.0598&      0.3446&            &      2.8542&     15.5647&      0.1834\\
Total               &            &        1.74&     12.6424&      0.1486&            &      2.4443&     13.9503&      0.1815\\
\bottomrule
\end{tabular}
\end{table}

• Welcome to TeX.SX! Please make your example compilable. – TeXnician Nov 16 '17 at 10:37
• Sorry, what do you mean? I'm fairly new to all of this. – Sukaldi Nov 16 '17 at 11:13
• That means that you should not include/input any files, but just c&p it into your main file and add all required packages to compile. – TeXnician Nov 16 '17 at 16:21

I'd reconsider if you really want that table included without changing anything. I had to remove all margins and set font size to tiny to get it on the page at all!

Also, adjusting margins for one table without changing the table definition is going to be a challenge, I guess.

\documentclass[12pt]{article}
\usepackage{booktabs}

\usepackage{geometry}

% From https://tex.stackexchange.com/a/27100/98850
\usepackage{floatrow}
\DeclareFloatFont{tiny}{\tiny}% "scriptsize" is defined by floatrow, "tiny" not
\floatsetup[table]{font=tiny}