4

I want to know how I should properly use the provided page field of an article published in an online journal (such as PLoS Computational Biology).

Even though articles published in online journals do not have actual page numbers, both the journals themselves and Google Scholar provide a pages field holding values such as e1000112 (PLoS) and 20122863 (Proceedings of the Royal Society).

Semantics aside, using the pages field for this would be a non-issue, but the fact that the second value does not start with a letter means that the printed citation shows p. 20122863 which is wrong because that number is not an actual page number.

Also, it seems to me that the pages field should not be used for this purpose, so I tried to find an alternative and found eid [source]:

eid

The Electronic identifier is for electronic journals that also appear in print. This number replaces the page number, and is used to find the article within the printed volume. Sometimes also called citation number.

But I am not sure whether this is suitable because it mentions printed volumes and I am positive that not every online journal ends up publishing printed volumes.

Question:

What field should I use for the pages field provided by online journals that is compatible with both natbib+bibtex and biblatex+biber?

sudosensei
  • 4,072
  • With biblatex it would probably be no problem to use the pages field and use pagination={none} in those cases. To say how a solution might work with natbib, we would need to know what style you use, as the .bst file decides what gets printed, and how it is going to look. – moewe Apr 18 '14 at 13:19
  • @moewe I am not interested in a specific style -- my main concern is the proper formatting of my .bib files such that biblatex and natbib can access and show the field correctly. Also, I want to avoid a biblatex-only solution as switch between biblatex and natbib for different projects. Is eid not the right field to use? What happens when pages={e1000112} that prevents pagination from appearing (I assume it's the e)? It seems that best option would be to use something in the pages field that prevents pagination. – sudosensei Apr 18 '14 at 13:39
  • 1
    It is the style (bst for natbib) which decides if and how to print the content of field. If the style doesn't support a special pagination style it is perhaps possible to find some trick to get around it but imho there never will be a general solution working for all natbib compatible styles. E.g. styles which don't know the eid field will simply ignore it. – Ulrike Fischer Apr 18 '14 at 14:32
  • @UlrikeFischer Yes, I am aware that if the style does not support, for example, eid, then there's no point in using it. Hence, I am now in search of a work-around. I tried to adapt Mico's answer from here by using pages={\noop{e}20122863}), but it does not disable pagination. e is not typeset as expected, but p. is typeset. – sudosensei Apr 18 '14 at 14:40
  • 1
    The page field looks like the more likely candidate for a universal solution as I imagine that not all styles are able to deal with the eid. But as Ulrike Fischer says (and I mentioned above), it is the .bst who decides the output, and if the .bst file always prints "p." in front of the pages field and allows for no mechanism to disable this behaviour, you will have to live with that. A universal solution that works with everything seems quite unlikely. – moewe Apr 18 '14 at 15:16
  • The \noop command will not disable any page prefixing, it will make BibTeX see the "e", but will suppress it in the final output (which is probably not what you want at all). biblatex checks if the pages field contains something that looks like a page range (numbers and some special characters), if not the page prefix is disabled. As you correctly guess the "e" tells biblatex this is not a proper range field. – moewe Apr 18 '14 at 15:20
  • @moewe Thanks a lot for the detailed explanation. I understand that a universal solution is all but impossible. I'd be more than happy with a solution that does not typeset p./pp. when the pages field starts with a letter, as in the example above starting with e. This is the current behaviour actually. However, I would also like to "fool" the page(-range) check by using something like \noop{e}123456. This will mean that e is not typeset but p./pp. are not typeset either. – sudosensei Apr 18 '14 at 15:25
  • 1
    I'm not quite sure whether all styles do actually check the pages field for "number-range-ness" (biblatex does, but I imagine not all natbib .bst files do). As such a work-around like this might work with some styles (not a lot actually, I suppose), but is useless as the universal solution you want it to be. – moewe Apr 18 '14 at 15:27
  • As you now have been told more than once: It depends on the style how the page number is printed. And as you didn't say which style(s) you want to use it is impossible to say if there exist a solution for them. – Ulrike Fischer Apr 18 '14 at 15:27
  • With biblatex, however, you do not have to trick biblatex into thinking the pages field does not contain a proper page range when it does, a simple pagination = {none} in the .bib entry to that particular item suffices to tell biblatex that you do not wish to see any "p."/"pp." stuff. – moewe Apr 18 '14 at 15:29
  • How do you come to the assessment that "a universal solution is all but impossible", if you look around on this site, you will find that a lot of fixes and modifications are heavily style-specific and -dependant. As the eid field is probably newer than some styles (there are styles out there without URL support! as they pre-date the advent of the modern internet) and the pages number range check is not a standard function in BibTeX AFAIK, there is bound to be some style (quite a lot actually) that these solutions do not work with. – moewe Apr 18 '14 at 15:37
  • The best you can hope for is a solution that is widely applicable (and at least applicable to all the styles you use at the moment, and maybe are likely to use in the future) and easy to implement if one has to modify other styles. But even that seems like a herculean and/or Sisyphean task. – moewe Apr 18 '14 at 15:40
  • @moewe @UlrikeFischer: Thanks a lot for your comments! I now understand why a universal solution is impossible. I'll gladly accept a short explanation on why that is so along with the pagination={none} biblatex option as an answer. You have both been extremely helpful! – sudosensei Apr 18 '14 at 17:46
  • @moewe At least in British English, 'a universal solution is all but impossible' means 'a universal solution is nearly/almost impossible'. I think you are seeing recalcitrance where only agreement is to be found ;). – cfr Apr 19 '14 at 03:46
  • @cfr Ahhh well, the English language (and not only the British version apparently, "all but" seems to be an idiom in all varieties of the English language) has thrown me once again; I might have been a bit more insistent than necessary. – moewe Apr 19 '14 at 09:19
  • @moewe It was not until I read your comments that I realised just how illogical it is... :). – cfr Apr 19 '14 at 12:36
  • @moewe Seems like I've created a mess! :-) Apologies. But yes, I did mean that a universal solution is impossible. The biblatex-only solution will have to do for now. By the way, the correct option to use is bookpagination = {none}; pagination is used for in-text citations as far as I can tell. So thanks. Feel free to write up a short answer so that I can give credit where it's due! – sudosensei Apr 19 '14 at 12:54
  • No need to apologise (after all it was not you who messed up the understanding of the English language). I really hope I did not come across too impatient and harsh/rude. I came up with an answer, it is not short though. Hope you're still fine with it. – moewe Apr 19 '14 at 19:09
  • @moewe You didn't come across as impatient, harsh or rude. Au contraire - I always find how patient people on this website are when dealing with n00bs like me surprising. :-) So thanks a lot! – sudosensei Apr 21 '14 at 14:03

