LaTeX forum ⇒ BibTeX, biblatex and biberLast names starting with W appears first in bibliography

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Hello123456789
Posts: 1
Joined: Thu May 30, 2019 4:47 pm

Last names starting with W appears first in bibliography

Postby Hello123456789 » Thu May 30, 2019 5:04 pm

Hi,

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:

  1. \usepackage{csquotes}%To use biblatex!
  2.  
  3. % Here you can choose if you want url or DOI in the bibliography!
  4. \usepackage[
  5. backend=biber,
  6. style=authoryear-icomp,
  7. sorting=nyc,
  8. isbn=false,
  9. doi=true,
  10. dashed=false,
  11. maxbibnames=99,
  12. uniquename=init,
  13. giveninits %to not print first names in bibliography
  14. ]{biblatex}
  15.  
  16. %ref.bib is the name of the biblatex file from zotero
  17. \addbibresource{ref.bib}
  18.  
  19. \DeclareFieldFormat[article]{title}{#1}
  20. \renewbibmacro{in:}{}
  21.  
  22. \renewcommand*{\finalnamedelim}{%
  23. \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  24. \addspace\&\space}
  25.  
  26. \DeclareLabeldate{%
  27. \field{date}
  28. \field{year}
  29. \field{eventdate}
  30. \field{origdate}
  31. % \field{urldate}
  32. \literal{nodate}
  33. }
  34.  
  35. %u.å is swedish for n.d. (no date)
  36. \DeclareFieldFormat{extrayear}{%
  37. \iffieldnums{labelyear}
  38. {\mknumalph{#1}}
  39. {\addnbthinspace\mknumalph{#1}}}
  40.  
  41. \DeclareFieldFormat{urldate}{\mkbibbrackets{#1}}
  42. % \NewBibliographyString{available}
  43.  
  44. %tillgänglig is swedish for available
  45. \DefineBibliographyStrings{swedish}{%
  46. urlfrom = {Tillgänglig},
  47. andothers = {et\addabbrvspace al\adddot},
  48. nodate = {u\adddot å\adddot}, % added: that currently stands with a % FIXME in swedish.lbx
  49. pages = {ss\adddot},
  50. }
  51.  
  52. \DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\space\url{#1}}
  53.  
  54. %", Vol. x (x),"
  55. % \DeclareFieldFormat[article]{volume}{vol. #1}
  56. \DeclareFieldFormat[article]{volume}{\bibstring{volume}~#1}
  57.  
  58. \renewbibmacro*{volume+number+eid}{%
  59. \setunit{\addcomma\space}%
  60. \printfield{volume}%
  61. \setunit*{\addnbspace}%
  62. \printfield{number}%
  63. \setunit{\addcomma\space}%
  64. \printfield{eid}}
  65. \DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
  66.  
  67. %"ss. XX-XX."
  68. % \DeclareFieldFormat[article]{pages}{ss. #1 \adddot}
  69. \DeclareFieldFormat{pages}{\mkpageprefix[bookpagination]{#1}}
  70.  
  71. % \DeclareNameAlias{sortname}{last-first}
  72. \DeclareNameAlias{sortname}{family-given}
  73. \DeclareSortingScheme{nyc}{
  74. \sort{
  75. \field{presort}
  76. }
  77. \sort[final]{
  78. \field{sortkey}
  79. }
  80. \sort{
  81. \field{sortname}
  82. \field{author}
  83. \field{editor}
  84. \field{translator}
  85. \field{sorttitle}
  86. \field{title}
  87. }
  88. \sort{
  89. \field{sortyear}
  90. \field{year}
  91. }
  92. \sort{\citeorder}
  93. }
Last edited by Stefan Kottwitz on Thu May 30, 2019 10:15 pm, edited 1 time in total.
Reason: code marked

User avatar
thomasb
Posts: 132
Joined: Thu Aug 03, 2017 10:54 am

Postby thomasb » Thu May 30, 2019 10:28 pm

Does this has something to do :
  1. \sort{
  2. \field{sortname}
  3. \field{author}
?


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 2 guests