
저는 큰 테이블을 작업 중이며 일부 도구를 사용하여 기본 너비 텍스트에 맞춥니다. 그러나 해당 열 중 하나가 테이블의 측정값에 맞지 않습니다. 어떻게 해야 하나요?
\documentclass[
% -- opções da classe memoir --
article, % indica que é um artigo acadêmico
11pt, % tamanho da fonte
oneside, % para impressão apenas no verso. Oposto a twoside
a4paper, % tamanho do papel.
% -- opções da classe abntex2 --
%chapter=TITLE, % títulos de capítulos convertidos em letras maiúsculas
%section=TITLE, % títulos de seções convertidos em letras maiúsculas
%subsection=TITLE, % títulos de subseções convertidos em letras maiúsculas
%subsubsection=TITLE % títulos de subsubseções convertidos em letras maiúsculas
% -- opções do pacote babel --
english, % idioma adicional para hifenização
brazil, % o último idioma é o principal do documento
sumario=tradicional
]{abntex2}
\usepackage{tabularx}
\usepackage{adjustbox}
\begin{document}
\begin{table}[!htbp]
\scriptsize
\centering
\begin{center}
\caption{Resultados das regressões utilizando Mínimos Quadrados Ordinários}
%\scalebox{1}{
\begin{tabularx}{\textwidth}{cccccccccccccc} \hline %{bss}
& $R^2 (\%)$ & Int. & \multicolumn{1}{l}{$R_{t}$} & \multicolumn{1}{l}{$R_{t-1}$} & \multicolumn{1}
{l}{$R_{t-2}$} & \multicolumn{1}{l}{$R_{t-3}$} & \multicolumn{1}{l}{$R_{t+1}$ } & \multicolumn{1}{l}
{$R_{t+2}$} & \multicolumn{1}{l}{$|R_{t}|$} & \multicolumn{1}{l}{$R^2_t$ } & \multicolumn{1}{l}{$\%
\Delta OVX_{t-1}$} & \multicolumn{1}{l}{$\% \Delta OVX_{t-2}$} & \multicolumn{1}{l}{$\% \Delta
OVX_{t-3}$} \\ \hline
M1 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M2 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M3 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M4 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M5 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\ \hline
\end{tabularx}
%}
\label{tab:Tabela 1}
\end{center}
\end{table}
\end{document}
답변1
다음은 텍스트 너비에 맞도록 표를 좁게 만드는 방법에 대한 몇 가지 옵션입니다.
첫 번째 예에서는 테이블이 텍스트 너비에 꼭 맞는지 확인하기 위해 열 사이의 거리를 줄이기 위해
tabularx
더 적합한 으로 대체tabular*
하고\setlength{\tabcolsep}{0pt}
와 함께 사용했습니다.@{\extracolsep{\fill}}
이 예에서는 글꼴 크기도 유지했지만\scriptsize
중복되는\entering
명령과center
환경을 제거했습니다.두 번째 예에서는 텍스트와 수평선이 겹치는 것을 피하기 위해
\hline
명령을 패키지의 수평선으로 추가로 대체했습니다 .booktabs
세 번째 예에서는 반복되는 정보를 공유 헤더로 옮겨서 열 헤더를 짧게 만들어 보았습니다. 이 접근 방식을 사용하면
\small
표를 텍스트 너비에 맞추면서 글꼴 크기를 확대할 수 있습니다 .마지막 예에서는 전체 테이블을 바꾸었습니다.
(빨간색 선은 여백을 나타냅니다.)
\documentclass[
% -- opções da classe memoir --
article, % indica que é um artigo acadêmico
11pt, % tamanho da fonte
oneside, % para impressão apenas no verso. Oposto a twoside
a4paper, % tamanho do papel.
% -- opções da classe abntex2 --
%chapter=TITLE, % títulos de capítulos convertidos em letras maiúsculas
%section=TITLE, % títulos de seções convertidos em letras maiúsculas
%subsection=TITLE, % títulos de subseções convertidos em letras maiúsculas
%subsubsection=TITLE % títulos de subsubseções convertidos em letras maiúsculas
% -- opções do pacote babel --
english, % idioma adicional para hifenização
brazil, % o último idioma é o principal do documento
sumario=tradicional
]{abntex2}
\usepackage{booktabs}
\usepackage{showframe}\renewcommand*\ShowFrameColor{\color{red}}
\begin{document}
\begin{table}[!htbp]
\scriptsize
\setlength{\tabcolsep}{0pt}
\caption{Resultados das regressões utilizando Mínimos Quadrados Ordinários}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}cccccccccccccc} \hline %{bss}
& $R^2 (\%)$ & Int. & \multicolumn{1}{l}{$R_{t}$} & \multicolumn{1}{l}{$R_{t-1}$} & \multicolumn{1}
{l}{$R_{t-2}$} & \multicolumn{1}{l}{$R_{t-3}$} & \multicolumn{1}{l}{$R_{t+1}$ } & \multicolumn{1}{l}
{$R_{t+2}$} & \multicolumn{1}{l}{$|R_{t}|$} & \multicolumn{1}{l}{$R^2_t$ } & \multicolumn{1}{l}{$\%
\Delta OVX_{t-1}$} & \multicolumn{1}{l}{$\% \Delta OVX_{t-2}$} & \multicolumn{1}{l}{$\% \Delta
OVX_{t-3}$} \\ \hline
M1 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M2 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M3 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M4 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M5 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\ \hline
\end{tabular*}
\label{tab:Tabela 1}
\end{table}
\begin{table}[!htbp]
\scriptsize
\setlength{\tabcolsep}{0pt}
\caption{Resultados das regressões utilizando Mínimos Quadrados Ordinários}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}cccccccccccccc}
\toprule %{bss}
& $R^2 (\%)$ & Int. & $R_{t}$ & $R_{t-1}$ & $R_{t-2}$ & $R_{t-3}$ & $R_{t+1}$ &
$R_{t+2}$ & $|R_{t}|$ & $R^2_t$ & $\%\Delta OVX_{t-1}$ & $\% \Delta OVX_{t-2}$ & $\% \Delta OVX_{t-3}$ \\ \midrule
M1 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M2 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M3 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M4 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M5 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\ \bottomrule
\end{tabular*}
\label{tab:Tabela 1}
\end{table}
\begin{table}[!htbp]
\small
\setlength{\tabcolsep}{0pt}
\caption{Resultados das regressões utilizando Mínimos Quadrados Ordinários}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}cccccccccccccc}
\toprule
& & &&&&&&&&& \multicolumn{3}{c}{$\% \Delta OV$}\\
\cmidrule{12-14}
& $R^2 (\%)$ & Int. & $R_{t}$ & $R_{t-1}$ & $R_{t-2}$ & $R_{t-3}$ & $R_{t+1}$ &
$R_{t+2}$ & $|R_{t}|$ & $R^2_t$ & $X_{t-1}$ & $X_{t-2}$ & $X_{t-3}$ \\ \midrule
M1 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M2 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M3 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M4 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\
M5 & 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00 & 0.00
& 0.00 & 0.00 & 0.00
& 0.00 & 0.00 \\ \bottomrule
\end{tabular*}
\label{tab:Tabela 1}
\end{table}
\begin{table}[!htbp]
\centering
\caption{Resultados das regressões utilizando Mínimos Quadrados Ordinários}
\begin{tabular}{lccccc} \hline %{bss}
& M1 & M2 & M3 & M4 & M5\\
\midrule
$R^2 (\%)$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
Int. & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$R_{t}$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$R_{t-1}$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$R_{t-2}$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$R_{t-3}$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$R_{t+1}$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$R_{t+2}$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$|R_{t}|$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$R^2_t$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$\%\Delta OVX_{t-1}$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$\% \Delta OVX_{t-2}$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
$\% \Delta OVX_{t-3}$ & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
\bottomrule
\end{tabular}
\label{tab:Tabela 1}
\end{table}
\end{document}