1 Answers1

3

tl;dr: A universal solution is very nearly impossible, biblatex offers the bookpagination (and pagination field) and a well-coded style will make use of those, so bookpagination = {none} seems a good way to go for biblatex.

The Long Answer

A solution that works for both natbib and biblatex is almost impossible (one might say all but impossible) for the simple reason that it is not natbib or biblatex that decides what is printed and how the bibliography looks like, but the bibliography style (\bibliographystyle in "BibTeX packages"for lack of a better name [the .bst styles]; style, bibstyle with biblatex [the .bbx styles]); so a universal solution would have to work with all the styles (.bst as well as .bbx) available today - that is quite a lot of styles.

While most of the styles adhere to a general semantics and best practice, we cannot be sure that all styles will display, say, the pages field in a certain way (well, we can be quite sure with the pages field as it is so essential and standard, but the eid field is a different matter altogether).

Most of the "exotic" fields such as eid, eprint etc. are bound to be unsupported by a number of styles - even the more basic (and arguably quite un-exotic - by modern standards at least) URL field is lacking in some styles, simply because they were completed before the advent of the URI, which was standardised in 1994 (RFC1738), case in point: ieeetr.bst seems to have been the same since 1988 (save for a clarification of the licence).

Having said all that, the pages field is probably your best bet for a widely applicable solution, plus it does not seem to be too far off semantically.

But even the treatment of the pages field is not standardised or normalised across bibliography styles: Some .bst styles check whether the pages field contains multiple pages in order to decided whether to print "p." or "pp." (plain.bst and ieeetr.bst), but there is no need to do that in a German style since in both cases the abbreviation will be "S.", consequently natdin.bst does not care to check for "multiple pages", it behaves differently if a URL is present, though.

biblatex offers a lot of these functionalities out of the box, so almost all styles make use of them (that is also thanks to the fact that a lot of the biblatex styles out there are coded quite well), I have yet to come across a style that tries to implement these checks itself.

biblatex will check if the pages field actually contains a "page range", page ranges consist of characters recognised as numbers (see \DeclareNumChars) and those recognised as range separators/indicators (see \DeclareRangeChars) as well as certain other commands (see \DeclareRangeCommands and \DeclarePageCommands). If the pages field contains only characters and commands declared there, it passes the \ifpages test. If a pages field passes the \ifpages test and it is printed with \mkpageprefix, the page prefix "p."/"pp." will be added if it does not, the pages field is printed as is without a prefix. In fact, we can control the prefix added to the pages field as described in §2.3.10 Pagination, p. 35, of the biblatex documentation, we can even define our own prefix (as shown in Citing specific slides of a presentation).

The "pagination scheme" is even settable on a per-entry basis with pagination (controls how in-text citations have the postnote formatted if it passes \ifpages) and bookpagination (controls the pages and pagetotal fields).

So what you could do for these special pages fields is to add bookpagination = {none} to the corresponding entry (or hope for a character that throws \ifpages to false, the e in the PLoS entries does exactly that).

An example with bookpagination = {none}:

@article{Clune22032013,
  author   = {Clune, Jeff and Mouret, Jean-Baptiste and Lipson, Hod}, 
  title    = {The Evolutionary Origins of Modularity},
  volume   = {280}, 
  number   = {1755},
  pages    = {20122863},
  bookpagination = {none},
  date     = {2013}, 
  doi      = {10.1098/rspb.2012.2863},
  eprint   = {http://rspb.royalsocietypublishing.org/content/280/1755/20122863.full.pdf+html}, 
  journal  = {Proceedings of the Royal Society B: Biological Sciences} 
}

The MWE

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

\begin{filecontents*}{\jobname.bib}
@article{Clune22032013,
  author   = {Clune, Jeff and Mouret, Jean-Baptiste and Lipson, Hod}, 
  title    = {The Evolutionary Origins of Modularity},
  volume   = {280}, 
  number   = {1755},
  pages    = {20122863},
  bookpagination = {none},
  date     = {2013}, 
  doi      = {10.1098/rspb.2012.2863}, 
  eprint   = {http://rspb.royalsocietypublishing.org/content/280/1755/20122863.full.pdf+html}, 
  journal  = {Proceedings of the Royal Society B: Biological Sciences} 
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
  \cite[3]{Clune22032013}  

  \printbibliography
\end{document}

yields, note that for in-text references the pages prefix is enabled (and the default page one), while the prefix for the journal pages is disabled.

enter image description here

moewe
  • 175,683
  • Wow! This answer is awesome. I asked this question expecting a very simple answer, but I ended up learning a lot about bibtex, biblatex, styles etc. Thanks a lot! – sudosensei Apr 21 '14 at 14:01