
我在使用 Biber 和 LaTeX 時遇到一個錯誤:
這是我的 MNWE:
測試.圍脖:
@misc{citation1, title = {Any title}, author = {{{Foo} bar}}, },
測試.tex:
\documentclass{book}
\usepackage[backend=biber]{biblatex}
\addbibresource{test.bib}
\begin{document}
Minimal\cite{citation1}.
\end{document}
透過更改書目文件中的作者行可以 author = {{Foo} bar}
糾正問題。
錯誤:
(./test.bbl
Runaway argument?
{{{hash=caae7d4677b9798ddeb82790f6e3b20d}{{{Foo}\bibnamedelimb bar}}{\ETC.
! Paragraph ended before \name was complete.
使用BibTeX時,沒有問題(更改backend=bibtex
)。
試試使用biber 1.2和最後的biblatex和biber 0.99以及texlive2011中包含的biblatex,同樣的問題。
答案1
這是一個有點混亂的輸出格式,因為不清楚重點是保護「Foo」還是整個名稱。不需要要求 Zotero 團隊不要輸出如此混亂的 bibtex,請將其添加到您的 biber.conf 中以自動刪除已經完全受保護的名稱內的大括號:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<sourcemap>
<maps datatype="bibtex" map_overwrite="1">
<map>
<map_step map_field_source="AUTHOR"
map_match="\A{.+}\z" final="1"/>
<map_step map_field_source="AUTHOR"
map_match="(?:(?!\A){|}(?!\z))"
map_replace=""/>
</map>
</maps>
</sourcemap>
</config>
此特定修復需要 SF 的 biber 1.3/biblatex 2.3 開發版本,因為處理空替換字串時存在錯誤。