5

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
  • 1
    You could perhaps use the note field. – Bernard Aug 1 '14 at 20:49
7

Updated answer

The field for these sort of jobs in the biblatex standard data model is called eid. (Up to and including version 3.14 of biblatex the field is only available for @articles, but from v3.15 onwards it will be supported by all types where it makes sense, see https://github.com/plk/biblatex/pull/1000).

If you don't like the default output, you can modify it to show "Art. No.".

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

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

\DeclareFieldFormat[article,periodical]{eid}{\bibstring{artno}\addabbrvspace #1}

\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},
  eid       = {19},
  pagetotal = {39},
  doi       = {10.1145/2431211.2431218},
}
\end{filecontents*}

\addbibresource{\jobname.bib}

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

Old answer

If for some reason you don't want to use eid you can define a new articleno field. 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}

\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

7
  • 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
  • Is there any way to do this using bibtex as a backend instead of biber? Biber is causing a lot of problems with incorrect first/last name detection for me, so I had to switch to bibtex, but I also have citations with articleno... – Ralf Jung Jun 6 '20 at 11:48
  • 1
    @RalfJung For @articles eid has been around for a long time. The pull request I linked will just make it available for more entry types in the next version of biblatex (which isn't released yet). – moewe Jun 7 '20 at 10:33

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.