减小乳胶中的星空凝视表的尺寸

减小乳胶中的星空凝视表的尺寸

我有一张巨大的表格,是用 R 中的 stargazer 包完成的,我无法缩小它的大小,以便适合我的 latex 文档。所有内容都必须放在一页中,我需要此表中的所有信息:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{amsmath}

\title{Prova de Tópicos em Economia do Trabalho}
\author{Mateus de Almeida Maciel \\ IE/UFRJ}

\begin{document}

\maketitle
\begin{table}[!htbp] \centering 
  \caption{} 
  \label{} 
\begin{tabular}{@{\extracolsep{5pt}}lc} 
\\[-1.8ex]\hline 
\hline \\[-1.8ex] 
 & \multicolumn{1}{c}{\textit{Dependent variable:}} \\ 
\cline{2-2} 
\\[-1.8ex] & Log-Salário \\ 
\hline \\[-1.8ex] 
 Intercepto & 0.072$^{***}$ \\ 
  & (0.0004) \\ 
  & \\ 
 Idade & $-$0.001$^{***}$ \\ 
  & (0.00000) \\ 
  & \\ 
 Idade ao quadrado & 0.072$^{***}$ \\ 
  & (0.005) \\ 
  & \\ 
 1 ano de estudo & 0.124$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 2 anos de estudo & 0.179$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 3 anos de estudo & 0.261$^{***}$ \\ 
  & (0.003) \\ 
  & \\ 
 4 anos de estudo & 0.312$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 5 anos de estudo & 0.357$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 6 anos de estudo & 0.399$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 7 anos de estudo & 0.474$^{***}$ \\ 
  & (0.003) \\ 
  & \\ 
 8 anos de estudo & 0.491$^{***}$ \\ 
  & (0.005) \\ 
  & \\ 
 9 anos de estudo & 0.542$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 10 anos de estudo & 0.707$^{***}$ \\ 
  & (0.003) \\ 
  & \\ 
 11 anos de estudo & 0.959$^{***}$ \\ 
  & (0.006) \\ 
  & \\ 
 12 anos de estudo & 1.034$^{***}$ \\ 
  & (0.006) \\ 
  & \\ 
 13 anos de estudo & 1.122$^{***}$ \\ 
  & (0.006) \\ 
  & \\ 
 14 anos de estudo & 1.455$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 15 anos de estudo & 1.719$^{***}$ \\ 
  & (0.006) \\ 
  & \\ 
 16 anos de estudo & 2.131$^{***}$ \\ 
  & (0.008) \\ 
  & \\ 
 17 anos de estudo & 0.431$^{***}$ \\ 
  & (0.002) \\ 
  & \\ 
 Homem & $-$0.270$^{***}$ \\ 
  & (0.002) \\ 
  & \\ 
 Posição 2 & $-$0.169$^{***}$ \\ 
  & (0.002) \\ 
  & \\ 
 Posição 3 & $-$0.344$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 Setor 1 & $-$0.030$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 Setor 2 & $-$0.055$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 Setor 3 & $-$0.027$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 Setor 4 & $-$0.079$^{***}$ \\ 
  & (0.004) \\ 
  & \\ 
 Setor 5 & $-$0.232$^{***}$ \\ 
  & (0.015) \\ 
  & \\ 
 Alagos & 0.045$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Amazonas & 0.101$^{***}$ \\ 
  & (0.019) \\ 
  & \\ 
 Amapá & $-$0.198$^{***}$ \\ 
  & (0.013) \\ 
  & \\ 
 Bahia & $-$0.346$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Ceará & 0.303$^{***}$ \\ 
  & (0.015) \\ 
  & \\ 
 Distrito Federal & 0.024$^{*}$ \\ 
  & (0.014) \\ 
  & \\ 
 Espírito Santo & 0.077$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Goiás & $-$0.342$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Maranhão & $-$0.003 \\ 
  & (0.013) \\ 
  & \\ 
 Minas Gerais & 0.070$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Mato Grosso do Sul & 0.218$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Mato Grosso & $-$0.063$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Pará & $-$0.321$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Paraíba & $-$0.252$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Pernambuco & $-$0.503$^{***}$ \\ 
  & (0.015) \\ 
  & \\ 
 Piauí & 0.116$^{***}$ \\ 
  & (0.013) \\ 
  & \\ 
 Paraná & 0.118$^{***}$ \\ 
  & (0.013) \\ 
  & \\ 
 Rio de Janeiro & $-$0.251$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Rio Grande do Norte & 0.134$^{***}$ \\ 
  & (0.015) \\ 
  & \\ 
 Rondônia & 0.145$^{***}$ \\ 
  & (0.021) \\ 
  & \\ 
 Roraima & 0.129$^{***}$ \\ 
  & (0.013) \\ 
  & \\ 
 Rio Grande do Sul & 0.237$^{***}$ \\ 
  & (0.014) \\ 
  & \\ 
 Santa Catarina & $-$0.225$^{***}$ \\ 
  & (0.015) \\ 
  & \\ 
 Sergipe & 0.312$^{***}$ \\ 
  & (0.013) \\ 
  & \\ 
 São Paulo & $-$0.079$^{***}$ \\ 
  & (0.016) \\ 
  & \\ 
 Tocantins & 4.446$^{***}$ \\ 
  & (0.015) \\ 
  & \\ 
