I have a bibliography problem in Lyx or more generally in Latex, the sorting of names having "umlauts", i.e. especially Å, Ä and Ö is wrong, so e.g. "Gödel" should come after "Gzdel". I need sorting according to the Swedish/Finnish alphabet, which is like the English except that it ends in Å, Ä, Ö.

I found the following answer online: http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2006-06/msg00657.html. Shouldn't that work in Lyx. I did the following:

  1. In Document-Settings-Bibliography) changed the processor to bibtex8 and to the options field under it I wrote: --csfile 88591sca.csf. (When I look into that .csf file the sorting there seems to be specified correctly.)

  2. In Document-Settings-Language I set Encoding to Unicode (utf8).

I have tried other options but these options seem correct to me and produce no errors. After these changes the authors starting with Å,Ä,Ö are indeed put after all other bibliography entries but they are still not sorted correctly among themselves. So an author starting with Öa... comes before Äb.

Here is an example .bib (which I name "sortingtest.bib") I use for testing:

%Encoding: UTF-8

@Book{Aeauthor2001,   title     = {Test book one},   publisher = {Springer},   year      = {2001},   author    = {P. Äauthor}, }

@Book{Aacauthor2002,   title     = {Test book two},   publisher = {Springer},   year      = {2002},   author    = {K. Åcauthor}, }

@Book{Oebauthor2003,   title     = {Test book three},   publisher = {Springer},   year      = {2003},   author    = {J. Öbauthor}, }

@Comment{jabref-meta: databaseType:bibtex;}

And here is the .tex file Lyx produces if I export to Latex pdflatex (named "testingsorting.tex"):

%% LyX 2.2.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.


I also tried using the command line options on these files as follows:

pdflatex testingsorting.tex 
bibtex8 testingsorting.aux --csfile 88591sca.csf 
pdflatex testingsorting.tex

I have always used Lyx so I don't know if those are correct, but those do produce the same pdf as Lyx but again the sorting is wrong, after the second command it reports:

The 8-bit codepage and sorting file: 88591sca.csf The top-level auxiliary file: testingsorting.aux The style file: apalike.bst Database file #1: sortingtest.bib

So to me it looks like it should work? How to do this correctly, where is my mistake? If all else fails is there a way to work around this by somehow sorting entries by hand in the .bib file?

  • Biber doesn' seem to work "no output was generated" (I have never used it). Biblatex should work in the next 2.3 version of Lyx it can be made to work in the current Lyx with some effort. I probably should have started this project in biblatex but there is a learning curve and I'm short of time. Anyway I already spent much time creating a style in custom-bib and I'm not sure that will even work in biblatex. I didn't mention the custom style above because it's not relevant for the question as far as I can see. – Holger Oct 13 '17 at 11:54
  • Actually I do get the following with biber: ERROR - Cannot find control file 'testingsorting_biber.bcf'! - did you pass the "backend=biber" option to BibLaTeX?. – Holger Oct 13 '17 at 12:08
  • I think biber can only be used with biblatex, I was able to get biber to work following the instructions here: tex.stackexchange.com/questions/299312/…. It did indeed sort my example correctly but I was not able to use my custom style file which is obviously crucial. – Holger Oct 13 '17 at 13:03

Your Answer

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

Browse other questions tagged or ask your own question.