Biber 语言环境与系统语言和 biblatex 语言不匹配

Biber 语言环境与系统语言和 biblatex 语言不匹配

假设我有一个这样的文件:

\documentclass{article}
\usepackage[backend=biber,language=british]{biblatex}
\addbibresource{bibliography.bib}

\begin{filecontents}{bibliography.bib}

@article{HauserYangBerwickTattersallRyanWatumullChomskyLewontin2014,
  Author = {Hauser, Marc D. and Yang, Charles and Berwick, Robert C. and Tattersall, Ian and Ryan, Michael and Watumull, Jeffrey and Chomsky, Noam and Lewontin, Richard},
  Date-Added = {2014-04-27 10:34:40 +0000},
  Date-Modified = {2014-07-06 19:19:20 +0000},
  Doi = {10.3389/fpsyg.2014.00401},
  Journaltitle = {Frontiers in Psychology},
  Number = {401},
  Title = {The Mystery of Language Evolution},
  Volume = {5},
  Year = {2014},
}

\end{filecontents}

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pharetra
odio a lacus tristique, eleifend consectetur sapien pellentesque.
Integer dictum mattis dapibus. Vivamus in sagittis nisi. Nunc quis
adipiscing mauris, ac malesuada sapien. Sed rhoncus sapien sit amet dui
imperdiet, sed sollicitudin turpis condimentum. Ut sed rutrum leo. Nam
hendrerit blandit convallis. Aliquam erat volutpat. Maecenas quis
bibendum ipsum, et fermentum metus. Nam semper congue malesuada.

\cite{HauserYangBerwickTattersallRyanWatumullChomskyLewontin2014}

\printbibliography

\end{document}

我可以顺利编译。如果我这样做,$ biber <filename>.bcf我会得到以下内容:

INFO - This is Biber 1.9
INFO - Logfile is 'paper.blg'
INFO - Reading 'paper.bcf'
INFO - Found 1 citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'bibliography.bib' for section 0
INFO - Decoding LaTeX character macros into UTF-8
INFO - Found BibTeX data source 'bibliography.bib'
INFO - Overriding locale 'en-US' defaults 'normalization = NFD' with 'normalization = prenormalized'
INFO - Overriding locale 'en-US' defaults 'variable = shifted' with 'variable = non-ignorable'
INFO - Sorting list 'nty' of type 'entry' with scheme 'nty' and locale 'en-US'
INFO - No sort tailoring available for locale 'en-US'
INFO - Writing 'paper.bbl' with encoding 'ascii'
INFO - Output to paper.bbl

这表明 biber 有一个语言环境,并且是 en-US。但我的系统语言(报告为$ echo $langen_GB.UTF-8)是 en_GB.UTF-8。biblatex 的语言选项指定英式英语。我注意到 .bcf 中的“sortlocale”键只是英语,我认为这意味着我们英语。因此,我推测这就是 biber 报告该区域设置的原因。

问题:biber 有此区域设置对我计划制作遵循英国英语惯例的文档有影响吗?如果是,我该如何更改它?或者英国和美国英语排序之间没有区别?

答案1

british只需使用选项和加载babel即可csquotes

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber]{biblatex}
\usepackage[british]{babel}
\usepackage{csquotes}
\addbibresource{bibliography.bib}

\begin{filecontents}{bibliography.bib}
@article{HauserYangBerwickTattersallRyanWatumullChomskyLewontin2014,
Author = {Hauser, Marc D. and Yang, Charles and Berwick, Robert C. and Tattersall, Ian and Ryan, Michael and Watumull, Jeffrey and Chomsky, Noam and Lewontin, Richard},
Date-Added = {2014-04-27 10:34:40 +0000},
Date-Modified = {2014-07-06 19:19:20 +0000},
Doi = {10.3389/fpsyg.2014.00401},
Journaltitle = {Frontiers in Psychology},
Number = {401},
Title = {The Mystery of Language Evolution},
Volume = {5},
Year = {2014},
}
\end{filecontents}

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pharetra
odio a lacus tristique, eleifend consectetur sapien pellentesque.
Integer dictum mattis dapibus. Vivamus in sagittis nisi. Nunc quis
adipiscing mauris, ac malesuada sapien. Sed rhoncus sapien sit amet dui
imperdiet, sed sollicitudin turpis condimentum. Ut sed rutrum leo. Nam
hendrerit blandit convallis. Aliquam erat volutpat. Maecenas quis
bibendum ipsum, et fermentum metus. Nam semper congue malesuada.

\cite{HauserYangBerwickTattersallRyanWatumullChomskyLewontin2014}

\printbibliography

\end{document}

在此处输入图片描述

.blg 文件如下:

[0] Config.pm:320> INFO - This is Biber 1.9
[0] Config.pm:323> INFO - Logfile is 'britishbib.blg'
[52] biber-MSWIN:274> INFO - === %a %b %e, %Y, %H:%M:%S
[52] Biber.pm:333> INFO - Reading 'britishbib.bcf'
[160] Biber.pm:635> INFO - Found 1 citekeys in bib section 0
[207] Biber.pm:3051> INFO - Processing section 0
[251] Biber.pm:3189> INFO - Looking for bibtex format file 'bibliography.bib' for section 0
[256] bibtex.pm:990> INFO - Decoding LaTeX character macros into UTF-8
[257] bibtex.pm:864> INFO - Found BibTeX data source 'bibliography.bib'
[298] UCollate.pm:66> INFO - Overriding locale 'en-GB' defaults 'normalization = NFD' with 'normalization = prenormalized'
[298] UCollate.pm:66> INFO - Overriding locale 'en-GB' defaults 'variable = shifted' with 'variable = non-ignorable'
[298] Biber.pm:2928> INFO - Sorting list 'nty' of type 'entry' with scheme 'nty' and locale 'en-GB'
[298] Biber.pm:2932> INFO - No sort tailoring available for locale 'en-GB'
[302] bbl.pm:517> INFO - Writing 'britishbib.bbl' with encoding 'UTF-8'
[303] bbl.pm:606> INFO - Output to britishbib.bbl

添加polyglossia:与和 一起使用Xe/LuaLaTeX,将上述代码的第 2-5 行替换为:

\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\usepackage[style=british]{csquotes}%
\usepackage[backend=biber, sortlocale=en-GB]{biblatex}%

相关内容