
다음 MCE에서 각주는 첫 번째 하위 그림과 두 번째 하위 그림 사이에 있습니다. 좋습니다. 문서 클래스는 다음과 같 standalone
으며 로그에서는 다음과 같이 경고합니다.
LaTeX 경고: 중첩된 미니페이지: 입력 라인 11에서 각주 위치가 잘못될 수 있습니다.
하지만 이러한 이상한 동작을 해결하는 방법은 무엇입니까?
\documentclass[varwidth=18cm]{standalone}
\usepackage{subcaption}
\begin{document}
Some dummy text with a footnote\footnote{This is the footnote's content.}.
\begin{figure}[ht]
\centering
\begin{subfigure}[b]{.3\linewidth}
\centering
First subfigure
\caption{Caption of the first subfigure}
\end{subfigure}
\begin{subfigure}[b]{.3\linewidth}
\centering
Second subfigure
\caption{Caption of the second subfigure}
\end{subfigure}
\begin{subfigure}[b]{.3\linewidth}
\centering
Third subfigure
\caption{Caption of the third subfigure}
\end{subfigure}
\caption{Caption of the (global) figure}
\end{figure}
Some dummy text.
\end{document}
답변1
이는 저장 상자를 사용하여 미니페이지를 확장합니다.~ 전에각주. \centering
varwidth 내부에서는 아무 작업도 수행하지 않습니다 .
\documentclass[varwidth=18cm]{standalone}
\usepackage{subcaption}
\begin{document}
\sbox0{\begin{varwidth}{18cm}
\begin{figure}[ht]
\centering
\begin{subfigure}[b]{.3\linewidth}
\centering
First subfigure
\caption{Caption of the first subfigure}
\end{subfigure}
\begin{subfigure}[b]{.3\linewidth}
\centering
Second subfigure
\caption{Caption of the second subfigure}
\end{subfigure}
\begin{subfigure}[b]{.3\linewidth}
\centering
Third subfigure
\caption{Caption of the third subfigure}
\end{subfigure}
\caption{Caption of the (global) figure}
\end{figure}%
\end{varwidth}}
Some dummy text with a footnote\footnote{This is the footnote's content.}.
\noindent\usebox0
Some dummy text.
\end{document}