11

I have a problem related to prefixes in the family names of researchers that I cite in my thesis. People whose names start with "van", "von, "den", "van der", and the like. I would want these to appear with the prefix in small letters in front of the family name in the reference in the running text, like (den Besten1983), then also in the same way in the bibliography, but not sorted after the prefix. So "den Besten, Hans" should be listed under B. With my current settings, I get (Besten1983) in the text, and "Besten, Hans den" in the bibliography. I have tried enclosing "den Besten" in curly brackets in the BibTex source (I use Jabref), like this {den Besten}, Hans. This gives the right result in the reference, but lists the name as "den Besten, Hans" under D in the bibliography.

Source in JabRef: author = {den Besten, Hans},

Here is a MWE:

\documentclass[12]{article}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage [T1]{fontenc}
\usepackage[backend=biber, style=authoryear-comp]{biblatex}
\addbibresource{ref.bib}
\begin{document}
Blabla \cite{denBesten1983}. 
\printbibliography
\end{document} 
Mico
  • 506,678
EspenJK
  • 519

1 Answers1

10

There are several ways to do this (see for example Biblatex handling of Dutch "van" prefix), but with a current biblatex I would do the following

  1. Set the useprefix=true option. This tells biblatex to treat "den Boer" as the family name, always printing "den Boer" and sorting under "d".
  2. Change the sorting so names are sorted by their family component first and only then by the prefix. Hence, contrary to what useprefix=true from point 1 would dictate, "den Boer" sorts under "B".
  3. Modify the bibliography so that the prefix is not capitalised. (Since each bib item issues \bibsentence by default at a very late stage after the \AtEveryBibitem hook is processed, the cleanest solution I could find is to hook into the begentry bibmacro.)

\documentclass[12]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear-comp, useprefix]{biblatex}

\DeclareSortingNamekeyTemplate{
  \keypart{
    \namepart{family}
  }
  \keypart{
    \namepart{prefix}
  }
  \keypart{
    \namepart{given}
  }
  \keypart{
    \namepart{suffix}
  }
}

\renewbibmacro{begentry}{\midsentence}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{besten,
  author  = {Hans den Besten},
  title   = {On the Importance of the Civil Service},
  date    = {1980},
}
@book{boer,
  author  = {Hans de Boer},
  title   = {On the Importance of the Civil Service},
  date    = {1980},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}


\begin{document}
\cite{besten}\nocite{boer,baez/article,cicero,worman,sigfridsson} 
\printbibliography
\end{document} 

enter image description here

moewe
  • 175,683
  • Thanks, but I seem to be doing something wrong. If I just add the "useprefix" option to the biblatex package, and then copy everything from "\DeclareSortingNamekeyTemplate" to \end{filecontents} into the preamble, I get the error message "Undefined control sequence" / DeclareSortingNamekeyTemplate" ... This is probably my fault, what am I doing wrong? Does the filecontents package rewrite BibLatex sources? I suppose I should change "\ref.jobname" for my own .bib-file? – EspenJK Jul 11 '18 at 06:26
  • 1
    @EspenJK You are using an outdated version of biblatex. You should consider updating (as always, an update shortly before a deadline might be ill-advised, updates always have the potential to break stuff). In old versions \DeclareSortingNamekeyTemplate was called \DeclareSortingNamekeyScheme, so you could replace the new name with the old one, maybe it works for you then. – moewe Jul 11 '18 at 06:30
  • I trid that, still gives the same error message. I will of course update biblatex as soon as I have handed in my thesis. Is there something else I could be doing wrong? Mind, what I have done, concretely, is to add the "useprefix" option and then copy-paste everything in your code from \DeclareSorting... to \end{filecontents} I did not, for instance, change \jobname.bib into my own filename. Basically because I don't know exactly what this package is doing! – EspenJK Jul 11 '18 at 06:39
  • 1
    @EspenJK If you replaced \DeclareSortingNamekeyTemplate with \DeclareSortingNamekeyScheme the error message can't be the same because there is no \DeclareSortingNamekeyTemplate any more. \DeclareSortingNamekeyScheme was introduced in version 3.3 back in March 2016, it was renamed to \DeclareSortingNamekeyTemplate` in version 3.8 in November 2017. If your system is older than that, you can try https://tex.stackexchange.com/q/226893/35864. ... – moewe Jul 11 '18 at 06:45
  • ... The filecontents is just to produce a .bib file the MWE can use, it is not needed in your actual document. Only copy the bit up to \renewbibmacro{begentry}{\midsentence}. – moewe Jul 11 '18 at 06:51
  • @moeve, what I meant is that the error message is of the same type, although of course now it reads: "Undefined control sequence.\ DeclareSortingNamekeyScheme" I also removed the filecontents bit... – EspenJK Jul 11 '18 at 07:37
  • I followed your link and adopted the solution there, which seems to work, although it prints the prefix with a capital letter in the bibliograpghy : Den Besten, Hans. Thanks a lot! – EspenJK Jul 11 '18 at 07:45
  • 1
    @EspenJK Even with \renewbibmacro{begentry}{\midsentence}? – moewe Jul 11 '18 at 07:46
  • @moeve, sorry, I was a bit quick. With \renewbibmacro{begentry}{\midsentence} eveything works perfectly. Thanks again, you deserve a mention in the Acknowledgements part of my thesis. :) – EspenJK Jul 11 '18 at 07:57
  • This works well for \cite, \textcite, \parencite etc., but not for \footcite, where the prefix is still printed with an upper-case initial in the footnote. Can anything be done about this? – gnucchi Nov 18 '18 at 15:15
  • \xpatchbibmacro{name:family}{\MakeCapital}{}{}{} and \AtBeginBibliography{\renewcommand*{\mkbibnameprefix}[1]{\midsentence #1}} seem to be having the effect i am looking for. – gnucchi Nov 18 '18 at 15:33
  • 1
    @svenper By default biblatex capitalises the beginning of a \footcite like the beginning of a sentence, hence the prefix comes out with a capital letter. It's the same for ibidem in a footnote citation, which comes out as "Ibid." if it is the first word. You can completely turn off this behaviour with \renewcommand{\bibfootnotewrapper}[1]{#1\addperiod}. If you want only your name prefixes to ignore capitalisation you need to remove the \MakeCapital from name:family-given and name:family (I wouldn't redefine \mkbibnameprefix for that). – moewe Nov 18 '18 at 15:48
  • 1
    Thank you! It seems so much more complex than BibTeX sometimes :-). – cfr Jan 18 '19 at 02:55