![(a)에서 하위 표의 캡션을 강제로 시작하려면 어떻게 해야 합니까?](https://rvso.com/image/476260/(a)%EC%97%90%EC%84%9C%20%ED%95%98%EC%9C%84%20%ED%91%9C%EC%9D%98%20%EC%BA%A1%EC%85%98%EC%9D%84%20%EA%B0%95%EC%A0%9C%EB%A1%9C%20%EC%8B%9C%EC%9E%91%ED%95%98%EB%A0%A4%EB%A9%B4%20%EC%96%B4%EB%96%BB%EA%B2%8C%20%ED%95%B4%EC%95%BC%20%ED%95%A9%EB%8B%88%EA%B9%8C%3F.png)
나는 하위 테이블이 새 테이블로 감지되고 및 로 1.1
라벨링되지 않고 증가되는 다음 템플릿 위에 논문을 작성하고 있습니다 . 나는 그것을 방해하는 것이 무엇인지 전혀 모릅니다.(a)
(b)
\documentclass[a4paper,oneside,12pt]{report}
\usepackage{float}
\usepackage{multirow}
\usepackage{subfigure}
\usepackage{array}
\usepackage{subfigure} %
\usepackage{amsmath}
\usepackage{subcaption}
\begin{document}
\chapter{INTRODUCTION}
\label{chapter:introduction}
\begin{table}[!htp]
\caption{Average ...}~\label{tab:mytable}
\begin{subtable}% {1\linewidth}
\centering
\begin{tabular}{|l|c|c|c|}
\hline
\textbf{Method} & \textbf{Gas Used} & \textbf{Ethereum} & \textbf{Polygon} \\
& \textbf{(gas)} & \textbf{USD cost} & \textbf{USD cost} \\
\hline
submitJob & 264967 & 7.04 & 0.019 \\ \hline
\end{tabular}
\caption{Obtained from A environment.}
\vspace{0.5cm}
\begin{tabular}{|l|c|c|c|}
\hline
\textbf{Method} & \textbf{Gas Used} & \textbf{Ethereum} & \textbf{Polygon} \\
& \textbf{(gas)} & \textbf{USD cost} & \textbf{USD cost} \\
\hline
updateProviderInfo & 33284 & 0.88 & 0.002 \\ \hline
\end{tabular}
\caption{Obtained from B platform.}
\end{subtable}%
\end{table}
\end{document}
산출:
원하는 출력:
답변1
에서 인용하자면CTAN 페이지패키지 subfigure
:
[하위 그림] 패키지는 이제 더 이상 사용되지 않는 것으로 간주됩니다.하위 그림, 그러나 사용자는 최신 정보를 찾을 수 있습니다.하위 캡션패키지가 더 만족스럽습니다.
간단히 말해서:하지 않다패키지 를 사용하세요 subfigure
.
다음 솔루션에서는 subcaption
패키지를 사용합니다. 이 패키지 subtable
와 subfigure
환경은 하나를 취합니다.필수적인인수: 의도한 너비. 현재 사용 사례에서는 의도한 너비로 \textwidth
(또는 동등하게 )를 사용하는 것이 좋습니다.\linewidth
\documentclass[a4paper,oneside,12pt]{report}
\usepackage{array} % for 'w' column type and '\extrarowheight' length parameter
\usepackage{subcaption}
\captionsetup[table]{skip=0.333\baselineskip}
% handy utility macro:
\newcommand\mytab[1]{\smash{%
\begin{tabular}[t]{@{}c@{}} #1 \end{tabular}}}
\newlength\mylen
\begin{document}
\setcounter{chapter}{1}
\begin{table}[!htp]
\settowidth\mylen{updateProviderInfo} % calculate target width of first column
\setlength\extrarowheight{2pt} % for a less-cramped look
\caption{Average ...} \label{tab:mytable}
\begin{subtable}{\linewidth}
\centering
\begin{tabular}{|wl{\mylen}|c|c|c|}
\hline
Method & \mytab{Gas Used\\(gas)}
& \mytab{Ethereum\\USD cost}
& \mytab{Polygon\\USD cost} \\
& & & \\ \hline
submitJob & 264967 & 7.04 & 0.019 \\ \hline
\end{tabular}
\medskip
\caption{Obtained from A environment.}
\end{subtable}
\bigskip
\begin{subtable}{\linewidth}
\centering
\begin{tabular}{|wl{\mylen}|c|c|c|}
\hline
Method & \mytab{Gas Used\\(gas)}
& \mytab{Ethereum\\USD cost}
& \mytab{Polygon\\USD cost} \\
& & & \\ \hline
updateProviderInfo & 33284 & 0.88 & 0.002 \\ \hline
\end{tabular}
\medskip
\caption{Obtained from B platform.}
\end{subtable}
\end{table}
\end{document}