\hline \\[-1.8ex] 
Observations & 900,000 \\ 
R$^{2}$ & 0.449 \\ 
Adjusted R$^{2}$ & 0.449 \\ 
Residual Std. Error & 13.309 (df = 899946) \\ 
F Statistic & 13,844.440$^{***}$ (df = 53; 899946) \\ 
\hline 
\hline \\[-1.8ex] 
\textit{Note:}  & \multicolumn{1}{r}{$^{*}$p$<$0.1; $^{**}$p$<$0.05; $^{***}$p$<$0.01} \\ 
\end{tabular} 
\end{table}

\end{document}

答案1

如果您加载geometry软件包以减少边距,并通过删除垂直空白、缩短标题和允许第一列内容中的留置权中断,您可以将整个表格挤压到单个页面上,前提是您的标题不超过 1 行:

在此处输入图片描述

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{amsmath}

\usepackage{geometry}

\usepackage{booktabs}

\usepackage{longtable}
\begin{document}

\begin{table}[!htbp] \centering 
  \caption{} 
  \label{} 
\begin{tabular}{@{}l@{\quad\quad\quad}l@{}}
\toprule
\begin{tabular}[t]{@{}lc@{}}  
 & \multicolumn{1}{@{}c@{}}{\textit{Dep. var.:}} \\ 
\cmidrule{2-2} 
 & Log-Salário \\ 
