첫 번째 각주가 두 번째 각주로 표시되는 이유는 무엇입니까?

첫 번째 각주가 두 번째 각주로 표시되는 이유는 무엇입니까?

저는 Springer LNCS 형식으로 글을 쓰고 있으며 그림 캡션에 각주를 추가했습니다.

\documentclass[runningheads]{llncs}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{appendix}

\begin{document}
\title{TITLE}
\author{AUTHOR}
\institute{INSTITUTE} \\
\maketitle 
\begin{figure}
\includegraphics[width=\textwidth]{Beta.eps}
\caption{When $m=k=6$, and $500$ samples of $\mathbf{X}$ are generated from the bimodal distribution, $Beta(0.5,0.5)$, $\mathcal{L}_{co}$ fluctuates so drastically that in about half of the $20$ simulations, the MDL approach would miss the causality between $\mathbf{X}$ and $Y$ and leads to the wrong conclusion. $(\mathbf{X},Y)$ purely confounded by $Beta$ sources, on the other hand, work well with the CoCa model.\footnotemark} 
\label{Fig.2}
\end{figure}
\footnotetext{https://github.com/PawinData/CoCa}
\end{document}

기사의 유일한 각주이지만 PDF 출력에서는 두 번째로 표시됩니다. 왜 그런 겁니까? 어떻게 해결할 수 있나요?


@UlrikeFischer가 해결한 문제

답변1

귀하가 코드 조각만 제공했기 때문에 우리는 귀하의 문서에 대한 정보(문제를 재현하는 작은 완전한 문서의 형태)를 가지고 있지 않으며 결과적으로 이를 테스트할 수 없고 무엇이 문제가 될 수 있는지 확인할 수 없습니다.

그러나 코드 조각에는 몇 가지 문제가 있습니다.

  • 그림의 레이블은 다음이어야 했습니다.\caption{...}
  • \footnotemark"보호"되어야 했습니다:\caption{abcdefg\protect\footnotemark}

편집 (1): 앞서 언급한 MWE(최소 작업 예제) 캔 및 llncs문서 클래스는 다음과 같습니다.

\documentclass[runningheads]{llncs}
\usepackage[demo]{graphicx} % in real document remove option "demo"

\usepackage{lipsum}
\begin{document}
\lipsum[1-3]
\begin{figure}[ht]
\includegraphics[width=\textwidth]{Beta.eps}
\caption{abcdefg\protect\footnotemark}  % <---
\label{Fig.2}                           % <---
\end{figure}
\footnotetext{https://github/com}
\end{document}

(여전히) 올바른 결과를 제공합니다.

여기에 이미지 설명을 입력하세요

편집 2 분명히 footnotemark캡션과 \footnotetext하나 이상의 \footnotemark(또는 \footnote) 사이에 문제가 발생하는 것 같습니다. 다음 \footnotetext바로 앞에 삽입 하거나 텍스트에 }를 삽입하여 제거할 수 있습니다 .figure\footnotemark\footnote

답변2

클래스는 자체 캡션 처리 메커니즘을 정의합니다. 실제 캡션을 설정하는 부분은 다음과 같습니다.

\long\def\@makecaption#1#2{%
  \small
  \vskip\abovecaptionskip
  \sbox\@tempboxa{{\bfseries #1.} #2}%
  \ifdim \wd\@tempboxa >\hsize
    {\bfseries #1.} #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}

다음을 통해 상자에 캡션을 설정합니다.

\sbox\@tempboxa{{\bfseries #1.} #2}%

그런 다음 이 상자가 현재 허용되는 상자 너비보다 넓은지 여부를 측정합니다. 이것이 사실이라면,초기화적절한 줄 바꿈을 허용합니다. 이 이중 설정은 의 필수 인수 내에서 사용되는 카운터를 증가시킵니다 \caption[<ToC>]{<main>}. 다음과 같은 최소 예제에서 이를 확인할 수 있습니다.

\documentclass{llncs}

\begin{document}

\begin{figure}
  \caption[short caption]{%
    Lorem ipsum dolor sit amet, consectetur adipiscing elit.\footnotemark\space
    %Nunc id nulla at dui facilisis pharetra non scelerisque mi.% <- Uncomment
  } 
\end{figure}

\footnotetext{https://github.com/PawinData/CoCa}
\end{document}

\caption의 두 번째 줄을 추가하면 \textwidth는 두 번 처리되므로 footnote두 번 증가합니다. 이에 대응하는 깨끗하고 편리한 방법은 환경 footnote내에서 카운터를 단계적으로 실행 figure하고 고정식을 사용하는 것입니다 \footnotemark[<mark>].

\documentclass{llncs}

\begin{document}

\begin{figure}
  \stepcounter{footnote}% Increment footnote counter
  \caption[short caption]{%
    Lorem ipsum dolor sit amet, consectetur adipiscing elit.\footnotemark[\thefootnote]\space
    %Nunc id nulla at dui facilisis pharetra non scelerisque mi.
  } 
\end{figure}

\footnotetext{https://github.com/PawinData/CoCa}
\end{document}

관련 정보