![在引用中的“et al.”后添加逗号不适用于其他语言的“et al.”](https://linux22.com/image/307628/%E5%9C%A8%E5%BC%95%E7%94%A8%E4%B8%AD%E7%9A%84%E2%80%9Cet%20al.%E2%80%9D%E5%90%8E%E6%B7%BB%E5%8A%A0%E9%80%97%E5%8F%B7%E4%B8%8D%E9%80%82%E7%94%A8%E4%BA%8E%E5%85%B6%E4%BB%96%E8%AF%AD%E8%A8%80%E7%9A%84%E2%80%9Cet%20al.%E2%80%9D.png)
在作业中,我需要按照以下格式来引用:
- 作者年份格式
- 在 andothers 字符串后面加上逗号(通常为“et al.”)
- 将“et al.”翻译为“ym”。(芬兰语)
我知道如何用这种方式添加逗号:\renewcommand*{\nameyeardelim}{\addcomma\addspace}
。我还知道一种定义要翻译成芬兰语的参考书目字符串的方法:\DefineBibliographyStrings{finnish}{andothers={ym.}}
。这两种方法单独使用时效果都很好,但同时使用时,逗号不会出现。如何翻译“et al.”并在其后面添加逗号?
我没有找到使用 Biber 来实现这一点的方法。这是我首选的书目处理方法,我不想为了解决这个小问题而学习一种新方法。
为了澄清起见,下面是最少的示例和输出。
% Works fine, except that the andothers is in the wrong language:
\documentclass{article}
\usepackage[finnish]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, maxcitenames=1, style=authoryear]{biblatex}
%\DefineBibliographyStrings{finnish}{andothers={ym.}} % To translate "et al."
\ExecuteBibliographyOptions{firstinits=true, uniquename=init}
\addbibresource{et_al.bib}
\renewcommand*{\nameyeardelim}{\addcomma\addspace} % To add the comma
\begin{document}
I refer to~\parencite{reference}.
\printbibliography
\end{document}
输出:
% The et al. is in the correct language, but the comma ends up missing in the output:
\documentclass{article}
\usepackage[finnish]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, maxcitenames=1, style=authoryear]{biblatex}
\DefineBibliographyStrings{finnish}{andothers={ym.}} % To translate "et al."
\ExecuteBibliographyOptions{firstinits=true, uniquename=init}
\addbibresource{et_al.bib}
\renewcommand*{\nameyeardelim}{\addcomma\addspace} % Should add the comma, but somehow doesn't work
\begin{document}
I refer to~\parencite{reference}.
\printbibliography
\end{document}
输出:
.bib文件如下:
@article{reference,
author = {Author, Andrew and Example, Edgar},
title = {Example article},
year = 2015,
journal = {Some Journal}
}
答案1
通常,将字符串等中的biblatex
文字句号解释为句子结束句号,并抑制后面的标点符号以避免双重标点符号。.
因此我们需要确保biblatex
知道.
inym.
是缩写点。这可以通过ym.\isdot
(我们将文字句点随后转换为点)或ym\adddot
(我们直接插入缩写点)来实现。
所以你可以
\DefineBibliographyStrings{finnish}{andothers={ym\adddot}}
平均能量损失
\documentclass{article}
\usepackage[finnish]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, maxcitenames=1, style=authoryear]{biblatex}
\DefineBibliographyStrings{finnish}{andothers={ym\adddot}}
\ExecuteBibliographyOptions{firstinits=true, uniquename=init}
\begin{filecontents}{\jobname.bib}
@article{reference,
author = {Author, Andrew and Example, Edgar},
title = {Example article},
year = 2015,
journal = {Some Journal}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\renewcommand*{\nameyeardelim}{\addcomma\addspace}
\begin{document}
I refer to~\parencite{reference}.
\printbibliography
\end{document}