我正在尝试使用 XeLaTeX/LuaLateX 和 biblatex/biber 编译文档,但在处理包含非英文字符的书目条目时遇到了麻烦。我的 MWE 是:
% -*- program: xelatex -*-
\documentclass[12pt,twoside,headings=big,open=right]{scrreprt}
\usepackage{scrhack,graphicx,subcaption,nomencl,setspace,fontspec,csquotes,microtype,xcolor,tocbibind,xspace,floatrow}
\defaultfontfeatures{Ligatures=TeX}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}
\usepackage[british]{babel}
\usepackage[style=authoryear-comp, punctfont, sorting=ynt, eprint=false, giveninits=true, uniquename=init, doi=false, url=false, isbn=false, backend=biber, maxbibnames=99, maxcitenames=2, uniquelist=false, backref=true]{biblatex}
\addbibresource{library.bib}
\setmainfont{Minion Pro}
\setsansfont{Myriad Pro}
\begin{document}
\autocite{Cetinkayadonmez1999}
\autocite{Imhoff1984}
\printbibliography
\end{document}
我的.bib 文件是:
@article{Cetinkayadonmez1999,
abstract = {Abstract},
author = {{{\c{C}}eti̇nkaya D{\"{o}}nmez}, G{\"{o}}n{\"{u}}l and {\"{O}}zt{\"{u}}rk, Ayten and {\c{C}}akmak{\c{c}}i, L{\"{u}}tf{\"{u}}},
journal = {Turkish Journal of Biology},
pages = {457--563},
title = {{Properties of the Rhodopseudomonas palustris Strains Isolated From an Alkaline Lake in Turkey | Growth Medium | Bacteria}},
volume = {23},
year = {1999}
}
@article{Imhoff1984,
abstract = {Abstract},
author = {Imhoff, J. F. and Truper, H. G. and Pfennig, N.},
doi = {10.1099/00207713-34-3-340},
issn = {0020-7713},
journal = {International Journal of Systematic Bacteriology},
month = {jul},
number = {3},
pages = {340--343},
title = {{Rearrangement of the Species and Genera of the Phototrophic "Purple Nonsulfur Bacteria"}},
volume = {34},
year = {1984}
}
如果我注释掉“Cetinkayadonmez1999”引文,“Imhoff1984”引文就能完美发挥作用。
author = {{{\c{C}}eti̇nkaya D{\"{o}}nmez}, G{\"{o}}n{\"{u}}l and {\"{O}}zt{\"{u}}rk, Ayten and {\c{C}}akmak{\c{c}}i, L{\"{u}}tf{\"{u}}},
到:
author = {{\cC}etinkaya D{\"o}nmez, G{\"o}n{\"u}l and {\"O}zt{\"u}rk, Ayten and {\cC}akmak{\cc}i, L{\"u}tf{\"u}},
但这并没有什么帮助。
我尝试使用 LuaLaTeX 和 XeLaTeX 进行编译,但都无法使用“Cetinkayadonmez1999”引文(它们都只能使用另一个引文)。
.bib 文件由 Mendeley 自动生成,因此如果可以找到一种不需要手动修复每个条目的解决方案,那就太好了(我的完整文件有数百个条目)。
我不太擅长解释 .log 文件,但我猜测相关部分是:
Package biblatex Info: XeTeX detected.
(biblatex) Assuming input encoding 'utf8'.
Package biblatex Info: Automatic encoding selection.
(biblatex) Assuming data encoding 'utf8'.
\openout4 = `main.bcf'.
Package biblatex Info: Trying to load bibliographic data...
Package biblatex Info: ... file 'main.bbl' found.
/MWE2/main.bbl)
Package biblatex Info: Reference section=0 on input line 15.
Package biblatex Info: Reference segment=0 on input line 15.
! Undefined control sequence.
\namepartfamily ->{\cC
}etinkaya\bibnamedelima D{ö}nmez
l.16 \autocite{Cetinkayadonmez1999}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
[1
] [2
]
Package microtype Info: Loading generic protrusion settings for font family
(microtype) `MyriadPro' (encoding: TU).
(microtype) For optimal results, create family-specific settings.
(microtype) See the microtype manual for details.
! Undefined control sequence.
\namepartfamily ->{\cC
}etinkaya\bibnamedelima D{ö}nmez
l.19 \end
{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
\namepartfamily ->{\cC
}akmak{\cc }i
l.19 \end
{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
\namepartfamily ->{\cC }akmak{\cc
}i
l.19 \end
{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
[3]
/MWE2/main.aux)
Package logreq Info: Writing requests to 'main.run.xml'.
\openout1 = `main.run.xml'.
)
答案1
错误在于
author = {{{\c{C}}eti̇nkaya D{\"{o}}nmez}, G{\"{o}}n{\"{u}}l and {\"{O}}zt{\"{u}}rk, Ayten and {\c{C}}akmak{\c{c}}i, L{\"{u}}tf{\"{u}}},
并且恰好在双姓氏周围的附加括号中。
如果你把它改成
author = {{\c{C}}etinkaya D{\"{o}}nmez, G{\"{o}}n{\"{u}}l and {\"{O}}zt{\"{u}}rk, Ayten and {\c{C}}akmak{\c{c}}i, L{\"{u}}tf{\"{u}}},
你不会遇到任何问题(也i̇
可能应该如此i
)。
另一方面,你可以安全地按正常书写方式输入姓名
author = {Çetinkaya Dönmez, Gönül and Öztürk, Ayten and Çakmakçi, Lütfü},
不幸的是,Mendeley 以做出奇怪的事情而闻名。