BibTeX can only sort ASCII characters. That's one reason why non-ASCII characters usually have to be 'escaped' with LaTeX macros as described in How to write “ä” and other umlauts and accented letters in bibliography?. (The other reason is that BibTeX has trouble generating initials for non-ASCII characters.)
Most BibTeX styles purify$ the sort key before it is used for sorting. This purify$ing converts some special control sequences to letters while ignoring all others and then removes all nonalphanumeric characters.
The control sequences that are replaced are listed below, all others (like \relax) are dropped.
| Control sequence |
Replacement |
\i |
i |
\j |
j |
\oe/\OE |
oe |
\ae/\AE |
ae |
\aa |
a |
\o |
o |
\l |
l |
\ss |
ss |
This means that {\AE}lk is sorted as aelk, but {\AA}lk, {\"A}lk and Alk all sort as alk.
The sort order generated by this usually works well for English-speaking publications, but might not be acceptable for other languages.
There are projects like
- BibTeX8, which can deal with 8bit encodings (probably not what you want nowadays with UTF-8 being the de facto standard), and
- BibTeXu, which can deal with Unicode, but the project seems underdocumented and at least I did not manage to make BibTeXu sort by Swedish or Danish tradition.
If you want Unicode support and locale-based sorting, currently your best bet in the LaTeX world is to use biblatex with Biber. With biblatex and Biber you can use Unicode directly in the input and sorting follows Unicode rules.
In the following MWE the sort order follows Unicode collation rules for the selected document language. A specific sort order different from the main document language can be forced with the sortlocale option.
\documentclass[swedish]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}
\begin{filecontents}{\jobname.bib}
@book{aalk,
author = {Anne Ålk},
title = {A Theory on Brontosauruses},
year = {1970},
publisher = {Monthy & Co.},
location = {London},
}
@book{alk,
author = {Anne Alk},
title = {A Theory on Brontosauruses},
year = {1971},
publisher = {Monthy & Co.},
location = {London},
}
@book{aelk,
author = {Anne Ælk},
title = {A Theory on Brontosauruses},
year = {1972},
publisher = {Monthy & Co.},
location = {London},
}
@book{aedlk,
author = {Anne Älk},
title = {A Theory on Brontosauruses},
year = {1973},
publisher = {Monthy & Co.},
location = {London},
}
@book{blk,
author = {Anne Blk},
title = {A Theory on Brontosauruses},
year = {1973},
publisher = {Monthy & Co.},
location = {London},
}
@book{nlk,
author = {Anne Nlk},
title = {A Theory on Brontosauruses},
year = {1975},
publisher = {Monthy & Co.},
location = {London},
}
@book{olk,
author = {Anne Olk},
title = {A Theory on Brontosauruses},
year = {1975},
publisher = {Monthy & Co.},
location = {London},
}
@book{oelk,
author = {Anne Ølk},
title = {A Theory on Brontosauruses},
year = {1975},
publisher = {Monthy & Co.},
location = {London},
}
@book{oedlk,
author = {Anne Ölk},
title = {A Theory on Brontosauruses},
year = {1975},
publisher = {Monthy & Co.},
location = {London},
}
@book{plk,
author = {Anne Plk},
title = {A Theory on Brontosauruses},
year = {1975},
publisher = {Monthy & Co.},
location = {London},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
ÅqvistandÆsopto be placed with entries that start withA-- the English language sorting convention -- or at the very end of the listing -- the Swedish convention? (I'm not sure about the other Nordic languages' sorting conventions.) Please advise. – Mico May 21 '21 at 03:52ÅandÆandÄas equivalent toAfor sorting purposes. In order to enable adherence to this convention, BibTeX requires replacement ofÅ,ÆandÄwith{\AA},{\AE}, and{\"A}, respectively; see How to write “ä” and other umlauts and accented letters in bibliography? for more information. If that's not what you're looking for, please post a new query (or apply a major edit to this query) and state more explicitly what you're looking to achieve. – Mico May 21 '21 at 04:26natbibis primarily a citation management package. As such, it exerts no influence whatsoever on the sorting of the entries. – Mico May 21 '21 at 04:28