
在下面的 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}