Erroneous removal of leading zeros in page numbers

Recently (sometime this year) Zotero (or probably citeproc-js) have started automatically removing leading zeros in page numbers (whatever citation style I use). I am using Zotero 4.0.29.10 for Firefox, and the issue appears both in Word and when generating bibliography inside the Zotero itself. While this may be fine (and desired behavior) in many cases, it introduces some problems.

In some journals article number (id) is used instead of page numbers, and this id may well start with 0. See, e.g.,
"J. Biomed. Opt. 2009, 14 (6), 064036" - http://dx.doi.org/10.1117/1.3275471
From 1800+ papers in my Zotero database around 180 (10%) use article id with leading zero. I believe that removing of first zero in such cases is erroneous and may cause problems in further identification of such references and proper attribution of citations by Web of Science and Scopus.

1) Is it really necessary to make this behavior "always on"? Can this change be reverted? Personally I have never encountered the case, where such removal is needed.

2) If the behavior stays as is, is there any way to safeguard particular items in Zotero library against it (by modifying the page-numbers field)? For instance, I tried several changes (page-number field -> result in bibliography):
064036 -> 64036
"064036" -> 64036
'064036' -> "064036"
\"064036\" -> "064036"
but none is satisfactory.
  • If retaining leading zeros is desired, that can happen. If retention is useful, it should not require any special markup. Two questions:

    (1) Should the presence of a leading zero affect the is-numeric conditional?

    (2) If the answer above is "yes," what should be done with hyphen in entries with a leading zero?
  • 1) no it shouldn't
  • How is that conditional used in practice? What happens for roman numeral pages or for non consecutive pages (e.g. '1,10-11')?

    I'm not aware of data sources that erroneously add leading zeros. They likely exist, but I suspect we should keep them as-is in most places.

    I've seen older data that included an article number and a range (e.g. 064036:1-3), though this seems less common.
  • edited June 7, 2016
    (3) Should page-range collapsing (Chicago, etc) be applied when a leading zero is present, and if so, what should the resulting entry look like?

    (4) Looking at noksagt's example: uh-oh. That would currently evaluate as non-numeric (I think). Is that a sufficiently rare edge case to make that permissible, or should it be handled as a pre-colon prefix plus a range of numeric elements (with collapsing, I guess) and an en-dash range delimiter?
  • edited June 7, 2016
    How is that conditional used in practice? What happens for roman numeral pages or for non consecutive pages (e.g. '1,10-11')?
    I don't know what styles do with it generally, but I've used it mostly on Edition, to discriminate between wordy edition names (that don't want a localized label) and actual numbers (that do).

    Roman numerals are a troublesome case for CSL. In citeproc-js, they are not recognized as numeric. They can be generated automatically from arabic source numbers, but I don't know of any cases where that is actually useful, since the romanized form is generally a feature of the input data, not of the style.

    Edit-add: The processor will treat non-consecutive page numbers like "1, 7 & 8-10" as a labeled series, for which a (lone) leading label is pluralized.
  • 3 no 4 so noksagt's example would evaluate as a series, too? That'd be ideal. Otherwise yes, ok to leave alone (sorry for short messages, mostly on phone today).
  • From what I've encountered, leading zeros only appear in article id, and they normally contain no other symbols (hyphens, semicolons,etc.). Sometimes site translators add redundant number of pages, like "064036-9" or "064036-064036", or even "064036-064036-9", but I consider it an error (to fix in translators) and manually remove everything starting from the first hyphen.

    (1) concerning is-numeric condition, there are pros and cons. Potentially leading zeros can appear in perfectly numeric page numbers, and then they should be considered as such. Some numeric treatment of article ids is also OK, like sorting. But some numeric treatment may be not desirable (at least, removing of leading zeros). The best option is probably to keep it numeric but retain leading zeros.

    (2) the easiest is probably to treat hyphens same as everywhere, e.g. as page range, to be OK for usual page range with redundant leading zero, since the hyphen should not normally appear in article ids. If article ids with hyphens are used (they may be with or without leading zeros), this will result in ambiguity anyway - and should be treated separately.

    (3) similar to (2), i.e. assume the normal page range with redundant zero as the main example. Article ids with hyphens will anyway produce something weird, so should be treated separately if a meaningful example will present itself.
  • Sometimes site translators add redundant number of pages
    Yes. And some of this comes in the RIS/bibtex/whatever emitted by the publisher. At least in some cases, it is debatable if there's a bug anywhere or what zotero should be doing. This info is rarely needed for citation, but could be useful for cataloging. The longterm solution seems to be to add article number support to zotero and to csl.
  • Okay! Thanks everyone for the feedback. I think I have a handle on the requirements, so I'll build some more tests and post back when there is something to show, probably sometime during the weekend.
  • Is there now a fix for this missing leading zero problem? I looked for options in the preferences but did not find any possibiltiy to control leading zeors.
  • Sorry, this had slipped off my radar. I've bundled a revised processor (tag 1.1.138) in the Propachi plugins. Try installing one of those, and see if it behaves as desired. (If it works, you should remove or disable the plugin at the next Zotero release.)
  • Dear Frank, thanks for the ultrafast fix and help! It works fine.
  • Thanks for the fix. As a Zotero paid subscriber, I hope this can be incorporated into the next Zotero release ASAP. I have used Zotero for many years and have trusted it to compile my bibliographies. Leading zeroes are in page numbers for about 25% of my references, so this is MAJOR issue for me.

    I am currently working toward an urgent deadline and discovered the issue when checking my bibliography. I then wasted > an hour trying to figure out whether the problem was something in the style. Finally I found this thread which explains it is a bug introduced by Zotero issue...I'm not a happy camper right now.
  • Sorry for the inconvenience. The fix is available in Zotero 4.0.29.16, available now for Firefox. (Standalone versions will get this fix in 5.0, which is available in beta now and will be released soon.)
  • Thanks, Dan. Greatly appreciate your help.
Sign In or Register to comment.