\midrule 
 Intercepto & 0.072$^{***}$ \\ 
  & (0.0004) \\ 
 Idade & $-$0.001$^{***}$ \\ 
  & (0.00000) \\ 
 Idade ao  & 0.072$^{***}$ \\ 
 \quad quadrado & (0.005) \\ 
 1 ano de  & 0.124$^{***}$ \\ 
 \quad estudo & (0.004) \\ 
 2 anos de  & 0.179$^{***}$ \\ 
 \quad estudo & (0.004) \\ 
 3 anos de  & 0.261$^{***}$ \\ 
 \quad estudo & (0.003) \\ 
 4 anos de  & 0.312$^{***}$ \\ 
 \quad estudo & (0.004) \\ 
 5 anos de  & 0.357$^{***}$ \\ 
 \quad estudo & (0.004) \\ 
 6 anos de  & 0.399$^{***}$ \\ 
 \quad estudo & (0.004) \\ 
 7 anos de  & 0.474$^{***}$ \\ 
 \quad estudo & (0.003) \\ 
 8 anos de  & 0.491$^{***}$ \\ 
 \quad estudo & (0.005) \\ 
 9 anos de  & 0.542$^{***}$ \\ 
 \quad estudo & (0.004) \\ 
 10 anos de  & 0.707$^{***}$ \\ 
 \quad estudo & (0.003) \\ 
 11 anos de  & 0.959$^{***}$ \\ 
 \quad estudo & (0.006) \\ 
 12 anos de  & 1.034$^{***}$ \\ 
 \quad estudo & (0.006) \\ 
 13 anos de  & 1.122$^{***}$ \\ 
 \quad estudo & (0.006) \\ 
 14 anos de  & 1.455$^{***}$ \\ 
 \quad estudo & (0.004) \\ 
 15 anos de  & 1.719$^{***}$ \\ 
 \quad estudo & (0.006) \\ 
   16 anos de  & 2.131$^{***}$ \\ 
 \quad estudo & (0.008) \\ 
  17 anos de  & 0.431$^{***}$ \\ 
 \quad estudo & (0.002) \\ 
  \end{tabular}
  &
  \begin{tabular}[t]{@{}l@{\quad\quad\quad}l@{}}
\begin{tabular}[t]{@{}lc@{}}  
 & \multicolumn{1}{@{}c@{}}{\textit{Dep. var.:}} \\ 
\cmidrule{2-2} 
 & Log-Salário \\ 
\midrule 
 Homem & $-$0.270$^{***}$ \\ 
  & (0.002) \\ 
 Posição 2 & $-$0.169$^{***}$ \\ 
  & (0.002) \\ 
 Posição 3 & $-$0.344$^{***}$ \\ 
  & (0.004) \\ 
 Setor 1 & $-$0.030$^{***}$ \\ 
  & (0.004) \\ 
 Setor 2 & $-$0.055$^{***}$ \\ 
  & (0.004) \\ 
 Setor 3 & $-$0.027$^{***}$ \\ 
  & (0.004) \\ 
 Setor 4 & $-$0.079$^{***}$ \\ 
  & (0.004) \\ 
 Setor 5 & $-$0.232$^{***}$ \\ 
  & (0.015) \\ 
 Alagos & 0.045$^{***}$ \\ 
  & (0.014) \\ 
 Amazonas & 0.101$^{***}$ \\ 
  & (0.019) \\ 
 Amapá & $-$0.198$^{***}$ \\ 
  & (0.013) \\ 
 Bahia & $-$0.346$^{***}$ \\ 
  & (0.014) \\ 
 Ceará & 0.303$^{***}$ \\ 
  & (0.015) \\ 
 Distrito  & 0.024$^{*}$ \\ 
 \quad Federal & (0.014) \\ 
 Espírito  & 0.077$^{***}$ \\ 
 \quad Santo & (0.014) \\ 
 Goiás & $-$0.342$^{***}$ \\ 
  & (0.014) \\ 
   Maranhão & $-$0.003 \\ 
  & (0.013) \\ 
  \end{tabular}
  &
\begin{tabular}[t]{@{}lc@{}}  
 & \multicolumn{1}{@{}c@{}}{\textit{Dep. var.:}} \\ 
\cmidrule{2-2} 
 & Log-Salário \\ 
