Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
I have a feeling I've answered something similar before, but was it here or somewhere else ... –  Joseph Wright Feb 3 '11 at 21:08
    
Oh, I remember now: someone asked me this about one of my biblatex styles. –  Joseph Wright Feb 3 '11 at 21:12
    
There is difference with backend=biber –  Herbert Feb 3 '11 at 21:42
add comment

3 Answers 3

up vote 13 down vote accepted

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

share|improve this answer
    
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. –  Will Robertson Feb 14 '11 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 '11 at 7:10
    
@PLK I'm not saying anything against biber but I really think it's a good idea to keep biblatex and the backend as separate as possible. It's fine to have features that only work in one backend, but who's to say that another radically different backend might not appear? –  Will Robertson Feb 15 '11 at 13:22
4  
For clarity: With the current version, you get the OP's desired effect with \renewcommand\bibinitdelim{\addnbthinspace}. –  Zack Apr 13 '12 at 21:58
1  
@Zack I think you should post this as an answer. –  Jörg Jun 7 '12 at 13:00
show 4 more comments

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}}
share|improve this answer
1  
I think we have a new winner here. :-) –  lockstep Feb 15 '11 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 '11 at 17:47
    
P.S. I still think a backend improvement is a good idea! –  Will Robertson Feb 15 '11 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 '11 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 '11 at 18:53
show 3 more comments

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.

share|improve this answer
    
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 '11 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 '11 at 21:29
    
Note that locally redefining ~ means you can get any separator you like :) (see my answer below) –  Will Robertson Feb 15 '11 at 13:51
1  
@Will: Now it's above :-) –  Hendrik Vogt Feb 15 '11 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 '11 at 18:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.