在 \footcite 中使用 \label

在 \footcite 中使用 \label

我使用脚注来引用

Some Text.\footcite[Specific Location in Text]{bibKey}

这很完美。但是我在引用其中一个脚注时遇到了问题,例如:

Some Text.\footcite[Specific Location in Text\label{label}]{bibKey}
Some other Text.\footnote{See footnote \ref{label}}

这确实有效,并输入了正确的脚注编号。但是它会产生以下错误:

Argument of \blx@range@aux@i has an extra }.

<inserted text> 
                \par 
l.46 ...bibkey}
                                                  
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

 file.tex, line 46
Runaway argument?

\blx@normrange@i {\write \@auxout {\string \newlabel {MYLABEL}{{\@currentlabel \ETC.
! Paragraph ended before \blx@range@aux@i was complete.
<to be read again> 
                   \par 
l.46 ...bibkey}
                                                  
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

 file.tex, line 46
Runaway argument?

\blx@normrange@i {\write \@auxout {\string \newlabel {MLABEL}{{\@currentlabel \ETC.
! File ended while scanning use of \blx@range@aux@i.
<inserted text> 
                \par 
l.46 ...bibkey}^^M
                                                  
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

知道如何修复这些错误吗?或者,还有其他方法可以在一个脚注中引用另一个脚注吗?

答案1

postnote 格式对文本进行了一些处理,以便能够检测页面范围并根据需要添加“p.”/“pp。”。特别是文本可能会在处理过程中扩展。在这里它\protect有助于\label

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authortitle, backend=biber]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem\autocite[Specific Location in Text\protect\label{label}]{sigfridsson}

Ipsum.\footnote{See footnote~\ref{label}}

\printbibliography
\end{document}

见脚注 1


根据您具体需要链接的目的,可能会有更优雅的替代方案。例如,verbose-note样式 ( verbose-note, verbose-inote) 会自动引用作品的第一次引用的脚注。

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=verbose-note, backend=biber]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem\autocite{sigfridsson}

Ipsum.\autocite{sigfridsson}

\printbibliography
\end{document}

Sigfridsson 和 Ryde,见注。 1.

可以将seenote代码移植到其他样式,并将为完整引用设置的标签用于其他目的 - 这完全取决于您到底需要做什么。

相关内容