\midrule 
 Minas  & 0.070$^{***}$ \\ 
 \quad Gerais & (0.014) \\ 
 Mato Grosso  & 0.218$^{***}$ \\ 
 \quad do Sul & (0.014) \\ 
 Mato Grosso & $-$0.063$^{***}$ \\ 
  & (0.014) \\ 
 Pará & $-$0.321$^{***}$ \\ 
  & (0.014) \\ 
 Paraíba & $-$0.252$^{***}$ \\ 
  & (0.014) \\ 
 Pernambuco & $-$0.503$^{***}$ \\ 
  & (0.015) \\ 
 Piauí & 0.116$^{***}$ \\ 
  & (0.013) \\ 
 Paraná & 0.118$^{***}$ \\ 
  & (0.013) \\ 
 Rio de Janeiro & $-$0.251$^{***}$ \\ 
  & (0.014) \\ 
 Rio Grande  & 0.134$^{***}$ \\ 
 \quad do Norte & (0.015) \\ 
 Rondônia & 0.145$^{***}$ \\ 
  & (0.021) \\ 
 Roraima & 0.129$^{***}$ \\ 
  & (0.013) \\ 
 Rio Grande  & 0.237$^{***}$ \\ 
 \quad do Sul & (0.014) \\ 
 Santa Catarina & $-$0.225$^{***}$ \\ 
  & (0.015) \\ 
 Sergipe & 0.312$^{***}$ \\ 
  & (0.013) \\ 
 São Paulo & $-$0.079$^{***}$ \\ 
  & (0.016) \\ 
 Tocantins & 4.446$^{***}$ \\ 
  & (0.015) \\ 

\end{tabular}\\
\midrule
\multicolumn{2}{@{}l@{}}{\begin{tabular}{@{}lc@{}}
                   Observations & 900,000 \\ 
                   R$^{2}$ & 0.449 \\  
                   Adjusted R$^{2}$ & 0.449 \\ 
                   Residual Std. Error & 13.309 (df = 899946) \\ 
                   F Statistic & 13,844.440$^{***}$ (df = 53; 899946) \\ 
                   \end{tabular}
                   }
                   \\
\midrule
\multicolumn{2}{@{}l@{}}{\textit{Note:} $^{*}$p$<$0.1; $^{**}$p$<$0.05; $^{***}$p$<$0.01} \\ 
\end{tabular}\\
\bottomrule
\end{tabular} 
\end{table}
\newpage

\end{document}

如果将值和错误放在同一行,则可以节省更多空间:

在此处输入图片描述

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{amsmath}

\usepackage{geometry}

\usepackage{booktabs}

\usepackage{longtable}
\begin{document}
\begin{table}[!htbp] \centering 
\caption{} 
\label{} 
\begin{tabular}{ll}
\toprule
\begin{tabular}[t]{@{}lrl@{}}  
 & \multicolumn{2}{c}{\textit{Dependent variable:}} \\ 
\cmidrule{2-3} 
 & \multicolumn{2}{c}{Log-Salário} \\ 
\midrule 
 Intercepto & 0.072$^{***}$ & (0.0004) \\  
 Idade & $-$0.001$^{***}$ & (0.00000) \\  
 Idade ao quadrado & 0.072$^{***}$ & (0.005) \\ \addlinespace
 1 ano de estudo & 0.124$^{***}$ & (0.004) \\ 
 2 anos de estudo & 0.179$^{***}$ & (0.004) \\
 3 anos de estudo & 0.261$^{***}$ & (0.003) \\\addlinespace
 4 anos de estudo & 0.312$^{***}$ & (0.004) \\
 5 anos de estudo & 0.357$^{***}$ & (0.004) \\ 
 6 anos de estudo & 0.399$^{***}$ & (0.004) \\ \addlinespace
 7 anos de estudo & 0.474$^{***}$ & (0.003) \\  
 8 anos de estudo & 0.491$^{***}$ & (0.005) \\  
 9 anos de estudo & 0.542$^{***}$ & (0.004) \\\addlinespace
 10 anos de estudo & 0.707$^{***}$  & (0.003) \\ 
 11 anos de estudo & 0.959$^{***}$   & (0.006) \\ 
 12 anos de estudo & 1.034$^{***}$ & (0.006) \\ \addlinespace
 13 anos de estudo & 1.122$^{***}$ & (0.006) \\ 
 14 anos de estudo & 1.455$^{***}$ & (0.004) \\ 
 15 anos de estudo & 1.719$^{***}$ & (0.006) \\\addlinespace
 16 anos de estudo & 2.131$^{***}$ & (0.008) \\ 
 17 anos de estudo & 0.431$^{***}$ & (0.002) \\   
 Homem & $-$0.270$^{***}$ & (0.002) \\  \addlinespace
 Posição 2 & $-$0.169$^{***}$ & (0.002) \\  
 Posição 3 & $-$0.344$^{***}$ & (0.004) \\  
 Setor 1 & $-$0.030$^{***}$   & (0.004) \\ \addlinespace 
 Setor 2 & $-$0.055$^{***}$ & (0.004) \\  
 Setor 3 & $-$0.027$^{***}$  & (0.004) \\  
 Setor 4 & $-$0.079$^{***}$ & (0.004) \\  \addlinespace
 \end{tabular}
 &
 \begin{tabular}[t]{@{}lcc@{}}
  & \multicolumn{2}{c}{\textit{Dependent variable:}} \\ 
\cmidrule{2-3} 
 & \multicolumn{2}{c}{Log-Salário} \\ 
\midrule 
 Setor 5 & $-$0.232$^{***}$& (0.015) \\ 
 Alagos & 0.045$^{***}$ & (0.014) \\  
 Amazonas & 0.101$^{***}$ & (0.019) \\   \addlinespace
 Amapá & $-$0.198$^{***}$  & (0.013) \\ 
 Bahia & $-$0.346$^{***}$  & (0.014) \\  
 Ceará & 0.303$^{***}$  & (0.015) \\ \addlinespace
 Distrito Federal & 0.024$^{*}$  & (0.014) \\ 
 Espírito Santo & 0.077$^{***}$  & (0.014) \\ 
 Goiás & $-$0.342$^{***}$  & (0.014) \\ \addlinespace
 Maranhão & $-$0.003  & (0.013) \\ 
 Minas Gerais & 0.070$^{***}$  & (0.014) \\ 
 Mato Grosso do Sul & 0.218$^{***}$  & (0.014) \\ \addlinespace 
 Mato Grosso & $-$0.063$^{***}$  & (0.014) \\ 
 Pará & $-$0.321$^{***}$  & (0.014) \\ 
 Paraíba & $-$0.252$^{***}$  & (0.014) \\ \addlinespace
 Pernambuco & $-$0.503$^{***}$  & (0.015) \\ 
 Piauí & 0.116$^{***}$  & (0.013) \\ 
 Paraná & 0.118$^{***}$  & (0.013) \\ \addlinespace
 Rio de Janeiro & $-$0.251$^{***}$  & (0.014) \\  
 Rio Grande do Norte & 0.134$^{***}$  & (0.015) \\ 
 Rondônia & 0.145$^{***}$  & (0.021) \\ \addlinespace
 Roraima & 0.129$^{***}$  & (0.013) \\  
 Rio Grande do Sul & 0.237$^{***}$  & (0.014) \\ 
 Santa Catarina & $-$0.225$^{***}$  & (0.015) \\ \addlinespace
 Sergipe & 0.312$^{***}$  & (0.013) \\ 
 São Paulo & $-$0.079$^{***}$  & (0.016) \\ 
 Tocantins & 4.446$^{***}$  & (0.015) \\ 
 \end{tabular}\\
\midrule
\multicolumn{2}{@{}l@{}}{\begin{tabular}{@{}lc@{}}
                   Observations & 900,000 \\ 
                   R$^{2}$ & 0.449 \\  
                   Adjusted R$^{2}$ & 0.449 \\ 
                   Residual Std. Error & 13.309 (df = 899946) \\ 
                   F Statistic & 13,844.440$^{***}$ (df = 53; 899946) \\ 
                   \end{tabular}
                   }
                   \\
\midrule
\multicolumn{2}{@{}l@{}}{\textit{Note:} $^{*}$p$<$0.1; $^{**}$p$<$0.05; $^{***}$p$<$0.01} \\ 
\bottomrule
\end{tabular}
\end{table}

\end{document}

相关内容