# biblatex: space after modified bibnamedash when followed by “ed.”

I have run into a problem concerning spacing after bibnamedash and was hoping to find help here.

I have modified \bibnamedash with \renewcommand{\bibnamedash}{\rule[3pt]{3em}{.6pt}} to get a 3-em dash, which works fine in general, but when the dash is followed by "ed.", the space between the dash and "ed." is missing. I attach a minimal runnable example below. Is this a bug? Is there a workaround?

\documentclass[12pt]{article}

\begin{filecontents}{biblio.bib}
@incollection{Elster1997,
author = {Elster, Jon},
title = {The market and the forum},
subtitle = {Three varieties of political theory},
editor = {Bohman, James and Rehg, William},
location = {Cambridge, Massachusetts},
publisher = {The MIT Press},
year = {1997},
booktitle = {Deliberative democracy},
booksubtitle = {Essays on reason and politics},
pages = {3-33},
}
@collection{Elster1998,
editor = {Elster, Jon},
title = {Deliberative democracy},
location = {Cambridge},
publisher = {Cambridge University Press},
year = {1998},
}
\end{filecontents}

\usepackage[style=authoryear]{biblatex}

\renewcommand{\bibnamedash}{\rule[3pt]{3em}{.6pt}}

\begin{document}

This is a test file for biblatex (\cite{Elster1997}; \cite{Elster1998}).

\printbibliography

\end{document}

-
Welcome to TeX.sx! A tip: You can use backticks  to mark your inline code as I did in my edit. –  Marco Daniel Sep 30 '12 at 10:35
Use \renewcommand{\bibnamedash}{\rule[3pt]{3em}{.6pt}\space} –  Marco Daniel Sep 30 '12 at 10:46
@MarcoDaniel Or, possibly better, \addspace –  egreg Sep 30 '12 at 10:50
@egreg: I thought the same but please see my answer. I also found this post where P. Lehmann doesn't complain about \space: digipedia.pl/usenet/thread/1902/35231 ;-) –  Marco Daniel Sep 30 '12 at 10:53
Instead of posting a “Thank you” as an additional answer, you should thank [user] by upvoting [his/her] answer (with the upward pointing arrow to the left of it; you need 15 reputation points before you can upvote) and accepting it (by clicking on the checkmark). We want to keep the answer space reserved for actual answers, so this non-answer will be removed from public view soon. –  Marco Daniel Sep 30 '12 at 11:18

The default definition of bibnamedash is more complex. You can find the definition in the file biblatex.def. To explain the solution here the definition:

\newcommand*{\bibnamedash}{%
\ifdimless{\leftmargin}{0.75em}
{\mbox{\textemdash\space}}
{\makebox[\leftmargin][l]{%
\ifdimless{\leftmargin}{1.25em}
{\textendash}
{\textemdash}}}}


You can see, that the width of bibnamedash is related to leftmargin whereby the simple definition is: \mbox{\textemdash\space}. The other part can be ignored here. So for your problem you can easily do:

\renewcommand{\bibnamedash}{\rule[3pt]{3em}{.6pt}\space}

-
I'd prefer to use a length based on ex units for the rule's height: \renewcommand{\bibnamedash}{\rule[0.58ex]{3em}{.4pt}\space}. In this way the command is independent on the point size; 0.6pt seems too thick, but it's a matter of taste. The \mbox is surely redundant. –  egreg Sep 30 '12 at 11:09
Excellent! Thank you for the immediate reply! I have one more question, though: I realize that, according to the Chicago Manual of Style, which I am trying to follow here, the 3-em dash should in such cases be followed by a comma and then a space (since the dash stands for the name of the author/editor, and the name is followed by a comma when followed by "ed."). So how can I add a comma to the dash when the dash is followed by "ed."? –  Wolfhart Sep 30 '12 at 11:16
@egreg: Is the mbox redundant? I think you are right.The dimension ex is recommended depends on the author ;-) –  Marco Daniel Sep 30 '12 at 11:16
@Wolfhart: Do you mean \renewcommand{\bibnamedash}{\rule[3pt]{3em}{.6pt}\addcoma\space}` –  Marco Daniel Sep 30 '12 at 11:30
@Marco Daniel: The comma should be added after the dash only when followed by "ed.", since only in this case is the name followed by a comma. The command you propose adds the comma in every case. (Also, there is a typo, a missing "m" in addcomma.) –  Wolfhart Sep 30 '12 at 11:43