biblatex 中嵌套引用的替代方案?

biblatex 中嵌套引用的替代方案?

我知道我不应该在 中嵌套引用biblatex。但我还是这么做了,因为它很方便,而且大多数情况下都有效……

具体来说,我用它在引用中包含一些内容,这些内容也应该自动出现在缩写列表中。

然而,我现在发现相关条目中的嵌套引用真的不起作用:)。

那么还有什么替代方案呢?

下面是一个可供参考的 MWE:

\autocite{edwards:1999}可以工作,但是\autocite{victorinus:ephesians}不行。

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@series{ACCS,
  series = {Ancient Christian Commentary on Scripture},
  shortseries = {ACCS},
  options = {skipbib}
}
@book{edwards:1999,
  editor = {Edwards, Mark J.},
  title = {Galatians, Ephesians, Philippians},
  series = {\citeseries{ACCS} New Testament},
  number = {8},
  location = {Downers Grove, IL},
  publisher = {InterVarsity Press},
  date = {1999}
}
@book{victorinus:ephesians,
  author = {Victorinus, Marius},
  title = {Epistle to the Ephesians},
  related = {edwards:1999}
}
\end{filecontents}
\usepackage[colorlinks]{hyperref}
\usepackage[style=sbl]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\null\vfill
Filler text \autocite{edwards:1999}.
Filler text \autocite{victorinus:ephesians}.
\printbiblist{abbreviations}
\printbibliography
\end{document}

答案1

这也许是作弊,但它确实有效。

\documentclass{article}

\usepackage[style=sbl]{biblatex}
\usepackage[colorlinks]{hyperref}

\newcommand*{\notreallyciteseries}[1]{%
  \nocite{#1}%
  \entrydata{#1}{%
    \usebibmacro{shortseries}}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@series{ACCS,
  series = {Ancient Christian Commentary on Scripture},
  shortseries = {ACCS},
  options = {skipbib}
}
@book{edwards:1999,
  editor = {Edwards, Mark J.},
  title = {Galatians, Ephesians, Philippians},
  series = {\notreallyciteseries{ACCS} New Testament},
  number = {8},
  location = {Downers Grove, IL},
  publisher = {InterVarsity Press},
  date = {1999}
}
@book{victorinus:ephesians,
  author = {Victorinus, Marius},
  title = {Epistle to the Ephesians},
  related = {edwards:1999}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\null\vfill
Filler text \autocite{edwards:1999}.
Filler text \autocite{victorinus:ephesians}.
\printbiblist{abbreviations}
\printbibliography
\end{document}

参考书目和引文正确显示“ACCS”。

这里的技巧是\nocite不算作不可嵌套的\cite命令,所以我们可以把它嵌套在任何我们想要的地方。\entrydata让我们像在引用中一样访问相关的条目数据。


稍微复杂一点的版本是

\makeatletter
\newcommand*{\notreallyciteseries}[1]{%
  \nocite{#1}%
  \blx@ifdata{#1}
    {\entrydata{#1}{%
       \usebibmacro{shortseries}}}
    {\abx@missing@entry{#1}}}
\makeatother

如果你需要更多这样的命令,你也可以按如下方式声明它们

\makeatletter
\newcommand*{\DeclareNotReallyCiteCommand}[2]{%
  \newcommand*{#1}[1]{%
    \nocite{##1}%
    \blx@ifdata{##1}
      {\entrydata{##1}{#2}}
      {\abx@missing@entry{##1}}}}
\makeatother

\DeclareNotReallyCiteCommand{\notreallyciteseries}{%
  \usebibmacro{shortseries}}

另外一个好处是,这些命令不会biblatex像嵌套命令那样混淆参考书目中的标点符号跟踪器\cite

相关内容