如何在速记中引用 bibtex 条目?

如何在速记中引用 bibtex 条目?

这可能很棘手,我相信一定有比我想到的(或者实际上没有想出的)更好的解决方案。

我有一本书,由文本卷和图片卷组成,所以我有三个条目(第四个条目仅用于测试是否有带字母的标签)。但@MvBook我的书目中只有主条目和与其相关的子条目。

我想要做的是引用相对于父条目标签的文本卷:在这种情况下MOR 1893a|1MOR 1893a|1, 123。但不知何故页面序列重复了。

很高兴采取任何解决方案得到结果[shortauthor of child-entry] [labelyear of the parent-entry]|[volume of child-entry], [page]

\documentclass[ngerman]{scrartcl}
\usepackage{filecontents,babel}
\begin{filecontents}{\jobname.bib}
@mvBook{MOR-0,
  author        = {Ohnefalsch-Richter, Max},
  shortauthor = {MOR},
  year          = {1893},
  title     = {Kypros, die Bibel und Homer},
  volumes        = {2},
  publisher     = {A. Asher und Co.},
  location      = {Berlin},
  related = {MOR-1,MOR-2},
  relatedtype = {multivolume},
}

@Book{MOR-1,
  author        = {Ohnefalsch-Richter, Max},
  title         = {Text},
  volume        = {1},
  shortauthor = {MOR},
  crossref = {MOR-0},
  shorthand = {\cite{MOR-0}|1},
  options = {skipbib,skiplab}
}

@Book{MOR-2,
  author        = {Ohnefalsch-Richter, Max},
  title         = {Tafeln},
  volume        = {2},
shortauthor = {MOR},
  shorthand = {\cite{MOR-0}|2},
  crossref = {MOR-0},
  options = {skipbib,skiplab}
}

@mvBook{MOR-X,
  author        = {Ohnefalsch-Richter, Max},
  shortauthor = {MOR},
  year          = {1893},
  title     = {Kypros, the Bibel and Homer},
}

\end{filecontents}

\usepackage[           
  backend=biber,
  style=archaeologie,
]{biblatex} 
\addbibresource{\jobname.bib}

\DeclareDataInheritance{mvbook}{book}{
  \noinherit{year}
  \inherit{label}{shorthand}
}

\begin{document}
\cite{MOR-0}\par
\cite[123]{MOR-1}\par
\cite[456]{MOR-2}\par
\cite{MOR-X}
\printbibliography

\end{document}

在此处输入图片描述

答案1

这不是很优雅,也许不是最好的选择,但以下内容确实构建了您指定的期望结果:

shorthand = {\printnames{shortauthor}\nameyeardelim\entrydata{\thefield{crossref}}{\printlabeldateextra}|\printfield{volume}},

在此处输入图片描述

在全:

\documentclass[ngerman]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{filecontents,babel}
\begin{filecontents}{\jobname.bib}
@mvBook{MOR-0,
  author        = {Ohnefalsch-Richter, Max},
  shortauthor = {MOR},
  year          = {1893},
  title     = {Kypros, die Bibel und Homer},
  volumes        = {2},
  publisher     = {A. Asher und Co.},
  location      = {Berlin},
  related = {MOR-1,MOR-2},
  relatedtype = {multivolume},
}

@Book{MOR-1,
  author        = {Ohnefalsch-Richter, Max},
  title         = {Text},
  volume        = {1},
  shortauthor = {MOR},
  crossref = {MOR-0},
  shorthand = {\printnames{shortauthor}\nameyeardelim\entrydata{\thefield{crossref}}{\printlabeldateextra}|\printfield{volume}},
  options = {skipbib,skiplab}
}

@Book{MOR-2,
  author        = {Ohnefalsch-Richter, Max},
  title         = {Tafeln},
  volume        = {2},
shortauthor = {MOR},
  shorthand = {\printnames{shortauthor}\nameyeardelim\entrydata{\thefield{crossref}}{\printlabeldateextra}|\printfield{volume}},
  crossref = {MOR-0},
  options = {skipbib,skiplab}
}

@mvBook{MOR-X,
  author        = {Ohnefalsch-Richter, Max},
  shortauthor = {MOR},
  year          = {1893},
  title     = {Kypros, the Bibel and Homer},
}

\end{filecontents}

\usepackage[           
  backend=biber,
  style=archaeologie,
]{biblatex} 
\addbibresource{\jobname.bib}

\DeclareDataInheritance{mvbook}{book}{
  \noinherit{year}
  \inherit{label}{shorthand}
}

\begin{document}
\cite{MOR-0}\par
\cite[123]{MOR-1}\par
\cite[456]{MOR-2}\par
\cite{MOR-X}
\printbibliography

\end{document}

相关内容