Is it OK to use '\ ' after initials in BibTeX files?
tl;dr I would not use \
after given name initials.
\
suppresses desirable automatically inserted ties (~
)
Consider
\documentclass{article}
\begin{filecontents}{\jobname.bib}
@book{a,
author = {A. Alpha},
title = {Title A},
year = {2010},
}
@book{b,
author = {B.\ Beta},
title = {Title B},
year = {2020},
}
\end{filecontents}
\begin{document}
\cite{a,b}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
Note that the .bbl
file contains
\begin{thebibliography}{1}
\bibitem{a}
A.~Alpha.
\newblock {\em Title A}.
\newblock 2010.
\bibitem{b}
B.\ Beta.
\newblock {\em Title B}.
\newblock 2020.
\end{thebibliography}
Which means that BibTeX automatically inserts a ~
if you input the name as A. Alpha
, but not if you input it as B.\ Beta
.
Since ~
avoids a line break after the initial, I'd argue that the form with ~
is more desirable here. In this case the \
is therefore detrimental.
.\
does generally not behave different than .
in bibliographies
The situation is prima facie different in
\documentclass{article}
\begin{filecontents}{\jobname.bib}
@book{a,
author = {Anne A. Alpha},
title = {Title A},
year = {2010},
}
@book{b,
author = {Berta B.\ Beta},
title = {Title B},
year = {2020},
}
\end{filecontents}
\begin{document}
\cite{a,b}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
where we get
\begin{thebibliography}{1}
\bibitem{a}
Anne~A. Alpha.
\newblock {\em Title A}.
\newblock 2010.
\bibitem{b}
Berta~B.\ Beta.
\newblock {\em Title B}.
\newblock 2020.
\end{thebibliography}
This time Anne~A. Alpha
has a normal space, but Berta~B.\ Beta
a control space.
In all standard bibliography setups that I know of, there is no practical difference between the two though, since the bibliography is set with \sfcode`\.\@m
or \frenchspacing
, which means that spaces after .
s are not enlarged (as usually the case with \nonfrenchspacing
).
What's more A. Alpha
and A.\ Alpha
already behave the same in a 'normal' document context (thanks to Especially Lime for pointing that out in the comments). Since uppercase letters have a different space factor than lowercase letters, a space following a period after an uppercase letter will result in a normal space.
Of course it would theoretically be possible to change the standard behaviour such that .\
and .
behave differently, but it is reasonable not to expect this to be the case.
\
may end up in the .bbl
output turning characters into macros
There can be more problems if \
comes at the end of a field/name part and the space is discarded
\documentclass{article}
\begin{filecontents}{\jobname.bib}
@book{a,
author = {Bertsekas, D.\ P.\ },
title = {Title A},
year = {2010},
}
@book{b,
author = {Bertsekas, D.\ P.\},
title = {Title B},
year = {2015},
}
@book{c,
author = {D.\ P.\ Bertsekas},
title = {Title C},
year = {2020},
}
\end{filecontents}
\begin{document}
\cite{a,b,c}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
gives
\begin{thebibliography}{1}
\bibitem{a}
D.\~P.\ Bertsekas.
\newblock {\em Title A}.
\newblock 2010.
\bibitem{b}
D.\~P.\ Bertsekas.
\newblock {\em Title B}.
\newblock 2015.
\bibitem{c}
D.\~P.\ Bertsekas.
\newblock {\em Title C}.
\newblock 2020.
\end{thebibliography}
which comes out as
The problem here is not the removal of the trailing space at the end (I'd have to check this, but I'm pretty sure BibTeX automatically discards leading and trailing space). The problem is that BibTeX inserts ~
between the name parts, which gets combined with \
to \~
, so puts a tilde over the next character.
Because BibTeX is not LaTeX it is not a .bib
-syntax error to say
author = {Name\},
but then BibTeX will assume the name is Name\
. If the name is then printed in the .bbl
file the \
may end up next to another character that then gets turned into a macro.
The documentation only mentions D. E. Knuth
The version with \
is definitely not encouraged or even mentioned in any of the official BibTeX documentation that I know of. btxdoc
only has
author = {D. E. Knuth},
So I would argue this is the intended input for initials.
The \
is generally more likely to have negative side effects and only has no benefits in standard setups. I would avoid it.
Just to recap
- BibTeX can already automatically insert unbreakable space instead of a normal space in some places. In particular
D. P. Bertsekas
will becomeD.~P.~Bertsekas
with most styles.~
is probably preferred over\
here. .\
and.
will generally behave the same in the bibliography (and for the name use case even anywhere)- BibTeX may strip spaces in some contexts, which may cause
\
to become only a backslash\
, which may in unfortunate circumstances end up in places where it turns things into macros that were not intended to be macros.
Note that D.P. Bertsekas
should ideally be D. P. Bertsekas
, since abbrv
abbreviates D.P. Bertsekas
to "D. Bertsekas" because it can't tell that "D.P." are two initials and not one first name.