# Biblatex - How to change format of journal, volume and page numbers in bibliography

I'm a little bit stuck in my attempts to change the format of my journal articles in my biblatex biography.

What i have so far:

Smith, A. and Smith, J. (2006). Article title. Journal title 29.2, pp. 1-43.


What is the goal:

Smith, A. and Smith, J. (2006). Article title. Journal title, 29(2): 1-43.


and (if there is no issue defined):

Smith, A. and Smith, J. (2006). Article title. Journal title, 29: 1-43.


Here is my MWE:

\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=authoryear,maxcitenames=2,maxbibnames=50,firstinits=true,uniquelist=false,uniquename=init,isbn=false,doi=false,useprefix=true]{biblatex}
\DeclareNameAlias{sortname}{last-first}
\DeclareFieldFormat[article]{title}{#1}
\DeclareFieldFormat[article]{journaltitle}{#1}
\DeclareFieldFormat[book]{title}{#1}
\renewbibmacro{in:}{%
\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{initials,
author = {Doe, J. P. and Jones, J.},
title = {An article coauthored by John-Paul Doe},
journal = {Journal title},
volume = {29},
pages = {825--833},
year = {2008}}
@Article{smitha,
author = {Smith, Anne and Smith, Joe},
title = {Article title},
journal = {Journal title},
volume = {29},
number = {2},
pages = {1--43},
year = {2006}}
\end{filecontents}

\begin{document}
\cite{initials,smitha}
\printbibliography
\end{document}


This code should do what you want (with a suggestion of @Moewe):

\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=authoryear,maxcitenames=2,maxbibnames=50,firstinits=true,uniquelist=false,uniquename=init,isbn=false,doi=false,useprefix=true]{biblatex}
\DeclareNameAlias{sortname}{last-first}
\DeclareFieldFormat[article]{title}{#1}
\DeclareFieldFormat[article]{journaltitle}{#1}
\DeclareFieldFormat[book]{title}{#1}
\DeclareFieldFormat[article]{pages}{#1}
\renewbibmacro{in:}{%
\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

\usepackage{xpatch}
\xpatchbibmacro{journal+issuetitle}{%
\iffieldundef{series}}
{%
\iffieldundef{series}}{}{}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{initials,
author = {Doe, J. P. and Jones, J.},
title = {An article coauthored by John-Paul Doe},
journal = {Journal title},
volume = {29},
pages = {825--833},
year = {2008}}
@Article{smitha,
author = {Smith, Anne and Smith, Joe},
title = {Article title},
journal = {Journal title},
volume = {29},
number = {2},
pages = {1--43},
year = {2006}}
\end{filecontents}

\renewbibmacro*{volume+number+eid}{%
\printfield{volume}
\printfield[parens]{number}%

• I think redefining the bibstrings for pages to be empty (or a space) is less than ideal, a change like \DeclareFieldFormat{pages}{#1} or \DeclareFieldFormat{pages}{\ifentrytype{article}{#1}{\mkpageprefix[bookpagination]{#1}}} seems much more elegant. You might also want to make the change of \bibpagespunct type-dependant. – moewe Apr 12 '15 at 12:10
• Yes, the type-dependency might have an element of inconsistency, but seems to be widely accepted (CMS & MLA handle @articles differently, I think). Since the OP seems to have embraced \ifentrytype{article} already in their MWE and the question mentioned only @articles I found it natural to change only those. – moewe Apr 12 '15 at 12:24
• That feature was added. One must use the xpatch package for that. See my updated answer. – Bernard Apr 12 '15 at 17:29