Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
1  
What style do you use? Would you mind preparing a short MWE? –  moewe Nov 1 '13 at 17:03
    
It does not become clear what style you use. Is it the standard style (numeric)? –  moewe Nov 1 '13 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 Nov 1 '13 at 17:57

2 Answers 2

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

share|improve this answer
    
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 Nov 1 '13 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 Nov 1 '13 at 19:45
    
Shouldn't the last change made over-ride anything which went before? –  WillAdams Nov 1 '13 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 Nov 1 '13 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 Feb 3 at 20:00

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.