5

Suppose I have a file like this:

\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}

I can compile it fine. If I do $ biber <filename>.bcf I get the following:

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

This suggests to me that biber has a locale and it's en-US. But my system language, as reported by $ echo $lang is en_GB.UTF-8. The language option for biblatex specifies British English. I've noticed that in the .bcf the 'sortlocale' key is just English, which I take it means US English. So, I presume, that's why biber reports that locale.

Question: does it matter for my plan to make documents that follow British English conventions that biber has this locale setting? If so, how can I change it? Or is there no difference between UK and US English sorting?

7

Just load babel with option british and 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}

enter image description here

And the .blg file:

[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

Added: For use with polyglossia and Xe/LuaLaTeX, replacelines 2-5 of the previous code with:

\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\usepackage[style=british]{csquotes}%
\usepackage[backend=biber, sortlocale=en-GB]{biblatex}%
  • 1
    If not using US English, it is recommended to load csquotes: British and American quotation conventions are not the same. – jon Aug 4 '14 at 23:19
  • 1
    You're right, but that was not the main problem. Thanks for pointing it.I've modified my code. – Bernard Aug 5 '14 at 0:00
  • I don't think I need filecontents.sty. The built in environment that does what I want. – twsh Aug 5 '14 at 8:40
  • 1
    There seems to be a problem with polyglossia variants and biblatex. I reported on GitHub, hope it will be fixed. – Bernard Aug 5 '14 at 9:30
  • 1
    @Tom: I've updated my answer for use with polyglossia. The problem is solved with adding relevant options to biblatex and csquotes. – Bernard Aug 6 '14 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.