6

How does one place a colon after the volume and before the page range for articles?

\documentclass{memoir}

\usepackage{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@Article{Reference:1994,
  author =   {First I. Last, and Second Y. Author},
  title =    {This is the article title},
  journal =  {T Journal T},
  journallongtitle =     {The Journal Title},
  year =     1994,
  volume =   50,
  pages =    {30--40}
}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}
4
  • 1
    What style do you use? Would you mind preparing a short MWE?
    – moewe
    Commented Nov 1, 2013 at 17:03
  • It does not become clear what style you use. Is it the standard style (numeric)?
    – moewe
    Commented Nov 1, 2013 at 17:21
  • I haven't been able to influence this regardless of the style I've tried --- I just want to know what command affects this and how to apply said command.
    – WillAdams
    Commented Nov 1, 2013 at 17:57
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers.
    – Sverre
    Commented Jun 12, 2015 at 17:56

2 Answers 2

5

The following works with either the default numeric or with the authoryear style but really only makes sense with the authoryear style since in the numeric style, the year comes after the volume. The punctuation before the pages is controlled by the macro \bibpagespunct.

\begin{filecontents}{\jobname.bib}
@Article{Reference:1994,
  author =   {First I. Last, and Second Y. Author},
  title =    {This is the article title},
  journal =  {T Journal T},
  journallongtitle =     {The Journal Title},
  year =     1994,
  volume =   50,
  number = 6,
  pages =    {30--40}
}
\end{filecontents}

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\addbibresource{\jobname.bib}
\renewcommand*{\bibpagespunct}{\addcolon\space}
\begin{document}
\autocite{Reference:1994}
\printbibliography
\end{document}

output of code

5
  • Apparently my MWE is too minimal --- I applied your change, but it didn't work in my full file. I'll have to see about making a longer question which more fully addresses my needs. Thanks!
    – WillAdams
    Commented Nov 1, 2013 at 18:55
  • 1
    @WillAdams But then you must be using a particular biblatex style that changes some of this. Without knowing what that is, it will be hard to solve.
    – Alan Munn
    Commented Nov 1, 2013 at 19:45
  • Shouldn't the last change made over-ride anything which went before?
    – WillAdams
    Commented Nov 1, 2013 at 22:50
  • @WillAdams Only if the relevant style uses the same bibmacros to print out the volume and pages. If it doesn't then changing what I suggested won't have any effect.
    – Alan Munn
    Commented Nov 1, 2013 at 23:16
  • This solution will also replace the comma with a colon for entries that aren't journal articles. While the colon is common for journal articles, it is not common for articles in edited volumes.
    – Sverre
    Commented Feb 3, 2014 at 20:00
3

This solution will add the colon only for journal articles (which is the only place you would want this, I believe). I've also removed the "In:" and "pp.", which I think are unusual solutions.

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{myarticle,
    AUTHOR = "John Doe",
    TITLE = "My article",
    JOURNALTITLE = "A Cool Journal",
    VOLUME = "16",
    PAGES = "18--56",
    YEAR = "2005"}
@incollection{mycontrib,
    AUTHOR = "Peter Smith",
    TITLE = "My contribution",
    BOOKTITLE = "A collection of articles",
    EDITOR = "John Carpenter",
    YEAR = "2010",
    LOCATION = "London",
    PAGES = "685--764"}
\end{filecontents}
\addbibresource{\jobname.bib}
\renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon\addspace}{\addcomma\addspace}}
\DeclareFieldFormat[article,incollection]{pages}{#1}
\renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\begin{document}
\nocite{myarticle,mycontrib}
\printbibliography
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .