我正在努力解决获取“andothers”而不是“et al”的问题...有人知道它来自哪里吗?
以下是一些代码:
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{hyphenat}
\usepackage[T1]{fontenc}
\usepackage[a4paper]{geometry}
\usepackage{titling}
\usepackage{babel}
\usepackage{graphicx}
\usepackage{geometry}
\geometry{hmargin=2.5cm,vmargin=2cm}
\usepackage{setspace}
\onehalfspacing
\usepackage{gensymb}
\usepackage[format=hang]{caption}
% formatting of hyperlinks
\usepackage{url}
\usepackage{hyperref}
\usepackage{xcolor}
\hypersetup{
colorlinks,
linkcolor={red!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black}
}
% Use biblatex for references - change style= as appropriate
\usepackage[natbib=true,backend=biber,maxnames=99,style=authoryear,bibstyle=nature, url=false, doi=true]{biblatex}
\renewcommand*{\bibfont}{\fontsize{10}{12}\selectfont}
% add your references to this file
\addbibresource{test.bib}
\AtEveryBibitem{\clearfield{month}}
\AtEverycitekey{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}
\AtEveryCitekey{\clearfield{day}}
\AtEveryBibitem{\clearlist{language}}
\begin{filecontents}{\test.bib}
@article{nardo_competition_2016,
title = {Competition between Visual Events Modulates the Influence of Salience during Free-Viewing of Naturalistic Videos},
volume = {10},
issn = {1662-5161},
url = {http://journal.frontiersin.org/Article/10.3389/fnhum.2016.00320/abstract},
doi = {10.3389/fnhum.2016.00320},
abstract = {},
journaltitle = {Frontiers in Human Neuroscience},
shortjournal = {Front. Hum. Neurosci.},
author = {Nardo, Davide and Console, Paola and Reverberi, Carlo and Macaluso, Emiliano},
urldate = {2022-01-31},
date = {2016-06-28},
langid = {english},
file = {Nardo et al. - 2016 - Competition between Visual Events Modulates the In.pdf:C\:\\Users\\USER\\Zotero\\storage\\ARJR8KBX\\Nardo et al. - 2016 - Competition between Visual Events Modulates the In.pdf:application/pdf},
}
\end{filecontents}
答案1
我实际上无法用您的示例代码重现该问题,但以下 MWE 应该可以显示您所询问的问题
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[backend=biber, style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{aksin}
\end{document}
问题是,如果你加载babel
时没有将文档语言传递给babel
,babel
则会返回虚拟语言nil
,并且biblatex
没有任何语言定义nil
。因此会出现警告
Package biblatex Warning: Language 'nil' not supported.
(biblatex) Using dummy definitions on input line 10.
Package biblatex Warning: Bibliography string 'andothers' untranslated
(biblatex) at entry 'aksin' on input line 11.
解决办法是
babel
如果你不想用它,就不要用- 或者将您的文档语言传递给
babel
(这可以通过将语言作为全局类选项传递或通过直接将其传递给包来完成\usepackage
)。
我认为我通常更喜欢第二种解决方案。将语言传递给babel
(在示例中为全局类选项)后,事情将按预期进行。
\documentclass[12pt, english]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[backend=biber, style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{aksin}
\end{document}