38

This question led to a new feature in a package:
biblatex

Robert Bringhurst, The Elements of Typographic Style, rule 2.1.5 states "Add little or no space within strings of initials."

If biblatex's firstinits option is enabled, "all first and middle names will be rendered as initials" (p. 54 of the manual). This, however, will put ties (~), i.e. non-breakable interword spaces between the initials. (See the .bbl-file of my compiled example.) How can I replace these ties with thin spaces (\,) and thus follow Bringhurst?

\documentclass{article}

\usepackage[firstinits=true]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{Knu86,
  author = {Knuth, Donald E.},
  year = {1986},
  title = {The \TeX book},
}
\end{filecontents}

\bibliography{\jobname}

\begin{document}

\nocite{*}

\printbibliography

\end{document}
4
  • I have a feeling I've answered something similar before, but was it here or somewhere else ...
    – Joseph Wright
    Feb 3, 2011 at 21:08
  • Oh, I remember now: someone asked me this about one of my biblatex styles.
    – Joseph Wright
    Feb 3, 2011 at 21:12
  • 1
    There is difference with backend=biber
    – user2478
    Feb 3, 2011 at 21:42
  • In light of tex.stackexchange.com/questions/196175/…, does this need revisiting? Note that in particular Biber now uses a more flexible approach to the stuff between initials.
    – Joseph Wright
    Aug 13, 2014 at 15:20

3 Answers 3

29

[update for biber 0.9+, April 2011]

You can customise this with \bibinitdelim:

\renewrobustcmd*{\bibinitdelim}{\,}

See the biblatex manual section 3.12.4 for a list of all name spacing macros.


Old answer:

Just to update this - biber 0.8.3/biblatex 1.3 have just been released and they address this issue. Biber no longer hard codes any typsetting in names---it only uses macros which can be changed from biblatex. See section 3.11.4 of the new biblatex manual.

[removed misleading biber 0.8.2 comments which are now obsolete]

Actually, thinking about this a little more coherently, what we're going to do soon is just make this a macro in biblatex so you can redefine any initials separators in biblatex. Probably in 1.3/0.8.3

10
  • Would it make sense to set this to, say, \biberinitsep and have it be set and configurable with biblatex? The whole idea of biblatex in the first place was to move away from having typesetting decisions in the back-end. Feb 14, 2011 at 21:30
  • We can do that too - I just wanted to make some way to do this available. In fact, when biblatex drops bibtex (program not format) support completely, which won't be that far in the future, it's not so inaccurate to say that the notion of a "backend" won't apply so much - the system will be "biblatex-biber". An option like this is unlikely to be set per document so it's not so bad having it set in the biber config file ...
    – PLK
    Feb 15, 2011 at 7:10
  • 1
    This is now implemented in biber 0.8.3/biblatex 1.3 released today. All of the spacing in name parts and sub-parts is handled by biber by inserting macros which are fully customisable in biblatex so biber isn't making any typsetting decisions for you any more.
    – PLK
    Mar 14, 2011 at 17:50
  • 8
    For clarity: With the current version, you get the OP's desired effect with \renewcommand\bibinitdelim{\addnbthinspace}.
    – zwol
    Apr 13, 2012 at 21:58
  • 1
    @Zack I think you should post this as an answer.
    – Jörg
    Jun 7, 2012 at 13:00
10

This solution isn't entirely general for when firstinits is not true, but otherwise it does exactly what you are asking for:

\documentclass{article}
\RequirePackage[firstinits=true]{biblatex}
\bibliography{xampl}
\renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}}
\makeatother
\begin{document}
 \nocite{whole-collection}
 \printbibliography
\end{document}

This code uses biblatex's hook into how to print the ‘first name’, which in this case is the initials, and substitutes ~ for \,. (I'm not sure if the nested set of braces are required, but it doesn't hurt to be careful.)

When firstinits is not in effect, this will end up putting thin spaces between someone's first name and their initial, which is probably not desirable. So you might want to qualify the definition above as

\renewcommand*{\mkbibnamefirst}[1]{{\iffirstinits{\let~\,}{}#1}}
8
  • 1
    I think we have a new winner here. :-)
    – lockstep
    Feb 15, 2011 at 16:38
  • @Will: A vote coming up once the day rolls over (I've run out for today, as per usual)
    – Joseph Wright
    Feb 15, 2011 at 17:47
  • P.S. I still think a backend improvement is a good idea! Feb 15, 2011 at 18:02
  • @Joseph: I should point out that this is the first time I've revoked acceptance of an answer. (You still have my upvote.)
    – lockstep
    Feb 15, 2011 at 18:25
  • @lockstep: no problem at all. At some stage this will hopefully be available from biblatex itself, so the best answer may change again
    – Joseph Wright
    Feb 15, 2011 at 18:53
6

The separator between initials is one of the few things that is defined in the file biblatex.bst rather than at the LaTeX level. If you look at a biblatex style file, you'll find that the biblatex kernel provides the full names and initials. Tracing back, these come from BibTeX's format.name$ function. I suspect the only way to customise this (currently) is to hack the process to do a search-and-replace on the initials. A longer-term solution is, of course, to make a feature request.

To explain how firstinits works, it's a switch which you can use inside a biblatex style to select either the full names or initials as supplied to the style by the biblatex kernel. So the formatting of the initials themselves is already done when the style gets the data.

5
  • But there's also the terseinits option. If you set it also to true in my example, the result is "DE Knuth". So maybe it is possible to change separators at the LaTeX level.
    – lockstep
    Feb 3, 2011 at 21:25
  • 1
    @lockstep. terseinits is passed to the BibTeX style (or to Biber). The way it works is that a flag is set for the BibTeX file, which then does the formatting using format.name$ (at least for BibTeX.)
    – Joseph Wright
    Feb 3, 2011 at 21:29
  • Note that locally redefining ~ means you can get any separator you like :) (see my answer below) Feb 15, 2011 at 13:51
  • 1
    @Will: Now it's above :-) Feb 15, 2011 at 16:56
  • 1
    In fact, terseinits passes an option to the backed to make it deal with initials in a different way. In the next release, terseinits will no longer exist as an option as there will be a more flexible way to control this with some macros at the LaTeX level.
    – PLK
    Feb 20, 2011 at 18:40

You must log in to answer this question.

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