将 \DJ 字符纳入参考书目

将 \DJ 字符纳入参考书目

我正在写一篇文章,想引用家族中带有删除线 D 的人。请参阅下面的 MWE:

LaTeX 文件:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[backend=biber]{biblatex}
\bibliography{mwe}
\begin{document}
Foo Bar\cite{foo}
\end{document}

BiBLaTeX

@Article{zbMATH00205607,
    Author = {Dragomir \v{Z}. {{\DJ}okovi\'c}},
    Title = {{Williamson matrices of order $4n$ for $n = 33, 35, 39$.}},
    Journal = {{Discrete Math.}},
    Volume = {115},
    Number = {1-3},
    Pages = {267--271},
    Year = {1993},
    Publisher = {Elsevier Science B.V. (North-Holland), Amsterdam}
}

当我尝试编译该文档时,我收到以下消息mwe.bbl:55: Paragraph ended before \name was complete.:日志文件内容为:

(./mwe.bbl
Runaway argument?
{{{hash=e95cf544cc8feefbc0a7a2390cb4acba}{{{{\DJ }}okovi\'{c}}}{{{\DJ \ETC.
! Paragraph ended before \name was complete.
<to be read again> 
                   \par 
l.55 

I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

据我所见,括号是匹配的。当我将名称更改为“Dokovic”时,文档编译成功,并且看起来正确。我该怎么做才能插入正确的名称?

答案1

通过输入

Author = {Dragomir \v{Z}. {{\DJ}okovi\'c}},

你基本上是在告诉 Biber,作者的姓氏只有一个字母,而这会让解析器感到困惑。

以下工作没有问题(我filecontents*只是为了使示例独立)。

\begin{filecontents*}{\jobname.bib}
@Article{zbMATH00205607,
    Author = {Dragomir \v{Z}. {\DJ}okovi\'c},
    Title = {Williamson matrices of order $4n$ for $n = 33, 35, 39$.},
    Journal = {Discrete Math.},
    Volume = {115},
    Number = {1-3},
    Pages = {267--271},
    Year = {1993},
    Publisher = {Elsevier Science B.V. (North-Holland), Amsterdam}
}
\end{filecontents*}

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

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

\begin{document}

Foo Bar\cite{zbMATH00205607}

\printbibliography

\end{document}

您可以避免加载inputenc,但最好这样做。我还会避免在字段中使用双括号。唯一可能受大小写变化影响的字段是标题。只需在标题中用括号括住必须保留字母大小写的单词,例如姓名(第一个单词永远不会改变)。

在此处输入图片描述

相关内容