I got two tables, one underneath the other, with the following code.
\documentclass[12pt,a4paper,bibtotoc,headsepline,smallheadings,oneside,openright,fleqn,appendixprefix,BCOR5mm]{scrbook}
\usepackage[plainpages=false,pdfpagelabels=true,colorlinks=true,linkcolor=black,citecolor=black,bookmarksopen=true]{hyperref} % Verweise werden im PDF zu Hyperlinks
\usepackage{booktabs}
\usepackage{amssymb}
\usepackage{setspace} % Einstellen des Zeilenabstandes
\usepackage{adjustbox}
\onehalfspacing % Zeilenabstand setzen (alternativ: onehalfspacing, doublespacing)
\begin{document}
\begin{center}
\resizebox{\textwidth}{!}{%
\begin{tabular}{p{4cm}p{2cm}p{4cm}p{2cm}}
\toprule
\textbf{Dep. Variable:} & Churner & \textbf{ No. Observations: } & 73727 \\
\textbf{Model:} & Logit & \textbf{ Df Residuals: } & 73721 \\
\textbf{Pseudo R-squ.: } & 0.3770 & \textbf{ Df Model: } & 5 \\
\textbf{Log-Likelihood: } & -31347. & \textbf{ converged:} & True \\
\textbf{LL-Null: } & -50315. & & \\
\bottomrule
\end{tabular}}
\resizebox{\textwidth}{!}{%
\begin{tabular}{p{5cm}p{2cm}p{2cm}p{2cm}p{2cm}p{2cm}p{2cm}p{2cm}}
& \textbf{coef} & \textbf{std err} & \textbf{z} & \textbf{P$>$$|$z$|$} & \textbf{beob. \newline Einfluss} & \textbf{erw. \newline Einfluss} & \textbf{Verwerfung \newline der Hypothese?} \\
\midrule
\textbf{const} & 1.6021 & 0.021 & 76.116 & 0.000 & & & \\
\bottomrule
\end{tabular}}
\end{center}
\end{document}
Giving me the following output
I want to have the font size of the upper table a bit smaller. I resized the table to the \textwidth
since I wanted to have the \toprule
and \bottomrule
to be the same length as in the lower table but this probably also resizes the font itself which makes a bit trouble. Therefore my question, is there a good way to get a smaller font size in this case?
Best Answer
This is more comment than answer ... however now, after your editing of your question, all is more clear and I'm now able to complete my answer :-)
After second look on your table I get impression, that upper table contain conditions at which are result presented in table below are obtained. So, to me is logical, that upper table has smaller fonts than lower one; and that layout of tables can be impended with exception that had to have the same width.
Next observation was, that the use of shortens in the second table is not consistent. So it is reasonable use item also for heads of the last three columns and put explanation of shortness meaning below the table.
With consideration of mentioned, I made the following redesign of your table:
Above table have font size
\small
and table below\normalsize
. Instead oftabular
is usedtabularx
and use ofresizebox
is omitted. If you interested for code of my design, I can provide it, however, please before consider my comment to your question and provide MWE, that people on SE can provide other (maybe better) solution.Addendum: In code by which is generated above table I consider the part of preamble from your MWE, which influence on table looks-out.
See the difference how is (should be correct) written math relation
P>z
(it isn't clear, if you like to have alsoz
in bold face or is correct that theP
is bold). To my opinion they had to have the same appearing as in text.In code is used
\thead{...}
frommakecell
package for column heads in lower part of table. It is not essential, it can be replaced with\textbf{...}
but than heads will have less vertical space around them. This macro enable multi line heads (obtained by manually broken lines with\\
). With\tabularx
is simple determined with of table and equal width of columns where desired, so in the top part of table are mixedX
andl
column types. For lower part of table is used new column typeC
defined in preamble.For footnotes is used simple hack, but it is worth to look, if the
threeparttable
table can gives nicer result.