![使用 biblatex 对参考书目中的作者进行错误分组](https://linux22.com/image/273520/%E4%BD%BF%E7%94%A8%20biblatex%20%E5%AF%B9%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%E4%B8%AD%E7%9A%84%E4%BD%9C%E8%80%85%E8%BF%9B%E8%A1%8C%E9%94%99%E8%AF%AF%E5%88%86%E7%BB%84.png)
我在使用 biblatex 对参考书目中的作者姓名进行分组时遇到了一个奇怪的错误 (?)。使用以下 MWE,参考书目没有问题:所有参考资料都在“Vega y Carpio, Lope de”下找到:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[style=verbose]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{lopedevegaarte,
author = {Vega y Carpio, Félix Lope de},
title = {Arte nuevo de hacer comedias},
location = {Madrid},
year = 1609,
}
@Book{vega-obrascompletas-prosaiii,
author = {Vega y Carpio, Félix Lope de},
maintitle = {Obras completas},
volume = 3,
title = {Prosa. Epistolario, I (1604-1633)},
location = {Madrid},
year = 2008,
}
@book{Vega-jerusalem,
author = {Vega y Carpio, Félix Lope de},
title = {La Jerusalén conquistada},
year = 1609,
location = {Madrid},
}
@Book{vega1997peribocana,
author = {Vega y Carpio, Félix Lope de},
title = {Peribáñez y el comendador de Ocaña},
year = 1997,
editor = {McGrady, Donald},
introduction = {Oleza, Joan},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
但:如果我将以下项目添加到书目中,则参考书目将无法正确分组:
@book{Vega-jerusalemreprint,
author = {Vega y Carpio, Félix Lope de},
title = {La Jerusalén conquistada},
year = 1954,
editor = {Entrambasaguas, Joaquín de},
related = {Vega-jerusalem},
relatedtype = {reprintof}
}
看图片:
版本:Biblatex (2.6) 和 biber (1.6)。
答案1
这是任何提供此选项的标准样式中都会出现的错误dashed
。相关条目可以用换行符分隔,因此可能需要一些时间才能找到最佳解决方案。作为临时解决方法,请将以下内容添加到文档序言中。
\usepackage{xpatch}
\makeatletter
\xpretobibmacro{related}{\booltrue{bbx@inset}\let\bbx@relatedhash\bbx@lasthash}{}{}
\xapptobibmacro{related}{\global\let\bbx@lasthash\bbx@relatedhash}{}{}
\makeatother
答案2
我尝试编译你的代码并且它似乎运行良好:
pdflatex article.tex
biber article.bcf
pdflatex article.tex
代码:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[style=verbose]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{lopedevegaarte,
author = {Vega y Carpio, Félix Lope de},
title = {Arte nuevo de hacer comedias},
location = {Madrid},
year = 1609,
}
@Book{vega-obrascompletas-prosaiii,
author = {Vega y Carpio, Félix Lope de},
maintitle = {Obras completas},
volume = 3,
title = {Prosa. Epistolario, I (1604-1633)},
location = {Madrid},
year = 2008,
}
@book{Vega-jerusalem,
author = {Vega y Carpio, Félix Lope de},
title = {La Jerusalén conquistada},
year = 1609,
location = {Madrid},
}
@Book{vega1997peribocana,
author = {Vega y Carpio, Félix Lope de},
title = {Peribáñez y el comendador de Ocaña},
year = 1997,
editor = {McGrady, Donald},
introduction = {Oleza, Joan},
}
@book{Vega-jerusalemreprint,
author = {Vega y Carpio, Félix Lope de},
title = {La Jerusalén conquistada},
year = 1954,
editor = {Entrambasaguas, Joaquín de},
related = {Vega-jerusalem},
relatedtype = {reprintof}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
输出: