我想用匕首标记一些项目,但为它们全部添加一个脚注文本。我现在有以下内容:
\documentclass{article}
\usepackage[utf8]{inputenc}
\newcounter{daggerfootnote}
\newcommand*{\daggerfootnote}[1]{%
\setcounter{daggerfootnote}{\value{footnote}}%
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}%
\footnote[2]{#1}%
\setcounter{footnote}{\value{daggerfootnote}}%
\renewcommand*{\thefootnote}{\arabic{footnote}}%
}
\begin{document}
\begin{itemize}
\item Test 1\daggerfootnote{Test footnote}
\item Test 2
\item Test 3\daggerfootnote{}
\end{itemize}
\end{document}
问题是,它会添加多个脚注。但是,我希望用匕首标记的所有位置都只有一个脚注。我该如何实现?
答案1
对于第二次及以后的出现,您只需将匕首符号打印为数学上标即可:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[height=5cm]{geometry}
\newcounter{daggerfootnote}
\newcommand*{\daggerfootnote}[1]{%
\setcounter{daggerfootnote}{\value{footnote}}%
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}%
\footnote[2]{#1}%
\setcounter{footnote}{\value{daggerfootnote}}%
\renewcommand*{\thefootnote}{\arabic{footnote}}%
}
\begin{document}
\begin{itemize}
\item Test 1\daggerfootnote{Test footnote}
\item Test 2
\item Test 3${}^\dagger$
\end{itemize}
\end{document}