1

I am working on a bibliography where the entries are supposed to look like this:

Slager CJ, Wentzel JJ, Gijsen FJ, Schuurbiers JC, van der Wal AC, van der Steen AF, Serruys PW. The role of shear stress in the generation of rupture-prone vulnerable plaques. Nat Clin Pract Cardiovasc Med. 2005; 2:401-407.

I know that by activating the options giveninits and terseinits I can get the initials without dots that I need. However, there also is a limit of two initials per author that I may not exceed. For the example above, the bib-file looks like this:

@ARTICLE{slager.2005,
    author ={C. J. Slager and J. J. Wentzel and F. J. H. Gijsen and J. C. H. Schuurbiers and A. C. van der Wal and A. F. W. van der Steen and P. W. Serruys},
    title = {The role of shear stress in the generation of rupture-prone vulnerable plaques},
    journal = NCPCM,
    date = {2005},
    volume = {2},
    number = {8},
    pages = {401-407}
    }

Currently, I end up with Slager CJ, Wentzel JJ, Gijsen FJH, Schuurbiers JCH, van der Wal AC, van der Steen AFW, Serruys PW (three authors exceeding the limit). Somehow, I must get rid of all middle names after the first one, so I can keep the limit of two initials. What would be the best way to do this with biblatex?

2 Answers 2

1

You could try something like this -- but as you didn't provide a complete example, I couldn't test if it works with your style.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[terseinits,giveninits,maxnames=99]{biblatex}

\renewcommand\mkbibnamegiven[1]{{#1}}
\renewrobustcmd*{\bibinitdelim}{\def\bibinitdelim##1\bibinitperiod{}}

\addbibresource{test.bib}

\begin{document}
\cite{slager.2005}
\printbibliography

\end{document}

enter image description here

4
  • Now I've got "Slager CJ" right, but only one initial for the other authors. Actually, we've not yet decided on a style, but my client has done some weird stuff so far: In his text (MS-Word), he uses an author-year citing scheme. His bibliography is sorted alphabetically (makes sense), but the entries are numbered (why?) and the year is not next to the authors, but close to the end. I think biblatex-nejm would be a reasonable style for him -- if it hadn't been broken by "Changes for name formats to generalise available name parts" from biblatex v. 3.3 … sigh
    – Andreas
    Commented Jul 19, 2016 at 9:23
  • It you get only one initial then either the \renewcommand\mkbibnamegiven[1]{{#1}} has no effect (it groups the redefinition of bibinitdelim) or something interferes with it. That's the problem if proper examples are missing in a question ... one can't test answers properly. Commented Jul 19, 2016 at 9:35
  • I know, sorry for that. I guess I'll put the problem aside for the moment -- no point in shooting in the dark until we've settled on a style. Meanwhile I'll try to fix biblatex-nejm in a local copy: I need only @ARTICLE anyway. Or is there any other style you could recommend for a thesis in medicine?
    – Andreas
    Commented Jul 19, 2016 at 9:49
  • Actually, your code did work for me! I have not yet understood how it throws out every \namepartgiven after the second name, but it does.The trouble was a \DeclareNameFormat{author} directive in my config file: I reckon your code was applied first and converted, e.g., "F. J. H. Gijsen" to "Gijsen FJ", then my formatting directive took over and shortened "FJ" to "F" because it considered "FJ" as one word/name. Just goes to show that staying awake for 24+ hours is not always that helpful. :-D
    – Andreas
    Commented Jul 20, 2016 at 6:06
1

It is best to deal with this at source. biblatex 3.5/biber 2.6 (currently in DEV on Sourceforge) have an extended name format where you can specify the initials explicitly and so you could do this:

AUTHOR = {C. J. Slager and J. J. Wentzel and given=F. J. H., given-i=F. J., family=Gijsen and given=J. C. H., given-i=J. C., family=Schuurbiers and A. C. van der Wal and given=A. F. W., given-i=A. F., prefix=van der, family=Steen and P. W. Serruys}

Here, just using the extended format for those names where you want to explicitly set the initials to only two names. Alternatively, if you don't want to change the data source, you could do this with a sourcemap by putting something like this in your preamble (this should work with the current biblatex):

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
       \step[fieldsource=author,
             match=\regexp{([A-Z]\.\s*[A-Z]\.)\s*[A-Z]\.},
             replace=\regexp{$1}]
    }
  }
}

The exact regexp(s) will depend on your data, for example, if the names are always only given with initials in the data, then it's easier but could also been done for full names, depending on the format.

2
  • The extended name format certainly looks interesting, but I'm a bit afraid of replacing programs still in development for those from TeX Live. I also played around with the Sourcemap-regex, but the results I got where truly chaotic. :-) Guess I'd have to sanitize the database first, and even then there would be problematic cases. In my database I've got complete given names ("Juan Jose Badimon"), complete initials ("F. J. H. Gijsen") or mixed names/initials ("Steven E. Nissen and E. Murat Tuzcu"). To top it off, there are also acronyms for organizations ("WMA") that may not be shortened.
    – Andreas
    Commented Jul 20, 2016 at 7:39
  • If your data isn't very regular then doing it with regexps might be a bit messy. However, it's usually doable in stages as you don't need to have one regexp to cover every case - just try to normalise things in stages with multiple sequential regexps. The devel versions of biblatex/biber can be installed in a site/personal directory - you don't have to overwrite the TL versions - there are many such questions/answers on this site about doing this.
    – PLK
    Commented Jul 20, 2016 at 7:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .