![引用文档后面特定脚注中的编号](https://linux22.com/image/324313/%E5%BC%95%E7%94%A8%E6%96%87%E6%A1%A3%E5%90%8E%E9%9D%A2%E7%89%B9%E5%AE%9A%E8%84%9A%E6%B3%A8%E4%B8%AD%E7%9A%84%E7%BC%96%E5%8F%B7.png)
我使用 Biblatex、Biber 后端和 autocite 来获取所有参考资料。我发现了这个问题 (Biblatex:脚注引用。同一张幻灯片中有两处脚注引用),但从未得到答复,而且似乎没有问我想要回答的确切问题
我希望能够通过编号引用脚注。我尝试的代码如下所示:
What I am talking about.\autocite[\label{bar}Pre-note][Post note][foo2000]
As you see in footnote \ref{bar}, that thing is great.
输出结果如下:
我正在谈论的那个东西。1
正如您在脚注 1 中看到的,那东西很棒。
1 Foobar, A. 2000 的预注。垃圾邮件杂志。帖子备注
使用以下方法可以得到类似的结果
\footnote{\label{bar} \autocite{foo2000}}
但它会在以后引发一系列的格式问题。
编辑:这是不起作用的代码 EDIT2:修复了非标准参考,并添加了 babel
\begin{filecontents}{testbib.bib}
@book{CITE,
title = {Book's title},
author = {Author, Some},
location = {The City},
publisher = {Publisher},
date = {2005},
}
\end{filecontents}
\documentclass{article}
\usepackage[english]{babel}
\usepackage[backend=biber,autocite=footnote, notes]{biblatex-chicago}
\usepackage{hyperref}
\newcommand{\activeref}[1]{\phantomsection\label{#1}}
\addbibresource{testbib.bib} %Adds the Bibliography File
\begin{document}
Some text.\autocite[][]{CITE}
Some text.\autocite[\label{label1}][]{CITE}
That was right, see footnote \ref{label1}.
\end{document}
答案1
如果我理解正确的话,您希望能够在特殊脚注中引用一份特殊文件。
您给出的命令\activeref
未在您的代码中使用,我对其进行了注释。
我添加了三个 bib 条目并添加了更多参考文献以表明它可以编译为多个参考文献。
您遇到的诀窍是使用命令一次\protect
保存要扩展的命令 :\label
\autocite[\protect\label{label1}][]{CITE}
请参阅以下 MWE
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{CITE,
title = {Book's title},
author = {Author, Some},
location = {The City},
publisher = {Publisher},
date = {2005},
}
@Book{goossens,
author = {Goossens, Michel and Mittelbach, Frank and
Samarin, Alexander},
title = {The LaTeX Companion},
edition = {1},
publisher = {Addison-Wesley},
location = {Reading, Mass.},
year = {1994},
}
@Book{adams,
title = {The Restaurant at the End of the Universe},
author = {Douglas Adams},
series = {The Hitchhiker's Guide to the Galaxy},
publisher = {Pan Macmillan},
year = {1980},
}
@article{einstein,
author = {Albert Einstein},
title = {{Zur Elektrodynamik bewegter Körper}. ({German})
[{On} the electrodynamics of moving bodies]},
journal = {Annalen der Physik},
volume = {322},
number = {10},
pages = {891--921},
year = {1905},
DOI = {http://dx.doi.org/10.1002/andp.19053221004},
}
\end{filecontents*}
\documentclass{article}
\usepackage[utf8]{inputenc} % <================================ for biber
\usepackage[english]{babel}
\usepackage{csquotes} %<======================================= for biber
\usepackage[backend=biber,autocite=footnote,notes]{biblatex-chicago}
\usepackage{hyperref}
%\newcommand{\activeref}[1]{\phantomsection\label{#1}} % <===== ????????
\addbibresource{\jobname.bib} %Adds the Bibliography File
\begin{document}
Some text.\autocite[][]{CITE}
Some text two.\autocite[\protect\label{label1}][]{CITE}
% ^^^^^^^^
Some text three.\autocite[\protect\label{label2}][]{goossens}
Some text four.\autocite[\protect\label{label3}][]{adams}
Some text five.\autocite[\protect\label{label4}][]{einstein}
That was right, see footnote~\ref{label1} (label1), footnote~\ref{label3} (label3),
footnote~\ref{label4} (label4) and footnote~\ref{label2} (label2).
\printbibliography
\end{document}
结果: