4

Does biblatex have an articleno field or equivalent? In addition, can I use article number in page ranges? The problematic article in questions has the following:

pages = {19:1--19:39},
articleno = {19},

and can be found here: http://dl.acm.org/citation.cfm?id=2431218

  • 1
    You could perhaps use the note field. – Bernard Aug 1 '14 at 20:49
7

Of course you could just use the note field, as that is printed in just the right position by the standard styles.

But we can define a new articleno field (which is way more fun ;-)). This is done in a separate .dbx file called articleno.dbx (in the MWE it is created via filecontents)

\ProvidesFile{articleno.dbx}

\DeclareDatamodelFields[type=field,datatype=integer]{articleno}
\DeclareDatamodelEntryfields[article]{articleno}

We can also define a new bibstring to be printed before the article number

\NewBibliographyString{artno}
\DefineBibliographyStrings{english}{artno = {Art\adddotspace No\adddot}}

The articleno field is introduced by this new string

\DeclareFieldFormat{articleno}{\bibstring{artno}\addabbrvspace #1}

We then redefine the note+pages macro to also print the articleno field

\renewbibmacro*{note+pages}{%
  \printfield{note}%
  \setunit{\bibpagespunct}%
  \printfield{articleno}
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \newunit}

MWE

\documentclass{article}
\usepackage[backend=biber,style=authoryear,datamodel=articleno]{biblatex}
\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}
@article{mooney,
  author    = {Mooney, Carl H. and Roddick, John F.},
  title     = {Sequential Pattern Mining -- Approaches and Algorithms},
  journal   = {ACM Comput. Surv.},
  volume    = {45},
  number    = {2},
  date      = {2013-03},
  pages     = {19:1--19:39},
  articleno = {19},
  pagetotal = {39},
  doi       = {10.1145/2431211.2431218},
}
\end{filecontents*}

\begin{filecontents*}{articleno.dbx}
\ProvidesFile{articleno.dbx}

\DeclareDatamodelFields[type=field,datatype=integer]{articleno}
\DeclareDatamodelEntryfields[article]{articleno}
\end{filecontents*}

\NewBibliographyString{artno}
\DefineBibliographyStrings{english}{artno = {Art\adddotspace No\adddot}}

\DeclareFieldFormat{articleno}{\bibstring{artno}\addabbrvspace #1}

\renewbibmacro*{note+pages}{%
  \printfield{note}%
  \setunit{\bibpagespunct}%
  \printfield{articleno}
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \newunit}

\addbibresource{\jobname.bib}

\begin{document}
  \cite{mooney}
  \printbibliography
\end{document}

enter image description here

  • I'm trying to do the same for an @inproceedings bib entry. There above MWE doesn't work. I'm suspecting it's due to note+pages. Do you have any suggestion for this problem? – m8mble Jul 21 '18 at 15:51
  • 1
    @m8mble For @inproceedings you want to modify chapter+pages instead of note+pages. If that does not help you, please consider asking a new question. – moewe Jul 21 '18 at 15:55
  • Works like a charm. Highly appreciated! – m8mble Jul 21 '18 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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