
我以 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}
這(仍然)給出了正確的結果:
編輯2footnotemark
顯然,您在標題和\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}%
然後測量這個box是否比目前允許的box寬度寬。如果這是真的,那就是重置以允許適當的換行。此雙重設定會遞增 的強制參數中使用的計數器\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}