I am new with latex, I'm writing a report in Overleaf and now I have a bibiography problem. The bibliography looks fine, it prints the references on the form I want and also the in-text citations work well. However, authors with a last name starting with W appear at the top of the bibliography. The rest of the bibliography is in alphabetical order - as it is supposed to be. So I guess I must somehow have told biblatex that the alphabet starts with W?
I think the problem should be somewhere in here, but I just can't find it:
Code: Select all
\usepackage{csquotes}%To use biblatex!
% Here you can choose if you want url or DOI in the bibliography!
\usepackage[
backend=biber,
style=authoryear-icomp,
sorting=nyc,
isbn=false,
doi=true,
dashed=false,
maxbibnames=99,
uniquename=init,
giveninits %to not print first names in bibliography
]{biblatex}
%ref.bib is the name of the biblatex file from zotero
\addbibresource{ref.bib}
\DeclareFieldFormat[article]{title}{#1}
\renewbibmacro{in:}{}
\renewcommand*{\finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
\addspace\&\space}
\DeclareLabeldate{%
\field{date}
\field{year}
\field{eventdate}
\field{origdate}
% \field{urldate}
\literal{nodate}
}
%u.å is swedish for n.d. (no date)
\DeclareFieldFormat{extrayear}{%
\iffieldnums{labelyear}
{\mknumalph{#1}}
{\addnbthinspace\mknumalph{#1}}}
\DeclareFieldFormat{urldate}{\mkbibbrackets{#1}}
% \NewBibliographyString{available}
%tillgänglig is swedish for available
\DefineBibliographyStrings{swedish}{%
urlfrom = {Tillgänglig},
andothers = {et\addabbrvspace al\adddot},
nodate = {u\adddot å\adddot}, % added: that currently stands with a % FIXME in swedish.lbx
pages = {ss\adddot},
}
\DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\space\url{#1}}
%", Vol. x (x),"
% \DeclareFieldFormat[article]{volume}{vol. #1}
\DeclareFieldFormat[article]{volume}{\bibstring{volume}~#1}
\renewbibmacro*{volume+number+eid}{%
\setunit{\addcomma\space}%
\printfield{volume}%
\setunit*{\addnbspace}%
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
%"ss. XX-XX."
% \DeclareFieldFormat[article]{pages}{ss. #1 \adddot}
\DeclareFieldFormat{pages}{\mkpageprefix[bookpagination]{#1}}
% \DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{sortname}{family-given}
\DeclareSortingScheme{nyc}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}
\field{year}
}
\sort{\citeorder}
}