スタンドアロンドキュメントクラス内のサブ図間の脚注

スタンドアロンドキュメントクラス内のサブ図間の脚注

次の MCE では、脚注は最初のサブ図と 2 番目のサブ図の間にあります。ドキュメント クラスは OK で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

これはセーブボックスを使用してミニページを展開します前に脚注。varwidth\centering内では何も行われないことに注意してください。

\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}

関連情報