# Automatically formatting punctuation using biblatex field format

Customising a biblatex style, I’d like to use ‘traditional’ typography where the format of punctuation follows that of the preceding text, for example

J. Organomet. Chem. 691. 13

with the full stop after ‘691’ in bold. I'm pretty sure that biblatex can do this automatically, but cannot find how to achieve it. From the documentation, \setpunctfont seems to be the function I want, but something like

\documentclass{article}
\usepackage[style=numeric]{biblatex}
\DeclareFieldFormat*{volume}{\mkbibbold{#1}\setpunctfont{\textbf}}
\bibliography{biblatex-examples}
\begin{document}
\nocite{*}
\printbibliography
\end{document}


fails (my example text is in ref. 3 in the resulting output). I’d rather not have to code the formatting in by hand, as it make maintenance awkward: how is this supposed to be done?

-
From reading the documentation it appears that \mkbibbold should do that automatically. Perhaps this is a bug? –  Alan Munn Feb 19 '11 at 23:33
@Alan: No, a bug in my reading of the manual :-) –  Joseph Wright Feb 20 '11 at 8:41
Except that I don't think it actually works. Removing the \setpunctfont{\textbf} doesn't change anything in your example, yet \mkbibbold should make the punctuation following the volume number bold. –  Alan Munn Feb 20 '11 at 12:55
@Alan: I've updated the answer to use a comma: try with and without punctfont to see the effect. –  Joseph Wright Feb 20 '11 at 13:02

Re-reading the manual, I find what I'm after is the punctfont option:

\documentclass{article}
\usepackage[style=numeric,punctfont]{biblatex}
\DeclareFieldFormat*{volume}{\mkbibbold{#1}}
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%