带有子标题包的真实脚注

带有子标题包的真实脚注

我想在段落标题中添加一些脚注subcaption。但是,正如您所见,脚注节点出现在标题本身中,而不是页面底部。

在此处输入图片描述

有什么解决办法吗?

谢谢!

平均能量损失

\documentclass{article}
\usepackage{graphicx}
% To display subfigures
\usepackage{caption}
\usepackage{subcaption}

\begin{document}
\begin{figure}[h!]
  \centering
  \begin{subfigure}[t]{.47\textwidth}
    \centering
    \includegraphics[width=\linewidth]{example-image-a}
    \caption{My caption with a footnote\footnote{Yes I like footnotes ! But this one is not a true foot note, because it's not at the bottom of the page...}}
    \label{fig:myfiga}
  \end{subfigure}\hspace*{.05\textwidth}%
  \begin{subfigure}[t]{.47\textwidth}
    \centering
    \includegraphics[width=\linewidth]{example-image-b}
    \caption{Other caption}
    \label{fig:myfigb}
  \end{subfigure}
  \caption{My big caption}
  \label{fig:myfig}
\end{figure}
\end{document}

答案1

您可以使用\footnotemarkand\footnotetext对:

在此处输入图片描述

\documentclass{article}
\usepackage{graphicx}
% To display subfigures
\usepackage{caption}
\usepackage{subcaption}

\begin{document}
\begin{figure}[h!]
  \centering
  \begin{subfigure}[t]{.47\textwidth}
    \centering
    \includegraphics[width=\linewidth]{example-image-a}
    \caption{My caption with a footnote\protect\footnotemark}
    \label{fig:myfiga}
  \end{subfigure}\hspace*{.05\textwidth}%
  \begin{subfigure}[t]{.47\textwidth}
    \centering
    \includegraphics[width=\linewidth]{example-image-b}
    \caption{Other caption}
    \label{fig:myfigb}
  \end{subfigure}
  \caption{My big caption}
  \label{fig:myfig}
\end{figure}
\footnotetext{Yes I like footnotes ! But this one is not a true foot note, because it's not at the bottom of the page...}
\end{document}

或者,如果您更喜欢更自动化的解决方案(至少需要 LaTeX 2020-10-01),您可以\footnote在环境中重新定义figure,以便它执行\footnotemark,并将存储在环境\footnotetext之后执行的钩子中figure,然后您只需\footnote在里面使用即可figure

在此处输入图片描述

\documentclass{article}
\usepackage{graphicx}
% To display subfigures
\usepackage{caption}
\usepackage{subcaption}

\AddToHook{env/figure/begin}{%
  \DeclareRobustCommand\footnote[1]{%
    \footnotemark
    \expanded{\AddToHookNext{env/figure/after}%
      {\noexpand\setcounter{footnote}{\thefootnote}%
       \noexpand\footnotetext\unexpanded{{#1}}}}}}

\begin{document}
\begin{figure}[h!]
  \centering
  \begin{subfigure}[t]{.47\textwidth}
    \centering
    \includegraphics[width=\linewidth]{example-image-a}
    \caption{My caption with a footnote\footnote
      {Yes I like footnotes ! But this one is not a true foot note,
        because it's not at the bottom of the page...}}
    \label{fig:myfiga}
  \end{subfigure}\hspace*{.05\textwidth}%
  \begin{subfigure}[t]{.47\textwidth}
    \centering
    \includegraphics[width=\linewidth]{example-image-b}
    \caption{Other caption\footnote{Another}}
    \label{fig:myfigb}
  \end{subfigure}
  \caption{My big caption\footnote{MOAR}}
  \label{fig:myfig}
\end{figure}
\end{document}

答案2

FWIW,我有一个类似的用例,但我想在父图正下方显示从子图生成的所有脚注。为了实现这一点,我调整了Phelype 的解决方案从上面(需要 LaTeX 2020-10-01 或更高版本):

\usepackage{footmisc}
\AddToHook{env/subfigure/begin}{%
    \DeclareRobustCommand\footnote[1]{%
        \mpfootnotemark
        \expanded{\AddToHookNext{env/subfigure/after}%
            {\noexpand\setcounter{mpfootnote}{\arabic{mpfootnote}}%
             \noexpand\footnotetext\unexpanded{{#1}}}}}}
梅威瑟:
\documentclass{article}
\documentclass{article}
\usepackage{graphicx}
% To display subfigures
\usepackage{subcaption}

\usepackage{footmisc} \AddToHook{env/subfigure/begin}{% \DeclareRobustCommand\footnote1{% \mpfootnotemark \expanded{\AddToHookNext{env/subfigure/after}% {\noexpand\setcounter{mpfootnote}{\arabic{mpfootnote}}% \noexpand\footnotetext\unexpanded{{#1}}}}}}

\begin{document}

\begin{figure*} \begin{minipage}{\linewidth} \begin{center} \begin{subfigure}[t]{.47\linewidth} \includegraphics[width=\linewidth]{example-image-a} \caption{Other caption} \end{subfigure}% \hspace*{.05\textwidth}% \begin{subfigure}[t]{.47\linewidth} \includegraphics[width=\linewidth]{example-image-c} \caption[LoF entry]{My caption with a footnote\footnote{This footnote is displayed right below the subfigure at the bottom of the containing parent figure.}} \end{subfigure}

        \caption{My big caption.}
        \label{fig:usage_mining/patterns}
    \end{center}
\end{minipage}

\end{figure*}

\end{document}

相关内容