多次引用同一註腳

多次引用同一註腳

我需要在不同的行中引用相同的腳註。我正在使用scrbook類別。我讀不同地方引用相同的註腳並嘗試以下方式:

第一次參考\footnote{\label{footnote}text}

第二次參考\footref{footnote}

但它給出了以下輸出。有人會建議第二次參考如何僅顯示數字而不是“腳註編號”嗎?謝謝。

在此輸入影像描述

更新:最小工作範例

\documentclass{scrbook}\begin{document}
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
\newlength{\abc}
\settowidth{\abc}{\space}
\AtBeginDocument{%
\addto\extrasenglish{
 \renewcommand{\equationautorefname}{\hspace{-\abc}}
 \renewcommand{\sectionautorefname}{sec.\negthinspace}
 \renewcommand{\subsectionautorefname}{sec.\negthinspace}
 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}
 \renewcommand{\figureautorefname}{Fig.\negthinspace}
 \renewcommand{\tableautorefname}{Tab.\negthinspace}
}
}

\usepackage[figure]{hypcap}

First time referencing\footnote{\label{footnote}text}.

Second time referencing\footref{footnote}.

\end{document}

答案1

您是否考慮過\label在腳註第一次出現時簡單地使用並\ref為腳註提供參考?

\documentclass{scrbook}
\begin{document}
This is the text and reference to footnote.\footnote{\label{fn}Text of footnote.}

Need to make reference again here to the same text of a previous footnote.\textsuperscript{\ref{fn}}

\end{document}

在此輸入影像描述

答案2

似乎scrbook有自己的想法\footref。使用您自己的定義,例如

% footrefprob.tex  SE 640730

\documentclass{scrbook}

\renewcommand{\footref}[1]{\textsuperscript{\ref{#1}}}

\begin{document}

First time referencing\footnote{\label{footnote}text}.

Second time referencing\footref{footnote}.

\end{document}

Your MWE, below, had several problems. Did you actually compile it?

\documentclass{scrbook}\begin{document}
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
\newlength{\abc}
\settowidth{\abc}{\space}
\AtBeginDocument{%
\addto\extrasenglish{
 \renewcommand{\equationautorefname}{\hspace{-\abc}}
 \renewcommand{\sectionautorefname}{sec.\negthinspace}
 \renewcommand{\subsectionautorefname}{sec.\negthinspace}
 \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}
 \renewcommand{\figureautorefname}{Fig.\negthinspace}
 \renewcommand{\tableautorefname}{Tab.\negthinspace}
}
}

\usepackage[figure]{hypcap}

First time referencing\footnote{\label{footnote}text}.

Second time referencing\footref{footnote}.

\end{document}

在此輸入影像描述

該類別(和memoir的超集)有一個可以執行您想要的操作的宏,這就是我所認為的普遍願望。bookreport\footref

相關內容