
내 최종 테이블이 다음과 같기를 바랍니다.
| SUBTBL1 | SUBTBL2 |
| SUBTBL3 | SUBTBL4 |
그런데 표의 일부가 본문과 겹칩니다. 어떻게 해야 하나요?
내 서문은 다음과 같습니다.
\documentclass[lettersize,journal]{IEEEtran}
\usepackage{amsmath,amsfonts}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{array}
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\usepackage{textcomp}
\usepackage{stfloats}
\usepackage{multirow}
\usepackage{url}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{diagbox}
\usepackage{booktabs}
\usepackage{cite}
\usepackage{caption}
\hyphenation{op-tical net-works semi-conduc-tor IEEE-Xplore}
내 코드는 다음과 같습니다.
\begin{table}[th]
\centering
\caption{Result}
\begin{tabular}{c c}
\begin{minipage}[b]{0.48\textwidth}\centering
\resizebox{1.\textwidth}{!}{
\begin{tabular}{cccccccccc}
\toprule
%\hline
\multirow{2}{*}{K} & \multicolumn{3}{c}{t = 0.1} & \multicolumn{3}{c}{t = 1} & \multicolumn{3}{c}{t = 5} \\
\cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10}
& Prc.\% & Rec.\% & F1-Mea.\% & Prc.\% & Rec.\% & F1-Mea.\% & Prec.\% & Rec.\% & F1-Mea.\%\\ \toprule
0.2 & 99.94 & 99.99 & 99.96 & 99.77 & 99.98 & 99.87 & 94.93 & 99.90 & 97.35 \\
0.5 & 99.91 & 99.99 & 99.94 & 99.93 &99.99 & 99.95 & 73.20 &99.62 & 84.39 \\
0.8 & \textbf{99.95} & \textbf{99.99 } & \textbf{99.96} & 99.93 & 99.99 & 99.95 & 99.70 & 99.99 & 99.84 \\ \toprule
\end{tabular}}
\caption{(a)}
\end{minipage}
&
\begin{minipage}[b]{0.48\textwidth}\centering
\resizebox{1.\textwidth}{!}{
\begin{tabular}{cccccccccc}
\toprule
\multirow{2}{*}{K} & \multicolumn{3}{c}{t = 0.1} & \multicolumn{3}{c}{t = 1} & \multicolumn{3}{c}{t = 5} \\
\cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10}
& Prec.\% & Rec.\% & F1-Mea.\% & Prc.\% & Rec.\% & F1-Mea.\% & Prc.\% & Rec.\% & F1-Mea.\%\\ \toprule
0.2 & 92.19 & 93.27 & 92.72 & \textbf{92.54} & \textbf{93.62} & \textbf{93.07} & 91.53 & 92.58 & 92.05 \\
0.5 & 92.03 & 93.10 & 92.56 & \textbf{92.54} & \textbf{93.62} & \textbf{93.07} & 91.53 & 92.58 &92.05 \\
0.8 &92.36 & 93.45 & 92.90 & \textbf{92.54} & \textbf{93.62} & \textbf{93.07} & 91.86 & 92.93 & 92.39 \\ \toprule
\end{tabular}}
\caption{(b)}
\end{minipage}
\\
\begin{minipage}[b]{0.48\textwidth}\centering
\resizebox{1.\textwidth}{!}{
\begin{tabular}{cccccccccc}
\toprule
%\hline
\multirow{2}{*}{K} & \multicolumn{3}{c}{t = 0.1} & \multicolumn{3}{c}{t = 1} & \multicolumn{3}{c}{t = 5} \\
\cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10}
& Prec.\% & Rec.\% & F1-Mea.\% & Prec.\% & Rec.\% & F1-Mea.\% & Prec.\% & Rec.\% & F1-Mea.\%\\ \toprule
0.2 & 99.85 & 94.45 & 97.07 & 99.85 & 99.55 & 99.69 & \textbf{99.85} & \textbf{99.98} & \textbf{99.91} \\
0.5 & 99.89 & 99.25 & 99.56 & 99.85 & 99.73 & 99.78 & \textbf{99.85} & \textbf{99.98} & \textbf{99.91} \\
0.8 & 99.91 & 94.09 & 96.91 & 99.83 & 95.65 & 97.69 & \textbf{99.85} & \textbf{99.98} & \textbf{99.91} \\ \toprule
\end{tabular}}
\caption{(c)}
\end{minipage}
&
\begin{minipage}[b]{0.48\textwidth}\centering
\resizebox{1.\textwidth}{!}{
\begin{tabular}{cccccccccc}
\toprule
%\hline
\multirow{2}{*}{K} & \multicolumn{3}{c}{t = 0.1} & \multicolumn{3}{c}{t = 1} & \multicolumn{3}{c}{t = 5} \\
\cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10}
& Prec.\% & Rec.\% & F1-Mea.\% & Prec.\% & Rec.\% & F1-Mea.\% & Prec.\% & Rec.\% & F1-Mea.\%\\ \toprule
0.2 & 99.99 & 90.47 & 94.99 & \textbf{99.99} & \textbf{97.61} & \textbf{98.78} & 99.99 & 85.71 & 92.30\\
0.5 & 99.99 & 92.85 & 96.28& \textbf{99.99} & \textbf{97.61} & \textbf{98.78} & 99.99 & 88.09 & 93.66\\
0.8 & 99.99 & 92.85 & 96.28 & \textbf{99.99} & \textbf{97.61} & \textbf{98.78} & 99.99 & 88.09 & 93.66 \\ \toprule
\end{tabular}}
\caption{(d)}
\end{minipage}
\\
\end{tabular}
\end{table}
답변1
그럼 여기서 조직 문제에 초점을 맞춰 보겠습니다. 따라서 테이블을 다음 이름의 별도 파일로 간단한 테이블로 압축하겠습니다 input_tab_A
.
\begin{tabular}{lll}
A & B & C \\
1 & 2 & 3
\end{tabular}
분리tabular
내용이 아닌 문제에 집중할 수 있습니다. 나는 모두와 함께 할 것을 조언합니다너무 길고 너무 복잡하다테이블. 저널에서 요구하는 경우하나의 tex 파일, 기사를 정리하고 작성하는 어려운 작업을 마친 후 복사하여 붙여넣기만 하면 됩니다.
다음으로 이 답변은 다음 링크를 소스로 사용합니다.
이제 코드로 넘어갑니다. 테이블을 삽입하는 여러 가지 방법을 제시하겠습니다. 귀하의 문제는 텍스트 주변의 구성 및 변위와 관련되어 있으므로 lipsum
텍스트 입력을 피하기 위해 패키지가 사용됩니다. 때로는 \input{input_tab_A}
더 긴 표를 만들기 위해 사본을 삽입할 때도 있습니다 .
MWE는 다음과 같습니다
\documentclass[lettersize,journal]{IEEEtran}
\usepackage{float}
\usepackage{lipsum}
\usepackage{caption}
\usepackage{subcaption}
\captionsetup{font=normalsize,labelfont=sf,textfont=sf,position=top}
\begin{document}
\lipsum[1-3]
\begin{minipage}[b]{0.48\linewidth}
\centering
\begin{table}[H]
\captionbox{Legend}[\linewidth]{
\input{input_tab_A}
}
\end{table}
\end{minipage}%
\begin{minipage}[b]{0.48\linewidth}
\centering
\begin{table}[H]
\captionbox{Legend}[\linewidth]{
\input{input_tab_A}
}
\end{table}
\end{minipage}
\lipsum[1-3]
\begin{minipage}[b]{0.3\textwidth}
\centering
\begin{table}[H]
\captionbox{!!Error textwidth!!}[\linewidth]{
\input{input_tab_A}
}
\end{table}
\end{minipage}%
\begin{minipage}[b]{0.3\textwidth}
\centering
\begin{table}[H]
\captionbox{This table is missing}[\linewidth]{
\input{input_tab_A}
}
\end{table}
\end{minipage}
\begin{table*}
\captionbox{This table goes through two columns}[\linewidth]{
\input{input_tab_A}\input{input_tab_A}
\input{input_tab_A}\input{input_tab_A}
\input{input_tab_A}\input{input_tab_A}
}
\end{table*}
\lipsum[1-3]
\begin{table}[!ht]
\centering
\captionbox{A lot of tables and subtables}[\linewidth]{
\subcaptionbox{First}{
\input{input_tab_A}
}\quad
\subcaptionbox{Second}{
\input{input_tab_A}
}
\subcaptionbox{Third}{
\input{input_tab_A}
}\quad
\subcaptionbox{Fourth}{
\input{input_tab_A}
}
}
\end{table}
\lipsum[1-7]
\begin{table*}[!ht]
\centering
\captionbox{A lot of tables and subtables through two columns}[\linewidth]{
\subcaptionbox{First}{
\input{input_tab_A}
\input{input_tab_A}
\input{input_tab_A}
}\quad
\subcaptionbox{Second}{
\input{input_tab_A}
\input{input_tab_A}
\input{input_tab_A}
}
\subcaptionbox{Third}{
\input{input_tab_A}\input{input_tab_A}
\input{input_tab_A}\input{input_tab_A}
\input{input_tab_A}\input{input_tab_A}
}\quad
\subcaptionbox{Fourth}{
\input{input_tab_A}\input{input_tab_A}
\input{input_tab_A}\input{input_tab_A}
\input{input_tab_A}\input{input_tab_A}
}
}
\end{table*}
\lipsum[1-7]
\begin{figure*}
\centering
\begin{minipage}[b]{0.3\textwidth}
\centering
\captionof{table}{First}
\input{input_tab_A}
\end{minipage}\quad
\begin{minipage}[b]{0.3\textwidth}
\centering
\captionof{table}{Second}
\input{input_tab_A}
\end{minipage}
\begin{minipage}[b]{0.3\textwidth}
\centering
\captionof{table}{Third}
\input{input_tab_A}
\end{minipage} %
\begin{minipage}[b]{0.3\textwidth}
\centering
\captionof{table}{Fourth}
\input{input_tab_A}
\end{minipage}
\end{figure*}
\lipsum[1-10]
\end{document}
결과에 대한 토론
minipage
~와 함께\linewidth
이는 훌륭한 결과입니다. 각각은 숫자로 테이블로 레이블이 지정되어 있지만 열은 하나만 있습니다. 나는 [H]
부터 사용해야했다float
그렇지 않습니다.우아한(부동 소수점에서 "H" 옵션을 사용하면 안 되는 이유는 무엇입니까?).
minipage
~와 함께\textwidth
좋지는 않습니다. 테이블은 확실히 여백에서 멀리 떨어져 있습니다. 나쁜 해결책.
table*
이제는 상황이 좋아지고 있습니다. 우리의 매우 큰 테이블은 텍스트를 방해하지 않고 두 열 모두에 맞습니다.다음 페이지로 넘어가나요?-- 예, 이것이 클래스가 IEEEtran
표준 동작을 정의하는 방법입니다.
table
그리고\subcaptionbox
이 솔루션은 우리에게 하위 캡션을 제공합니다! 보기에는 좋지만 정확히 원하는 것은 아닙니다. 단일 열 안에 있습니다.
table*
그리고\subcaptionbox
조금 더 가까이. 작은 테이블은 측면에 있을 수 있지만 큰 테이블은 그렇지 않습니다. 하지만 여전히 문자가 포함된 하위 캡션이 있습니다. 마지막 동작을 시도해 보겠습니다.
figure*
, minipage
그리고\captionof
왜 우리에게 유리하게 규칙을 굽히지 않습니까?
그만큼caption
를 사용하면 다음을 수행할 수 있습니다.궁극의 트릭, 삽입캡션다른 환경 내부의 객체.
이제 우리는 다음을 달성합니다: (1) 원하는 조직; (2) 모든 테이블은 하위 테이블이 아닌 테이블로 라벨이 지정됩니다. (3) 열을 가로지르지만 텍스트 위는 아닌 표; 그리고 (4) 일부를 유지하세요우아피하다 [H]
.